From 2ea82dd831994e6a032fc69cf13f6f491f2e5762 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Wed, 17 Jul 2024 18:33:05 +0200 Subject: [PATCH 01/24] v1.0.0-alpha rewrite - changed organisation and package name - updated maintainers - removed previous code items - updated tools Signed-off-by: Jean-Baptiste Bianchi --- MAINTAINERS.md | 11 +- README.md | 22 +- examples/browser/index.html | 40 - examples/browser/mermaid.html | 46 - examples/node/index.js | 18 - examples/node/index.ts | 34 - examples/node/tsconfig.json | 3 - package-lock.json | 12361 +++++----------- package.json | 74 +- src/index.ts | 3 - src/lib/builder.ts | 52 - src/lib/builders/action-builder.ts | 41 - src/lib/builders/actiondatafilter-builder.ts | 41 - src/lib/builders/authdef-builder.ts | 41 - src/lib/builders/basicpropsdef-builder.ts | 41 - src/lib/builders/bearerpropsdef-builder.ts | 41 - src/lib/builders/branch-builder.ts | 41 - src/lib/builders/callbackstate-builder.ts | 44 - src/lib/builders/continueasdef-builder.ts | 41 - src/lib/builders/correlation-def-builder.ts | 41 - src/lib/builders/crondef-builder.ts | 41 - .../builders/databasedswitchstate-builder.ts | 43 - .../builders/defaultconditiondef-builder.ts | 43 - src/lib/builders/end-builder.ts | 41 - src/lib/builders/enddatacondition-builder.ts | 41 - src/lib/builders/endeventcondition-builder.ts | 41 - src/lib/builders/error-builder.ts | 44 - src/lib/builders/errordef-builder.ts | 41 - .../builders/eventbasedswitchstate-builder.ts | 43 - src/lib/builders/eventdatafilter-builder.ts | 41 - src/lib/builders/eventdef-builder.ts | 41 - src/lib/builders/eventref-builder.ts | 41 - src/lib/builders/eventstate-builder.ts | 44 - src/lib/builders/extension-builder.ts | 41 - src/lib/builders/foreachstate-builder.ts | 44 - src/lib/builders/function-builder.ts | 41 - src/lib/builders/functionref-builder.ts | 41 - src/lib/builders/index.ts | 62 - src/lib/builders/injectstate-builder.ts | 44 - src/lib/builders/metadata-builder.ts | 41 - src/lib/builders/oauth2propsdef-builder.ts | 41 - src/lib/builders/onevents-builder.ts | 41 - src/lib/builders/operationstate-builder.ts | 44 - src/lib/builders/parallelstate-builder.ts | 44 - src/lib/builders/produceeventdef-builder.ts | 41 - src/lib/builders/retrydef-builder.ts | 41 - src/lib/builders/schedule-builder.ts | 41 - src/lib/builders/sleep-builder.ts | 41 - src/lib/builders/sleepstate-builder.ts | 41 - src/lib/builders/startdef-builder.ts | 41 - src/lib/builders/statedatafilter-builder.ts | 41 - src/lib/builders/subflowref-builder.ts | 41 - src/lib/builders/timeouts-builder.ts | 41 - src/lib/builders/transition-builder.ts | 41 - .../transitiondatacondition-builder.ts | 43 - .../transitioneventcondition-builder.ts | 43 - src/lib/builders/workflow-builder.ts | 41 - .../builders/workflow-exec-timeout-builder.ts | 43 - src/lib/{builders => definitions}/README.md | 0 src/lib/definitions/action.ts | 88 - src/lib/definitions/actiondatafilter.ts | 46 - src/lib/definitions/authdef.ts | 54 - src/lib/definitions/basicpropsdef.ts | 44 - src/lib/definitions/bearerpropsdef.ts | 39 - src/lib/definitions/branch.ts | 58 - src/lib/definitions/callbackstate.ts | 142 - src/lib/definitions/continueasdef.ts | 69 - src/lib/definitions/correlationDef.ts | 38 - src/lib/definitions/crondef.ts | 38 - src/lib/definitions/databasedswitchstate.ts | 107 - src/lib/definitions/defaultconditiondef.ts | 61 - src/lib/definitions/end.ts | 70 - src/lib/definitions/enddatacondition.ts | 58 - src/lib/definitions/endeventcondition.ts | 70 - src/lib/definitions/error.ts | 64 - src/lib/definitions/errordef.ts | 43 - src/lib/definitions/eventbasedswitchstate.ts | 108 - src/lib/definitions/eventdatafilter.ts | 43 - src/lib/definitions/eventdef.ts | 83 - src/lib/definitions/eventref.ts | 66 - src/lib/definitions/eventstate.ts | 117 - src/lib/definitions/extension.ts | 39 - src/lib/definitions/foreachstate.ts | 148 - src/lib/definitions/function.ts | 71 - src/lib/definitions/functionref.ts | 60 - src/lib/definitions/index.ts | 1 + src/lib/definitions/injectstate.ts | 106 - src/lib/definitions/metadata.ts | 23 - src/lib/definitions/oauth2propsdef.ts | 80 - src/lib/definitions/onevents.ts | 69 - src/lib/definitions/operationstate.ts | 134 - src/lib/definitions/parallelstate.ts | 137 - src/lib/definitions/produceeventdef.ts | 53 - src/lib/definitions/retrydef.ts | 59 - src/lib/definitions/schedule.ts | 44 - src/lib/definitions/sleep.ts | 39 - src/lib/definitions/sleepstate.ts | 80 - src/lib/definitions/specification.ts | 1138 +- src/lib/definitions/startdef.ts | 43 - src/lib/definitions/statedatafilter.ts | 38 - src/lib/definitions/subflowref.ts | 57 - src/lib/definitions/timeouts.ts | 46 - src/lib/definitions/transition.ts | 57 - .../definitions/transitiondatacondition.ts | 57 - .../definitions/transitioneventcondition.ts | 69 - src/lib/definitions/types.ts | 112 - src/lib/definitions/utils.ts | 846 -- src/lib/definitions/workflow.ts | 208 - src/lib/definitions/workflowExecTimeout.ts | 54 - src/lib/diagram/index.ts | 17 - src/lib/diagram/mermaidDiagram.ts | 35 - src/lib/diagram/mermaidState.ts | 392 - src/lib/schema/{types => }/README.md | 0 src/lib/schema/__merged.json | 2610 ---- src/lib/schema/auth.json | 194 - src/lib/schema/common.json | 15 - src/lib/schema/errors.json | 53 - src/lib/schema/events.json | 116 - src/lib/schema/extensions/kpi.json | 289 - src/lib/schema/extensions/ratelimiting.json | 73 - src/lib/schema/functions.json | 95 - src/lib/schema/odata.json | 81 - src/lib/schema/retries.json | 85 - src/lib/schema/secrets.json | 26 - src/lib/schema/timeouts.json | 96 - src/lib/schema/types/index.ts | 17 - src/lib/schema/types/workflow.ts | 1511 -- src/lib/schema/workflow.json | 2980 ++-- src/lib/schema/workflowextensions.json | 50 - src/lib/utils.ts | 142 - src/lib/validation-error.ts | 19 - src/lib/validation/README.md | 2 - src/lib/validation/validators-paths.ts | 81 - src/lib/validators.ts | 56 - src/lib/workflow-validator.ts | 55 - src/serverless-workflow-sdk.ts | 21 - tests/examples/applicantrequest.json | 59 - tests/examples/applicantrequest.spec.ts | 83 - tests/examples/booklending.json | 138 - tests/examples/booklending.spec.ts | 164 - tests/examples/carauctionbids.json | 49 - tests/examples/carauctionbids.spec.ts | 69 - tests/examples/checkcarvitals.json | 60 - tests/examples/checkcarvitals.spec.ts | 69 - tests/examples/jobmonitoring.json | 127 - tests/examples/jobmonitoring.spec.ts | 139 - tests/examples/parallel.json | 34 - tests/examples/parallel.spec.ts | 50 - tests/examples/provisionorder.json | 100 - tests/examples/provisionorder.spec.ts | 95 - tests/examples/sendcloudevent.json | 47 - tests/examples/sendcloudevent.spec.ts | 77 - tests/examples/solvemathproblems.json | 37 - tests/examples/solvemathproblems.spec.ts | 67 - tests/lib/builders/eventstate-builder.spec.ts | 44 - tests/lib/builders/function-builder.spec.ts | 32 - .../builders/operationstate-builder.spec.ts | 38 - tests/lib/definitions/action.spec.ts | 34 - tests/lib/definitions/branch.spec.ts | 30 - tests/lib/definitions/eventdef.spec.ts | 32 - tests/lib/definitions/schedule.spec.ts | 38 - tests/lib/definitions/util.spec.ts | 126 - .../workflow-converter-hello-world.json | 18 - .../workflow-converter-hello-world.xxx | 1 - .../workflow-converter-hello-world.yaml | 12 - .../workflow-converter-hello-world.yml | 12 - tests/lib/definitions/workflow.spec.ts | 170 - tests/lib/diagram/mermaidDiagram.spec.ts | 86 - tests/lib/diagram/mermaidState.spec.ts | 352 - tests/lib/diagram/wf_with_compensation.json | 74 - tests/lib/utils.spec.ts | 55 - tests/lib/workflow-validator.spec.ts | 90 - tools/download-schemas-github.ts | 142 - tools/generate-builders.ts | 2 +- tools/generate-definitions.ts | 149 +- tools/generate-merged_json.ts | 48 - tools/utils.ts | 161 +- 177 files changed, 6227 insertions(+), 26113 deletions(-) delete mode 100644 examples/browser/index.html delete mode 100644 examples/browser/mermaid.html delete mode 100644 examples/node/index.js delete mode 100644 examples/node/index.ts delete mode 100644 examples/node/tsconfig.json delete mode 100644 src/lib/builder.ts delete mode 100644 src/lib/builders/action-builder.ts delete mode 100644 src/lib/builders/actiondatafilter-builder.ts delete mode 100644 src/lib/builders/authdef-builder.ts delete mode 100644 src/lib/builders/basicpropsdef-builder.ts delete mode 100644 src/lib/builders/bearerpropsdef-builder.ts delete mode 100644 src/lib/builders/branch-builder.ts delete mode 100644 src/lib/builders/callbackstate-builder.ts delete mode 100644 src/lib/builders/continueasdef-builder.ts delete mode 100644 src/lib/builders/correlation-def-builder.ts delete mode 100644 src/lib/builders/crondef-builder.ts delete mode 100644 src/lib/builders/databasedswitchstate-builder.ts delete mode 100644 src/lib/builders/defaultconditiondef-builder.ts delete mode 100644 src/lib/builders/end-builder.ts delete mode 100644 src/lib/builders/enddatacondition-builder.ts delete mode 100644 src/lib/builders/endeventcondition-builder.ts delete mode 100644 src/lib/builders/error-builder.ts delete mode 100644 src/lib/builders/errordef-builder.ts delete mode 100644 src/lib/builders/eventbasedswitchstate-builder.ts delete mode 100644 src/lib/builders/eventdatafilter-builder.ts delete mode 100644 src/lib/builders/eventdef-builder.ts delete mode 100644 src/lib/builders/eventref-builder.ts delete mode 100644 src/lib/builders/eventstate-builder.ts delete mode 100644 src/lib/builders/extension-builder.ts delete mode 100644 src/lib/builders/foreachstate-builder.ts delete mode 100644 src/lib/builders/function-builder.ts delete mode 100644 src/lib/builders/functionref-builder.ts delete mode 100644 src/lib/builders/index.ts delete mode 100644 src/lib/builders/injectstate-builder.ts delete mode 100644 src/lib/builders/metadata-builder.ts delete mode 100644 src/lib/builders/oauth2propsdef-builder.ts delete mode 100644 src/lib/builders/onevents-builder.ts delete mode 100644 src/lib/builders/operationstate-builder.ts delete mode 100644 src/lib/builders/parallelstate-builder.ts delete mode 100644 src/lib/builders/produceeventdef-builder.ts delete mode 100644 src/lib/builders/retrydef-builder.ts delete mode 100644 src/lib/builders/schedule-builder.ts delete mode 100644 src/lib/builders/sleep-builder.ts delete mode 100644 src/lib/builders/sleepstate-builder.ts delete mode 100644 src/lib/builders/startdef-builder.ts delete mode 100644 src/lib/builders/statedatafilter-builder.ts delete mode 100644 src/lib/builders/subflowref-builder.ts delete mode 100644 src/lib/builders/timeouts-builder.ts delete mode 100644 src/lib/builders/transition-builder.ts delete mode 100644 src/lib/builders/transitiondatacondition-builder.ts delete mode 100644 src/lib/builders/transitioneventcondition-builder.ts delete mode 100644 src/lib/builders/workflow-builder.ts delete mode 100644 src/lib/builders/workflow-exec-timeout-builder.ts rename src/lib/{builders => definitions}/README.md (100%) delete mode 100644 src/lib/definitions/action.ts delete mode 100644 src/lib/definitions/actiondatafilter.ts delete mode 100644 src/lib/definitions/authdef.ts delete mode 100644 src/lib/definitions/basicpropsdef.ts delete mode 100644 src/lib/definitions/bearerpropsdef.ts delete mode 100644 src/lib/definitions/branch.ts delete mode 100644 src/lib/definitions/callbackstate.ts delete mode 100644 src/lib/definitions/continueasdef.ts delete mode 100644 src/lib/definitions/correlationDef.ts delete mode 100644 src/lib/definitions/crondef.ts delete mode 100644 src/lib/definitions/databasedswitchstate.ts delete mode 100644 src/lib/definitions/defaultconditiondef.ts delete mode 100644 src/lib/definitions/end.ts delete mode 100644 src/lib/definitions/enddatacondition.ts delete mode 100644 src/lib/definitions/endeventcondition.ts delete mode 100644 src/lib/definitions/error.ts delete mode 100644 src/lib/definitions/errordef.ts delete mode 100644 src/lib/definitions/eventbasedswitchstate.ts delete mode 100644 src/lib/definitions/eventdatafilter.ts delete mode 100644 src/lib/definitions/eventdef.ts delete mode 100644 src/lib/definitions/eventref.ts delete mode 100644 src/lib/definitions/eventstate.ts delete mode 100644 src/lib/definitions/extension.ts delete mode 100644 src/lib/definitions/foreachstate.ts delete mode 100644 src/lib/definitions/function.ts delete mode 100644 src/lib/definitions/functionref.ts delete mode 100644 src/lib/definitions/injectstate.ts delete mode 100644 src/lib/definitions/metadata.ts delete mode 100644 src/lib/definitions/oauth2propsdef.ts delete mode 100644 src/lib/definitions/onevents.ts delete mode 100644 src/lib/definitions/operationstate.ts delete mode 100644 src/lib/definitions/parallelstate.ts delete mode 100644 src/lib/definitions/produceeventdef.ts delete mode 100644 src/lib/definitions/retrydef.ts delete mode 100644 src/lib/definitions/schedule.ts delete mode 100644 src/lib/definitions/sleep.ts delete mode 100644 src/lib/definitions/sleepstate.ts delete mode 100644 src/lib/definitions/startdef.ts delete mode 100644 src/lib/definitions/statedatafilter.ts delete mode 100644 src/lib/definitions/subflowref.ts delete mode 100644 src/lib/definitions/timeouts.ts delete mode 100644 src/lib/definitions/transition.ts delete mode 100644 src/lib/definitions/transitiondatacondition.ts delete mode 100644 src/lib/definitions/transitioneventcondition.ts delete mode 100644 src/lib/definitions/types.ts delete mode 100644 src/lib/definitions/utils.ts delete mode 100644 src/lib/definitions/workflow.ts delete mode 100644 src/lib/definitions/workflowExecTimeout.ts delete mode 100644 src/lib/diagram/index.ts delete mode 100644 src/lib/diagram/mermaidDiagram.ts delete mode 100644 src/lib/diagram/mermaidState.ts rename src/lib/schema/{types => }/README.md (100%) delete mode 100644 src/lib/schema/__merged.json delete mode 100644 src/lib/schema/auth.json delete mode 100644 src/lib/schema/common.json delete mode 100644 src/lib/schema/errors.json delete mode 100644 src/lib/schema/events.json delete mode 100644 src/lib/schema/extensions/kpi.json delete mode 100644 src/lib/schema/extensions/ratelimiting.json delete mode 100644 src/lib/schema/functions.json delete mode 100644 src/lib/schema/odata.json delete mode 100644 src/lib/schema/retries.json delete mode 100644 src/lib/schema/secrets.json delete mode 100644 src/lib/schema/timeouts.json delete mode 100644 src/lib/schema/types/index.ts delete mode 100644 src/lib/schema/types/workflow.ts delete mode 100644 src/lib/schema/workflowextensions.json delete mode 100644 src/lib/utils.ts delete mode 100644 src/lib/validation-error.ts delete mode 100644 src/lib/validation/README.md delete mode 100644 src/lib/validation/validators-paths.ts delete mode 100644 src/lib/validators.ts delete mode 100644 src/lib/workflow-validator.ts delete mode 100644 src/serverless-workflow-sdk.ts delete mode 100644 tests/examples/applicantrequest.json delete mode 100644 tests/examples/applicantrequest.spec.ts delete mode 100644 tests/examples/booklending.json delete mode 100644 tests/examples/booklending.spec.ts delete mode 100644 tests/examples/carauctionbids.json delete mode 100644 tests/examples/carauctionbids.spec.ts delete mode 100644 tests/examples/checkcarvitals.json delete mode 100644 tests/examples/checkcarvitals.spec.ts delete mode 100644 tests/examples/jobmonitoring.json delete mode 100644 tests/examples/jobmonitoring.spec.ts delete mode 100644 tests/examples/parallel.json delete mode 100644 tests/examples/parallel.spec.ts delete mode 100644 tests/examples/provisionorder.json delete mode 100644 tests/examples/provisionorder.spec.ts delete mode 100644 tests/examples/sendcloudevent.json delete mode 100644 tests/examples/sendcloudevent.spec.ts delete mode 100644 tests/examples/solvemathproblems.json delete mode 100644 tests/examples/solvemathproblems.spec.ts delete mode 100644 tests/lib/builders/eventstate-builder.spec.ts delete mode 100644 tests/lib/builders/function-builder.spec.ts delete mode 100644 tests/lib/builders/operationstate-builder.spec.ts delete mode 100644 tests/lib/definitions/action.spec.ts delete mode 100644 tests/lib/definitions/branch.spec.ts delete mode 100644 tests/lib/definitions/eventdef.spec.ts delete mode 100644 tests/lib/definitions/schedule.spec.ts delete mode 100644 tests/lib/definitions/util.spec.ts delete mode 100644 tests/lib/definitions/workflow-converter-hello-world.json delete mode 100644 tests/lib/definitions/workflow-converter-hello-world.xxx delete mode 100644 tests/lib/definitions/workflow-converter-hello-world.yaml delete mode 100644 tests/lib/definitions/workflow-converter-hello-world.yml delete mode 100644 tests/lib/definitions/workflow.spec.ts delete mode 100644 tests/lib/diagram/mermaidDiagram.spec.ts delete mode 100644 tests/lib/diagram/mermaidState.spec.ts delete mode 100644 tests/lib/diagram/wf_with_compensation.json delete mode 100644 tests/lib/utils.spec.ts delete mode 100644 tests/lib/workflow-validator.spec.ts delete mode 100644 tools/download-schemas-github.ts delete mode 100644 tools/generate-merged_json.ts diff --git a/MAINTAINERS.md b/MAINTAINERS.md index b0a266b2..1127b64d 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -1,4 +1,11 @@ -# Serverless Workflow Typescript SDK Maintainers +# Serverless Workflow Org Maintainers +* [Jean-Baptiste Bianchi](https://github.com/JBBianchi) +* [Charles d'Avernas](https://github.com/cdavernas) +* [Ricardo Zanini](https://github.com/ricardozanini) + +# Serverless Workflow Org Emeritus Maintainers * [Antonio Mendoza Pérez](https://github.com/antmendoza) -* [Tihomir Surdilovic](https://github.com/tsurdilo) + +# Maintainers Mailing list +[cncf-serverlessws-maintainers](mailto:cncf-serverlessws-maintainers@lists.cncf.io) \ No newline at end of file diff --git a/README.md b/README.md index 0381af1b..b4d5da13 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Node CI](https://github.com/serverlessworkflow/sdk-typescript/workflows/Node%20CI/badge.svg) [![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/serverlessworkflow/sdk-typescript) +![Node CI](https://github.com/serverless-workflow/sdk/workflows/Node%20CI/badge.svg) [![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/serverless-workflow/sdk) # Serverless Workflow Specification - Typescript SDK @@ -14,9 +14,9 @@ With the SDK you can: | Latest Releases | Conformance to spec version | | :---: | :---: | -| [v1.0.0](https://github.com/serverlessworkflow/sdk-typescript/releases/) | [v0.6](https://github.com/serverlessworkflow/specification/tree/0.6.x) | -| [v2.0.0](https://github.com/serverlessworkflow/sdk-typescript/releases/) | [v0.7](https://github.com/serverlessworkflow/specification/tree/0.7.x) | -| [v3.0.0](https://github.com/serverlessworkflow/sdk-typescript/releases/) | [v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x) | +| [v1.0.0](https://github.com/serverless-workflow/sdk/releases/) | [v0.6](https://github.com/serverlessworkflow/specification/tree/0.6.x) | +| [v2.0.0](https://github.com/serverless-workflow/sdk/releases/) | [v0.7](https://github.com/serverlessworkflow/specification/tree/0.7.x) | +| [v3.0.0](https://github.com/serverless-workflow/sdk/releases/) | [v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x) | @@ -27,7 +27,7 @@ With the SDK you can: To build the project and run tests locally: ```sh -git clone https://github.com/serverlessworkflow/sdk-typescript.git +git clone https://github.com/serverless-workflow/sdk.git cd sdk-typescript npm install && npm run build && npm run test ``` @@ -41,7 +41,7 @@ npm install && npm run build && npm run test ##### Version >= 4.0.0 Note: Version 4.0.0 has not been released yet. ```sh -npm i @serverlessworkflow/sdk-typescript +npm i @serverless-workflow/sdk ``` @@ -55,7 +55,7 @@ npm i @severlessworkflow/sdk-typescript #### Create Workflow using builder API ```typescript -import { workflowBuilder, injectstateBuilder, Specification } from '@serverlessworkflow/sdk-typescript'; +import { workflowBuilder, injectstateBuilder, Specification } from '@serverless-workflow/sdk'; const workflow: Specification.Workflow = workflowBuilder() .id("helloworld") @@ -78,7 +78,7 @@ const workflow: Specification.Workflow = workflowBuilder() #### Create Workflow from JSON/YAML source ```typescript -import { Specification, Workflow } from '@serverlessworkflow/sdk-typescript'; +import { Specification, Workflow } from '@serverless-workflow/sdk'; const source = `id: helloworld version: '1.0' @@ -102,7 +102,7 @@ Where `source` can be in both JSON or YAML format. Having the following workflow instance: ```typescript -import { workflowBuilder, injectstateBuilder, Specification } from '@serverlessworkflow/sdk-typescript'; +import { workflowBuilder, injectstateBuilder, Specification } from '@serverless-workflow/sdk'; const workflow: Specification.Workflow = workflowBuilder() .id("helloworld") @@ -156,7 +156,7 @@ The sdk provides a way to validate if a workflow object is compliant with the se - `validate(): boolean` ```typescript -import {WorkflowValidator, Specification} from '@serverlessworkflow/sdk-typescript'; +import {WorkflowValidator, Specification} from '@serverless-workflow/sdk'; import {Workflow} from "./workflow"; const workflow = { @@ -188,7 +188,7 @@ You can also validate parts of a workflow using `validators`: ```typescript import { ValidateFunction } from 'ajv'; -import { validators, Specification } from '@serverlessworkflow/sdk-typescript'; +import { validators, Specification } from '@serverless-workflow/sdk'; const injectionState: Specification.Injectstate = workflow.states[0]; const injectionStateValidator: ValidateFunction = validators.get('Injectstate'); diff --git a/examples/browser/index.html b/examples/browser/index.html deleted file mode 100644 index 717fdb27..00000000 --- a/examples/browser/index.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - Serveless Workflow JS SDK - - - - - -
- - - - diff --git a/examples/browser/mermaid.html b/examples/browser/mermaid.html deleted file mode 100644 index 95c1249c..00000000 --- a/examples/browser/mermaid.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - Serveless Workflow JS SDK - - - - - -
- - - - - - - - diff --git a/examples/node/index.js b/examples/node/index.js deleted file mode 100644 index d4bfb805..00000000 --- a/examples/node/index.js +++ /dev/null @@ -1,18 +0,0 @@ -const { workflowBuilder, injectstateBuilder } = require('../../dist'); -const workflow = workflowBuilder() - .id("helloworld") - .version("1.0") - .name("Hello World Workflow") - .description("Inject Hello World") - .start("Hello State") - .states([ - injectstateBuilder() - .name("Hello State") - .data({ - "result": "Hello World!" - }) - .end(true) - .build() - ]) - .build(); -console.log(workflow.id); \ No newline at end of file diff --git a/examples/node/index.ts b/examples/node/index.ts deleted file mode 100644 index 2425e1a9..00000000 --- a/examples/node/index.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { injectstateBuilder, Specification, workflowBuilder } from '../../dist'; - -const workflow: Specification.Workflow = workflowBuilder() - .id('helloworld') - .version('1.0') - .name('Hello World Workflow') - .description('Inject Hello World') - .start('Hello State') - .states([ - injectstateBuilder() - .name('Hello State') - .data({ - result: 'Hello World!', - }) - .end(true) - .build(), - ]) - .build(); -console.log(workflow.id); diff --git a/examples/node/tsconfig.json b/examples/node/tsconfig.json deleted file mode 100644 index a86f07e5..00000000 --- a/examples/node/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../../tsconfig.base.json" -} diff --git a/package-lock.json b/package-lock.json index cd3ae34d..99343c4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,106 +1,128 @@ { - "name": "@serverlessworkflow/sdk-typescript", - "version": "4.0.0", - "lockfileVersion": 2, + "name": "@serverless-workflow/sdk", + "version": "1.0.0-alpha2.0", + "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@serverlessworkflow/sdk-typescript", - "version": "4.0.0", + "name": "@serverless-workflow/sdk", + "version": "1.0.0-alpha2.0", "license": "http://www.apache.org/licenses/LICENSE-2.0.txt", "dependencies": { - "ajv": "^8.1.0", + "ajv": "^8.17.1", "js-yaml": "^4.1.0" }, "devDependencies": { - "@apidevtools/json-schema-ref-parser": "^9.0.7", - "@dtsgenerator/replace-namespace": "^1.4.1", - "@rollup/plugin-commonjs": "^19.0.0", - "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-node-resolve": "^13.0.0", - "@types/jest": "^27.0.3", - "@types/js-yaml": "^4.0.1", - "@types/node-fetch": "^2.5.10", - "@types/rimraf": "^3.0.0", - "@types/yargs": "^16.0.1", - "@typescript-eslint/eslint-plugin": "^4.23.0", - "@typescript-eslint/parser": "^4.23.0", - "dtsgenerator": "^3.10.0", - "eslint": "^7.26.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-prettier": "^3.4.0", - "husky": "6.0.0", - "jest": "^27.4.3", - "lint-staged": "11.0.0", - "node-fetch": "^2.6.1", - "prettier": "^2.3.0", - "rimraf": "^3.0.2", - "rollup": "^2.47.0", + "@apidevtools/json-schema-ref-parser": "^11.6.4", + "@rollup/plugin-commonjs": "^26.0.1", + "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^15.2.3", + "@types/jest": "^29.5.12", + "@types/js-yaml": "^4.0.9", + "@types/node-fetch": "^2.6.11", + "@types/rimraf": "^4.0.5", + "@types/yargs": "^17.0.32", + "@typescript-eslint/eslint-plugin": "^7.16.1", + "@typescript-eslint/parser": "^7.16.1", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.1.3", + "husky": "^9.0.11", + "jest": "^29.7.0", + "json-schema-to-typescript": "^14.1.0", + "lint-staged": "^15.2.7", + "node-fetch": "^3.3.2", + "prettier": "^3.3.3", + "rimraf": "^6.0.1", + "rollup": "^2.79.1", "rollup-plugin-sourcemaps": "^0.6.3", "rollup-plugin-terser": "^7.0.2", - "rollup-plugin-typescript2": "^0.31.0", + "rollup-plugin-typescript2": "^0.36.0", "shx": "^0.3.4", - "ts-jest": "^27.1.0", - "ts-node": "^9.1.1", - "typescript": "^4.2.4", - "yargs": "^17.0.1" + "ts-jest": "^29.2.2", + "ts-morph": "^23.0.0", + "ts-node": "^10.9.2", + "typescript": "^5.5.3", + "yargs": "^17.7.2" + }, + "engines": { + "node": ">=20.0", + "npm": ">=10.0.0" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { - "node": ">=15.0", - "npm": ">=7.0.0" + "node": ">=6.0.0" } }, "node_modules/@apidevtools/json-schema-ref-parser": { - "version": "9.0.9", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", - "integrity": "sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==", + "version": "11.6.4", + "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-11.6.4.tgz", + "integrity": "sha512-9K6xOqeevacvweLGik6LnZCb1fBtCOSIWQs8d096XGeqoLKC33UVMGz9+77Gw44KvbH4pKcQPWo4ZpxkXYj05w==", "dev": true, "dependencies": { "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.6", - "call-me-maybe": "^1.0.1", + "@types/json-schema": "^7.0.15", "js-yaml": "^4.1.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/philsturgeon" } }, "node_modules/@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dev": true, "dependencies": { - "@babel/highlight": "^7.10.4" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.4.tgz", - "integrity": "sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q==", + "version": "7.24.9", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.9.tgz", + "integrity": "sha512-e701mcfApCJqMMueQI0Fb68Amflj83+dvAvHawoBpAz+GDjCIyGHzNwnefjsWJ3xiYAqqiQFoWbspGYBdb2/ng==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.0.tgz", - "integrity": "sha512-mYZEvshBRHGsIAiyH5PzCFTCfbWfoYbO/jcSdXQSUQu1/pW0xDZAUP7KEc32heqWTAfAHhV9j1vH8Sav7l+JNQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", - "@babel/helper-compilation-targets": "^7.16.0", - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helpers": "^7.16.0", - "@babel/parser": "^7.16.0", - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0", - "convert-source-map": "^1.7.0", + "version": "7.24.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.9.tgz", + "integrity": "sha512-5e3FI4Q3M3Pbr21+5xJwCv6ZT6KmGkI0vw3Tozy5ODAQFTIWe37iT8Cr7Ice2Ntb+M3iSKCEWMB1MBgKrW3whg==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.9", + "@babel/helper-compilation-targets": "^7.24.8", + "@babel/helper-module-transforms": "^7.24.9", + "@babel/helpers": "^7.24.8", + "@babel/parser": "^7.24.8", + "@babel/template": "^7.24.7", + "@babel/traverse": "^7.24.8", + "@babel/types": "^7.24.9", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" + "json5": "^2.2.3", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -110,18 +132,6 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/core/node_modules/@babel/code-frame": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.0.tgz", - "integrity": "sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.16.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/core/node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -131,24 +141,15 @@ "semver": "bin/semver.js" } }, - "node_modules/@babel/core/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@babel/generator": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", - "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", + "version": "7.24.10", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.10.tgz", + "integrity": "sha512-o9HBZL1G2129luEUlG1hB4N/nlYNWHnpwlND9eOMclRqqu1YDy2sSYVCFUZwl8I1Gxh+QSRrP2vD7EpUmFVXxg==", "dev": true, "dependencies": { - "@babel/types": "^7.23.6", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", + "@babel/types": "^7.24.9", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" }, "engines": { @@ -156,21 +157,19 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.3.tgz", - "integrity": "sha512-vKsoSQAyBmxS35JUOOt+07cLc6Nk/2ljLIHwmq2/NM6hdioUaqEXq/S+nXvbvXbZkNDlWOymPanJGOc4CBjSJA==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.8.tgz", + "integrity": "sha512-oU+UoqCHdp+nWVDkpldqIQL/i/bvAv53tRqLG/s+cOXxe66zOYLU7ar/Xs3LdmBihrUMEUhwu6dMZwbNOYDwvw==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.16.0", - "@babel/helper-validator-option": "^7.14.5", - "browserslist": "^4.17.5", - "semver": "^6.3.0" + "@babel/compat-data": "^7.24.8", + "@babel/helper-validator-option": "^7.24.8", + "browserslist": "^4.23.1", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { @@ -183,192 +182,158 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", "dev": true, "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "node_modules/@babel/helper-function-name": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.0.tgz", - "integrity": "sha512-bsjlBFPuWT6IWhl28EdrQ+gTvSvj5tqVP5Xeftp07SEuz5pLnsXZuDkDD3Rfcxy0IsHmbZ+7B2/9SHzxO0T+sQ==", + "node_modules/@babel/helper-hoist-variables": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz", - "integrity": "sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.0.tgz", - "integrity": "sha512-My4cr9ATcaBbmaEa8M0dZNA74cfI6gitvUAskgDtAFmAqyFKDSHQo5YstxPbN+lzHl2D9l/YOEFqb2mtUh4gfA==", + "version": "7.24.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.9.tgz", + "integrity": "sha512-oYbh+rtFKj/HwBQkFlUzvcybzklmVdVV3UU+mN7n2t/q3yGHbuVdNxyFvSBO1tfvjyArpHNcWMAzsSPdyI46hw==", "dev": true, "dependencies": { - "@babel/helper-module-imports": "^7.16.0", - "@babel/helper-replace-supers": "^7.16.0", - "@babel/helper-simple-access": "^7.16.0", - "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/helper-validator-identifier": "^7.15.7", - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0" + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7" }, "engines": { "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.0.tgz", - "integrity": "sha512-SuI467Gi2V8fkofm2JPnZzB/SUuXoJA5zXe/xzyPP2M04686RzFKFHPK6HDVN6JvWBIEW8tt9hPR7fXdn2Lgpw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.16.0" }, - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", - "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.0.tgz", - "integrity": "sha512-TQxuQfSCdoha7cpRNJvfaYxxxzmbxXw/+6cS7V02eeDYyhxderSoMVALvwupA54/pZcOTtVeJ0xccp1nGWladA==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz", + "integrity": "sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==", "dev": true, - "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.16.0", - "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0" - }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.0.tgz", - "integrity": "sha512-o1rjBT/gppAqKsYfUdfHq5Rk03lMQrkPHG1OWzHWpLgVXRH4HnMM9Et9CVdIqwkCQlobnGHEJMsgWP/jE1zUiw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", + "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", - "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz", + "integrity": "sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.3.tgz", - "integrity": "sha512-Xn8IhDlBPhvYTvgewPKawhADichOsbkZuzN7qz2BusOM0brChsyXMDJvldWaYMMUNiCQdQzNEioXTp3sC8Nt8w==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.8.tgz", + "integrity": "sha512-gV2265Nkcz7weJJfvDoAEVzC1e2OTDpkGbEsebse8koXUJUXPsCMi7sRo/+SPMuMZ9MtUPnGwITTnQnU5YjyaQ==", "dev": true, "dependencies": { - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.3", - "@babel/types": "^7.16.0" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.8" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", - "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", + "@babel/helper-validator-identifier": "^7.24.7", "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -412,13 +377,13 @@ "node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, "node_modules/@babel/highlight/node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, "engines": { "node": ">=0.8.0" @@ -427,7 +392,7 @@ "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, "engines": { "node": ">=4" @@ -446,9 +411,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.0.tgz", - "integrity": "sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.8.tgz", + "integrity": "sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -517,6 +482,21 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", + "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", @@ -605,12 +585,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.0.tgz", - "integrity": "sha512-Xv6mEXqVdaqCBfJFyeab0fH2DnUoMsDmhamxsSi4j8nLd4Vtw213WMJr55xxqipC/YVWyPY3K0blJncPYji+dQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", + "integrity": "sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -620,331 +600,292 @@ } }, "node_modules/@babel/template": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", - "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/template/node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" + "node_modules/@babel/traverse": { + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.8.tgz", + "integrity": "sha512-t0P1xxAPzEDcEPmjprAQq19NWum4K0EQPjMwZQZbHt+GiZqvjCHjj755Weq1YRPVzBI+3zSfvScfpnuIecVFJQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.8", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-hoist-variables": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/parser": "^7.24.8", + "@babel/types": "^7.24.8", + "debug": "^4.3.1", + "globals": "^11.1.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/template/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, "engines": { "node": ">=4" } }, - "node_modules/@babel/template/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "node_modules/@babel/types": { + "version": "7.24.9", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.9.tgz", + "integrity": "sha512-xm8XrMKz0IlUdocVbYJe0Z9xEgidU7msskG8BbhnTPK/HZ2z/7FP7ykqPgrUH+C+r414mNfNWam1f2vqOjqjYQ==", "dev": true, "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "@babel/helper-string-parser": "^7.24.8", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" }, "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/template/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" + "node": ">=6.9.0" } }, - "node_modules/@babel/template/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, - "node_modules/@babel/template/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, "engines": { - "node": ">=0.8.0" + "node": ">=12" } }, - "node_modules/@babel/template/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, - "engines": { - "node": ">=4" + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@babel/template/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", "dev": true, "dependencies": { - "has-flag": "^3.0.0" + "eslint-visitor-keys": "^3.3.0" }, "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/traverse": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.0.tgz", - "integrity": "sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0", - "debug": "^4.3.1", - "globals": "^11.1.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/@babel/traverse/node_modules/@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", + "node_modules/@eslint-community/regexpp": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", "dev": true, - "dependencies": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" - }, "engines": { - "node": ">=6.9.0" + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/@babel/traverse/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { - "color-convert": "^1.9.0" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" }, "engines": { - "node": ">=4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@babel/traverse/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" }, - "engines": { - "node": ">=4" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/@babel/traverse/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "color-name": "1.1.3" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/@babel/traverse/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, - "node_modules/@babel/traverse/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, "engines": { - "node": ">=0.8.0" + "node": "*" } }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { - "node": ">=4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@babel/traverse/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "deprecated": "Use @eslint/config-array instead", "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, "engines": { - "node": ">=4" + "node": ">=10.10.0" } }, - "node_modules/@babel/traverse/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/@babel/types": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", - "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=6.9.0" + "node": "*" } }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "node_modules/@dtsgenerator/replace-namespace": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@dtsgenerator/replace-namespace/-/replace-namespace-1.5.1.tgz", - "integrity": "sha512-euoDqrH2obSzuNQBDxMcIvXluQVgbxH2wUkJeDo36hQBTwSiZaT5FBEz3YmC5uZBwJGDGsHPYCpicuuNYnTHRQ==", + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, - "peerDependencies": { - "dtsgenerator": "^3.12.1", - "tslib": "^2.3.1" + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=12" } }, - "node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "engines": { + "node": ">=12" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@eslint/eslintrc/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.0", - "debug": "^4.1.1", - "minimatch": "^3.0.4" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=10.10.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", - "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", - "dev": true - }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -970,6 +911,19 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", @@ -983,6 +937,45 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -1002,59 +995,59 @@ } }, "node_modules/@jest/console": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.4.2.tgz", - "integrity": "sha512-xknHThRsPB/To1FUbi6pCe43y58qFC03zfb6R7fDb/FfC7k2R3i1l+izRBJf8DI46KhYGRaF14Eo9A3qbBoixg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^27.4.2", - "jest-util": "^27.4.2", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/core": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.4.3.tgz", - "integrity": "sha512-V9ms3zSxUHxh1E/ZLAiXF7SLejsdFnjWTFizWotMOWvjho0lW5kSjZymhQSodNW0T0ZMQRiha7f8+NcFVm3hJQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, "dependencies": { - "@jest/console": "^27.4.2", - "@jest/reporters": "^27.4.2", - "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", - "@jest/types": "^27.4.2", + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "emittery": "^0.8.1", + "ci-info": "^3.2.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-changed-files": "^27.4.2", - "jest-config": "^27.4.3", - "jest-haste-map": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.2", - "jest-resolve-dependencies": "^27.4.2", - "jest-runner": "^27.4.3", - "jest-runtime": "^27.4.2", - "jest-snapshot": "^27.4.2", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", - "jest-watcher": "^27.4.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", "micromatch": "^4.0.4", - "rimraf": "^3.0.0", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -1066,85 +1059,110 @@ } }, "node_modules/@jest/environment": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.2.tgz", - "integrity": "sha512-uSljKxh/rGlHlmhyeG4ZoVK9hOec+EPBkwTHkHKQ2EqDu5K+MaG9uJZ8o1CbRsSdZqSuhXvJCYhBWsORPPg6qw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, "dependencies": { - "@jest/fake-timers": "^27.4.2", - "@jest/types": "^27.4.2", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^27.4.2" + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.4.2.tgz", - "integrity": "sha512-f/Xpzn5YQk5adtqBgvw1V6bF8Nx3hY0OIRRpCvWcfPl0EAjdqWPdhH3t/3XpiWZqtjIEHDyMKP9ajpva1l4Zmg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", - "@sinonjs/fake-timers": "^8.0.1", + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^27.4.2", - "jest-mock": "^27.4.2", - "jest-util": "^27.4.2" + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/globals": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.4.2.tgz", - "integrity": "sha512-KkfaHEttlGpXYAQTZHgrESiEPx2q/DKAFLGLFda1uGVrqc17snd3YVPhOxlXOHIzVPs+lQ/SDB2EIvxyGzb3Ew==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, "dependencies": { - "@jest/environment": "^27.4.2", - "@jest/types": "^27.4.2", - "expect": "^27.4.2" + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/reporters": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.2.tgz", - "integrity": "sha512-sp4aqmdBJtjKetEakzDPcZggPcVIF6w9QLkYBbaWDV6e/SIsHnF1S4KtIH91eEc2fp7ep6V/e1xvdfEoho1d2w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.4.2", - "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", - "@jest/types": "^27.4.2", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", - "glob": "^7.1.2", - "graceful-fs": "^4.2.4", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^4.0.3", + "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "jest-haste-map": "^27.4.2", - "jest-resolve": "^27.4.2", - "jest-util": "^27.4.2", - "jest-worker": "^27.4.2", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "slash": "^3.0.0", - "source-map": "^0.6.0", "string-length": "^4.0.1", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^8.1.0" + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -1155,204 +1173,204 @@ } } }, - "node_modules/@jest/reporters/node_modules/jest-worker": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.2.tgz", - "integrity": "sha512-0QMy/zPovLfUPyHuOuuU4E+kGACXXE84nRnq6lBVI9GJg5DCBiA97SATi+ZP8CpiJwEQy1oCPjRBf8AnLjN+Ag==", + "node_modules/@jest/reporters/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/@jest/reporters/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/@jest/reporters/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@jest/reporters/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/@jest/reporters/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "node": "*" } }, - "node_modules/@jest/source-map": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.4.0.tgz", - "integrity": "sha512-Ntjx9jzP26Bvhbm93z/AKcPRj/9wrkI88/gK60glXDx1q+IeI0rf7Lw2c89Ch6ofonB0On/iRDreQuQ6te9pgQ==", + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", "dev": true, "dependencies": { - "callsites": "^3.0.0", - "graceful-fs": "^4.2.4", - "source-map": "^0.6.0" + "@sinclair/typebox": "^0.27.8" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/source-map/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, "engines": { - "node": ">=0.10.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/test-result": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.4.2.tgz", - "integrity": "sha512-kr+bCrra9jfTgxHXHa2UwoQjxvQk3Am6QbpAiJ5x/50LW8llOYrxILkqY0lZRW/hu8FXesnudbql263+EW9iNA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, "dependencies": { - "@jest/console": "^27.4.2", - "@jest/types": "^27.4.2", + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/test-sequencer": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.2.tgz", - "integrity": "sha512-HmHp5mlh9f9GyNej5yCS1JZIFfUGnP9+jEOH5zoq5EmsuZeYD+dGULqyvGDPtuzzbyAFJ6R4+z4SS0VvnFwwGQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, "dependencies": { - "@jest/test-result": "^27.4.2", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", - "jest-runtime": "^27.4.2" + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/transform": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.4.2.tgz", - "integrity": "sha512-RTKcPZllfcmLfnlxBya7aypofhdz05+E6QITe55Ex0rxyerkgjmmpMlvVn11V0cP719Ps6WcDYCnDzxnnJUwKg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, "dependencies": { - "@babel/core": "^7.1.0", - "@jest/types": "^27.4.2", - "babel-plugin-istanbul": "^6.0.0", + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", - "jest-regex-util": "^27.4.0", - "jest-util": "^27.4.2", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", "micromatch": "^4.0.4", - "pirates": "^4.0.1", + "pirates": "^4.0.4", "slash": "^3.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "^3.0.0" + "write-file-atomic": "^4.0.2" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/@jest/transform/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/types": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.4.2.tgz", - "integrity": "sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, "dependencies": { + "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", - "@types/yargs": "^16.0.0", + "@types/yargs": "^17.0.8", "chalk": "^4.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.17", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", - "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@jsdevtools/ono": { @@ -1396,135 +1414,206 @@ "node": ">= 8" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/@rollup/plugin-commonjs": { - "version": "19.0.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-19.0.2.tgz", - "integrity": "sha512-gBjarfqlC7qs0AutpRW/hrFNm+cd2/QKxhwyFa+srbg1oX7rDsEU3l+W7LAUhsAp9mPJMAkXDhLbQaVwEaE8bA==", + "version": "26.0.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-26.0.1.tgz", + "integrity": "sha512-UnsKoZK6/aGIH6AdkptXhNvhaqftcjq3zZdT+LY5Ftms6JR06nADcDsYp5hTU9E2lbJUEOhdlY5J4DNTneM+jQ==", "dev": true, "dependencies": { - "@rollup/pluginutils": "^3.1.0", + "@rollup/pluginutils": "^5.0.1", "commondir": "^1.0.1", - "estree-walker": "^2.0.1", - "glob": "^7.1.6", - "is-reference": "^1.2.1", - "magic-string": "^0.25.7", - "resolve": "^1.17.0" + "estree-walker": "^2.0.2", + "glob": "^10.4.1", + "is-reference": "1.2.1", + "magic-string": "^0.30.3" }, "engines": { - "node": ">= 8.0.0" + "node": ">=16.0.0 || 14 >= 14.17" }, "peerDependencies": { - "rollup": "^2.38.3" + "rollup": "^2.68.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, "node_modules/@rollup/plugin-json": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.1.0.tgz", - "integrity": "sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-6.1.0.tgz", + "integrity": "sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==", "dev": true, "dependencies": { - "@rollup/pluginutils": "^3.0.8" + "@rollup/pluginutils": "^5.1.0" + }, + "engines": { + "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^1.20.0 || ^2.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, "node_modules/@rollup/plugin-node-resolve": { - "version": "13.0.4", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.4.tgz", - "integrity": "sha512-eYq4TFy40O8hjeDs+sIxEH/jc9lyuI2k9DM557WN6rO5OpnC2qXMBNj4IKH1oHrnAazL49C5p0tgP0/VpqJ+/w==", + "version": "15.2.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", + "integrity": "sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==", "dev": true, "dependencies": { - "@rollup/pluginutils": "^3.1.0", - "@types/resolve": "1.17.1", - "builtin-modules": "^3.1.0", + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", "deepmerge": "^4.2.2", + "is-builtin-module": "^3.2.1", "is-module": "^1.0.0", - "resolve": "^1.19.0" + "resolve": "^1.22.1" }, "engines": { - "node": ">= 10.0.0" + "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^2.42.0" + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, "node_modules/@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", + "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", "dev": true, "dependencies": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^2.3.1" }, "engines": { - "node": ">= 8.0.0" + "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, - "node_modules/@rollup/pluginutils/node_modules/estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", "dev": true, "dependencies": { - "@sinonjs/commons": "^1.7.0" + "@sinonjs/commons": "^3.0.0" } }, - "node_modules/@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "node_modules/@ts-morph/common": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.24.0.tgz", + "integrity": "sha512-c1xMmNHWpNselmpIqursHeOHHBTIsJLbB+NuovbTTRCNiTLEr/U9dbJ8qy0jd/O2x5pc3seWuOUN5R2IoOTp8A==", "dev": true, - "engines": { - "node": ">= 6" + "dependencies": { + "fast-glob": "^3.3.2", + "minimatch": "^9.0.4", + "mkdirp": "^3.0.1", + "path-browserify": "^1.0.1" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, "node_modules/@types/babel__core": { - "version": "7.1.16", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.16.tgz", - "integrity": "sha512-EAEHtisTMM+KaKwfWdC3oyllIqswlznXCIVCt7/oRNrh+DhgT4UEBNC/jlADNjvw7UnfbcdkGQcPVZ1xYiLcrQ==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "node_modules/@types/babel__generator": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.3.tgz", - "integrity": "sha512-/GWCmzJWqV7diQW54smJZzWbSFf4QYtF71WCKhcx6Ru/tFyQIY2eiiITcCAeuPbNSvT9YCGkVMqqvSk2Z0mXiA==", + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", "dev": true, "dependencies": { "@babel/types": "^7.0.0" } }, "node_modules/@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, "dependencies": { "@babel/parser": "^7.1.0", @@ -1532,183 +1621,163 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.14.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.14.2.tgz", - "integrity": "sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA==", + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", "dev": true, "dependencies": { - "@babel/types": "^7.3.0" + "@babel/types": "^7.20.7" } }, "node_modules/@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, - "node_modules/@types/glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA==", - "dev": true, - "dependencies": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "node_modules/@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, "dependencies": { "@types/node": "*" } }, "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", - "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, "node_modules/@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", "dev": true, "dependencies": { "@types/istanbul-lib-coverage": "*" } }, "node_modules/@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, "dependencies": { "@types/istanbul-lib-report": "*" } }, "node_modules/@types/jest": { - "version": "27.0.3", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.0.3.tgz", - "integrity": "sha512-cmmwv9t7gBYt7hNKH5Spu7Kuu/DotGa+Ff+JGRKZ4db5eh8PnKS4LuebJ3YLUoyOyIHraTGyULn23YtEAm0VSg==", + "version": "29.5.12", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", + "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", "dev": true, "dependencies": { - "jest-diff": "^27.0.0", - "pretty-format": "^27.0.0" + "expect": "^29.0.0", + "pretty-format": "^29.0.0" } }, "node_modules/@types/js-yaml": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.3.tgz", - "integrity": "sha512-5t9BhoORasuF5uCPr+d5/hdB++zRFUTMIZOzbNkr+jZh3yQht4HYbRDyj9fY8n2TZT30iW9huzav73x4NikqWg==", + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz", + "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==", "dev": true }, "node_modules/@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, - "node_modules/@types/minimatch": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", - "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "node_modules/@types/lodash": { + "version": "4.17.7", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.7.tgz", + "integrity": "sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==", "dev": true }, "node_modules/@types/node": { - "version": "16.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.0.tgz", - "integrity": "sha512-nmP+VR4oT0pJUPFbKE4SXj3Yb4Q/kz3M9dSAO1GGMebRKWHQxLfDNmU/yh3xxCJha3N60nQ/JwXWwOE/ZSEVag==", - "dev": true + "version": "20.14.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.10.tgz", + "integrity": "sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/node-fetch": { - "version": "2.5.12", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz", - "integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==", + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz", + "integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==", "dev": true, "dependencies": { "@types/node": "*", - "form-data": "^3.0.0" + "form-data": "^4.0.0" } }, - "node_modules/@types/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", - "dev": true - }, - "node_modules/@types/prettier": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.2.tgz", - "integrity": "sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==", - "dev": true - }, "node_modules/@types/resolve": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", - "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", - "dev": true, - "dependencies": { - "@types/node": "*" - } + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", + "dev": true }, "node_modules/@types/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-4.0.5.tgz", + "integrity": "sha512-DTCZoIQotB2SUJnYgrEx43cQIUYOlNZz0AZPbKU4PSLYTUdML5Gox0++z4F9kQocxStrCmRNhi4x5x/UlwtKUA==", + "deprecated": "This is a stub types definition. rimraf provides its own type definitions, so you do not need this installed.", "dev": true, "dependencies": { - "@types/glob": "*", - "@types/node": "*" + "rimraf": "*" } }, "node_modules/@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "dev": true }, "node_modules/@types/yargs": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", - "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", + "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", "dev": true, "dependencies": { "@types/yargs-parser": "*" } }, "node_modules/@types/yargs-parser": { - "version": "20.2.1", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", - "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.31.0.tgz", - "integrity": "sha512-iPKZTZNavAlOhfF4gymiSuUkgLne/nh5Oz2/mdiUmuZVD42m9PapnCnzjxuDsnpnbH3wT5s2D8bw6S39TC6GNw==", - "dev": true, - "dependencies": { - "@typescript-eslint/experimental-utils": "4.31.0", - "@typescript-eslint/scope-manager": "4.31.0", - "debug": "^4.3.1", - "functional-red-black-tree": "^1.0.1", - "regexpp": "^3.1.0", - "semver": "^7.3.5", - "tsutils": "^3.21.0" + "version": "7.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.16.1.tgz", + "integrity": "sha512-SxdPak/5bO0EnGktV05+Hq8oatjAYVY3Zh2bye9pGZy6+jwyR3LG3YKkV4YatlsgqXP28BTeVm9pqwJM96vf2A==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "7.16.1", + "@typescript-eslint/type-utils": "7.16.1", + "@typescript-eslint/utils": "7.16.1", + "@typescript-eslint/visitor-keys": "7.16.1", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^4.0.0", - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -1716,50 +1785,27 @@ } } }, - "node_modules/@typescript-eslint/experimental-utils": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.31.0.tgz", - "integrity": "sha512-Hld+EQiKLMppgKKkdUsLeVIeEOrwKc2G983NmznY/r5/ZtZCDvIOXnXtwqJIgYz/ymsy7n7RGvMyrzf1WaSQrw==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.31.0", - "@typescript-eslint/types": "4.31.0", - "@typescript-eslint/typescript-estree": "4.31.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - } - }, "node_modules/@typescript-eslint/parser": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.31.0.tgz", - "integrity": "sha512-oWbzvPh5amMuTmKaf1wp0ySxPt2ZXHnFQBN2Szu1O//7LmOvgaKTCIDNLK2NvzpmVd5A2M/1j/rujBqO37hj3w==", + "version": "7.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.16.1.tgz", + "integrity": "sha512-u+1Qx86jfGQ5i4JjK33/FnawZRpsLxRnKzGE6EABZ40KxVT/vWsiZFEBBHjFOljmmV3MBYOHEKi0Jm9hbAOClA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "4.31.0", - "@typescript-eslint/types": "4.31.0", - "@typescript-eslint/typescript-estree": "4.31.0", - "debug": "^4.3.1" + "@typescript-eslint/scope-manager": "7.16.1", + "@typescript-eslint/types": "7.16.1", + "@typescript-eslint/typescript-estree": "7.16.1", + "@typescript-eslint/visitor-keys": "7.16.1", + "debug": "^4.3.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -1768,173 +1814,139 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.31.0.tgz", - "integrity": "sha512-LJ+xtl34W76JMRLjbaQorhR0hfRAlp3Lscdiz9NeI/8i+q0hdBZ7BsiYieLoYWqy+AnRigaD3hUwPFugSzdocg==", + "version": "7.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.16.1.tgz", + "integrity": "sha512-nYpyv6ALte18gbMz323RM+vpFpTjfNdyakbf3nsLvF43uF9KeNC289SUEW3QLZ1xPtyINJ1dIsZOuWuSRIWygw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.31.0", - "@typescript-eslint/visitor-keys": "4.31.0" - }, - "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "@typescript-eslint/types": "7.16.1", + "@typescript-eslint/visitor-keys": "7.16.1" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.31.0.tgz", - "integrity": "sha512-9XR5q9mk7DCXgXLS7REIVs+BaAswfdHhx91XqlJklmqWpTALGjygWVIb/UnLh4NWhfwhR5wNe1yTyCInxVhLqQ==", - "dev": true, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.31.0.tgz", - "integrity": "sha512-QHl2014t3ptg+xpmOSSPn5hm4mY8D4s97ftzyk9BZ8RxYQ3j73XcwuijnJ9cMa6DO4aLXeo8XS3z1omT9LA/Eg==", + "node_modules/@typescript-eslint/type-utils": { + "version": "7.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.16.1.tgz", + "integrity": "sha512-rbu/H2MWXN4SkjIIyWcmYBjlp55VT+1G3duFOIukTNFxr9PI35pLc2ydwAfejCEitCv4uztA07q0QWanOHC7dA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.31.0", - "@typescript-eslint/visitor-keys": "4.31.0", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", - "semver": "^7.3.5", - "tsutils": "^3.21.0" + "@typescript-eslint/typescript-estree": "7.16.1", + "@typescript-eslint/utils": "7.16.1", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, + "peerDependencies": { + "eslint": "^8.56.0" + }, "peerDependenciesMeta": { "typescript": { "optional": true } } }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.31.0.tgz", - "integrity": "sha512-HUcRp2a9I+P21+O21yu3ezv3GEPGjyGiXoEUQwZXjR8UxRApGeLyWH4ZIIUSalE28aG4YsV6GjtaAVB3QKOu0w==", + "node_modules/@typescript-eslint/types": { + "version": "7.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.16.1.tgz", + "integrity": "sha512-AQn9XqCzUXd4bAVEsAXM/Izk11Wx2u4H3BAfQVhSfzfDOm/wAON9nP7J5rpkCxts7E5TELmN845xTUCQrD1xIQ==", "dev": true, - "dependencies": { - "@typescript-eslint/types": "4.31.0", - "eslint-visitor-keys": "^2.0.0" - }, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^18.18.0 || >=20.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@yarn-tool/resolve-package": { - "version": "1.0.47", - "resolved": "https://registry.npmjs.org/@yarn-tool/resolve-package/-/resolve-package-1.0.47.tgz", - "integrity": "sha512-Zaw58gQxjQceJqhqybJi1oUDaORT8i2GTgwICPs8v/X/Pkx35FXQba69ldHVg5pQZ6YLKpROXgyHvBaCJOFXiA==", - "dev": true, - "dependencies": { - "pkg-dir": "< 6 >= 5", - "tslib": "^2", - "upath2": "^3.1.13" - } - }, - "node_modules/@yarn-tool/resolve-package/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "node_modules/@typescript-eslint/typescript-estree": { + "version": "7.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.16.1.tgz", + "integrity": "sha512-0vFPk8tMjj6apaAZ1HlwM8w7jbghC8jc1aRNJG5vN8Ym5miyhTQGMqU++kuBFDNKe9NcPeZ6x0zfSzV8xC1UlQ==", "dev": true, "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" + "@typescript-eslint/types": "7.16.1", + "@typescript-eslint/visitor-keys": "7.16.1", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": ">=10" + "node": "^18.18.0 || >=20.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@yarn-tool/resolve-package/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@yarn-tool/resolve-package/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "node_modules/@typescript-eslint/utils": { + "version": "7.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.16.1.tgz", + "integrity": "sha512-WrFM8nzCowV0he0RlkotGDujx78xudsxnGMBHI88l5J8wEhED6yBwaSLP99ygfrzAjsQvcYQ94quDwI0d7E1fA==", "dev": true, "dependencies": { - "yocto-queue": "^0.1.0" + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "7.16.1", + "@typescript-eslint/types": "7.16.1", + "@typescript-eslint/typescript-estree": "7.16.1" }, "engines": { - "node": ">=10" + "node": "^18.18.0 || >=20.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" } }, - "node_modules/@yarn-tool/resolve-package/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "node_modules/@typescript-eslint/visitor-keys": { + "version": "7.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.16.1.tgz", + "integrity": "sha512-Qlzzx4sE4u3FsHTPQAAQFJFNOuqtuY0LFrZHwQ8IHK705XxBiWOFkfKRWu6niB7hwfgnwIpO4jTC75ozW1PHWg==", "dev": true, "dependencies": { - "p-limit": "^3.0.2" + "@typescript-eslint/types": "7.16.1", + "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": ">=10" + "node": "^18.18.0 || >=20.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@yarn-tool/resolve-package/node_modules/pkg-dir": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz", - "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==", - "dev": true, - "dependencies": { - "find-up": "^5.0.0" - }, - "engines": { - "node": ">=10" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/abab": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", - "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, "node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1943,16 +1955,6 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-globals": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", - "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", - "dev": true, - "dependencies": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" - } - }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -1963,63 +1965,32 @@ } }, "node_modules/acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", + "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", "dev": true, "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" + "acorn": "^8.11.0" }, "engines": { - "node": ">=8" + "node": ">=0.4.0" } }, "node_modules/ajv": { - "version": "8.6.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", - "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -2065,16 +2036,16 @@ "color-convert": "^2.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "dependencies": { "normalize-path": "^3.0.0", @@ -2104,19 +2075,16 @@ "node": ">=8" } }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, - "engines": { - "node": ">=8" - } + "node_modules/async": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==", + "dev": true }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, "node_modules/atob": { @@ -2132,22 +2100,21 @@ } }, "node_modules/babel-jest": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.2.tgz", - "integrity": "sha512-MADrjb3KBO2eyZCAc6QaJg6RT5u+6oEdDyHO5HEalnpwQ6LrhTsQF2Kj1Wnz2t6UPXIXPk18dSXXOT0wF5yTxA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, "dependencies": { - "@jest/transform": "^27.4.2", - "@jest/types": "^27.4.2", + "@jest/transform": "^29.7.0", "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.0.0", - "babel-preset-jest": "^27.4.0", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "slash": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "@babel/core": "^7.8.0" @@ -2170,9 +2137,9 @@ } }, "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.1.0.tgz", - "integrity": "sha512-czwUz525rkOFDJxfKK6mYfIs9zBKILyrZQxjz3ABhjQXhbhFsSbo1HW/BFcsDnfJYJWA6thRR5/TUY2qs5W99Q==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", "dev": true, "dependencies": { "@babel/core": "^7.12.3", @@ -2195,18 +2162,18 @@ } }, "node_modules/babel-plugin-jest-hoist": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.4.0.tgz", - "integrity": "sha512-Jcu7qS4OX5kTWBc45Hz7BMmgXuJqRnhatqpUhnzGC3OBYpOmf2tv6jFNwZpwM7wU7MUuv2r9IPS/ZlYOuburVw==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", - "@types/babel__core": "^7.0.0", + "@types/babel__core": "^7.1.14", "@types/babel__traverse": "^7.0.6" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/babel-preset-current-node-syntax": { @@ -2233,16 +2200,16 @@ } }, "node_modules/babel-preset-jest": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.4.0.tgz", - "integrity": "sha512-NK4jGYpnBvNxcGo7/ZpZJr51jCGT+3bwwpVIDY2oNfTxJJldRtB4VAcYdgp1loDE50ODuTu+yBjpMAswv5tlpg==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^27.4.0", + "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "@babel/core": "^7.0.0" @@ -2255,54 +2222,56 @@ "dev": true }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^1.0.0" } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, - "node_modules/browser-process-hrtime": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", - "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", - "dev": true - }, "node_modules/browserslist": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.18.1.tgz", - "integrity": "sha512-8ScCzdpPwR2wQh8IT82CA2VgDwjHyqMovPBZSNH54+tm4Jk2pCuv90gmAdH6J84OCRWi0b4gMe6O6XPXuJnjgQ==", + "version": "4.23.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.2.tgz", + "integrity": "sha512-qkqSyistMYdxAcw+CzbZwlBy8AGmS/eEWs+sEV5TnLRGDOL+C5M2EnH6tlZyg0YoAxGJAFKh61En9BR941GnHA==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "dependencies": { - "caniuse-lite": "^1.0.30001280", - "electron-to-chromium": "^1.3.896", - "escalade": "^3.1.1", - "node-releases": "^2.0.1", - "picocolors": "^1.0.0" + "caniuse-lite": "^1.0.30001640", + "electron-to-chromium": "^1.4.820", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.1.0" }, "bin": { "browserslist": "cli.js" }, "engines": { "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" } }, "node_modules/bs-logger": { @@ -2333,9 +2302,9 @@ "dev": true }, "node_modules/builtin-modules": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", - "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", "dev": true, "engines": { "node": ">=6" @@ -2344,12 +2313,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2369,14 +2332,24 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001284", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001284.tgz", - "integrity": "sha512-t28SKa7g6kiIQi6NHeOcKrOrGMzCRrXvlasPwWC26TH2QNdglgzQIRUuJ0cR3NeQPH+5jpuveeeSFDLm2zbkEw==", + "version": "1.0.30001642", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001642.tgz", + "integrity": "sha512-3XQ0DoRgLijXJErLSl+bLnJ+Et4KqV1PY6JJBGAFlsNsz31zeAIncyeZfLCabHK/jtSh+671RM9YMldxjUPZtA==", "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] }, "node_modules/chalk": { "version": "4.1.2", @@ -2388,7 +2361,7 @@ "supports-color": "^7.1.0" }, "engines": { - "node": ">=4" + "node": ">=10" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" @@ -2404,79 +2377,203 @@ } }, "node_modules/ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", - "dev": true + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } }, "node_modules/cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", + "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==", "dev": true }, - "node_modules/clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "node_modules/cli-color": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.4.tgz", + "integrity": "sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==", "dev": true, + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.64", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.15", + "timers-ext": "^0.1.7" + }, "engines": { - "node": ">=6" + "node": ">=0.10" } }, "node_modules/cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", "dev": true, "dependencies": { - "restore-cursor": "^3.1.0" + "restore-cursor": "^4.0.0" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/cli-truncate": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", "dev": true, "dependencies": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" + "slice-ansi": "^5.0.0", + "string-width": "^7.0.0" }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "node_modules/cli-truncate/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "node_modules/cli-truncate/node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "node_modules/cli-truncate/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/cliui/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true, "engines": { "iojs": ">= 1.0.0", "node": ">= 0.12.0" } }, + "node_modules/code-block-writer": { + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.1.tgz", + "integrity": "sha512-c5or4P6erEA69TxaxTNcHUNcIn+oyxSRTOWV+pSYF+z4epXqNvwvJ70XPGjPNgue83oAFAPBRQYwpAJ/Hpe/Sg==", + "dev": true + }, "node_modules/collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", "dev": true }, "node_modules/color-convert": { @@ -2486,6 +2583,9 @@ "dev": true, "dependencies": { "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, "node_modules/color-name": { @@ -2495,9 +2595,9 @@ "dev": true }, "node_modules/colorette": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", - "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "dev": true }, "node_modules/combined-stream": { @@ -2513,55 +2613,51 @@ } }, "node_modules/commander": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.1.0.tgz", - "integrity": "sha512-mf45ldcuHSYShkplHHGKWb4TrmwQadxOn7v4WuhDJy0ZVoY5JFajaRDKD0PNe5qXzBX0rhovjTnP6Kz9LETcuA==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", "dev": true, "engines": { - "node": ">= 10" + "node": ">=18" } }, "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" - } - }, - "node_modules/convert-source-map/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, - "node_modules/cosmiconfig": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz", - "integrity": "sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==", + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", "dev": true, "dependencies": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" }, "engines": { - "node": ">=10" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/create-require": { @@ -2570,15 +2666,6 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, - "node_modules/cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", - "dev": true, - "dependencies": { - "node-fetch": "2.6.7" - } - }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -2593,48 +2680,32 @@ "node": ">= 8" } }, - "node_modules/cssom": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", - "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", - "dev": true - }, - "node_modules/cssstyle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", - "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", + "node_modules/d": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", + "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", "dev": true, "dependencies": { - "cssom": "~0.3.6" + "es5-ext": "^0.10.64", + "type": "^2.7.2" }, "engines": { - "node": ">=8" + "node": ">=0.12" } }, - "node_modules/cssstyle/node_modules/cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true - }, - "node_modules/data-urls": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", - "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", "dev": true, - "dependencies": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" - }, "engines": { - "node": ">=10" + "node": ">= 12" } }, "node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -2648,12 +2719,6 @@ } } }, - "node_modules/decimal.js": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", - "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", - "dev": true - }, "node_modules/decode-uri-component": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", @@ -2664,10 +2729,18 @@ } }, "node_modules/dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", - "dev": true + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "dev": true, + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } }, "node_modules/deep-is": { "version": "0.1.4", @@ -2676,9 +2749,9 @@ "dev": true }, "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, "engines": { "node": ">=0.10.0" @@ -2687,7 +2760,7 @@ "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, "engines": { "node": ">=0.4.0" @@ -2712,12 +2785,12 @@ } }, "node_modules/diff-sequences": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.4.0.tgz", - "integrity": "sha512-YqiQzkrsmHMH5uuh8OdQFU9/ZpADnwzml8z0O5HvRNda+5UZsaX/xN+AAxfR2hWq1Y7HZnAzO9J5lJXOuDz2Ww==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/dir-glob": { @@ -2744,85 +2817,51 @@ "node": ">=6.0.0" } }, - "node_modules/domexception": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", - "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", - "dev": true, - "dependencies": { - "webidl-conversions": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/domexception/node_modules/webidl-conversions": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", - "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", - "dev": true, - "engines": { - "node": ">=8" - } + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true }, - "node_modules/dtsgenerator": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/dtsgenerator/-/dtsgenerator-3.13.0.tgz", - "integrity": "sha512-jGCEbUAr7sUubmuYHLx2MAEaWc62rWNMav7/+ZEMMPdhvAld6RTQ5EyU9b6OhP9kJo/ZH0vMyeY9xpIEcL8dFg==", + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", "dev": true, "dependencies": { - "commander": "^8.1.0", - "cross-fetch": "^3.1.4", - "debug": "^4.3.2", - "glob": "^7.1.7", - "https-proxy-agent": "^5.0.0", - "js-yaml": "^4.1.0", - "tslib": "^2.3.1", - "typescript": "^4.4.2" + "jake": "^10.8.5" }, "bin": { - "dtsgen": "bin/dtsgen" + "ejs": "bin/cli.js" }, "engines": { - "node": ">= 10.0" + "node": ">=0.10.0" } }, "node_modules/electron-to-chromium": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.11.tgz", - "integrity": "sha512-2OhsaYgsWGhWjx2et8kaUcdktPbBGjKM2X0BReUCKcSCPttEY+hz2zie820JLbttU8jwL92+JJysWwkut3wZgA==", + "version": "1.4.828", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.828.tgz", + "integrity": "sha512-QOIJiWpQJDHAVO4P58pwb133Cwee0nbvy/MV1CwzZVGpkH1RX33N3vsaWRCpR6bF63AAq366neZrRTu7Qlsbbw==", "dev": true }, "node_modules/emittery": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", - "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sindresorhus/emittery?sponsor=1" } }, "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, - "node_modules/enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "dependencies": { - "ansi-colors": "^4.1.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -2832,497 +2871,202 @@ "is-arrayish": "^0.2.1" } }, - "node_modules/esbuild": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.2.tgz", - "integrity": "sha512-l076A6o/PIgcyM24s0dWmDI/b8RQf41uWoJu9I0M71CtW/YSw5T5NUeXxs5lo2tFQD+O4CW4nBHJXx3OY5NpXg==", + "node_modules/es5-ext": { + "version": "0.10.64", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", + "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", "dev": true, "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "esniff": "^2.0.1", + "next-tick": "^1.1.0" }, - "optionalDependencies": { - "esbuild-android-arm64": "0.14.2", - "esbuild-darwin-64": "0.14.2", - "esbuild-darwin-arm64": "0.14.2", - "esbuild-freebsd-64": "0.14.2", - "esbuild-freebsd-arm64": "0.14.2", - "esbuild-linux-32": "0.14.2", - "esbuild-linux-64": "0.14.2", - "esbuild-linux-arm": "0.14.2", - "esbuild-linux-arm64": "0.14.2", - "esbuild-linux-mips64le": "0.14.2", - "esbuild-linux-ppc64le": "0.14.2", - "esbuild-netbsd-64": "0.14.2", - "esbuild-openbsd-64": "0.14.2", - "esbuild-sunos-64": "0.14.2", - "esbuild-windows-32": "0.14.2", - "esbuild-windows-64": "0.14.2", - "esbuild-windows-arm64": "0.14.2" - } - }, - "node_modules/esbuild-android-arm64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.2.tgz", - "integrity": "sha512-hEixaKMN3XXCkoe+0WcexO4CcBVU5DCSUT+7P8JZiWZCbAjSkc9b6Yz2X5DSfQmRCtI/cQRU6TfMYrMQ5NBfdw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ] - }, - "node_modules/esbuild-darwin-64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.2.tgz", - "integrity": "sha512-Uq8t0cbJQkxkQdbUfOl2wZqZ/AtLZjvJulR1HHnc96UgyzG9YlCLSDMiqjM+NANEy7/zzvwKJsy3iNC9wwqLJA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ] + "engines": { + "node": ">=0.10" + } }, - "node_modules/esbuild-darwin-arm64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.2.tgz", - "integrity": "sha512-619MSa17sr7YCIrUj88KzQu2ESA4jKYtIYfLU/smX6qNgxQt3Y/gzM4s6sgJ4fPQzirvmXgcHv1ZNQAs/Xh48A==", - "cpu": [ - "arm64" - ], + "node_modules/es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", "dev": true, - "optional": true, - "os": [ - "darwin" - ] + "dependencies": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } }, - "node_modules/esbuild-freebsd-64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.2.tgz", - "integrity": "sha512-aP6FE/ZsChZpUV6F3HE3x1Pz0paoYXycJ7oLt06g0G9dhJKknPawXCqQg/WMyD+ldCEZfo7F1kavenPdIT/SGQ==", - "cpu": [ - "x64" - ], + "node_modules/es6-symbol": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", + "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", "dev": true, - "optional": true, - "os": [ - "freebsd" - ] + "dependencies": { + "d": "^1.0.2", + "ext": "^1.7.0" + }, + "engines": { + "node": ">=0.12" + } }, - "node_modules/esbuild-freebsd-arm64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.2.tgz", - "integrity": "sha512-LSm98WTb1QIhyS83+Po0KTpZNdd2XpVpI9ua5rLWqKWbKeNRFwOsjeiuwBaRNc+O32s9oC2ZMefETxHBV6VNkQ==", - "cpu": [ - "arm64" - ], + "node_modules/es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", "dev": true, - "optional": true, - "os": [ - "freebsd" - ] + "dependencies": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } }, - "node_modules/esbuild-linux-32": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.2.tgz", - "integrity": "sha512-8VxnNEyeUbiGflTKcuVc5JEPTqXfsx2O6ABwUbfS1Hp26lYPRPC7pKQK5Dxa0MBejGc50jy7YZae3EGQUQ8EkQ==", - "cpu": [ - "ia32" - ], + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, - "optional": true, - "os": [ - "linux" - ] + "engines": { + "node": ">=6" + } }, - "node_modules/esbuild-linux-64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.2.tgz", - "integrity": "sha512-4bzMS2dNxOJoFIiHId4w+tqQzdnsch71JJV1qZnbnErSFWcR9lRgpSqWnTTFtv6XM+MvltRzSXC5wQ7AEBY6Hg==", - "cpu": [ - "x64" - ], + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "optional": true, - "os": [ - "linux" - ] + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/esbuild-linux-arm": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.2.tgz", - "integrity": "sha512-PaylahvMHhH8YMfJPMKEqi64qA0Su+d4FNfHKvlKes/2dUe4QxgbwXT9oLVgy8iJdcFMrO7By4R8fS8S0p8aVQ==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] + "node_modules/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } }, - "node_modules/esbuild-linux-arm64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.2.tgz", - "integrity": "sha512-RlIVp0RwJrdtasDF1vTFueLYZ8WuFzxoQ1OoRFZOTyJHCGCNgh7xJIC34gd7B7+RT0CzLBB4LcM5n0LS+hIoww==", - "cpu": [ - "arm64" - ], + "node_modules/eslint-config-prettier": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, - "optional": true, - "os": [ - "linux" - ] + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } }, - "node_modules/esbuild-linux-mips64le": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.2.tgz", - "integrity": "sha512-Fdwrq2roFnO5oetIiUQQueZ3+5soCxBSJswg3MvYaXDomj47BN6oAWMZgLrFh1oVrtWrxSDLCJBenYdbm2s+qQ==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/esbuild-linux-ppc64le": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.2.tgz", - "integrity": "sha512-vxptskw8JfCDD9QqpRO0XnsM1osuWeRjPaXX1TwdveLogYsbdFtcuiuK/4FxGiNMUr1ojtnCS2rMPbY8puc5NA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ] - }, - "node_modules/esbuild-netbsd-64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.2.tgz", - "integrity": "sha512-I8+LzYK5iSNpspS9eCV9sW67Rj8FgMHimGri4mKiGAmN0pNfx+hFX146rYtzGtewuxKtTsPywWteHx+hPRLDsw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ] - }, - "node_modules/esbuild-openbsd-64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.2.tgz", - "integrity": "sha512-120HgMe9elidWUvM2E6mMf0csrGwx8sYDqUIJugyMy1oHm+/nT08bTAVXuwYG/rkMIqsEO9AlMxuYnwR6En/3Q==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ] - }, - "node_modules/esbuild-sunos-64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.2.tgz", - "integrity": "sha512-Q3xcf9Uyfra9UuCFxoLixVvdigo0daZaKJ97TL2KNA4bxRUPK18wwGUk3AxvgDQZpRmg82w9PnkaNYo7a+24ow==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ] - }, - "node_modules/esbuild-windows-32": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.2.tgz", - "integrity": "sha512-TW7O49tPsrq+N1sW8mb3m24j/iDGa4xzAZH4wHWwoIzgtZAYPKC0hpIhufRRG/LA30bdMChO9pjJZ5mtcybtBQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/esbuild-windows-64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.2.tgz", - "integrity": "sha512-Rym6ViMNmi1E2QuQMWy0AFAfdY0wGwZD73BnzlsQBX5hZBuy/L+Speh7ucUZ16gwsrMM9v86icZUDrSN/lNBKg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/esbuild-windows-arm64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.2.tgz", - "integrity": "sha512-ZrLbhr0vX5Em/P1faMnHucjVVWPS+m3tktAtz93WkMZLmbRJevhiW1y4CbulBd2z0MEdXZ6emDa1zFHq5O5bSA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=0.8.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/escodegen": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", - "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", - "dev": true, - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=6.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/escodegen/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/escodegen/node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/escodegen/node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "dependencies": { - "prelude-ls": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", + "node_modules/eslint-plugin-prettier": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz", + "integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==", "dev": true, "dependencies": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.9", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "bin": { - "eslint": "bin/eslint.js" + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.8.6" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-config-prettier": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", - "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", - "dev": true, - "bin": { - "eslint-config-prettier": "bin/cli.js" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-plugin-prettier": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz", - "integrity": "sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==", - "dev": true, - "dependencies": { - "prettier-linter-helpers": "^1.0.0" - }, - "engines": { - "node": ">=6.0.0" + "url": "https://opencollective.com/eslint-plugin-prettier" }, "peerDependencies": { - "eslint": ">=5.0.0", - "prettier": ">=1.13.0" + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": "*", + "prettier": ">=3.0.0" }, "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, "eslint-config-prettier": { "optional": true } } }, "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" + "estraverse": "^5.2.0" }, "engines": { - "node": ">=6" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "engines": { - "node": ">=10" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/ajv": { @@ -3341,79 +3085,64 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/eslint/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "sprintf-js": "~1.0.2" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/eslint/node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6" + "brace-expansion": "^1.1.7" }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/eslint/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, "engines": { - "node": ">=4" + "node": "*" } }, - "node_modules/eslint/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "node_modules/esniff": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", + "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", "dev": true, "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "d": "^1.0.1", + "es5-ext": "^0.10.62", + "event-emitter": "^0.3.5", + "type": "^2.7.2" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=0.10" } }, - "node_modules/eslint/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, "node_modules/espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "dependencies": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/esprima": { @@ -3430,9 +3159,9 @@ } }, "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -3441,15 +3170,6 @@ "node": ">=0.10" } }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -3462,19 +3182,10 @@ "node": ">=4.0" } }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "engines": { "node": ">=4.0" @@ -3495,6 +3206,22 @@ "node": ">=0.10.0" } }, + "node_modules/event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dev": true, + "dependencies": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "dev": true + }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -3518,42 +3245,44 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/execa/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "node_modules/exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true, "engines": { "node": ">= 0.8.0" } }, "node_modules/expect": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/expect/-/expect-27.4.2.tgz", - "integrity": "sha512-BjAXIDC6ZOW+WBFNg96J22D27Nq5ohn+oGcuP2rtOtcjuxNoV9McpQ60PcQWhdFOSBIQdR72e+4HdnbZTFSTyg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", - "ansi-styles": "^5.0.0", - "jest-get-type": "^27.4.0", - "jest-matcher-utils": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-regex-util": "^27.4.0" + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/expect/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "node_modules/ext": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "dependencies": { + "type": "^2.7.2" } }, "node_modules/fast-deep-equal": { @@ -3562,15 +3291,15 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", "dev": true }, "node_modules/fast-glob": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -3580,7 +3309,19 @@ "micromatch": "^4.0.4" }, "engines": { - "node": ">=8" + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" } }, "node_modules/fast-json-stable-stringify": { @@ -3592,27 +3333,55 @@ "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fast-uri": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", + "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==" + }, "node_modules/fastq": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.12.0.tgz", - "integrity": "sha512-VNX0QkHK3RsXVKr9KrlUv/FoTa0NdbYoHHl7uXHv2rzyHSlxjdNAKug2twd9luJxpcyNeAgf5iPPMutJO67Dfg==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, "dependencies": { "reusify": "^1.0.4" } }, "node_modules/fb-watchman": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", - "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", "dev": true, "dependencies": { "bser": "2.1.1" } }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -3625,10 +3394,31 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -3654,42 +3444,145 @@ "url": "https://github.com/avajs/find-cache-dir?sponsor=1" } }, + "node_modules/find-cache-dir/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-cache-dir/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { - "locate-path": "^5.0.0", + "locate-path": "^6.0.0", "path-exists": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "dependencies": { - "flatted": "^3.1.0", + "flatted": "^3.2.9", + "keyv": "^4.5.3", "rimraf": "^3.0.2" }, "engines": { "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/flat-cache/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/flat-cache/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/flat-cache/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/flat-cache/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/flatted": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", - "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, + "node_modules/foreground-child": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dev": true, "dependencies": { "asynckit": "^0.4.0", @@ -3700,6 +3593,18 @@ "node": ">= 6" } }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dev": true, + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, "node_modules/fs-extra": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", @@ -3714,25 +3619,16 @@ "node": ">=12" } }, - "node_modules/fs-extra/node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, "optional": true, @@ -3744,16 +3640,13 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/gensync": { "version": "1.0.0-beta.2", @@ -3773,11 +3666,17 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-own-enumerable-property-symbols": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", - "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", - "dev": true + "node_modules/get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/get-package-type": { "version": "0.1.0", @@ -3801,41 +3700,41 @@ } }, "node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, - "engines": { - "node": "*" + "bin": { + "glob": "dist/esm/bin.mjs" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" } }, "node_modules/globals": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", - "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -3848,16 +3747,16 @@ } }, "node_modules/globby": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", "slash": "^3.0.0" }, "engines": { @@ -3867,32 +3766,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globby/node_modules/ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true }, "node_modules/has-flag": { "version": "4.0.0", @@ -3900,19 +3784,19 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/html-encoding-sniffer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", - "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, "dependencies": { - "whatwg-encoding": "^1.0.5" + "function-bind": "^1.1.2" }, "engines": { - "node": ">=10" + "node": ">= 0.4" } }, "node_modules/html-escaper": { @@ -3921,33 +3805,6 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, - "node_modules/http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", - "dev": true, - "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", - "dev": true, - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -3958,36 +3815,27 @@ } }, "node_modules/husky": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/husky/-/husky-6.0.0.tgz", - "integrity": "sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ==", + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", + "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", "dev": true, "bin": { - "husky": "lib/bin.js" + "husky": "bin.mjs" + }, + "engines": { + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/typicode" } }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true, - "engines": { - "node": ">= 4" + "node": ">= 4" } }, "node_modules/import-fresh": { @@ -4007,9 +3855,9 @@ } }, "node_modules/import-local": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.3.tgz", - "integrity": "sha512-bE9iaUY3CXH8Cwfan/abDKAxe1KGT9kyGsBPqf6DMK/z0a2OzAsrukeYNgIH6cH5Xr452jb1TUL8rSfCLjZ9uA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", "dev": true, "dependencies": { "pkg-dir": "^4.2.0", @@ -4020,30 +3868,25 @@ }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, "engines": { "node": ">=0.8.19" } }, - "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, "dependencies": { "once": "^1.3.0", @@ -4068,16 +3911,34 @@ "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, + "node_modules/is-builtin-module": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", + "dev": true, + "dependencies": { + "builtin-modules": "^3.3.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-core-module": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", - "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz", + "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", "dev": true, "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4086,19 +3947,22 @@ "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-generator-fn": { @@ -4111,9 +3975,9 @@ } }, "node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "dependencies": { "is-extglob": "^2.1.1" @@ -4125,7 +3989,7 @@ "node_modules/is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", "dev": true }, "node_modules/is-number": { @@ -4137,19 +4001,19 @@ "node": ">=0.12.0" } }, - "node_modules/is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", "dev": true }, "node_modules/is-reference": { @@ -4161,15 +4025,6 @@ "@types/estree": "*" } }, - "node_modules/is-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", - "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -4182,75 +4037,49 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", "dev": true, "dependencies": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" }, "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" + "node": ">=10" } }, "node_modules/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "dependencies": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/istanbul-lib-source-maps": { @@ -4267,19 +4096,10 @@ "node": ">=10" } }, - "node_modules/istanbul-lib-source-maps/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/istanbul-reports": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.1.tgz", - "integrity": "sha512-q1kvhAXWSsXfMjCdNHNPKZZv94OlspKnoGv+R9RGbnqOOQ0VbNfLFgQDVgi7hHenKsndGq3/o0OBdzDXthWcNw==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -4289,21 +4109,77 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jake": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.1.tgz", + "integrity": "sha512-61btcOHNnLnsOdtLgA5efqQWjnSi/vow5HbI7HMdKKWqvrKR1bLK3BPlJn9gcSaP2ewuamUSMB5XEy76KUIS2w==", + "dev": true, + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jake/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/jake/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/jest": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.3.tgz", - "integrity": "sha512-jwsfVABBzuN3Atm+6h6vIEpTs9+VApODLt4dk2qv1WMOpb1weI1IIZfuwpMiWZ62qvWj78MvdvMHIYdUfqrFaA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, "dependencies": { - "@jest/core": "^27.4.3", + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", "import-local": "^3.0.2", - "jest-cli": "^27.4.3" + "jest-cli": "^29.7.0" }, "bin": { "jest": "bin/jest.js" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -4315,73 +4191,73 @@ } }, "node_modules/jest-changed-files": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.4.2.tgz", - "integrity": "sha512-/9x8MjekuzUQoPjDHbBiXbNEBauhrPU2ct7m8TfCg69ywt1y/N+yYwGh3gCpnqUS3klYWDU/lSNgv+JhoD2k1A==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", "execa": "^5.0.0", - "throat": "^6.0.1" + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-circus": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.2.tgz", - "integrity": "sha512-2ePUSru1BGMyzxsMvRfu+tNb+PW60rUyMLJBfw1Nrh5zC8RoTPfF+zbE0JToU31a6ZVe4nnrNKWYRzlghAbL0A==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", "dev": true, "dependencies": { - "@jest/environment": "^27.4.2", - "@jest/test-result": "^27.4.2", - "@jest/types": "^27.4.2", + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "dedent": "^0.7.0", - "expect": "^27.4.2", + "dedent": "^1.0.0", "is-generator-fn": "^2.0.0", - "jest-each": "^27.4.2", - "jest-matcher-utils": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-runtime": "^27.4.2", - "jest-snapshot": "^27.4.2", - "jest-util": "^27.4.2", - "pretty-format": "^27.4.2", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" + "stack-utils": "^2.0.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-cli": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.3.tgz", - "integrity": "sha512-zZSJBXNC/i8UnJPwcKWsqnhGgIF3uoTYP7th32Zej7KNQJdxzOMj+wCfy2Ox3kU7nXErJ36DtYyXDhfiqaiDRw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, "dependencies": { - "@jest/core": "^27.4.3", - "@jest/test-result": "^27.4.2", - "@jest/types": "^27.4.2", + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", + "create-jest": "^29.7.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.4", "import-local": "^3.0.2", - "jest-config": "^27.4.3", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", - "prompts": "^2.0.1", - "yargs": "^16.2.0" + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" }, "bin": { "jest": "bin/jest.js" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" @@ -4392,313 +4268,254 @@ } } }, - "node_modules/jest-cli/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/jest-config": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.4.3.tgz", - "integrity": "sha512-DQ10HTSqYtC2pO7s9j2jw+li4xUnm2wLYWH2o7K1ftB8NyvToHsXoLlXxtsGh3AW9gUQR6KY/4B7G+T/NswJBw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, "dependencies": { - "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^27.4.2", - "@jest/types": "^27.4.2", - "babel-jest": "^27.4.2", + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", "chalk": "^4.0.0", "ci-info": "^3.2.0", "deepmerge": "^4.2.2", - "glob": "^7.1.1", - "graceful-fs": "^4.2.4", - "jest-circus": "^27.4.2", - "jest-environment-jsdom": "^27.4.3", - "jest-environment-node": "^27.4.2", - "jest-get-type": "^27.4.0", - "jest-jasmine2": "^27.4.2", - "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.2", - "jest-runner": "^27.4.3", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "micromatch": "^4.0.4", - "pretty-format": "^27.4.2", - "slash": "^3.0.0" + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { + "@types/node": "*", "ts-node": ">=9.0.0" }, "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, "ts-node": { "optional": true } } }, - "node_modules/jest-diff": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.4.2.tgz", - "integrity": "sha512-ujc9ToyUZDh9KcqvQDkk/gkbf6zSaeEg9AiBxtttXW59H/AcqEYp1ciXAtJp+jXWva5nAf/ePtSsgWwE5mqp4Q==", + "node_modules/jest-config/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^27.4.0", - "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.2" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/jest-docblock": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.4.0.tgz", - "integrity": "sha512-7TBazUdCKGV7svZ+gh7C8esAnweJoG+SvcF6Cjqj4l17zA2q1cMwx2JObSioubk317H+cjcHgP+7fTs60paulg==", + "node_modules/jest-config/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "dependencies": { - "detect-newline": "^3.0.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/jest-each": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.4.2.tgz", - "integrity": "sha512-53V2MNyW28CTruB3lXaHNk6PkiIFuzdOC9gR3C6j8YE/ACfrPnz+slB0s17AgU1TtxNzLuHyvNlLJ+8QYw9nBg==", + "node_modules/jest-config/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", - "chalk": "^4.0.0", - "jest-get-type": "^27.4.0", - "jest-util": "^27.4.2", - "pretty-format": "^27.4.2" + "brace-expansion": "^1.1.7" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "*" } }, - "node_modules/jest-environment-jsdom": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.3.tgz", - "integrity": "sha512-x1AUVz3G14LpEJs7KIFUaTINT2n0unOUmvdAby3s/sldUpJJetOJifHo1O/EUQC5fNBowggwJbVulko18y6OWw==", + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, "dependencies": { - "@jest/environment": "^27.4.2", - "@jest/fake-timers": "^27.4.2", - "@jest/types": "^27.4.2", - "@types/node": "*", - "jest-mock": "^27.4.2", - "jest-util": "^27.4.2", - "jsdom": "^16.6.0" + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-node": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.2.tgz", - "integrity": "sha512-nzTZ5nJ+FabuZPH2YVci7SZIHpvtNRHPt8+vipLkCnAgXGjVzHm7XJWdnNqXbAkExIgiKeVEkVMNZOZE/LeiIg==", + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, "dependencies": { - "@jest/environment": "^27.4.2", - "@jest/fake-timers": "^27.4.2", - "@jest/types": "^27.4.2", - "@types/node": "*", - "jest-mock": "^27.4.2", - "jest-util": "^27.4.2" + "detect-newline": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.4.0.tgz", - "integrity": "sha512-tk9o+ld5TWq41DkK14L4wox4s2D9MtTpKaAVzXfr5CUKm5ZK2ExcaFE0qls2W71zE/6R2TxxrK9w2r6svAFDBQ==", - "dev": true, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-haste-map": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.2.tgz", - "integrity": "sha512-foiyAEePORUN2eeJnOtcM1y8qW0ShEd9kTjWVL4sVaMcuCJM6gtHegvYPBRT0mpI/bs4ueThM90+Eoj2ncoNsA==", + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", - "@types/graceful-fs": "^4.1.2", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.4", - "jest-regex-util": "^27.4.0", - "jest-serializer": "^27.4.0", - "jest-util": "^27.4.2", - "jest-worker": "^27.4.2", - "micromatch": "^4.0.4", - "walker": "^1.0.7" + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-haste-map/node_modules/jest-worker": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.2.tgz", - "integrity": "sha512-0QMy/zPovLfUPyHuOuuU4E+kGACXXE84nRnq6lBVI9GJg5DCBiA97SATi+ZP8CpiJwEQy1oCPjRBf8AnLjN+Ag==", + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { - "node": ">= 10.13.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-haste-map/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-jasmine2": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.2.tgz", - "integrity": "sha512-VO/fyAJSH9u0THjbteFiL8qc93ufU+yW+bdieDc8tzTCWwlWzO53UHS5nFK1qmE8izb5Smkn+XHlVt6/l06MKQ==", + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, "dependencies": { - "@babel/traverse": "^7.1.0", - "@jest/environment": "^27.4.2", - "@jest/source-map": "^27.4.0", - "@jest/test-result": "^27.4.2", - "@jest/types": "^27.4.2", + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "expect": "^27.4.2", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.4.2", - "jest-matcher-utils": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-runtime": "^27.4.2", - "jest-snapshot": "^27.4.2", - "jest-util": "^27.4.2", - "pretty-format": "^27.4.2", - "throat": "^6.0.1" + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" } }, "node_modules/jest-leak-detector": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.4.2.tgz", - "integrity": "sha512-ml0KvFYZllzPBJWDei3mDzUhyp/M4ubKebX++fPaudpe8OsxUE+m+P6ciVLboQsrzOCWDjE20/eXew9QMx/VGw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, "dependencies": { - "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.2" + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-matcher-utils": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.4.2.tgz", - "integrity": "sha512-jyP28er3RRtMv+fmYC/PKG8wvAmfGcSNproVTW2Y0P/OY7/hWUOmsPfxN1jOhM+0u2xU984u2yEagGivz9OBGQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, "dependencies": { "chalk": "^4.0.0", - "jest-diff": "^27.4.2", - "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.2" + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-message-util": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.4.2.tgz", - "integrity": "sha512-OMRqRNd9E0DkBLZpFtZkAGYOXl6ZpoMtQJWTAREJKDOFa0M6ptB7L67tp+cszMBkvSgKOhNtQp2Vbcz3ZZKo/w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.4.2", + "@jest/types": "^29.6.3", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^27.4.2", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-message-util/node_modules/@babel/code-frame": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.0.tgz", - "integrity": "sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.16.0" - }, - "engines": { - "node": ">=6.9.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-mock": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.4.2.tgz", - "integrity": "sha512-PDDPuyhoukk20JrQKeofK12hqtSka7mWH0QQuxSNgrdiPsrnYYLS6wbzu/HDlxZRzji5ylLRULeuI/vmZZDrYA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", - "@types/node": "*" + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", "dev": true, "engines": { "node": ">=6" @@ -4713,252 +4530,224 @@ } }, "node_modules/jest-regex-util": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.4.0.tgz", - "integrity": "sha512-WeCpMpNnqJYMQoOjm1nTtsgbR4XHAk1u00qDoNBQoykM280+/TmgA5Qh5giC1ecy6a5d4hbSsHzpBtu5yvlbEg==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", "dev": true, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-resolve": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.2.tgz", - "integrity": "sha512-d/zqPjxCzMqHlOdRTg8cTpO9jY+1/T74KazT8Ws/LwmwxV5sRMWOkiLjmzUCDj/5IqA5XHNK4Hkmlq9Kdpb9Sg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", + "resolve.exports": "^2.0.0", "slash": "^3.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-resolve-dependencies": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.2.tgz", - "integrity": "sha512-hb++cTpqvOWfU49MCP/JQkxmnrhKoAVqXWFjgYXswRSVGk8Q6bDTSvhbCeYXDtXaymY0y7WrrSIlKogClcKJuw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", - "jest-regex-util": "^27.4.0", - "jest-snapshot": "^27.4.2" + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-runner": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.3.tgz", - "integrity": "sha512-JgR6Om/j22Fd6ZUUIGTWNcCtuZVYbNrecb4k89W4UyFJoRtHpo2zMKWkmFFFJoqwWGrfrcPLnVBIgkJiTV3cyA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, "dependencies": { - "@jest/console": "^27.4.2", - "@jest/environment": "^27.4.2", - "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", - "@jest/types": "^27.4.2", + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "emittery": "^0.8.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-docblock": "^27.4.0", - "jest-environment-jsdom": "^27.4.3", - "jest-environment-node": "^27.4.2", - "jest-haste-map": "^27.4.2", - "jest-leak-detector": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-resolve": "^27.4.2", - "jest-runtime": "^27.4.2", - "jest-util": "^27.4.2", - "jest-worker": "^27.4.2", - "source-map-support": "^0.5.6", - "throat": "^6.0.1" + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runner/node_modules/jest-worker": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.2.tgz", - "integrity": "sha512-0QMy/zPovLfUPyHuOuuU4E+kGACXXE84nRnq6lBVI9GJg5DCBiA97SATi+ZP8CpiJwEQy1oCPjRBf8AnLjN+Ag==", - "dev": true, - "dependencies": { + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" }, "engines": { - "node": ">= 10.13.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runner/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/jest-runtime/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/jest-runtime": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.2.tgz", - "integrity": "sha512-eqPgcBaUNaw6j8T5M+dnfAEh6MIrh2YmtskCr9sl50QYpD22Sg+QqHw3J3nmaLzVMbBtOMHFFxLF0Qx8MsZVFQ==", - "dev": true, - "dependencies": { - "@jest/console": "^27.4.2", - "@jest/environment": "^27.4.2", - "@jest/globals": "^27.4.2", - "@jest/source-map": "^27.4.0", - "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", - "@jest/types": "^27.4.2", - "@types/yargs": "^16.0.0", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-mock": "^27.4.2", - "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.2", - "jest-snapshot": "^27.4.2", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", - "slash": "^3.0.0", - "strip-bom": "^4.0.0", - "yargs": "^16.2.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/jest-runtime/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "node_modules/jest-runtime/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=10" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/jest-serializer": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.4.0.tgz", - "integrity": "sha512-RDhpcn5f1JYTX2pvJAGDcnsNTnsV9bjYPU8xcV+xPwOXnUPOQwf4ZEuiU6G9H1UztH+OapMgu/ckEVwO87PwnQ==", + "node_modules/jest-runtime/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "@types/node": "*", - "graceful-fs": "^4.2.4" + "brace-expansion": "^1.1.7" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "*" } }, "node_modules/jest-snapshot": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.2.tgz", - "integrity": "sha512-DI7lJlNIu6WSQ+esqhnJzEzU70+dV+cNjoF1c+j5FagWEd3KtOyZvVliAH0RWNQ6KSnAAnKSU0qxJ8UXOOhuUQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, "dependencies": { - "@babel/core": "^7.7.2", + "@babel/core": "^7.11.6", "@babel/generator": "^7.7.2", - "@babel/parser": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.0.0", - "@jest/transform": "^27.4.2", - "@jest/types": "^27.4.2", - "@types/babel__traverse": "^7.0.4", - "@types/prettier": "^2.1.5", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^27.4.2", - "graceful-fs": "^4.2.4", - "jest-diff": "^27.4.2", - "jest-get-type": "^27.4.0", - "jest-haste-map": "^27.4.2", - "jest-matcher-utils": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-resolve": "^27.4.2", - "jest-util": "^27.4.2", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "natural-compare": "^1.4.0", - "pretty-format": "^27.4.2", - "semver": "^7.3.2" + "pretty-format": "^29.7.0", + "semver": "^7.5.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-util": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.4.2.tgz", - "integrity": "sha512-YuxxpXU6nlMan9qyLuxHaMMOzXAl5aGZWCSzben5DhLHemYQxCc4YK+4L3ZrCutT8GPQ+ui9k5D8rUJoDioMnA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", "ci-info": "^3.2.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "picomatch": "^2.2.3" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-validate": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.4.2.tgz", - "integrity": "sha512-hWYsSUej+Fs8ZhOm5vhWzwSLmVaPAxRy+Mr+z5MzeaHm9AxUpXdoVMEW4R86y5gOobVfBsMFLk4Rb+QkiEpx1A==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", + "@jest/types": "^29.6.3", "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^27.4.0", + "jest-get-type": "^29.6.3", "leven": "^3.1.0", - "pretty-format": "^27.4.2" + "pretty-format": "^29.7.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-validate/node_modules/camelcase": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz", - "integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, "engines": { "node": ">=10" @@ -4968,35 +4757,52 @@ } }, "node_modules/jest-watcher": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.4.2.tgz", - "integrity": "sha512-NJvMVyyBeXfDezhWzUOCOYZrUmkSCiatpjpm+nFUid74OZEHk6aMLrZAukIiFDwdbqp6mTM6Ui1w4oc+8EobQg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, "dependencies": { - "@jest/test-result": "^27.4.2", - "@jest/types": "^27.4.2", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^27.4.2", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", "string-length": "^4.0.1" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-worker": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", - "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, "dependencies": { "@types/node": "*", + "jest-util": "^29.7.0", "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" + "supports-color": "^8.0.0" }, "engines": { - "node": ">= 10.13.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/js-tokens": { @@ -5016,64 +4822,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsdom": { - "version": "16.7.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", - "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", - "dev": true, - "dependencies": { - "abab": "^2.0.5", - "acorn": "^8.2.4", - "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", - "cssstyle": "^2.3.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.1", - "domexception": "^2.0.1", - "escodegen": "^2.0.0", - "form-data": "^3.0.0", - "html-encoding-sniffer": "^2.0.1", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.5.0", - "ws": "^7.4.6", - "xml-name-validator": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/jsdom/node_modules/acorn": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", - "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -5086,12 +4834,44 @@ "node": ">=4" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, + "node_modules/json-schema-to-typescript": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-14.1.0.tgz", + "integrity": "sha512-VIeAFQkn88gFh26MSHWG4uX7TjK/arTw0NVLMZn6vX1WrSF+P6xu5MyEdovu+9PJ0uiS5gm0wzwQvYW9eSq1uw==", + "dev": true, + "dependencies": { + "@apidevtools/json-schema-ref-parser": "^11.5.5", + "@types/json-schema": "^7.0.15", + "@types/lodash": "^4.17.0", + "cli-color": "^2.0.4", + "glob": "^10.3.12", + "is-glob": "^4.0.3", + "js-yaml": "^4.1.0", + "lodash": "^4.17.21", + "minimist": "^1.2.8", + "mkdirp": "^3.0.1", + "node-fetch": "^3.3.2", + "prettier": "^3.2.5" + }, + "bin": { + "json2ts": "dist/src/cli.js" + }, + "engines": { + "node": ">=16.0.0" + } + }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -5100,7 +4880,7 @@ "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, "node_modules/json5": { @@ -5127,13 +4907,13 @@ "graceful-fs": "^4.1.6" } }, - "node_modules/jsonfile/node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, - "engines": { - "node": ">= 10.0.0" + "dependencies": { + "json-buffer": "3.0.1" } }, "node_modules/kleur": { @@ -5167,236 +4947,529 @@ "node": ">= 0.8.0" } }, + "node_modules/lilconfig": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", + "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, "node_modules/lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, "node_modules/lint-staged": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-11.0.0.tgz", - "integrity": "sha512-3rsRIoyaE8IphSUtO1RVTFl1e0SLBtxxUOPBtHxQgBHS5/i6nqvjcUfNioMa4BU9yGnPzbO+xkfLtXtxBpCzjw==", - "dev": true, - "dependencies": { - "chalk": "^4.1.1", - "cli-truncate": "^2.1.0", - "commander": "^7.2.0", - "cosmiconfig": "^7.0.0", - "debug": "^4.3.1", - "dedent": "^0.7.0", - "enquirer": "^2.3.6", - "execa": "^5.0.0", - "listr2": "^3.8.2", - "log-symbols": "^4.1.0", - "micromatch": "^4.0.4", - "normalize-path": "^3.0.0", - "please-upgrade-node": "^3.2.0", - "string-argv": "0.3.1", - "stringify-object": "^3.3.0" + "version": "15.2.7", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.7.tgz", + "integrity": "sha512-+FdVbbCZ+yoh7E/RosSdqKJyUM2OEjTciH0TFNkawKgvFp1zbGlEC39RADg+xKBG1R4mhoH2j85myBQZ5wR+lw==", + "dev": true, + "dependencies": { + "chalk": "~5.3.0", + "commander": "~12.1.0", + "debug": "~4.3.4", + "execa": "~8.0.1", + "lilconfig": "~3.1.1", + "listr2": "~8.2.1", + "micromatch": "~4.0.7", + "pidtree": "~0.6.0", + "string-argv": "~0.3.2", + "yaml": "~2.4.2" }, "bin": { "lint-staged": "bin/lint-staged.js" }, + "engines": { + "node": ">=18.12.0" + }, "funding": { "url": "https://opencollective.com/lint-staged" } }, - "node_modules/lint-staged/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "node_modules/lint-staged/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true, "engines": { - "node": ">= 10" + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/listr2": { - "version": "3.11.1", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.11.1.tgz", - "integrity": "sha512-ZXQvQfmH9iWLlb4n3hh31yicXDxlzB0pE7MM1zu6kgbVL4ivEsO4H8IPh4E682sC8RjnYO9anose+zT52rrpyg==", + "node_modules/lint-staged/node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", "dev": true, "dependencies": { - "cli-truncate": "^2.1.0", - "colorette": "^1.2.2", - "log-update": "^4.0.0", - "p-map": "^4.0.0", - "rxjs": "^6.6.7", - "through": "^2.3.8", - "wrap-ansi": "^7.0.0" + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" }, "engines": { - "node": ">=10.0.0" + "node": ">=16.17" }, - "peerDependencies": { - "enquirer": ">= 2.3.0 < 3" + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/lint-staged/node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, "engines": { - "node": ">=8" + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", - "dev": true + "node_modules/lint-staged/node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true, + "engines": { + "node": ">=16.17.0" + } }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "node_modules/lint-staged/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", - "dev": true + "node_modules/lint-staged/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "node_modules/lint-staged/node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", "dev": true, "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" + "path-key": "^4.0.0" }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-update": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", - "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "node_modules/lint-staged/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dev": true, "dependencies": { - "ansi-escapes": "^4.3.0", - "cli-cursor": "^3.1.0", - "slice-ansi": "^4.0.0", - "wrap-ansi": "^6.2.0" + "mimic-fn": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-update/node_modules/slice-ansi": { + "node_modules/lint-staged/node_modules/path-key": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" + "engines": { + "node": ">=12" }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lint-staged/node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-update/node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "node_modules/listr2": { + "version": "8.2.3", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.3.tgz", + "integrity": "sha512-Lllokma2mtoniUOS94CcOErHWAug5iu7HOmDrvWgpw8jyQH2fomgB+7lZS4HWZxytUuQwkGOwe49FvwVaA85Xw==", "dev": true, "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "cli-truncate": "^4.0.0", + "colorette": "^2.0.20", + "eventemitter3": "^5.0.1", + "log-update": "^6.0.0", + "rfdc": "^1.4.1", + "wrap-ansi": "^9.0.0" }, "engines": { - "node": ">=8" + "node": ">=18.0.0" } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "node_modules/listr2/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, "engines": { - "node": ">=10" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/magic-string": { - "version": "0.25.7", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", - "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "node_modules/listr2/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, - "dependencies": { - "sourcemap-codec": "^1.4.4" + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "node_modules/listr2/node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "node_modules/listr2/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "dev": true, "dependencies": { - "semver": "^6.0.0" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "node_modules/listr2/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "node_modules/listr2/node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, "dependencies": { - "tmpl": "1.0.5" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/log-update": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.0.0.tgz", + "integrity": "sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==", + "dev": true, + "dependencies": { + "ansi-escapes": "^6.2.0", + "cli-cursor": "^4.0.0", + "slice-ansi": "^7.0.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/ansi-escapes": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.1.tgz", + "integrity": "sha512-4nJ3yixlEthEJ9Rk4vPcdBRkZvQZlYyu8j4/Mqz5sgIkddmEnH2Yj2ZrnP9S3tQOvSNRUIgVNF/1yPpRAGNRig==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/log-update/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-update/node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "node_modules/log-update/node_modules/is-fullwidth-code-point": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", + "dev": true, + "dependencies": { + "get-east-asian-width": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/slice-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "dev": true, + "dependencies": { + "es5-ext": "~0.10.2" + } + }, + "node_modules/magic-string": { + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/memoizee": { + "version": "0.4.17", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.17.tgz", + "integrity": "sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA==", + "dev": true, + "dependencies": { + "d": "^1.0.2", + "es5-ext": "^0.10.64", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" + }, + "engines": { + "node": ">=0.12" } }, "node_modules/merge-stream": { @@ -5415,34 +5488,34 @@ } }, "node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", "dev": true, "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "braces": "^3.0.3", + "picomatch": "^2.3.1" }, "engines": { "node": ">=8.6" } }, "node_modules/mime-db": { - "version": "1.49.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", - "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==", + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { - "version": "2.1.32", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", - "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, "dependencies": { - "mime-db": "1.49.0" + "mime-db": "1.52.0" }, "engines": { "node": ">= 0.6" @@ -5458,22 +5531,52 @@ } }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dev": true, + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/ms": { "version": "2.1.2", @@ -5484,70 +5587,62 @@ "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", "dev": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" } + ], + "engines": { + "node": ">=10.5.0" } }, - "node_modules/node-fetch/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/node-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/node-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", "dev": true, "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" } }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", "dev": true }, - "node_modules/node-modules-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", - "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/node-releases": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", - "integrity": "sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "node_modules/normalize-path": { @@ -5571,16 +5666,10 @@ "node": ">=8" } }, - "node_modules/nwsapi": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", - "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", - "dev": true - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "dependencies": { "wrappy": "1" @@ -5602,9 +5691,9 @@ } }, "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "dependencies": { "deep-is": "^0.1.3", @@ -5612,46 +5701,34 @@ "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" } }, "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "p-try": "^2.0.0" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">=6" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "dependencies": { - "aggregate-error": "^3.0.0" + "p-limit": "^3.0.2" }, "engines": { "node": ">=10" @@ -5669,6 +5746,12 @@ "node": ">=6" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -5699,10 +5782,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", "dev": true }, "node_modules/path-exists": { @@ -5717,21 +5800,12 @@ "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/path-is-network-drive": { - "version": "1.0.20", - "resolved": "https://registry.npmjs.org/path-is-network-drive/-/path-is-network-drive-1.0.20.tgz", - "integrity": "sha512-p5wCWlRB4+ggzxWshqHH9aF3kAuVu295NaENXmVhThbZPJQBeJdxZTP6CIoUR+kWHDUW56S9YcaO1gXnc/BOxw==", - "dev": true, - "dependencies": { - "tslib": "^2" - } - }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -5747,15 +5821,28 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "node_modules/path-strip-sep": { - "version": "1.0.17", - "resolved": "https://registry.npmjs.org/path-strip-sep/-/path-strip-sep-1.0.17.tgz", - "integrity": "sha512-+2zIC2fNgdilgV7pTrktY6oOxxZUo9x5zJYfTzxsGze5kSGDDwhA5/0WlBn+sUyv/WuuyYn3OfM+Ue5nhdQUgA==", + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, "dependencies": { - "tslib": "^2" + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -5766,15 +5853,15 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", "dev": true }, "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "engines": { "node": ">=8.6" @@ -5783,14 +5870,23 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pirates": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", - "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", + "node_modules/pidtree": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", "dev": true, - "dependencies": { - "node-modules-regexp": "^1.0.0" + "bin": { + "pidtree": "bin/pidtree.js" }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, "engines": { "node": ">= 6" } @@ -5807,13 +5903,56 @@ "node": ">=8" } }, - "node_modules/please-upgrade-node": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", - "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "dependencies": { - "semver-compare": "^1.0.0" + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" } }, "node_modules/prelude-ls": { @@ -5826,15 +5965,18 @@ } }, "node_modules/prettier": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.0.tgz", - "integrity": "sha512-DsEPLY1dE5HF3BxCRBmD4uYZ+5DCbvatnolqTqcxEgKVZnL2kUfyu7b8pPQ5+hTBkdhU9SLUmK0/pHb07RE4WQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" } }, "node_modules/prettier-linter-helpers": { @@ -5850,18 +5992,17 @@ } }, "node_modules/pretty-format": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.4.2.tgz", - "integrity": "sha512-p0wNtJ9oLuvgOQDEIZ9zQjZffK7KtyR6Si0jnXULIDwrlNF8Cuir3AZP0hHv0jmKuNN/edOnbMjnzd4uTcmWiw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@jest/types": "^27.4.2", - "ansi-regex": "^5.0.1", + "@jest/schemas": "^29.6.3", "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "react-is": "^18.0.0" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/pretty-format/node_modules/ansi-styles": { @@ -5876,15 +6017,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -5898,25 +6030,30 @@ "node": ">= 6" } }, - "node_modules/psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true - }, "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, "engines": { "node": ">=6" } }, - "node_modules/querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "dev": true + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] }, "node_modules/queue-microtask": { "version": "1.2.3", @@ -5948,15 +6085,15 @@ } }, "node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, "node_modules/rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", "dev": true, "dependencies": { "resolve": "^1.1.6" @@ -5965,22 +6102,10 @@ "node": ">= 0.10" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, "engines": { "node": ">=0.10.0" @@ -5994,20 +6119,18 @@ "node": ">=0.10.0" } }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true - }, "node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6044,27 +6167,36 @@ } }, "node_modules/resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true, "engines": { "node": ">=10" } }, "node_modules/restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", "dev": true, "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -6075,25 +6207,116 @@ "node": ">=0.10.0" } }, + "node_modules/rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "dev": true + }, "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz", + "integrity": "sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==", "dev": true, "dependencies": { - "glob": "^7.1.3" + "glob": "^11.0.0", + "package-json-from-dist": "^1.0.0" }, "bin": { - "rimraf": "bin.js" + "rimraf": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz", + "integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^4.0.1", + "minimatch": "^10.0.0", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/jackspeak": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.1.tgz", + "integrity": "sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/rimraf/node_modules/lru-cache": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.0.tgz", + "integrity": "sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==", + "dev": true, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", + "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "dev": true, + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/rollup": { - "version": "2.56.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.56.3.tgz", - "integrity": "sha512-Au92NuznFklgQCUcV96iXlxUbHuB1vQMaH76DHl5M11TotjOHwqk9CwcrT78+Tnv4FN9uTBxq6p4EJoYkpyekg==", + "version": "2.79.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", + "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -6127,10 +6350,40 @@ } } }, + "node_modules/rollup-plugin-sourcemaps/node_modules/@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dev": true, + "dependencies": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" + } + }, + "node_modules/rollup-plugin-sourcemaps/node_modules/@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, + "node_modules/rollup-plugin-sourcemaps/node_modules/estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + }, "node_modules/rollup-plugin-terser": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", + "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser", "dev": true, "dependencies": { "@babel/code-frame": "^7.10.4", @@ -6142,18 +6395,31 @@ "rollup": "^2.0.0" } }, + "node_modules/rollup-plugin-terser/node_modules/jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, "node_modules/rollup-plugin-typescript2": { - "version": "0.31.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.31.2.tgz", - "integrity": "sha512-hRwEYR1C8xDGVVMFJQdEVnNAeWRvpaY97g5mp3IeLnzhNXzSVq78Ye/BJ9PAaUfN4DXa/uDnqerifMOaMFY54Q==", + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.36.0.tgz", + "integrity": "sha512-NB2CSQDxSe9+Oe2ahZbf+B4bh7pHwjV5L+RSYpCu7Q5ROuN94F9b6ioWwKfz3ueL3KTtmX4o2MUH2cgHDIEUsw==", "dev": true, "dependencies": { "@rollup/pluginutils": "^4.1.2", - "@yarn-tool/resolve-package": "^1.0.40", "find-cache-dir": "^3.3.2", "fs-extra": "^10.0.0", - "resolve": "^1.20.0", - "tslib": "^2.3.1" + "semver": "^7.5.4", + "tslib": "^2.6.2" }, "peerDependencies": { "rollup": ">=1.26.3", @@ -6196,24 +6462,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", - "dev": true, - "dependencies": { - "tslib": "^1.9.0" - }, - "engines": { - "npm": ">=2.0.0" - } - }, - "node_modules/rxjs/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -6234,32 +6482,11 @@ } ] }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/saxes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", - "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", - "dev": true, - "dependencies": { - "xmlchars": "^2.2.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -6267,12 +6494,6 @@ "node": ">=10" } }, - "node_modules/semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", - "dev": true - }, "node_modules/serialize-javascript": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", @@ -6320,6 +6541,49 @@ "node": ">=4" } }, + "node_modules/shelljs/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/shelljs/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/shelljs/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/shx": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz", @@ -6337,10 +6601,16 @@ } }, "node_modules/signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", - "dev": true + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/sisteransi": { "version": "1.0.5", @@ -6358,32 +6628,47 @@ } }, "node_modules/slice-ansi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", "dev": true, "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, "engines": { - "node": ">= 8" + "node": ">=0.10.0" } }, "node_modules/source-map-resolve": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", "dev": true, "dependencies": { "atob": "^2.1.2", @@ -6391,40 +6676,25 @@ } }, "node_modules/source-map-support": { - "version": "0.5.20", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", - "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "dev": true - }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, "node_modules/stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "dependencies": { "escape-string-regexp": "^2.0.0" @@ -6443,9 +6713,9 @@ } }, "node_modules/string-argv": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", - "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", "dev": true, "engines": { "node": ">=0.6.19" @@ -6465,40 +6735,99 @@ } }, "node_modules/string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" + "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8" } }, - "node_modules/stringify-object": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", - "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "dependencies": { - "get-own-enumerable-property-symbols": "^3.0.0", - "is-obj": "^1.0.1", - "is-regexp": "^1.0.0" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=4" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" @@ -6542,87 +6871,46 @@ "dependencies": { "has-flag": "^4.0.0" }, - "engines": { - "node": ">=4" - } - }, - "node_modules/supports-hyperlinks": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", - "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, "engines": { "node": ">=8" } }, - "node_modules/symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true - }, - "node_modules/table": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", - "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", - "dev": true, - "dependencies": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table/node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, "engines": { - "node": ">=10" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "node_modules/synckit": { + "version": "0.8.8", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz", + "integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==", "dev": true, "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" }, "engines": { - "node": ">=8" + "node": "^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://opencollective.com/unts" } }, "node_modules/terser": { - "version": "5.16.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.1.tgz", - "integrity": "sha512-xvQfyfA1ayT0qdK47zskQgRZeWLoOQ8JQ6mIgRGVNwZKdQMU+5FkCBjmv4QjcrTzyZquRw2FVtlJSRUmMKQslw==", + "version": "5.31.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.2.tgz", + "integrity": "sha512-LGyRZVFm/QElZHy/CPr/O4eNZOZIzsrQ92y4v9UJe/pFJjypje2yI3C2FmPtvUEnhadlSbmG2nXtdcjHOjCfxw==", "dev": true, "dependencies": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -6633,24 +6921,22 @@ "node": ">=10" } }, - "node_modules/terser/node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/terser/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, + "node_modules/terser/node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -6665,23 +6951,67 @@ "node": ">=8" } }, + "node_modules/test-exclude/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "node_modules/throat": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", - "integrity": "sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true + "node_modules/timers-ext": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.8.tgz", + "integrity": "sha512-wFH7+SEAcKfJpfLPkrgMPvvwnEtj8W4IurvEyrKsDleXnKLCDw71w8jltvfLa8Rm4qQxxT4jmDBYbJG/z7qoww==", + "dev": true, + "dependencies": { + "es5-ext": "^0.10.64", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.12" + } }, "node_modules/tmpl": { "version": "1.0.5", @@ -6692,7 +7022,7 @@ "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true, "engines": { "node": ">=4" @@ -6710,125 +7040,129 @@ "node": ">=8.0" } }, - "node_modules/tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", "dev": true, - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, "engines": { - "node": ">=6" - } - }, - "node_modules/tr46": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", - "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", - "dev": true, - "dependencies": { - "punycode": "^2.1.1" + "node": ">=16" }, - "engines": { - "node": ">=8" + "peerDependencies": { + "typescript": ">=4.2.0" } }, "node_modules/ts-jest": { - "version": "27.1.0", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.0.tgz", - "integrity": "sha512-ZouWlP03JMtzfNHg0ZeDrxAESYGmVhWyHtIl2/01kBbXaMbTr4Vhv6/GeMxUed6GFg/4ycMo+yU6Eo9gI16xTQ==", + "version": "29.2.2", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.2.tgz", + "integrity": "sha512-sSW7OooaKT34AAngP6k1VS669a0HdLxkQZnlC7T76sckGCokXFnvJ3yRlQZGRTAoV5K19HfSgCiSwWOSIfcYlg==", "dev": true, "dependencies": { "bs-logger": "0.x", - "esbuild": "~0.14.0", + "ejs": "^3.0.0", "fast-json-stable-stringify": "2.x", - "jest-util": "^27.0.0", - "json5": "2.x", + "jest-util": "^29.0.0", + "json5": "^2.2.3", "lodash.memoize": "4.x", "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "20.x" + "semver": "^7.5.3", + "yargs-parser": "^21.0.1" }, "bin": { "ts-jest": "cli.js" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" }, "peerDependencies": { "@babel/core": ">=7.0.0-beta.0 <8", - "@types/jest": "^27.0.0", - "babel-jest": ">=27.0.0 <28", - "jest": "^27.0.0", - "typescript": ">=3.8 <5.0" + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" }, "peerDependenciesMeta": { "@babel/core": { "optional": true }, - "@types/jest": { + "@jest/transform": { + "optional": true + }, + "@jest/types": { "optional": true }, "babel-jest": { "optional": true + }, + "esbuild": { + "optional": true } } }, - "node_modules/ts-node": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", - "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", + "node_modules/ts-morph": { + "version": "23.0.0", + "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-23.0.0.tgz", + "integrity": "sha512-FcvFx7a9E8TUe6T3ShihXJLiJOiqyafzFKUO4aqIHDUCIvADdGNShcbc2W5PMr3LerXRv7mafvFZ9lRENxJmug==", "dev": true, "dependencies": { + "@ts-morph/common": "~0.24.0", + "code-block-writer": "^13.0.1" + } + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", "arg": "^4.1.0", "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", - "source-map-support": "^0.5.17", + "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" }, "bin": { "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", "ts-node-script": "dist/bin-script.js", "ts-node-transpile-only": "dist/bin-transpile.js", "ts-script": "dist/bin-script-deprecated.js" }, - "engines": { - "node": ">=10.0.0" - }, "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } } }, "node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", "dev": true }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/tsutils/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "node_modules/type": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz", + "integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==", "dev": true }, "node_modules/type-check": { @@ -6864,108 +7198,93 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/typescript": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.2.tgz", - "integrity": "sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ==", + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", + "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, "node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true, "engines": { - "node": ">= 4.0.0" + "node": ">= 10.0.0" } }, - "node_modules/upath2": { - "version": "3.1.19", - "resolved": "https://registry.npmjs.org/upath2/-/upath2-3.1.19.tgz", - "integrity": "sha512-d23dQLi8nDWSRTIQwXtaYqMrHuca0As53fNiTLLFDmsGBbepsZepISaB2H1x45bDFN/n3Qw9bydvyZEacTrEWQ==", + "node_modules/update-browserslist-db": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", + "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "dependencies": { - "@types/node": "*", - "path-is-network-drive": "^1.0.20", - "path-strip-sep": "^1.0.17", - "tslib": "^2" + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" } }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", "dev": true, "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" + "punycode": "^2.1.0" } }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true }, "node_modules/v8-to-istanbul": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.0.tgz", - "integrity": "sha512-/PRhfd8aTNp9Ggr62HPzXg2XasNFGy5PBt0Rp04du7/8GNNSgxFL6WBTkgMKSL9bFjH+8kKEG3f37FmxiTqUUA==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0", - "source-map": "^0.7.3" + "convert-source-map": "^2.0.0" }, "engines": { "node": ">=10.12.0" } }, - "node_modules/w3c-hr-time": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", - "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", - "dev": true, - "dependencies": { - "browser-process-hrtime": "^1.0.0" - } - }, - "node_modules/w3c-xmlserializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", - "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", - "dev": true, - "dependencies": { - "xml-name-validator": "^3.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", @@ -6975,42 +7294,13 @@ "makeerror": "1.0.12" } }, - "node_modules/webidl-conversions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", - "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", - "dev": true, - "engines": { - "node": ">=10.4" - } - }, - "node_modules/whatwg-encoding": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", - "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", - "dev": true, - "dependencies": { - "iconv-lite": "0.4.24" - } - }, - "node_modules/whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", - "dev": true - }, - "node_modules/whatwg-url": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", - "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", + "node_modules/web-streams-polyfill": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", "dev": true, - "dependencies": { - "lodash": "^4.7.0", - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" - }, "engines": { - "node": ">=10" + "node": ">= 8" } }, "node_modules/which": { @@ -7038,6 +7328,24 @@ } }, "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", @@ -7054,55 +7362,97 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/ws": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", - "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "dev": true, "engines": { - "node": ">=8.3.0" + "node": ">=12" }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/xml-name-validator": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", - "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "node_modules/xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/write-file-atomic/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, "node_modules/y18n": { @@ -7115,45 +7465,77 @@ } }, "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz", + "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==", "dev": true, + "bin": { + "yaml": "bin.mjs" + }, "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/yargs": { - "version": "17.1.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.1.1.tgz", - "integrity": "sha512-c2k48R0PwKIqKhPMWjeiF6y2xY/gPMUlro0sgxqXpbOIohWiLNXWslsootttv7E1e73QPAMQSg5FeySbVcpsPQ==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "dependencies": { - "cliui": "^7.0.2", + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.0", + "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "yargs-parser": "^21.1.1" }, "engines": { "node": ">=12" } }, "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/yargs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" } }, "node_modules/yn": { @@ -7177,5408 +7559,5 @@ "url": "https://github.com/sponsors/sindresorhus" } } - }, - "dependencies": { - "@apidevtools/json-schema-ref-parser": { - "version": "9.0.9", - "resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz", - "integrity": "sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==", - "dev": true, - "requires": { - "@jsdevtools/ono": "^7.1.3", - "@types/json-schema": "^7.0.6", - "call-me-maybe": "^1.0.1", - "js-yaml": "^4.1.0" - } - }, - "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/compat-data": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.4.tgz", - "integrity": "sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q==", - "dev": true - }, - "@babel/core": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.0.tgz", - "integrity": "sha512-mYZEvshBRHGsIAiyH5PzCFTCfbWfoYbO/jcSdXQSUQu1/pW0xDZAUP7KEc32heqWTAfAHhV9j1vH8Sav7l+JNQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", - "@babel/helper-compilation-targets": "^7.16.0", - "@babel/helper-module-transforms": "^7.16.0", - "@babel/helpers": "^7.16.0", - "@babel/parser": "^7.16.0", - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.0.tgz", - "integrity": "sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==", - "dev": true, - "requires": { - "@babel/highlight": "^7.16.0" - } - }, - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "@babel/generator": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz", - "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==", - "dev": true, - "requires": { - "@babel/types": "^7.23.6", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - } - }, - "@babel/helper-compilation-targets": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.3.tgz", - "integrity": "sha512-vKsoSQAyBmxS35JUOOt+07cLc6Nk/2ljLIHwmq2/NM6hdioUaqEXq/S+nXvbvXbZkNDlWOymPanJGOc4CBjSJA==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.16.0", - "@babel/helper-validator-option": "^7.14.5", - "browserslist": "^4.17.5", - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true - } - } - }, - "@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true - }, - "@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "requires": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } - }, - "@babel/helper-member-expression-to-functions": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.0.tgz", - "integrity": "sha512-bsjlBFPuWT6IWhl28EdrQ+gTvSvj5tqVP5Xeftp07SEuz5pLnsXZuDkDD3Rfcxy0IsHmbZ+7B2/9SHzxO0T+sQ==", - "dev": true, - "requires": { - "@babel/types": "^7.16.0" - } - }, - "@babel/helper-module-imports": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz", - "integrity": "sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg==", - "dev": true, - "requires": { - "@babel/types": "^7.16.0" - } - }, - "@babel/helper-module-transforms": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.0.tgz", - "integrity": "sha512-My4cr9ATcaBbmaEa8M0dZNA74cfI6gitvUAskgDtAFmAqyFKDSHQo5YstxPbN+lzHl2D9l/YOEFqb2mtUh4gfA==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.16.0", - "@babel/helper-replace-supers": "^7.16.0", - "@babel/helper-simple-access": "^7.16.0", - "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/helper-validator-identifier": "^7.15.7", - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0" - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.0.tgz", - "integrity": "sha512-SuI467Gi2V8fkofm2JPnZzB/SUuXoJA5zXe/xzyPP2M04686RzFKFHPK6HDVN6JvWBIEW8tt9hPR7fXdn2Lgpw==", - "dev": true, - "requires": { - "@babel/types": "^7.16.0" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", - "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", - "dev": true - }, - "@babel/helper-replace-supers": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.0.tgz", - "integrity": "sha512-TQxuQfSCdoha7cpRNJvfaYxxxzmbxXw/+6cS7V02eeDYyhxderSoMVALvwupA54/pZcOTtVeJ0xccp1nGWladA==", - "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.16.0", - "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0" - } - }, - "@babel/helper-simple-access": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.0.tgz", - "integrity": "sha512-o1rjBT/gppAqKsYfUdfHq5Rk03lMQrkPHG1OWzHWpLgVXRH4HnMM9Et9CVdIqwkCQlobnGHEJMsgWP/jE1zUiw==", - "dev": true, - "requires": { - "@babel/types": "^7.16.0" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, - "requires": { - "@babel/types": "^7.22.5" - } - }, - "@babel/helper-string-parser": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", - "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", - "dev": true - }, - "@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true - }, - "@babel/helper-validator-option": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", - "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", - "dev": true - }, - "@babel/helpers": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.3.tgz", - "integrity": "sha512-Xn8IhDlBPhvYTvgewPKawhADichOsbkZuzN7qz2BusOM0brChsyXMDJvldWaYMMUNiCQdQzNEioXTp3sC8Nt8w==", - "dev": true, - "requires": { - "@babel/template": "^7.16.0", - "@babel/traverse": "^7.16.3", - "@babel/types": "^7.16.0" - } - }, - "@babel/highlight": { - "version": "7.23.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", - "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@babel/parser": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.0.tgz", - "integrity": "sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==", - "dev": true - }, - "@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, - "@babel/plugin-syntax-typescript": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.0.tgz", - "integrity": "sha512-Xv6mEXqVdaqCBfJFyeab0fH2DnUoMsDmhamxsSi4j8nLd4Vtw213WMJr55xxqipC/YVWyPY3K0blJncPYji+dQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, - "@babel/template": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", - "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", - "dev": true, - "requires": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" - } - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@babel/traverse": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.0.tgz", - "integrity": "sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.23.5", - "@babel/generator": "^7.23.6", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0", - "debug": "^4.3.1", - "globals": "^11.1.0" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.23.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", - "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", - "dev": true, - "requires": { - "@babel/highlight": "^7.23.4", - "chalk": "^2.4.2" - } - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@babel/types": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", - "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.23.4", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" - } - }, - "@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "@dtsgenerator/replace-namespace": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@dtsgenerator/replace-namespace/-/replace-namespace-1.5.1.tgz", - "integrity": "sha512-euoDqrH2obSzuNQBDxMcIvXluQVgbxH2wUkJeDo36hQBTwSiZaT5FBEz3YmC5uZBwJGDGsHPYCpicuuNYnTHRQ==", - "dev": true, - "requires": {} - }, - "@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - } - } - }, - "@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.0", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - } - }, - "@humanwhocodes/object-schema": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", - "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", - "dev": true - }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } - } - }, - "@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true - }, - "@jest/console": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.4.2.tgz", - "integrity": "sha512-xknHThRsPB/To1FUbi6pCe43y58qFC03zfb6R7fDb/FfC7k2R3i1l+izRBJf8DI46KhYGRaF14Eo9A3qbBoixg==", - "dev": true, - "requires": { - "@jest/types": "^27.4.2", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^27.4.2", - "jest-util": "^27.4.2", - "slash": "^3.0.0" - } - }, - "@jest/core": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.4.3.tgz", - "integrity": "sha512-V9ms3zSxUHxh1E/ZLAiXF7SLejsdFnjWTFizWotMOWvjho0lW5kSjZymhQSodNW0T0ZMQRiha7f8+NcFVm3hJQ==", - "dev": true, - "requires": { - "@jest/console": "^27.4.2", - "@jest/reporters": "^27.4.2", - "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", - "@jest/types": "^27.4.2", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.8.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-changed-files": "^27.4.2", - "jest-config": "^27.4.3", - "jest-haste-map": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.2", - "jest-resolve-dependencies": "^27.4.2", - "jest-runner": "^27.4.3", - "jest-runtime": "^27.4.2", - "jest-snapshot": "^27.4.2", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", - "jest-watcher": "^27.4.2", - "micromatch": "^4.0.4", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "@jest/environment": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.4.2.tgz", - "integrity": "sha512-uSljKxh/rGlHlmhyeG4ZoVK9hOec+EPBkwTHkHKQ2EqDu5K+MaG9uJZ8o1CbRsSdZqSuhXvJCYhBWsORPPg6qw==", - "dev": true, - "requires": { - "@jest/fake-timers": "^27.4.2", - "@jest/types": "^27.4.2", - "@types/node": "*", - "jest-mock": "^27.4.2" - } - }, - "@jest/fake-timers": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.4.2.tgz", - "integrity": "sha512-f/Xpzn5YQk5adtqBgvw1V6bF8Nx3hY0OIRRpCvWcfPl0EAjdqWPdhH3t/3XpiWZqtjIEHDyMKP9ajpva1l4Zmg==", - "dev": true, - "requires": { - "@jest/types": "^27.4.2", - "@sinonjs/fake-timers": "^8.0.1", - "@types/node": "*", - "jest-message-util": "^27.4.2", - "jest-mock": "^27.4.2", - "jest-util": "^27.4.2" - } - }, - "@jest/globals": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.4.2.tgz", - "integrity": "sha512-KkfaHEttlGpXYAQTZHgrESiEPx2q/DKAFLGLFda1uGVrqc17snd3YVPhOxlXOHIzVPs+lQ/SDB2EIvxyGzb3Ew==", - "dev": true, - "requires": { - "@jest/environment": "^27.4.2", - "@jest/types": "^27.4.2", - "expect": "^27.4.2" - } - }, - "@jest/reporters": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.4.2.tgz", - "integrity": "sha512-sp4aqmdBJtjKetEakzDPcZggPcVIF6w9QLkYBbaWDV6e/SIsHnF1S4KtIH91eEc2fp7ep6V/e1xvdfEoho1d2w==", - "dev": true, - "requires": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^27.4.2", - "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", - "@jest/types": "^27.4.2", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.2", - "graceful-fs": "^4.2.4", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^4.0.3", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "jest-haste-map": "^27.4.2", - "jest-resolve": "^27.4.2", - "jest-util": "^27.4.2", - "jest-worker": "^27.4.2", - "slash": "^3.0.0", - "source-map": "^0.6.0", - "string-length": "^4.0.1", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^8.1.0" - }, - "dependencies": { - "jest-worker": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.2.tgz", - "integrity": "sha512-0QMy/zPovLfUPyHuOuuU4E+kGACXXE84nRnq6lBVI9GJg5DCBiA97SATi+ZP8CpiJwEQy1oCPjRBf8AnLjN+Ag==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "@jest/source-map": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.4.0.tgz", - "integrity": "sha512-Ntjx9jzP26Bvhbm93z/AKcPRj/9wrkI88/gK60glXDx1q+IeI0rf7Lw2c89Ch6ofonB0On/iRDreQuQ6te9pgQ==", - "dev": true, - "requires": { - "callsites": "^3.0.0", - "graceful-fs": "^4.2.4", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "@jest/test-result": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.4.2.tgz", - "integrity": "sha512-kr+bCrra9jfTgxHXHa2UwoQjxvQk3Am6QbpAiJ5x/50LW8llOYrxILkqY0lZRW/hu8FXesnudbql263+EW9iNA==", - "dev": true, - "requires": { - "@jest/console": "^27.4.2", - "@jest/types": "^27.4.2", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - } - }, - "@jest/test-sequencer": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.4.2.tgz", - "integrity": "sha512-HmHp5mlh9f9GyNej5yCS1JZIFfUGnP9+jEOH5zoq5EmsuZeYD+dGULqyvGDPtuzzbyAFJ6R4+z4SS0VvnFwwGQ==", - "dev": true, - "requires": { - "@jest/test-result": "^27.4.2", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", - "jest-runtime": "^27.4.2" - } - }, - "@jest/transform": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.4.2.tgz", - "integrity": "sha512-RTKcPZllfcmLfnlxBya7aypofhdz05+E6QITe55Ex0rxyerkgjmmpMlvVn11V0cP719Ps6WcDYCnDzxnnJUwKg==", - "dev": true, - "requires": { - "@babel/core": "^7.1.0", - "@jest/types": "^27.4.2", - "babel-plugin-istanbul": "^6.0.0", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", - "jest-regex-util": "^27.4.0", - "jest-util": "^27.4.2", - "micromatch": "^4.0.4", - "pirates": "^4.0.1", - "slash": "^3.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "^3.0.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "@jest/types": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.4.2.tgz", - "integrity": "sha512-j35yw0PMTPpZsUoOBiuHzr1zTYoad1cVIE0ajEjcrJONxxrko/IRGKkXx3os0Nsi4Hu3+5VmDbVfq5WhG/pWAg==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^16.0.0", - "chalk": "^4.0.0" - } - }, - "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true - }, - "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true - }, - "@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", - "dev": true, - "requires": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - }, - "@jridgewell/trace-mapping": { - "version": "0.3.17", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", - "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, - "@jsdevtools/ono": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz", - "integrity": "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==", - "dev": true - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@rollup/plugin-commonjs": { - "version": "19.0.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-19.0.2.tgz", - "integrity": "sha512-gBjarfqlC7qs0AutpRW/hrFNm+cd2/QKxhwyFa+srbg1oX7rDsEU3l+W7LAUhsAp9mPJMAkXDhLbQaVwEaE8bA==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.1.0", - "commondir": "^1.0.1", - "estree-walker": "^2.0.1", - "glob": "^7.1.6", - "is-reference": "^1.2.1", - "magic-string": "^0.25.7", - "resolve": "^1.17.0" - } - }, - "@rollup/plugin-json": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.1.0.tgz", - "integrity": "sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.0.8" - } - }, - "@rollup/plugin-node-resolve": { - "version": "13.0.4", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.0.4.tgz", - "integrity": "sha512-eYq4TFy40O8hjeDs+sIxEH/jc9lyuI2k9DM557WN6rO5OpnC2qXMBNj4IKH1oHrnAazL49C5p0tgP0/VpqJ+/w==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.1.0", - "@types/resolve": "1.17.1", - "builtin-modules": "^3.1.0", - "deepmerge": "^4.2.2", - "is-module": "^1.0.0", - "resolve": "^1.19.0" - } - }, - "@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", - "dev": true, - "requires": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" - }, - "dependencies": { - "estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", - "dev": true - } - } - }, - "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "dev": true - }, - "@types/babel__core": { - "version": "7.1.16", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.16.tgz", - "integrity": "sha512-EAEHtisTMM+KaKwfWdC3oyllIqswlznXCIVCt7/oRNrh+DhgT4UEBNC/jlADNjvw7UnfbcdkGQcPVZ1xYiLcrQ==", - "dev": true, - "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "@types/babel__generator": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.3.tgz", - "integrity": "sha512-/GWCmzJWqV7diQW54smJZzWbSFf4QYtF71WCKhcx6Ru/tFyQIY2eiiITcCAeuPbNSvT9YCGkVMqqvSk2Z0mXiA==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", - "dev": true, - "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@types/babel__traverse": { - "version": "7.14.2", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.14.2.tgz", - "integrity": "sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA==", - "dev": true, - "requires": { - "@babel/types": "^7.3.0" - } - }, - "@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - }, - "@types/glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA==", - "dev": true, - "requires": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/istanbul-lib-coverage": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", - "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", - "dev": true - }, - "@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "*" - } - }, - "@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", - "dev": true, - "requires": { - "@types/istanbul-lib-report": "*" - } - }, - "@types/jest": { - "version": "27.0.3", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.0.3.tgz", - "integrity": "sha512-cmmwv9t7gBYt7hNKH5Spu7Kuu/DotGa+Ff+JGRKZ4db5eh8PnKS4LuebJ3YLUoyOyIHraTGyULn23YtEAm0VSg==", - "dev": true, - "requires": { - "jest-diff": "^27.0.0", - "pretty-format": "^27.0.0" - } - }, - "@types/js-yaml": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.3.tgz", - "integrity": "sha512-5t9BhoORasuF5uCPr+d5/hdB++zRFUTMIZOzbNkr+jZh3yQht4HYbRDyj9fY8n2TZT30iW9huzav73x4NikqWg==", - "dev": true - }, - "@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", - "dev": true - }, - "@types/minimatch": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", - "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", - "dev": true - }, - "@types/node": { - "version": "16.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.0.tgz", - "integrity": "sha512-nmP+VR4oT0pJUPFbKE4SXj3Yb4Q/kz3M9dSAO1GGMebRKWHQxLfDNmU/yh3xxCJha3N60nQ/JwXWwOE/ZSEVag==", - "dev": true - }, - "@types/node-fetch": { - "version": "2.5.12", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz", - "integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==", - "dev": true, - "requires": { - "@types/node": "*", - "form-data": "^3.0.0" - } - }, - "@types/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", - "dev": true - }, - "@types/prettier": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.2.tgz", - "integrity": "sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==", - "dev": true - }, - "@types/resolve": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", - "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ==", - "dev": true, - "requires": { - "@types/glob": "*", - "@types/node": "*" - } - }, - "@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", - "dev": true - }, - "@types/yargs": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", - "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "@types/yargs-parser": { - "version": "20.2.1", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", - "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", - "dev": true - }, - "@typescript-eslint/eslint-plugin": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.31.0.tgz", - "integrity": "sha512-iPKZTZNavAlOhfF4gymiSuUkgLne/nh5Oz2/mdiUmuZVD42m9PapnCnzjxuDsnpnbH3wT5s2D8bw6S39TC6GNw==", - "dev": true, - "requires": { - "@typescript-eslint/experimental-utils": "4.31.0", - "@typescript-eslint/scope-manager": "4.31.0", - "debug": "^4.3.1", - "functional-red-black-tree": "^1.0.1", - "regexpp": "^3.1.0", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/experimental-utils": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.31.0.tgz", - "integrity": "sha512-Hld+EQiKLMppgKKkdUsLeVIeEOrwKc2G983NmznY/r5/ZtZCDvIOXnXtwqJIgYz/ymsy7n7RGvMyrzf1WaSQrw==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.31.0", - "@typescript-eslint/types": "4.31.0", - "@typescript-eslint/typescript-estree": "4.31.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - } - }, - "@typescript-eslint/parser": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.31.0.tgz", - "integrity": "sha512-oWbzvPh5amMuTmKaf1wp0ySxPt2ZXHnFQBN2Szu1O//7LmOvgaKTCIDNLK2NvzpmVd5A2M/1j/rujBqO37hj3w==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "4.31.0", - "@typescript-eslint/types": "4.31.0", - "@typescript-eslint/typescript-estree": "4.31.0", - "debug": "^4.3.1" - } - }, - "@typescript-eslint/scope-manager": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.31.0.tgz", - "integrity": "sha512-LJ+xtl34W76JMRLjbaQorhR0hfRAlp3Lscdiz9NeI/8i+q0hdBZ7BsiYieLoYWqy+AnRigaD3hUwPFugSzdocg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "4.31.0", - "@typescript-eslint/visitor-keys": "4.31.0" - } - }, - "@typescript-eslint/types": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.31.0.tgz", - "integrity": "sha512-9XR5q9mk7DCXgXLS7REIVs+BaAswfdHhx91XqlJklmqWpTALGjygWVIb/UnLh4NWhfwhR5wNe1yTyCInxVhLqQ==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.31.0.tgz", - "integrity": "sha512-QHl2014t3ptg+xpmOSSPn5hm4mY8D4s97ftzyk9BZ8RxYQ3j73XcwuijnJ9cMa6DO4aLXeo8XS3z1omT9LA/Eg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "4.31.0", - "@typescript-eslint/visitor-keys": "4.31.0", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "4.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.31.0.tgz", - "integrity": "sha512-HUcRp2a9I+P21+O21yu3ezv3GEPGjyGiXoEUQwZXjR8UxRApGeLyWH4ZIIUSalE28aG4YsV6GjtaAVB3QKOu0w==", - "dev": true, - "requires": { - "@typescript-eslint/types": "4.31.0", - "eslint-visitor-keys": "^2.0.0" - } - }, - "@yarn-tool/resolve-package": { - "version": "1.0.47", - "resolved": "https://registry.npmjs.org/@yarn-tool/resolve-package/-/resolve-package-1.0.47.tgz", - "integrity": "sha512-Zaw58gQxjQceJqhqybJi1oUDaORT8i2GTgwICPs8v/X/Pkx35FXQba69ldHVg5pQZ6YLKpROXgyHvBaCJOFXiA==", - "dev": true, - "requires": { - "pkg-dir": "< 6 >= 5", - "tslib": "^2", - "upath2": "^3.1.13" - }, - "dependencies": { - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, - "pkg-dir": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz", - "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==", - "dev": true, - "requires": { - "find-up": "^5.0.0" - } - } - } - }, - "abab": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", - "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", - "dev": true - }, - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true - }, - "acorn-globals": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", - "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", - "dev": true, - "requires": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" - } - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} - }, - "acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", - "dev": true - }, - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "requires": { - "debug": "4" - } - }, - "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } - }, - "ajv": { - "version": "8.6.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", - "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, - "ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "requires": { - "type-fest": "^0.21.3" - }, - "dependencies": { - "type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true - } - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "babel-jest": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.4.2.tgz", - "integrity": "sha512-MADrjb3KBO2eyZCAc6QaJg6RT5u+6oEdDyHO5HEalnpwQ6LrhTsQF2Kj1Wnz2t6UPXIXPk18dSXXOT0wF5yTxA==", - "dev": true, - "requires": { - "@jest/transform": "^27.4.2", - "@jest/types": "^27.4.2", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.0.0", - "babel-preset-jest": "^27.4.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "slash": "^3.0.0" - } - }, - "babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - }, - "dependencies": { - "istanbul-lib-instrument": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.1.0.tgz", - "integrity": "sha512-czwUz525rkOFDJxfKK6mYfIs9zBKILyrZQxjz3ABhjQXhbhFsSbo1HW/BFcsDnfJYJWA6thRR5/TUY2qs5W99Q==", - "dev": true, - "requires": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - } - }, - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true - } - } - }, - "babel-plugin-jest-hoist": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.4.0.tgz", - "integrity": "sha512-Jcu7qS4OX5kTWBc45Hz7BMmgXuJqRnhatqpUhnzGC3OBYpOmf2tv6jFNwZpwM7wU7MUuv2r9IPS/ZlYOuburVw==", - "dev": true, - "requires": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.0.0", - "@types/babel__traverse": "^7.0.6" - } - }, - "babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", - "dev": true, - "requires": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - } - }, - "babel-preset-jest": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.4.0.tgz", - "integrity": "sha512-NK4jGYpnBvNxcGo7/ZpZJr51jCGT+3bwwpVIDY2oNfTxJJldRtB4VAcYdgp1loDE50ODuTu+yBjpMAswv5tlpg==", - "dev": true, - "requires": { - "babel-plugin-jest-hoist": "^27.4.0", - "babel-preset-current-node-syntax": "^1.0.0" - } - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "browser-process-hrtime": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", - "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", - "dev": true - }, - "browserslist": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.18.1.tgz", - "integrity": "sha512-8ScCzdpPwR2wQh8IT82CA2VgDwjHyqMovPBZSNH54+tm4Jk2pCuv90gmAdH6J84OCRWi0b4gMe6O6XPXuJnjgQ==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001280", - "electron-to-chromium": "^1.3.896", - "escalade": "^3.1.1", - "node-releases": "^2.0.1", - "picocolors": "^1.0.0" - } - }, - "bs-logger": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", - "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", - "dev": true, - "requires": { - "fast-json-stable-stringify": "2.x" - } - }, - "bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dev": true, - "requires": { - "node-int64": "^0.4.0" - } - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "builtin-modules": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", - "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", - "dev": true - }, - "call-me-maybe": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30001284", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001284.tgz", - "integrity": "sha512-t28SKa7g6kiIQi6NHeOcKrOrGMzCRrXvlasPwWC26TH2QNdglgzQIRUuJ0cR3NeQPH+5jpuveeeSFDLm2zbkEw==", - "dev": true - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true - }, - "ci-info": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz", - "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", - "dev": true - }, - "cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", - "dev": true - }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true - }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "requires": { - "restore-cursor": "^3.1.0" - } - }, - "cli-truncate": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", - "dev": true, - "requires": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" - } - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, - "collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", - "dev": true - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "colorette": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", - "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", - "dev": true - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.1.0.tgz", - "integrity": "sha512-mf45ldcuHSYShkplHHGKWb4TrmwQadxOn7v4WuhDJy0ZVoY5JFajaRDKD0PNe5qXzBX0rhovjTnP6Kz9LETcuA==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - }, - "dependencies": { - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - } - } - }, - "cosmiconfig": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz", - "integrity": "sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==", - "dev": true, - "requires": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" - } - }, - "create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, - "cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", - "dev": true, - "requires": { - "node-fetch": "2.6.7" - } - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "cssom": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", - "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", - "dev": true - }, - "cssstyle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", - "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", - "dev": true, - "requires": { - "cssom": "~0.3.6" - }, - "dependencies": { - "cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true - } - } - }, - "data-urls": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", - "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", - "dev": true, - "requires": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" - } - }, - "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "decimal.js": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", - "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "dev": true - }, - "dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", - "dev": true - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", - "dev": true - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "dev": true - }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true - }, - "diff-sequences": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.4.0.tgz", - "integrity": "sha512-YqiQzkrsmHMH5uuh8OdQFU9/ZpADnwzml8z0O5HvRNda+5UZsaX/xN+AAxfR2hWq1Y7HZnAzO9J5lJXOuDz2Ww==", - "dev": true - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "domexception": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", - "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", - "dev": true, - "requires": { - "webidl-conversions": "^5.0.0" - }, - "dependencies": { - "webidl-conversions": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", - "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", - "dev": true - } - } - }, - "dtsgenerator": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/dtsgenerator/-/dtsgenerator-3.13.0.tgz", - "integrity": "sha512-jGCEbUAr7sUubmuYHLx2MAEaWc62rWNMav7/+ZEMMPdhvAld6RTQ5EyU9b6OhP9kJo/ZH0vMyeY9xpIEcL8dFg==", - "dev": true, - "requires": { - "commander": "^8.1.0", - "cross-fetch": "^3.1.4", - "debug": "^4.3.2", - "glob": "^7.1.7", - "https-proxy-agent": "^5.0.0", - "js-yaml": "^4.1.0", - "tslib": "^2.3.1", - "typescript": "^4.4.2" - } - }, - "electron-to-chromium": { - "version": "1.4.11", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.11.tgz", - "integrity": "sha512-2OhsaYgsWGhWjx2et8kaUcdktPbBGjKM2X0BReUCKcSCPttEY+hz2zie820JLbttU8jwL92+JJysWwkut3wZgA==", - "dev": true - }, - "emittery": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", - "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "esbuild": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.2.tgz", - "integrity": "sha512-l076A6o/PIgcyM24s0dWmDI/b8RQf41uWoJu9I0M71CtW/YSw5T5NUeXxs5lo2tFQD+O4CW4nBHJXx3OY5NpXg==", - "dev": true, - "requires": { - "esbuild-android-arm64": "0.14.2", - "esbuild-darwin-64": "0.14.2", - "esbuild-darwin-arm64": "0.14.2", - "esbuild-freebsd-64": "0.14.2", - "esbuild-freebsd-arm64": "0.14.2", - "esbuild-linux-32": "0.14.2", - "esbuild-linux-64": "0.14.2", - "esbuild-linux-arm": "0.14.2", - "esbuild-linux-arm64": "0.14.2", - "esbuild-linux-mips64le": "0.14.2", - "esbuild-linux-ppc64le": "0.14.2", - "esbuild-netbsd-64": "0.14.2", - "esbuild-openbsd-64": "0.14.2", - "esbuild-sunos-64": "0.14.2", - "esbuild-windows-32": "0.14.2", - "esbuild-windows-64": "0.14.2", - "esbuild-windows-arm64": "0.14.2" - } - }, - "esbuild-android-arm64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.2.tgz", - "integrity": "sha512-hEixaKMN3XXCkoe+0WcexO4CcBVU5DCSUT+7P8JZiWZCbAjSkc9b6Yz2X5DSfQmRCtI/cQRU6TfMYrMQ5NBfdw==", - "dev": true, - "optional": true - }, - "esbuild-darwin-64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.2.tgz", - "integrity": "sha512-Uq8t0cbJQkxkQdbUfOl2wZqZ/AtLZjvJulR1HHnc96UgyzG9YlCLSDMiqjM+NANEy7/zzvwKJsy3iNC9wwqLJA==", - "dev": true, - "optional": true - }, - "esbuild-darwin-arm64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.2.tgz", - "integrity": "sha512-619MSa17sr7YCIrUj88KzQu2ESA4jKYtIYfLU/smX6qNgxQt3Y/gzM4s6sgJ4fPQzirvmXgcHv1ZNQAs/Xh48A==", - "dev": true, - "optional": true - }, - "esbuild-freebsd-64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.2.tgz", - "integrity": "sha512-aP6FE/ZsChZpUV6F3HE3x1Pz0paoYXycJ7oLt06g0G9dhJKknPawXCqQg/WMyD+ldCEZfo7F1kavenPdIT/SGQ==", - "dev": true, - "optional": true - }, - "esbuild-freebsd-arm64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.2.tgz", - "integrity": "sha512-LSm98WTb1QIhyS83+Po0KTpZNdd2XpVpI9ua5rLWqKWbKeNRFwOsjeiuwBaRNc+O32s9oC2ZMefETxHBV6VNkQ==", - "dev": true, - "optional": true - }, - "esbuild-linux-32": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.2.tgz", - "integrity": "sha512-8VxnNEyeUbiGflTKcuVc5JEPTqXfsx2O6ABwUbfS1Hp26lYPRPC7pKQK5Dxa0MBejGc50jy7YZae3EGQUQ8EkQ==", - "dev": true, - "optional": true - }, - "esbuild-linux-64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.2.tgz", - "integrity": "sha512-4bzMS2dNxOJoFIiHId4w+tqQzdnsch71JJV1qZnbnErSFWcR9lRgpSqWnTTFtv6XM+MvltRzSXC5wQ7AEBY6Hg==", - "dev": true, - "optional": true - }, - "esbuild-linux-arm": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.2.tgz", - "integrity": "sha512-PaylahvMHhH8YMfJPMKEqi64qA0Su+d4FNfHKvlKes/2dUe4QxgbwXT9oLVgy8iJdcFMrO7By4R8fS8S0p8aVQ==", - "dev": true, - "optional": true - }, - "esbuild-linux-arm64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.2.tgz", - "integrity": "sha512-RlIVp0RwJrdtasDF1vTFueLYZ8WuFzxoQ1OoRFZOTyJHCGCNgh7xJIC34gd7B7+RT0CzLBB4LcM5n0LS+hIoww==", - "dev": true, - "optional": true - }, - "esbuild-linux-mips64le": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.2.tgz", - "integrity": "sha512-Fdwrq2roFnO5oetIiUQQueZ3+5soCxBSJswg3MvYaXDomj47BN6oAWMZgLrFh1oVrtWrxSDLCJBenYdbm2s+qQ==", - "dev": true, - "optional": true - }, - "esbuild-linux-ppc64le": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.2.tgz", - "integrity": "sha512-vxptskw8JfCDD9QqpRO0XnsM1osuWeRjPaXX1TwdveLogYsbdFtcuiuK/4FxGiNMUr1ojtnCS2rMPbY8puc5NA==", - "dev": true, - "optional": true - }, - "esbuild-netbsd-64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.2.tgz", - "integrity": "sha512-I8+LzYK5iSNpspS9eCV9sW67Rj8FgMHimGri4mKiGAmN0pNfx+hFX146rYtzGtewuxKtTsPywWteHx+hPRLDsw==", - "dev": true, - "optional": true - }, - "esbuild-openbsd-64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.2.tgz", - "integrity": "sha512-120HgMe9elidWUvM2E6mMf0csrGwx8sYDqUIJugyMy1oHm+/nT08bTAVXuwYG/rkMIqsEO9AlMxuYnwR6En/3Q==", - "dev": true, - "optional": true - }, - "esbuild-sunos-64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.2.tgz", - "integrity": "sha512-Q3xcf9Uyfra9UuCFxoLixVvdigo0daZaKJ97TL2KNA4bxRUPK18wwGUk3AxvgDQZpRmg82w9PnkaNYo7a+24ow==", - "dev": true, - "optional": true - }, - "esbuild-windows-32": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.2.tgz", - "integrity": "sha512-TW7O49tPsrq+N1sW8mb3m24j/iDGa4xzAZH4wHWwoIzgtZAYPKC0hpIhufRRG/LA30bdMChO9pjJZ5mtcybtBQ==", - "dev": true, - "optional": true - }, - "esbuild-windows-64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.2.tgz", - "integrity": "sha512-Rym6ViMNmi1E2QuQMWy0AFAfdY0wGwZD73BnzlsQBX5hZBuy/L+Speh7ucUZ16gwsrMM9v86icZUDrSN/lNBKg==", - "dev": true, - "optional": true - }, - "esbuild-windows-arm64": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.2.tgz", - "integrity": "sha512-ZrLbhr0vX5Em/P1faMnHucjVVWPS+m3tktAtz93WkMZLmbRJevhiW1y4CbulBd2z0MEdXZ6emDa1zFHq5O5bSA==", - "dev": true, - "optional": true - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "escodegen": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", - "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", - "dev": true, - "requires": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "optional": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - } - } - }, - "eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", - "dev": true, - "requires": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.9", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - } - } - }, - "eslint-config-prettier": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", - "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", - "dev": true, - "requires": {} - }, - "eslint-plugin-prettier": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz", - "integrity": "sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==", - "dev": true, - "requires": { - "prettier-linter-helpers": "^1.0.0" - } - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - } - }, - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - }, - "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "dev": true, - "requires": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", - "dev": true - }, - "expect": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/expect/-/expect-27.4.2.tgz", - "integrity": "sha512-BjAXIDC6ZOW+WBFNg96J22D27Nq5ohn+oGcuP2rtOtcjuxNoV9McpQ60PcQWhdFOSBIQdR72e+4HdnbZTFSTyg==", - "dev": true, - "requires": { - "@jest/types": "^27.4.2", - "ansi-styles": "^5.0.0", - "jest-get-type": "^27.4.0", - "jest-matcher-utils": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-regex-util": "^27.4.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", - "dev": true - }, - "fast-glob": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - } - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "fastq": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.12.0.tgz", - "integrity": "sha512-VNX0QkHK3RsXVKr9KrlUv/FoTa0NdbYoHHl7uXHv2rzyHSlxjdNAKug2twd9luJxpcyNeAgf5iPPMutJO67Dfg==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "fb-watchman": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", - "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==", - "dev": true, - "requires": { - "bser": "2.1.1" - } - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", - "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", - "dev": true - }, - "form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "dependencies": { - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true - } - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-own-enumerable-property-symbols": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", - "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", - "dev": true - }, - "get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true - }, - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "globals": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", - "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "globby": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", - "slash": "^3.0.0" - }, - "dependencies": { - "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true - } - } - }, - "graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "html-encoding-sniffer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", - "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", - "dev": true, - "requires": { - "whatwg-encoding": "^1.0.5" - } - }, - "html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", - "dev": true, - "requires": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - } - }, - "https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", - "dev": true, - "requires": { - "agent-base": "6", - "debug": "4" - } - }, - "human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true - }, - "husky": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/husky/-/husky-6.0.0.tgz", - "integrity": "sha512-SQS2gDTB7tBN486QSoKPKQItZw97BMOd+Kdb6ghfpBc0yXyzrddI0oDV5MkDAbuB4X2mO3/nj60TRMcYxwzZeQ==", - "dev": true - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "import-local": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.3.tgz", - "integrity": "sha512-bE9iaUY3CXH8Cwfan/abDKAxe1KGT9kyGsBPqf6DMK/z0a2OzAsrukeYNgIH6cH5Xr452jb1TUL8rSfCLjZ9uA==", - "dev": true, - "requires": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-core-module": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", - "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", - "dev": true - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true - }, - "is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true - }, - "is-reference": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", - "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", - "dev": true, - "requires": { - "@types/estree": "*" - } - }, - "is-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", - "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", - "dev": true - }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", - "dev": true - }, - "istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", - "dev": true, - "requires": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true - } - } - }, - "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - } - }, - "istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "istanbul-reports": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.1.tgz", - "integrity": "sha512-q1kvhAXWSsXfMjCdNHNPKZZv94OlspKnoGv+R9RGbnqOOQ0VbNfLFgQDVgi7hHenKsndGq3/o0OBdzDXthWcNw==", - "dev": true, - "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - } - }, - "jest": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-27.4.3.tgz", - "integrity": "sha512-jwsfVABBzuN3Atm+6h6vIEpTs9+VApODLt4dk2qv1WMOpb1weI1IIZfuwpMiWZ62qvWj78MvdvMHIYdUfqrFaA==", - "dev": true, - "requires": { - "@jest/core": "^27.4.3", - "import-local": "^3.0.2", - "jest-cli": "^27.4.3" - } - }, - "jest-changed-files": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.4.2.tgz", - "integrity": "sha512-/9x8MjekuzUQoPjDHbBiXbNEBauhrPU2ct7m8TfCg69ywt1y/N+yYwGh3gCpnqUS3klYWDU/lSNgv+JhoD2k1A==", - "dev": true, - "requires": { - "@jest/types": "^27.4.2", - "execa": "^5.0.0", - "throat": "^6.0.1" - } - }, - "jest-circus": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.4.2.tgz", - "integrity": "sha512-2ePUSru1BGMyzxsMvRfu+tNb+PW60rUyMLJBfw1Nrh5zC8RoTPfF+zbE0JToU31a6ZVe4nnrNKWYRzlghAbL0A==", - "dev": true, - "requires": { - "@jest/environment": "^27.4.2", - "@jest/test-result": "^27.4.2", - "@jest/types": "^27.4.2", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "expect": "^27.4.2", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.4.2", - "jest-matcher-utils": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-runtime": "^27.4.2", - "jest-snapshot": "^27.4.2", - "jest-util": "^27.4.2", - "pretty-format": "^27.4.2", - "slash": "^3.0.0", - "stack-utils": "^2.0.3", - "throat": "^6.0.1" - } - }, - "jest-cli": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.4.3.tgz", - "integrity": "sha512-zZSJBXNC/i8UnJPwcKWsqnhGgIF3uoTYP7th32Zej7KNQJdxzOMj+wCfy2Ox3kU7nXErJ36DtYyXDhfiqaiDRw==", - "dev": true, - "requires": { - "@jest/core": "^27.4.3", - "@jest/test-result": "^27.4.2", - "@jest/types": "^27.4.2", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "import-local": "^3.0.2", - "jest-config": "^27.4.3", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", - "prompts": "^2.0.1", - "yargs": "^16.2.0" - }, - "dependencies": { - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - } - } - }, - "jest-config": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.4.3.tgz", - "integrity": "sha512-DQ10HTSqYtC2pO7s9j2jw+li4xUnm2wLYWH2o7K1ftB8NyvToHsXoLlXxtsGh3AW9gUQR6KY/4B7G+T/NswJBw==", - "dev": true, - "requires": { - "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^27.4.2", - "@jest/types": "^27.4.2", - "babel-jest": "^27.4.2", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.1", - "graceful-fs": "^4.2.4", - "jest-circus": "^27.4.2", - "jest-environment-jsdom": "^27.4.3", - "jest-environment-node": "^27.4.2", - "jest-get-type": "^27.4.0", - "jest-jasmine2": "^27.4.2", - "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.2", - "jest-runner": "^27.4.3", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", - "micromatch": "^4.0.4", - "pretty-format": "^27.4.2", - "slash": "^3.0.0" - } - }, - "jest-diff": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.4.2.tgz", - "integrity": "sha512-ujc9ToyUZDh9KcqvQDkk/gkbf6zSaeEg9AiBxtttXW59H/AcqEYp1ciXAtJp+jXWva5nAf/ePtSsgWwE5mqp4Q==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^27.4.0", - "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.2" - } - }, - "jest-docblock": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.4.0.tgz", - "integrity": "sha512-7TBazUdCKGV7svZ+gh7C8esAnweJoG+SvcF6Cjqj4l17zA2q1cMwx2JObSioubk317H+cjcHgP+7fTs60paulg==", - "dev": true, - "requires": { - "detect-newline": "^3.0.0" - } - }, - "jest-each": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.4.2.tgz", - "integrity": "sha512-53V2MNyW28CTruB3lXaHNk6PkiIFuzdOC9gR3C6j8YE/ACfrPnz+slB0s17AgU1TtxNzLuHyvNlLJ+8QYw9nBg==", - "dev": true, - "requires": { - "@jest/types": "^27.4.2", - "chalk": "^4.0.0", - "jest-get-type": "^27.4.0", - "jest-util": "^27.4.2", - "pretty-format": "^27.4.2" - } - }, - "jest-environment-jsdom": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.4.3.tgz", - "integrity": "sha512-x1AUVz3G14LpEJs7KIFUaTINT2n0unOUmvdAby3s/sldUpJJetOJifHo1O/EUQC5fNBowggwJbVulko18y6OWw==", - "dev": true, - "requires": { - "@jest/environment": "^27.4.2", - "@jest/fake-timers": "^27.4.2", - "@jest/types": "^27.4.2", - "@types/node": "*", - "jest-mock": "^27.4.2", - "jest-util": "^27.4.2", - "jsdom": "^16.6.0" - } - }, - "jest-environment-node": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.4.2.tgz", - "integrity": "sha512-nzTZ5nJ+FabuZPH2YVci7SZIHpvtNRHPt8+vipLkCnAgXGjVzHm7XJWdnNqXbAkExIgiKeVEkVMNZOZE/LeiIg==", - "dev": true, - "requires": { - "@jest/environment": "^27.4.2", - "@jest/fake-timers": "^27.4.2", - "@jest/types": "^27.4.2", - "@types/node": "*", - "jest-mock": "^27.4.2", - "jest-util": "^27.4.2" - } - }, - "jest-get-type": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.4.0.tgz", - "integrity": "sha512-tk9o+ld5TWq41DkK14L4wox4s2D9MtTpKaAVzXfr5CUKm5ZK2ExcaFE0qls2W71zE/6R2TxxrK9w2r6svAFDBQ==", - "dev": true - }, - "jest-haste-map": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.4.2.tgz", - "integrity": "sha512-foiyAEePORUN2eeJnOtcM1y8qW0ShEd9kTjWVL4sVaMcuCJM6gtHegvYPBRT0mpI/bs4ueThM90+Eoj2ncoNsA==", - "dev": true, - "requires": { - "@jest/types": "^27.4.2", - "@types/graceful-fs": "^4.1.2", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "fsevents": "^2.3.2", - "graceful-fs": "^4.2.4", - "jest-regex-util": "^27.4.0", - "jest-serializer": "^27.4.0", - "jest-util": "^27.4.2", - "jest-worker": "^27.4.2", - "micromatch": "^4.0.4", - "walker": "^1.0.7" - }, - "dependencies": { - "jest-worker": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.2.tgz", - "integrity": "sha512-0QMy/zPovLfUPyHuOuuU4E+kGACXXE84nRnq6lBVI9GJg5DCBiA97SATi+ZP8CpiJwEQy1oCPjRBf8AnLjN+Ag==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - } - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "jest-jasmine2": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.4.2.tgz", - "integrity": "sha512-VO/fyAJSH9u0THjbteFiL8qc93ufU+yW+bdieDc8tzTCWwlWzO53UHS5nFK1qmE8izb5Smkn+XHlVt6/l06MKQ==", - "dev": true, - "requires": { - "@babel/traverse": "^7.1.0", - "@jest/environment": "^27.4.2", - "@jest/source-map": "^27.4.0", - "@jest/test-result": "^27.4.2", - "@jest/types": "^27.4.2", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "expect": "^27.4.2", - "is-generator-fn": "^2.0.0", - "jest-each": "^27.4.2", - "jest-matcher-utils": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-runtime": "^27.4.2", - "jest-snapshot": "^27.4.2", - "jest-util": "^27.4.2", - "pretty-format": "^27.4.2", - "throat": "^6.0.1" - } - }, - "jest-leak-detector": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.4.2.tgz", - "integrity": "sha512-ml0KvFYZllzPBJWDei3mDzUhyp/M4ubKebX++fPaudpe8OsxUE+m+P6ciVLboQsrzOCWDjE20/eXew9QMx/VGw==", - "dev": true, - "requires": { - "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.2" - } - }, - "jest-matcher-utils": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.4.2.tgz", - "integrity": "sha512-jyP28er3RRtMv+fmYC/PKG8wvAmfGcSNproVTW2Y0P/OY7/hWUOmsPfxN1jOhM+0u2xU984u2yEagGivz9OBGQ==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "jest-diff": "^27.4.2", - "jest-get-type": "^27.4.0", - "pretty-format": "^27.4.2" - } - }, - "jest-message-util": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.4.2.tgz", - "integrity": "sha512-OMRqRNd9E0DkBLZpFtZkAGYOXl6ZpoMtQJWTAREJKDOFa0M6ptB7L67tp+cszMBkvSgKOhNtQp2Vbcz3ZZKo/w==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^27.4.2", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "micromatch": "^4.0.4", - "pretty-format": "^27.4.2", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.0.tgz", - "integrity": "sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==", - "dev": true, - "requires": { - "@babel/highlight": "^7.16.0" - } - } - } - }, - "jest-mock": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.4.2.tgz", - "integrity": "sha512-PDDPuyhoukk20JrQKeofK12hqtSka7mWH0QQuxSNgrdiPsrnYYLS6wbzu/HDlxZRzji5ylLRULeuI/vmZZDrYA==", - "dev": true, - "requires": { - "@jest/types": "^27.4.2", - "@types/node": "*" - } - }, - "jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true, - "requires": {} - }, - "jest-regex-util": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.4.0.tgz", - "integrity": "sha512-WeCpMpNnqJYMQoOjm1nTtsgbR4XHAk1u00qDoNBQoykM280+/TmgA5Qh5giC1ecy6a5d4hbSsHzpBtu5yvlbEg==", - "dev": true - }, - "jest-resolve": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.4.2.tgz", - "integrity": "sha512-d/zqPjxCzMqHlOdRTg8cTpO9jY+1/T74KazT8Ws/LwmwxV5sRMWOkiLjmzUCDj/5IqA5XHNK4Hkmlq9Kdpb9Sg==", - "dev": true, - "requires": { - "@jest/types": "^27.4.2", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", - "resolve": "^1.20.0", - "resolve.exports": "^1.1.0", - "slash": "^3.0.0" - } - }, - "jest-resolve-dependencies": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.4.2.tgz", - "integrity": "sha512-hb++cTpqvOWfU49MCP/JQkxmnrhKoAVqXWFjgYXswRSVGk8Q6bDTSvhbCeYXDtXaymY0y7WrrSIlKogClcKJuw==", - "dev": true, - "requires": { - "@jest/types": "^27.4.2", - "jest-regex-util": "^27.4.0", - "jest-snapshot": "^27.4.2" - } - }, - "jest-runner": { - "version": "27.4.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.4.3.tgz", - "integrity": "sha512-JgR6Om/j22Fd6ZUUIGTWNcCtuZVYbNrecb4k89W4UyFJoRtHpo2zMKWkmFFFJoqwWGrfrcPLnVBIgkJiTV3cyA==", - "dev": true, - "requires": { - "@jest/console": "^27.4.2", - "@jest/environment": "^27.4.2", - "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", - "@jest/types": "^27.4.2", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.8.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-docblock": "^27.4.0", - "jest-environment-jsdom": "^27.4.3", - "jest-environment-node": "^27.4.2", - "jest-haste-map": "^27.4.2", - "jest-leak-detector": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-resolve": "^27.4.2", - "jest-runtime": "^27.4.2", - "jest-util": "^27.4.2", - "jest-worker": "^27.4.2", - "source-map-support": "^0.5.6", - "throat": "^6.0.1" - }, - "dependencies": { - "jest-worker": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.4.2.tgz", - "integrity": "sha512-0QMy/zPovLfUPyHuOuuU4E+kGACXXE84nRnq6lBVI9GJg5DCBiA97SATi+ZP8CpiJwEQy1oCPjRBf8AnLjN+Ag==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - } - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "jest-runtime": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.4.2.tgz", - "integrity": "sha512-eqPgcBaUNaw6j8T5M+dnfAEh6MIrh2YmtskCr9sl50QYpD22Sg+QqHw3J3nmaLzVMbBtOMHFFxLF0Qx8MsZVFQ==", - "dev": true, - "requires": { - "@jest/console": "^27.4.2", - "@jest/environment": "^27.4.2", - "@jest/globals": "^27.4.2", - "@jest/source-map": "^27.4.0", - "@jest/test-result": "^27.4.2", - "@jest/transform": "^27.4.2", - "@jest/types": "^27.4.2", - "@types/yargs": "^16.0.0", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "execa": "^5.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-mock": "^27.4.2", - "jest-regex-util": "^27.4.0", - "jest-resolve": "^27.4.2", - "jest-snapshot": "^27.4.2", - "jest-util": "^27.4.2", - "jest-validate": "^27.4.2", - "slash": "^3.0.0", - "strip-bom": "^4.0.0", - "yargs": "^16.2.0" - }, - "dependencies": { - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - } - } - }, - "jest-serializer": { - "version": "27.4.0", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.4.0.tgz", - "integrity": "sha512-RDhpcn5f1JYTX2pvJAGDcnsNTnsV9bjYPU8xcV+xPwOXnUPOQwf4ZEuiU6G9H1UztH+OapMgu/ckEVwO87PwnQ==", - "dev": true, - "requires": { - "@types/node": "*", - "graceful-fs": "^4.2.4" - } - }, - "jest-snapshot": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.4.2.tgz", - "integrity": "sha512-DI7lJlNIu6WSQ+esqhnJzEzU70+dV+cNjoF1c+j5FagWEd3KtOyZvVliAH0RWNQ6KSnAAnKSU0qxJ8UXOOhuUQ==", - "dev": true, - "requires": { - "@babel/core": "^7.7.2", - "@babel/generator": "^7.7.2", - "@babel/parser": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.0.0", - "@jest/transform": "^27.4.2", - "@jest/types": "^27.4.2", - "@types/babel__traverse": "^7.0.4", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^27.4.2", - "graceful-fs": "^4.2.4", - "jest-diff": "^27.4.2", - "jest-get-type": "^27.4.0", - "jest-haste-map": "^27.4.2", - "jest-matcher-utils": "^27.4.2", - "jest-message-util": "^27.4.2", - "jest-resolve": "^27.4.2", - "jest-util": "^27.4.2", - "natural-compare": "^1.4.0", - "pretty-format": "^27.4.2", - "semver": "^7.3.2" - } - }, - "jest-util": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.4.2.tgz", - "integrity": "sha512-YuxxpXU6nlMan9qyLuxHaMMOzXAl5aGZWCSzben5DhLHemYQxCc4YK+4L3ZrCutT8GPQ+ui9k5D8rUJoDioMnA==", - "dev": true, - "requires": { - "@jest/types": "^27.4.2", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.4", - "picomatch": "^2.2.3" - } - }, - "jest-validate": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.4.2.tgz", - "integrity": "sha512-hWYsSUej+Fs8ZhOm5vhWzwSLmVaPAxRy+Mr+z5MzeaHm9AxUpXdoVMEW4R86y5gOobVfBsMFLk4Rb+QkiEpx1A==", - "dev": true, - "requires": { - "@jest/types": "^27.4.2", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^27.4.0", - "leven": "^3.1.0", - "pretty-format": "^27.4.2" - }, - "dependencies": { - "camelcase": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz", - "integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==", - "dev": true - } - } - }, - "jest-watcher": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.4.2.tgz", - "integrity": "sha512-NJvMVyyBeXfDezhWzUOCOYZrUmkSCiatpjpm+nFUid74OZEHk6aMLrZAukIiFDwdbqp6mTM6Ui1w4oc+8EobQg==", - "dev": true, - "requires": { - "@jest/test-result": "^27.4.2", - "@jest/types": "^27.4.2", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "jest-util": "^27.4.2", - "string-length": "^4.0.1" - } - }, - "jest-worker": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", - "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "requires": { - "argparse": "^2.0.1" - } - }, - "jsdom": { - "version": "16.7.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", - "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", - "dev": true, - "requires": { - "abab": "^2.0.5", - "acorn": "^8.2.4", - "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", - "cssstyle": "^2.3.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.1", - "domexception": "^2.0.1", - "escodegen": "^2.0.0", - "form-data": "^3.0.0", - "html-encoding-sniffer": "^2.0.1", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.5.0", - "ws": "^7.4.6", - "xml-name-validator": "^3.0.0" - }, - "dependencies": { - "acorn": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", - "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", - "dev": true - } - } - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true - }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - }, - "dependencies": { - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true - } - } - }, - "kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true - }, - "leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", - "dev": true - }, - "lint-staged": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-11.0.0.tgz", - "integrity": "sha512-3rsRIoyaE8IphSUtO1RVTFl1e0SLBtxxUOPBtHxQgBHS5/i6nqvjcUfNioMa4BU9yGnPzbO+xkfLtXtxBpCzjw==", - "dev": true, - "requires": { - "chalk": "^4.1.1", - "cli-truncate": "^2.1.0", - "commander": "^7.2.0", - "cosmiconfig": "^7.0.0", - "debug": "^4.3.1", - "dedent": "^0.7.0", - "enquirer": "^2.3.6", - "execa": "^5.0.0", - "listr2": "^3.8.2", - "log-symbols": "^4.1.0", - "micromatch": "^4.0.4", - "normalize-path": "^3.0.0", - "please-upgrade-node": "^3.2.0", - "string-argv": "0.3.1", - "stringify-object": "^3.3.0" - }, - "dependencies": { - "commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true - } - } - }, - "listr2": { - "version": "3.11.1", - "resolved": "https://registry.npmjs.org/listr2/-/listr2-3.11.1.tgz", - "integrity": "sha512-ZXQvQfmH9iWLlb4n3hh31yicXDxlzB0pE7MM1zu6kgbVL4ivEsO4H8IPh4E682sC8RjnYO9anose+zT52rrpyg==", - "dev": true, - "requires": { - "cli-truncate": "^2.1.0", - "colorette": "^1.2.2", - "log-update": "^4.0.0", - "p-map": "^4.0.0", - "rxjs": "^6.6.7", - "through": "^2.3.8", - "wrap-ansi": "^7.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", - "dev": true - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", - "dev": true - }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - } - }, - "log-update": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", - "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", - "dev": true, - "requires": { - "ansi-escapes": "^4.3.0", - "cli-cursor": "^3.1.0", - "slice-ansi": "^4.0.0", - "wrap-ansi": "^6.2.0" - }, - "dependencies": { - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - } - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - } - } - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "magic-string": { - "version": "0.25.7", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", - "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", - "dev": true, - "requires": { - "sourcemap-codec": "^1.4.4" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true - } - } - }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, - "makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "requires": { - "tmpl": "1.0.5" - } - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - } - }, - "mime-db": { - "version": "1.49.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", - "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==", - "dev": true - }, - "mime-types": { - "version": "2.1.32", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", - "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", - "dev": true, - "requires": { - "mime-db": "1.49.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", - "dev": true - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dev": true, - "requires": { - "whatwg-url": "^5.0.0" - }, - "dependencies": { - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - } - } - }, - "node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", - "dev": true - }, - "node-modules-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", - "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", - "dev": true - }, - "node-releases": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", - "integrity": "sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==", - "dev": true - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "nwsapi": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", - "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, - "parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-is-network-drive": { - "version": "1.0.20", - "resolved": "https://registry.npmjs.org/path-is-network-drive/-/path-is-network-drive-1.0.20.tgz", - "integrity": "sha512-p5wCWlRB4+ggzxWshqHH9aF3kAuVu295NaENXmVhThbZPJQBeJdxZTP6CIoUR+kWHDUW56S9YcaO1gXnc/BOxw==", - "dev": true, - "requires": { - "tslib": "^2" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "path-strip-sep": { - "version": "1.0.17", - "resolved": "https://registry.npmjs.org/path-strip-sep/-/path-strip-sep-1.0.17.tgz", - "integrity": "sha512-+2zIC2fNgdilgV7pTrktY6oOxxZUo9x5zJYfTzxsGze5kSGDDwhA5/0WlBn+sUyv/WuuyYn3OfM+Ue5nhdQUgA==", - "dev": true, - "requires": { - "tslib": "^2" - } - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true - }, - "pirates": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", - "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", - "dev": true, - "requires": { - "node-modules-regexp": "^1.0.0" - } - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "please-upgrade-node": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", - "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", - "dev": true, - "requires": { - "semver-compare": "^1.0.0" - } - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true - }, - "prettier": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.0.tgz", - "integrity": "sha512-DsEPLY1dE5HF3BxCRBmD4uYZ+5DCbvatnolqTqcxEgKVZnL2kUfyu7b8pPQ5+hTBkdhU9SLUmK0/pHb07RE4WQ==", - "dev": true - }, - "prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "requires": { - "fast-diff": "^1.1.2" - } - }, - "pretty-format": { - "version": "27.4.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.4.2.tgz", - "integrity": "sha512-p0wNtJ9oLuvgOQDEIZ9zQjZffK7KtyR6Si0jnXULIDwrlNF8Cuir3AZP0hHv0jmKuNN/edOnbMjnzd4uTcmWiw==", - "dev": true, - "requires": { - "@jest/types": "^27.4.2", - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } - } - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, - "prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "requires": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - } - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "dev": true - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "dev": true - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" - }, - "requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true - }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "requires": { - "resolve-from": "^5.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "resolve.exports": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz", - "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", - "dev": true - }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "rollup": { - "version": "2.56.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.56.3.tgz", - "integrity": "sha512-Au92NuznFklgQCUcV96iXlxUbHuB1vQMaH76DHl5M11TotjOHwqk9CwcrT78+Tnv4FN9uTBxq6p4EJoYkpyekg==", - "dev": true, - "requires": { - "fsevents": "~2.3.2" - } - }, - "rollup-plugin-sourcemaps": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/rollup-plugin-sourcemaps/-/rollup-plugin-sourcemaps-0.6.3.tgz", - "integrity": "sha512-paFu+nT1xvuO1tPFYXGe+XnQvg4Hjqv/eIhG8i5EspfYYPBKL57X7iVbfv55aNVASg3dzWvES9dmWsL2KhfByw==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.0.9", - "source-map-resolve": "^0.6.0" - } - }, - "rollup-plugin-terser": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", - "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "jest-worker": "^26.2.1", - "serialize-javascript": "^4.0.0", - "terser": "^5.0.0" - } - }, - "rollup-plugin-typescript2": { - "version": "0.31.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.31.2.tgz", - "integrity": "sha512-hRwEYR1C8xDGVVMFJQdEVnNAeWRvpaY97g5mp3IeLnzhNXzSVq78Ye/BJ9PAaUfN4DXa/uDnqerifMOaMFY54Q==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^4.1.2", - "@yarn-tool/resolve-package": "^1.0.40", - "find-cache-dir": "^3.3.2", - "fs-extra": "^10.0.0", - "resolve": "^1.20.0", - "tslib": "^2.3.1" - }, - "dependencies": { - "@rollup/pluginutils": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", - "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", - "dev": true, - "requires": { - "estree-walker": "^2.0.1", - "picomatch": "^2.2.2" - } - } - } - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "requires": { - "queue-microtask": "^1.2.2" - } - }, - "rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "saxes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", - "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", - "dev": true, - "requires": { - "xmlchars": "^2.2.0" - } - }, - "semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", - "dev": true - }, - "serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", - "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, - "shx": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz", - "integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==", - "dev": true, - "requires": { - "minimist": "^1.2.3", - "shelljs": "^0.8.5" - } - }, - "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", - "dev": true - }, - "sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "slice-ansi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - } - }, - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true - }, - "source-map-resolve": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", - "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", - "dev": true, - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0" - } - }, - "source-map-support": { - "version": "0.5.20", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", - "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "stack-utils": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", - "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", - "dev": true, - "requires": { - "escape-string-regexp": "^2.0.0" - }, - "dependencies": { - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true - } - } - }, - "string-argv": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", - "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", - "dev": true - }, - "string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dev": true, - "requires": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - } - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "stringify-object": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", - "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", - "dev": true, - "requires": { - "get-own-enumerable-property-symbols": "^3.0.0", - "is-obj": "^1.0.1", - "is-regexp": "^1.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "supports-hyperlinks": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", - "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", - "dev": true, - "requires": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - } - }, - "symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true - }, - "table": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", - "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", - "dev": true, - "requires": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - } - } - } - }, - "terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - } - }, - "terser": { - "version": "5.16.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.16.1.tgz", - "integrity": "sha512-xvQfyfA1ayT0qdK47zskQgRZeWLoOQ8JQ6mIgRGVNwZKdQMU+5FkCBjmv4QjcrTzyZquRw2FVtlJSRUmMKQslw==", - "dev": true, - "requires": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "dependencies": { - "acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - } - } - }, - "test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "requires": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", - "dev": true - }, - "throat": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", - "integrity": "sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", - "dev": true, - "requires": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - } - }, - "tr46": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", - "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", - "dev": true, - "requires": { - "punycode": "^2.1.1" - } - }, - "ts-jest": { - "version": "27.1.0", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.0.tgz", - "integrity": "sha512-ZouWlP03JMtzfNHg0ZeDrxAESYGmVhWyHtIl2/01kBbXaMbTr4Vhv6/GeMxUed6GFg/4ycMo+yU6Eo9gI16xTQ==", - "dev": true, - "requires": { - "bs-logger": "0.x", - "esbuild": "~0.14.0", - "fast-json-stable-stringify": "2.x", - "jest-util": "^27.0.0", - "json5": "2.x", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "20.x" - } - }, - "ts-node": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", - "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", - "dev": true, - "requires": { - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "source-map-support": "^0.5.17", - "yn": "3.1.1" - } - }, - "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true - }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } - } - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "requires": { - "is-typedarray": "^1.0.0" - } - }, - "typescript": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.2.tgz", - "integrity": "sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ==", - "dev": true - }, - "universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "dev": true - }, - "upath2": { - "version": "3.1.19", - "resolved": "https://registry.npmjs.org/upath2/-/upath2-3.1.19.tgz", - "integrity": "sha512-d23dQLi8nDWSRTIQwXtaYqMrHuca0As53fNiTLLFDmsGBbepsZepISaB2H1x45bDFN/n3Qw9bydvyZEacTrEWQ==", - "dev": true, - "requires": { - "@types/node": "*", - "path-is-network-drive": "^1.0.20", - "path-strip-sep": "^1.0.17", - "tslib": "^2" - } - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { - "punycode": "^2.1.0" - } - }, - "url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "dev": true, - "requires": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "v8-to-istanbul": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.0.tgz", - "integrity": "sha512-/PRhfd8aTNp9Ggr62HPzXg2XasNFGy5PBt0Rp04du7/8GNNSgxFL6WBTkgMKSL9bFjH+8kKEG3f37FmxiTqUUA==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0", - "source-map": "^0.7.3" - } - }, - "w3c-hr-time": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", - "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", - "dev": true, - "requires": { - "browser-process-hrtime": "^1.0.0" - } - }, - "w3c-xmlserializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", - "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", - "dev": true, - "requires": { - "xml-name-validator": "^3.0.0" - } - }, - "walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "requires": { - "makeerror": "1.0.12" - } - }, - "webidl-conversions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", - "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", - "dev": true - }, - "whatwg-encoding": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", - "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", - "dev": true, - "requires": { - "iconv-lite": "0.4.24" - } - }, - "whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", - "dev": true - }, - "whatwg-url": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", - "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", - "dev": true, - "requires": { - "lodash": "^4.7.0", - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "ws": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", - "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", - "dev": true, - "requires": {} - }, - "xml-name-validator": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", - "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", - "dev": true - }, - "xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "dev": true - }, - "yargs": { - "version": "17.1.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.1.1.tgz", - "integrity": "sha512-c2k48R0PwKIqKhPMWjeiF6y2xY/gPMUlro0sgxqXpbOIohWiLNXWslsootttv7E1e73QPAMQSg5FeySbVcpsPQ==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - }, - "yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true - }, - "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true - }, - "yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true - } } } diff --git a/package.json b/package.json index e5f7e1e0..f87bdb0d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "@serverlessworkflow/sdk-typescript", - "version": "4.0.0", - "schemaVersion": "0.8", + "name": "@serverless-workflow/sdk", + "version": "1.0.0-alpha2.0", + "schemaVersion": "1.0.0-alpha2", "description": "Typescript SDK for Serverless Workflow Specification", "main": "umd/index.umd.min.js", "browser": "umd/index.umd.min.js", @@ -20,7 +20,7 @@ "tools:generate-merged_json": "npx ts-node --project ./tools/tsconfig.json ./tools/generate-merged_json.ts", "tools:generate-definitions": "npx ts-node --project ./tools/tsconfig.json ./tools/generate-definitions.ts", "tools:generate-builders": "npx ts-node --project ./tools/tsconfig.json ./tools/generate-builders.ts", - "update-code-base": "npm run tools:download-schemas && tools:generate-merged_json && npm run tools:generate-definitions && npm run tools:generate-builders && npm run format && npm run test", + "update-code-base": "npm run tools:download-schemas && npm run tools:generate-definitions && npm run tools:generate-builders && npm run format && npm run test", "format": "npx prettier --write \"**/*.ts\"", "lint": "npx eslint . --ext .ts && npx prettier --check \"**/*.ts\"", "pretest": "npx rimraf out-tsc", @@ -34,45 +34,45 @@ "prepublish": "husky install" }, "dependencies": { - "ajv": "^8.1.0", + "ajv": "^8.17.1", "js-yaml": "^4.1.0" }, "devDependencies": { - "@apidevtools/json-schema-ref-parser": "^9.0.7", - "@dtsgenerator/replace-namespace": "^1.4.1", - "@rollup/plugin-commonjs": "^19.0.0", - "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-node-resolve": "^13.0.0", - "@types/jest": "^27.0.3", - "@types/js-yaml": "^4.0.1", - "@types/node-fetch": "^2.5.10", - "@types/rimraf": "^3.0.0", - "@types/yargs": "^16.0.1", - "@typescript-eslint/eslint-plugin": "^4.23.0", - "@typescript-eslint/parser": "^4.23.0", - "dtsgenerator": "^3.10.0", - "eslint": "^7.26.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-prettier": "^3.4.0", - "husky": "6.0.0", - "jest": "^27.4.3", - "lint-staged": "11.0.0", - "node-fetch": "^2.6.1", - "prettier": "^2.3.0", - "rimraf": "^3.0.2", - "rollup": "^2.47.0", + "@apidevtools/json-schema-ref-parser": "^11.6.4", + "@rollup/plugin-commonjs": "^26.0.1", + "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^15.2.3", + "@types/jest": "^29.5.12", + "@types/js-yaml": "^4.0.9", + "@types/node-fetch": "^2.6.11", + "@types/rimraf": "^4.0.5", + "@types/yargs": "^17.0.32", + "@typescript-eslint/eslint-plugin": "^7.16.1", + "@typescript-eslint/parser": "^7.16.1", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.1.3", + "husky": "^9.0.11", + "jest": "^29.7.0", + "json-schema-to-typescript": "^14.1.0", + "lint-staged": "^15.2.7", + "node-fetch": "^3.3.2", + "prettier": "^3.3.3", + "rimraf": "^6.0.1", + "rollup": "^2.79.1", "rollup-plugin-sourcemaps": "^0.6.3", "rollup-plugin-terser": "^7.0.2", - "rollup-plugin-typescript2": "^0.31.0", + "rollup-plugin-typescript2": "^0.36.0", "shx": "^0.3.4", - "ts-jest": "^27.1.0", - "ts-node": "^9.1.1", - "typescript": "^4.2.4", - "yargs": "^17.0.1" + "ts-jest": "^29.2.2", + "ts-morph": "^23.0.0", + "ts-node": "^10.9.2", + "typescript": "^5.5.3", + "yargs": "^17.7.2" }, "repository": { "type": "git", - "url": "https://github.com/serverlessworkflow/sdk-typescript.git" + "url": "https://github.com/serverless-workflow/sdk.git" }, "author": { "name": "Serverless Workflow Contributors", @@ -80,11 +80,11 @@ }, "license": "http://www.apache.org/licenses/LICENSE-2.0.txt", "bugs": { - "url": "https://github.com/serverlessworkflow/sdk-typescript/issues" + "url": "https://github.com/serverless-workflow/sdk/issues" }, "homepage": "https://serverlessworkflow.io", "engines": { - "node": ">=15.0", - "npm": ">=7.0.0" + "node": ">=20.0", + "npm": ">=10.0.0" } } diff --git a/src/index.ts b/src/index.ts index bacbdc60..24aa0121 100644 --- a/src/index.ts +++ b/src/index.ts @@ -13,6 +13,3 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -export * from './serverless-workflow-sdk'; -export * from './lib/diagram'; diff --git a/src/lib/builder.ts b/src/lib/builder.ts deleted file mode 100644 index 50347298..00000000 --- a/src/lib/builder.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Represents a builder proxy - */ -export type Builder = { - build: () => T; -} & { - [k in T extends T ? keyof T : never]-?: (arg: T[k]) => Builder; -}; - -/** - * A factory for builders that proxy properties assignations and validate against schema on build - * @param {Function} buildingFn The function used to validate and produce the object on build() - * @returns {Builder} A builder proxy - */ -export function builder(buildingFn?: (data: Partial) => () => T): Builder { - const data: Partial = {}; - const defaultBuildingFn = - (data: Partial): (() => T) => - () => - data as T; - const proxy = new Proxy({} as Builder, { - get: (_, prop) => { - if (prop === 'build') { - return (buildingFn || defaultBuildingFn)(data); - } - return (value: unknown): Builder => { - (data as any)[prop.toString()] = value; - return proxy; - }; - }, - set: () => { - return false; - }, - }); - return proxy; -} diff --git a/src/lib/builders/action-builder.ts b/src/lib/builders/action-builder.ts deleted file mode 100644 index 9a9b52af..00000000 --- a/src/lib/builders/action-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Action} data The underlying object - * @returns {Specification.Action} The validated underlying object - */ -function actionBuildingFn(data: Specification.Action): () => Specification.Action { - return () => { - const model = new Specification.Action(data); - - validate('Action', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Action` - * @returns {Specification.Action} A builder for `Specification.Action` - */ -export function actionBuilder(): Builder { - return builder(actionBuildingFn); -} diff --git a/src/lib/builders/actiondatafilter-builder.ts b/src/lib/builders/actiondatafilter-builder.ts deleted file mode 100644 index cd2278be..00000000 --- a/src/lib/builders/actiondatafilter-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Actiondatafilter} data The underlying object - * @returns {Specification.Actiondatafilter} The validated underlying object - */ -function actiondatafilterBuildingFn(data: Specification.Actiondatafilter): () => Specification.Actiondatafilter { - return () => { - const model = new Specification.Actiondatafilter(data); - - validate('Actiondatafilter', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Actiondatafilter` - * @returns {Specification.Actiondatafilter} A builder for `Specification.Actiondatafilter` - */ -export function actiondatafilterBuilder(): Builder { - return builder(actiondatafilterBuildingFn); -} diff --git a/src/lib/builders/authdef-builder.ts b/src/lib/builders/authdef-builder.ts deleted file mode 100644 index 4cbd7113..00000000 --- a/src/lib/builders/authdef-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Authdef} data The underlying object - * @returns {Specification.Authdef} The validated underlying object - */ -function authdefBuildingFn(data: Specification.Authdef): () => Specification.Authdef { - return () => { - const model = new Specification.Authdef(data); - - validate('Authdef', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Authdef` - * @returns {Specification.Authdef} A builder for `Specification.Authdef` - */ -export function authdefBuilder(): Builder { - return builder(authdefBuildingFn); -} diff --git a/src/lib/builders/basicpropsdef-builder.ts b/src/lib/builders/basicpropsdef-builder.ts deleted file mode 100644 index 49c359cf..00000000 --- a/src/lib/builders/basicpropsdef-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Basicpropsdef} data The underlying object - * @returns {Specification.Basicpropsdef} The validated underlying object - */ -function basicpropsdefBuildingFn(data: Specification.Basicpropsdef): () => Specification.Basicpropsdef { - return () => { - const model = new Specification.Basicpropsdef(data); - - validate('Basicpropsdef', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Basicpropsdef` - * @returns {Specification.Basicpropsdef} A builder for `Specification.Basicpropsdef` - */ -export function basicpropsdefBuilder(): Builder { - return builder(basicpropsdefBuildingFn); -} diff --git a/src/lib/builders/bearerpropsdef-builder.ts b/src/lib/builders/bearerpropsdef-builder.ts deleted file mode 100644 index 6c372fdc..00000000 --- a/src/lib/builders/bearerpropsdef-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Bearerpropsdef} data The underlying object - * @returns {Specification.Bearerpropsdef} The validated underlying object - */ -function bearerpropsdefBuildingFn(data: Specification.Bearerpropsdef): () => Specification.Bearerpropsdef { - return () => { - const model = new Specification.Bearerpropsdef(data); - - validate('Bearerpropsdef', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Bearerpropsdef` - * @returns {Specification.Bearerpropsdef} A builder for `Specification.Bearerpropsdef` - */ -export function bearerpropsdefBuilder(): Builder { - return builder(bearerpropsdefBuildingFn); -} diff --git a/src/lib/builders/branch-builder.ts b/src/lib/builders/branch-builder.ts deleted file mode 100644 index 50bd4353..00000000 --- a/src/lib/builders/branch-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Branch} data The underlying object - * @returns {Specification.Branch} The validated underlying object - */ -function branchBuildingFn(data: Specification.Branch): () => Specification.Branch { - return () => { - const model = new Specification.Branch(data); - - validate('Branch', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Branch` - * @returns {Specification.Branch} A builder for `Specification.Branch` - */ -export function branchBuilder(): Builder { - return builder(branchBuildingFn); -} diff --git a/src/lib/builders/callbackstate-builder.ts b/src/lib/builders/callbackstate-builder.ts deleted file mode 100644 index b89a2995..00000000 --- a/src/lib/builders/callbackstate-builder.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; -import { setEndValueIfNoTransition } from '../definitions/utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Callbackstate} data The underlying object - * @returns {Specification.Callbackstate} The validated underlying object - */ -function callbackstateBuildingFn(data: Specification.Callbackstate): () => Specification.Callbackstate { - return () => { - const model = new Specification.Callbackstate(data); - - setEndValueIfNoTransition(model); - - validate('Callbackstate', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Callbackstate` - * @returns {Specification.Callbackstate} A builder for `Specification.Callbackstate` - */ -export function callbackstateBuilder(): Builder { - return builder(callbackstateBuildingFn); -} diff --git a/src/lib/builders/continueasdef-builder.ts b/src/lib/builders/continueasdef-builder.ts deleted file mode 100644 index db6f4172..00000000 --- a/src/lib/builders/continueasdef-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Continueasdef} data The underlying object - * @returns {Specification.Continueasdef} The validated underlying object - */ -function continueasdefBuildingFn(data: Specification.Continueasdef): () => Specification.Continueasdef { - return () => { - const model = new Specification.Continueasdef(data); - - validate('Continueasdef', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Continueasdef` - * @returns {Specification.Continueasdef} A builder for `Specification.Continueasdef` - */ -export function continueasdefBuilder(): Builder { - return builder(continueasdefBuildingFn); -} diff --git a/src/lib/builders/correlation-def-builder.ts b/src/lib/builders/correlation-def-builder.ts deleted file mode 100644 index 048ddf3a..00000000 --- a/src/lib/builders/correlation-def-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CorrelationDef} data The underlying object - * @returns {Specification.CorrelationDef} The validated underlying object - */ -function correlationDefBuildingFn(data: Specification.CorrelationDef): () => Specification.CorrelationDef { - return () => { - const model = new Specification.CorrelationDef(data); - - validate('CorrelationDef', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.CorrelationDef` - * @returns {Specification.CorrelationDef} A builder for `Specification.CorrelationDef` - */ -export function correlationDefBuilder(): Builder { - return builder(correlationDefBuildingFn); -} diff --git a/src/lib/builders/crondef-builder.ts b/src/lib/builders/crondef-builder.ts deleted file mode 100644 index f8172fac..00000000 --- a/src/lib/builders/crondef-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Crondef} data The underlying object - * @returns {Specification.Crondef} The validated underlying object - */ -function crondefBuildingFn(data: Specification.Crondef): () => Specification.Crondef { - return () => { - const model = new Specification.Crondef(data); - - validate('Crondef', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Crondef` - * @returns {Specification.Crondef} A builder for `Specification.Crondef` - */ -export function crondefBuilder(): Builder { - return builder(crondefBuildingFn); -} diff --git a/src/lib/builders/databasedswitchstate-builder.ts b/src/lib/builders/databasedswitchstate-builder.ts deleted file mode 100644 index eabbce32..00000000 --- a/src/lib/builders/databasedswitchstate-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Databasedswitchstate} data The underlying object - * @returns {Specification.Databasedswitchstate} The validated underlying object - */ -function databasedswitchstateBuildingFn( - data: Specification.Databasedswitchstate -): () => Specification.Databasedswitchstate { - return () => { - const model = new Specification.Databasedswitchstate(data); - - validate('Databasedswitchstate', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Databasedswitchstate` - * @returns {Specification.Databasedswitchstate} A builder for `Specification.Databasedswitchstate` - */ -export function databasedswitchstateBuilder(): Builder { - return builder(databasedswitchstateBuildingFn); -} diff --git a/src/lib/builders/defaultconditiondef-builder.ts b/src/lib/builders/defaultconditiondef-builder.ts deleted file mode 100644 index 0fda1acb..00000000 --- a/src/lib/builders/defaultconditiondef-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Defaultconditiondef} data The underlying object - * @returns {Specification.Defaultconditiondef} The validated underlying object - */ -function defaultconditiondefBuildingFn( - data: Specification.Defaultconditiondef -): () => Specification.Defaultconditiondef { - return () => { - const model = new Specification.Defaultconditiondef(data); - - validate('Defaultconditiondef', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Defaultconditiondef` - * @returns {Specification.Defaultconditiondef} A builder for `Specification.Defaultconditiondef` - */ -export function defaultconditiondefBuilder(): Builder { - return builder(defaultconditiondefBuildingFn); -} diff --git a/src/lib/builders/end-builder.ts b/src/lib/builders/end-builder.ts deleted file mode 100644 index 067766ac..00000000 --- a/src/lib/builders/end-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.End} data The underlying object - * @returns {Specification.End} The validated underlying object - */ -function endBuildingFn(data: Specification.End): () => Specification.End { - return () => { - const model = new Specification.End(data); - - validate('End', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.End` - * @returns {Specification.End} A builder for `Specification.End` - */ -export function endBuilder(): Builder { - return builder(endBuildingFn); -} diff --git a/src/lib/builders/enddatacondition-builder.ts b/src/lib/builders/enddatacondition-builder.ts deleted file mode 100644 index 8f5e44ea..00000000 --- a/src/lib/builders/enddatacondition-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Enddatacondition} data The underlying object - * @returns {Specification.Enddatacondition} The validated underlying object - */ -function enddataconditionBuildingFn(data: Specification.Enddatacondition): () => Specification.Enddatacondition { - return () => { - const model = new Specification.Enddatacondition(data); - - validate('Enddatacondition', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Enddatacondition` - * @returns {Specification.Enddatacondition} A builder for `Specification.Enddatacondition` - */ -export function enddataconditionBuilder(): Builder { - return builder(enddataconditionBuildingFn); -} diff --git a/src/lib/builders/endeventcondition-builder.ts b/src/lib/builders/endeventcondition-builder.ts deleted file mode 100644 index b6792bb6..00000000 --- a/src/lib/builders/endeventcondition-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Endeventcondition} data The underlying object - * @returns {Specification.Endeventcondition} The validated underlying object - */ -function endeventconditionBuildingFn(data: Specification.Endeventcondition): () => Specification.Endeventcondition { - return () => { - const model = new Specification.Endeventcondition(data); - - validate('Endeventcondition', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Endeventcondition` - * @returns {Specification.Endeventcondition} A builder for `Specification.Endeventcondition` - */ -export function endeventconditionBuilder(): Builder { - return builder(endeventconditionBuildingFn); -} diff --git a/src/lib/builders/error-builder.ts b/src/lib/builders/error-builder.ts deleted file mode 100644 index 2400aef7..00000000 --- a/src/lib/builders/error-builder.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; -import { setEndValueIfNoTransition } from '../definitions/utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Error} data The underlying object - * @returns {Specification.Error} The validated underlying object - */ -function errorBuildingFn(data: Specification.Error): () => Specification.Error { - return () => { - const model = new Specification.Error(data); - - setEndValueIfNoTransition(model); - - validate('Error', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Error` - * @returns {Specification.Error} A builder for `Specification.Error` - */ -export function errorBuilder(): Builder { - return builder(errorBuildingFn); -} diff --git a/src/lib/builders/errordef-builder.ts b/src/lib/builders/errordef-builder.ts deleted file mode 100644 index 461aee0c..00000000 --- a/src/lib/builders/errordef-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Errordef} data The underlying object - * @returns {Specification.Errordef} The validated underlying object - */ -function errordefBuildingFn(data: Specification.Errordef): () => Specification.Errordef { - return () => { - const model = new Specification.Errordef(data); - - validate('Errordef', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Errordef` - * @returns {Specification.Errordef} A builder for `Specification.Errordef` - */ -export function errordefBuilder(): Builder { - return builder(errordefBuildingFn); -} diff --git a/src/lib/builders/eventbasedswitchstate-builder.ts b/src/lib/builders/eventbasedswitchstate-builder.ts deleted file mode 100644 index 26c07543..00000000 --- a/src/lib/builders/eventbasedswitchstate-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Eventbasedswitchstate} data The underlying object - * @returns {Specification.Eventbasedswitchstate} The validated underlying object - */ -function eventbasedswitchstateBuildingFn( - data: Specification.Eventbasedswitchstate -): () => Specification.Eventbasedswitchstate { - return () => { - const model = new Specification.Eventbasedswitchstate(data); - - validate('Eventbasedswitchstate', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Eventbasedswitchstate` - * @returns {Specification.Eventbasedswitchstate} A builder for `Specification.Eventbasedswitchstate` - */ -export function eventbasedswitchstateBuilder(): Builder { - return builder(eventbasedswitchstateBuildingFn); -} diff --git a/src/lib/builders/eventdatafilter-builder.ts b/src/lib/builders/eventdatafilter-builder.ts deleted file mode 100644 index d86487ed..00000000 --- a/src/lib/builders/eventdatafilter-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Eventdatafilter} data The underlying object - * @returns {Specification.Eventdatafilter} The validated underlying object - */ -function eventdatafilterBuildingFn(data: Specification.Eventdatafilter): () => Specification.Eventdatafilter { - return () => { - const model = new Specification.Eventdatafilter(data); - - validate('Eventdatafilter', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Eventdatafilter` - * @returns {Specification.Eventdatafilter} A builder for `Specification.Eventdatafilter` - */ -export function eventdatafilterBuilder(): Builder { - return builder(eventdatafilterBuildingFn); -} diff --git a/src/lib/builders/eventdef-builder.ts b/src/lib/builders/eventdef-builder.ts deleted file mode 100644 index 6e751030..00000000 --- a/src/lib/builders/eventdef-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Eventdef} data The underlying object - * @returns {Specification.Eventdef} The validated underlying object - */ -function eventdefBuildingFn(data: Specification.Eventdef): () => Specification.Eventdef { - return () => { - const model = new Specification.Eventdef(data); - - validate('Eventdef', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Eventdef` - * @returns {Specification.Eventdef} A builder for `Specification.Eventdef` - */ -export function eventdefBuilder(): Builder { - return builder(eventdefBuildingFn); -} diff --git a/src/lib/builders/eventref-builder.ts b/src/lib/builders/eventref-builder.ts deleted file mode 100644 index 58685a69..00000000 --- a/src/lib/builders/eventref-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Eventref} data The underlying object - * @returns {Specification.Eventref} The validated underlying object - */ -function eventrefBuildingFn(data: Specification.Eventref): () => Specification.Eventref { - return () => { - const model = new Specification.Eventref(data); - - validate('Eventref', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Eventref` - * @returns {Specification.Eventref} A builder for `Specification.Eventref` - */ -export function eventrefBuilder(): Builder { - return builder(eventrefBuildingFn); -} diff --git a/src/lib/builders/eventstate-builder.ts b/src/lib/builders/eventstate-builder.ts deleted file mode 100644 index 3ebea78b..00000000 --- a/src/lib/builders/eventstate-builder.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; -import { setEndValueIfNoTransition } from '../definitions/utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Eventstate} data The underlying object - * @returns {Specification.Eventstate} The validated underlying object - */ -function eventstateBuildingFn(data: Specification.Eventstate): () => Specification.Eventstate { - return () => { - const model = new Specification.Eventstate(data); - - setEndValueIfNoTransition(model); - - validate('Eventstate', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Eventstate` - * @returns {Specification.Eventstate} A builder for `Specification.Eventstate` - */ -export function eventstateBuilder(): Builder { - return builder(eventstateBuildingFn); -} diff --git a/src/lib/builders/extension-builder.ts b/src/lib/builders/extension-builder.ts deleted file mode 100644 index bd90a3e0..00000000 --- a/src/lib/builders/extension-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Extension} data The underlying object - * @returns {Specification.Extension} The validated underlying object - */ -function extensionBuildingFn(data: Specification.Extension): () => Specification.Extension { - return () => { - const model = new Specification.Extension(data); - - validate('Extension', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Extension` - * @returns {Specification.Extension} A builder for `Specification.Extension` - */ -export function extensionBuilder(): Builder { - return builder(extensionBuildingFn); -} diff --git a/src/lib/builders/foreachstate-builder.ts b/src/lib/builders/foreachstate-builder.ts deleted file mode 100644 index 5a367311..00000000 --- a/src/lib/builders/foreachstate-builder.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; -import { setEndValueIfNoTransition } from '../definitions/utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Foreachstate} data The underlying object - * @returns {Specification.Foreachstate} The validated underlying object - */ -function foreachstateBuildingFn(data: Specification.Foreachstate): () => Specification.Foreachstate { - return () => { - const model = new Specification.Foreachstate(data); - - setEndValueIfNoTransition(model); - - validate('Foreachstate', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Foreachstate` - * @returns {Specification.Foreachstate} A builder for `Specification.Foreachstate` - */ -export function foreachstateBuilder(): Builder { - return builder(foreachstateBuildingFn); -} diff --git a/src/lib/builders/function-builder.ts b/src/lib/builders/function-builder.ts deleted file mode 100644 index 8f0bc90c..00000000 --- a/src/lib/builders/function-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Function} data The underlying object - * @returns {Specification.Function} The validated underlying object - */ -function functionBuildingFn(data: Specification.Function): () => Specification.Function { - return () => { - const model = new Specification.Function(data); - - validate('Function', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Function` - * @returns {Specification.Function} A builder for `Specification.Function` - */ -export function functionBuilder(): Builder { - return builder(functionBuildingFn); -} diff --git a/src/lib/builders/functionref-builder.ts b/src/lib/builders/functionref-builder.ts deleted file mode 100644 index 65256ebe..00000000 --- a/src/lib/builders/functionref-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Functionref} data The underlying object - * @returns {Specification.Functionref} The validated underlying object - */ -function functionrefBuildingFn(data: Specification.Functionref): () => Specification.Functionref { - return () => { - const model = new Specification.Functionref(data); - - validate('Functionref', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Functionref` - * @returns {Specification.Functionref} A builder for `Specification.Functionref` - */ -export function functionrefBuilder(): Builder { - return builder(functionrefBuildingFn); -} diff --git a/src/lib/builders/index.ts b/src/lib/builders/index.ts deleted file mode 100644 index 737e880e..00000000 --- a/src/lib/builders/index.ts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export * from './workflow-builder'; -export * from './action-builder'; -export * from './actiondatafilter-builder'; -export * from './authdef-builder'; -export * from './basicpropsdef-builder'; -export * from './bearerpropsdef-builder'; -export * from './branch-builder'; -export * from './callbackstate-builder'; -export * from './continueasdef-builder'; -export * from './correlation-def-builder'; -export * from './crondef-builder'; -export * from './databasedswitchstate-builder'; -export * from './defaultconditiondef-builder'; -export * from './end-builder'; -export * from './enddatacondition-builder'; -export * from './endeventcondition-builder'; -export * from './error-builder'; -export * from './errordef-builder'; -export * from './eventbasedswitchstate-builder'; -export * from './eventdatafilter-builder'; -export * from './eventdef-builder'; -export * from './eventref-builder'; -export * from './eventstate-builder'; -export * from './extension-builder'; -export * from './foreachstate-builder'; -export * from './function-builder'; -export * from './functionref-builder'; -export * from './injectstate-builder'; -export * from './metadata-builder'; -export * from './oauth2propsdef-builder'; -export * from './onevents-builder'; -export * from './operationstate-builder'; -export * from './parallelstate-builder'; -export * from './produceeventdef-builder'; -export * from './retrydef-builder'; -export * from './schedule-builder'; -export * from './sleep-builder'; -export * from './sleepstate-builder'; -export * from './startdef-builder'; -export * from './statedatafilter-builder'; -export * from './subflowref-builder'; -export * from './timeouts-builder'; -export * from './transition-builder'; -export * from './transitiondatacondition-builder'; -export * from './transitioneventcondition-builder'; -export * from './workflow-exec-timeout-builder'; diff --git a/src/lib/builders/injectstate-builder.ts b/src/lib/builders/injectstate-builder.ts deleted file mode 100644 index 03ea25d4..00000000 --- a/src/lib/builders/injectstate-builder.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; -import { setEndValueIfNoTransition } from '../definitions/utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Injectstate} data The underlying object - * @returns {Specification.Injectstate} The validated underlying object - */ -function injectstateBuildingFn(data: Specification.Injectstate): () => Specification.Injectstate { - return () => { - const model = new Specification.Injectstate(data); - - setEndValueIfNoTransition(model); - - validate('Injectstate', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Injectstate` - * @returns {Specification.Injectstate} A builder for `Specification.Injectstate` - */ -export function injectstateBuilder(): Builder { - return builder(injectstateBuildingFn); -} diff --git a/src/lib/builders/metadata-builder.ts b/src/lib/builders/metadata-builder.ts deleted file mode 100644 index acc9db1e..00000000 --- a/src/lib/builders/metadata-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Metadata} data The underlying object - * @returns {Specification.Metadata} The validated underlying object - */ -function metadataBuildingFn(data: Specification.Metadata): () => Specification.Metadata { - return () => { - const model = new Specification.Metadata(data); - - validate('Metadata', model); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Metadata` - * @returns {Specification.Metadata} A builder for `Specification.Metadata` - */ -export function metadataBuilder(): Builder { - return builder(metadataBuildingFn); -} diff --git a/src/lib/builders/oauth2propsdef-builder.ts b/src/lib/builders/oauth2propsdef-builder.ts deleted file mode 100644 index f078e3ac..00000000 --- a/src/lib/builders/oauth2propsdef-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Oauth2propsdef} data The underlying object - * @returns {Specification.Oauth2propsdef} The validated underlying object - */ -function oauth2propsdefBuildingFn(data: Specification.Oauth2propsdef): () => Specification.Oauth2propsdef { - return () => { - const model = new Specification.Oauth2propsdef(data); - - validate('Oauth2propsdef', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Oauth2propsdef` - * @returns {Specification.Oauth2propsdef} A builder for `Specification.Oauth2propsdef` - */ -export function oauth2propsdefBuilder(): Builder { - return builder(oauth2propsdefBuildingFn); -} diff --git a/src/lib/builders/onevents-builder.ts b/src/lib/builders/onevents-builder.ts deleted file mode 100644 index 72bd58e8..00000000 --- a/src/lib/builders/onevents-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Onevents} data The underlying object - * @returns {Specification.Onevents} The validated underlying object - */ -function oneventsBuildingFn(data: Specification.Onevents): () => Specification.Onevents { - return () => { - const model = new Specification.Onevents(data); - - validate('Onevents', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Onevents` - * @returns {Specification.Onevents} A builder for `Specification.Onevents` - */ -export function oneventsBuilder(): Builder { - return builder(oneventsBuildingFn); -} diff --git a/src/lib/builders/operationstate-builder.ts b/src/lib/builders/operationstate-builder.ts deleted file mode 100644 index 47ceb834..00000000 --- a/src/lib/builders/operationstate-builder.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; -import { setEndValueIfNoTransition } from '../definitions/utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Operationstate} data The underlying object - * @returns {Specification.Operationstate} The validated underlying object - */ -function operationstateBuildingFn(data: Specification.Operationstate): () => Specification.Operationstate { - return () => { - const model = new Specification.Operationstate(data); - - setEndValueIfNoTransition(model); - - validate('Operationstate', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Operationstate` - * @returns {Specification.Operationstate} A builder for `Specification.Operationstate` - */ -export function operationstateBuilder(): Builder { - return builder(operationstateBuildingFn); -} diff --git a/src/lib/builders/parallelstate-builder.ts b/src/lib/builders/parallelstate-builder.ts deleted file mode 100644 index 010ef076..00000000 --- a/src/lib/builders/parallelstate-builder.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; -import { setEndValueIfNoTransition } from '../definitions/utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Parallelstate} data The underlying object - * @returns {Specification.Parallelstate} The validated underlying object - */ -function parallelstateBuildingFn(data: Specification.Parallelstate): () => Specification.Parallelstate { - return () => { - const model = new Specification.Parallelstate(data); - - setEndValueIfNoTransition(model); - - validate('Parallelstate', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Parallelstate` - * @returns {Specification.Parallelstate} A builder for `Specification.Parallelstate` - */ -export function parallelstateBuilder(): Builder { - return builder(parallelstateBuildingFn); -} diff --git a/src/lib/builders/produceeventdef-builder.ts b/src/lib/builders/produceeventdef-builder.ts deleted file mode 100644 index 5212cf77..00000000 --- a/src/lib/builders/produceeventdef-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Produceeventdef} data The underlying object - * @returns {Specification.Produceeventdef} The validated underlying object - */ -function produceeventdefBuildingFn(data: Specification.Produceeventdef): () => Specification.Produceeventdef { - return () => { - const model = new Specification.Produceeventdef(data); - - validate('Produceeventdef', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Produceeventdef` - * @returns {Specification.Produceeventdef} A builder for `Specification.Produceeventdef` - */ -export function produceeventdefBuilder(): Builder { - return builder(produceeventdefBuildingFn); -} diff --git a/src/lib/builders/retrydef-builder.ts b/src/lib/builders/retrydef-builder.ts deleted file mode 100644 index c7ed6536..00000000 --- a/src/lib/builders/retrydef-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Retrydef} data The underlying object - * @returns {Specification.Retrydef} The validated underlying object - */ -function retrydefBuildingFn(data: Specification.Retrydef): () => Specification.Retrydef { - return () => { - const model = new Specification.Retrydef(data); - - validate('Retrydef', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Retrydef` - * @returns {Specification.Retrydef} A builder for `Specification.Retrydef` - */ -export function retrydefBuilder(): Builder { - return builder(retrydefBuildingFn); -} diff --git a/src/lib/builders/schedule-builder.ts b/src/lib/builders/schedule-builder.ts deleted file mode 100644 index dbf26555..00000000 --- a/src/lib/builders/schedule-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Schedule} data The underlying object - * @returns {Specification.Schedule} The validated underlying object - */ -function scheduleBuildingFn(data: Specification.Schedule): () => Specification.Schedule { - return () => { - const model = new Specification.Schedule(data); - - validate('Schedule', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Schedule` - * @returns {Specification.Schedule} A builder for `Specification.Schedule` - */ -export function scheduleBuilder(): Builder { - return builder(scheduleBuildingFn); -} diff --git a/src/lib/builders/sleep-builder.ts b/src/lib/builders/sleep-builder.ts deleted file mode 100644 index d2d8e0bc..00000000 --- a/src/lib/builders/sleep-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Sleep} data The underlying object - * @returns {Specification.Sleep} The validated underlying object - */ -function sleepBuildingFn(data: Specification.Sleep): () => Specification.Sleep { - return () => { - const model = new Specification.Sleep(data); - - validate('Sleep', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Sleep` - * @returns {Specification.Sleep} A builder for `Specification.Sleep` - */ -export function sleepBuilder(): Builder { - return builder(sleepBuildingFn); -} diff --git a/src/lib/builders/sleepstate-builder.ts b/src/lib/builders/sleepstate-builder.ts deleted file mode 100644 index 210ec334..00000000 --- a/src/lib/builders/sleepstate-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Sleepstate} data The underlying object - * @returns {Specification.Sleepstate} The validated underlying object - */ -function sleepstateBuildingFn(data: Specification.Sleepstate): () => Specification.Sleepstate { - return () => { - const model = new Specification.Sleepstate(data); - - validate('Sleepstate', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Sleepstate` - * @returns {Specification.Sleepstate} A builder for `Specification.Sleepstate` - */ -export function sleepstateBuilder(): Builder { - return builder(sleepstateBuildingFn); -} diff --git a/src/lib/builders/startdef-builder.ts b/src/lib/builders/startdef-builder.ts deleted file mode 100644 index bc6fb7ff..00000000 --- a/src/lib/builders/startdef-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Startdef} data The underlying object - * @returns {Specification.Startdef} The validated underlying object - */ -function startdefBuildingFn(data: Specification.Startdef): () => Specification.Startdef { - return () => { - const model = new Specification.Startdef(data); - - validate('Startdef', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Startdef` - * @returns {Specification.Startdef} A builder for `Specification.Startdef` - */ -export function startdefBuilder(): Builder { - return builder(startdefBuildingFn); -} diff --git a/src/lib/builders/statedatafilter-builder.ts b/src/lib/builders/statedatafilter-builder.ts deleted file mode 100644 index 69d0aa1b..00000000 --- a/src/lib/builders/statedatafilter-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Statedatafilter} data The underlying object - * @returns {Specification.Statedatafilter} The validated underlying object - */ -function statedatafilterBuildingFn(data: Specification.Statedatafilter): () => Specification.Statedatafilter { - return () => { - const model = new Specification.Statedatafilter(data); - - validate('Statedatafilter', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Statedatafilter` - * @returns {Specification.Statedatafilter} A builder for `Specification.Statedatafilter` - */ -export function statedatafilterBuilder(): Builder { - return builder(statedatafilterBuildingFn); -} diff --git a/src/lib/builders/subflowref-builder.ts b/src/lib/builders/subflowref-builder.ts deleted file mode 100644 index 3011aa7c..00000000 --- a/src/lib/builders/subflowref-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Subflowref} data The underlying object - * @returns {Specification.Subflowref} The validated underlying object - */ -function subflowrefBuildingFn(data: Specification.Subflowref): () => Specification.Subflowref { - return () => { - const model = new Specification.Subflowref(data); - - validate('Subflowref', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Subflowref` - * @returns {Specification.Subflowref} A builder for `Specification.Subflowref` - */ -export function subflowrefBuilder(): Builder { - return builder(subflowrefBuildingFn); -} diff --git a/src/lib/builders/timeouts-builder.ts b/src/lib/builders/timeouts-builder.ts deleted file mode 100644 index 413964e5..00000000 --- a/src/lib/builders/timeouts-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Timeouts} data The underlying object - * @returns {Specification.Timeouts} The validated underlying object - */ -function timeoutsBuildingFn(data: Specification.Timeouts): () => Specification.Timeouts { - return () => { - const model = new Specification.Timeouts(data); - - validate('Timeouts', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Timeouts` - * @returns {Specification.Timeouts} A builder for `Specification.Timeouts` - */ -export function timeoutsBuilder(): Builder { - return builder(timeoutsBuildingFn); -} diff --git a/src/lib/builders/transition-builder.ts b/src/lib/builders/transition-builder.ts deleted file mode 100644 index e10b988b..00000000 --- a/src/lib/builders/transition-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Transition} data The underlying object - * @returns {Specification.Transition} The validated underlying object - */ -function transitionBuildingFn(data: Specification.Transition): () => Specification.Transition { - return () => { - const model = new Specification.Transition(data); - - validate('Transition', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Transition` - * @returns {Specification.Transition} A builder for `Specification.Transition` - */ -export function transitionBuilder(): Builder { - return builder(transitionBuildingFn); -} diff --git a/src/lib/builders/transitiondatacondition-builder.ts b/src/lib/builders/transitiondatacondition-builder.ts deleted file mode 100644 index 4abfae7e..00000000 --- a/src/lib/builders/transitiondatacondition-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Transitiondatacondition} data The underlying object - * @returns {Specification.Transitiondatacondition} The validated underlying object - */ -function transitiondataconditionBuildingFn( - data: Specification.Transitiondatacondition -): () => Specification.Transitiondatacondition { - return () => { - const model = new Specification.Transitiondatacondition(data); - - validate('Transitiondatacondition', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Transitiondatacondition` - * @returns {Specification.Transitiondatacondition} A builder for `Specification.Transitiondatacondition` - */ -export function transitiondataconditionBuilder(): Builder { - return builder(transitiondataconditionBuildingFn); -} diff --git a/src/lib/builders/transitioneventcondition-builder.ts b/src/lib/builders/transitioneventcondition-builder.ts deleted file mode 100644 index 161a92b0..00000000 --- a/src/lib/builders/transitioneventcondition-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Transitioneventcondition} data The underlying object - * @returns {Specification.Transitioneventcondition} The validated underlying object - */ -function transitioneventconditionBuildingFn( - data: Specification.Transitioneventcondition -): () => Specification.Transitioneventcondition { - return () => { - const model = new Specification.Transitioneventcondition(data); - - validate('Transitioneventcondition', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Transitioneventcondition` - * @returns {Specification.Transitioneventcondition} A builder for `Specification.Transitioneventcondition` - */ -export function transitioneventconditionBuilder(): Builder { - return builder(transitioneventconditionBuildingFn); -} diff --git a/src/lib/builders/workflow-builder.ts b/src/lib/builders/workflow-builder.ts deleted file mode 100644 index 2177a303..00000000 --- a/src/lib/builders/workflow-builder.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Workflow} data The underlying object - * @returns {Specification.Workflow} The validated underlying object - */ -function workflowBuildingFn(data: Specification.Workflow): () => Specification.Workflow { - return () => { - const model = new Specification.Workflow(data); - - validate('Workflow', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Workflow` - * @returns {Specification.Workflow} A builder for `Specification.Workflow` - */ -export function workflowBuilder(): Builder { - return builder(workflowBuildingFn); -} diff --git a/src/lib/builders/workflow-exec-timeout-builder.ts b/src/lib/builders/workflow-exec-timeout-builder.ts deleted file mode 100644 index 766e9da3..00000000 --- a/src/lib/builders/workflow-exec-timeout-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.WorkflowExecTimeout} data The underlying object - * @returns {Specification.WorkflowExecTimeout} The validated underlying object - */ -function workflowExecTimeoutBuildingFn( - data: Specification.WorkflowExecTimeout -): () => Specification.WorkflowExecTimeout { - return () => { - const model = new Specification.WorkflowExecTimeout(data); - - validate('WorkflowExecTimeout', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.WorkflowExecTimeout` - * @returns {Specification.WorkflowExecTimeout} A builder for `Specification.WorkflowExecTimeout` - */ -export function workflowExecTimeoutBuilder(): Builder { - return builder(workflowExecTimeoutBuildingFn); -} diff --git a/src/lib/builders/README.md b/src/lib/definitions/README.md similarity index 100% rename from src/lib/builders/README.md rename to src/lib/definitions/README.md diff --git a/src/lib/definitions/action.ts b/src/lib/definitions/action.ts deleted file mode 100644 index d587d861..00000000 --- a/src/lib/definitions/action.ts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Actiondatafilter } from './actiondatafilter'; -import { Eventref } from './eventref'; -import { Functionref } from './functionref'; -import { - cleanSourceModelProperty, - normalizeEventRef, - normalizeFunctionRef, - normalizeSubFlowRef, - overwriteActionDataFilter, - overwriteEventRef, - overwriteFunctionRef, - overwriteSleep, - overwriteSubFlowRef, -} from './utils'; -import { Subflowref } from './subflowref'; -import { Sleep } from './sleep'; - -export class Action { - sourceModel?: Action; - /** - * Unique action definition name - */ - name?: string; - functionRef?: string | Functionref; - eventRef?: /* Event References */ Eventref; - subFlowRef?: string | Subflowref; - sleep?: Sleep; - /** - * References a defined workflow retry definition. If not defined the default retry policy is assumed - */ - retryRef?: string; - /** - * List of unique references to defined workflow errors for which the action should not be retried. Used only when `autoRetries` is set to `true` - */ - nonRetryableErrors?: [string, ...string[]]; - /** - * List of unique references to defined workflow errors for which the action should be retried. Used only when `autoRetries` is set to `false` - */ - retryableErrors?: [string, ...string[]]; - actionDataFilter?: Actiondatafilter; - /** - * Expression, if defined, must evaluate to true for this action to be performed. If false, action is disregarded - */ - condition?: string; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - Object.assign(this, model); - - overwriteFunctionRef(this); - overwriteEventRef(this); - overwriteSubFlowRef(this); - overwriteSleep(this); - overwriteActionDataFilter(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Action} without deleted properties. - */ - normalize = (): Action => { - const clone = new Action(this); - - normalizeSubFlowRef(clone); - normalizeEventRef(clone); - normalizeFunctionRef(clone); - - cleanSourceModelProperty(clone); - - return clone; - }; -} diff --git a/src/lib/definitions/actiondatafilter.ts b/src/lib/definitions/actiondatafilter.ts deleted file mode 100644 index 6500acad..00000000 --- a/src/lib/definitions/actiondatafilter.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export class Actiondatafilter { - /** - * Workflow expression that selects state data that the state action can use - */ - fromStateData?: string; - /** - * If set to false, action data results are not added/merged to state data. In this case 'results' and 'toStateData' should be ignored. Default is true. - */ - useResults?: boolean; - /** - * Workflow expression that filters the actions data results - */ - results?: string; - /** - * Workflow expression that selects a state data element to which the action results should be added/merged into. If not specified, denote, the top-level state data element - */ - toStateData?: string; - - constructor(model: any) { - Object.assign(this, model); - } - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Actiondatafilter} without deleted properties. - */ - normalize = (): Actiondatafilter => { - const clone = new Actiondatafilter(this); - return clone; - }; -} diff --git a/src/lib/definitions/authdef.ts b/src/lib/definitions/authdef.ts deleted file mode 100644 index 0d65cf1a..00000000 --- a/src/lib/definitions/authdef.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { cleanSourceModelProperty, normalizeScheme, overwriteProperties } from './utils'; -import { Properties } from './types'; - -export class Authdef { - sourceModel?: Authdef; - /** - * Unique auth definition name - */ - name: string; - /** - * Defines the auth type - */ - scheme?: 'basic' | 'bearer' | 'oauth2'; - properties: string | Properties; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - const defaultModel = { scheme: 'basic' }; - Object.assign(this, defaultModel, model); - - overwriteProperties(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Authdef} without deleted properties. - */ - normalize = (): Authdef => { - const clone = new Authdef(this); - - normalizeScheme(clone, this.sourceModel); - - cleanSourceModelProperty(clone); - - return clone; - }; -} diff --git a/src/lib/definitions/basicpropsdef.ts b/src/lib/definitions/basicpropsdef.ts deleted file mode 100644 index d51920cb..00000000 --- a/src/lib/definitions/basicpropsdef.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Metadata } from './metadata'; -import { overwriteMetadata } from './utils'; - -export class Basicpropsdef { - /** - * String or a workflow expression. Contains the user name - */ - username: string; - /** - * String or a workflow expression. Contains the user password - */ - password: string; - metadata?: /* Metadata information */ Metadata; - - constructor(model: any) { - Object.assign(this, model); - - overwriteMetadata(this); - } - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Basicpropsdef} without deleted properties. - */ - normalize = (): Basicpropsdef => { - const clone = new Basicpropsdef(this); - return clone; - }; -} diff --git a/src/lib/definitions/bearerpropsdef.ts b/src/lib/definitions/bearerpropsdef.ts deleted file mode 100644 index 9c444d7d..00000000 --- a/src/lib/definitions/bearerpropsdef.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Metadata } from './metadata'; -import { overwriteMetadata } from './utils'; - -export class Bearerpropsdef { - /** - * String or a workflow expression. Contains the token - */ - token: string; - metadata?: /* Metadata information */ Metadata; - - constructor(model: any) { - Object.assign(this, model); - overwriteMetadata(this); - } - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Bearerpropsdef} without deleted properties. - */ - normalize = (): Bearerpropsdef => { - const clone = new Bearerpropsdef(this); - return clone; - }; -} diff --git a/src/lib/definitions/branch.ts b/src/lib/definitions/branch.ts deleted file mode 100644 index 9a82edd2..00000000 --- a/src/lib/definitions/branch.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Action } from './action'; -import { cleanSourceModelProperty, normalizeActions, overwriteActions, overwritePropertyAsPlainType } from './utils'; -import { ActionExecTimeout, BranchExecTimeout } from './types'; - -export class Branch /* Branch Definition */ { - sourceModel?: Branch; - /** - * Branch name - */ - name: string; - /** - * State specific timeouts - */ - timeouts?: { - actionExecTimeout?: /* Action execution timeout duration (ISO 8601 duration format) */ ActionExecTimeout; - branchExecTimeout?: /* Branch execution timeout duration (ISO 8601 duration format) */ BranchExecTimeout; - }; - /** - * Actions to be executed in this branch - */ - actions: Action[]; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - Object.assign(this, model); - overwriteActions(this); - overwritePropertyAsPlainType('timeouts', this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Branch} without deleted properties. - */ - normalize = (): Branch => { - const clone = new Branch(this); - normalizeActions(clone); - - cleanSourceModelProperty(clone); - return clone; - }; -} diff --git a/src/lib/definitions/callbackstate.ts b/src/lib/definitions/callbackstate.ts deleted file mode 100644 index 49e1d8d6..00000000 --- a/src/lib/definitions/callbackstate.ts +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Action } from './action'; -import { End } from './end'; -import { Error } from './error'; -import { Eventdatafilter } from './eventdatafilter'; -import { Metadata } from './metadata'; -import { Statedatafilter } from './statedatafilter'; -import { Transition } from './transition'; -import { - cleanSourceModelProperty, - normalizeAction, - normalizeEnd, - normalizeOnErrors, - normalizeTransition, - normalizeUsedForCompensation, - overwriteAction, - overwriteEnd, - overwriteEventDataFilter, - overwriteMetadata, - overwriteOnErrors, - overwritePropertyAsPlainType, - overwriteStateDataFilter, - overwriteTransition, - setEndValueIfNoTransition, -} from './utils'; -import { ActionExecTimeout, EventTimeout, StateExecTimeout } from './types'; - -export class Callbackstate { - sourceModel?: Callbackstate; - /** - * Unique state id - */ - id?: string; - /** - * State name - */ - name?: string; - /** - * State type - */ - type?: 'callback'; - /** - * Defines the action to be executed - */ - action?: Action; - /** - * References an unique callback event name in the defined workflow events - */ - eventRef?: string; - /** - * State specific timeouts - */ - timeouts?: { - stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout; - actionExecTimeout?: /* Action execution timeout duration (ISO 8601 duration format) */ ActionExecTimeout; - eventTimeout?: /* Timeout duration to wait for consuming defined events (ISO 8601 duration format) */ EventTimeout; - }; - /** - * Event data filter - */ - eventDataFilter?: Eventdatafilter; - /** - * State data filter - */ - stateDataFilter?: Statedatafilter; - /** - * States error handling definitions - */ - onErrors?: Error[]; - /** - * Next transition of the workflow after all the actions have been performed - */ - transition?: string | Transition; - /** - * State end definition - */ - end?: boolean | End; - /** - * Unique Name of a workflow state which is responsible for compensation of this state - */ - compensatedBy?: string; - /** - * If true, this state is used to compensate another state. Default is false - */ - usedForCompensation?: boolean; - metadata?: /* Metadata information */ Metadata; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - const defaultModel = { - id: undefined, - name: undefined, - type: 'callback', - usedForCompensation: false, - }; - Object.assign(this, defaultModel, model); - - overwriteAction(this); - overwritePropertyAsPlainType('timeouts', this); - overwriteEventDataFilter(this); - overwriteStateDataFilter(this); - overwriteOnErrors(this); - overwriteTransition(this); - overwriteEnd(this); - overwriteMetadata(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Callbackstate} without deleted properties. - */ - normalize = (): Callbackstate => { - const clone = new Callbackstate(this); - - normalizeAction(clone); - normalizeOnErrors(clone); - normalizeTransition(clone); - normalizeEnd(clone); - normalizeUsedForCompensation(clone, this.sourceModel); - setEndValueIfNoTransition(clone); - - cleanSourceModelProperty(clone); - - return clone; - }; -} diff --git a/src/lib/definitions/continueasdef.ts b/src/lib/definitions/continueasdef.ts deleted file mode 100644 index ff5208c6..00000000 --- a/src/lib/definitions/continueasdef.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { WorkflowExecTimeout } from './workflowExecTimeout'; -import { - cleanSourceModelProperty, - normalizeWorkflowExecTimeout, - overwritePropertyAsPlainType, - overwriteWorkflowExecTimeout, -} from './utils'; - -export class Continueasdef { - sourceModel?: Continueasdef; - /** - * Unique id of the workflow to continue execution as - */ - workflowId: string; - /** - * Version of the workflow to continue execution as - */ - version?: string; // ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ - /** - * If string type, an expression which selects parts of the states data output to become the workflow data input of continued execution. If object type, a custom object to become the workflow data input of the continued execution - */ - data?: - | string - | { - [key: string]: any; - }; - /** - * Workflow execution timeout to be used by the workflow continuing execution. Overwrites any specific settings set by that workflow - */ - workflowExecTimeout?: WorkflowExecTimeout; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - Object.assign(this, model); - overwriteWorkflowExecTimeout(this); - overwritePropertyAsPlainType('data', this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Exectimeout} without deleted properties. - */ - normalize = (): Continueasdef => { - const clone = new Continueasdef(this); - normalizeWorkflowExecTimeout(clone); - - cleanSourceModelProperty(clone); - - return clone; - }; -} diff --git a/src/lib/definitions/correlationDef.ts b/src/lib/definitions/correlationDef.ts deleted file mode 100644 index 824f52e8..00000000 --- a/src/lib/definitions/correlationDef.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export class CorrelationDef { - /** - * CloudEvent Extension Context Attribute name - */ - contextAttributeName: string; - /** - * CloudEvent Extension Context Attribute value - */ - contextAttributeValue?: string; - - constructor(model: any) { - Object.assign(this, model); - } - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.CorrelationDef} without deleted properties. - */ - normalize = (): CorrelationDef => { - const clone = new CorrelationDef(this); - return clone; - }; -} diff --git a/src/lib/definitions/crondef.ts b/src/lib/definitions/crondef.ts deleted file mode 100644 index a7aefb41..00000000 --- a/src/lib/definitions/crondef.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export class Crondef { - /** - * Repeating interval (cron expression) describing when the workflow instance should be created - */ - expression: string; - /** - * Specific date and time (ISO 8601 format) when the cron expression invocation is no longer valid - */ - validUntil?: string; - - constructor(model: any) { - Object.assign(this, model); - } - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Crondef} without deleted properties. - */ - normalize = (): Crondef => { - const clone = new Crondef(this); - return clone; - }; -} diff --git a/src/lib/definitions/databasedswitchstate.ts b/src/lib/definitions/databasedswitchstate.ts deleted file mode 100644 index 013b3695..00000000 --- a/src/lib/definitions/databasedswitchstate.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Defaultconditiondef } from './defaultconditiondef'; -import { Error } from './error'; -import { Metadata } from './metadata'; -import { Statedatafilter } from './statedatafilter'; -import { - cleanSourceModelProperty, - normalizeDataConditions, - normalizeDefaultCondition, - normalizeOnErrors, - normalizeUsedForCompensation, - overwriteDataConditions, - overwriteDefaultCondition, - overwriteMetadata, - overwriteOnErrors, - overwriteStateDataFilter, - overwritePropertyAsPlainType, -} from './utils'; -import { Datacondition, StateExecTimeout } from './types'; - -export class Databasedswitchstate { - sourceModel?: Databasedswitchstate; - /** - * State name - */ - name: string; - /** - * State type - */ - type: 'switch'; - /** - * State data filter - */ - stateDataFilter?: Statedatafilter; - /** - * State specific timeouts - */ - timeouts?: { - stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout; - }; - /** - * Defines conditions evaluated against state data - */ - dataConditions: Datacondition[]; - /** - * States error handling definitions - */ - onErrors?: Error[]; - /** - * Default transition of the workflow if there is no matching data conditions. Can include a transition or end definition - */ - defaultCondition: /* DefaultCondition definition. Can be either a transition or end definition */ Defaultconditiondef; - /** - * Unique Name of a workflow state which is responsible for compensation of this state - */ - compensatedBy?: string; - /** - * If true, this state is used to compensate another state. Default is false - */ - usedForCompensation?: boolean; - metadata?: /* Metadata information */ Metadata; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - const defaultModel = { id: undefined, name: undefined, type: 'switch', usedForCompensation: false }; - Object.assign(this, defaultModel, model); - - overwriteStateDataFilter(this); - overwritePropertyAsPlainType('timeouts', this); - overwriteDataConditions(this); - overwriteOnErrors(this); - overwriteDefaultCondition(this); - overwriteMetadata(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Databasedswitch} without deleted properties. - */ - normalize = (): Databasedswitchstate => { - const clone = new Databasedswitchstate(this); - - normalizeDataConditions(clone); - normalizeOnErrors(clone); - normalizeDefaultCondition(clone); - normalizeUsedForCompensation(clone, this.sourceModel); - cleanSourceModelProperty(clone); - - return clone; - }; -} diff --git a/src/lib/definitions/defaultconditiondef.ts b/src/lib/definitions/defaultconditiondef.ts deleted file mode 100644 index d95fecd3..00000000 --- a/src/lib/definitions/defaultconditiondef.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { End } from './end'; -import { Transition } from './transition'; -import { - cleanSourceModelProperty, - normalizeEnd, - normalizeTransition, - overwriteEnd, - overwriteTransition, - setEndValueIfNoTransition, -} from './utils'; - -export class Defaultconditiondef /* DefaultCondition definition. Can be either a transition or end definition */ { - sourceModel?: Defaultconditiondef; - /** - * The optional name of the default condition, used solely for display purposes - */ - name?: string; - transition: string | Transition; - end?: boolean | End; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - Object.assign(this, model); - - overwriteTransition(this); - overwriteEnd(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Defaultdef} without deleted properties. - */ - normalize = (): Defaultconditiondef => { - const clone = new Defaultconditiondef(this); - - normalizeEnd(clone); - normalizeTransition(clone); - setEndValueIfNoTransition(clone); - - cleanSourceModelProperty(clone); - - return clone; - }; -} diff --git a/src/lib/definitions/end.ts b/src/lib/definitions/end.ts deleted file mode 100644 index 1339dc35..00000000 --- a/src/lib/definitions/end.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Produceeventdef } from './produceeventdef'; -import { - cleanSourceModelProperty, - normalizeCompensate, - normalizeContinueAs, - normalizeTerminate, - overwriteContinueAs, - overwriteProduceEvents, -} from './utils'; -import { Continueasdef } from './continueasdef'; - -export class End { - sourceModel?: End; - /** - * If true, completes all execution flows in the given workflow instance - */ - terminate?: boolean; - /** - * Defines events that should be produced - */ - produceEvents?: /* Produce an event and set its data */ Produceeventdef[]; - /** - * If set to true, triggers workflow compensation. Default is false - */ - compensate?: boolean; - continueAs?: string | Continueasdef; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - const defaultModel = { - compensate: false, - terminate: false, - }; - Object.assign(this, defaultModel, model); - - overwriteProduceEvents(this); - overwriteContinueAs(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.End} without deleted properties. - */ - normalize = (): End => { - const clone = new End(this); - - normalizeCompensate(clone, this.sourceModel); - normalizeTerminate(clone, this.sourceModel); - normalizeContinueAs(clone); - - cleanSourceModelProperty(clone); - return clone; - }; -} diff --git a/src/lib/definitions/enddatacondition.ts b/src/lib/definitions/enddatacondition.ts deleted file mode 100644 index ce49f4dc..00000000 --- a/src/lib/definitions/enddatacondition.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { End } from './end'; -import { Metadata } from './metadata'; -import { cleanSourceModelProperty, normalizeEnd, overwriteEnd, overwriteMetadata } from './utils'; - -export class Enddatacondition { - sourceModel?: Enddatacondition; - /** - * Data condition name - */ - name?: string; - /** - * Workflow expression evaluated against state data. Must evaluate to true or false - */ - condition: string; - /** - * Workflow end definition - */ - end: boolean | End; - metadata?: /* Metadata information */ Metadata; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - Object.assign(this, model); - - overwriteEnd(this); - overwriteMetadata(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Enddatacondition} without deleted properties. - */ - normalize = (): Enddatacondition => { - const clone = new Enddatacondition(this); - - normalizeEnd(clone); - - cleanSourceModelProperty(clone); - - return clone; - }; -} diff --git a/src/lib/definitions/endeventcondition.ts b/src/lib/definitions/endeventcondition.ts deleted file mode 100644 index 9c98e01e..00000000 --- a/src/lib/definitions/endeventcondition.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { End } from './end'; -import { Eventdatafilter } from './eventdatafilter'; -import { Metadata } from './metadata'; -import { - cleanSourceModelProperty, - normalizeEnd, - overwriteEnd, - overwriteEventDataFilter, - overwriteMetadata, -} from './utils'; - -export class Endeventcondition { - sourceModel?: Endeventcondition; - /** - * Event condition name - */ - name?: string; - /** - * References an unique event name in the defined workflow events - */ - eventRef: string; - /** - * Explicit transition to end - */ - end: boolean | End; - /** - * Event data filter definition - */ - eventDataFilter?: Eventdatafilter; - metadata?: /* Metadata information */ Metadata; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - Object.assign(this, model); - - overwriteEnd(this); - overwriteEventDataFilter(this); - overwriteMetadata(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Endeventcondition} without deleted properties. - */ - normalize = (): Endeventcondition => { - const clone = new Endeventcondition(this); - - normalizeEnd(clone); - - cleanSourceModelProperty(clone); - - return clone; - }; -} diff --git a/src/lib/definitions/error.ts b/src/lib/definitions/error.ts deleted file mode 100644 index 76e3863f..00000000 --- a/src/lib/definitions/error.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { End } from './end'; -import { Transition } from './transition'; -import { - cleanSourceModelProperty, - normalizeEnd, - normalizeTransition, - overwriteEnd, - overwriteTransition, - setEndValueIfNoTransition, -} from './utils'; - -export class Error { - sourceModel?: Error; - /** - * Reference to a unique workflow error definition. Used of errorRefs is not used - */ - errorRef: string; - /** - * References one or more workflow error definitions. Used if errorRef is not used - */ - errorRefs?: [string, ...string[]]; - transition: string | Transition; - end?: boolean | End; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - Object.assign(this, model); - - overwriteTransition(this); - overwriteEnd(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Error} without deleted properties. - */ - normalize = (): Error => { - const clone = new Error(this); - - normalizeEnd(clone); - normalizeTransition(clone); - - setEndValueIfNoTransition(clone); - - cleanSourceModelProperty(clone); - return clone; - }; -} diff --git a/src/lib/definitions/errordef.ts b/src/lib/definitions/errordef.ts deleted file mode 100644 index 78aa011c..00000000 --- a/src/lib/definitions/errordef.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export class Errordef { - /** - * Domain-specific error name - */ - name: string; - /** - * Error code. Can be used in addition to the name to help runtimes resolve to technical errors/exceptions. Should not be defined if error is set to '*' - */ - code?: string; - /** - * Error description - */ - description?: string; - - constructor(model: any) { - Object.assign(this, model); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Errordef} without deleted properties. - */ - normalize = (): Errordef => { - const clone = new Errordef(this); - return clone; - }; -} diff --git a/src/lib/definitions/eventbasedswitchstate.ts b/src/lib/definitions/eventbasedswitchstate.ts deleted file mode 100644 index 089935c6..00000000 --- a/src/lib/definitions/eventbasedswitchstate.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Defaultconditiondef } from './defaultconditiondef'; -import { Error } from './error'; -import { Metadata } from './metadata'; -import { Statedatafilter } from './statedatafilter'; -import { - cleanSourceModelProperty, - normalizeDefaultCondition, - normalizeEventConditions, - normalizeOnErrors, - normalizeUsedForCompensation, - overwriteDefaultCondition, - overwriteEventConditions, - overwriteMetadata, - overwriteOnErrors, - overwriteStateDataFilter, - overwritePropertyAsPlainType, -} from './utils'; -import { Eventcondition, EventTimeout, StateExecTimeout } from './types'; - -export class Eventbasedswitchstate { - sourceModel?: Eventbasedswitchstate; - /** - * State name - */ - name: string; - /** - * State type - */ - type: 'switch'; - /** - * State data filter - */ - stateDataFilter?: Statedatafilter; - /** - * State specific timeouts - */ - timeouts?: { - stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout; - eventTimeout?: /* Timeout duration to wait for consuming defined events (ISO 8601 duration format) */ EventTimeout; - }; - /** - * Defines conditions evaluated against events - */ - eventConditions: Eventcondition[]; - /** - * States error handling definitions - */ - onErrors?: Error[]; - /** - * Default transition of the workflow if there is no matching data conditions. Can include a transition or end definition - */ - defaultCondition: /* DefaultCondition definition. Can be either a transition or end definition */ Defaultconditiondef; - /** - * Unique Name of a workflow state which is responsible for compensation of this state - */ - compensatedBy?: string; - /** - * If true, this state is used to compensate another state. Default is false - */ - usedForCompensation?: boolean; - metadata?: /* Metadata information */ Metadata; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - const defaultModel = { id: undefined, name: undefined, type: 'switch', usedForCompensation: false }; - Object.assign(this, defaultModel, model); - - overwriteStateDataFilter(this); - overwritePropertyAsPlainType('timeouts', this); - overwriteEventConditions(this); - overwriteOnErrors(this); - overwriteDefaultCondition(this); - overwriteMetadata(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Eventbasedswitch} without deleted properties. - */ - normalize = (): Eventbasedswitchstate => { - const clone = new Eventbasedswitchstate(this); - - normalizeEventConditions(clone); - normalizeOnErrors(clone); - normalizeDefaultCondition(clone); - normalizeUsedForCompensation(clone, this.sourceModel); - - cleanSourceModelProperty(clone); - return clone; - }; -} diff --git a/src/lib/definitions/eventdatafilter.ts b/src/lib/definitions/eventdatafilter.ts deleted file mode 100644 index 9a462827..00000000 --- a/src/lib/definitions/eventdatafilter.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export class Eventdatafilter { - /** - * If set to false, event payload is not added/merged to state data. In this case 'data' and 'toStateData' should be ignored. Default is true. - */ - useData?: boolean; - /** - * Workflow expression that filters the received event payload (default: '${ . }') - */ - data?: string; - /** - * Workflow expression that selects a state data element to which the filtered event should be added/merged into. If not specified, denotes, the top-level state data element. - */ - toStateData?: string; - - constructor(model: any) { - Object.assign(this, model); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Eventdatafilter} without deleted properties. - */ - normalize = (): Eventdatafilter => { - const clone = new Eventdatafilter(this); - return clone; - }; -} diff --git a/src/lib/definitions/eventdef.ts b/src/lib/definitions/eventdef.ts deleted file mode 100644 index 603acbc8..00000000 --- a/src/lib/definitions/eventdef.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Metadata } from './metadata'; -import { - cleanSourceModelProperty, - normalizeDataOnly, - normalizeKind, - overwriteCorrelation, - overwriteMetadata, -} from './utils'; -import { CorrelationDefs } from './types'; - -export class Eventdef { - sourceModel?: Eventdef; - /** - * Unique event name - */ - name?: string; - /** - * CloudEvent source - */ - source?: string; - /** - * CloudEvent type - */ - type?: string; - /** - * Defines the CloudEvent as either 'consumed' or 'produced' by the workflow. Default is 'consumed' - */ - kind?: 'consumed' | 'produced'; - /** - * CloudEvent correlation definitions - */ - correlation?: CorrelationDefs; - /** - * If `true`, only the Event payload is accessible to consuming Workflow states. If `false`, both event payload and context attributes should be accessible - */ - dataOnly?: boolean; - /** - * Metadata information - */ - metadata?: /* Metadata information */ Metadata; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - const defaultModel = { - kind: 'consumed', - dataOnly: true, - }; - Object.assign(this, defaultModel, model); - - overwriteCorrelation(this); - overwriteMetadata(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Eventdef} without deleted properties. - */ - normalize = (): Eventdef => { - const clone = new Eventdef(this); - - normalizeKind(clone, this.sourceModel); - normalizeDataOnly(clone, this.sourceModel); - - cleanSourceModelProperty(clone); - return clone; - }; -} diff --git a/src/lib/definitions/eventref.ts b/src/lib/definitions/eventref.ts deleted file mode 100644 index 02dc0bdc..00000000 --- a/src/lib/definitions/eventref.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { cleanSourceModelProperty, overwritePropertyAsPlainType } from './utils'; - -export class Eventref { - sourceModel?: Eventref; - /** - * Reference to the unique name of a 'produced' event definition - */ - produceEventRef: string; - /** - * Reference to the unique name of a 'consumed' event definition - */ - consumeEventRef?: string; - /** - * Maximum amount of time (ISO 8601 format) to wait for the result event. If not defined it should default to the actionExecutionTimeout - */ - consumeEventTimeout?: string; - /** - * If string type, an expression which selects parts of the states data output to become the data (payload) of the event referenced by 'produceEventRef'. If object type, a custom object to become the data (payload) of the event referenced by 'produceEventRef'. - */ - data?: - | string - | { - [key: string]: any; - }; - /** - * Add additional extension context attributes to the produced event - */ - contextAttributes?: { - [name: string]: string; - }; - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - Object.assign(this, model); - overwritePropertyAsPlainType('data', this); - overwritePropertyAsPlainType('contextAttributes', this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Eventref} without deleted properties. - */ - normalize = (): Eventref => { - const clone = new Eventref(this); - - cleanSourceModelProperty(clone); - - return clone; - }; -} diff --git a/src/lib/definitions/eventstate.ts b/src/lib/definitions/eventstate.ts deleted file mode 100644 index 836cd4fc..00000000 --- a/src/lib/definitions/eventstate.ts +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { End } from './end'; -import { Error } from './error'; -import { Metadata } from './metadata'; -import { Onevents } from './onevents'; -import { Statedatafilter } from './statedatafilter'; -import { Transition } from './transition'; -import { - cleanSourceModelProperty, - normalizeEnd, - normalizeExclusive, - normalizeOnErrors, - normalizeOnEvents, - normalizeTransition, - overwriteEnd, - overwriteMetadata, - overwriteOnErrors, - overwriteOnEvents, - overwriteStateDataFilter, - overwritePropertyAsPlainType, - overwriteTransition, - setEndValueIfNoTransition, -} from './utils'; -import { ActionExecTimeout, EventTimeout, StateExecTimeout } from './types'; - -export class Eventstate /* This state is used to wait for events from event sources, then consumes them and invoke one or more actions to run in sequence or parallel */ { - sourceModel?: Eventstate; - /** - * State name - */ - name: string; - /** - * State type - */ - type: 'event'; - /** - * If true consuming one of the defined events causes its associated actions to be performed. If false all of the defined events must be consumed in order for actions to be performed - */ - exclusive?: boolean; - /** - * Define the events to be consumed and optional actions to be performed - */ - onEvents: Onevents[]; - /** - * State specific timeouts - */ - timeouts?: { - stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout; - actionExecTimeout?: /* Action execution timeout duration (ISO 8601 duration format) */ ActionExecTimeout; - eventTimeout?: /* Timeout duration to wait for consuming defined events (ISO 8601 duration format) */ EventTimeout; - }; - stateDataFilter?: Statedatafilter; - /** - * States error handling definitions - */ - onErrors?: Error[]; - transition?: string | Transition; - end: boolean | End; - /** - * Unique Name of a workflow state which is responsible for compensation of this state - */ - compensatedBy?: string; - metadata?: /* Metadata information */ Metadata; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - const defaultModel = { - id: undefined, - name: undefined, - type: 'event', - exclusive: true, - }; - Object.assign(this, defaultModel, model); - - overwriteOnEvents(this); - overwritePropertyAsPlainType('timeouts', this); - overwriteStateDataFilter(this); - overwriteOnErrors(this); - overwriteTransition(this); - overwriteEnd(this); - overwriteMetadata(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Eventstate} without deleted properties. - */ - normalize = (): Eventstate => { - const clone = new Eventstate(this); - - normalizeExclusive(clone, this.sourceModel); - normalizeOnEvents(clone); - normalizeOnErrors(clone); - normalizeTransition(clone); - normalizeEnd(clone); - setEndValueIfNoTransition(clone); - - cleanSourceModelProperty(clone); - - return clone; - }; -} diff --git a/src/lib/definitions/extension.ts b/src/lib/definitions/extension.ts deleted file mode 100644 index 40166a22..00000000 --- a/src/lib/definitions/extension.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export class Extension { - /** - * Unique extension id - */ - extensionId: string; - /** - * URI to a resource containing this workflow extension definitions (json or yaml) - */ - resource: string; - - constructor(model: any) { - Object.assign(this, model); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Extension} without deleted properties. - */ - normalize = (): Extension => { - const clone = new Extension(this); - return clone; - }; -} diff --git a/src/lib/definitions/foreachstate.ts b/src/lib/definitions/foreachstate.ts deleted file mode 100644 index d9e2857f..00000000 --- a/src/lib/definitions/foreachstate.ts +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Action } from './action'; -import { End } from './end'; -import { Error } from './error'; -import { Metadata } from './metadata'; -import { Statedatafilter } from './statedatafilter'; -import { Transition } from './transition'; -import { - cleanSourceModelProperty, - normalizeActions, - normalizeEnd, - normalizeMode, - normalizeOnErrors, - normalizeTransition, - normalizeUsedForCompensation, - overwriteActions, - overwriteEnd, - overwriteMetadata, - overwriteOnErrors, - overwriteStateDataFilter, - overwritePropertyAsPlainType, - overwriteTransition, - setEndValueIfNoTransition, -} from './utils'; -import { ActionExecTimeout, StateExecTimeout } from './types'; - -export class Foreachstate { - sourceModel?: Foreachstate; - /** - * State name - */ - name?: string; - /** - * State type - */ - type?: 'foreach'; - /** - * State end definition - */ - end?: boolean | End; - /** - * Workflow expression selecting an array element of the states data - */ - inputCollection?: string; - /** - * Workflow expression specifying an array element of the states data to add the results of each iteration - */ - outputCollection?: string; - /** - * Name of the iteration parameter that can be referenced in actions/workflow. For each parallel iteration, this param should contain an unique element of the inputCollection array - */ - iterationParam?: string; - /** - * Specifies how many iterations may run in parallel at the same time. Used if 'mode' property is set to 'parallel' (default) - */ - batchSize?: number | string; - /** - * Actions to be executed for each of the elements of inputCollection - */ - actions?: Action[]; - /** - * State specific timeouts - */ - timeouts?: { - stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout; - actionExecTimeout?: /* Action execution timeout duration (ISO 8601 duration format) */ ActionExecTimeout; - }; - /** - * State data filter - */ - stateDataFilter?: Statedatafilter; - /** - * States error handling definitions - */ - onErrors?: Error[]; - /** - * Next transition of the workflow after state has completed - */ - transition?: string | Transition; - /** - * Unique Name of a workflow state which is responsible for compensation of this state - */ - compensatedBy?: string; - /** - * If true, this state is used to compensate another state. Default is false - */ - usedForCompensation?: boolean; - /** - * Specifies how iterations are to be performed (sequentially or in parallel) - */ - mode?: 'sequential' | 'parallel'; - metadata?: /* Metadata information */ Metadata; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - const defaultModel = { - id: undefined, - name: undefined, - type: 'foreach', - usedForCompensation: false, - mode: 'parallel', - }; - Object.assign(this, defaultModel, model); - - overwriteEnd(this); - overwriteActions(this); - overwritePropertyAsPlainType('timeouts', this); - overwriteStateDataFilter(this); - overwriteOnErrors(this); - overwriteTransition(this); - overwriteMetadata(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Foreachstate} without deleted properties. - */ - normalize = (): Foreachstate => { - const clone = new Foreachstate(this); - - normalizeEnd(clone); - normalizeActions(clone); - normalizeOnErrors(clone); - normalizeTransition(clone); - normalizeUsedForCompensation(clone, this.sourceModel); - normalizeMode(clone, this.sourceModel); - setEndValueIfNoTransition(clone); - - cleanSourceModelProperty(clone); - - return clone; - }; -} diff --git a/src/lib/definitions/function.ts b/src/lib/definitions/function.ts deleted file mode 100644 index bdb7ed97..00000000 --- a/src/lib/definitions/function.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { cleanSourceModelProperty, normalizeType, overwriteMetadata, overwritePropertyAsPlainType } from './utils'; - -import { Metadata } from './metadata'; - -export class Function { - sourceModel?: Function; - /** - * Unique function name - */ - name: string; - /** - * If type is `rest`, #. If type is `asyncapi`, #. If type is `rpc`, ##. If type is `graphql`, ##. If type is `odata`, #. If type is `expression`, defines the workflow expression. - */ - operation: string; - /** - * Defines the function type. Is either `rest`, `asyncapi, `rpc`, `graphql`, `odata`, `expression`, or `custom`. Default is `rest` - */ - type?: 'rest' | 'asyncapi' | 'rpc' | 'graphql' | 'odata' | 'expression' | 'custom'; - authRef?: - | string - | { - /** - * References an auth definition to be used to access the resource defined in the operation parameter - */ - resource: string; - /** - * References an auth definition to be used to invoke the operation - */ - invocation?: string; - }; - metadata?: /* Metadata information */ Metadata; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - const defaultModel = { type: 'rest' }; - Object.assign(this, defaultModel, model); - overwritePropertyAsPlainType('authRef', this); - overwriteMetadata(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Function} without deleted properties. - */ - - normalize = (): Function => { - const clone = new Function(this); - - normalizeType(clone, this.sourceModel); - - cleanSourceModelProperty(clone); - - return clone; - }; -} diff --git a/src/lib/definitions/functionref.ts b/src/lib/definitions/functionref.ts deleted file mode 100644 index b969bcec..00000000 --- a/src/lib/definitions/functionref.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { cleanSourceModelProperty, normalizeInvoke, overwritePropertyAsPlainType } from './utils'; - -export class Functionref { - sourceModel?: Functionref; - /** - * Name of the referenced function - */ - refName: string; - /** - * Function arguments/inputs - */ - arguments?: { - [key: string]: any; - }; - /** - * Only used if function type is 'graphql'. A string containing a valid GraphQL selection set - */ - selectionSet?: string; - /** - * Specifies if the function should be invoked sync or async - */ - invoke?: 'sync' | 'async'; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - Object.assign(this, model); - overwritePropertyAsPlainType('arguments', this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Functionref} without deleted properties. - */ - normalize = (): Functionref => { - const clone = new Functionref(this); - - normalizeInvoke(clone, this.sourceModel); - - cleanSourceModelProperty(clone); - - return clone; - }; -} diff --git a/src/lib/definitions/index.ts b/src/lib/definitions/index.ts index eae5388a..ed0f6e75 100644 --- a/src/lib/definitions/index.ts +++ b/src/lib/definitions/index.ts @@ -13,4 +13,5 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + export * as Specification from './specification'; diff --git a/src/lib/definitions/injectstate.ts b/src/lib/definitions/injectstate.ts deleted file mode 100644 index e25c657f..00000000 --- a/src/lib/definitions/injectstate.ts +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { End } from './end'; -import { Metadata } from './metadata'; -import { Statedatafilter } from './statedatafilter'; -import { Transition } from './transition'; -import { - cleanSourceModelProperty, - normalizeEnd, - normalizeTransition, - normalizeUsedForCompensation, - overwriteEnd, - overwriteMetadata, - overwriteStateDataFilter, - overwritePropertyAsPlainType, - overwriteTransition, - setEndValueIfNoTransition, -} from './utils'; - -export class Injectstate { - sourceModel?: Injectstate; - /** - * State name - */ - name?: string; - /** - * State type - */ - type?: 'inject'; - /** - * State end definition - */ - end?: boolean | End; - /** - * JSON object which can be set as states data input and can be manipulated via filters - */ - data?: { - [key: string]: any; - }; - /** - * State data filter - */ - stateDataFilter?: Statedatafilter; - /** - * Next transition of the workflow after injection has completed - */ - transition?: string | Transition; - /** - * Unique Name of a workflow state which is responsible for compensation of this state - */ - compensatedBy?: string; - /** - * If true, this state is used to compensate another state. Default is false - */ - usedForCompensation?: boolean; - metadata?: /* Metadata information */ Metadata; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - const defaultModel = { - id: undefined, - name: undefined, - type: 'inject', - usedForCompensation: false, - }; - Object.assign(this, defaultModel, model); - - overwriteEnd(this); - overwritePropertyAsPlainType('data', this); - overwriteStateDataFilter(this); - overwriteTransition(this); - overwriteMetadata(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Injectstate} without deleted properties. - */ - normalize = (): Injectstate => { - const clone = new Injectstate(this); - - normalizeEnd(clone); - normalizeTransition(clone); - normalizeUsedForCompensation(clone, this.sourceModel); - setEndValueIfNoTransition(clone); - - cleanSourceModelProperty(clone); - - return clone; - }; -} diff --git a/src/lib/definitions/metadata.ts b/src/lib/definitions/metadata.ts deleted file mode 100644 index 9e191da1..00000000 --- a/src/lib/definitions/metadata.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export class Metadata { - constructor(model: any) { - Object.assign(this, model); - } - - [name: string]: string; -} diff --git a/src/lib/definitions/oauth2propsdef.ts b/src/lib/definitions/oauth2propsdef.ts deleted file mode 100644 index 3d2b9943..00000000 --- a/src/lib/definitions/oauth2propsdef.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Metadata } from './metadata'; -import { overwriteMetadata } from './utils'; - -export class Oauth2propsdef { - /** - * String or a workflow expression. Contains the authority information - */ - authority?: string; - /** - * Defines the grant type - */ - grantType: 'password' | 'clientCredentials' | 'tokenExchange'; - /** - * String or a workflow expression. Contains the client identifier - */ - clientId: string; - /** - * Workflow secret or a workflow expression. Contains the client secret - */ - clientSecret?: string; - /** - * Array containing strings or workflow expressions. Contains the OAuth2 scopes - */ - scopes?: [string, ...string[]]; - /** - * String or a workflow expression. Contains the user name. Used only if grantType is 'resourceOwner' - */ - username?: string; - /** - * String or a workflow expression. Contains the user password. Used only if grantType is 'resourceOwner' - */ - password?: string; - /** - * Array containing strings or workflow expressions. Contains the OAuth2 audiences - */ - audiences?: [string, ...string[]]; - /** - * String or a workflow expression. Contains the subject token - */ - subjectToken?: string; - /** - * String or a workflow expression. Contains the requested subject - */ - requestedSubject?: string; - /** - * String or a workflow expression. Contains the requested issuer - */ - requestedIssuer?: string; - metadata?: /* Metadata information */ Metadata; - - constructor(model: any) { - Object.assign(this, model); - overwriteMetadata(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Oauth2propsdef} without deleted properties. - */ - normalize = (): Oauth2propsdef => { - const clone = new Oauth2propsdef(this); - return clone; - }; -} diff --git a/src/lib/definitions/onevents.ts b/src/lib/definitions/onevents.ts deleted file mode 100644 index fc30353a..00000000 --- a/src/lib/definitions/onevents.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Action } from './action'; -import { Eventdatafilter } from './eventdatafilter'; -import { - cleanSourceModelProperty, - normalizeActionMode, - normalizeActions, - overwriteActions, - overwriteEventDataFilter, -} from './utils'; - -export class Onevents { - sourceModel?: Onevents; - /** - * References one or more unique event names in the defined workflow events - */ - eventRefs: [string, ...string[]]; - /** - * Specifies how actions are to be performed (in sequence or in parallel) - */ - actionMode?: 'sequential' | 'parallel'; - /** - * Actions to be performed if expression matches - */ - actions?: Action[]; - /** - * Event data filter - */ - eventDataFilter?: Eventdatafilter; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - const defaultModel = { actionMode: 'sequential' }; - Object.assign(this, defaultModel, model); - - overwriteActions(this); - overwriteEventDataFilter(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Onevents} without deleted properties. - */ - normalize = (): Onevents => { - const clone = new Onevents(this); - - normalizeActionMode(clone, this.sourceModel); - normalizeActions(clone); - - cleanSourceModelProperty(clone); - - return clone; - }; -} diff --git a/src/lib/definitions/operationstate.ts b/src/lib/definitions/operationstate.ts deleted file mode 100644 index 3de32e52..00000000 --- a/src/lib/definitions/operationstate.ts +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Action } from './action'; -import { End } from './end'; -import { Error } from './error'; -import { Metadata } from './metadata'; -import { Statedatafilter } from './statedatafilter'; -import { Transition } from './transition'; -import { - cleanSourceModelProperty, - normalizeActionMode, - normalizeActions, - normalizeEnd, - normalizeOnErrors, - normalizeTransition, - normalizeUsedForCompensation, - overwriteActions, - overwriteEnd, - overwriteMetadata, - overwriteOnErrors, - overwriteStateDataFilter, - overwritePropertyAsPlainType, - overwriteTransition, - setEndValueIfNoTransition, -} from './utils'; -import { ActionExecTimeout, StateExecTimeout } from './types'; - -export class Operationstate { - sourceModel?: Operationstate; - /** - * State name - */ - name?: string; - /** - * State type - */ - type?: 'operation'; - /** - * State end definition - */ - end?: boolean | End; - /** - * State data filter - */ - stateDataFilter?: Statedatafilter; - /** - * Specifies whether actions are performed in sequence or in parallel - */ - actionMode?: 'sequential' | 'parallel'; - /** - * Actions to be performed - */ - actions?: Action[]; - /** - * State specific timeouts - */ - timeouts?: { - stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout; - actionExecTimeout?: /* Action execution timeout duration (ISO 8601 duration format) */ ActionExecTimeout; - }; - /** - * States error handling definitions - */ - onErrors?: Error[]; - /** - * Next transition of the workflow after all the actions have been performed - */ - transition?: string | Transition; - /** - * Unique Name of a workflow state which is responsible for compensation of this state - */ - compensatedBy?: string; - /** - * If true, this state is used to compensate another state. Default is false - */ - usedForCompensation?: boolean; - metadata?: /* Metadata information */ Metadata; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - const defaultModel = { - id: undefined, - name: undefined, - type: 'operation', - actionMode: 'sequential', - usedForCompensation: false, - }; - Object.assign(this, defaultModel, model); - - overwriteEnd(this); - overwriteStateDataFilter(this); - overwriteActions(this); - overwritePropertyAsPlainType('timeouts', this); - overwriteOnErrors(this); - overwriteTransition(this); - overwriteMetadata(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Operationstate} without deleted properties. - */ - normalize = (): Operationstate => { - const clone = new Operationstate(this); - - normalizeEnd(clone); - - normalizeActionMode(clone, this.sourceModel); - - normalizeActions(clone); - normalizeOnErrors(clone); - normalizeTransition(clone); - normalizeUsedForCompensation(clone, this.sourceModel); - setEndValueIfNoTransition(clone); - - cleanSourceModelProperty(clone); - - return clone; - }; -} diff --git a/src/lib/definitions/parallelstate.ts b/src/lib/definitions/parallelstate.ts deleted file mode 100644 index 2a3d6d50..00000000 --- a/src/lib/definitions/parallelstate.ts +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Branch } from './branch'; -import { End } from './end'; -import { Error } from './error'; -import { Metadata } from './metadata'; -import { Statedatafilter } from './statedatafilter'; -import { Transition } from './transition'; -import { - cleanSourceModelProperty, - normalizeBranches, - normalizeCompletionType, - normalizeEnd, - normalizeOnErrors, - normalizeTransition, - normalizeUsedForCompensation, - overwriteBranches, - overwriteEnd, - overwriteMetadata, - overwriteOnErrors, - overwriteStateDataFilter, - overwritePropertyAsPlainType, - overwriteTransition, - setEndValueIfNoTransition, -} from './utils'; -import { BranchExecTimeout, StateExecTimeout } from './types'; - -export class Parallelstate { - sourceModel?: Parallelstate; - /** - * State name - */ - name?: string; - /** - * State type - */ - type?: 'parallel'; - /** - * State end definition - */ - end?: boolean | End; - /** - * State data filter - */ - stateDataFilter?: Statedatafilter; - /** - * State specific timeouts - */ - timeouts?: { - stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout; - branchExecTimeout?: /* Branch execution timeout duration (ISO 8601 duration format) */ BranchExecTimeout; - }; - /** - * Branch Definitions - */ - branches?: /* Branch Definition */ Branch[]; - /** - * Option types on how to complete branch execution. - */ - completionType?: 'allOf' | 'atLeast'; - /** - * Used when completionType is set to 'atLeast' to specify the minimum number of branches that must complete before the state will transition. - */ - numCompleted?: number | string; - /** - * States error handling definitions - */ - onErrors?: Error[]; - /** - * Next transition of the workflow after all branches have completed execution - */ - transition?: string | Transition; - /** - * Unique Name of a workflow state which is responsible for compensation of this state - */ - compensatedBy?: string; - /** - * If true, this state is used to compensate another state. Default is false - */ - usedForCompensation?: boolean; - metadata?: /* Metadata information */ Metadata; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - const defaultModel = { - id: undefined, - name: undefined, - type: 'parallel', - completionType: 'allOf', - usedForCompensation: false, - }; - Object.assign(this, defaultModel, model); - - overwriteEnd(this); - overwriteStateDataFilter(this); - overwritePropertyAsPlainType('timeouts', this); - overwriteBranches(this); - overwriteOnErrors(this); - overwriteTransition(this); - overwriteMetadata(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Parallelstate} without deleted properties. - */ - normalize = (): Parallelstate => { - const clone = new Parallelstate(this); - - normalizeEnd(clone); - normalizeBranches(clone); - normalizeCompletionType(clone, this.sourceModel); - normalizeOnErrors(clone); - normalizeTransition(clone); - normalizeUsedForCompensation(clone, this.sourceModel); - setEndValueIfNoTransition(clone); - - cleanSourceModelProperty(clone); - - return clone; - }; -} diff --git a/src/lib/definitions/produceeventdef.ts b/src/lib/definitions/produceeventdef.ts deleted file mode 100644 index 3750cb01..00000000 --- a/src/lib/definitions/produceeventdef.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { overwritePropertyAsPlainType } from './utils'; - -export class Produceeventdef { - /** - * References a name of a defined event - */ - eventRef: string; - /** - * If String, expression which selects parts of the states data output to become the data of the produced event. If object a custom object to become the data of produced event. - */ - data?: - | string - | { - [key: string]: any; - }; - /** - * Add additional event extension context attributes - */ - contextAttributes?: { - [name: string]: string; - }; - - constructor(model: any) { - Object.assign(this, model); - overwritePropertyAsPlainType('data', this); - overwritePropertyAsPlainType('contextAttributes', this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Produceeventdef} without deleted properties. - */ - normalize = (): Produceeventdef => { - const clone = new Produceeventdef(this); - return clone; - }; -} diff --git a/src/lib/definitions/retrydef.ts b/src/lib/definitions/retrydef.ts deleted file mode 100644 index a85313f8..00000000 --- a/src/lib/definitions/retrydef.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export class Retrydef { - /** - * Unique retry strategy name - */ - name: string; - /** - * Time delay between retry attempts (ISO 8601 duration format) - */ - delay?: string; - /** - * Maximum time delay between retry attempts (ISO 8601 duration format) - */ - maxDelay?: string; - /** - * Static value by which the delay increases during each attempt (ISO 8601 time format) - */ - increment?: string; - /** - * Numeric value, if specified the delay between retries is multiplied by this value. - */ - multiplier?: number | string; - /** - * Maximum number of retry attempts. - */ - maxAttempts: number | string; - /** - * If float type, maximum amount of random time added or subtracted from the delay between each retry relative to total delay (between 0 and 1). If string type, absolute maximum amount of random time added or subtracted from the delay between each retry (ISO 8601 duration format) - */ - jitter?: number | string; - - constructor(model: any) { - Object.assign(this, model); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Retrydef} without deleted properties. - */ - normalize = (): Retrydef => { - const clone = new Retrydef(this); - return clone; - }; -} diff --git a/src/lib/definitions/schedule.ts b/src/lib/definitions/schedule.ts deleted file mode 100644 index c3f7506d..00000000 --- a/src/lib/definitions/schedule.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Crondef } from './crondef'; -import { overwriteCron } from './utils'; - -export class Schedule { - /** - * Time interval (must be repeating interval) described with ISO 8601 format. Declares when workflow instances will be automatically created. - */ - interval?: string; - cron?: string | Crondef; - /** - * Timezone name used to evaluate the interval & cron-expression. (default: UTC) - */ - timezone?: string; - - constructor(model: any) { - Object.assign(this, model); - - overwriteCron(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Schedule} without deleted properties. - */ - normalize = (): Schedule => { - const clone = new Schedule(this); - return clone; - }; -} diff --git a/src/lib/definitions/sleep.ts b/src/lib/definitions/sleep.ts deleted file mode 100644 index cfbd4a35..00000000 --- a/src/lib/definitions/sleep.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export class Sleep { - /** - * Amount of time (ISO 8601 duration format) to sleep before function/subflow invocation. Does not apply if 'eventRef' is defined. - */ - before: string; - /** - * Amount of time (ISO 8601 duration format) to sleep after function/subflow invocation. Does not apply if 'eventRef' is defined. - */ - after?: string; - - constructor(model: any) { - Object.assign(this, model); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Sleep} without deleted properties. - */ - normalize = (): Sleep => { - const clone = new Sleep(this); - return clone; - }; -} diff --git a/src/lib/definitions/sleepstate.ts b/src/lib/definitions/sleepstate.ts deleted file mode 100644 index 58843cee..00000000 --- a/src/lib/definitions/sleepstate.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { End } from './end'; -import { Metadata } from './metadata'; -import { Transition } from './transition'; -import { - cleanSourceModelProperty, - normalizeEnd, - normalizeTransition, - overwriteEnd, - overwriteMetadata, - overwriteTransition, - setEndValueIfNoTransition, -} from './utils'; - -export class Sleepstate { - sourceModel?: Sleepstate; - /** - * State name - */ - name?: string; - /** - * State type - */ - type: 'sleep'; - end?: End; - /** - * Duration (ISO 8601 duration format) to sleep - */ - duration?: string; - - transition?: string | Transition; - - metadata?: /* Metadata information */ Metadata; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - const defaultModel = { - id: undefined, - name: undefined, - type: 'sleep', - }; - Object.assign(this, defaultModel, model); - - overwriteEnd(this); - overwriteTransition(this); - overwriteMetadata(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Delaystate} without deleted properties. - */ - normalize = (): Sleepstate => { - const clone = new Sleepstate(this); - - normalizeEnd(clone); - normalizeTransition(clone); - setEndValueIfNoTransition(clone); - - cleanSourceModelProperty(clone); - - return clone; - }; -} diff --git a/src/lib/definitions/specification.ts b/src/lib/definitions/specification.ts index 436473bd..2bf3163f 100644 --- a/src/lib/definitions/specification.ts +++ b/src/lib/definitions/specification.ts @@ -14,51 +14,1093 @@ * limitations under the License. */ -export * from './workflow'; -export * from './action'; -export * from './actiondatafilter'; -export * from './authdef'; -export * from './basicpropsdef'; -export * from './bearerpropsdef'; -export * from './branch'; -export * from './callbackstate'; -export * from './continueasdef'; -export * from './correlationDef'; -export * from './crondef'; -export * from './databasedswitchstate'; -export * from './defaultconditiondef'; -export * from './end'; -export * from './enddatacondition'; -export * from './endeventcondition'; -export * from './error'; -export * from './errordef'; -export * from './eventbasedswitchstate'; -export * from './eventdatafilter'; -export * from './eventdef'; -export * from './eventref'; -export * from './eventstate'; -export * from './extension'; -export * from './foreachstate'; -export * from './function'; -export * from './functionref'; -export * from './injectstate'; -export * from './metadata'; -export * from './oauth2propsdef'; -export * from './onevents'; -export * from './operationstate'; -export * from './parallelstate'; -export * from './produceeventdef'; -export * from './retrydef'; -export * from './schedule'; -export * from './sleep'; -export * from './sleepstate'; -export * from './startdef'; -export * from './statedatafilter'; -export * from './subflowref'; -export * from './timeouts'; -export * from './transition'; -export * from './transitiondatacondition'; -export * from './transitioneventcondition'; -export * from './workflow'; -export * from './workflowExecTimeout'; -export * from './types'; +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +/** + * The schema used to describe and validate the input of the workflow or task. + */ +export type Schema = { + /** + * The schema's format. Defaults to 'json'. The (optional) version of the format can be set using `{format}:{version}`. + */ + format?: string; + [k: string]: unknown; +} & ( + | { + /** + * The schema's inline definition. + */ + document: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + | { + /** + * The schema's external resource. + */ + resource: + | string + | { + /** + * The endpoint's URI. + */ + uri: string; + /** + * The authentication policy to use. + */ + authentication?: AuthenticationPolicy | string; + /** + * The external resource's name, if any. + */ + name?: string; + [k: string]: unknown; + }; + [k: string]: unknown; + } +); +/** + * Defines an authentication policy. + * + * This interface was referenced by `Workflow`'s JSON-Schema + * via the `definition` "authenticationPolicy". + */ +export type AuthenticationPolicy = + | { + basic: { + /** + * The username to use. + */ + username: string; + /** + * The password to use. + */ + password: string; + [k: string]: unknown; + }; + [k: string]: unknown; + } + | { + bearer: { + /** + * The bearer token to use. + */ + token: string; + [k: string]: unknown; + }; + [k: string]: unknown; + } + | { + oauth2: { + /** + * The URI that references the OAuth2 authority to use. + */ + authority: string; + /** + * The grant type to use. + */ + grant: string; + client: { + /** + * The client id to use. + */ + id: string; + /** + * The client secret to use, if any. + */ + secret?: string; + [k: string]: unknown; + }; + /** + * The scopes, if any, to request the token for. + */ + scopes?: string[]; + /** + * The audiences, if any, to request the token for. + */ + audiences?: string[]; + /** + * The username to use. Used only if the grant type is Password. + */ + username?: string; + /** + * The password to use. Used only if the grant type is Password. + */ + password?: string; + subject?: Oauth2Token; + actor?: Oauth2Token; + [k: string]: unknown; + }; + [k: string]: unknown; + }; +/** + * This interface was referenced by `Workflow`'s JSON-Schema + * via the `definition` "task". + */ +export type Task = + | CallTask + | DoTask + | ForkTask + | EmitTask + | ForTask + | ListenTask + | RaiseTask + | RunTask + | SetTask + | SwitchTask + | TryTask + | WaitTask; +/** + * This interface was referenced by `Workflow`'s JSON-Schema + * via the `definition` "callTask". + */ +export type CallTask = CallAsyncAPI | CallGRPC | CallHTTP | CallOpenAPI | CallFunction; +/** + * Defines the event(s) to listen to. + */ +export type EventConsumptionStrategy = + | { + /** + * A list containing all the events that must be consumed. + */ + all: EventFilter[]; + [k: string]: unknown; + } + | { + /** + * A list containing any of the events to consume. + */ + any: EventFilter[]; + [k: string]: unknown; + } + | { + one: EventFilter; + [k: string]: unknown; + }; +/** + * This interface was referenced by `Workflow`'s JSON-Schema + * via the `definition` "externalResource". + */ +export type ExternalResource = + | string + | { + /** + * The endpoint's URI. + */ + uri: string; + /** + * The authentication policy to use. + */ + authentication?: AuthenticationPolicy | string; + /** + * The external resource's name, if any. + */ + name?: string; + [k: string]: unknown; + }; +/** + * The task(s) to execute before the extended task, if any. + */ +export type TaskList = { + [k: string]: Task; +}[]; +/** + * This interface was referenced by `Workflow`'s JSON-Schema + * via the `definition` "flowDirective". + */ +export type FlowDirective = ('continue' | 'exit' | 'end') | string; + +/** + * Serverless Workflow DSL - Workflow Schema + */ +export interface Workflow { + /** + * Documents the workflow + */ + document: { + /** + * The version of the DSL used by the workflow. + */ + dsl: string; + /** + * The workflow's namespace. + */ + namespace: string; + /** + * The workflow's name. + */ + name: string; + /** + * The workflow's semantic version. + */ + version: string; + /** + * The workflow's title. + */ + title?: string; + /** + * The workflow's Markdown summary. + */ + summary?: string; + /** + * A key/value mapping of the workflow's tags, if any. + */ + tags?: { + [k: string]: unknown; + }; + [k: string]: unknown; + }; + input?: Input; + /** + * Defines the workflow's reusable components. + */ + use?: { + /** + * The workflow's reusable authentication policies. + */ + authentications?: { + [k: string]: AuthenticationPolicy; + }; + /** + * The workflow's reusable errors. + */ + errors?: { + [k: string]: Error; + }; + /** + * The workflow's extensions. + */ + extensions?: { + [k: string]: Extension; + }[]; + /** + * The workflow's reusable functions. + */ + functions?: { + [k: string]: Task; + }; + /** + * The workflow's reusable retry policies. + */ + retries?: { + [k: string]: RetryPolicy; + }; + /** + * The workflow's secrets. + */ + secrets?: string[]; + [k: string]: unknown; + }; + do: TaskList; + timeout?: Timeout; + output?: Output; + /** + * Schedules the workflow + */ + schedule?: { + every?: Duration; + /** + * Specifies the schedule using a cron expression, e.g., '0 0 * * *' for daily at midnight." + */ + cron?: string; + after?: Duration; + on?: EventConsumptionStrategy; + [k: string]: unknown; + }; + [k: string]: unknown; +} +/** + * Configures the workflow's input. + */ +export interface Input { + schema?: Schema; + /** + * A runtime expression, if any, used to mutate and/or filter the input of the workflow or task. + */ + from?: string; + [k: string]: unknown; +} +/** + * The security token that represents the identity of the party on behalf of whom the request is being made. + */ +export interface Oauth2Token { + /** + * The security token to use to use. + */ + token: string; + /** + * The type of the security token to use to use. + */ + type: string; + [k: string]: unknown; +} + +/** + * This interface was referenced by `Workflow`'s JSON-Schema + * via the `definition` "error". + */ +export interface Error { + /** + * A URI reference that identifies the error type. + */ + type: string; + /** + * The status code generated by the origin for this occurrence of the error. + */ + status: number; + /** + * A JSON Pointer used to reference the component the error originates from. + */ + instance: string; + /** + * A short, human-readable summary of the error. + */ + title?: string; + /** + * A human-readable explanation specific to this occurrence of the error. + */ + detail?: string; + [k: string]: unknown; +} +/** + * The definition of a an extension. + * + * This interface was referenced by `Workflow`'s JSON-Schema + * via the `definition` "extension". + */ +export interface Extension { + /** + * The type of task to extend. + */ + extend: + | 'call' + | 'composite' + | 'emit' + | 'for' + | 'listen' + | 'raise' + | 'run' + | 'set' + | 'switch' + | 'try' + | 'wait' + | 'all'; + /** + * A runtime expression, if any, used to determine whether or not the extension should apply in the specified context. + */ + when?: string; + before?: TaskList; + after?: TaskList; + [k: string]: unknown; +} +export interface CallAsyncAPI { + call: 'asyncapi'; + /** + * Defines the AsyncAPI call to perform. + */ + with: { + /** + * The document that defines the AsyncAPI operation to call. + */ + document: + | string + | { + /** + * The endpoint's URI. + */ + uri: string; + /** + * The authentication policy to use. + */ + authentication?: AuthenticationPolicy | string; + /** + * The external resource's name, if any. + */ + name?: string; + [k: string]: unknown; + }; + /** + * A reference to the AsyncAPI operation to call. + */ + operationRef: string; + /** + * A a reference to the server to call the specified AsyncAPI operation on. If not set, default to the first server matching the operation's channel. + */ + server?: string; + /** + * The name of the message to use. If not set, defaults to the first message defined by the operation. + */ + message?: string; + /** + * The name of the binding to use. If not set, defaults to the first binding defined by the operation. + */ + binding?: string; + /** + * The payload to call the AsyncAPI operation with, if any. + */ + payload?: { + [k: string]: unknown; + }; + /** + * The authentication policy, if any, to use when calling the AsyncAPI operation. + */ + authentication?: AuthenticationPolicy | string; + }; + [k: string]: unknown; +} +export interface CallGRPC { + call: 'grpc'; + /** + * Defines the GRPC call to perform. + */ + with: { + /** + * The proto resource that describes the GRPC service to call. + */ + proto: + | string + | { + /** + * The endpoint's URI. + */ + uri: string; + /** + * The authentication policy to use. + */ + authentication?: AuthenticationPolicy | string; + /** + * The external resource's name, if any. + */ + name?: string; + [k: string]: unknown; + }; + service: { + /** + * The name of the GRPC service to call. + */ + name: string; + /** + * The hostname of the GRPC service to call. + */ + host: string; + /** + * The port number of the GRPC service to call. + */ + port?: number; + /** + * The endpoint's authentication policy, if any. + */ + authentication?: AuthenticationPolicy | string; + [k: string]: unknown; + }; + /** + * The name of the method to call on the defined GRPC service. + */ + method: string; + /** + * The arguments, if any, to call the method with. + */ + arguments?: { + [k: string]: unknown; + }; + }; + [k: string]: unknown; +} +export interface CallHTTP { + call: 'http'; + /** + * Defines the HTTP call to perform. + */ + with: { + /** + * The HTTP method of the HTTP request to perform. + */ + method: string; + /** + * The HTTP endpoint to send the request to. + */ + endpoint: Endpoint | string; + /** + * A name/value mapping of the headers, if any, of the HTTP request to perform. + */ + headers?: { + [k: string]: unknown; + }; + /** + * The body, if any, of the HTTP request to perform. + */ + body?: { + [k: string]: unknown; + }; + /** + * The http call output format. Defaults to 'content'. + */ + output?: 'raw' | 'content' | 'response'; + }; + [k: string]: unknown; +} +/** + * This interface was referenced by `Workflow`'s JSON-Schema + * via the `definition` "endpoint". + */ +export interface Endpoint { + /** + * The endpoint's URI. + */ + uri: string; + /** + * The authentication policy to use. + */ + authentication?: AuthenticationPolicy | string; + [k: string]: unknown; +} +export interface CallOpenAPI { + call: 'openapi'; + /** + * Defines the OpenAPI call to perform. + */ + with: { + /** + * The document that defines the OpenAPI operation to call. + */ + document: + | string + | { + /** + * The endpoint's URI. + */ + uri: string; + /** + * The authentication policy to use. + */ + authentication?: AuthenticationPolicy | string; + /** + * The external resource's name, if any. + */ + name?: string; + [k: string]: unknown; + }; + /** + * The id of the OpenAPI operation to call. + */ + operationId: string; + /** + * A name/value mapping of the parameters of the OpenAPI operation to call. + */ + parameters?: { + [k: string]: unknown; + }; + /** + * The authentication policy, if any, to use when calling the OpenAPI operation. + */ + authentication?: AuthenticationPolicy | string; + /** + * The http call output format. Defaults to 'content'. + */ + output?: 'raw' | 'content' | 'response'; + }; + [k: string]: unknown; +} +export interface CallFunction { + /** + * The name of the function to call. + */ + call: string; + /** + * A name/value mapping of the parameters, if any, to call the function with. + */ + with?: { + [k: string]: unknown; + }; + [k: string]: unknown; +} +/** + * Allows to execute a list of tasks in sequence + */ +export interface DoTask { + do: TaskList; + [k: string]: unknown; +} +/** + * Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output. + */ +export interface ForkTask { + fork: { + branches: TaskList; + /** + * Indicates whether or not the concurrent tasks are racing against each other, with a single possible winner, which sets the composite task's output. + */ + compete?: boolean; + [k: string]: unknown; + }; + [k: string]: unknown; +} +/** + * Allows workflows to publish events to event brokers or messaging systems, facilitating communication and coordination between different components and services. + */ +export interface EmitTask { + emit: { + event: { + /** + * The event's unique identifier + */ + id?: string; + /** + * Identifies the context in which an event happened + */ + source: string; + /** + * This attribute contains a value describing the type of event related to the originating occurrence. + */ + type: string; + time?: string; + subject?: string; + /** + * Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format. + */ + datacontenttype?: string; + dataschema?: string; + [k: string]: unknown; + }; + [k: string]: unknown; + }; + [k: string]: unknown; +} +/** + * Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets. + */ +export interface ForTask { + for: { + /** + * The name of the variable used to store the current item being enumerated. + */ + each?: string; + /** + * A runtime expression used to get the collection to enumerate. + */ + in: string; + /** + * The name of the variable used to store the index of the current item being enumerated. + */ + at?: string; + [k: string]: unknown; + }; + /** + * A runtime expression that represents the condition, if any, that must be met for the iteration to continue. + */ + while?: string; + do: TaskList; + [k: string]: unknown; +} +/** + * Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems. + */ +export interface ListenTask { + listen: { + to: EventConsumptionStrategy; + [k: string]: unknown; + }; + [k: string]: unknown; +} +/** + * An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes. + * + * This interface was referenced by `Workflow`'s JSON-Schema + * via the `definition` "eventFilter". + */ +export interface EventFilter { + /** + * An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes. + */ + with: { + /** + * The event's unique identifier + */ + id?: string; + /** + * Identifies the context in which an event happened + */ + source?: string; + /** + * This attribute contains a value describing the type of event related to the originating occurrence. + */ + type?: string; + time?: string; + subject?: string; + /** + * Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format. + */ + datacontenttype?: string; + dataschema?: string; + [k: string]: unknown; + }; + /** + * A correlation is a link between events and data, established by mapping event attributes to specific data attributes, allowing for coordinated processing or handling based on event characteristics. + */ + correlate?: { + [k: string]: { + /** + * A runtime expression used to extract the correlation value from the filtered event. + */ + from: string; + /** + * A constant or a runtime expression, if any, used to determine whether or not the extracted correlation value matches expectations. If not set, the first extracted value will be used as the correlation's expectation. + */ + expect?: string; + [k: string]: unknown; + }; + }; + [k: string]: unknown; +} + +/** + * Intentionally triggers and propagates errors. + */ +export interface RaiseTask { + raise: { + error: Error; + [k: string]: unknown; + }; + [k: string]: unknown; +} + +/** + * Provides the capability to execute external containers, shell commands, scripts, or workflows. + */ +export interface RunTask { + run: + | { + container: { + /** + * The name of the container image to run. + */ + image: string; + /** + * The command, if any, to execute on the container + */ + command?: string; + /** + * The container's port mappings, if any. + */ + ports?: { + [k: string]: unknown; + }; + /** + * The container's volume mappings, if any. + */ + volumes?: { + [k: string]: unknown; + }; + /** + * A key/value mapping of the environment variables, if any, to use when running the configured process. + */ + environment?: { + [k: string]: unknown; + }; + [k: string]: unknown; + }; + [k: string]: unknown; + } + | { + script: + | { + code: string; + [k: string]: unknown; + } + | { + source: ExternalResource; + [k: string]: unknown; + }; + [k: string]: unknown; + } + | { + shell: { + /** + * The shell command to run. + */ + command: string; + /** + * A list of the arguments of the shell command to run. + */ + arguments?: { + [k: string]: unknown; + }; + /** + * A key/value mapping of the environment variables, if any, to use when running the configured process. + */ + environment?: { + [k: string]: unknown; + }; + [k: string]: unknown; + }; + [k: string]: unknown; + } + | { + workflow: { + /** + * The namespace the workflow to run belongs to. + */ + namespace: string; + /** + * The name of the workflow to run. + */ + name: string; + /** + * The version of the workflow to run. Defaults to latest + */ + version: string; + /** + * The data, if any, to pass as input to the workflow to execute. The value should be validated against the target workflow's input schema, if specified. + */ + input?: { + [k: string]: unknown; + }; + [k: string]: unknown; + }; + [k: string]: unknown; + }; + [k: string]: unknown; +} +/** + * A task used to set data + */ +export interface SetTask { + /** + * The data to set + */ + set: { + [k: string]: unknown; + }; + [k: string]: unknown; +} +/** + * Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria + */ +export interface SwitchTask { + /** + * @minItems 1 + */ + switch: [ + { + [k: string]: { + /** + * The case's name. + */ + name?: string; + /** + * A runtime expression used to determine whether or not the case matches. + */ + when?: string; + /** + * The flow directive to execute when the case matches. + */ + then?: ('continue' | 'exit' | 'end') | string; + [k: string]: unknown; + }; + }, + ...{ + [k: string]: { + /** + * The case's name. + */ + name?: string; + /** + * A runtime expression used to determine whether or not the case matches. + */ + when?: string; + /** + * The flow directive to execute when the case matches. + */ + then?: ('continue' | 'exit' | 'end') | string; + [k: string]: unknown; + }; + }[], + ]; + [k: string]: unknown; +} +/** + * Serves as a mechanism within workflows to handle errors gracefully, potentially retrying failed tasks before proceeding with alternate ones. + */ +export interface TryTask { + try: TaskList; + catch: { + errors?: { + [k: string]: unknown; + }; + /** + * The name of the runtime expression variable to save the error as. Defaults to 'error'. + */ + as?: string; + /** + * A runtime expression used to determine whether or not to catch the filtered error + */ + when?: string; + /** + * A runtime expression used to determine whether or not to catch the filtered error + */ + exceptWhen?: string; + retry?: RetryPolicy; + do?: TaskList; + [k: string]: unknown; + }; + [k: string]: unknown; +} +/** + * The retry policy to use, if any, when catching errors. + */ +export interface RetryPolicy { + /** + * A runtime expression, if any, used to determine whether or not to retry running the task, in a given context. + */ + when?: string; + /** + * A runtime expression used to determine whether or not to retry running the task, in a given context. + */ + exceptWhen?: string; + delay?: Duration; + /** + * The retry duration backoff. + */ + backoff?: + | { + /** + * The definition of the constant backoff to use, if any. + */ + constant: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + | { + /** + * The definition of the exponential backoff to use, if any. + */ + exponential: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + | { + /** + * The definition of the linear backoff to use, if any. + */ + linear: { + [k: string]: unknown; + }; + [k: string]: unknown; + }; + /** + * The retry limit, if any + */ + limit?: { + attempt?: { + /** + * The maximum amount of retry attempts, if any. + */ + count?: number; + duration?: Duration; + [k: string]: unknown; + }; + duration?: Duration; + [k: string]: unknown; + }; + /** + * The parameters, if any, that control the randomness or variability of the delay between retry attempts. + */ + jitter?: { + from: Duration; + to: Duration; + [k: string]: unknown; + }; + [k: string]: unknown; +} +/** + * The duration to wait between retry attempts. + */ +export interface Duration { + /** + * Number of days, if any. + */ + days?: number; + /** + * Number of days, if any. + */ + hours?: number; + /** + * Number of minutes, if any. + */ + minutes?: number; + /** + * Number of seconds, if any. + */ + seconds?: number; + /** + * Number of milliseconds, if any. + */ + milliseconds?: number; + [k: string]: unknown; +} + +/** + * Allows workflows to pause or delay their execution for a specified period of time. + */ +export interface WaitTask { + wait: Duration; + [k: string]: unknown; +} + +/** + * The workflow's timeout configuration, if any. + */ +export interface Timeout { + after: Duration; + [k: string]: unknown; +} + +/** + * Configures the workflow's output. + */ +export interface Output { + schema?: Schema; + /** + * A runtime expression, if any, used to mutate and/or filter the output of the workflow or task. + */ + as?: string; + [k: string]: unknown; +} + +/** + * This interface was referenced by `Workflow`'s JSON-Schema + * via the `definition` "taskBase". + */ +export interface TaskBase { + /** + * A runtime expression, if any, used to determine whether or not the task should be run. + */ + if?: string; + input?: Input; + output?: Output; + export?: Export; + timeout?: Timeout; + /** + * The flow directive to be performed upon completion of the task. + */ + then?: ('continue' | 'exit' | 'end') | string; + [k: string]: unknown; +} + +/** + * Export task output to context. + */ +export interface Export { + schema?: Schema; + /** + * A runtime expression, if any, used to export the output data to the context. + */ + as?: string; + [k: string]: unknown; +} diff --git a/src/lib/definitions/startdef.ts b/src/lib/definitions/startdef.ts deleted file mode 100644 index e53c520f..00000000 --- a/src/lib/definitions/startdef.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Schedule } from './schedule'; -import { overwriteSchedule } from './utils'; - -export class Startdef { - /** - * Name of the starting workflow state - */ - stateName?: string; - /** - * Define the time/repeating intervals or cron at which workflow instances should be automatically started. - */ - schedule: string | Schedule; - - constructor(model: any) { - Object.assign(this, model); - - overwriteSchedule(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Startdef} without deleted properties. - */ - normalize = (): Startdef => { - const clone = new Startdef(this); - return clone; - }; -} diff --git a/src/lib/definitions/statedatafilter.ts b/src/lib/definitions/statedatafilter.ts deleted file mode 100644 index e7487ab6..00000000 --- a/src/lib/definitions/statedatafilter.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export class Statedatafilter { - /** - * Workflow expression to filter the state data input - */ - input?: string; - /** - * Workflow expression that filters the state data output - */ - output?: string; - - constructor(model: any) { - Object.assign(this, model); - } - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Statedatafilter} without deleted properties. - */ - normalize = (): Statedatafilter => { - const clone = new Statedatafilter(this); - return clone; - }; -} diff --git a/src/lib/definitions/subflowref.ts b/src/lib/definitions/subflowref.ts deleted file mode 100644 index 9cc3445d..00000000 --- a/src/lib/definitions/subflowref.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { cleanSourceModelProperty, normalizeInvoke, normalizeOnParentComplete } from './utils'; - -export class Subflowref { - sourceModel?: Subflowref; - /** - * Unique id of the sub-workflow to be invoked - */ - workflowId: string; - /** - * Version of the sub-workflow to be invoked - */ - version?: string; // ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ - /** - * If invoke is 'async', specifies how subflow execution should behave when parent workflow completes. Default is 'terminate' - */ - onParentComplete?: 'continue' | 'terminate'; - /** - * Specifies if the subflow should be invoked sync or async - */ - invoke?: 'sync' | 'async'; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - Object.assign(this, model); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Subflowref} without deleted properties. - */ - normalize = (): Subflowref => { - const clone = new Subflowref(this); - - normalizeInvoke(clone, this.sourceModel); - normalizeOnParentComplete(clone, this.sourceModel); - - cleanSourceModelProperty(clone); - return clone; - }; -} diff --git a/src/lib/definitions/timeouts.ts b/src/lib/definitions/timeouts.ts deleted file mode 100644 index d6c54908..00000000 --- a/src/lib/definitions/timeouts.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { WorkflowExecTimeout } from './workflowExecTimeout'; -import { ActionExecTimeout, BranchExecTimeout, EventTimeout, StateExecTimeout } from './types'; -import { cleanSourceModelProperty, normalizeWorkflowExecTimeout, overwriteWorkflowExecTimeout } from './utils'; - -export class Timeouts { - sourceModel?: Timeouts; - workflowExecTimeout?: WorkflowExecTimeout; - stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout; - actionExecTimeout?: /* Action execution timeout duration (ISO 8601 duration format) */ ActionExecTimeout; - branchExecTimeout?: /* Branch execution timeout duration (ISO 8601 duration format) */ BranchExecTimeout; - eventTimeout?: /* Timeout duration to wait for consuming defined events (ISO 8601 duration format) */ EventTimeout; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - Object.assign(this, model); - overwriteWorkflowExecTimeout(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Exectimeout} without deleted properties. - */ - normalize = (): Timeouts => { - const clone = new Timeouts(this); - normalizeWorkflowExecTimeout(clone); - - cleanSourceModelProperty(clone); - return clone; - }; -} diff --git a/src/lib/definitions/transition.ts b/src/lib/definitions/transition.ts deleted file mode 100644 index 4477f616..00000000 --- a/src/lib/definitions/transition.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Produceeventdef } from './produceeventdef'; -import { cleanSourceModelProperty, normalizeCompensate, overwriteProduceEvents } from './utils'; - -export class Transition { - sourceModel?: Transition; - /** - * Name of state to transition to - */ - nextState: string; - /** - * Array of events to be produced before the transition happens - */ - produceEvents?: /* Produce an event and set its data */ Produceeventdef[]; - /** - * If set to true, triggers workflow compensation when before this transition is taken. Default is false - */ - compensate?: boolean; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - const defaultModel = { - compensate: false, - }; - Object.assign(this, defaultModel, model); - - overwriteProduceEvents(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Transition} without deleted properties. - */ - normalize = (): Transition => { - const clone = new Transition(this); - - normalizeCompensate(clone, this.sourceModel); - - cleanSourceModelProperty(clone); - return clone; - }; -} diff --git a/src/lib/definitions/transitiondatacondition.ts b/src/lib/definitions/transitiondatacondition.ts deleted file mode 100644 index 65dda3b9..00000000 --- a/src/lib/definitions/transitiondatacondition.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Metadata } from './metadata'; -import { Transition } from './transition'; -import { cleanSourceModelProperty, normalizeTransition, overwriteMetadata, overwriteTransition } from './utils'; - -export class Transitiondatacondition { - sourceModel?: Transitiondatacondition; - /** - * Data condition name - */ - name?: string; - /** - * Workflow expression evaluated against state data. Must evaluate to true or false - */ - condition: string; - /** - * Workflow transition if condition is evaluated to true - */ - transition: string | Transition; - metadata?: /* Metadata information */ Metadata; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - Object.assign(this, model); - - overwriteTransition(this); - overwriteMetadata(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Transitiondatacondition} without deleted properties. - */ - normalize = (): Transitiondatacondition => { - const clone = new Transitiondatacondition(this); - - normalizeTransition(clone); - - cleanSourceModelProperty(clone); - return clone; - }; -} diff --git a/src/lib/definitions/transitioneventcondition.ts b/src/lib/definitions/transitioneventcondition.ts deleted file mode 100644 index 7fe0bd89..00000000 --- a/src/lib/definitions/transitioneventcondition.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Eventdatafilter } from './eventdatafilter'; -import { Metadata } from './metadata'; -import { Transition } from './transition'; -import { - cleanSourceModelProperty, - normalizeTransition, - overwriteEventDataFilter, - overwriteMetadata, - overwriteTransition, -} from './utils'; - -export class Transitioneventcondition { - sourceModel?: Transitioneventcondition; - /** - * Event condition name - */ - name?: string; - /** - * References an unique event name in the defined workflow events - */ - eventRef: string; - /** - * Next transition of the workflow if there is valid matches - */ - transition: string | Transition; - /** - * Event data filter definition - */ - eventDataFilter?: Eventdatafilter; - metadata?: /* Metadata information */ Metadata; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - Object.assign(this, model); - - overwriteTransition(this); - overwriteEventDataFilter(this); - overwriteMetadata(this); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Transitioneventcondition} without deleted properties. - */ - normalize = (): Transitioneventcondition => { - const clone = new Transitioneventcondition(this); - - normalizeTransition(clone); - - cleanSourceModelProperty(clone); - return clone; - }; -} diff --git a/src/lib/definitions/types.ts b/src/lib/definitions/types.ts deleted file mode 100644 index 87254a23..00000000 --- a/src/lib/definitions/types.ts +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { CorrelationDef } from './correlationDef'; -import { Transitiondatacondition } from './transitiondatacondition'; -import { Enddatacondition } from './enddatacondition'; -import { Retrydef } from './retrydef'; -import { Function } from './function'; -import { Databasedswitchstate } from './databasedswitchstate'; -import { Eventbasedswitchstate } from './eventbasedswitchstate'; -import { Transitioneventcondition } from './transitioneventcondition'; -import { Endeventcondition } from './endeventcondition'; -import { Eventstate } from './eventstate'; -import { Operationstate } from './operationstate'; -import { Parallelstate } from './parallelstate'; -import { Injectstate } from './injectstate'; -import { Foreachstate } from './foreachstate'; -import { Callbackstate } from './callbackstate'; -import { Eventdef } from './eventdef'; -import { Sleepstate } from './sleepstate'; -import { Authdef } from './authdef'; -import { Errordef } from './errordef'; -import { Specification } from './index'; -import { Extension } from './extension'; - -export type CorrelationDefs = [ - /* CloudEvent correlation definition */ CorrelationDef, - .../* CloudEvent correlation definition */ CorrelationDef[] -]; - -export type Datacondition /* Switch state data based condition */ = - | Transitiondatacondition - | /* Switch state data based condition */ Enddatacondition; - -export type Retries = string /* uri */ | [Retrydef, ...Retrydef[]]; - -export type Functions = string /* uri */ | [Function, ...Function[]]; - -export type Switchstate /* Permits transitions to other states based on data conditions */ = - | Databasedswitchstate - | /* Permits transitions to other states based on events */ Eventbasedswitchstate; - -export type Eventcondition /* Switch state data event condition */ = - | Transitioneventcondition - | /* Switch state data event condition */ Endeventcondition; - -export type States = [ - ( - | /* Causes the workflow execution to sleep for a specified duration */ Sleepstate - | /* This state is used to wait for events from event sources, then consumes them and invoke one or more actions to run in sequence or parallel */ Eventstate - | /* Defines actions be performed. Does not wait for incoming events */ Operationstate - | /* Consists of a number of states that are executed in parallel */ Parallelstate - | Switchstate - | /* Inject static data into state data. Does not perform any actions */ Injectstate - | /* Execute a set of defined actions or workflows for each element of a data array */ Foreachstate - | /* This state performs an action, then waits for the callback event that denotes completion of the action */ Callbackstate - ), - ...( - | /* Causes the workflow execution to sleep for a specified duration */ Sleepstate - | /* This state is used to wait for events from event sources, then consumes them and invoke one or more actions to run in sequence or parallel */ Eventstate - | /* Defines actions be performed. Does not wait for incoming events */ Operationstate - | /* Consists of a number of states that are executed in parallel */ Parallelstate - | Switchstate - | /* Inject static data into state data. Does not perform any actions */ Injectstate - | /* Execute a set of defined actions or workflows for each element of a data array */ Foreachstate - | /* This state performs an action, then waits for the callback event that denotes completion of the action */ Callbackstate - )[] -]; - -/** - * Branch execution timeout duration (ISO 8601 duration format) - */ -export type BranchExecTimeout = string; - -/** - * Action execution timeout duration (ISO 8601 duration format) - */ -export type ActionExecTimeout = string; - -/** - * Timeout duration to wait for consuming defined events (ISO 8601 duration format) - */ -export type EventTimeout = string; - -export type Secrets = string /* uri */ | [string, ...string[]]; - -export type Events = string /* uri */ | [Eventdef, ...Eventdef[]]; - -export type Auth = string /* uri */ | [Authdef, ...Authdef[]]; - -export type Errors = string /* uri */ | [Errordef, ...Errordef[]]; - -export type Properties = Specification.Basicpropsdef | Specification.Bearerpropsdef | Specification.Oauth2propsdef; - -export type Extensions = string /* uri */ | [Extension, ...Extension[]]; - -/** - * Workflow state execution timeout duration (ISO 8601 duration format) - */ -export type StateExecTimeout = string; diff --git a/src/lib/definitions/utils.ts b/src/lib/definitions/utils.ts deleted file mode 100644 index 47684c04..00000000 --- a/src/lib/definitions/utils.ts +++ /dev/null @@ -1,846 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Specification } from './index'; -import { isObject } from '../utils'; - -/** - * Modify the provided object, set the value to 'schedule' property as an instance of Specification.Schedule class, if the provided value is an object - * @param object to set/overwrite the property - */ -export function overwriteSchedule(object: { schedule: string | Specification.Schedule }): void { - if (isObject(object.schedule)) { - object.schedule = new Specification.Schedule(object.schedule); - } -} - -/** - * Modify the provided object, set the value to 'start' property as an instance of Specification.Startdef class, if the provided value is an object - * @param object to set/overwrite the property - */ -export function overwriteStart(object: { start?: string | Specification.Startdef }): void { - if (isObject(object.start)) { - object.start = new Specification.Startdef(object.start); - } -} - -/** - * Modify the provided object, set the value to 'end' property as an instance of Specification.End class, if the provided value is an object - * @param object to set/overwrite the property - */ -export function overwriteEnd(object: { end?: boolean | Specification.End }): void { - if (isObject(object.end)) { - object.end = new Specification.End(object.end); - } -} - -/** - * Modify the provided object, set the value to 'cron' property as an instance of Specification.Crondef class, if the provided value is an object - * @param object to set/overwrite the property - */ -export function overwriteCron(object: { cron?: string | Specification.Crondef }): void { - if (isObject(object.cron)) { - object.cron = new Specification.Crondef(object.cron); - } -} - -/** - * Modify the provided object, set the value to 'transition' property as an instance of Specification.Transition class, if the provided value is an object - * @param object to set/overwrite the property - */ -export function overwriteTransition(object: { transition?: string | Specification.Transition }): void { - if (isObject(object.transition)) { - object.transition = new Specification.Transition(object.transition); - } -} - -/** - * Modify the provided object, set the value to 'defaultCondition' property as an instance of Specification.Defaultconditiondef class - * @param object to set/overwrite the property - */ -export function overwriteDefaultCondition(object: { defaultCondition?: Specification.Defaultconditiondef }): void { - object.defaultCondition = object.defaultCondition && new Specification.Defaultconditiondef(object.defaultCondition); -} - -/** - * Modify the provided object, set the value to 'eventConditions' property as an instance of Specification.Eventcondition[] class - * Throws an error if provided value is neither a Transitioneventcondition nor a Endeventcondition - * @param object to set/overwrite the property - */ -export function overwriteEventConditions(object: { eventConditions: Specification.Eventcondition[] }): void { - if (Array.isArray(object.eventConditions)) { - object.eventConditions = object.eventConditions.map((eventCondition: any) => { - if (eventCondition.transition) { - return new Specification.Transitioneventcondition(eventCondition); - } - - if (eventCondition.end) { - return new Specification.Endeventcondition(eventCondition); - } - - throw new Error( - `Provided value is neither Transitioneventcondition nor Endeventcondition \n data= ${eventCondition} ` - ); - }); - } -} - -/** - * Modify the provided object, set the value to 'dataConditions' property as an instance of Specification.Datacondition[] class - * Throws an error if provided value is neither a Transitiondatacondition nor a Enddatacondition - * @param object to set/overwrite the property - */ -export function overwriteDataConditions(object: { dataConditions: Specification.Datacondition[] }): void { - if (Array.isArray(object.dataConditions)) { - object.dataConditions = object.dataConditions.map((dataCondition: any) => { - if (dataCondition.transition) { - return new Specification.Transitiondatacondition(dataCondition); - } - - if (dataCondition.end) { - return new Specification.Enddatacondition(dataCondition); - } - - throw new Error( - `Provided value is neither Transitiondatacondition nor Enddatacondition \n data= ${dataCondition} ` - ); - }); - } -} - -/** - * Modify the provided object, set the value to 'actions' property as an instance of Specification.Action[] class - * @param object to set/overwrite the property - */ -export function overwriteActions(object: { actions?: Specification.Action[] }): void { - if (Array.isArray(object.actions)) { - object.actions = object.actions.map((v) => new Specification.Action(v)); - } -} - -/** - * Modify the provided object, set the value to 'onEvents' property as an instance of Specification.Onevents[] class - * @param object to set/overwrite the property - */ -export function overwriteOnEvents(object: { onEvents: Specification.Onevents[] }): void { - object.onEvents = object.onEvents.map((event) => new Specification.Onevents(event)); -} - -/** - * Modify the provided object, set the value to 'stateDataFilter' property as an instance of Specification.Statedatafilter class - * @param object to set/overwrite the property - */ -export function overwriteStateDataFilter(object: { stateDataFilter?: Specification.Statedatafilter }): void { - object.stateDataFilter = object.stateDataFilter && new Specification.Statedatafilter(object.stateDataFilter); -} - -/** - * Modify the provided object, set the value to 'metadata' property as an instance of Specification.Metadata class - * @param object to set/overwrite the property - */ -export function overwriteMetadata(object: { metadata?: Specification.Metadata }): void { - object.metadata = object.metadata && new Specification.Metadata(object.metadata); -} - -/** - * Modify the provided object, set the value to 'retries' property as an instance of Specification.Retries class - * @param object to set/overwrite the property - */ -export function overwriteRetries(object: { retries?: Specification.Retries }) { - if (Array.isArray(object.retries)) { - object.retries = (object.retries as Specification.Retrydef[]).map( - (f) => new Specification.Retrydef(f) - ) as Specification.Retries; - } -} - -/** - * Modify the provided object, set the value to 'events' property as an instance of Specification.Events class - * @param object to set/overwrite the property - */ -export function overwriteEvents(object: { events?: Specification.Events }) { - if (Array.isArray(object.events)) { - object.events = (object.events as Specification.Eventdef[]).map( - (f) => new Specification.Eventdef(f) - ) as Specification.Events; - } -} - -/** - * Modify the provided object, set the value to 'errors' property as an instance of Specification.Errors class - * @param object to set/overwrite the property - */ -export function overwriteErrors(object: { errors?: Specification.Errors }) { - if (Array.isArray(object.errors)) { - object.errors = (object.errors as Specification.Errordef[]).map( - (f) => new Specification.Errordef(f) - ) as Specification.Errors; - } -} - -/** - * Modify the provided object, set the value to 'extensions' property as an instance of Specification.Auth class - * @param object to set/overwrite the property - */ -export function overwriteExtensions(object: { extensions?: Specification.Extensions }) { - if (Array.isArray(object.extensions)) { - object.extensions = (object.extensions as Specification.Extension[]).map( - (f) => new Specification.Extension(f) - ) as Specification.Extensions; - } -} - -/** - * Modify the provided object, set the value to 'auth' property as an instance of Specification.Auth class - * @param object to set/overwrite the property - */ -export function overwriteAuth(object: { auth?: Specification.Auth }) { - if (Array.isArray(object.auth)) { - object.auth = (object.auth as Specification.Authdef[]).map( - (f) => new Specification.Authdef(f) - ) as Specification.Auth; - } -} - -/** - * Modify the provided object, set the value to 'functions' property as an instance of Specification.Functions class - * @param object to set/overwrite the property - */ -export function overwriteFunctions(object: { functions?: Specification.Functions }) { - if (Array.isArray(object.functions)) { - object.functions = (object.functions as Specification.Function[]).map( - (f) => new Specification.Function(f) - ) as Specification.Functions; - } -} - -/** - * Modify the provided object, set the value to 'states' property as an instance of Specification.States class - * Throws an error if the value of the property type is not handler - * @param object to set/overwrite the property - */ -export function overwriteStates(object: { states: Specification.States }) { - object.states = - object.states && - ((object.states as Specification.States).map((v) => { - switch (v.type) { - case 'sleep': - return new Specification.Sleepstate(v); - case 'event': - return new Specification.Eventstate(v); - case 'operation': - return new Specification.Operationstate(v); - case 'parallel': - return new Specification.Parallelstate(v); - case 'switch': - const switchState: any = v; - if (switchState.dataConditions) { - return new Specification.Databasedswitchstate(v); - } - if (switchState.eventConditions) { - return new Specification.Eventbasedswitchstate(v); - } - throw new Error(`Unexpected switch type; \n state value= ${JSON.stringify(v, null, 4)}`); - case 'inject': - return new Specification.Injectstate(v); - case 'foreach': - return new Specification.Foreachstate(v); - case 'callback': - return new Specification.Callbackstate(v); - default: - throw new Error(`Unexpected type= ${v.type}; \n state value= ${JSON.stringify(v, null, 4)}`); - } - }) as Specification.States); -} - -/** - * Modify the provided object, set the value to 'properties' property as an instance of Specification.Properties class, if the provided value is an object - * Throws an error if the value of the property type is not handler - * @param object to set/overwrite the property - */ -export function overwriteProperties(object: { properties: string | Specification.Properties }) { - if (isObject(object.properties)) { - const properties: any = object.properties; - - if (properties.username && properties.password) { - object.properties = new Specification.Basicpropsdef(object.properties); - } - - if (properties.token) { - object.properties = new Specification.Bearerpropsdef(object.properties); - } - - if (properties.grantType) { - object.properties = new Specification.Oauth2propsdef(object.properties); - } - } -} - -/** - * Modify the provided object, set the value to 'correlation' property as an instance of Specification.CorrelationDefs class - * @param object to set/overwrite the property - */ -export function overwriteCorrelation(object: { correlation?: Specification.CorrelationDefs }): void { - if (Array.isArray(object.correlation)) { - object.correlation = object.correlation.map( - (correlation) => new Specification.CorrelationDef(correlation) - ) as Specification.CorrelationDefs; - } -} - -/** - * Modify the provided object, set the value to 'action' property as an instance of Specification.Action class - * @param object to set/overwrite the property - */ -export function overwriteAction(object: { action?: Specification.Action }): void { - object.action = object.action && new Specification.Action(object.action); -} - -/** - * Modify the provided object, set the value to 'workflowExecTimeout' property as an instance of Specification.WorkflowExecTimeout class - * @param object to set/overwrite the property - */ -export function overwriteWorkflowExecTimeout(object: { - workflowExecTimeout?: Specification.WorkflowExecTimeout; -}): void { - object.workflowExecTimeout = - object.workflowExecTimeout && new Specification.WorkflowExecTimeout(object.workflowExecTimeout); -} - -/** - * Modify the provided object, set the value to 'eventDataFilter' property as an instance of Specification.Eventdatafilter class - * @param object to set/overwrite the property - */ -export function overwriteEventDataFilter(object: { eventDataFilter?: Specification.Eventdatafilter }): void { - object.eventDataFilter = object.eventDataFilter && new Specification.Eventdatafilter(object.eventDataFilter); -} - -/** - * Modify the provided object, set the value to 'onErrors' property as an instance of Specification.Error[] class - * @param object to set/overwrite the property - */ -export function overwriteOnErrors(object: { onErrors?: Specification.Error[] }): void { - if (Array.isArray(object.onErrors)) { - object.onErrors = object.onErrors.map((error) => new Specification.Error(error)); - } -} - -/** - * Modify the provided object, set the value to 'branches' property as an instance of Specification.Branch[] class - * @param object to set/overwrite the property - */ -export function overwriteBranches(object: { branches?: Specification.Branch[] }): void { - if (Array.isArray(object.branches)) { - object.branches = object.branches.map((v) => new Specification.Branch(v)); - } -} - -/** - * Modify the provided object, set the value to 'produceEvents' property as an instance of Specification.Produceeventdef[] class - * @param object to set/overwrite the property - */ -export function overwriteProduceEvents(object: { produceEvents?: Specification.Produceeventdef[] }): void { - if (Array.isArray(object.produceEvents)) { - object.produceEvents = object.produceEvents.map((produceEvent) => new Specification.Produceeventdef(produceEvent)); - } -} - -/** - * Modify the provided object, set the value to 'functionRef' property as an instance of Specification.Functionref class, if the provided value is an object - * @param object to set/overwrite the property - */ -export function overwriteFunctionRef(object: { functionRef?: string | Specification.Functionref }): void { - if (isObject(object.functionRef)) { - object.functionRef = new Specification.Functionref(object.functionRef); - } -} - -/** - * Modify the provided object, set the value to 'continueAs' property as an instance of Specification. Continueasdef, if the provided value is an object - * @param object to set/overwrite the property - */ -export function overwriteContinueAs(object: { continueAs?: string | Specification.Continueasdef }): void { - if (isObject(object.continueAs)) { - object.continueAs = new Specification.Continueasdef(object.continueAs); - } -} - -/** - * Modify the provided object, set the value to 'subFlowRef' property as an instance of Specification.Subflowref class, if the provided value is an object - * @param object to set/overwrite the property - */ -export function overwriteSubFlowRef(object: { subFlowRef?: string | Specification.Subflowref }): void { - if (isObject(object.subFlowRef)) { - object.subFlowRef = new Specification.Subflowref(object.subFlowRef); - } -} - -/** - * Modify the provided object, set the value to 'eventRef' property as an instance of Specification.Eventref class - * @param object to set/overwrite the property - */ -export function overwriteEventRef(object: { eventRef?: Specification.Eventref }): void { - object.eventRef = object.eventRef && new Specification.Eventref(object.eventRef); -} - -/** - * Modify the provided object, set the value to 'sleep' property as an instance of Specification.Sleep class - * @param object to set/overwrite the property - */ -export function overwriteSleep(object: { sleep?: Specification.Sleep }): void { - object.sleep = object.sleep && new Specification.Sleep(object.sleep); -} - -/** - * Modify the provided object, set the value to 'actionDataFilter' property as an instance of Specification.Actiondatafilter class - * @param object to set/overwrite the property - */ -export function overwriteActionDataFilter(object: { actionDataFilter?: Specification.Actiondatafilter }): void { - object.actionDataFilter = object.actionDataFilter && new Specification.Actiondatafilter(object.actionDataFilter); -} - -/** - * Set end to true if neither nor transition properties are defined - * @param object to modify - */ -export function setEndValueIfNoTransition(object: { - transition?: string | Specification.Transition; - end?: boolean | Specification.End; -}): void { - if (!object.end && !object.transition) { - object.end = true; - } -} - -/** - * Modify the provided object by normalizing the 'end' property. - * @param object to be modified - */ -export function normalizeEnd(object: { end?: boolean | Specification.End }) { - if (isObject(object.end)) { - object.end = (object.end as Specification.End).normalize(); - } -} - -/** - * Modify the provided object, deep cloning the value of the provided property - * @param property to be cloned - * @param object to set/overwrite the property - */ -export function overwritePropertyAsPlainType(property: string, object: any): void { - if (isObject(object[property])) { - Object.assign(object, { [property]: JSON.parse(JSON.stringify(object[property])) }); - } -} - -/** - * Modify the provided object, set the value to 'timeouts' property as an instance of Specification.Timeouts class - * @param object to set/overwrite the property - */ -export function overwriteTimeouts(object: { timeouts?: string | Specification.Timeouts }): void { - if (isObject(object.timeouts)) { - object.timeouts = object.timeouts && new Specification.Timeouts(object.timeouts); - } -} - -/** - * Modify the provided object by normalizing the 'subFlowRef' property. - * @param object to be modified - */ -export function normalizeSubFlowRef(object: { subFlowRef?: string | Specification.Subflowref }) { - if (isObject(object.subFlowRef)) { - object.subFlowRef = (object.subFlowRef as Specification.Subflowref).normalize(); - } -} - -/** - * Modify the provided object by normalizing the 'continueAs' property. - * @param object to be modified - */ -export function normalizeContinueAs(object: { continueAs?: string | Specification.Continueasdef }) { - if (isObject(object.continueAs)) { - object.continueAs = (object.continueAs as Specification.Continueasdef).normalize(); - } -} - -/** - * Modify the provided object by normalizing the 'defaultCondition' property. - * @param object to be modified - */ -export function normalizeDefaultCondition(object: { defaultCondition?: Specification.Defaultconditiondef }) { - object.defaultCondition = object.defaultCondition && object.defaultCondition.normalize(); -} - -/** - * Modify the provided object by normalizing the 'workflowExecTimeout' property. - * @param object to be modified - */ -export function normalizeWorkflowExecTimeout(object: { workflowExecTimeout?: Specification.WorkflowExecTimeout }) { - object.workflowExecTimeout = object.workflowExecTimeout && object.workflowExecTimeout.normalize(); -} - -/** - * Modify the provided object by normalizing the 'onEvents' property. - * @param object to be modified - */ -export function normalizeOnEvents(object: { onEvents: Specification.Onevents[] }) { - object.onEvents = object.onEvents && object.onEvents.map((onEvent) => onEvent.normalize()); -} - -/** - * Modify the provided object by normalizing the 'onErrors' property. - * @param object to be modified - */ -export function normalizeOnErrors(object: { onErrors?: Specification.Error[] }): void { - if (Array.isArray(object.onErrors)) { - object.onErrors = object.onErrors.map((error) => error.normalize()); - } -} - -/** - * Modify the provided object by normalizing the 'branches' property. - * @param object to be modified - */ -export function normalizeBranches(object: { branches?: Specification.Branch[] }): void { - if (Array.isArray(object.branches)) { - object.branches = object.branches.map((branch) => branch.normalize()); - } -} - -/** - * Modify the provided object by normalizing the 'actions' property. - * @param object to be modified - */ -export function normalizeActions(object: { actions?: Specification.Action[] }): void { - if (Array.isArray(object.actions)) { - object.actions = object.actions.map((action) => action.normalize()); - } -} - -/** - * Modify the provided object by normalizing the 'action' property. - * @param object to be modified - */ -export function normalizeAction(object: { action?: Specification.Action }): void { - object.action = object.action && object.action.normalize(); -} - -/** - * Modify the provided object by normalizing the 'dataConditions' property. - * @param object to be modified - */ -export function normalizeDataConditions(object: { dataConditions?: Specification.Datacondition[] }): void { - if (Array.isArray(object.dataConditions)) { - object.dataConditions = object.dataConditions.map((dc) => dc.normalize()); - } -} - -/** - * Modify the provided object by normalizing the 'eventConditions' property. - * @param object to be modified - */ -export function normalizeEventConditions(object: { eventConditions?: Specification.Eventcondition[] }): void { - if (Array.isArray(object.eventConditions)) { - object.eventConditions = object.eventConditions.map((event) => event.normalize()); - } -} - -/** - * Modify the provided object by normalizing the 'transition' property if property type is Specification.Transition. - * @param object to be modified - */ -export function normalizeTransition(object: { transition?: string | Specification.Transition }) { - if (isObject(object.transition)) { - object.transition = (object.transition as Specification.Transition).normalize(); - } -} - -/** - * Modify the provided object by normalizing the 'states' property. - * @param object to be modified - */ -export function normalizeStates(object: { states: Specification.States }) { - object.states = object.states.map((state) => { - return state.normalize(); - }) as Specification.States; -} - -/** - * Modify the provided object by normalizing the 'extensions' property. - * @param object to be modified - */ -export function normalizeExtensions(object: { extensions?: Specification.Extensions }) { - if (Array.isArray(object.extensions)) { - object.extensions = object.extensions.map((extension) => { - return extension.normalize(); - }) as Specification.Extensions; - } -} - -/** - * Modify the provided object by normalizing the 'auth' property. - * @param object to be modified - */ -export function normalizeAuth(object: { auth?: Specification.Auth }) { - if (Array.isArray(object.auth)) { - object.auth = object.auth.map((auth) => { - return auth.normalize(); - }) as Specification.Auth; - } -} - -/** - * Modify the provided object by normalizing the 'functions' property. - * @param object to be modified - */ -export function normalizeFunctions(object: { functions?: Specification.Functions }) { - if (Array.isArray(object.functions)) { - object.functions = (object.functions as Specification.Function[]).map((f) => - f.normalize() - ) as Specification.Functions; - } -} - -/** - * Modify the provided object by normalizing the 'events' property. - * @param object to be modified - */ -export function normalizeEvents(object: { events?: Specification.Events }) { - if (Array.isArray(object.events)) { - object.events = (object.events as Specification.Eventdef[]).map((event) => - event.normalize() - ) as Specification.Events; - } -} - -/** - * Modify the provided object by normalizing the 'timeouts' property. - * @param object to be modified - */ -export function normalizeTimeouts(object: { timeouts?: string | Specification.Timeouts }) { - if (isObject(object.timeouts)) { - object.timeouts = object.timeouts && object.timeouts.normalize(); - } -} - -/** - * Modify the provided object by normalizing the 'eventRef' property. - * @param object to be modified - */ -export function normalizeEventRef(object: { eventRef?: Specification.Eventref }) { - if (isObject(object.eventRef)) { - object.eventRef = object.eventRef && object.eventRef.normalize(); - } -} - -/** - * Modify the provided object by normalizing the 'functionRef' property. - * @param object to be modified - */ -export function normalizeFunctionRef(object: { functionRef?: string | Specification.Functionref }) { - if (isObject(object.functionRef)) { - object.functionRef = object.functionRef && object.functionRef.normalize(); - } -} - -/** - * Modify the provided object by normalizing the 'actionMode' property. - * @param target to be modified - * @param source - */ -export function normalizeActionMode(target: { actionMode?: string }, source?: { actionMode?: string }) { - if (!source?.actionMode) { - delete target.actionMode; - } -} - -/** - * Modify the provided object by normalizing the 'completionType' property. - * @param object to be modified - * @param source - */ -export function normalizeCompletionType(object: { completionType?: string }, source?: { completionType?: string }) { - if (!source?.completionType) { - delete object.completionType; - } -} - -/** - * Modify the provided object by normalizing the 'usedForCompensation' property. - * @param object to be modified - * @param source - */ -export function normalizeUsedForCompensation( - object: { usedForCompensation?: boolean }, - source?: { usedForCompensation?: boolean } -) { - if (source?.usedForCompensation === undefined) { - delete object.usedForCompensation; - } -} - -/** - * Modify the provided object by normalizing the 'mode' property. - * @param object to be modified - * @param source - */ -export function normalizeMode(object: { mode?: string }, source?: { mode?: string }) { - if (!source?.mode) { - delete object.mode; - } -} - -/** - * Modify the provided object by normalizing the 'compensate' property. - * @param object to be modified - * @param source - */ -export function normalizeCompensate(object: { compensate?: boolean }, source?: { compensate?: boolean }) { - if (source?.compensate === undefined) { - delete object.compensate; - } -} - -/** - * Modify the provided object by normalizing the 'scheme' property. - * @param object to be modified - * @param source - */ -export function normalizeScheme(object: { scheme?: string }, source?: { scheme?: string }) { - if (!source?.scheme) { - delete object.scheme; - } -} - -/** - * Modify the provided object by normalizing the 'terminate' property. - * @param object to be modified - * @param source - */ -export function normalizeTerminate(object: { terminate?: boolean }, source?: { terminate?: boolean }) { - if (source?.terminate === undefined) { - delete object.terminate; - } -} - -/** - * Modify the provided object by normalizing the 'exclusive' property. - * @param object to be modified - * @param source - */ -export function normalizeExclusive(object: { exclusive?: boolean }, source?: { exclusive?: boolean }) { - if (source?.exclusive === undefined) { - delete object.exclusive; - } -} - -/** - * Modify the provided object by normalizing the 'keepActive' property. - * @param object to be modified - * @param source - */ -export function normalizeKeepActive(object: { keepActive?: boolean }, source?: { keepActive?: boolean }) { - if (source?.keepActive === undefined) { - delete object.keepActive; - } -} - -/** - * Modify the provided object by normalizing the 'expressionLang' property. - * @param object to be modified - * @param source - */ -export function normalizeExpressionLang(object: { expressionLang?: string }, source?: { expressionLang?: string }) { - if (!source?.expressionLang) { - delete object.expressionLang; - } -} - -/** - * Modify the provided object by normalizing the 'interrupt' property. - * @param object to be modified - * @param source - */ -export function normalizeInterrupt(object: { interrupt?: boolean }, source?: { interrupt?: boolean }) { - if (source?.interrupt === undefined) { - delete object.interrupt; - } -} - -/** - * Modify the provided object by normalizing the 'type' property. - * @param object to be modified - * @param source - */ -export function normalizeType(object: { type?: string }, source?: { type?: string }) { - if (!source?.type) { - delete object.type; - } -} - -/** - * Modify the provided object by normalizing the 'invoke' property. - * @param object to be modified - * @param source - */ -export function normalizeInvoke(object: { invoke?: string }, source?: { invoke?: string }) { - if (!source?.invoke) { - delete object.invoke; - } -} - -/** - * Modify the provided object by normalizing the 'onParentComplete' property. - * @param object to be modified - * @param source - */ -export function normalizeOnParentComplete( - object: { onParentComplete?: 'continue' | 'terminate' }, - source?: { onParentComplete?: 'continue' | 'terminate' } -) { - if (!source?.onParentComplete) { - delete object.onParentComplete; - } -} - -/** - * Modify the provided object by normalizing the 'kind' property. - * @param object to be modified - * @param source - */ -export function normalizeKind(object: { kind?: string }, source?: { kind?: string }) { - if (!source?.kind) { - delete object.kind; - } -} - -/** - * Modify the provided object by normalizing the 'dataOnly' property. - * @param object to be modified - * @param source - */ -export function normalizeDataOnly(object: { dataOnly?: boolean }, source?: { dataOnly?: boolean }) { - if (source?.dataOnly === undefined) { - delete object.dataOnly; - } -} - -/** - * Modify the provided object by deleting the 'source' property - * @param object - */ -export function cleanSourceModelProperty(object?: { sourceModel?: any }): void { - delete object?.sourceModel; -} diff --git a/src/lib/definitions/workflow.ts b/src/lib/definitions/workflow.ts deleted file mode 100644 index 39c0a2ce..00000000 --- a/src/lib/definitions/workflow.ts +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { Metadata } from './metadata'; -import { Startdef } from './startdef'; -import { Timeouts } from './timeouts'; -import * as yaml from 'js-yaml'; - -import { Specification } from '.'; - -import { validate } from '../utils'; -import { - cleanSourceModelProperty, - normalizeAuth, - normalizeEvents, - normalizeExpressionLang, - normalizeExtensions, - normalizeFunctions, - normalizeKeepActive, - normalizeStates, - normalizeTimeouts, - overwriteAuth, - overwriteErrors, - overwriteEvents, - overwriteExtensions, - overwriteFunctions, - overwriteMetadata, - overwritePropertyAsPlainType, - overwriteRetries, - overwriteStart, - overwriteStates, - overwriteTimeouts, -} from './utils'; -import { Auth, Errors, Events, Extensions, Functions, Retries, Secrets, States } from './types'; - -export class Workflow { - sourceModel?: Workflow; - /** - * Workflow unique identifier - */ - id: string; - /** - * Domain-specific workflow identifier - */ - key?: string; - /** - * Workflow name - */ - name?: string; - /** - * Workflow description - */ - description?: string; - /** - * Workflow version - */ - version?: string; // ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ - /** - * List of helpful terms describing the workflows intended purpose, subject areas, or other important qualities - */ - annotations?: [string, ...string[]]; - dataInputSchema?: - | string - | { - schema: any; - /** - * Determines if workflow execution should continue if there are validation errors - */ - failOnValidationErrors?: boolean; - }; - secrets?: Secrets; - constants?: - | string /* uri */ - | { - [key: string]: any; - }; - start?: string | Startdef; - /** - * Serverless Workflow schema version - */ - specVersion: string; - /** - * Identifies the expression language used for workflow expressions. Default is 'jq' - */ - expressionLang?: string; - timeouts?: string /* uri */ | Timeouts; - errors?: Errors; - /** - * If 'true', workflow instances is not terminated when there are no active execution paths. Instance can be terminated via 'terminate end definition' or reaching defined 'workflowExecTimeout' - */ - keepActive?: boolean; - metadata?: /* Metadata information */ Metadata; - events?: Events; - functions?: Functions; - /** - * If set to true, actions should automatically be retried on unchecked errors. Default is false - */ - autoRetries?: boolean; - retries?: Retries; - auth?: Auth; - extensions?: Extensions; - /** - * State definitions - */ - states: States; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - const defaultModel = { - id: undefined, - name: undefined, - version: undefined, - description: undefined, - specVersion: undefined, - start: undefined, - states: undefined, - functions: undefined, - events: undefined, - retries: undefined, - timeouts: undefined, - expressionLang: 'jq', - keepActive: true, - }; - - Object.assign(this, defaultModel, model); - - overwritePropertyAsPlainType('dataInputSchema', this); - overwritePropertyAsPlainType('constants', this); - overwriteStart(this); - overwriteTimeouts(this); - overwriteErrors(this); - overwriteMetadata(this); - overwriteEvents(this); - overwriteFunctions(this); - overwriteRetries(this); - overwriteExtensions(this); - overwriteAuth(this); - overwriteStates(this); - } - - /** - * Parses the provided string as Workflow - * @param {string} data The JSON or YAML workflow to parse - * @returns {Workflow} The parse Workflow - */ - static fromSource(value: string): Specification.Workflow { - try { - const model = yaml.load(value); - return new Workflow(model); - } catch (ex) { - throw new Error('Format not supported'); - } - } - - /** - * Stringifies the provided workflow to the JSON format - * @param {Workflow} workflow The workflow to strigify - * @returns {string} The workflow as JSON - */ - static toJson(workflow: Workflow): string { - validate('Workflow', workflow.normalize()); - return JSON.stringify(workflow.normalize()); - } - - /** - * Stringifies the provided workflow to the YAML format - * @param {Workflow} workflow The workflow to strigify - * @returns {string} The workflow as YAML - */ - static toYaml(workflow: Workflow): string { - validate('Workflow', workflow.normalize()); - return yaml.dump(JSON.parse(JSON.stringify(workflow.normalize()))); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.Workflow} without deleted properties. - */ - normalize = (): Workflow => { - const clone = new Workflow(this); - - normalizeExpressionLang(clone, this.sourceModel); - normalizeTimeouts(clone); - normalizeKeepActive(clone, this.sourceModel); - normalizeEvents(clone); - normalizeFunctions(clone); - normalizeAuth(clone); - normalizeExtensions(clone); - normalizeStates(clone); - - cleanSourceModelProperty(clone); - return clone; - }; -} diff --git a/src/lib/definitions/workflowExecTimeout.ts b/src/lib/definitions/workflowExecTimeout.ts deleted file mode 100644 index 37ead5fe..00000000 --- a/src/lib/definitions/workflowExecTimeout.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { cleanSourceModelProperty, normalizeInterrupt } from './utils'; - -export class WorkflowExecTimeout { - sourceModel?: WorkflowExecTimeout; - /** - * Workflow execution timeout duration (ISO 8601 duration format). If not specified should be 'unlimited' - */ - duration: string; - /** - * If `false`, workflow instance is allowed to finish current execution. If `true`, current workflow execution is abrupted. - */ - interrupt?: boolean; - /** - * Name of a workflow state to be executed before workflow instance is terminated - */ - runBefore?: string; - - constructor(model: any) { - this.sourceModel = Object.assign({}, model); - - const defaultModel = { interrupt: true }; - Object.assign(this, defaultModel, model); - } - - /** - * Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state. - * @returns {Specification.WorkflowExecTimeout} without deleted properties. - */ - - normalize = (): WorkflowExecTimeout => { - const clone = new WorkflowExecTimeout(this); - - normalizeInterrupt(clone, this.sourceModel); - - cleanSourceModelProperty(clone); - return clone; - }; -} diff --git a/src/lib/diagram/index.ts b/src/lib/diagram/index.ts deleted file mode 100644 index 54a1ca6c..00000000 --- a/src/lib/diagram/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export * from './mermaidDiagram'; diff --git a/src/lib/diagram/mermaidDiagram.ts b/src/lib/diagram/mermaidDiagram.ts deleted file mode 100644 index a8ef7eab..00000000 --- a/src/lib/diagram/mermaidDiagram.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Specification } from '../definitions'; -import { MermaidState } from './mermaidState'; - -export class MermaidDiagram { - constructor(private workflow: Specification.Workflow) {} - - sourceCode() { - const mermaidStateDiagramVersion = 'stateDiagram-v2'; - return ( - mermaidStateDiagramVersion + - '\n' + - this.workflow.states - .map((state, index) => { - const isFirstState = index === 0; - return new MermaidState(state, isFirstState).sourceCode(); - }) - .join('\n\n') - ); - } -} diff --git a/src/lib/diagram/mermaidState.ts b/src/lib/diagram/mermaidState.ts deleted file mode 100644 index cf23e981..00000000 --- a/src/lib/diagram/mermaidState.ts +++ /dev/null @@ -1,392 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { Specification } from '../definitions'; -import { humanCase, isObject, pascalCase } from '../utils'; - -export class MermaidState { - constructor( - private state: { - name?: string; - type?: string; - transition?: string | Specification.Transition; - end?: boolean | Specification.End; - compensatedBy?: string; - onErrors?: Specification.Error[]; - usedForCompensation?: boolean; - }, - private isFirstState: boolean = false - ) {} - - sourceCode() { - const stateDefinition = this.definitions(); - const stateTransitions = this.transitions(); - - const stateDescription = stateTransitions.reduce((p, c) => { - return p + '\n' + c; - }, stateDefinition); - - return stateDescription; - } - - private definitions(): string { - return ( - this.definitionName() + - '\n' + - this.definitionType() + - (this.definitionDetails() !== undefined ? '\n' + this.definitionDetails() : '') - ); - } - - private transitions(): string[] { - const transitions: string[] = []; - - transitions.push(...this.startTransition()); - transitions.push(...this.dataConditionsTransitions()); - transitions.push(...this.eventConditionsTransition()); - transitions.push(...this.errorTransitions()); - transitions.push(...this.naturalTransition(this.stateKeyDiagram(this.state.name), this.state.transition)); - transitions.push(...this.compensatedByTransition()); - transitions.push(...this.endTransition()); - - return transitions; - } - - private stateKeyDiagram(name: string | undefined) { - return pascalCase(name || ''); - } - - private startTransition() { - const transitions: string[] = []; - if (this.isFirstState) { - const stateName = this.stateKeyDiagram(this.state.name); - transitions.push(this.transitionDescription('[*]', stateName)); - } - return transitions; - } - - private dataConditionsTransitions() { - const transitions: string[] = []; - - const dataBasedSwitchState = this.state as Specification.Databasedswitchstate; - if (dataBasedSwitchState.dataConditions) { - const stateName = this.state.name; - dataBasedSwitchState.dataConditions.forEach((dataCondition) => { - const transitionDataCondition = dataCondition as Specification.Transitiondatacondition; - - transitions.push( - ...this.naturalTransition(stateName, transitionDataCondition.transition, transitionDataCondition.condition) - ); - - const endDataCondition = dataCondition as Specification.Enddatacondition; - if (endDataCondition.end) { - transitions.push(this.transitionDescription(stateName, '[*]', transitionDataCondition.condition)); - } - }); - - transitions.push(...this.defaultConditionTransition(dataBasedSwitchState)); - } - return transitions; - } - - private eventConditionsTransition() { - const transitions: string[] = []; - - const eventBasedSwitchState = this.state as Specification.Eventbasedswitchstate; - if (eventBasedSwitchState.eventConditions) { - const stateName = this.state.name; - eventBasedSwitchState.eventConditions.forEach((eventCondition) => { - const transitionEventCondition = eventCondition as Specification.Transitioneventcondition; - - transitions.push( - ...this.naturalTransition(stateName, transitionEventCondition.transition, transitionEventCondition.eventRef) - ); - - const endEventCondition = eventCondition as Specification.Endeventcondition; - if (endEventCondition.end) { - transitions.push(this.transitionDescription(stateName, '[*]')); - } - }); - - transitions.push(...this.defaultConditionTransition(eventBasedSwitchState)); - } - return transitions; - } - - private defaultConditionTransition(state: { defaultCondition?: Specification.Defaultconditiondef }) { - const transitions: string[] = []; - - if (state.defaultCondition) { - transitions.push(...this.naturalTransition(this.state.name, state.defaultCondition.transition, 'default')); - } - return transitions; - } - - private endTransition() { - const transitions: string[] = []; - - if (this.state.end) { - const stateName = this.state.name; - let transitionLabel = undefined; - - if (isObject(this.state.end)) { - const end = this.state.end as Specification.End; - - if (end.produceEvents) { - transitionLabel = 'Produced event = [' + end.produceEvents!.map((pe) => pe.eventRef).join(',') + ']'; - } - } - - transitions.push(this.transitionDescription(stateName, '[*]', transitionLabel)); - } - return transitions; - } - - private naturalTransition( - source?: string, - target?: string | Specification.Transition, - label: string | undefined = undefined - ) { - const transitions: string[] = []; - - if (target) { - let descTransition = ''; - if (isObject(target)) { - descTransition = (target as Specification.Transition).nextState; - } else if (typeof target === 'string') { - descTransition = target; - } - transitions.push(this.transitionDescription(source, descTransition, label ? label : undefined)); - } - return transitions; - } - - private errorTransitions() { - const transitions: string[] = []; - - if (this.state.onErrors) { - this.state.onErrors.forEach((error) => { - transitions.push( - ...this.naturalTransition(this.stateKeyDiagram(this.state.name), error.transition, error.errorRef) - ); - }); - } - return transitions; - } - - private compensatedByTransition() { - const transitions: string[] = []; - - if (this.state.compensatedBy) { - transitions.push(...this.naturalTransition(this.state.name, this.state.compensatedBy, 'compensated by')); - } - return transitions; - } - - private definitionDetails() { - let definition: string | undefined; - - switch (this.state.type) { - case 'sleep': - definition = this.sleepStateDetails(); - break; - case 'event': - // NOTHING - break; - case 'operation': - definition = this.operationStateDetails(); - break; - case 'parallel': - definition = this.parallelStateDetails(); - break; - case 'switch': - const switchState: any = this.state; - if (switchState.dataConditions) { - definition = this.dataBasedSwitchStateDetails(); - break; - } - if (switchState.eventConditions) { - definition = this.eventBasedSwitchStateDetails(); - break; - } - throw new Error(`Unexpected switch type; \n state value= ${JSON.stringify(this.state, null, 4)}`); - case 'inject': - // NOTHING - break; - case 'foreach': - definition = this.foreachStateDetails(); - break; - case 'callback': - definition = this.callbackStateDetails(); - break; - default: - throw new Error(`Unexpected type= ${this.state.type}; \n state value= ${JSON.stringify(this.state, null, 4)}`); - } - - if (this.state.usedForCompensation) { - definition = definition ? definition : ''; - definition = this.stateDescription(this.stateKeyDiagram(this.state.name), 'usedForCompensation\n') + definition; - } - - return definition ? definition : undefined; - } - - private definitionType() { - const type = this.state.type; - return this.stateDescription( - this.stateKeyDiagram(this.state.name), - 'type', - type!.charAt(0).toUpperCase() + type!.slice(1) + ' State' - ); - } - - private parallelStateDetails(): string | undefined { - const parallelState = this.state as Specification.Parallelstate; - - const descriptions: string[] = []; - - if (parallelState.completionType) { - descriptions.push( - this.stateDescription(this.stateKeyDiagram(this.state.name), 'Completion type', parallelState.completionType) - ); - } - - if (parallelState.branches) { - descriptions.push( - this.stateDescription( - this.stateKeyDiagram(this.state.name), - 'Num. of branches', - parallelState.branches?.length + '' - ) - ); - } - - return descriptions.length > 0 - ? descriptions.reduce((p, c) => { - return p + '\n' + c; - }) - : undefined; - } - - private eventBasedSwitchStateDetails() { - return this.stateDescription(this.stateKeyDiagram(this.state.name), `Condition type`, `event-based`); - } - - private dataBasedSwitchStateDetails() { - return this.stateDescription(this.stateKeyDiagram(this.state.name), `Condition type`, `data-based`); - } - - private operationStateDetails() { - const state = this.state as Specification.Operationstate; - - const descriptions: string[] = []; - - if (state.actionMode) { - descriptions.push(this.stateDescription(this.stateKeyDiagram(this.state.name), 'Action mode', state.actionMode)); - } - - if (state.actions) { - descriptions.push( - this.stateDescription(this.stateKeyDiagram(this.state.name), 'Num. of actions', state.actions?.length + '') - ); - } - - return descriptions.length > 0 - ? descriptions.reduce((p, c) => { - return p + '\n' + c; - }) - : undefined; - } - - private sleepStateDetails() { - const state = this.state as Specification.Sleepstate; - if (state.duration) { - return this.stateDescription(this.stateKeyDiagram(this.state.name), 'Duration', state.duration); - } - - return undefined; - } - - private foreachStateDetails() { - const state = this.state as Specification.Foreachstate; - - const descriptions: string[] = []; - - if (state.inputCollection) { - descriptions.push( - this.stateDescription(this.stateKeyDiagram(this.state.name), 'Input collection', state.inputCollection) - ); - } - - if (state.actions) { - descriptions.push( - this.stateDescription(this.stateKeyDiagram(this.state.name), 'Num. of actions', state.actions?.length + '') - ); - } - - return descriptions.length > 0 - ? descriptions.reduce((p, c) => { - return p + '\n' + c; - }) - : undefined; - } - - private callbackStateDetails() { - const state = this.state as Specification.Callbackstate; - - const descriptions: string[] = []; - - if (state.action && state.action.functionRef) { - const functionRef = state.action.functionRef; - let functionRefDescription = ''; - if (isObject(functionRef)) { - functionRefDescription = (functionRef as Specification.Functionref).refName; - } else if (typeof functionRef === 'string') { - functionRefDescription = functionRef as string; - } - descriptions.push( - this.stateDescription(this.stateKeyDiagram(this.state.name), 'Callback function', functionRefDescription) - ); - } - - if (state.eventRef) { - descriptions.push(this.stateDescription(this.stateKeyDiagram(this.state.name), 'Callback event', state.eventRef)); - } - - return descriptions.length > 0 - ? descriptions.reduce((p, c) => { - return p + '\n' + c; - }) - : undefined; - } - - private definitionName() { - const key = this.stateKeyDiagram(this.state.name); - const label = humanCase(key, true); - return key + ' : ' + label; - } - - private transitionDescription( - source: string | undefined, - target: string | undefined, - label: string | undefined = undefined - ) { - return this.stateKeyDiagram(source) + ' --> ' + this.stateKeyDiagram(target) + (label ? ' : ' + label : ''); - } - - private stateDescription(stateName: string | undefined, description: string, value?: string) { - return stateName + ` : ${description}${value !== undefined ? ' = ' + value : ''}`; - } -} diff --git a/src/lib/schema/types/README.md b/src/lib/schema/README.md similarity index 100% rename from src/lib/schema/types/README.md rename to src/lib/schema/README.md diff --git a/src/lib/schema/__merged.json b/src/lib/schema/__merged.json deleted file mode 100644 index e26c6c5d..00000000 --- a/src/lib/schema/__merged.json +++ /dev/null @@ -1,2610 +0,0 @@ -{ - "$id": "https://serverlessworkflow.io/schemas/0.8/workflow.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Serverless Workflow specification - workflow schema", - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Workflow unique identifier", - "minLength": 1 - }, - "key": { - "type": "string", - "description": "Domain-specific workflow identifier", - "minLength": 1 - }, - "name": { - "type": "string", - "description": "Workflow name", - "minLength": 1 - }, - "description": { - "type": "string", - "description": "Workflow description" - }, - "version": { - "type": "string", - "description": "Workflow version", - "minLength": 1 - }, - "annotations": { - "type": "array", - "description": "List of helpful terms describing the workflows intended purpose, subject areas, or other important qualities", - "minItems": 1, - "items": { - "type": "string" - }, - "additionalItems": false - }, - "dataInputSchema": { - "oneOf": [ - { - "type": "string", - "description": "URI of the JSON Schema used to validate the workflow data input", - "minLength": 1 - }, - { - "type": "object", - "description": "Workflow data input schema definition", - "properties": { - "schema": { - "type": "string", - "description": "URI of the JSON Schema used to validate the workflow data input", - "minLength": 1 - }, - "failOnValidationErrors": { - "type": "boolean", - "default": true, - "description": "Determines if workflow execution should continue if there are validation errors" - } - }, - "additionalProperties": false, - "required": [ - "schema", - "failOnValidationErrors" - ] - } - ] - }, - "secrets": { - "$ref": "#/definitions/secrets" - }, - "constants": { - "oneOf": [ - { - "type": "string", - "format": "uri", - "description": "URI to a resource containing constants data (json or yaml)" - }, - { - "type": "object", - "description": "Workflow constants data (object type)" - } - ] - }, - "start": { - "$ref": "#/definitions/startdef" - }, - "specVersion": { - "type": "string", - "description": "Serverless Workflow schema version", - "minLength": 1 - }, - "expressionLang": { - "type": "string", - "description": "Identifies the expression language used for workflow expressions. Default is 'jq'", - "default": "jq", - "minLength": 1 - }, - "timeouts": { - "$ref": "#/definitions/timeouts" - }, - "errors": { - "$ref": "#/definitions/errors" - }, - "keepActive": { - "type": "boolean", - "default": false, - "description": "If 'true', workflow instances is not terminated when there are no active execution paths. Instance can be terminated via 'terminate end definition' or reaching defined 'workflowExecTimeout'" - }, - "metadata": { - "$ref": "#/definitions/metadata" - }, - "events": { - "$ref": "#/definitions/events" - }, - "functions": { - "$ref": "#/definitions/functions" - }, - "autoRetries": { - "type": "boolean", - "default": false, - "description": "If set to true, actions should automatically be retried on unchecked errors. Default is false" - }, - "retries": { - "$ref": "#/definitions/retries" - }, - "auth": { - "$ref": "#/definitions/auth" - }, - "states": { - "type": "array", - "description": "State definitions", - "items": { - "anyOf": [ - { - "title": "Sleep State", - "$ref": "#/definitions/sleepstate" - }, - { - "title": "Event State", - "$ref": "#/definitions/eventstate" - }, - { - "title": "Operation State", - "$ref": "#/definitions/operationstate" - }, - { - "title": "Parallel State", - "$ref": "#/definitions/parallelstate" - }, - { - "title": "Switch State", - "$ref": "#/definitions/switchstate" - }, - { - "title": "Inject State", - "$ref": "#/definitions/injectstate" - }, - { - "title": "ForEach State", - "$ref": "#/definitions/foreachstate" - }, - { - "title": "Callback State", - "$ref": "#/definitions/callbackstate" - } - ] - }, - "additionalItems": false, - "minItems": 1 - } - }, - "oneOf": [ - { - "required": [ - "id", - "specVersion", - "states" - ] - }, - { - "required": [ - "key", - "specVersion", - "states" - ] - } - ], - "definitions": { - "sleep": { - "type": "object", - "properties": { - "before": { - "type": "string", - "description": "Amount of time (ISO 8601 duration format) to sleep before function/subflow invocation. Does not apply if 'eventRef' is defined." - }, - "after": { - "type": "string", - "description": "Amount of time (ISO 8601 duration format) to sleep after function/subflow invocation. Does not apply if 'eventRef' is defined." - } - }, - "oneOf": [ - { - "required": [ - "before" - ] - }, - { - "required": [ - "after" - ] - }, - { - "required": [ - "before", - "after" - ] - } - ] - }, - "crondef": { - "oneOf": [ - { - "type": "string", - "description": "Cron expression defining when workflow instances should be created (automatically)", - "minLength": 1 - }, - { - "type": "object", - "properties": { - "expression": { - "type": "string", - "description": "Repeating interval (cron expression) describing when the workflow instance should be created", - "minLength": 1 - }, - "validUntil": { - "type": "string", - "description": "Specific date and time (ISO 8601 format) when the cron expression invocation is no longer valid" - } - }, - "additionalProperties": false, - "required": [ - "expression" - ] - } - ] - }, - "continueasdef": { - "oneOf": [ - { - "type": "string", - "description": "Unique id of the workflow to be continue execution as. Entire state data is passed as data input to next execution", - "minLength": 1 - }, - { - "type": "object", - "properties": { - "workflowId": { - "type": "string", - "description": "Unique id of the workflow to continue execution as" - }, - "version": { - "type": "string", - "description": "Version of the workflow to continue execution as", - "minLength": 1 - }, - "data": { - "type": [ - "string", - "object" - ], - "description": "If string type, an expression which selects parts of the states data output to become the workflow data input of continued execution. If object type, a custom object to become the workflow data input of the continued execution" - }, - "workflowExecTimeout": { - "$ref": "#/definitions/workflowExecTimeout", - "description": "Workflow execution timeout to be used by the workflow continuing execution. Overwrites any specific settings set by that workflow" - } - }, - "required": [ - "workflowId" - ] - } - ] - }, - "transition": { - "oneOf": [ - { - "type": "string", - "description": "Name of state to transition to", - "minLength": 1 - }, - { - "type": "object", - "description": "Function Reference", - "properties": { - "nextState": { - "type": "string", - "description": "Name of state to transition to", - "minLength": 1 - }, - "produceEvents": { - "type": "array", - "description": "Array of events to be produced before the transition happens", - "items": { - "type": "object", - "$ref": "#/definitions/produceeventdef" - }, - "additionalItems": false - }, - "compensate": { - "type": "boolean", - "default": false, - "description": "If set to true, triggers workflow compensation when before this transition is taken. Default is false" - } - }, - "additionalProperties": false, - "required": [ - "nextState" - ] - } - ] - }, - "error": { - "type": "object", - "properties": { - "errorRef": { - "type": "string", - "description": "Reference to a unique workflow error definition. Used of errorRefs is not used", - "minLength": 1 - }, - "errorRefs": { - "type": "array", - "description": "References one or more workflow error definitions. Used if errorRef is not used", - "minItems": 1, - "items": { - "type": "string" - }, - "additionalItems": false - }, - "transition": { - "description": "Transition to next state to handle the error.", - "$ref": "#/definitions/transition" - }, - "end": { - "description": "End workflow execution in case of this error.", - "$ref": "#/definitions/end" - } - }, - "additionalProperties": false, - "oneOf": [ - { - "required": [ - "errorRef", - "transition" - ] - }, - { - "required": [ - "errorRef", - "end" - ] - }, - { - "required": [ - "errorRefs", - "transition" - ] - }, - { - "required": [ - "errorRefs", - "end" - ] - } - ] - }, - "onevents": { - "type": "object", - "properties": { - "eventRefs": { - "type": "array", - "description": "References one or more unique event names in the defined workflow events", - "minItems": 1, - "items": { - "type": "string" - }, - "uniqueItems": true, - "additionalItems": false - }, - "actionMode": { - "type": "string", - "enum": [ - "sequential", - "parallel" - ], - "description": "Specifies how actions are to be performed (in sequence or in parallel)", - "default": "sequential" - }, - "actions": { - "type": "array", - "description": "Actions to be performed if expression matches", - "items": { - "type": "object", - "$ref": "#/definitions/action" - }, - "additionalItems": false - }, - "eventDataFilter": { - "description": "Event data filter", - "$ref": "#/definitions/eventdatafilter" - } - }, - "additionalProperties": false, - "required": [ - "eventRefs" - ] - }, - "action": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Unique action identifier" - }, - "name": { - "type": "string", - "description": "Unique action definition name" - }, - "functionRef": { - "description": "References a function to be invoked", - "$ref": "#/definitions/functionref" - }, - "eventRef": { - "description": "References a 'trigger' and 'result' reusable event definitions", - "$ref": "#/definitions/eventref" - }, - "subFlowRef": { - "description": "References a sub-workflow to invoke", - "$ref": "#/definitions/subflowref" - }, - "sleep": { - "description": "Defines time periods workflow execution should sleep before / after function execution", - "$ref": "#/definitions/sleep" - }, - "retryRef": { - "type": "string", - "description": "References a defined workflow retry definition. If not defined the default retry policy is assumed" - }, - "nonRetryableErrors": { - "type": "array", - "description": "List of unique references to defined workflow errors for which the action should not be retried. Used only when `autoRetries` is set to `true`", - "minItems": 1, - "items": { - "type": "string" - }, - "additionalItems": false - }, - "retryableErrors": { - "type": "array", - "description": "List of unique references to defined workflow errors for which the action should be retried. Used only when `autoRetries` is set to `false`", - "minItems": 1, - "items": { - "type": "string" - }, - "additionalItems": false - }, - "actionDataFilter": { - "description": "Action data filter", - "$ref": "#/definitions/actiondatafilter" - }, - "condition": { - "description": "Expression, if defined, must evaluate to true for this action to be performed. If false, action is disregarded", - "type": "string", - "minLength": 1 - } - }, - "additionalProperties": false, - "oneOf": [ - { - "required": [ - "functionRef" - ] - }, - { - "required": [ - "eventRef" - ] - }, - { - "required": [ - "subFlowRef" - ] - } - ] - }, - "functionref": { - "oneOf": [ - { - "type": "string", - "description": "Name of the referenced function", - "minLength": 1 - }, - { - "type": "object", - "description": "Function Reference", - "properties": { - "refName": { - "type": "string", - "description": "Name of the referenced function" - }, - "arguments": { - "type": "object", - "description": "Function arguments/inputs" - }, - "selectionSet": { - "type": "string", - "description": "Only used if function type is 'graphql'. A string containing a valid GraphQL selection set" - }, - "invoke": { - "type": "string", - "enum": [ - "sync", - "async" - ], - "description": "Specifies if the function should be invoked sync or async", - "default": "sync" - } - }, - "additionalProperties": false, - "required": [ - "refName" - ] - } - ] - }, - "eventref": { - "type": "object", - "description": "Event References", - "properties": { - "triggerEventRef": { - "type": "string", - "description": "Reference to the unique name of a 'produced' event definition" - }, - "resultEventRef": { - "type": "string", - "description": "Reference to the unique name of a 'consumed' event definition" - }, - "resultEventTimeout": { - "type": "string", - "description": "Maximum amount of time (ISO 8601 format) to wait for the result event. If not defined it should default to the actionExecutionTimeout" - }, - "data": { - "type": [ - "string", - "object" - ], - "description": "If string type, an expression which selects parts of the states data output to become the data (payload) of the event referenced by 'triggerEventRef'. If object type, a custom object to become the data (payload) of the event referenced by 'triggerEventRef'." - }, - "contextAttributes": { - "type": "object", - "description": "Add additional extension context attributes to the produced event", - "additionalProperties": { - "type": "string" - } - }, - "invoke": { - "type": "string", - "enum": [ - "sync", - "async" - ], - "description": "Specifies if the function should be invoked sync or async. Default is sync.", - "default": "sync" - } - }, - "additionalProperties": false, - "required": [ - "triggerEventRef", - "resultEventRef" - ] - }, - "subflowref": { - "oneOf": [ - { - "type": "string", - "description": "Unique id of the sub-workflow to be invoked", - "minLength": 1 - }, - { - "type": "object", - "description": "Specifies a sub-workflow to be invoked", - "properties": { - "workflowId": { - "type": "string", - "description": "Unique id of the sub-workflow to be invoked" - }, - "version": { - "type": "string", - "description": "Version of the sub-workflow to be invoked", - "minLength": 1 - }, - "onParentComplete": { - "type": "string", - "enum": [ - "continue", - "terminate" - ], - "description": "If invoke is 'async', specifies how subflow execution should behave when parent workflow completes. Default is 'terminate'", - "default": "terminate" - }, - "invoke": { - "type": "string", - "enum": [ - "sync", - "async" - ], - "description": "Specifies if the subflow should be invoked sync or async", - "default": "sync" - } - }, - "required": [ - "workflowId" - ] - } - ] - }, - "branch": { - "type": "object", - "description": "Branch Definition", - "properties": { - "name": { - "type": "string", - "description": "Branch name" - }, - "timeouts": { - "type": "object", - "description": "State specific timeouts", - "properties": { - "actionExecTimeout": { - "$ref": "#/definitions/actionExecTimeout" - }, - "branchExecTimeout": { - "$ref": "#/definitions/branchExecTimeout" - } - }, - "required": [] - }, - "actions": { - "type": "array", - "description": "Actions to be executed in this branch", - "items": { - "type": "object", - "$ref": "#/definitions/action" - }, - "additionalItems": false - } - }, - "additionalProperties": false, - "required": [ - "name", - "actions" - ] - }, - "sleepstate": { - "type": "object", - "description": "Causes the workflow execution to sleep for a specified duration", - "properties": { - "id": { - "type": "string", - "description": "Unique State id", - "minLength": 1 - }, - "name": { - "type": "string", - "description": "State name" - }, - "type": { - "type": "string", - "const": "sleep", - "description": "State type" - }, - "end": { - "$ref": "#/definitions/end", - "description": "State end definition" - }, - "stateDataFilter": { - "description": "State data filter", - "$ref": "#/definitions/statedatafilter" - }, - "duration": { - "type": "string", - "description": "Duration (ISO 8601 duration format) to sleep" - }, - "timeouts": { - "type": "object", - "description": "State specific timeouts", - "properties": { - "stateExecTimeout": { - "$ref": "#/definitions/stateExecTimeout" - } - }, - "required": [] - }, - "onErrors": { - "type": "array", - "description": "States error handling definitions", - "items": { - "type": "object", - "$ref": "#/definitions/error" - }, - "additionalItems": false - }, - "transition": { - "description": "Next transition of the workflow after the workflow sleep", - "$ref": "#/definitions/transition" - }, - "compensatedBy": { - "type": "string", - "minLength": 1, - "description": "Unique Name of a workflow state which is responsible for compensation of this state" - }, - "usedForCompensation": { - "type": "boolean", - "default": false, - "description": "If true, this state is used to compensate another state. Default is false" - }, - "metadata": { - "$ref": "#/definitions/metadata" - } - }, - "additionalProperties": false, - "if": { - "properties": { - "usedForCompensation": { - "const": true - } - }, - "required": [ - "usedForCompensation" - ] - }, - "then": { - "required": [ - "name", - "type", - "duration" - ] - }, - "else": { - "oneOf": [ - { - "required": [ - "name", - "type", - "duration", - "end" - ] - }, - { - "required": [ - "name", - "type", - "duration", - "transition" - ] - } - ] - } - }, - "eventstate": { - "type": "object", - "description": "This state is used to wait for events from event sources, then consumes them and invoke one or more actions to run in sequence or parallel", - "properties": { - "id": { - "type": "string", - "description": "Unique State id", - "minLength": 1 - }, - "name": { - "type": "string", - "description": "State name" - }, - "type": { - "type": "string", - "const": "event", - "description": "State type" - }, - "exclusive": { - "type": "boolean", - "default": true, - "description": "If true consuming one of the defined events causes its associated actions to be performed. If false all of the defined events must be consumed in order for actions to be performed" - }, - "onEvents": { - "type": "array", - "description": "Define the events to be consumed and optional actions to be performed", - "items": { - "type": "object", - "$ref": "#/definitions/onevents" - }, - "additionalItems": false - }, - "timeouts": { - "type": "object", - "description": "State specific timeouts", - "properties": { - "stateExecTimeout": { - "$ref": "#/definitions/stateExecTimeout" - }, - "actionExecTimeout": { - "$ref": "#/definitions/actionExecTimeout" - }, - "eventTimeout": { - "$ref": "#/definitions/eventTimeout" - } - }, - "required": [] - }, - "stateDataFilter": { - "description": "State data filter", - "$ref": "#/definitions/statedatafilter" - }, - "onErrors": { - "type": "array", - "description": "States error handling definitions", - "items": { - "type": "object", - "$ref": "#/definitions/error" - }, - "additionalItems": false - }, - "transition": { - "description": "Next transition of the workflow after all the actions have been performed", - "$ref": "#/definitions/transition" - }, - "end": { - "$ref": "#/definitions/end", - "description": "State end definition" - }, - "compensatedBy": { - "type": "string", - "minLength": 1, - "description": "Unique Name of a workflow state which is responsible for compensation of this state" - }, - "metadata": { - "$ref": "#/definitions/metadata" - } - }, - "additionalProperties": false, - "oneOf": [ - { - "required": [ - "name", - "type", - "onEvents", - "end" - ] - }, - { - "required": [ - "name", - "type", - "onEvents", - "transition" - ] - } - ] - }, - "operationstate": { - "type": "object", - "description": "Defines actions be performed. Does not wait for incoming events", - "properties": { - "id": { - "type": "string", - "description": "Unique State id", - "minLength": 1 - }, - "name": { - "type": "string", - "description": "State name" - }, - "type": { - "type": "string", - "const": "operation", - "description": "State type" - }, - "end": { - "$ref": "#/definitions/end", - "description": "State end definition" - }, - "stateDataFilter": { - "description": "State data filter", - "$ref": "#/definitions/statedatafilter" - }, - "actionMode": { - "type": "string", - "enum": [ - "sequential", - "parallel" - ], - "description": "Specifies whether actions are performed in sequence or in parallel", - "default": "sequential" - }, - "actions": { - "type": "array", - "description": "Actions to be performed", - "items": { - "type": "object", - "$ref": "#/definitions/action" - } - }, - "timeouts": { - "type": "object", - "description": "State specific timeouts", - "properties": { - "stateExecTimeout": { - "$ref": "#/definitions/stateExecTimeout" - }, - "actionExecTimeout": { - "$ref": "#/definitions/actionExecTimeout" - } - }, - "required": [] - }, - "onErrors": { - "type": "array", - "description": "States error handling definitions", - "items": { - "type": "object", - "$ref": "#/definitions/error" - }, - "additionalItems": false - }, - "transition": { - "description": "Next transition of the workflow after all the actions have been performed", - "$ref": "#/definitions/transition" - }, - "compensatedBy": { - "type": "string", - "minLength": 1, - "description": "Unique Name of a workflow state which is responsible for compensation of this state" - }, - "usedForCompensation": { - "type": "boolean", - "default": false, - "description": "If true, this state is used to compensate another state. Default is false" - }, - "metadata": { - "$ref": "#/definitions/metadata" - } - }, - "additionalProperties": false, - "if": { - "properties": { - "usedForCompensation": { - "const": true - } - }, - "required": [ - "usedForCompensation" - ] - }, - "then": { - "required": [ - "name", - "type", - "actions" - ] - }, - "else": { - "oneOf": [ - { - "required": [ - "name", - "type", - "actions", - "end" - ] - }, - { - "required": [ - "name", - "type", - "actions", - "transition" - ] - } - ] - } - }, - "parallelstate": { - "type": "object", - "description": "Consists of a number of states that are executed in parallel", - "properties": { - "id": { - "type": "string", - "description": "Unique State id", - "minLength": 1 - }, - "name": { - "type": "string", - "description": "State name" - }, - "type": { - "type": "string", - "const": "parallel", - "description": "State type" - }, - "end": { - "$ref": "#/definitions/end", - "description": "State end definition" - }, - "stateDataFilter": { - "description": "State data filter", - "$ref": "#/definitions/statedatafilter" - }, - "timeouts": { - "type": "object", - "description": "State specific timeouts", - "properties": { - "stateExecTimeout": { - "$ref": "#/definitions/stateExecTimeout" - }, - "branchExecTimeout": { - "$ref": "#/definitions/branchExecTimeout" - } - }, - "required": [] - }, - "branches": { - "type": "array", - "description": "Branch Definitions", - "items": { - "type": "object", - "$ref": "#/definitions/branch" - }, - "additionalItems": false - }, - "completionType": { - "type": "string", - "enum": [ - "allOf", - "atLeast" - ], - "description": "Option types on how to complete branch execution.", - "default": "allOf" - }, - "numCompleted": { - "type": [ - "number", - "string" - ], - "minimum": 0, - "minLength": 0, - "description": "Used when completionType is set to 'atLeast' to specify the minimum number of branches that must complete before the state will transition." - }, - "onErrors": { - "type": "array", - "description": "States error handling definitions", - "items": { - "type": "object", - "$ref": "#/definitions/error" - }, - "additionalItems": false - }, - "transition": { - "description": "Next transition of the workflow after all branches have completed execution", - "$ref": "#/definitions/transition" - }, - "compensatedBy": { - "type": "string", - "minLength": 1, - "description": "Unique Name of a workflow state which is responsible for compensation of this state" - }, - "usedForCompensation": { - "type": "boolean", - "default": false, - "description": "If true, this state is used to compensate another state. Default is false" - }, - "metadata": { - "$ref": "#/definitions/metadata" - } - }, - "additionalProperties": false, - "if": { - "properties": { - "usedForCompensation": { - "const": true - } - }, - "required": [ - "usedForCompensation" - ] - }, - "then": { - "required": [ - "name", - "type", - "branches" - ] - }, - "else": { - "oneOf": [ - { - "required": [ - "name", - "type", - "branches", - "end" - ] - }, - { - "required": [ - "name", - "type", - "branches", - "transition" - ] - } - ] - } - }, - "switchstate": { - "oneOf": [ - { - "$ref": "#/definitions/databasedswitchstate" - }, - { - "$ref": "#/definitions/eventbasedswitchstate" - } - ] - }, - "eventbasedswitchstate": { - "type": "object", - "description": "Permits transitions to other states based on events", - "properties": { - "id": { - "type": "string", - "description": "Unique State id", - "minLength": 1 - }, - "name": { - "type": "string", - "description": "State name" - }, - "type": { - "type": "string", - "const": "switch", - "description": "State type" - }, - "stateDataFilter": { - "description": "State data filter", - "$ref": "#/definitions/statedatafilter" - }, - "timeouts": { - "type": "object", - "description": "State specific timeouts", - "properties": { - "stateExecTimeout": { - "$ref": "#/definitions/stateExecTimeout" - }, - "eventTimeout": { - "$ref": "#/definitions/eventTimeout" - } - }, - "required": [] - }, - "eventConditions": { - "type": "array", - "description": "Defines conditions evaluated against events", - "items": { - "type": "object", - "$ref": "#/definitions/eventcondition" - }, - "additionalItems": false - }, - "onErrors": { - "type": "array", - "description": "States error handling definitions", - "items": { - "type": "object", - "$ref": "#/definitions/error" - }, - "additionalItems": false - }, - "defaultCondition": { - "description": "Default transition of the workflow if there is no matching data conditions. Can include a transition or end definition", - "$ref": "#/definitions/defaultconditiondef" - }, - "compensatedBy": { - "type": "string", - "minLength": 1, - "description": "Unique Name of a workflow state which is responsible for compensation of this state" - }, - "usedForCompensation": { - "type": "boolean", - "default": false, - "description": "If true, this state is used to compensate another state. Default is false" - }, - "metadata": { - "$ref": "#/definitions/metadata" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "eventConditions", - "defaultCondition" - ] - }, - "databasedswitchstate": { - "type": "object", - "description": "Permits transitions to other states based on data conditions", - "properties": { - "id": { - "type": "string", - "description": "Unique State id", - "minLength": 1 - }, - "name": { - "type": "string", - "description": "State name" - }, - "type": { - "type": "string", - "const": "switch", - "description": "State type" - }, - "stateDataFilter": { - "description": "State data filter", - "$ref": "#/definitions/statedatafilter" - }, - "timeouts": { - "type": "object", - "description": "State specific timeouts", - "properties": { - "stateExecTimeout": { - "$ref": "#/definitions/stateExecTimeout" - } - }, - "required": [] - }, - "dataConditions": { - "type": "array", - "description": "Defines conditions evaluated against state data", - "items": { - "type": "object", - "$ref": "#/definitions/datacondition" - }, - "additionalItems": false - }, - "onErrors": { - "type": "array", - "description": "States error handling definitions", - "items": { - "type": "object", - "$ref": "#/definitions/error" - }, - "additionalItems": false - }, - "defaultCondition": { - "description": "Default transition of the workflow if there is no matching data conditions. Can include a transition or end definition", - "$ref": "#/definitions/defaultconditiondef" - }, - "compensatedBy": { - "type": "string", - "minLength": 1, - "description": "Unique Name of a workflow state which is responsible for compensation of this state" - }, - "usedForCompensation": { - "type": "boolean", - "default": false, - "description": "If true, this state is used to compensate another state. Default is false" - }, - "metadata": { - "$ref": "#/definitions/metadata" - } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "dataConditions", - "defaultCondition" - ] - }, - "defaultconditiondef": { - "type": "object", - "description": "DefaultCondition definition. Can be either a transition or end definition", - "properties": { - "transition": { - "$ref": "#/definitions/transition" - }, - "end": { - "$ref": "#/definitions/end" - } - }, - "additionalProperties": false, - "oneOf": [ - { - "required": [ - "transition" - ] - }, - { - "required": [ - "end" - ] - } - ] - }, - "eventcondition": { - "oneOf": [ - { - "$ref": "#/definitions/transitioneventcondition" - }, - { - "$ref": "#/definitions/enddeventcondition" - } - ] - }, - "transitioneventcondition": { - "type": "object", - "description": "Switch state data event condition", - "properties": { - "name": { - "type": "string", - "description": "Event condition name" - }, - "eventRef": { - "type": "string", - "description": "References an unique event name in the defined workflow events" - }, - "transition": { - "description": "Next transition of the workflow if there is valid matches", - "$ref": "#/definitions/transition" - }, - "eventDataFilter": { - "description": "Event data filter definition", - "$ref": "#/definitions/eventdatafilter" - }, - "metadata": { - "$ref": "#/definitions/metadata" - } - }, - "additionalProperties": false, - "required": [ - "eventRef", - "transition" - ] - }, - "enddeventcondition": { - "type": "object", - "description": "Switch state data event condition", - "properties": { - "name": { - "type": "string", - "description": "Event condition name" - }, - "eventRef": { - "type": "string", - "description": "References an unique event name in the defined workflow events" - }, - "end": { - "$ref": "#/definitions/end", - "description": "Explicit transition to end" - }, - "eventDataFilter": { - "description": "Event data filter definition", - "$ref": "#/definitions/eventdatafilter" - }, - "metadata": { - "$ref": "#/definitions/metadata" - } - }, - "additionalProperties": false, - "required": [ - "eventRef", - "end" - ] - }, - "datacondition": { - "oneOf": [ - { - "$ref": "#/definitions/transitiondatacondition" - }, - { - "$ref": "#/definitions/enddatacondition" - } - ] - }, - "transitiondatacondition": { - "type": "object", - "description": "Switch state data based condition", - "properties": { - "name": { - "type": "string", - "description": "Data condition name" - }, - "condition": { - "type": "string", - "description": "Workflow expression evaluated against state data. Must evaluate to true or false" - }, - "transition": { - "description": "Workflow transition if condition is evaluated to true", - "$ref": "#/definitions/transition" - }, - "metadata": { - "$ref": "#/definitions/metadata" - } - }, - "additionalProperties": false, - "required": [ - "condition", - "transition" - ] - }, - "enddatacondition": { - "type": "object", - "description": "Switch state data based condition", - "properties": { - "name": { - "type": "string", - "description": "Data condition name" - }, - "condition": { - "type": "string", - "description": "Workflow expression evaluated against state data. Must evaluate to true or false" - }, - "end": { - "$ref": "#/definitions/end", - "description": "Workflow end definition" - }, - "metadata": { - "$ref": "#/definitions/metadata" - } - }, - "additionalProperties": false, - "required": [ - "condition", - "end" - ] - }, - "injectstate": { - "type": "object", - "description": "Inject static data into state data. Does not perform any actions", - "properties": { - "id": { - "type": "string", - "description": "Unique state id", - "minLength": 1 - }, - "name": { - "type": "string", - "description": "State name" - }, - "type": { - "type": "string", - "const": "inject", - "description": "State type" - }, - "end": { - "$ref": "#/definitions/end", - "description": "State end definition" - }, - "data": { - "type": "object", - "description": "JSON object which can be set as states data input and can be manipulated via filters" - }, - "timeouts": { - "type": "object", - "description": "State specific timeouts", - "properties": { - "stateExecTimeout": { - "$ref": "#/definitions/stateExecTimeout" - } - }, - "required": [] - }, - "stateDataFilter": { - "description": "State data filter", - "$ref": "#/definitions/statedatafilter" - }, - "transition": { - "description": "Next transition of the workflow after injection has completed", - "$ref": "#/definitions/transition" - }, - "compensatedBy": { - "type": "string", - "minLength": 1, - "description": "Unique Name of a workflow state which is responsible for compensation of this state" - }, - "usedForCompensation": { - "type": "boolean", - "default": false, - "description": "If true, this state is used to compensate another state. Default is false" - }, - "metadata": { - "$ref": "#/definitions/metadata" - } - }, - "additionalProperties": false, - "if": { - "properties": { - "usedForCompensation": { - "const": true - } - }, - "required": [ - "usedForCompensation" - ] - }, - "then": { - "required": [ - "name", - "type", - "data" - ] - }, - "else": { - "oneOf": [ - { - "required": [ - "name", - "type", - "data", - "end" - ] - }, - { - "required": [ - "name", - "type", - "data", - "transition" - ] - } - ] - } - }, - "foreachstate": { - "type": "object", - "description": "Execute a set of defined actions or workflows for each element of a data array", - "properties": { - "id": { - "type": "string", - "description": "Unique State id", - "minLength": 1 - }, - "name": { - "type": "string", - "description": "State name" - }, - "type": { - "type": "string", - "const": "foreach", - "description": "State type" - }, - "end": { - "$ref": "#/definitions/end", - "description": "State end definition" - }, - "inputCollection": { - "type": "string", - "description": "Workflow expression selecting an array element of the states data" - }, - "outputCollection": { - "type": "string", - "description": "Workflow expression specifying an array element of the states data to add the results of each iteration" - }, - "iterationParam": { - "type": "string", - "description": "Name of the iteration parameter that can be referenced in actions/workflow. For each parallel iteration, this param should contain an unique element of the inputCollection array" - }, - "batchSize": { - "type": [ - "number", - "string" - ], - "minimum": 0, - "minLength": 0, - "description": "Specifies how many iterations may run in parallel at the same time. Used if 'mode' property is set to 'parallel' (default)" - }, - "actions": { - "type": "array", - "description": "Actions to be executed for each of the elements of inputCollection", - "items": { - "type": "object", - "$ref": "#/definitions/action" - }, - "additionalItems": false - }, - "timeouts": { - "type": "object", - "description": "State specific timeouts", - "properties": { - "stateExecTimeout": { - "$ref": "#/definitions/stateExecTimeout" - }, - "actionExecTimeout": { - "$ref": "#/definitions/actionExecTimeout" - } - }, - "required": [] - }, - "stateDataFilter": { - "description": "State data filter", - "$ref": "#/definitions/statedatafilter" - }, - "onErrors": { - "type": "array", - "description": "States error handling definitions", - "items": { - "type": "object", - "$ref": "#/definitions/error" - }, - "additionalItems": false - }, - "transition": { - "description": "Next transition of the workflow after state has completed", - "$ref": "#/definitions/transition" - }, - "compensatedBy": { - "type": "string", - "minLength": 1, - "description": "Unique Name of a workflow state which is responsible for compensation of this state" - }, - "usedForCompensation": { - "type": "boolean", - "default": false, - "description": "If true, this state is used to compensate another state. Default is false" - }, - "mode": { - "type": "string", - "enum": [ - "sequential", - "parallel" - ], - "description": "Specifies how iterations are to be performed (sequentially or in parallel)", - "default": "parallel" - }, - "metadata": { - "$ref": "#/definitions/metadata" - } - }, - "additionalProperties": false, - "if": { - "properties": { - "usedForCompensation": { - "const": true - } - }, - "required": [ - "usedForCompensation" - ] - }, - "then": { - "required": [ - "name", - "type", - "inputCollection", - "actions" - ] - }, - "else": { - "oneOf": [ - { - "required": [ - "name", - "type", - "inputCollection", - "actions", - "end" - ] - }, - { - "required": [ - "name", - "type", - "inputCollection", - "actions", - "transition" - ] - } - ] - } - }, - "callbackstate": { - "type": "object", - "description": "This state performs an action, then waits for the callback event that denotes completion of the action", - "properties": { - "id": { - "type": "string", - "description": "Unique state id", - "minLength": 1 - }, - "name": { - "type": "string", - "description": "State name" - }, - "type": { - "type": "string", - "const": "callback", - "description": "State type" - }, - "action": { - "description": "Defines the action to be executed", - "$ref": "#/definitions/action" - }, - "eventRef": { - "type": "string", - "description": "References an unique callback event name in the defined workflow events" - }, - "timeouts": { - "type": "object", - "description": "State specific timeouts", - "properties": { - "stateExecTimeout": { - "$ref": "#/definitions/stateExecTimeout" - }, - "actionExecTimeout": { - "$ref": "#/definitions/actionExecTimeout" - }, - "eventTimeout": { - "$ref": "#/definitions/eventTimeout" - } - }, - "required": [] - }, - "eventDataFilter": { - "description": "Event data filter", - "$ref": "#/definitions/eventdatafilter" - }, - "stateDataFilter": { - "description": "State data filter", - "$ref": "#/definitions/statedatafilter" - }, - "onErrors": { - "type": "array", - "description": "States error handling definitions", - "items": { - "type": "object", - "$ref": "#/definitions/error" - }, - "additionalItems": false - }, - "transition": { - "description": "Next transition of the workflow after all the actions have been performed", - "$ref": "#/definitions/transition" - }, - "end": { - "$ref": "#/definitions/end", - "description": "State end definition" - }, - "compensatedBy": { - "type": "string", - "minLength": 1, - "description": "Unique Name of a workflow state which is responsible for compensation of this state" - }, - "usedForCompensation": { - "type": "boolean", - "default": false, - "description": "If true, this state is used to compensate another state. Default is false" - }, - "metadata": { - "$ref": "#/definitions/metadata" - } - }, - "additionalProperties": false, - "if": { - "properties": { - "usedForCompensation": { - "const": true - } - }, - "required": [ - "usedForCompensation" - ] - }, - "then": { - "required": [ - "name", - "type", - "action", - "eventRef" - ] - }, - "else": { - "oneOf": [ - { - "required": [ - "name", - "type", - "action", - "eventRef", - "end" - ] - }, - { - "required": [ - "name", - "type", - "action", - "eventRef", - "transition" - ] - } - ] - } - }, - "startdef": { - "oneOf": [ - { - "type": "string", - "description": "Name of the starting workflow state", - "minLength": 1 - }, - { - "type": "object", - "description": "Workflow start definition", - "properties": { - "stateName": { - "type": "string", - "description": "Name of the starting workflow state", - "minLength": 1 - }, - "schedule": { - "description": "Define the time/repeating intervals or cron at which workflow instances should be automatically started.", - "$ref": "#/definitions/schedule" - } - }, - "additionalProperties": false, - "required": [ - "stateName", - "schedule" - ] - } - ] - }, - "schedule": { - "oneOf": [ - { - "type": "string", - "description": "Time interval (must be repeating interval) described with ISO 8601 format. Declares when workflow instances will be automatically created. (UTC timezone is assumed)", - "minLength": 1 - }, - { - "type": "object", - "description": "Start state schedule definition", - "properties": { - "interval": { - "type": "string", - "description": "Time interval (must be repeating interval) described with ISO 8601 format. Declares when workflow instances will be automatically created.", - "minLength": 1 - }, - "cron": { - "$ref": "#/definitions/crondef" - }, - "timezone": { - "type": "string", - "description": "Timezone name used to evaluate the interval & cron-expression. (default: UTC)" - } - }, - "additionalProperties": false, - "oneOf": [ - { - "required": [ - "interval" - ] - }, - { - "required": [ - "cron" - ] - } - ] - } - ] - }, - "end": { - "oneOf": [ - { - "type": "boolean", - "description": "State end definition", - "default": true - }, - { - "type": "object", - "description": "State end definition", - "properties": { - "terminate": { - "type": "boolean", - "default": false, - "description": "If true, completes all execution flows in the given workflow instance" - }, - "produceEvents": { - "type": "array", - "description": "Defines events that should be produced", - "items": { - "type": "object", - "$ref": "#/definitions/produceeventdef" - }, - "additionalItems": false - }, - "compensate": { - "type": "boolean", - "default": false, - "description": "If set to true, triggers workflow compensation. Default is false" - }, - "continueAs": { - "$ref": "#/definitions/continueasdef" - } - }, - "additionalProperties": false, - "required": [] - } - ] - }, - "produceeventdef": { - "type": "object", - "description": "Produce an event and set its data", - "properties": { - "eventRef": { - "type": "string", - "description": "References a name of a defined event" - }, - "data": { - "type": [ - "string", - "object" - ], - "description": "If String, expression which selects parts of the states data output to become the data of the produced event. If object a custom object to become the data of produced event." - }, - "contextAttributes": { - "type": "object", - "description": "Add additional event extension context attributes", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false, - "required": [ - "eventRef" - ] - }, - "statedatafilter": { - "type": "object", - "properties": { - "input": { - "type": "string", - "description": "Workflow expression to filter the state data input" - }, - "output": { - "type": "string", - "description": "Workflow expression that filters the state data output" - } - }, - "additionalProperties": false, - "required": [] - }, - "eventdatafilter": { - "type": "object", - "properties": { - "useData": { - "type": "boolean", - "description": "If set to false, event payload is not added/merged to state data. In this case 'data' and 'toStateData' should be ignored. Default is true.", - "default": true - }, - "data": { - "type": "string", - "description": "Workflow expression that filters the received event payload (default: '${ . }')" - }, - "toStateData": { - "type": "string", - "description": " Workflow expression that selects a state data element to which the filtered event should be added/merged into. If not specified, denotes, the top-level state data element." - } - }, - "additionalProperties": false, - "required": [] - }, - "actiondatafilter": { - "type": "object", - "properties": { - "fromStateData": { - "type": "string", - "description": "Workflow expression that selects state data that the state action can use" - }, - "useResults": { - "type": "boolean", - "description": "If set to false, action data results are not added/merged to state data. In this case 'results' and 'toStateData' should be ignored. Default is true.", - "default": true - }, - "results": { - "type": "string", - "description": "Workflow expression that filters the actions data results" - }, - "toStateData": { - "type": "string", - "description": "Workflow expression that selects a state data element to which the action results should be added/merged into. If not specified, denote, the top-level state data element" - } - }, - "additionalProperties": false, - "required": [] - }, - "errordef": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Domain-specific error name", - "minLength": 1 - }, - "code": { - "type": "string", - "description": "Error code. Can be used in addition to the name to help runtimes resolve to technical errors/exceptions. Should not be defined if error is set to '*'", - "minLength": 1 - }, - "description": { - "type": "string", - "description": "Error description" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - }, - "retrydef": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Unique retry strategy name", - "minLength": 1 - }, - "delay": { - "type": "string", - "description": "Time delay between retry attempts (ISO 8601 duration format)" - }, - "maxDelay": { - "type": "string", - "description": "Maximum time delay between retry attempts (ISO 8601 duration format)" - }, - "increment": { - "type": "string", - "description": "Static value by which the delay increases during each attempt (ISO 8601 time format)" - }, - "multiplier": { - "type": [ - "number", - "string" - ], - "minimum": 0, - "minLength": 1, - "multipleOf": 0.01, - "description": "Numeric value, if specified the delay between retries is multiplied by this value." - }, - "maxAttempts": { - "type": [ - "number", - "string" - ], - "minimum": 1, - "minLength": 0, - "description": "Maximum number of retry attempts." - }, - "jitter": { - "type": [ - "number", - "string" - ], - "minimum": 0, - "maximum": 1, - "description": "If float type, maximum amount of random time added or subtracted from the delay between each retry relative to total delay (between 0 and 1). If string type, absolute maximum amount of random time added or subtracted from the delay between each retry (ISO 8601 duration format)" - } - }, - "additionalProperties": false, - "required": [ - "name", - "maxAttempts" - ] - }, - "metadata": { - "type": "object", - "description": "Metadata information", - "additionalProperties": { - "type": "string" - } - }, - "authdef": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Unique auth definition name", - "minLength": 1 - }, - "scheme": { - "type": "string", - "description": "Defines the auth type", - "enum": [ - "basic", - "bearer", - "oauth2" - ], - "default": "basic" - }, - "properties": { - "oneOf": [ - { - "type": "string", - "description": "Expression referencing a workflow secret that contains all needed auth info" - }, - { - "title": "Basic Auth Info", - "$ref": "#/definitions/basicpropsdef" - }, - { - "title": "Bearer Auth Info State", - "$ref": "#/definitions/bearerpropsdef" - }, - { - "title": "OAuth2 Info", - "$ref": "#/definitions/oauth2propsdef" - } - ] - } - }, - "required": [ - "name", - "properties" - ] - }, - "basicpropsdef": { - "type": "object", - "description": "Basic auth information", - "properties": { - "username": { - "type": "string", - "description": "String or a workflow expression. Contains the user name", - "minLength": 1 - }, - "password": { - "type": "string", - "description": "String or a workflow expression. Contains the user password", - "minLength": 1 - }, - "metadata": { - "$ref": "#/definitions/metadata" - } - }, - "required": [ - "username", - "password" - ], - "additionalProperties": false - }, - "bearerpropsdef": { - "type": "object", - "description": "Bearer auth information", - "properties": { - "token": { - "type": "string", - "description": "String or a workflow expression. Contains the token", - "minLength": 1 - }, - "metadata": { - "$ref": "#/definitions/metadata" - } - }, - "required": [ - "token" - ], - "additionalProperties": false - }, - "oauth2propsdef": { - "type": "object", - "description": "OAuth2 information", - "properties": { - "authority": { - "type": "string", - "description": "String or a workflow expression. Contains the authority information", - "minLength": 1 - }, - "grantType": { - "type": "string", - "description": "Defines the grant type", - "enum": [ - "password", - "clientCredentials", - "tokenExchange" - ], - "additionalItems": false - }, - "clientId": { - "type": "string", - "description": "String or a workflow expression. Contains the client identifier", - "minLength": 1 - }, - "clientSecret": { - "type": "string", - "description": "Workflow secret or a workflow expression. Contains the client secret", - "minLength": 1 - }, - "scopes": { - "type": "array", - "description": "Array containing strings or workflow expressions. Contains the OAuth2 scopes", - "items": { - "type": "string" - }, - "minItems": 1, - "additionalItems": false - }, - "username": { - "type": "string", - "description": "String or a workflow expression. Contains the user name. Used only if grantType is 'resourceOwner'", - "minLength": 1 - }, - "password": { - "type": "string", - "description": "String or a workflow expression. Contains the user password. Used only if grantType is 'resourceOwner'", - "minLength": 1 - }, - "audiences": { - "type": "array", - "description": "Array containing strings or workflow expressions. Contains the OAuth2 audiences", - "items": { - "type": "string" - }, - "minItems": 1, - "additionalItems": false - }, - "subjectToken": { - "type": "string", - "description": "String or a workflow expression. Contains the subject token", - "minLength": 1 - }, - "requestedSubject": { - "type": "string", - "description": "String or a workflow expression. Contains the requested subject", - "minLength": 1 - }, - "requestedIssuer": { - "type": "string", - "description": "String or a workflow expression. Contains the requested issuer", - "minLength": 1 - }, - "metadata": { - "$ref": "#/definitions/metadata" - } - }, - "required": [ - "grantType", - "clientId" - ] - }, - "function": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Unique function name", - "minLength": 1 - }, - "operation": { - "type": "string", - "description": "If type is `rest`, #. If type is `asyncapi`, #. If type is `rpc`, ##. If type is `graphql`, ##. If type is `odata`, #. If type is `expression`, defines the workflow expression.", - "minLength": 1 - }, - "type": { - "type": "string", - "description": "Defines the function type. Is either `rest`, `asyncapi, `rpc`, `graphql`, `odata`, `expression`, or `custom`. Default is `rest`", - "enum": [ - "rest", - "asyncapi", - "rpc", - "graphql", - "odata", - "expression", - "custom" - ], - "default": "rest" - }, - "authRef": { - "type": "string", - "description": "References an auth definition name to be used to access to resource defined in the operation parameter", - "minLength": 1 - }, - "metadata": { - "$ref": "#/definitions/metadata" - } - }, - "additionalProperties": false, - "required": [ - "name", - "operation" - ] - }, - "workflowExecTimeout": { - "oneOf": [ - { - "type": "string", - "description": "Workflow execution timeout duration (ISO 8601 duration format). If not specified should be 'unlimited'", - "minLength": 1 - }, - { - "type": "object", - "properties": { - "duration": { - "type": "string", - "description": "Workflow execution timeout duration (ISO 8601 duration format). If not specified should be 'unlimited'", - "minLength": 1 - }, - "interrupt": { - "type": "boolean", - "description": "If `false`, workflow instance is allowed to finish current execution. If `true`, current workflow execution is abrupted.", - "default": true - }, - "runBefore": { - "type": "string", - "description": "Name of a workflow state to be executed before workflow instance is terminated", - "minLength": 1 - } - }, - "additionalProperties": false, - "required": [ - "duration" - ] - } - ] - }, - "stateExecTimeout": { - "oneOf": [ - { - "type": "string", - "description": "Total state execution timeout (including retries) (ISO 8601 duration format)", - "minLength": 1 - }, - { - "type": "object", - "description": "Workflow default timeouts", - "properties": { - "single": { - "type": "string", - "description": "Single state execution timeout, not including retries (ISO 8601 duration format)", - "minLength": 1 - }, - "total": { - "type": "string", - "description": "Total state execution timeout, including retries (ISO 8601 duration format)", - "minLength": 1 - } - }, - "additionalProperties": false, - "required": [ - "total" - ] - } - ] - }, - "actionExecTimeout": { - "type": "string", - "description": "Single actions definition execution timeout duration (ISO 8601 duration format)", - "minLength": 1 - }, - "branchExecTimeout": { - "type": "string", - "description": "Single branch execution timeout duration (ISO 8601 duration format)", - "minLength": 1 - }, - "eventTimeout": { - "type": "string", - "description": "Timeout duration to wait for consuming defined events (ISO 8601 duration format)", - "minLength": 1 - }, - "eventdef": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Unique event name", - "minLength": 1 - }, - "source": { - "type": "string", - "description": "CloudEvent source" - }, - "type": { - "type": "string", - "description": "CloudEvent type" - }, - "kind": { - "type": "string", - "enum": [ - "consumed", - "produced" - ], - "description": "Defines the CloudEvent as either 'consumed' or 'produced' by the workflow. Default is 'consumed'", - "default": "consumed" - }, - "correlation": { - "type": "array", - "description": "CloudEvent correlation definitions", - "minItems": 1, - "items": { - "type": "object", - "$ref": "#/definitions/correlationDef" - }, - "additionalItems": false - }, - "dataOnly": { - "type": "boolean", - "default": true, - "description": "If `true`, only the Event payload is accessible to consuming Workflow states. If `false`, both event payload and context attributes should be accessible " - }, - "metadata": { - "$ref": "#/definitions/metadata", - "description": "Metadata information" - } - }, - "additionalProperties": false, - "if": { - "properties": { - "kind": { - "const": "consumed" - } - } - }, - "then": { - "required": [ - "name", - "source", - "type" - ] - }, - "else": { - "required": [ - "name", - "type" - ] - } - }, - "correlationDef": { - "type": "object", - "description": "CloudEvent correlation definition", - "properties": { - "contextAttributeName": { - "type": "string", - "description": "CloudEvent Extension Context Attribute name", - "minLength": 1 - }, - "contextAttributeValue": { - "type": "string", - "description": "CloudEvent Extension Context Attribute value", - "minLength": 1 - } - }, - "additionalProperties": false, - "required": [ - "contextAttributeName" - ] - }, - "secrets": { - "oneOf": [ - { - "type": "string", - "format": "uri", - "description": "URI to a resource containing secrets definitions (json or yaml)" - }, - { - "type": "array", - "description": "Workflow Secrets definitions", - "items": { - "type": "string" - }, - "minItems": 1 - } - ] - }, - "timeouts": { - "oneOf": [ - { - "type": "string", - "format": "uri", - "description": "URI to a resource containing timeouts definitions (json or yaml)" - }, - { - "type": "object", - "description": "Workflow default timeouts", - "properties": { - "workflowExecTimeout": { - "$ref": "#/definitions/workflowExecTimeout" - }, - "stateExecTimeout": { - "$ref": "#/definitions/stateExecTimeout" - }, - "actionExecTimeout": { - "$ref": "#/definitions/actionExecTimeout" - }, - "branchExecTimeout": { - "$ref": "#/definitions/branchExecTimeout" - }, - "eventTimeout": { - "$ref": "#/definitions/eventTimeout" - } - }, - "additionalProperties": false, - "required": [] - } - ] - }, - "errors": { - "oneOf": [ - { - "type": "string", - "format": "uri", - "description": "URI to a resource containing error definitions (json or yaml)" - }, - { - "type": "array", - "description": "Workflow Error definitions. Defines checked errors that can be explicitly handled during workflow execution", - "items": { - "type": "object", - "$ref": "#/definitions/errordef" - }, - "additionalItems": false, - "minItems": 1 - } - ] - }, - "events": { - "oneOf": [ - { - "type": "string", - "format": "uri", - "description": "URI to a resource containing event definitions (json or yaml)" - }, - { - "type": "array", - "description": "Workflow CloudEvent definitions. Defines CloudEvents that can be consumed or produced", - "items": { - "type": "object", - "$ref": "#/definitions/eventdef" - }, - "additionalItems": false, - "minItems": 1 - } - ] - }, - "functions": { - "oneOf": [ - { - "type": "string", - "format": "uri", - "description": "URI to a resource containing function definitions (json or yaml)" - }, - { - "type": "array", - "description": "Workflow function definitions", - "items": { - "type": "object", - "$ref": "#/definitions/function" - }, - "additionalItems": false, - "minItems": 1 - } - ] - }, - "retries": { - "oneOf": [ - { - "type": "string", - "format": "uri", - "description": "URI to a resource containing retry definitions (json or yaml)" - }, - { - "type": "array", - "description": "Workflow Retry definitions. Define retry strategies that can be referenced in states onError definitions", - "items": { - "type": "object", - "$ref": "#/definitions/retrydef" - }, - "additionalItems": false, - "minItems": 1 - } - ] - }, - "auth": { - "oneOf": [ - { - "type": "string", - "format": "uri", - "description": "URI to a resource containing auth definitions (json or yaml)" - }, - { - "type": "array", - "description": "Workflow auth definitions", - "items": { - "type": "object", - "$ref": "#/definitions/authdef" - }, - "additionalItems": false, - "minItems": 1 - } - ] - } - } -} \ No newline at end of file diff --git a/src/lib/schema/auth.json b/src/lib/schema/auth.json deleted file mode 100644 index 253ab07b..00000000 --- a/src/lib/schema/auth.json +++ /dev/null @@ -1,194 +0,0 @@ -{ - "$id": "https://serverlessworkflow.io/schemas/0.8/auth.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Serverless Workflow specification - auth schema", - "type": "object", - "auth": { - "oneOf": [ - { - "type": "string", - "format": "uri", - "description": "URI to a resource containing auth definitions (json or yaml)" - }, - { - "type": "array", - "description": "Workflow auth definitions", - "items": { - "type": "object", - "$ref": "#/definitions/authdef" - }, - "additionalItems": false, - "minItems": 1 - } - ] - }, - "required": [ - "auth" - ], - "definitions": { - "authdef": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Unique auth definition name", - "minLength": 1 - }, - "scheme": { - "type": "string", - "description": "Defines the auth type", - "enum": [ - "basic", - "bearer", - "oauth2" - ], - "default": "basic" - }, - "properties": { - "oneOf": [ - { - "type": "string", - "description": "Expression referencing a workflow secret that contains all needed auth info" - }, - { - "title": "Basic Auth Info", - "$ref": "#/definitions/basicpropsdef" - }, - { - "title": "Bearer Auth Info State", - "$ref": "#/definitions/bearerpropsdef" - }, - { - "title": "OAuth2 Info", - "$ref": "#/definitions/oauth2propsdef" - } - ] - } - }, - "required": [ - "name", - "properties" - ] - }, - "basicpropsdef": { - "type": "object", - "description": "Basic auth information", - "properties": { - "username": { - "type": "string", - "description": "String or a workflow expression. Contains the user name", - "minLength": 1 - }, - "password": { - "type": "string", - "description": "String or a workflow expression. Contains the user password", - "minLength": 1 - }, - "metadata": { - "$ref": "common.json#/definitions/metadata" - } - }, - "required": [ - "username", - "password" - ], - "additionalProperties": false - }, - "bearerpropsdef": { - "type": "object", - "description": "Bearer auth information", - "properties": { - "token": { - "type": "string", - "description": "String or a workflow expression. Contains the token", - "minLength": 1 - }, - "metadata": { - "$ref": "common.json#/definitions/metadata" - } - }, - "required": [ - "token" - ], - "additionalProperties": false - }, - "oauth2propsdef": { - "type": "object", - "description": "OAuth2 information", - "properties": { - "authority": { - "type": "string", - "description": "String or a workflow expression. Contains the authority information", - "minLength": 1 - }, - "grantType": { - "type": "string", - "description": "Defines the grant type", - "enum": [ - "password", - "clientCredentials", - "tokenExchange" - ], - "additionalItems": false - }, - "clientId": { - "type": "string", - "description": "String or a workflow expression. Contains the client identifier", - "minLength": 1 - }, - "clientSecret": { - "type": "string", - "description": "Workflow secret or a workflow expression. Contains the client secret", - "minLength": 1 - }, - "scopes": { - "type": "array", - "description": "Array containing strings or workflow expressions. Contains the OAuth2 scopes", - "items": { - "type": "string" - }, - "minItems": 1, - "additionalItems": false - }, - "username": { - "type": "string", - "description": "String or a workflow expression. Contains the user name. Used only if grantType is 'resourceOwner'", - "minLength": 1 - }, - "password": { - "type": "string", - "description": "String or a workflow expression. Contains the user password. Used only if grantType is 'resourceOwner'", - "minLength": 1 - }, - "audiences": { - "type": "array", - "description": "Array containing strings or workflow expressions. Contains the OAuth2 audiences", - "items": { - "type": "string" - }, - "minItems": 1, - "additionalItems": false - }, - "subjectToken": { - "type": "string", - "description": "String or a workflow expression. Contains the subject token", - "minLength": 1 - }, - "requestedSubject": { - "type": "string", - "description": "String or a workflow expression. Contains the requested subject", - "minLength": 1 - }, - "requestedIssuer": { - "type": "string", - "description": "String or a workflow expression. Contains the requested issuer", - "minLength": 1 - }, - "metadata": { - "$ref": "common.json#/definitions/metadata" - } - }, - "required": ["grantType", "clientId"] - } - } -} \ No newline at end of file diff --git a/src/lib/schema/common.json b/src/lib/schema/common.json deleted file mode 100644 index 5a3593e1..00000000 --- a/src/lib/schema/common.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$id": "https://serverlessworkflow.io/schemas/0.8/common.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Serverless Workflow specification - common schema", - "type": "object", - "definitions": { - "metadata": { - "type": "object", - "description": "Metadata information", - "additionalProperties": { - "type": "string" - } - } - } -} \ No newline at end of file diff --git a/src/lib/schema/errors.json b/src/lib/schema/errors.json deleted file mode 100644 index 52088967..00000000 --- a/src/lib/schema/errors.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$id": "https://serverlessworkflow.io/schemas/0.8/errors.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Serverless Workflow specification - errors schema", - "type": "object", - "errors": { - "oneOf": [ - { - "type": "string", - "format": "uri", - "description": "URI to a resource containing error definitions (json or yaml)" - }, - { - "type": "array", - "description": "Workflow Error definitions. Defines checked errors that can be explicitly handled during workflow execution", - "items": { - "type": "object", - "$ref": "#/definitions/errordef" - }, - "additionalItems": false, - "minItems": 1 - } - ] - }, - "required": [ - "errors" - ], - "definitions": { - "errordef": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Domain-specific error name", - "minLength": 1 - }, - "code": { - "type": "string", - "description": "Error code. Can be used in addition to the name to help runtimes resolve to technical errors/exceptions. Should not be defined if error is set to '*'", - "minLength": 1 - }, - "description": { - "type": "string", - "description": "Error description" - } - }, - "additionalProperties": false, - "required": [ - "name" - ] - } - } -} diff --git a/src/lib/schema/events.json b/src/lib/schema/events.json deleted file mode 100644 index 59ef767d..00000000 --- a/src/lib/schema/events.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "$id": "https://serverlessworkflow.io/schemas/0.8/events.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Serverless Workflow specification - events schema", - "type": "object", - "events": { - "oneOf": [ - { - "type": "string", - "format": "uri", - "description": "URI to a resource containing event definitions (json or yaml)" - }, - { - "type": "array", - "description": "Workflow CloudEvent definitions. Defines CloudEvents that can be consumed or produced", - "items": { - "type": "object", - "$ref": "#/definitions/eventdef" - }, - "additionalItems": false, - "minItems": 1 - } - ] - }, - "required": [ - "events" - ], - "definitions": { - "eventdef": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Unique event name", - "minLength": 1 - }, - "source": { - "type": "string", - "description": "CloudEvent source" - }, - "type": { - "type": "string", - "description": "CloudEvent type" - }, - "kind": { - "type": "string", - "enum": [ - "consumed", - "produced" - ], - "description": "Defines the CloudEvent as either 'consumed' or 'produced' by the workflow. Default is 'consumed'", - "default": "consumed" - }, - "correlation": { - "type": "array", - "description": "CloudEvent correlation definitions", - "minItems": 1, - "items": { - "type": "object", - "$ref": "#/definitions/correlationDef" - }, - "additionalItems": false - }, - "dataOnly": { - "type": "boolean", - "default": true, - "description": "If `true`, only the Event payload is accessible to consuming Workflow states. If `false`, both event payload and context attributes should be accessible " - }, - "metadata": { - "$ref": "common.json#/definitions/metadata", - "description": "Metadata information" - } - }, - "additionalProperties": false, - "if": { - "properties": { - "source": { - "type": "null" - } - } - }, - "then": { - "required": [ - "name", - "type" - ] - }, - "else": { - "required": [ - "name", - "source" - ] - } - }, - "correlationDef": { - "type": "object", - "description": "CloudEvent correlation definition", - "properties": { - "contextAttributeName": { - "type": "string", - "description": "CloudEvent Extension Context Attribute name", - "minLength": 1 - }, - "contextAttributeValue": { - "type": "string", - "description": "CloudEvent Extension Context Attribute value", - "minLength": 1 - } - }, - "additionalProperties": false, - "required": [ - "contextAttributeName" - ] - } - } -} \ No newline at end of file diff --git a/src/lib/schema/extensions/kpi.json b/src/lib/schema/extensions/kpi.json deleted file mode 100644 index 08a81382..00000000 --- a/src/lib/schema/extensions/kpi.json +++ /dev/null @@ -1,289 +0,0 @@ -{ - "$id": "https://serverlessworkflow.io/schemas/0.8/extensions/kpi.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Serverless Workflow specification - KPIs Extension Schema", - "type": "object", - "definitions": { - "kpi": { - "type": "object", - "description": "Serverless Workflow KPI Extension", - "properties": { - "extensionid": { - "type": "string", - "default": "workflow-kpi-extension", - "description": "Extension unique identifier" - }, - "workflowid": { - "type": "string", - "minLength": 1, - "description": "Workflow definition unique identifier (workflow id property)" - }, - "workflowVersions": { - "type": "array", - "description": "Workflow versions. If not defined, applies to all workflow instances (regardless of their associated workflow version)", - "items": { - "type": "string" - } - }, - "currency": { - "type": "string", - "default": "USD", - "description": "Unit for all cost-based KPI parameters. Default 'USD'" - }, - "events": { - "type": "array", - "description": "Events KPIs", - "items": { - "type": "object", - "$ref": "#/definitions/eventskpi" - } - }, - "functions": { - "type": "array", - "description": "Functions KPIs", - "items": { - "type": "object", - "$ref": "#/definitions/functionskpi" - } - }, - "states": { - "type": "array", - "description": "States KPIs", - "items": { - "type": "object", - "$ref": "#/definitions/stateskpi" - } - }, - "workflow": { - "description": "Workflow KPIs", - "$ref": "#/definitions/workflowkpi" - } - }, - "required": [ - "extensionid", - "workflowid" - ] - }, - "eventskpi": { - "type": "object", - "properties": { - "for": { - "type": "string", - "description": "References an unique event name in the defined workflow events" - }, - "per": { - "description": "Define the kpi thresholds in terms of time and/or num of workflow instances", - "$ref": "#/definitions/thresholds" - }, - "maxConsumed": { - "type": "string", - "description": "If event kind is 'consumed', the max amount of times this event is consumed" - }, - "minConsumed": { - "type": "string", - "description": "If event kind is 'consumed', the min amount of times this event is consumed" - }, - "avgConsumed": { - "type": "string", - "description": "If event kind is 'consumed', the avg amount of times this event is consumed" - }, - "maxProduced": { - "type": "string", - "description": "If event kind is 'produced', the max amount of times this event is produced" - }, - "minProduced": { - "type": "string", - "description": "If event kind is 'produced', the min amount times this event is produced" - }, - "avgProduced": { - "type": "string", - "description": "If event kind is 'produced', the avg amount of times this event is produced" - } - }, - "required": [ - "for", - "per" - ] - }, - "functionskpi": { - "type": "object", - "allOf": [ - { - "properties": { - "for": { - "type": "string", - "description": "References an unique function name in the defined workflow functions" - }, - "per": { - "description": "Define the kpi thresholds in terms of time and/or num of workflow instances", - "$ref": "#/definitions/thresholds" - }, - "maxErrors": { - "type": "string", - "description": "Max number of errors during function invocation" - }, - "maxRetry": { - "type": "string", - "description": "Max number of retries done for this function invocation" - }, - "maxTimeout": { - "type": "string", - "description": "Max number of times the function timeout time was reached" - } - } - }, - { - "$ref": "#/definitions/invocationkpis" - }, - { - "$ref": "#/definitions/costkpis" - } - ], - "required": [ - "for", - "per" - ] - }, - "stateskpi": { - "type": "object", - "allOf": [ - { - "properties": { - "for": { - "type": "string", - "description": "References an unique state name in the defined workflow events" - }, - "per": { - "description": "Define the kpi thresholds in terms of time and/or num of workflow instances", - "$ref": "#/definitions/thresholds" - } - } - }, - { - "$ref": "#/definitions/execkpis" - }, - { - "$ref": "#/definitions/durationkpis" - }, - { - "$ref": "#/definitions/costkpis" - } - ], - "required": [ - "for", - "per" - ] - }, - "workflowkpi": { - "type": "object", - "allOf": [ - { - "properties": { - "per": { - "description": "Define the kpi thresholds in terms of time and/or num of workflow instances", - "$ref": "#/definitions/thresholds" - } - } - }, - { - "$ref": "#/definitions/invocationkpis" - }, - { - "$ref": "#/definitions/durationkpis" - }, - { - "$ref": "#/definitions/costkpis" - } - ], - "required": [ - "per" - ] - }, - "thresholds": { - "type": "object", - "properties": { - "time": { - "type": "string", - "default": "PT1D", - "description": "ISO_8601 time. 1 day default" - }, - "instances": { - "type": "integer", - "minimum": 1, - "default": 1, - "description": "Number of workflow instances" - } - }, - "required": [ - ] - }, - "costkpis": { - "type": "object", - "properties": { - "maxCost": { - "type": "string", - "description": "Max cost" - }, - "minCost": { - "type": "string", - "description": "Min cost" - }, - "avgCost": { - "type": "string", - "description": "Avg cost" - } - } - }, - "invocationkpis": { - "type": "object", - "properties": { - "maxInvoked": { - "type": "string", - "description": "Max number of invocation times" - }, - "minInvoked": { - "type": "string", - "description": "Min number of invocation times" - }, - "avgInvoked": { - "type": "string", - "description": "Avg number of invocation times" - } - } - }, - "durationkpis": { - "type": "object", - "properties": { - "maxDuration": { - "type": "string", - "description": "ISO 8601. Max duration" - }, - "minDuration": { - "type": "string", - "description": "ISO 8601. Min duration" - }, - "avgDuration": { - "type": "string", - "description": "ISO 8601. Avg duration" - } - } - }, - "execkpis": { - "type": "object", - "properties": { - "maxExec": { - "type": "string", - "description": "Max exec number" - }, - "minExec": { - "type": "string", - "description": "Min exec numbe" - }, - "avgExec": { - "type": "string", - "description": "Avg exec number" - } - } - } - } -} \ No newline at end of file diff --git a/src/lib/schema/extensions/ratelimiting.json b/src/lib/schema/extensions/ratelimiting.json deleted file mode 100644 index a7bc6f2c..00000000 --- a/src/lib/schema/extensions/ratelimiting.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "$id": "https://serverlessworkflow.io/schemas/0.8/extensions/ratelimiting.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Serverless Workflow specification - Various workflow rate limiting settings", - "type": "object", - "definitions": { - "ratelimiting": { - "type": "object", - "description": "Serverless Workflow Rate Limiting Extension", - "properties": { - "extensionid": { - "type": "string", - "default": "workflow-ratelimiting-extension", - "description": "Extension unique identifier" - }, - "workflowid": { - "type": "string", - "minLength": 1, - "description": "Workflow definition unique identifier (workflow id property)" - }, - "workflowVersions": { - "type": "array", - "description": "Workflow versions. If not defined, applies to all workflow instances (regardless of their associated workflow version)", - "items": { - "type": "string" - } - }, - "singleInstance": { - "description": "Rate Limit settings per single instance of a workflow with provided workflowid", - "$ref": "#/definitions/ratelimits" - }, - "allInstances": { - "description": "Rate Limit settings across all instance of a workflow with provided workflowid", - "$ref": "#/definitions/ratelimits" - } - }, - "required": [ - "extensionid", - "workflowid" - ] - }, - "ratelimits": { - "type": "object", - "properties": { - "maxActionsPerSecond": { - "type": "number", - "default": 0, - "description": "Sets the rate limiting on number of actions that can be executed per second. Notice that the number is represented as number type, so that you can set it to less than 1 if needed. For example, set the number to 0.1 means workflow actions can be executed once every 10 seconds. Default zero value means 'unlimited'" - }, - "maxConcurrentActions": { - "type": "number", - "default": 100, - "description": "Maximum number of actions that can be executed in parallel" - }, - "maxProducedEventsPerSecond": { - "type": "number", - "default": 0, - "description": "Sets the rate limiting on number of events that can be produced per second. Notice that the number is represented as number type, so that you can set it to less than 1 if needed. For example, set the number to 0.1 means workflow can produce events once every 10 seconds. Default zero value means 'unlimited'" - }, - "maxStates": { - "type": "integer", - "default": 0, - "description": "Maximum number of workflow states that should be executed. Default is zero, meaning unlimited." - }, - "maxTransitions": { - "type": "integer", - "default": 0, - "description": "Maximum number of workflow transitions that should be executed. Default is zero, meaning unlimited." - } - } - } - } -} \ No newline at end of file diff --git a/src/lib/schema/functions.json b/src/lib/schema/functions.json deleted file mode 100644 index a29bd2d7..00000000 --- a/src/lib/schema/functions.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "$id": "https://serverlessworkflow.io/schemas/0.8/functions.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Serverless Workflow specification - functions schema", - "type": "object", - "functions": { - "oneOf": [ - { - "type": "string", - "format": "uri", - "description": "URI to a resource containing function definitions (json or yaml)" - }, - { - "type": "array", - "description": "Workflow function definitions", - "items": { - "type": "object", - "$ref": "#/definitions/function" - }, - "additionalItems": false, - "minItems": 1 - } - ] - }, - "required": [ - "functions" - ], - "definitions": { - "function": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Unique function name", - "minLength": 1 - }, - "operation": { - "type": "string", - "description": "If type is `rest`, #. If type is `asyncapi`, #. If type is `rpc`, ##. If type is `graphql`, ##. If type is `odata`, #. If type is `expression`, defines the workflow expression.", - "minLength": 1 - }, - "type": { - "type": "string", - "description": "Defines the function type. Is either `rest`, `asyncapi, `rpc`, `graphql`, `odata`, `expression`, or `custom`. Default is `rest`", - "enum": [ - "rest", - "asyncapi", - "rpc", - "graphql", - "odata", - "expression", - "custom" - ], - "default": "rest" - }, - "authRef": { - "oneOf": [ - { - "type": "string", - "description": "References the auth definition to be used to invoke the operation", - "minLength": 1 - }, - { - "type": "object", - "description": "Configures both the auth definition used to retrieve the operation's resource and the auth definition used to invoke said operation", - "properties":{ - "resource":{ - "type": "string", - "description": "References an auth definition to be used to access the resource defined in the operation parameter", - "minLength": 1 - }, - "invocation":{ - "type": "string", - "description": "References an auth definition to be used to invoke the operation" - } - }, - "additionalProperties": false, - "required": [ - "resource" - ] - } - ] - }, - "metadata": { - "$ref": "common.json#/definitions/metadata" - } - }, - "additionalProperties": false, - "required": [ - "name", - "operation" - ] - } - } -} \ No newline at end of file diff --git a/src/lib/schema/odata.json b/src/lib/schema/odata.json deleted file mode 100644 index 958cd99c..00000000 --- a/src/lib/schema/odata.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "$id": "https://serverlessworkflow.io/schemas/0.8/odata.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Serverless Workflow specification - OData command options schema", - "type": "object", - "key": { - "type": "string", - "description": "The unique identifier of the single entry to query", - "minLength": 1 - }, - "queryOptions":{ - "$ref": "#/definitions/queryoptions" - }, - "definitions": { - "queryoptions": { - "type": "object", - "properties": { - "filter": { - "type": "string", - "description": "The $filter system query option allows clients to filter the set of resources that are addressed by a request URL. $filter specifies conditions that MUST be met by a resource for it to be returned in the set of matching resources", - "minLength": 1 - }, - "expand": { - "type": "string", - "description": "The $expand system query option allows clients to request related resources when a resource that satisfies a particular request is retrieved", - "minLength": 1 - }, - "select": { - "type": "string", - "description": "The $select system query option allows clients to requests a limited set of information for each entity or complex type identified by the ResourcePath and other System Query Options like $filter, $top, $skip etc. The $select query option is often used in conjunction with the $expand query option, to first increase the scope of the resource graph returned ($expand) and then selectively prune that resource graph ($select)", - "minLength": 1 - }, - "orderBy": { - "type": "string", - "description": "The $orderby system query option allows clients to request resource in a particular order", - "minLength": 1 - }, - "top": { - "type": "integer", - "description": "The $top system query option allows clients a required number of resources. Usually used in conjunction with the $skip query options", - "minLength": 1 - }, - "skip": { - "type": "integer", - "description": "The $skip system query option allows clients to skip a given number of resources. Usually used in conjunction with the $top query options", - "minLength": 1 - }, - "count": { - "type": "boolean", - "description": "The $count system query option allows clients to request a count of the matching resources included with the resources in the response" - }, - "search": { - "type": "string", - "description": "The $search system query option allows clients to request items within a collection matching a free-text search expression", - "minLength": 1 - }, - "format": { - "type": "string", - "description": "The $format system query option if supported allows clients to request a response in a particular format", - "minLength": 1 - }, - "compute": { - "type": "string", - "description": "The $compute system query option allows clients to define computed properties that can be used in a $select or within a $filter or $orderby expression.", - "minLength": 1 - }, - "index": { - "type": "string", - "description": "The $index system query option allows clients to do a positional insert into a collection annotated with using the Core.PositionalInsert term (see http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#VocCore)", - "minLength": 1 - }, - "schemaVersion": { - "type": "string", - "description": "The $schemaversion system query option allows clients to specify the version of the schema against which the request is made. The semantics of $schemaversion is covered in the OData-Protocol (http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#odata) document.", - "minLength": 1 - } - }, - "additionalProperties": false - } - } -} \ No newline at end of file diff --git a/src/lib/schema/retries.json b/src/lib/schema/retries.json deleted file mode 100644 index 1690abd7..00000000 --- a/src/lib/schema/retries.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "$id": "https://serverlessworkflow.io/schemas/0.8/retries.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Serverless Workflow specification - retries schema", - "type": "object", - "retries": { - "oneOf": [ - { - "type": "string", - "format": "uri", - "description": "URI to a resource containing retry definitions (json or yaml)" - }, - { - "type": "array", - "description": "Workflow Retry definitions. Define retry strategies that can be referenced in states onError definitions", - "items": { - "type": "object", - "$ref": "#/definitions/retrydef" - }, - "additionalItems": false, - "minItems": 1 - } - ] - }, - "required": [ - "retries" - ], - "definitions": { - "retrydef": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Unique retry strategy name", - "minLength": 1 - }, - "delay": { - "type": "string", - "description": "Time delay between retry attempts (ISO 8601 duration format)" - }, - "maxDelay": { - "type": "string", - "description": "Maximum time delay between retry attempts (ISO 8601 duration format)" - }, - "increment": { - "type": "string", - "description": "Static value by which the delay increases during each attempt (ISO 8601 time format)" - }, - "multiplier": { - "type": [ - "number", - "string" - ], - "minimum": 0, - "minLength": 1, - "multipleOf": 0.01, - "description": "Numeric value, if specified the delay between retries is multiplied by this value." - }, - "maxAttempts": { - "type": [ - "number", - "string" - ], - "minimum": 1, - "minLength": 0, - "description": "Maximum number of retry attempts." - }, - "jitter": { - "type": [ - "number", - "string" - ], - "minimum": 0, - "maximum": 1, - "description": "If float type, maximum amount of random time added or subtracted from the delay between each retry relative to total delay (between 0 and 1). If string type, absolute maximum amount of random time added or subtracted from the delay between each retry (ISO 8601 duration format)" - } - }, - "additionalProperties": false, - "required": [ - "name", - "maxAttempts" - ] - } - } -} diff --git a/src/lib/schema/secrets.json b/src/lib/schema/secrets.json deleted file mode 100644 index dc553cc1..00000000 --- a/src/lib/schema/secrets.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$id": "https://serverlessworkflow.io/schemas/0.8/secrets.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Serverless Workflow specification - secrets schema", - "type": "object", - "secrets": { - "oneOf": [ - { - "type": "string", - "format": "uri", - "description": "URI to a resource containing secrets definitions (json or yaml)" - }, - { - "type": "array", - "description": "Workflow Secrets definitions", - "items": { - "type": "string" - }, - "minItems": 1 - } - ] - }, - "required": [ - "secrets" - ] -} \ No newline at end of file diff --git a/src/lib/schema/timeouts.json b/src/lib/schema/timeouts.json deleted file mode 100644 index 95f30ce5..00000000 --- a/src/lib/schema/timeouts.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "$id": "https://serverlessworkflow.io/schemas/0.8/timeouts.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Serverless Workflow specification - functions schema", - "type": "object", - "timeouts": { - "oneOf": [ - { - "type": "string", - "format": "uri", - "description": "URI to a resource containing timeouts definitions (json or yaml)" - }, - { - "type": "object", - "description": "Workflow default timeouts", - "properties": { - "workflowExecTimeout": { - "$ref": "#/definitions/workflowExecTimeout" - }, - "stateExecTimeout": { - "$ref": "#/definitions/stateExecTimeout" - }, - "actionExecTimeout": { - "$ref": "#/definitions/actionExecTimeout" - }, - "branchExecTimeout": { - "$ref": "#/definitions/branchExecTimeout" - }, - "eventTimeout": { - "$ref": "#/definitions/eventTimeout" - } - }, - "additionalProperties": false, - "required": [] - } - ] - }, - "required": [ - "timeouts" - ], - "definitions": { - "workflowExecTimeout": { - "oneOf": [ - { - "type": "string", - "description": "Workflow execution timeout duration (ISO 8601 duration format). If not specified should be 'unlimited'", - "minLength": 1 - }, - { - "type": "object", - "properties": { - "duration": { - "type": "string", - "description": "Workflow execution timeout duration (ISO 8601 duration format). If not specified should be 'unlimited'", - "minLength": 1 - }, - "interrupt": { - "type": "boolean", - "description": "If `false`, workflow instance is allowed to finish current execution. If `true`, current workflow execution is abrupted.", - "default": true - }, - "runBefore": { - "type": "string", - "description": "Name of a workflow state to be executed before workflow instance is terminated", - "minLength": 1 - } - }, - "additionalProperties": false, - "required": [ - "duration" - ] - } - ] - }, - "stateExecTimeout": { - "type": "string", - "description": "Workflow state execution timeout duration (ISO 8601 duration format)", - "minLength": 1 - }, - "actionExecTimeout": { - "type": "string", - "description": "Action execution timeout duration (ISO 8601 duration format)", - "minLength": 1 - }, - "branchExecTimeout": { - "type": "string", - "description": "Branch execution timeout duration (ISO 8601 duration format)", - "minLength": 1 - }, - "eventTimeout": { - "type": "string", - "description": "Timeout duration to wait for consuming defined events (ISO 8601 duration format)", - "minLength": 1 - } - } -} \ No newline at end of file diff --git a/src/lib/schema/types/index.ts b/src/lib/schema/types/index.ts deleted file mode 100644 index 1754cf0f..00000000 --- a/src/lib/schema/types/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export * as Specification from './workflow'; diff --git a/src/lib/schema/types/workflow.ts b/src/lib/schema/types/workflow.ts deleted file mode 100644 index dbde7db2..00000000 --- a/src/lib/schema/types/workflow.ts +++ /dev/null @@ -1,1511 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Serverless Workflow specification - workflow schema - */ -export type Workflow /* Serverless Workflow specification - workflow schema */ = - | { - /** - * Workflow unique identifier - */ - id: string; - /** - * Domain-specific workflow identifier - */ - key?: string; - /** - * Workflow name - */ - name?: string; - /** - * Workflow description - */ - description?: string; - /** - * Workflow version - */ - version?: string; // ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ - /** - * List of helpful terms describing the workflows intended purpose, subject areas, or other important qualities - */ - annotations?: [string, ...string[]]; - dataInputSchema?: - | string - | { - schema: any; - /** - * Determines if workflow execution should continue if there are validation errors - */ - failOnValidationErrors?: boolean; - }; - secrets?: Secrets; - constants?: - | string /* uri */ - | { - [key: string]: any; - }; - start?: Startdef; - /** - * Serverless Workflow schema version - */ - specVersion: string; - /** - * Identifies the expression language used for workflow expressions. Default is 'jq' - */ - expressionLang?: string; - timeouts?: Timeouts; - errors?: Errors; - /** - * If 'true', workflow instances is not terminated when there are no active execution paths. Instance can be terminated via 'terminate end definition' or reaching defined 'workflowExecTimeout' - */ - keepActive?: boolean; - metadata?: /* Metadata information */ Metadata; - events?: Events; - functions?: Functions; - /** - * If set to true, actions should automatically be retried on unchecked errors. Default is false - */ - autoRetries?: boolean; - retries?: Retries; - auth?: Auth; - extensions?: Extensions; - /** - * State definitions - */ - states: [ - ( - | /* Causes the workflow execution to sleep for a specified duration */ Sleepstate - | /* This state is used to wait for events from event sources, then consumes them and invoke one or more actions to run in sequence or parallel */ Eventstate - | /* Defines actions be performed. Does not wait for incoming events */ Operationstate - | /* Consists of a number of states that are executed in parallel */ Parallelstate - | Switchstate - | /* Inject static data into state data. Does not perform any actions */ Injectstate - | /* Execute a set of defined actions or workflows for each element of a data array */ Foreachstate - | /* This state performs an action, then waits for the callback event that denotes completion of the action */ Callbackstate - ), - ...( - | /* Causes the workflow execution to sleep for a specified duration */ Sleepstate - | /* This state is used to wait for events from event sources, then consumes them and invoke one or more actions to run in sequence or parallel */ Eventstate - | /* Defines actions be performed. Does not wait for incoming events */ Operationstate - | /* Consists of a number of states that are executed in parallel */ Parallelstate - | Switchstate - | /* Inject static data into state data. Does not perform any actions */ Injectstate - | /* Execute a set of defined actions or workflows for each element of a data array */ Foreachstate - | /* This state performs an action, then waits for the callback event that denotes completion of the action */ Callbackstate - )[] - ]; - } - | { - /** - * Workflow unique identifier - */ - id?: string; - /** - * Domain-specific workflow identifier - */ - key: string; - /** - * Workflow name - */ - name?: string; - /** - * Workflow description - */ - description?: string; - /** - * Workflow version - */ - version?: string; // ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ - /** - * List of helpful terms describing the workflows intended purpose, subject areas, or other important qualities - */ - annotations?: [string, ...string[]]; - dataInputSchema?: - | string - | { - schema: any; - /** - * Determines if workflow execution should continue if there are validation errors - */ - failOnValidationErrors?: boolean; - }; - secrets?: Secrets; - constants?: - | string /* uri */ - | { - [key: string]: any; - }; - start?: Startdef; - /** - * Serverless Workflow schema version - */ - specVersion: string; - /** - * Identifies the expression language used for workflow expressions. Default is 'jq' - */ - expressionLang?: string; - timeouts?: Timeouts; - errors?: Errors; - /** - * If 'true', workflow instances is not terminated when there are no active execution paths. Instance can be terminated via 'terminate end definition' or reaching defined 'workflowExecTimeout' - */ - keepActive?: boolean; - metadata?: /* Metadata information */ Metadata; - events?: Events; - functions?: Functions; - /** - * If set to true, actions should automatically be retried on unchecked errors. Default is false - */ - autoRetries?: boolean; - retries?: Retries; - auth?: Auth; - extensions?: Extensions; - /** - * State definitions - */ - states: [ - ( - | /* Causes the workflow execution to sleep for a specified duration */ Sleepstate - | /* This state is used to wait for events from event sources, then consumes them and invoke one or more actions to run in sequence or parallel */ Eventstate - | /* Defines actions be performed. Does not wait for incoming events */ Operationstate - | /* Consists of a number of states that are executed in parallel */ Parallelstate - | Switchstate - | /* Inject static data into state data. Does not perform any actions */ Injectstate - | /* Execute a set of defined actions or workflows for each element of a data array */ Foreachstate - | /* This state performs an action, then waits for the callback event that denotes completion of the action */ Callbackstate - ), - ...( - | /* Causes the workflow execution to sleep for a specified duration */ Sleepstate - | /* This state is used to wait for events from event sources, then consumes them and invoke one or more actions to run in sequence or parallel */ Eventstate - | /* Defines actions be performed. Does not wait for incoming events */ Operationstate - | /* Consists of a number of states that are executed in parallel */ Parallelstate - | Switchstate - | /* Inject static data into state data. Does not perform any actions */ Injectstate - | /* Execute a set of defined actions or workflows for each element of a data array */ Foreachstate - | /* This state performs an action, then waits for the callback event that denotes completion of the action */ Callbackstate - )[] - ]; - }; -export type Action = - | { - /** - * Unique action definition name - */ - name?: string; - functionRef: Functionref; - eventRef?: /* Event References */ Eventref; - subFlowRef?: Subflowref; - sleep?: Sleep; - /** - * References a defined workflow retry definition. If not defined the default retry policy is assumed - */ - retryRef?: string; - /** - * List of unique references to defined workflow errors for which the action should not be retried. Used only when `autoRetries` is set to `true` - */ - nonRetryableErrors?: [string, ...string[]]; - /** - * List of unique references to defined workflow errors for which the action should be retried. Used only when `autoRetries` is set to `false` - */ - retryableErrors?: [string, ...string[]]; - actionDataFilter?: Actiondatafilter; - /** - * Expression, if defined, must evaluate to true for this action to be performed. If false, action is disregarded - */ - condition?: string; - } - | { - /** - * Unique action definition name - */ - name?: string; - functionRef?: Functionref; - eventRef: /* Event References */ Eventref; - subFlowRef?: Subflowref; - sleep?: Sleep; - /** - * References a defined workflow retry definition. If not defined the default retry policy is assumed - */ - retryRef?: string; - /** - * List of unique references to defined workflow errors for which the action should not be retried. Used only when `autoRetries` is set to `true` - */ - nonRetryableErrors?: [string, ...string[]]; - /** - * List of unique references to defined workflow errors for which the action should be retried. Used only when `autoRetries` is set to `false` - */ - retryableErrors?: [string, ...string[]]; - actionDataFilter?: Actiondatafilter; - /** - * Expression, if defined, must evaluate to true for this action to be performed. If false, action is disregarded - */ - condition?: string; - } - | { - /** - * Unique action definition name - */ - name?: string; - functionRef?: Functionref; - eventRef?: /* Event References */ Eventref; - subFlowRef: Subflowref; - sleep?: Sleep; - /** - * References a defined workflow retry definition. If not defined the default retry policy is assumed - */ - retryRef?: string; - /** - * List of unique references to defined workflow errors for which the action should not be retried. Used only when `autoRetries` is set to `true` - */ - nonRetryableErrors?: [string, ...string[]]; - /** - * List of unique references to defined workflow errors for which the action should be retried. Used only when `autoRetries` is set to `false` - */ - retryableErrors?: [string, ...string[]]; - actionDataFilter?: Actiondatafilter; - /** - * Expression, if defined, must evaluate to true for this action to be performed. If false, action is disregarded - */ - condition?: string; - }; -/** - * Action execution timeout duration (ISO 8601 duration format) - */ -export type ActionExecTimeout = string; -export interface Actiondatafilter { - /** - * Workflow expression that selects state data that the state action can use - */ - fromStateData?: string; - /** - * If set to false, action data results are not added/merged to state data. In this case 'results' and 'toStateData' should be ignored. Default is true. - */ - useResults?: boolean; - /** - * Workflow expression that filters the actions data results - */ - results?: string; - /** - * Workflow expression that selects a state data element to which the action results should be added/merged into. If not specified, denote, the top-level state data element - */ - toStateData?: string; -} -export type Auth = string /* uri */ | [Authdef, ...Authdef[]]; -export interface Authdef { - /** - * Unique auth definition name - */ - name: string; - /** - * Defines the auth type - */ - scheme?: 'basic' | 'bearer' | 'oauth2'; - properties: - | string - | /* Basic auth information */ Basicpropsdef - | /* Bearer auth information */ Bearerpropsdef - | /* OAuth2 information */ Oauth2propsdef; -} -/** - * Basic auth information - */ -export interface Basicpropsdef { - /** - * String or a workflow expression. Contains the user name - */ - username: string; - /** - * String or a workflow expression. Contains the user password - */ - password: string; - metadata?: /* Metadata information */ Metadata; -} -/** - * Bearer auth information - */ -export interface Bearerpropsdef { - /** - * String or a workflow expression. Contains the token - */ - token: string; - metadata?: /* Metadata information */ Metadata; -} -/** - * Branch Definition - */ -export interface Branch { - /** - * Branch name - */ - name: string; - /** - * State specific timeouts - */ - timeouts?: { - actionExecTimeout?: /* Action execution timeout duration (ISO 8601 duration format) */ ActionExecTimeout; - branchExecTimeout?: /* Branch execution timeout duration (ISO 8601 duration format) */ BranchExecTimeout; - }; - /** - * Actions to be executed in this branch - */ - actions: Action[]; -} -/** - * Branch execution timeout duration (ISO 8601 duration format) - */ -export type BranchExecTimeout = string; -/** - * This state performs an action, then waits for the callback event that denotes completion of the action - */ -export interface Callbackstate { - /** - * State name - */ - name?: string; - /** - * State type - */ - type?: 'callback'; - /** - * Defines the action to be executed - */ - action?: Action; - /** - * References an unique callback event name in the defined workflow events - */ - eventRef?: string; - /** - * State specific timeouts - */ - timeouts?: { - stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout; - actionExecTimeout?: /* Action execution timeout duration (ISO 8601 duration format) */ ActionExecTimeout; - eventTimeout?: /* Timeout duration to wait for consuming defined events (ISO 8601 duration format) */ EventTimeout; - }; - /** - * Event data filter - */ - eventDataFilter?: Eventdatafilter; - /** - * State data filter - */ - stateDataFilter?: Statedatafilter; - /** - * States error handling definitions - */ - onErrors?: Error[]; - /** - * Next transition of the workflow after all the actions have been performed - */ - transition?: Transition; - /** - * State end definition - */ - end?: End; - /** - * Unique Name of a workflow state which is responsible for compensation of this state - */ - compensatedBy?: string; - /** - * If true, this state is used to compensate another state. Default is false - */ - usedForCompensation?: boolean; - metadata?: /* Metadata information */ Metadata; -} -export type Continueasdef = - | string - | { - /** - * Unique id of the workflow to continue execution as - */ - workflowId: string; - /** - * Version of the workflow to continue execution as - */ - version?: string; // ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ - /** - * If string type, an expression which selects parts of the states data output to become the workflow data input of continued execution. If object type, a custom object to become the workflow data input of the continued execution - */ - data?: - | string - | { - [key: string]: any; - }; - /** - * Workflow execution timeout to be used by the workflow continuing execution. Overwrites any specific settings set by that workflow - */ - workflowExecTimeout?: WorkflowExecTimeout; - }; -/** - * CloudEvent correlation definition - */ -export interface CorrelationDef { - /** - * CloudEvent Extension Context Attribute name - */ - contextAttributeName: string; - /** - * CloudEvent Extension Context Attribute value - */ - contextAttributeValue?: string; -} -export type Crondef = - | string - | { - /** - * Repeating interval (cron expression) describing when the workflow instance should be created - */ - expression: string; - /** - * Specific date and time (ISO 8601 format) when the cron expression invocation is no longer valid - */ - validUntil?: string; - }; -/** - * Permits transitions to other states based on data conditions - */ -export interface Databasedswitchstate { - /** - * State name - */ - name: string; - /** - * State type - */ - type: 'switch'; - /** - * State data filter - */ - stateDataFilter?: Statedatafilter; - /** - * State specific timeouts - */ - timeouts?: { - stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout; - }; - /** - * Defines conditions evaluated against state data - */ - dataConditions: Datacondition[]; - /** - * States error handling definitions - */ - onErrors?: Error[]; - /** - * Default transition of the workflow if there is no matching data conditions. Can include a transition or end definition - */ - defaultCondition: /* DefaultCondition definition. Can be either a transition or end definition */ Defaultconditiondef; - /** - * Unique Name of a workflow state which is responsible for compensation of this state - */ - compensatedBy?: string; - /** - * If true, this state is used to compensate another state. Default is false - */ - usedForCompensation?: boolean; - metadata?: /* Metadata information */ Metadata; -} -export type Datacondition /* Switch state data based condition */ = - | Transitiondatacondition - | /* Switch state data based condition */ Enddatacondition; -/** - * DefaultCondition definition. Can be either a transition or end definition - */ -export type Defaultconditiondef /* DefaultCondition definition. Can be either a transition or end definition */ = - | { - /** - * The optional name of the default condition, used solely for display purposes - */ - name?: string; - transition: Transition; - end?: End; - } - | { - /** - * The optional name of the default condition, used solely for display purposes - */ - name?: string; - transition?: Transition; - end: End; - }; -export type End = - | boolean - | { - /** - * If true, completes all execution flows in the given workflow instance - */ - terminate?: boolean; - /** - * Defines events that should be produced - */ - produceEvents?: /* Produce an event and set its data */ Produceeventdef[]; - /** - * If set to true, triggers workflow compensation. Default is false - */ - compensate?: boolean; - continueAs?: Continueasdef; - }; -/** - * Switch state data based condition - */ -export interface Enddatacondition { - /** - * Data condition name - */ - name?: string; - /** - * Workflow expression evaluated against state data. Must evaluate to true or false - */ - condition: string; - /** - * Workflow end definition - */ - end: End; - metadata?: /* Metadata information */ Metadata; -} -/** - * Switch state data event condition - */ -export interface Endeventcondition { - /** - * Event condition name - */ - name?: string; - /** - * References an unique event name in the defined workflow events - */ - eventRef: string; - /** - * Explicit transition to end - */ - end: End; - /** - * Event data filter definition - */ - eventDataFilter?: Eventdatafilter; - metadata?: /* Metadata information */ Metadata; -} -export type Error = - | { - /** - * Reference to a unique workflow error definition. Used of errorRefs is not used - */ - errorRef: string; - /** - * References one or more workflow error definitions. Used if errorRef is not used - */ - errorRefs?: [string, ...string[]]; - transition: Transition; - end?: End; - } - | { - /** - * Reference to a unique workflow error definition. Used of errorRefs is not used - */ - errorRef: string; - /** - * References one or more workflow error definitions. Used if errorRef is not used - */ - errorRefs?: [string, ...string[]]; - transition?: Transition; - end: End; - } - | { - /** - * Reference to a unique workflow error definition. Used of errorRefs is not used - */ - errorRef?: string; - /** - * References one or more workflow error definitions. Used if errorRef is not used - */ - errorRefs: [string, ...string[]]; - transition: Transition; - end?: End; - } - | { - /** - * Reference to a unique workflow error definition. Used of errorRefs is not used - */ - errorRef?: string; - /** - * References one or more workflow error definitions. Used if errorRef is not used - */ - errorRefs: [string, ...string[]]; - transition?: Transition; - end: End; - }; -export interface Errordef { - /** - * Domain-specific error name - */ - name: string; - /** - * Error code. Can be used in addition to the name to help runtimes resolve to technical errors/exceptions. Should not be defined if error is set to '*' - */ - code?: string; - /** - * Error description - */ - description?: string; -} -export type Errors = string /* uri */ | [Errordef, ...Errordef[]]; -/** - * Timeout duration to wait for consuming defined events (ISO 8601 duration format) - */ -export type EventTimeout = string; -/** - * Permits transitions to other states based on events - */ -export interface Eventbasedswitchstate { - /** - * State name - */ - name: string; - /** - * State type - */ - type: 'switch'; - /** - * State data filter - */ - stateDataFilter?: Statedatafilter; - /** - * State specific timeouts - */ - timeouts?: { - stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout; - eventTimeout?: /* Timeout duration to wait for consuming defined events (ISO 8601 duration format) */ EventTimeout; - }; - /** - * Defines conditions evaluated against events - */ - eventConditions: Eventcondition[]; - /** - * States error handling definitions - */ - onErrors?: Error[]; - /** - * Default transition of the workflow if there is no matching data conditions. Can include a transition or end definition - */ - defaultCondition: /* DefaultCondition definition. Can be either a transition or end definition */ Defaultconditiondef; - /** - * Unique Name of a workflow state which is responsible for compensation of this state - */ - compensatedBy?: string; - /** - * If true, this state is used to compensate another state. Default is false - */ - usedForCompensation?: boolean; - metadata?: /* Metadata information */ Metadata; -} -export type Eventcondition /* Switch state data event condition */ = - | Transitioneventcondition - | /* Switch state data event condition */ Endeventcondition; -export interface Eventdatafilter { - /** - * If set to false, event payload is not added/merged to state data. In this case 'data' and 'toStateData' should be ignored. Default is true. - */ - useData?: boolean; - /** - * Workflow expression that filters the received event payload (default: '${ . }') - */ - data?: string; - /** - * Workflow expression that selects a state data element to which the filtered event should be added/merged into. If not specified, denotes, the top-level state data element. - */ - toStateData?: string; -} -export interface Eventdef { - /** - * Unique event name - */ - name?: string; - /** - * CloudEvent source - */ - source?: string; - /** - * CloudEvent type - */ - type?: string; - /** - * Defines the CloudEvent as either 'consumed' or 'produced' by the workflow. Default is 'consumed' - */ - kind?: 'consumed' | 'produced'; - /** - * CloudEvent correlation definitions - */ - correlation?: [ - /* CloudEvent correlation definition */ CorrelationDef, - .../* CloudEvent correlation definition */ CorrelationDef[] - ]; - /** - * If `true`, only the Event payload is accessible to consuming Workflow states. If `false`, both event payload and context attributes should be accessible - */ - dataOnly?: boolean; - /** - * Metadata information - */ - metadata?: /* Metadata information */ Metadata; -} -/** - * Event References - */ -export interface Eventref { - /** - * Reference to the unique name of a 'produced' event definition - */ - produceEventRef: string; - /** - * Reference to the unique name of a 'consumed' event definition - */ - consumeEventRef?: string; - /** - * Maximum amount of time (ISO 8601 format) to wait for the result event. If not defined it should default to the actionExecutionTimeout - */ - consumeEventTimeout?: string; - /** - * If string type, an expression which selects parts of the states data output to become the data (payload) of the event referenced by 'produceEventRef'. If object type, a custom object to become the data (payload) of the event referenced by 'produceEventRef'. - */ - data?: - | string - | { - [key: string]: any; - }; - /** - * Add additional extension context attributes to the produced event - */ - contextAttributes?: { - [name: string]: string; - }; -} -export type Events = string /* uri */ | [Eventdef, ...Eventdef[]]; -/** - * This state is used to wait for events from event sources, then consumes them and invoke one or more actions to run in sequence or parallel - */ -export type Eventstate = - /* This state is used to wait for events from event sources, then consumes them and invoke one or more actions to run in sequence or parallel */ - | { - /** - * State name - */ - name: string; - /** - * State type - */ - type: 'event'; - /** - * If true consuming one of the defined events causes its associated actions to be performed. If false all of the defined events must be consumed in order for actions to be performed - */ - exclusive?: boolean; - /** - * Define the events to be consumed and optional actions to be performed - */ - onEvents: Onevents[]; - /** - * State specific timeouts - */ - timeouts?: { - stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout; - actionExecTimeout?: /* Action execution timeout duration (ISO 8601 duration format) */ ActionExecTimeout; - eventTimeout?: /* Timeout duration to wait for consuming defined events (ISO 8601 duration format) */ EventTimeout; - }; - stateDataFilter?: Statedatafilter; - /** - * States error handling definitions - */ - onErrors?: Error[]; - transition?: Transition; - end: End; - /** - * Unique Name of a workflow state which is responsible for compensation of this state - */ - compensatedBy?: string; - metadata?: /* Metadata information */ Metadata; - } - | { - /** - * State name - */ - name: string; - /** - * State type - */ - type: 'event'; - /** - * If true consuming one of the defined events causes its associated actions to be performed. If false all of the defined events must be consumed in order for actions to be performed - */ - exclusive?: boolean; - /** - * Define the events to be consumed and optional actions to be performed - */ - onEvents: Onevents[]; - /** - * State specific timeouts - */ - timeouts?: { - stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout; - actionExecTimeout?: /* Action execution timeout duration (ISO 8601 duration format) */ ActionExecTimeout; - eventTimeout?: /* Timeout duration to wait for consuming defined events (ISO 8601 duration format) */ EventTimeout; - }; - stateDataFilter?: Statedatafilter; - /** - * States error handling definitions - */ - onErrors?: Error[]; - transition: Transition; - end?: End; - /** - * Unique Name of a workflow state which is responsible for compensation of this state - */ - compensatedBy?: string; - metadata?: /* Metadata information */ Metadata; - }; -export interface Extension { - /** - * Unique extension id - */ - extensionId: string; - /** - * URI to a resource containing this workflow extension definitions (json or yaml) - */ - resource: string; -} -export type Extensions = string /* uri */ | [Extension, ...Extension[]]; -/** - * Execute a set of defined actions or workflows for each element of a data array - */ -export interface Foreachstate { - /** - * State name - */ - name?: string; - /** - * State type - */ - type?: 'foreach'; - /** - * State end definition - */ - end?: End; - /** - * Workflow expression selecting an array element of the states data - */ - inputCollection?: string; - /** - * Workflow expression specifying an array element of the states data to add the results of each iteration - */ - outputCollection?: string; - /** - * Name of the iteration parameter that can be referenced in actions/workflow. For each parallel iteration, this param should contain an unique element of the inputCollection array - */ - iterationParam?: string; - /** - * Specifies how many iterations may run in parallel at the same time. Used if 'mode' property is set to 'parallel' (default) - */ - batchSize?: number | string; - /** - * Actions to be executed for each of the elements of inputCollection - */ - actions?: Action[]; - /** - * State specific timeouts - */ - timeouts?: { - stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout; - actionExecTimeout?: /* Action execution timeout duration (ISO 8601 duration format) */ ActionExecTimeout; - }; - /** - * State data filter - */ - stateDataFilter?: Statedatafilter; - /** - * States error handling definitions - */ - onErrors?: Error[]; - /** - * Next transition of the workflow after state has completed - */ - transition?: Transition; - /** - * Unique Name of a workflow state which is responsible for compensation of this state - */ - compensatedBy?: string; - /** - * If true, this state is used to compensate another state. Default is false - */ - usedForCompensation?: boolean; - /** - * Specifies how iterations are to be performed (sequentially or in parallel) - */ - mode?: 'sequential' | 'parallel'; - metadata?: /* Metadata information */ Metadata; -} -export interface Function { - /** - * Unique function name - */ - name: string; - /** - * If type is `rest`, #. If type is `asyncapi`, #. If type is `rpc`, ##. If type is `graphql`, ##. If type is `odata`, #. If type is `expression`, defines the workflow expression. - */ - operation: string; - /** - * Defines the function type. Is either `rest`, `asyncapi, `rpc`, `graphql`, `odata`, `expression`, or `custom`. Default is `rest` - */ - type?: 'rest' | 'asyncapi' | 'rpc' | 'graphql' | 'odata' | 'expression' | 'custom'; - authRef?: - | string - | { - /** - * References an auth definition to be used to access the resource defined in the operation parameter - */ - resource: string; - /** - * References an auth definition to be used to invoke the operation - */ - invocation?: string; - }; - metadata?: /* Metadata information */ Metadata; -} -export type Functionref = - | string - | { - /** - * Name of the referenced function - */ - refName: string; - /** - * Function arguments/inputs - */ - arguments?: { - [key: string]: any; - }; - /** - * Only used if function type is 'graphql'. A string containing a valid GraphQL selection set - */ - selectionSet?: string; - /** - * Specifies if the function should be invoked sync or async - */ - invoke?: 'sync' | 'async'; - }; -export type Functions = string /* uri */ | [Function, ...Function[]]; -/** - * Inject static data into state data. Does not perform any actions - */ -export interface Injectstate { - /** - * State name - */ - name?: string; - /** - * State type - */ - type?: 'inject'; - /** - * State end definition - */ - end?: End; - /** - * JSON object which can be set as states data input and can be manipulated via filters - */ - data?: { - [key: string]: any; - }; - /** - * State data filter - */ - stateDataFilter?: Statedatafilter; - /** - * Next transition of the workflow after injection has completed - */ - transition?: Transition; - /** - * Unique Name of a workflow state which is responsible for compensation of this state - */ - compensatedBy?: string; - /** - * If true, this state is used to compensate another state. Default is false - */ - usedForCompensation?: boolean; - metadata?: /* Metadata information */ Metadata; -} -/** - * Metadata information - */ -export interface Metadata { - [name: string]: string; -} -/** - * OAuth2 information - */ -export interface Oauth2propsdef { - /** - * String or a workflow expression. Contains the authority information - */ - authority?: string; - /** - * Defines the grant type - */ - grantType: 'password' | 'clientCredentials' | 'tokenExchange'; - /** - * String or a workflow expression. Contains the client identifier - */ - clientId: string; - /** - * Workflow secret or a workflow expression. Contains the client secret - */ - clientSecret?: string; - /** - * Array containing strings or workflow expressions. Contains the OAuth2 scopes - */ - scopes?: [string, ...string[]]; - /** - * String or a workflow expression. Contains the user name. Used only if grantType is 'resourceOwner' - */ - username?: string; - /** - * String or a workflow expression. Contains the user password. Used only if grantType is 'resourceOwner' - */ - password?: string; - /** - * Array containing strings or workflow expressions. Contains the OAuth2 audiences - */ - audiences?: [string, ...string[]]; - /** - * String or a workflow expression. Contains the subject token - */ - subjectToken?: string; - /** - * String or a workflow expression. Contains the requested subject - */ - requestedSubject?: string; - /** - * String or a workflow expression. Contains the requested issuer - */ - requestedIssuer?: string; - metadata?: /* Metadata information */ Metadata; -} -export interface Onevents { - /** - * References one or more unique event names in the defined workflow events - */ - eventRefs: [string, ...string[]]; - /** - * Specifies how actions are to be performed (in sequence or in parallel) - */ - actionMode?: 'sequential' | 'parallel'; - /** - * Actions to be performed if expression matches - */ - actions?: Action[]; - /** - * Event data filter - */ - eventDataFilter?: Eventdatafilter; -} -/** - * Defines actions be performed. Does not wait for incoming events - */ -export interface Operationstate { - /** - * State name - */ - name?: string; - /** - * State type - */ - type?: 'operation'; - /** - * State end definition - */ - end?: End; - /** - * State data filter - */ - stateDataFilter?: Statedatafilter; - /** - * Specifies whether actions are performed in sequence or in parallel - */ - actionMode?: 'sequential' | 'parallel'; - /** - * Actions to be performed - */ - actions?: Action[]; - /** - * State specific timeouts - */ - timeouts?: { - stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout; - actionExecTimeout?: /* Action execution timeout duration (ISO 8601 duration format) */ ActionExecTimeout; - }; - /** - * States error handling definitions - */ - onErrors?: Error[]; - /** - * Next transition of the workflow after all the actions have been performed - */ - transition?: Transition; - /** - * Unique Name of a workflow state which is responsible for compensation of this state - */ - compensatedBy?: string; - /** - * If true, this state is used to compensate another state. Default is false - */ - usedForCompensation?: boolean; - metadata?: /* Metadata information */ Metadata; -} -/** - * Consists of a number of states that are executed in parallel - */ -export interface Parallelstate { - /** - * State name - */ - name?: string; - /** - * State type - */ - type?: 'parallel'; - /** - * State end definition - */ - end?: End; - /** - * State data filter - */ - stateDataFilter?: Statedatafilter; - /** - * State specific timeouts - */ - timeouts?: { - stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout; - branchExecTimeout?: /* Branch execution timeout duration (ISO 8601 duration format) */ BranchExecTimeout; - }; - /** - * Branch Definitions - */ - branches?: /* Branch Definition */ Branch[]; - /** - * Option types on how to complete branch execution. - */ - completionType?: 'allOf' | 'atLeast'; - /** - * Used when completionType is set to 'atLeast' to specify the minimum number of branches that must complete before the state will transition. - */ - numCompleted?: number | string; - /** - * States error handling definitions - */ - onErrors?: Error[]; - /** - * Next transition of the workflow after all branches have completed execution - */ - transition?: Transition; - /** - * Unique Name of a workflow state which is responsible for compensation of this state - */ - compensatedBy?: string; - /** - * If true, this state is used to compensate another state. Default is false - */ - usedForCompensation?: boolean; - metadata?: /* Metadata information */ Metadata; -} -/** - * Produce an event and set its data - */ -export interface Produceeventdef { - /** - * References a name of a defined event - */ - eventRef: string; - /** - * If String, expression which selects parts of the states data output to become the data of the produced event. If object a custom object to become the data of produced event. - */ - data?: - | string - | { - [key: string]: any; - }; - /** - * Add additional event extension context attributes - */ - contextAttributes?: { - [name: string]: string; - }; -} -export type Retries = string /* uri */ | [Retrydef, ...Retrydef[]]; -export interface Retrydef { - /** - * Unique retry strategy name - */ - name: string; - /** - * Time delay between retry attempts (ISO 8601 duration format) - */ - delay?: string; - /** - * Maximum time delay between retry attempts (ISO 8601 duration format) - */ - maxDelay?: string; - /** - * Static value by which the delay increases during each attempt (ISO 8601 time format) - */ - increment?: string; - /** - * Numeric value, if specified the delay between retries is multiplied by this value. - */ - multiplier?: number | string; - /** - * Maximum number of retry attempts. - */ - maxAttempts: number | string; - /** - * If float type, maximum amount of random time added or subtracted from the delay between each retry relative to total delay (between 0 and 1). If string type, absolute maximum amount of random time added or subtracted from the delay between each retry (ISO 8601 duration format) - */ - jitter?: number | string; -} -export type Schedule = - | string - | /* Start state schedule definition */ ( - | { - /** - * Time interval (must be repeating interval) described with ISO 8601 format. Declares when workflow instances will be automatically created. - */ - interval: string; - cron?: Crondef; - /** - * Timezone name used to evaluate the interval & cron-expression. (default: UTC) - */ - timezone?: string; - } - | { - /** - * Time interval (must be repeating interval) described with ISO 8601 format. Declares when workflow instances will be automatically created. - */ - interval?: string; - cron: Crondef; - /** - * Timezone name used to evaluate the interval & cron-expression. (default: UTC) - */ - timezone?: string; - } - ); -export type Secrets = string /* uri */ | [string, ...string[]]; -export type Sleep = - | { - /** - * Amount of time (ISO 8601 duration format) to sleep before function/subflow invocation. Does not apply if 'eventRef' is defined. - */ - before: string; - /** - * Amount of time (ISO 8601 duration format) to sleep after function/subflow invocation. Does not apply if 'eventRef' is defined. - */ - after?: string; - } - | { - /** - * Amount of time (ISO 8601 duration format) to sleep before function/subflow invocation. Does not apply if 'eventRef' is defined. - */ - before?: string; - /** - * Amount of time (ISO 8601 duration format) to sleep after function/subflow invocation. Does not apply if 'eventRef' is defined. - */ - after: string; - } - | { - /** - * Amount of time (ISO 8601 duration format) to sleep before function/subflow invocation. Does not apply if 'eventRef' is defined. - */ - before: string; - /** - * Amount of time (ISO 8601 duration format) to sleep after function/subflow invocation. Does not apply if 'eventRef' is defined. - */ - after: string; - }; -/** - * Causes the workflow execution to sleep for a specified duration - */ -export type Sleepstate /* Causes the workflow execution to sleep for a specified duration */ = - | { - /** - * State name - */ - name: string; - /** - * State type - */ - type: 'sleep'; - end: End; - /** - * Duration (ISO 8601 duration format) to sleep - */ - duration: string; - transition?: Transition; - metadata?: /* Metadata information */ Metadata; - } - | { - /** - * State name - */ - name: string; - /** - * State type - */ - type: 'sleep'; - end?: End; - /** - * Duration (ISO 8601 duration format) to sleep - */ - duration: string; - transition: Transition; - metadata?: /* Metadata information */ Metadata; - }; -export type Startdef = - | string - | { - /** - * Name of the starting workflow state - */ - stateName?: string; - /** - * Define the time/repeating intervals or cron at which workflow instances should be automatically started. - */ - schedule: Schedule; - }; -/** - * Workflow state execution timeout duration (ISO 8601 duration format) - */ -export type StateExecTimeout = string; -export interface Statedatafilter { - /** - * Workflow expression to filter the state data input - */ - input?: string; - /** - * Workflow expression that filters the state data output - */ - output?: string; -} -export type Subflowref = - | string - | { - /** - * Unique id of the sub-workflow to be invoked - */ - workflowId: string; - /** - * Version of the sub-workflow to be invoked - */ - version?: string; // ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ - /** - * If invoke is 'async', specifies how subflow execution should behave when parent workflow completes. Default is 'terminate' - */ - onParentComplete?: 'continue' | 'terminate'; - /** - * Specifies if the subflow should be invoked sync or async - */ - invoke?: 'sync' | 'async'; - }; -export type Switchstate /* Permits transitions to other states based on data conditions */ = - | Databasedswitchstate - | /* Permits transitions to other states based on events */ Eventbasedswitchstate; -export type Timeouts = - | string /* uri */ - | { - workflowExecTimeout?: WorkflowExecTimeout; - stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout; - actionExecTimeout?: /* Action execution timeout duration (ISO 8601 duration format) */ ActionExecTimeout; - branchExecTimeout?: /* Branch execution timeout duration (ISO 8601 duration format) */ BranchExecTimeout; - eventTimeout?: /* Timeout duration to wait for consuming defined events (ISO 8601 duration format) */ EventTimeout; - }; -export type Transition = - | string - | { - /** - * Name of state to transition to - */ - nextState: string; - /** - * Array of events to be produced before the transition happens - */ - produceEvents?: /* Produce an event and set its data */ Produceeventdef[]; - /** - * If set to true, triggers workflow compensation when before this transition is taken. Default is false - */ - compensate?: boolean; - }; -/** - * Switch state data based condition - */ -export interface Transitiondatacondition { - /** - * Data condition name - */ - name?: string; - /** - * Workflow expression evaluated against state data. Must evaluate to true or false - */ - condition: string; - /** - * Workflow transition if condition is evaluated to true - */ - transition: Transition; - metadata?: /* Metadata information */ Metadata; -} -/** - * Switch state data event condition - */ -export interface Transitioneventcondition { - /** - * Event condition name - */ - name?: string; - /** - * References an unique event name in the defined workflow events - */ - eventRef: string; - /** - * Next transition of the workflow if there is valid matches - */ - transition: Transition; - /** - * Event data filter definition - */ - eventDataFilter?: Eventdatafilter; - metadata?: /* Metadata information */ Metadata; -} -export type WorkflowExecTimeout = - | string - | { - /** - * Workflow execution timeout duration (ISO 8601 duration format). If not specified should be 'unlimited' - */ - duration: string; - /** - * If `false`, workflow instance is allowed to finish current execution. If `true`, current workflow execution is abrupted. - */ - interrupt?: boolean; - /** - * Name of a workflow state to be executed before workflow instance is terminated - */ - runBefore?: string; - }; diff --git a/src/lib/schema/workflow.json b/src/lib/schema/workflow.json index dae1bd54..86500495 100644 --- a/src/lib/schema/workflow.json +++ b/src/lib/schema/workflow.json @@ -1,1904 +1,1594 @@ { - "$id": "https://serverlessworkflow.io/schemas/0.8/workflow.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Serverless Workflow specification - workflow schema", + "$id": "https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "Serverless Workflow DSL - Workflow Schema", "type": "object", "properties": { - "id": { - "type": "string", - "description": "Workflow unique identifier", - "minLength": 1 - }, - "key": { - "type": "string", - "description": "Domain-specific workflow identifier", - "minLength": 1 - }, - "name": { - "type": "string", - "description": "Workflow name", - "minLength": 1 - }, - "description": { - "type": "string", - "description": "Workflow description" - }, - "version": { - "type": "string", - "description": "Workflow version", - "minLength": 1, - "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" - }, - "annotations": { - "type": "array", - "description": "List of helpful terms describing the workflows intended purpose, subject areas, or other important qualities", - "minItems": 1, - "items": { - "type": "string" - }, - "additionalItems": false - }, - "dataInputSchema": { - "oneOf": [ - { + "document": { + "type": "object", + "properties": { + "dsl": { "type": "string", - "description": "URI of the JSON Schema used to validate the workflow data input", - "minLength": 1 + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", + "description": "The version of the DSL used by the workflow." }, - { - "type": "object", - "description": "Workflow data input schema definition", - "properties": { - "schema": { - "oneof": [ - { - "type": "string", - "description": "URI of the JSON Schema used to validate the workflow data input", - "minLength": 1 - }, - { - "type": "object", - "description": "The JSON Schema object used to validate the workflow data input", - "$schema": "http://json-schema.org/draft-07/schema#" - } - ] - }, - "failOnValidationErrors": { - "type": "boolean", - "default": true, - "description": "Determines if workflow execution should continue if there are validation errors" - } - }, - "additionalProperties": false, - "required": [ - "schema" - ] - } - ] - }, - "secrets": { - "$ref": "secrets.json#/secrets" - }, - "constants": { - "oneOf": [ - { + "namespace": { "type": "string", - "format": "uri", - "description": "URI to a resource containing constants data (json or yaml)" + "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$", + "description": "The workflow's namespace." }, - { + "name": { + "type": "string", + "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$", + "description": "The workflow's name." + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", + "description": "The workflow's semantic version." + }, + "title": { + "type": "string", + "description": "The workflow's title." + }, + "summary": { + "type": "string", + "description": "The workflow's Markdown summary." + }, + "tags": { "type": "object", - "description": "Workflow constants data (object type)" + "description": "A key/value mapping of the workflow's tags, if any.", + "additionalProperties": true } - ] - }, - "start": { - "$ref": "#/definitions/startdef" - }, - "specVersion": { - "type": "string", - "description": "Serverless Workflow schema version", - "minLength": 1 - }, - "expressionLang": { - "type": "string", - "description": "Identifies the expression language used for workflow expressions. Default is 'jq'", - "default": "jq", - "minLength": 1 - }, - "timeouts": { - "$ref": "timeouts.json#/timeouts" - }, - "errors": { - "$ref": "errors.json#/errors" - }, - "keepActive": { - "type": "boolean", - "default": false, - "description": "If 'true', workflow instances is not terminated when there are no active execution paths. Instance can be terminated via 'terminate end definition' or reaching defined 'workflowExecTimeout'" - }, - "metadata": { - "$ref": "common.json#/definitions/metadata" - }, - "events": { - "$ref": "events.json#/events" - }, - "functions": { - "$ref": "functions.json#/functions" - }, - "autoRetries": { - "type": "boolean", - "default": false, - "description": "If set to true, actions should automatically be retried on unchecked errors. Default is false" - }, - "retries": { - "$ref": "retries.json#/retries" - }, - "auth": { - "$ref": "auth.json#/auth" + }, + "required": [ + "dsl", + "namespace", + "name", + "version" + ], + "description": "Documents the workflow" }, - "extensions": { - "$ref": "workflowextensions.json#/extensions" + "input": { + "$ref": "#/$defs/input", + "description": "Configures the workflow's input." }, - "states": { - "type": "array", - "description": "State definitions", - "items": { - "anyOf": [ - { - "title": "Sleep State", - "$ref": "#/definitions/sleepstate" - }, - { - "title": "Event State", - "$ref": "#/definitions/eventstate" + "use": { + "type": "object", + "properties": { + "authentications": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/authenticationPolicy" }, - { - "title": "Operation State", - "$ref": "#/definitions/operationstate" + "description": "The workflow's reusable authentication policies." + }, + "errors": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/error" }, - { - "title": "Parallel State", - "$ref": "#/definitions/parallelstate" + "description": "The workflow's reusable errors." + }, + "extensions": { + "type": "array", + "items": { + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": { + "$ref": "#/$defs/extension" + } }, - { - "title": "Switch State", - "$ref": "#/definitions/switchstate" + "description": "The workflow's extensions." + }, + "functions": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/task" }, - { - "title": "Inject State", - "$ref": "#/definitions/injectstate" + "description": "The workflow's reusable functions." + }, + "retries": { + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/retryPolicy" }, - { - "title": "ForEach State", - "$ref": "#/definitions/foreachstate" + "description": "The workflow's reusable retry policies." + }, + "secrets": { + "type": "array", + "items": { + "type": "string" }, - { - "title": "Callback State", - "$ref": "#/definitions/callbackstate" - } - ] + "description": "The workflow's secrets." + } }, - "additionalItems": false, - "minItems": 1 - } - }, - "oneOf": [ - { - "required": [ - "id", - "specVersion", - "states" - ] + "description": "Defines the workflow's reusable components." }, - { - "required": [ - "key", - "specVersion", - "states" - ] - } - ], - "definitions": { - "sleep": { + "do": { + "description": "Defines the task(s) the workflow must perform", + "$ref": "#/$defs/taskList" + }, + "timeout": { + "$ref": "#/$defs/timeout", + "description": "The workflow's timeout configuration, if any." + }, + "output": { + "$ref": "#/$defs/output", + "description": "Configures the workflow's output." + }, + "schedule": { "type": "object", "properties": { - "before": { + "every": { + "$ref": "#/$defs/duration", + "description": "Specifies the duration of the interval at which the workflow should be executed." + }, + "cron": { "type": "string", - "description": "Amount of time (ISO 8601 duration format) to sleep before function/subflow invocation. Does not apply if 'eventRef' is defined." + "description": "Specifies the schedule using a cron expression, e.g., '0 0 * * *' for daily at midnight.\"" }, "after": { - "type": "string", - "description": "Amount of time (ISO 8601 duration format) to sleep after function/subflow invocation. Does not apply if 'eventRef' is defined." + "$ref": "#/$defs/duration", + "description": "Specifies a delay duration that the workflow must wait before starting again after it completes." + }, + "on": { + "$ref": "#/$defs/eventConsumptionStrategy", + "description": "Specifies the events that trigger the workflow execution." } }, - "anyOf": [ + "description": "Schedules the workflow" + } + }, + "$defs": { + "taskList": { + "type": "array", + "items": { + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": { + "$ref": "#/$defs/task" + } + } + }, + "taskBase": { + "type": "object", + "properties": { + "if": { + "type": "string", + "description": "A runtime expression, if any, used to determine whether or not the task should be run." + }, + "input": { + "$ref": "#/$defs/input", + "description": "Configure the task's input." + }, + "output": { + "$ref": "#/$defs/output", + "description": "Configure the task's output." + }, + "export": { + "$ref": "#/$defs/export", + "description": "Export task output to context." + }, + "timeout": { + "$ref": "#/$defs/timeout", + "description": "The task's timeout configuration, if any." + }, + "then": { + "$ref": "#/$defs/flowDirective", + "description": "The flow directive to be performed upon completion of the task." + } + } + }, + "task": { + "unevaluatedProperties": false, + "oneOf": [ { - "required": [ - "before" - ] + "$ref": "#/$defs/callTask" }, { - "required": [ - "after" - ] + "$ref": "#/$defs/doTask" }, { - "required": [ - "before", - "after" - ] + "$ref": "#/$defs/forkTask" + }, + { + "$ref": "#/$defs/emitTask" + }, + { + "$ref": "#/$defs/forTask" + }, + { + "$ref": "#/$defs/listenTask" + }, + { + "$ref": "#/$defs/raiseTask" + }, + { + "$ref": "#/$defs/runTask" + }, + { + "$ref": "#/$defs/setTask" + }, + { + "$ref": "#/$defs/switchTask" + }, + { + "$ref": "#/$defs/tryTask" + }, + { + "$ref": "#/$defs/waitTask" } ] }, - "crondef": { + "callTask": { "oneOf": [ { - "type": "string", - "description": "Cron expression defining when workflow instances should be created (automatically)", - "minLength": 1 + "title": "CallAsyncAPI", + "$ref": "#/$defs/taskBase", + "type": "object", + "required": [ + "call", + "with" + ], + "unevaluatedProperties": false, + "properties": { + "call": { + "type": "string", + "const": "asyncapi" + }, + "with": { + "type": "object", + "properties": { + "document": { + "$ref": "#/$defs/externalResource", + "description": "The document that defines the AsyncAPI operation to call." + }, + "operationRef": { + "type": "string", + "description": "A reference to the AsyncAPI operation to call." + }, + "server": { + "type": "string", + "description": "A a reference to the server to call the specified AsyncAPI operation on. If not set, default to the first server matching the operation's channel." + }, + "message": { + "type": "string", + "description": "The name of the message to use. If not set, defaults to the first message defined by the operation." + }, + "binding": { + "type": "string", + "description": "The name of the binding to use. If not set, defaults to the first binding defined by the operation." + }, + "payload": { + "type": "object", + "description": "The payload to call the AsyncAPI operation with, if any." + }, + "authentication": { + "description": "The authentication policy, if any, to use when calling the AsyncAPI operation.", + "oneOf": [ + { + "$ref": "#/$defs/authenticationPolicy" + }, + { + "type": "string" + } + ] + } + }, + "required": [ + "document", + "operationRef" + ], + "additionalProperties": false, + "description": "Defines the AsyncAPI call to perform." + } + } }, { + "title": "CallGRPC", + "$ref": "#/$defs/taskBase", "type": "object", + "unevaluatedProperties": false, + "required": [ + "call", + "with" + ], "properties": { - "expression": { + "call": { "type": "string", - "description": "Repeating interval (cron expression) describing when the workflow instance should be created", - "minLength": 1 + "const": "grpc" }, - "validUntil": { - "type": "string", - "description": "Specific date and time (ISO 8601 format) when the cron expression invocation is no longer valid" + "with": { + "type": "object", + "properties": { + "proto": { + "$ref": "#/$defs/externalResource", + "description": "The proto resource that describes the GRPC service to call." + }, + "service": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the GRPC service to call." + }, + "host": { + "type": "string", + "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$", + "description": "The hostname of the GRPC service to call." + }, + "port": { + "type": "integer", + "min": 0, + "max": 65535, + "description": "The port number of the GRPC service to call." + }, + "authentication": { + "description": "The endpoint's authentication policy, if any.", + "oneOf": [ + { + "$ref": "#/$defs/authenticationPolicy" + }, + { + "type": "string" + } + ] + } + }, + "required": [ + "name", + "host" + ] + }, + "method": { + "type": "string", + "description": "The name of the method to call on the defined GRPC service." + }, + "arguments": { + "type": "object", + "additionalProperties": true, + "description": "The arguments, if any, to call the method with." + } + }, + "required": [ + "proto", + "service", + "method" + ], + "additionalProperties": false, + "description": "Defines the GRPC call to perform." } - }, - "additionalProperties": false, - "required": [ - "expression" - ] - } - ] - }, - "continueasdef": { - "oneOf": [ - { - "type": "string", - "description": "Unique id of the workflow to be continue execution as. Entire state data is passed as data input to next execution", - "minLength": 1 + } }, { + "title": "CallHTTP", + "$ref": "#/$defs/taskBase", "type": "object", + "unevaluatedProperties": false, + "required": [ + "call", + "with" + ], "properties": { - "workflowId": { + "call": { "type": "string", - "description": "Unique id of the workflow to continue execution as" + "const": "http" }, - "version": { + "with": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "The HTTP method of the HTTP request to perform." + }, + "endpoint": { + "description": "The HTTP endpoint to send the request to.", + "oneOf": [ + { + "$ref": "#/$defs/endpoint" + }, + { + "type": "string", + "format": "uri-template" + } + ] + }, + "headers": { + "type": "object", + "description": "A name/value mapping of the headers, if any, of the HTTP request to perform." + }, + "body": { + "description": "The body, if any, of the HTTP request to perform." + }, + "output": { + "type": "string", + "enum": [ + "raw", + "content", + "response" + ], + "description": "The http call output format. Defaults to 'content'." + } + }, + "required": [ + "method", + "endpoint" + ], + "additionalProperties": false, + "description": "Defines the HTTP call to perform." + } + } + }, + { + "title": "CallOpenAPI", + "$ref": "#/$defs/taskBase", + "type": "object", + "unevaluatedProperties": false, + "required": [ + "call", + "with" + ], + "properties": { + "call": { "type": "string", - "description": "Version of the workflow to continue execution as", - "minLength": 1, - "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" + "const": "openapi" }, - "data": { - "type": [ - "string", - "object" + "with": { + "type": "object", + "properties": { + "document": { + "$ref": "#/$defs/externalResource", + "description": "The document that defines the OpenAPI operation to call." + }, + "operationId": { + "type": "string", + "description": "The id of the OpenAPI operation to call." + }, + "parameters": { + "type": "object", + "additionalProperties": true, + "description": "A name/value mapping of the parameters of the OpenAPI operation to call." + }, + "authentication": { + "description": "The authentication policy, if any, to use when calling the OpenAPI operation.", + "oneOf": [ + { + "$ref": "#/$defs/authenticationPolicy" + }, + { + "type": "string" + } + ] + }, + "output": { + "type": "string", + "enum": [ + "raw", + "content", + "response" + ], + "description": "The http call output format. Defaults to 'content'." + } + }, + "required": [ + "document", + "operationId" ], - "description": "If string type, an expression which selects parts of the states data output to become the workflow data input of continued execution. If object type, a custom object to become the workflow data input of the continued execution" - }, - "workflowExecTimeout": { - "$ref": "timeouts.json#/definitions/workflowExecTimeout", - "description": "Workflow execution timeout to be used by the workflow continuing execution. Overwrites any specific settings set by that workflow" + "additionalProperties": false, + "description": "Defines the OpenAPI call to perform." } - }, - "required": [ - "workflowId" - ] - } - ] - }, - "transition": { - "oneOf": [ - { - "type": "string", - "description": "Name of state to transition to", - "minLength": 1 + } }, { + "title": "CallFunction", + "$ref": "#/$defs/taskBase", "type": "object", - "description": "Function Reference", + "unevaluatedProperties": false, + "required": [ + "call" + ], "properties": { - "nextState": { + "call": { "type": "string", - "description": "Name of state to transition to", - "minLength": 1 - }, - "produceEvents": { - "type": "array", - "description": "Array of events to be produced before the transition happens", - "items": { - "type": "object", - "$ref": "#/definitions/produceeventdef" + "not": { + "enum": [ + "asyncapi", + "grpc", + "http", + "openapi" + ] }, - "additionalItems": false + "description": "The name of the function to call." }, - "compensate": { - "type": "boolean", - "default": false, - "description": "If set to true, triggers workflow compensation when before this transition is taken. Default is false" + "with": { + "type": "object", + "additionalProperties": true, + "description": "A name/value mapping of the parameters, if any, to call the function with." } - }, - "additionalProperties": false, - "required": [ - "nextState" - ] + } } ] }, - "error": { + "forkTask": { + "description": "Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output.", + "$ref": "#/$defs/taskBase", "type": "object", + "unevaluatedProperties": false, + "required": [ + "fork" + ], "properties": { - "errorRef": { - "type": "string", - "description": "Reference to a unique workflow error definition. Used of errorRefs is not used", - "minLength": 1 - }, - "errorRefs": { - "type": "array", - "description": "References one or more workflow error definitions. Used if errorRef is not used", - "minItems": 1, - "items": { - "type": "string" - }, - "additionalItems": false - }, - "transition": { - "description": "Transition to next state to handle the error.", - "$ref": "#/definitions/transition" - }, - "end": { - "description": "End workflow execution in case of this error.", - "$ref": "#/definitions/end" - } - }, - "additionalProperties": false, - "oneOf": [ - { - "required": [ - "errorRef", - "transition" - ] - }, - { - "required": [ - "errorRef", - "end" - ] - }, - { - "required": [ - "errorRefs", - "transition" - ] - }, - { + "fork": { + "type": "object", "required": [ - "errorRefs", - "end" - ] + "branches" + ], + "properties": { + "branches": { + "$ref": "#/$defs/taskList" + }, + "compete": { + "description": "Indicates whether or not the concurrent tasks are racing against each other, with a single possible winner, which sets the composite task's output.", + "type": "boolean", + "default": false + } + } } - ] + } }, - "onevents": { + "doTask": { + "description": "Allows to execute a list of tasks in sequence", + "$ref": "#/$defs/taskBase", "type": "object", + "unevaluatedProperties": false, + "required": [ + "do" + ], "properties": { - "eventRefs": { - "type": "array", - "description": "References one or more unique event names in the defined workflow events", - "minItems": 1, - "items": { - "type": "string" - }, - "uniqueItems": true, - "additionalItems": false - }, - "actionMode": { - "type": "string", - "enum": [ - "sequential", - "parallel" - ], - "description": "Specifies how actions are to be performed (in sequence or in parallel)", - "default": "sequential" - }, - "actions": { - "type": "array", - "description": "Actions to be performed if expression matches", - "items": { - "type": "object", - "$ref": "#/definitions/action" - }, - "additionalItems": false - }, - "eventDataFilter": { - "description": "Event data filter", - "$ref": "#/definitions/eventdatafilter" + "do": { + "$ref": "#/$defs/taskList" } - }, - "additionalProperties": false, - "required": [ - "eventRefs" - ] + } }, - "action": { + "emitTask": { + "description": "Allows workflows to publish events to event brokers or messaging systems, facilitating communication and coordination between different components and services.", + "$ref": "#/$defs/taskBase", "type": "object", + "required": [ + "emit" + ], + "unevaluatedProperties": false, "properties": { - "name": { - "type": "string", - "description": "Unique action definition name" - }, - "functionRef": { - "description": "References a function to be invoked", - "$ref": "#/definitions/functionref" - }, - "eventRef": { - "description": "References a `produce` and `consume` reusable event definitions", - "$ref": "#/definitions/eventref" - }, - "subFlowRef": { - "description": "References a sub-workflow to invoke", - "$ref": "#/definitions/subflowref" - }, - "sleep": { - "description": "Defines time periods workflow execution should sleep before / after function execution", - "$ref": "#/definitions/sleep" - }, - "retryRef": { - "type": "string", - "description": "References a defined workflow retry definition. If not defined the default retry policy is assumed" - }, - "nonRetryableErrors": { - "type": "array", - "description": "List of unique references to defined workflow errors for which the action should not be retried. Used only when `autoRetries` is set to `true`", - "minItems": 1, - "items": { - "type": "string" - }, - "additionalItems": false - }, - "retryableErrors": { - "type": "array", - "description": "List of unique references to defined workflow errors for which the action should be retried. Used only when `autoRetries` is set to `false`", - "minItems": 1, - "items": { - "type": "string" - }, - "additionalItems": false - }, - "actionDataFilter": { - "description": "Action data filter", - "$ref": "#/definitions/actiondatafilter" - }, - "condition": { - "description": "Expression, if defined, must evaluate to true for this action to be performed. If false, action is disregarded", - "type": "string", - "minLength": 1 - } - }, - "additionalProperties": false, - "oneOf": [ - { - "required": [ - "functionRef" - ] - }, - { - "required": [ - "eventRef" - ] - }, - { - "required": [ - "subFlowRef" - ] - } - ] - }, - "functionref": { - "oneOf": [ - { - "type": "string", - "description": "Name of the referenced function", - "minLength": 1 - }, - { + "emit": { "type": "object", - "description": "Function Reference", "properties": { - "refName": { - "type": "string", - "description": "Name of the referenced function" - }, - "arguments": { + "event": { "type": "object", - "description": "Function arguments/inputs" - }, - "selectionSet": { - "type": "string", - "description": "Only used if function type is 'graphql'. A string containing a valid GraphQL selection set" - }, - "invoke": { - "type": "string", - "enum": [ - "sync", - "async" + "properties": { + "id": { + "type": "string", + "description": "The event's unique identifier" + }, + "source": { + "type": "string", + "format": "uri", + "description": "Identifies the context in which an event happened" + }, + "type": { + "type": "string", + "description": "This attribute contains a value describing the type of event related to the originating occurrence." + }, + "time": { + "type": "string", + "format": "date-time" + }, + "subject": { + "type": "string" + }, + "datacontenttype": { + "type": "string", + "description": "Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format." + }, + "dataschema": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "source", + "type" ], - "description": "Specifies if the function should be invoked sync or async", - "default": "sync" + "additionalProperties": true } }, - "additionalProperties": false, "required": [ - "refName" + "event" ] } - ] + } }, - "eventref": { + "forTask": { + "description": "Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets.", + "$ref": "#/$defs/taskBase", "type": "object", - "description": "Event References", - "properties": { - "produceEventRef": { - "type": "string", - "description": "Reference to the unique name of a 'produced' event definition" - }, - "consumeEventRef": { - "type": "string", - "description": "Reference to the unique name of a 'consumed' event definition" - }, - "consumeEventTimeout": { - "type": "string", - "description": "Maximum amount of time (ISO 8601 format) to wait for the result event. If not defined it should default to the actionExecutionTimeout" - }, - "data": { - "type": [ - "string", - "object" - ], - "description": "If string type, an expression which selects parts of the states data output to become the data (payload) of the event referenced by 'produceEventRef'. If object type, a custom object to become the data (payload) of the event referenced by 'produceEventRef'." - }, - "contextAttributes": { - "type": "object", - "description": "Add additional extension context attributes to the produced event", - "additionalProperties": { - "type": "string" - } - } - }, - "additionalProperties": false, "required": [ - "produceEventRef" - ] - }, - "subflowref": { - "oneOf": [ - { - "type": "string", - "description": "Unique id of the sub-workflow to be invoked", - "minLength": 1 - }, - { + "for", + "do" + ], + "unevaluatedProperties": false, + "properties": { + "for": { "type": "object", - "description": "Specifies a sub-workflow to be invoked", "properties": { - "workflowId": { - "type": "string", - "description": "Unique id of the sub-workflow to be invoked" - }, - "version": { + "each": { "type": "string", - "description": "Version of the sub-workflow to be invoked", - "minLength": 1, - "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$" + "description": "The name of the variable used to store the current item being enumerated.", + "default": "item" }, - "onParentComplete": { + "in": { "type": "string", - "enum": [ - "continue", - "terminate" - ], - "description": "If invoke is 'async', specifies how subflow execution should behave when parent workflow completes. Default is 'terminate'", - "default": "terminate" + "description": "A runtime expression used to get the collection to enumerate." }, - "invoke": { + "at": { "type": "string", - "enum": [ - "sync", - "async" - ], - "description": "Specifies if the subflow should be invoked sync or async", - "default": "sync" + "description": "The name of the variable used to store the index of the current item being enumerated.", + "default": "index" } }, "required": [ - "workflowId" + "in" ] + }, + "while": { + "type": "string", + "description": "A runtime expression that represents the condition, if any, that must be met for the iteration to continue." + }, + "do": { + "$ref": "#/$defs/taskList" } - ] + } }, - "branch": { + "listenTask": { + "description": "Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems.", + "$ref": "#/$defs/taskBase", "type": "object", - "description": "Branch Definition", + "required": [ + "listen" + ], + "unevaluatedProperties": false, "properties": { - "name": { - "type": "string", - "description": "Branch name" - }, - "timeouts": { + "listen": { "type": "object", - "description": "State specific timeouts", "properties": { - "actionExecTimeout": { - "$ref": "timeouts.json#/definitions/actionExecTimeout" - }, - "branchExecTimeout": { - "$ref": "timeouts.json#/definitions/branchExecTimeout" + "to": { + "$ref": "#/$defs/eventConsumptionStrategy", + "description": "Defines the event(s) to listen to." } }, - "required": [] - }, - "actions": { - "type": "array", - "description": "Actions to be executed in this branch", - "items": { - "type": "object", - "$ref": "#/definitions/action" - }, - "additionalItems": false - } - }, - "additionalProperties": false, - "required": [ - "name", - "actions" - ] - }, - "sleepstate": { - "type": "object", - "description": "Causes the workflow execution to sleep for a specified duration", - "properties": { - "name": { - "type": "string", - "description": "State name" - }, - "type": { - "type": "string", - "const": "sleep", - "description": "State type" - }, - "end": { - "$ref": "#/definitions/end", - "description": "State end definition" - }, - "duration": { - "type": "string", - "description": "Duration (ISO 8601 duration format) to sleep" - }, - "transition": { - "description": "Next transition of the workflow after the workflow sleep", - "$ref": "#/definitions/transition" - }, - "metadata": { - "$ref": "common.json#/definitions/metadata" - } - }, - "additionalProperties": false, - "oneOf": [ - { - "required": [ - "name", - "type", - "duration", - "end" - ] - }, - { "required": [ - "name", - "type", - "duration", - "transition" + "to" ] } - ] + } }, - "eventstate": { + "raiseTask": { + "description": "Intentionally triggers and propagates errors.", + "$ref": "#/$defs/taskBase", "type": "object", - "description": "This state is used to wait for events from event sources, then consumes them and invoke one or more actions to run in sequence or parallel", + "required": [ + "raise" + ], + "unevaluatedProperties": false, "properties": { - "name": { - "type": "string", - "description": "State name" - }, - "type": { - "type": "string", - "const": "event", - "description": "State type" - }, - "exclusive": { - "type": "boolean", - "default": true, - "description": "If true consuming one of the defined events causes its associated actions to be performed. If false all of the defined events must be consumed in order for actions to be performed" - }, - "onEvents": { - "type": "array", - "description": "Define the events to be consumed and optional actions to be performed", - "items": { - "type": "object", - "$ref": "#/definitions/onevents" - }, - "additionalItems": false - }, - "timeouts": { + "raise": { "type": "object", - "description": "State specific timeouts", "properties": { - "stateExecTimeout": { - "$ref": "timeouts.json#/definitions/stateExecTimeout" - }, - "actionExecTimeout": { - "$ref": "timeouts.json#/definitions/actionExecTimeout" - }, - "eventTimeout": { - "$ref": "timeouts.json#/definitions/eventTimeout" + "error": { + "$ref": "#/$defs/error", + "description": "Defines the error to raise." } }, - "required": [] - }, - "stateDataFilter": { - "description": "State data filter", - "$ref": "#/definitions/statedatafilter" - }, - "onErrors": { - "type": "array", - "description": "States error handling definitions", - "items": { - "type": "object", - "$ref": "#/definitions/error" - }, - "additionalItems": false - }, - "transition": { - "description": "Next transition of the workflow after all the actions have been performed", - "$ref": "#/definitions/transition" - }, - "end": { - "$ref": "#/definitions/end", - "description": "State end definition" - }, - "compensatedBy": { - "type": "string", - "minLength": 1, - "description": "Unique Name of a workflow state which is responsible for compensation of this state" - }, - "metadata": { - "$ref": "common.json#/definitions/metadata" - } - }, - "additionalProperties": false, - "oneOf": [ - { - "required": [ - "name", - "type", - "onEvents", - "end" - ] - }, - { "required": [ - "name", - "type", - "onEvents", - "transition" + "error" ] } - ] + } }, - "operationstate": { + "runTask": { + "description": "Provides the capability to execute external containers, shell commands, scripts, or workflows.", + "$ref": "#/$defs/taskBase", "type": "object", - "description": "Defines actions be performed. Does not wait for incoming events", + "required": [ + "run" + ], + "unevaluatedProperties": false, "properties": { - "name": { - "type": "string", - "description": "State name" - }, - "type": { - "type": "string", - "const": "operation", - "description": "State type" - }, - "end": { - "$ref": "#/definitions/end", - "description": "State end definition" - }, - "stateDataFilter": { - "description": "State data filter", - "$ref": "#/definitions/statedatafilter" - }, - "actionMode": { - "type": "string", - "enum": [ - "sequential", - "parallel" - ], - "description": "Specifies whether actions are performed in sequence or in parallel", - "default": "sequential" - }, - "actions": { - "type": "array", - "description": "Actions to be performed", - "items": { - "type": "object", - "$ref": "#/definitions/action" - } - }, - "timeouts": { + "run": { "type": "object", - "description": "State specific timeouts", - "properties": { - "stateExecTimeout": { - "$ref": "timeouts.json#/definitions/stateExecTimeout" + "oneOf": [ + { + "properties": { + "container": { + "type": "object", + "properties": { + "image": { + "type": "string", + "description": "The name of the container image to run." + }, + "command": { + "type": "string", + "description": "The command, if any, to execute on the container" + }, + "ports": { + "type": "object", + "description": "The container's port mappings, if any." + }, + "volumes": { + "type": "object", + "description": "The container's volume mappings, if any." + }, + "environment": { + "type": "object", + "description": "A key/value mapping of the environment variables, if any, to use when running the configured process." + } + }, + "required": [ + "image" + ] + } + }, + "required": [ + "container" + ], + "description": "Enables the execution of external processes encapsulated within a containerized environment." + }, + { + "properties": { + "script": { + "type": "object", + "properties": { + "language": { + "type": "string", + "description": "The language of the script to run." + }, + "environment": { + "type": "object", + "additionalProperties": true, + "description": "A key/value mapping of the environment variables, if any, to use when running the configured process." + } + }, + "oneOf": [ + { + "properties": { + "code": { + "type": "string" + } + }, + "required": [ + "code" + ], + "description": "The script's code." + }, + { + "properties": { + "source": { + "$ref": "#/$defs/externalResource" + } + }, + "description": "The script's resource.", + "required": [ + "source" + ] + } + ], + "required": [ + "language" + ] + } + }, + "required": [ + "script" + ], + "description": "Enables the execution of custom scripts or code within a workflow, empowering workflows to perform specialized logic, data processing, or integration tasks by executing user-defined scripts written in various programming languages." }, - "actionExecTimeout": { - "$ref": "timeouts.json#/definitions/actionExecTimeout" + { + "properties": { + "shell": { + "type": "object", + "properties": { + "command": { + "type": "string", + "description": "The shell command to run." + }, + "arguments": { + "type": "object", + "additionalProperties": true, + "description": "A list of the arguments of the shell command to run." + }, + "environment": { + "type": "object", + "additionalProperties": true, + "description": "A key/value mapping of the environment variables, if any, to use when running the configured process." + } + }, + "required": [ + "command" + ] + } + }, + "required": [ + "shell" + ], + "description": "Enables the execution of shell commands within a workflow, enabling workflows to interact with the underlying operating system and perform system-level operations, such as file manipulation, environment configuration, or system administration tasks." + }, + { + "properties": { + "workflow": { + "type": "object", + "properties": { + "namespace": { + "type": "string", + "description": "The namespace the workflow to run belongs to." + }, + "name": { + "type": "string", + "description": "The name of the workflow to run." + }, + "version": { + "type": "string", + "default": "latest", + "description": "The version of the workflow to run. Defaults to latest" + }, + "input": { + "type": "object", + "additionalProperties": true, + "description": "The data, if any, to pass as input to the workflow to execute. The value should be validated against the target workflow's input schema, if specified." + } + }, + "required": [ + "namespace", + "name", + "version" + ] + } + }, + "required": [ + "workflow" + ], + "description": "Enables the invocation and execution of nested workflows within a parent workflow, facilitating modularization, reusability, and abstraction of complex logic or business processes by encapsulating them into standalone workflow units." } - }, - "required": [] - }, - "onErrors": { - "type": "array", - "description": "States error handling definitions", - "items": { - "type": "object", - "$ref": "#/definitions/error" - }, - "additionalItems": false - }, - "transition": { - "description": "Next transition of the workflow after all the actions have been performed", - "$ref": "#/definitions/transition" - }, - "compensatedBy": { - "type": "string", - "minLength": 1, - "description": "Unique Name of a workflow state which is responsible for compensation of this state" - }, - "usedForCompensation": { - "type": "boolean", - "default": false, - "description": "If true, this state is used to compensate another state. Default is false" - }, - "metadata": { - "$ref": "common.json#/definitions/metadata" + ] } - }, - "additionalProperties": false, - "if": { - "properties": { - "usedForCompensation": { - "const": true - } - }, - "required": [ - "usedForCompensation" - ] - }, - "then": { - "required": [ - "name", - "type", - "actions" - ] - }, - "else": { - "oneOf": [ - { - "required": [ - "name", - "type", - "actions", - "end" - ] - }, - { - "required": [ - "name", - "type", - "actions", - "transition" - ] - } - ] } }, - "parallelstate": { + "setTask": { + "description": "A task used to set data", + "$ref": "#/$defs/taskBase", "type": "object", - "description": "Consists of a number of states that are executed in parallel", + "required": [ + "set" + ], + "unevaluatedProperties": false, "properties": { - "name": { - "type": "string", - "description": "State name" - }, - "type": { - "type": "string", - "const": "parallel", - "description": "State type" - }, - "end": { - "$ref": "#/definitions/end", - "description": "State end definition" - }, - "stateDataFilter": { - "description": "State data filter", - "$ref": "#/definitions/statedatafilter" - }, - "timeouts": { + "set": { "type": "object", - "description": "State specific timeouts", - "properties": { - "stateExecTimeout": { - "$ref": "timeouts.json#/definitions/stateExecTimeout" - }, - "branchExecTimeout": { - "$ref": "timeouts.json#/definitions/branchExecTimeout" - } - }, - "required": [] - }, - "branches": { - "type": "array", - "description": "Branch Definitions", - "items": { - "type": "object", - "$ref": "#/definitions/branch" - }, - "additionalItems": false - }, - "completionType": { - "type": "string", - "enum": [ - "allOf", - "atLeast" - ], - "description": "Option types on how to complete branch execution.", - "default": "allOf" - }, - "numCompleted": { - "type": [ - "number", - "string" - ], - "minimum": 0, - "minLength": 0, - "description": "Used when completionType is set to 'atLeast' to specify the minimum number of branches that must complete before the state will transition." - }, - "onErrors": { - "type": "array", - "description": "States error handling definitions", - "items": { - "type": "object", - "$ref": "#/definitions/error" - }, - "additionalItems": false - }, - "transition": { - "description": "Next transition of the workflow after all branches have completed execution", - "$ref": "#/definitions/transition" - }, - "compensatedBy": { - "type": "string", - "minLength": 1, - "description": "Unique Name of a workflow state which is responsible for compensation of this state" - }, - "usedForCompensation": { - "type": "boolean", - "default": false, - "description": "If true, this state is used to compensate another state. Default is false" - }, - "metadata": { - "$ref": "common.json#/definitions/metadata" + "minProperties": 1, + "additionalProperties": true, + "description": "The data to set" } - }, - "additionalProperties": false, - "if": { - "properties": { - "usedForCompensation": { - "const": true - } - }, - "required": [ - "usedForCompensation" - ] - }, - "then": { - "required": [ - "name", - "type", - "branches" - ] - }, - "else": { - "oneOf": [ - { - "required": [ - "name", - "type", - "branches", - "end" - ] - }, - { - "required": [ - "name", - "type", - "branches", - "transition" - ] - } - ] } }, - "switchstate": { - "oneOf": [ - { - "$ref": "#/definitions/databasedswitchstate" - }, - { - "$ref": "#/definitions/eventbasedswitchstate" - } - ] - }, - "eventbasedswitchstate": { + "switchTask": { + "description": "Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria", + "$ref": "#/$defs/taskBase", "type": "object", - "description": "Permits transitions to other states based on events", + "required": [ + "switch" + ], + "unevaluatedProperties": false, "properties": { - "name": { - "type": "string", - "description": "State name" - }, - "type": { - "type": "string", - "const": "switch", - "description": "State type" - }, - "stateDataFilter": { - "description": "State data filter", - "$ref": "#/definitions/statedatafilter" - }, - "timeouts": { - "type": "object", - "description": "State specific timeouts", - "properties": { - "stateExecTimeout": { - "$ref": "timeouts.json#/definitions/stateExecTimeout" - }, - "eventTimeout": { - "$ref": "timeouts.json#/definitions/eventTimeout" - } - }, - "required": [] - }, - "eventConditions": { - "type": "array", - "description": "Defines conditions evaluated against events", - "items": { - "type": "object", - "$ref": "#/definitions/eventcondition" - }, - "additionalItems": false - }, - "onErrors": { + "switch": { "type": "array", - "description": "States error handling definitions", + "minItems": 1, "items": { "type": "object", - "$ref": "#/definitions/error" - }, - "additionalItems": false - }, - "defaultCondition": { - "description": "Default transition of the workflow if there is no matching data conditions. Can include a transition or end definition", - "$ref": "#/definitions/defaultconditiondef" - }, - "compensatedBy": { - "type": "string", - "minLength": 1, - "description": "Unique Name of a workflow state which is responsible for compensation of this state" - }, - "usedForCompensation": { - "type": "boolean", - "default": false, - "description": "If true, this state is used to compensate another state. Default is false" - }, - "metadata": { - "$ref": "common.json#/definitions/metadata" + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The case's name." + }, + "when": { + "type": "string", + "description": "A runtime expression used to determine whether or not the case matches." + }, + "then": { + "$ref": "#/$defs/flowDirective", + "description": "The flow directive to execute when the case matches." + } + } + } + } } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "eventConditions", - "defaultCondition" - ] + } }, - "databasedswitchstate": { + "tryTask": { + "description": "Serves as a mechanism within workflows to handle errors gracefully, potentially retrying failed tasks before proceeding with alternate ones.", + "$ref": "#/$defs/taskBase", "type": "object", - "description": "Permits transitions to other states based on data conditions", + "required": [ + "try", + "catch" + ], + "unevaluatedProperties": false, "properties": { - "name": { - "type": "string", - "description": "State name" - }, - "type": { - "type": "string", - "const": "switch", - "description": "State type" - }, - "stateDataFilter": { - "description": "State data filter", - "$ref": "#/definitions/statedatafilter" + "try": { + "description": "The task(s) to perform.", + "$ref": "#/$defs/taskList" }, - "timeouts": { + "catch": { "type": "object", - "description": "State specific timeouts", "properties": { - "stateExecTimeout": { - "$ref": "timeouts.json#/definitions/stateExecTimeout" + "errors": { + "type": "object" + }, + "as": { + "type": "string", + "description": "The name of the runtime expression variable to save the error as. Defaults to 'error'." + }, + "when": { + "type": "string", + "description": "A runtime expression used to determine whether or not to catch the filtered error" + }, + "exceptWhen": { + "type": "string", + "description": "A runtime expression used to determine whether or not to catch the filtered error" + }, + "retry": { + "$ref": "#/$defs/retryPolicy", + "description": "The retry policy to use, if any, when catching errors." + }, + "do": { + "description": "The definition of the task(s) to run when catching an error.", + "$ref": "#/$defs/taskList" } - }, - "required": [] - }, - "dataConditions": { - "type": "array", - "description": "Defines conditions evaluated against state data", - "items": { - "type": "object", - "$ref": "#/definitions/datacondition" - }, - "additionalItems": false - }, - "onErrors": { - "type": "array", - "description": "States error handling definitions", - "items": { - "type": "object", - "$ref": "#/definitions/error" - }, - "additionalItems": false - }, - "defaultCondition": { - "description": "Default transition of the workflow if there is no matching data conditions. Can include a transition or end definition", - "$ref": "#/definitions/defaultconditiondef" - }, - "compensatedBy": { - "type": "string", - "minLength": 1, - "description": "Unique Name of a workflow state which is responsible for compensation of this state" - }, - "usedForCompensation": { - "type": "boolean", - "default": false, - "description": "If true, this state is used to compensate another state. Default is false" - }, - "metadata": { - "$ref": "common.json#/definitions/metadata" + } } - }, - "additionalProperties": false, - "required": [ - "name", - "type", - "dataConditions", - "defaultCondition" - ] + } }, - "defaultconditiondef": { + "waitTask": { + "description": "Allows workflows to pause or delay their execution for a specified period of time.", + "$ref": "#/$defs/taskBase", "type": "object", - "description": "DefaultCondition definition. Can be either a transition or end definition", + "required": [ + "wait" + ], + "unevaluatedProperties": false, "properties": { - "name": { - "type": "string", - "description": "The optional name of the default condition, used solely for display purposes" - }, - "transition": { - "$ref": "#/definitions/transition" - }, - "end": { - "$ref": "#/definitions/end" + "wait": { + "description": "The amount of time to wait.", + "$ref": "#/$defs/duration" } - }, + } + }, + "flowDirective": { "additionalProperties": false, - "oneOf": [ - { - "required": [ - "transition" - ] - }, + "anyOf": [ { - "required": [ + "type": "string", + "enum": [ + "continue", + "exit", "end" - ] - } - ] - }, - "eventcondition": { - "oneOf": [ - { - "$ref": "#/definitions/transitioneventcondition" + ], + "default": "continue" }, { - "$ref": "#/definitions/endeventcondition" + "type": "string" } ] }, - "transitioneventcondition": { + "authenticationPolicy": { "type": "object", - "description": "Switch state data event condition", - "properties": { - "name": { - "type": "string", - "description": "Event condition name" - }, - "eventRef": { - "type": "string", - "description": "References an unique event name in the defined workflow events" - }, - "transition": { - "description": "Next transition of the workflow if there is valid matches", - "$ref": "#/definitions/transition" - }, - "eventDataFilter": { - "description": "Event data filter definition", - "$ref": "#/definitions/eventdatafilter" - }, - "metadata": { - "$ref": "common.json#/definitions/metadata" - } - }, - "additionalProperties": false, - "required": [ - "eventRef", - "transition" - ] - }, - "endeventcondition": { - "type": "object", - "description": "Switch state data event condition", - "properties": { - "name": { - "type": "string", - "description": "Event condition name" - }, - "eventRef": { - "type": "string", - "description": "References an unique event name in the defined workflow events" - }, - "end": { - "$ref": "#/definitions/end", - "description": "Explicit transition to end" - }, - "eventDataFilter": { - "description": "Event data filter definition", - "$ref": "#/definitions/eventdatafilter" - }, - "metadata": { - "$ref": "common.json#/definitions/metadata" - } - }, - "additionalProperties": false, - "required": [ - "eventRef", - "end" - ] - }, - "datacondition": { "oneOf": [ { - "$ref": "#/definitions/transitiondatacondition" - }, - { - "$ref": "#/definitions/enddatacondition" - } - ] - }, - "transitiondatacondition": { - "type": "object", - "description": "Switch state data based condition", - "properties": { - "name": { - "type": "string", - "description": "Data condition name" - }, - "condition": { - "type": "string", - "description": "Workflow expression evaluated against state data. Must evaluate to true or false" - }, - "transition": { - "description": "Workflow transition if condition is evaluated to true", - "$ref": "#/definitions/transition" - }, - "metadata": { - "$ref": "common.json#/definitions/metadata" - } - }, - "additionalProperties": false, - "required": [ - "condition", - "transition" - ] - }, - "enddatacondition": { - "type": "object", - "description": "Switch state data based condition", - "properties": { - "name": { - "type": "string", - "description": "Data condition name" - }, - "condition": { - "type": "string", - "description": "Workflow expression evaluated against state data. Must evaluate to true or false" - }, - "end": { - "$ref": "#/definitions/end", - "description": "Workflow end definition" - }, - "metadata": { - "$ref": "common.json#/definitions/metadata" - } - }, - "additionalProperties": false, - "required": [ - "condition", - "end" - ] - }, - "injectstate": { - "type": "object", - "description": "Inject static data into state data. Does not perform any actions", - "properties": { - "name": { - "type": "string", - "description": "State name" - }, - "type": { - "type": "string", - "const": "inject", - "description": "State type" - }, - "end": { - "$ref": "#/definitions/end", - "description": "State end definition" - }, - "data": { - "type": "object", - "description": "JSON object which can be set as states data input and can be manipulated via filters" - }, - "stateDataFilter": { - "description": "State data filter", - "$ref": "#/definitions/statedatafilter" - }, - "transition": { - "description": "Next transition of the workflow after injection has completed", - "$ref": "#/definitions/transition" - }, - "compensatedBy": { - "type": "string", - "minLength": 1, - "description": "Unique Name of a workflow state which is responsible for compensation of this state" - }, - "usedForCompensation": { - "type": "boolean", - "default": false, - "description": "If true, this state is used to compensate another state. Default is false" - }, - "metadata": { - "$ref": "common.json#/definitions/metadata" - } - }, - "additionalProperties": false, - "if": { - "properties": { - "usedForCompensation": { - "const": true - } - }, - "required": [ - "usedForCompensation" - ] - }, - "then": { - "required": [ - "name", - "type", - "data" - ] - }, - "else": { - "oneOf": [ - { - "required": [ - "name", - "type", - "data", - "end" - ] + "properties": { + "basic": { + "type": "object", + "properties": { + "username": { + "type": "string", + "description": "The username to use." + }, + "password": { + "type": "string", + "description": "The password to use." + } + }, + "required": [ + "username", + "password" + ] + } }, - { - "required": [ - "name", - "type", - "data", - "transition" - ] - } - ] - } - }, - "foreachstate": { - "type": "object", - "description": "Execute a set of defined actions or workflows for each element of a data array", - "properties": { - "name": { - "type": "string", - "description": "State name" - }, - "type": { - "type": "string", - "const": "foreach", - "description": "State type" - }, - "end": { - "$ref": "#/definitions/end", - "description": "State end definition" - }, - "inputCollection": { - "type": "string", - "description": "Workflow expression selecting an array element of the states data" - }, - "outputCollection": { - "type": "string", - "description": "Workflow expression specifying an array element of the states data to add the results of each iteration" - }, - "iterationParam": { - "type": "string", - "description": "Name of the iteration parameter that can be referenced in actions/workflow. For each parallel iteration, this param should contain an unique element of the inputCollection array" - }, - "batchSize": { - "type": [ - "number", - "string" + "required": [ + "basic" ], - "minimum": 0, - "minLength": 0, - "description": "Specifies how many iterations may run in parallel at the same time. Used if 'mode' property is set to 'parallel' (default)" - }, - "actions": { - "type": "array", - "description": "Actions to be executed for each of the elements of inputCollection", - "items": { - "type": "object", - "$ref": "#/definitions/action" - }, - "additionalItems": false + "description": "Use basic authentication." }, - "timeouts": { - "type": "object", - "description": "State specific timeouts", + { "properties": { - "stateExecTimeout": { - "$ref": "timeouts.json#/definitions/stateExecTimeout" - }, - "actionExecTimeout": { - "$ref": "timeouts.json#/definitions/actionExecTimeout" + "bearer": { + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "The bearer token to use." + } + }, + "required": [ + "token" + ] } }, - "required": [] - }, - "stateDataFilter": { - "description": "State data filter", - "$ref": "#/definitions/statedatafilter" - }, - "onErrors": { - "type": "array", - "description": "States error handling definitions", - "items": { - "type": "object", - "$ref": "#/definitions/error" - }, - "additionalItems": false - }, - "transition": { - "description": "Next transition of the workflow after state has completed", - "$ref": "#/definitions/transition" - }, - "compensatedBy": { - "type": "string", - "minLength": 1, - "description": "Unique Name of a workflow state which is responsible for compensation of this state" - }, - "usedForCompensation": { - "type": "boolean", - "default": false, - "description": "If true, this state is used to compensate another state. Default is false" + "required": [ + "bearer" + ], + "description": "Use bearer authentication." }, - "mode": { - "type": "string", - "enum": [ - "sequential", - "parallel" + { + "properties": { + "oauth2": { + "type": "object", + "properties": { + "authority": { + "type": "string", + "format": "uri", + "description": "The URI that references the OAuth2 authority to use." + }, + "grant": { + "type": "string", + "description": "The grant type to use." + }, + "client": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The client id to use." + }, + "secret": { + "type": "string", + "description": "The client secret to use, if any." + } + }, + "required": [ + "id" + ] + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The scopes, if any, to request the token for." + }, + "audiences": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The audiences, if any, to request the token for." + }, + "username": { + "type": "string", + "description": "The username to use. Used only if the grant type is Password." + }, + "password": { + "type": "string", + "description": "The password to use. Used only if the grant type is Password." + }, + "subject": { + "$ref": "#/$defs/oauth2Token", + "description": "The security token that represents the identity of the party on behalf of whom the request is being made." + }, + "actor": { + "$ref": "#/$defs/oauth2Token", + "description": "The security token that represents the identity of the acting party." + } + }, + "required": [ + "authority", + "grant", + "client" + ] + } + }, + "required": [ + "oauth2" ], - "description": "Specifies how iterations are to be performed (sequentially or in parallel)", - "default": "parallel" - }, - "metadata": { - "$ref": "common.json#/definitions/metadata" + "description": "Use OAUTH2 authentication." } - }, - "additionalProperties": false, - "if": { - "properties": { - "usedForCompensation": { - "const": true - } - }, - "required": [ - "usedForCompensation" - ] - }, - "then": { - "required": [ - "name", - "type", - "inputCollection", - "actions" - ] - }, - "else": { - "oneOf": [ - { - "required": [ - "name", - "type", - "inputCollection", - "actions", - "end" - ] - }, - { - "required": [ - "name", - "type", - "inputCollection", - "actions", - "transition" - ] - } - ] - } + ], + "description": "Defines an authentication policy." }, - "callbackstate": { + "oauth2Token": { "type": "object", - "description": "This state performs an action, then waits for the callback event that denotes completion of the action", "properties": { - "name": { + "token": { "type": "string", - "description": "State name" + "description": "The security token to use to use." }, "type": { "type": "string", - "const": "callback", - "description": "State type" - }, - "action": { - "description": "Defines the action to be executed", - "$ref": "#/definitions/action" - }, - "eventRef": { - "type": "string", - "description": "References an unique callback event name in the defined workflow events" - }, - "timeouts": { - "type": "object", - "description": "State specific timeouts", - "properties": { - "stateExecTimeout": { - "$ref": "timeouts.json#/definitions/stateExecTimeout" - }, - "actionExecTimeout": { - "$ref": "timeouts.json#/definitions/actionExecTimeout" - }, - "eventTimeout": { - "$ref": "timeouts.json#/definitions/eventTimeout" - } - }, - "required": [] + "description": "The type of the security token to use to use." + } + }, + "required": [ + "token", + "type" + ] + }, + "duration": { + "type": "object", + "minProperties": 1, + "properties": { + "days": { + "type": "integer", + "description": "Number of days, if any." }, - "eventDataFilter": { - "description": "Event data filter", - "$ref": "#/definitions/eventdatafilter" + "hours": { + "type": "integer", + "description": "Number of days, if any." }, - "stateDataFilter": { - "description": "State data filter", - "$ref": "#/definitions/statedatafilter" + "minutes": { + "type": "integer", + "description": "Number of minutes, if any." }, - "onErrors": { - "type": "array", - "description": "States error handling definitions", - "items": { - "type": "object", - "$ref": "#/definitions/error" - }, - "additionalItems": false + "seconds": { + "type": "integer", + "description": "Number of seconds, if any." }, - "transition": { - "description": "Next transition of the workflow after all the actions have been performed", - "$ref": "#/definitions/transition" + "milliseconds": { + "type": "integer", + "description": "Number of milliseconds, if any." + } + }, + "description": "The definition of a duration." + }, + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "format": "uri", + "description": "A URI reference that identifies the error type." }, - "end": { - "$ref": "#/definitions/end", - "description": "State end definition" + "status": { + "type": "integer", + "description": "The status code generated by the origin for this occurrence of the error." }, - "compensatedBy": { + "instance": { "type": "string", - "minLength": 1, - "description": "Unique Name of a workflow state which is responsible for compensation of this state" + "format": "json-pointer", + "description": "A JSON Pointer used to reference the component the error originates from." }, - "usedForCompensation": { - "type": "boolean", - "default": false, - "description": "If true, this state is used to compensate another state. Default is false" + "title": { + "type": "string", + "description": "A short, human-readable summary of the error." }, - "metadata": { - "$ref": "common.json#/definitions/metadata" + "detail": { + "type": "string", + "description": "A human-readable explanation specific to this occurrence of the error." } }, - "additionalProperties": false, - "if": { - "properties": { - "usedForCompensation": { - "const": true - } + "required": [ + "type", + "status", + "instance" + ] + }, + "endpoint": { + "type": "object", + "properties": { + "uri": { + "type": "string", + "format": "uri-template", + "description": "The endpoint's URI." }, - "required": [ - "usedForCompensation" - ] - }, - "then": { - "required": [ - "name", - "type", - "action", - "eventRef" - ] + "authentication": { + "description": "The authentication policy to use.", + "oneOf": [ + { + "$ref": "#/$defs/authenticationPolicy" + }, + { + "type": "string" + } + ] + } }, - "else": { - "oneOf": [ - { - "required": [ - "name", - "type", - "action", - "eventRef", - "end" - ] - }, - { - "required": [ - "name", - "type", - "action", - "eventRef", - "transition" - ] - } - ] - } + "required": [ + "uri" + ] }, - "startdef": { + "eventConsumptionStrategy": { + "type": "object", "oneOf": [ { - "type": "string", - "description": "Name of the starting workflow state", - "minLength": 1 + "properties": { + "all": { + "type": "array", + "items": { + "$ref": "#/$defs/eventFilter" + }, + "description": "A list containing all the events that must be consumed." + } + }, + "required": [ + "all" + ] }, { - "type": "object", - "description": "Workflow start definition", "properties": { - "stateName": { - "type": "string", - "description": "Name of the starting workflow state", - "minLength": 1 - }, - "schedule": { - "description": "Define the time/repeating intervals or cron at which workflow instances should be automatically started.", - "$ref": "#/definitions/schedule" + "any": { + "type": "array", + "items": { + "$ref": "#/$defs/eventFilter" + }, + "description": "A list containing any of the events to consume." + } + }, + "required": [ + "any" + ] + }, + { + "properties": { + "one": { + "$ref": "#/$defs/eventFilter", + "description": "The single event to consume." } }, - "additionalProperties": false, "required": [ - "schedule" + "one" ] } ] }, - "schedule": { - "oneOf": [ - { - "type": "string", - "description": "Time interval (must be repeating interval) described with ISO 8601 format. Declares when workflow instances will be automatically created. (UTC timezone is assumed)", - "minLength": 1 - }, - { + "eventFilter": { + "type": "object", + "properties": { + "with": { "type": "object", - "description": "Start state schedule definition", + "minProperties": 1, "properties": { - "interval": { + "id": { + "type": "string", + "description": "The event's unique identifier" + }, + "source": { + "type": "string", + "description": "Identifies the context in which an event happened" + }, + "type": { "type": "string", - "description": "Time interval (must be repeating interval) described with ISO 8601 format. Declares when workflow instances will be automatically created.", - "minLength": 1 + "description": "This attribute contains a value describing the type of event related to the originating occurrence." + }, + "time": { + "type": "string" }, - "cron": { - "$ref": "#/definitions/crondef" + "subject": { + "type": "string" }, - "timezone": { + "datacontenttype": { "type": "string", - "description": "Timezone name used to evaluate the interval & cron-expression. (default: UTC)" + "description": "Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format." + }, + "dataschema": { + "type": "string" } }, - "additionalProperties": false, - "oneOf": [ - { - "required": [ - "interval" - ] + "additionalProperties": true, + "description": "An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes." + }, + "correlate": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "A runtime expression used to extract the correlation value from the filtered event." + }, + "expect": { + "type": "string", + "description": "A constant or a runtime expression, if any, used to determine whether or not the extracted correlation value matches expectations. If not set, the first extracted value will be used as the correlation's expectation." + } }, - { - "required": [ - "cron" - ] - } - ] + "required": [ + "from" + ] + }, + "description": "A correlation is a link between events and data, established by mapping event attributes to specific data attributes, allowing for coordinated processing or handling based on event characteristics." } - ] + }, + "required": [ + "with" + ], + "description": "An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes." + }, + "extension": { + "type": "object", + "properties": { + "extend": { + "type": "string", + "enum": [ + "call", + "composite", + "emit", + "for", + "listen", + "raise", + "run", + "set", + "switch", + "try", + "wait", + "all" + ], + "description": "The type of task to extend." + }, + "when": { + "type": "string", + "description": "A runtime expression, if any, used to determine whether or not the extension should apply in the specified context." + }, + "before": { + "description": "The task(s) to execute before the extended task, if any.", + "$ref": "#/$defs/taskList" + }, + "after": { + "description": "The task(s) to execute after the extended task, if any.", + "$ref": "#/$defs/taskList" + } + }, + "required": [ + "extend" + ], + "description": "The definition of a an extension." }, - "end": { + "externalResource": { "oneOf": [ { - "type": "boolean", - "description": "State end definition", - "default": true + "type": "string", + "format": "uri" }, { "type": "object", - "description": "State end definition", "properties": { - "terminate": { - "type": "boolean", - "default": false, - "description": "If true, completes all execution flows in the given workflow instance" - }, - "produceEvents": { - "type": "array", - "description": "Defines events that should be produced", - "items": { - "type": "object", - "$ref": "#/definitions/produceeventdef" - }, - "additionalItems": false + "uri": { + "type": "string", + "format": "uri", + "description": "The endpoint's URI." }, - "compensate": { - "type": "boolean", - "default": false, - "description": "If set to true, triggers workflow compensation. Default is false" + "authentication": { + "description": "The authentication policy to use.", + "oneOf": [ + { + "$ref": "#/$defs/authenticationPolicy" + }, + { + "type": "string" + } + ] }, - "continueAs": { - "$ref": "#/definitions/continueasdef" + "name": { + "type": "string", + "description": "The external resource's name, if any." } }, - "additionalProperties": false, - "required": [] + "required": [ + "uri" + ] } ] }, - "produceeventdef": { + "input": { "type": "object", - "description": "Produce an event and set its data", "properties": { - "eventRef": { - "type": "string", - "description": "References a name of a defined event" - }, - "data": { - "type": [ - "string", - "object" - ], - "description": "If String, expression which selects parts of the states data output to become the data of the produced event. If object a custom object to become the data of produced event." + "schema": { + "$ref": "#/$defs/schema", + "description": "The schema used to describe and validate the input of the workflow or task." }, - "contextAttributes": { - "type": "object", - "description": "Add additional event extension context attributes", - "additionalProperties": { - "type": "string" - } + "from": { + "type": "string", + "description": "A runtime expression, if any, used to mutate and/or filter the input of the workflow or task." } }, - "additionalProperties": false, - "required": [ - "eventRef" - ] + "description": "Configures the input of a workflow or task." }, - "statedatafilter": { + "output": { "type": "object", "properties": { - "input": { - "type": "string", - "description": "Workflow expression to filter the state data input" + "schema": { + "$ref": "#/$defs/schema", + "description": "The schema used to describe and validate the output of the workflow or task." }, - "output": { + "as": { "type": "string", - "description": "Workflow expression that filters the state data output" + "description": "A runtime expression, if any, used to mutate and/or filter the output of the workflow or task." } }, - "additionalProperties": false, - "required": [] + "description": "Configures the output of a workflow or task." }, - "eventdatafilter": { + "export": { "type": "object", "properties": { - "useData": { - "type": "boolean", - "description": "If set to false, event payload is not added/merged to state data. In this case 'data' and 'toStateData' should be ignored. Default is true.", - "default": true - }, - "data": { - "type": "string", - "description": "Workflow expression that filters the received event payload (default: '${ . }')" + "schema": { + "$ref": "#/$defs/schema", + "description": "The schema used to describe and validate the workflow context." }, - "toStateData": { + "as": { "type": "string", - "description": " Workflow expression that selects a state data element to which the filtered event should be added/merged into. If not specified, denotes, the top-level state data element." + "description": "A runtime expression, if any, used to export the output data to the context." } }, - "additionalProperties": false, - "required": [] + "description": "Set the content of the context." }, - "actiondatafilter": { + "retryPolicy": { "type": "object", "properties": { - "fromStateData": { + "when": { "type": "string", - "description": "Workflow expression that selects state data that the state action can use" + "description": "A runtime expression, if any, used to determine whether or not to retry running the task, in a given context." }, - "useResults": { - "type": "boolean", - "description": "If set to false, action data results are not added/merged to state data. In this case 'results' and 'toStateData' should be ignored. Default is true.", - "default": true - }, - "results": { + "exceptWhen": { "type": "string", - "description": "Workflow expression that filters the actions data results" + "description": "A runtime expression used to determine whether or not to retry running the task, in a given context." + }, + "delay": { + "$ref": "#/$defs/duration", + "description": "The duration to wait between retry attempts." + }, + "backoff": { + "type": "object", + "oneOf": [ + { + "properties": { + "constant": { + "type": "object", + "description": "The definition of the constant backoff to use, if any." + } + }, + "required": [ + "constant" + ] + }, + { + "properties": { + "exponential": { + "type": "object", + "description": "The definition of the exponential backoff to use, if any." + } + }, + "required": [ + "exponential" + ] + }, + { + "properties": { + "linear": { + "type": "object", + "description": "The definition of the linear backoff to use, if any." + } + }, + "required": [ + "linear" + ] + } + ], + "description": "The retry duration backoff." + }, + "limit": { + "type": "object", + "properties": { + "attempt": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "The maximum amount of retry attempts, if any." + }, + "duration": { + "$ref": "#/$defs/duration", + "description": "The maximum duration for each retry attempt." + } + } + }, + "duration": { + "$ref": "#/$defs/duration", + "description": "The duration limit, if any, for all retry attempts." + } + }, + "description": "The retry limit, if any" }, - "toStateData": { + "jitter": { + "type": "object", + "properties": { + "from": { + "$ref": "#/$defs/duration", + "description": "The minimum duration of the jitter range" + }, + "to": { + "$ref": "#/$defs/duration", + "description": "The maximum duration of the jitter range" + } + }, + "required": [ + "from", + "to" + ], + "description": "The parameters, if any, that control the randomness or variability of the delay between retry attempts." + } + }, + "description": "Defines a retry policy." + }, + "schema": { + "type": "object", + "properties": { + "format": { "type": "string", - "description": "Workflow expression that selects a state data element to which the action results should be added/merged into. If not specified, denote, the top-level state data element" + "default": "json", + "description": "The schema's format. Defaults to 'json'. The (optional) version of the format can be set using `{format}:{version}`." } }, - "additionalProperties": false, - "required": [] + "oneOf": [ + { + "properties": { + "document": { + "description": "The schema's inline definition." + } + }, + "required": [ + "document" + ] + }, + { + "properties": { + "resource": { + "$ref": "#/$defs/externalResource", + "description": "The schema's external resource." + } + }, + "required": [ + "resource" + ] + } + ], + "description": "Represents the definition of a schema." + }, + "timeout": { + "type": "object", + "properties": { + "after": { + "$ref": "#/$defs/duration", + "description": "The duration after which to timeout." + } + }, + "required": [ + "after" + ], + "description": "The definition of a timeout." } - } -} + }, + "required": [ + "document", + "do" + ] +} \ No newline at end of file diff --git a/src/lib/schema/workflowextensions.json b/src/lib/schema/workflowextensions.json deleted file mode 100644 index 324f23d1..00000000 --- a/src/lib/schema/workflowextensions.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "$id": "https://serverlessworkflow.io/schemas/0.8/workflowextensions.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Serverless Workflow specification - extensions schema", - "type": "object", - "extensions": { - "oneOf": [ - { - "type": "string", - "format": "uri", - "description": "URI to a resource containing workflow extensions definitions (json or yaml)" - }, - { - "type": "array", - "description": "Workflow extensions definitions", - "items": { - "type": "object", - "$ref": "#/definitions/extension" - }, - "additionalItems": false, - "minItems": 1 - } - ] - }, - "required": [ - "extensions" - ], - "definitions": { - "extension": { - "type": "object", - "properties": { - "extensionId": { - "type": "string", - "description": "Unique extension id", - "minLength": 1 - }, - "resource": { - "type": "string", - "description": "URI to a resource containing this workflow extension definitions (json or yaml)", - "minLength": 1 - } - }, - "additionalProperties": false, - "required": [ - "extensionId", - "resource" - ] - } - } -} \ No newline at end of file diff --git a/src/lib/utils.ts b/src/lib/utils.ts deleted file mode 100644 index dca73b23..00000000 --- a/src/lib/utils.ts +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { DefinedError, ValidateFunction } from 'ajv'; -import { validators } from './validators'; - -/** - * Validates the provided data or throws an error - * @param typeName {string} The data type to validate - * @param data {object} The data to validate - * @returns {boolean} True if valid, throws if invalid - */ -export const validate = (typeName: string, data: any): boolean => { - const validateFn: ValidateFunction | undefined = validators.get(typeName); - - if (!validateFn) { - throw Error(`Validate function not defined for type '${typeName}'`); - } - - if (!validateFn(JSON.parse(JSON.stringify(data)))) { - const firstError: DefinedError = (validateFn.errors as DefinedError[])[0]; - throw new Error( - `${typeName} is invalid: ${firstError.instancePath} | ${firstError.schemaPath} | ${firstError.message} - data: ${JSON.stringify(data, null, 4)}` - ); - } - return true; -}; - -/** - * Determine if the provided value is an object or a primitive type - * @param value The data - * @returns {boolean} True if the provided value is an object - */ -export const isObject = (value: any): boolean => { - if (!value) return false; - const type = typeof value; - return type === 'object'; -}; - -/** - * Represents the options used to convert string to pascal case or camel case - */ -export interface CaseConvertionOptions { - /** Keep dashes (-) characters */ - keepDashes: boolean; - /** Capitalize after dashes (-) characters, if kept */ - capitalizeAfterDashes: boolean; - /** Keep underscores (_) characters */ - keepUnderscores: boolean; - /** Capitalize after underscores (_) characters, if kept */ - capitalizeAfterUnderscores: boolean; - /** Keep dots (.) characters */ - keepDots: boolean; - /** Capitalize after dots (.) characters, if kept */ - capitalizeAfterDots: boolean; -} - -/** - * Holds default convertion options - */ -export const defaultConvertionOptions = { - keepDashes: false, - capitalizeAfterDashes: false, - keepUnderscores: false, - capitalizeAfterUnderscores: false, - keepDots: true, - capitalizeAfterDots: true, -} as CaseConvertionOptions; - -/** - * Converts a string to pascal case (PascalCase) - * @param source string The string to convert to pascal case - * @param convertionOptions CaseConvertionOptions Defaults: keepDashes: false, capitalizeAfterDashes: false, keepUnderscores: false, capitalizeAfterUnderscores: false, keepDots: true, capitalizeAfterDots: true - * @returns string The pascal case string - */ -export const pascalCase = ( - source: string, - convertionOptions: CaseConvertionOptions = defaultConvertionOptions -): string => { - if (!source) return ''; - let delimiter = ''; - if (!convertionOptions.keepDashes) { - source = source.replace(/-+/g, ' '); - } else if (convertionOptions.capitalizeAfterDashes) { - delimiter += '-'; - } - if (!convertionOptions.keepUnderscores) { - source = source.replace(/_+/g, ' '); - } else if (convertionOptions.capitalizeAfterUnderscores) { - delimiter += '_'; - } - if (!convertionOptions.keepDots) { - source = source.replace(/\.+/g, ' '); - } else if (convertionOptions.capitalizeAfterDots) { - delimiter += '\\.'; - } - if (delimiter) { - source = source.replace( - new RegExp('([' + delimiter + '])+(.)(\\w+)', 'g'), - ($1, $2, $3, $4) => `${$2}${$3.toUpperCase()}${$4.toLowerCase()}` - ); - } - return source - .replace(/\s+(.)(\w+)/g, ($1, $2, $3) => `${$2.toUpperCase()}${$3.toLowerCase()}`) - .replace(/\s/g, '') - .replace(/\w/, (s) => s.toUpperCase()); -}; - -/** - * Converts a PasalCase/camelCase string into a human readable string - * @param source string The string to convert - * @param keepCapitalLetters boolean If capital letters should be kept - * @returns string The converted string - */ -export const humanCase = (source: string, keepCapitalLetters: boolean = false): string => { - if (!source) return ''; - let transformable = source.trim(); - transformable = - transformable[0].toUpperCase() + - transformable - .slice(1) - .replace(/([A-Z])/g, ' $1') - .replace(/\s+/g, ' '); - if (keepCapitalLetters) { - return transformable; - } else { - return transformable.toLowerCase(); - } -}; diff --git a/src/lib/validation-error.ts b/src/lib/validation-error.ts deleted file mode 100644 index facc041b..00000000 --- a/src/lib/validation-error.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export class ValidationError { - constructor(public readonly message: string) {} -} diff --git a/src/lib/validation/README.md b/src/lib/validation/README.md deleted file mode 100644 index 7d5a8642..00000000 --- a/src/lib/validation/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Auto generated notice -This directory and its content has been generated automatically. Do not modify its content, it WILL be lost. \ No newline at end of file diff --git a/src/lib/validation/validators-paths.ts b/src/lib/validation/validators-paths.ts deleted file mode 100644 index 82a9944c..00000000 --- a/src/lib/validation/validators-paths.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Copyright 2021-Present The Serverless Workflow Specification Authors -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -/** -* A map of type names and their corresponding schema -*/ -export const validatorsPaths: [string, string][] = [ - ['Workflow', 'https://serverlessworkflow.io/schemas/0.8/workflow.json'], - ['Sleep', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/sleep'], - ['Crondef', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/crondef'], - ['Continueasdef', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/continueasdef'], - ['Transition', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/transition'], - ['Error', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/error'], - ['Onevents', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/onevents'], - ['Action', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/action'], - ['Functionref', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/functionref'], - ['Eventref', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/eventref'], - ['Subflowref', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/subflowref'], - ['Branch', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/branch'], - ['Sleepstate', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/sleepstate'], - ['Eventstate', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/eventstate'], - ['Operationstate', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/operationstate'], - ['Parallelstate', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/parallelstate'], - ['Switchstate', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/switchstate'], - ['Eventbasedswitchstate', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/eventbasedswitchstate'], - ['Databasedswitchstate', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/databasedswitchstate'], - ['Defaultconditiondef', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/defaultconditiondef'], - ['Eventcondition', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/eventcondition'], - ['Transitioneventcondition', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/transitioneventcondition'], - ['Endeventcondition', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/endeventcondition'], - ['Datacondition', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/datacondition'], - ['Transitiondatacondition', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/transitiondatacondition'], - ['Enddatacondition', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/enddatacondition'], - ['Injectstate', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/injectstate'], - ['Foreachstate', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/foreachstate'], - ['Callbackstate', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/callbackstate'], - ['Startdef', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/startdef'], - ['Schedule', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/schedule'], - ['End', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/end'], - ['Produceeventdef', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/produceeventdef'], - ['Statedatafilter', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/statedatafilter'], - ['Eventdatafilter', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/eventdatafilter'], - ['Actiondatafilter', 'https://serverlessworkflow.io/schemas/0.8/workflow.json#/definitions/actiondatafilter'], - ['Metadata', 'https://serverlessworkflow.io/schemas/0.8/common.json#/definitions/metadata'], - ['WorkflowExecTimeout', 'https://serverlessworkflow.io/schemas/0.8/timeouts.json#/definitions/workflowExecTimeout'], - ['StateExecTimeout', 'https://serverlessworkflow.io/schemas/0.8/timeouts.json#/definitions/stateExecTimeout'], - ['ActionExecTimeout', 'https://serverlessworkflow.io/schemas/0.8/timeouts.json#/definitions/actionExecTimeout'], - ['BranchExecTimeout', 'https://serverlessworkflow.io/schemas/0.8/timeouts.json#/definitions/branchExecTimeout'], - ['EventTimeout', 'https://serverlessworkflow.io/schemas/0.8/timeouts.json#/definitions/eventTimeout'], - ['Eventdef', 'https://serverlessworkflow.io/schemas/0.8/events.json#/definitions/eventdef'], - ['CorrelationDef', 'https://serverlessworkflow.io/schemas/0.8/events.json#/definitions/correlationDef'], - ['Function', 'https://serverlessworkflow.io/schemas/0.8/functions.json#/definitions/function'], - ['Authdef', 'https://serverlessworkflow.io/schemas/0.8/auth.json#/definitions/authdef'], - ['Basicpropsdef', 'https://serverlessworkflow.io/schemas/0.8/auth.json#/definitions/basicpropsdef'], - ['Bearerpropsdef', 'https://serverlessworkflow.io/schemas/0.8/auth.json#/definitions/bearerpropsdef'], - ['Oauth2propsdef', 'https://serverlessworkflow.io/schemas/0.8/auth.json#/definitions/oauth2propsdef'], - ['Retrydef', 'https://serverlessworkflow.io/schemas/0.8/retries.json#/definitions/retrydef'], - ['Errordef', 'https://serverlessworkflow.io/schemas/0.8/errors.json#/definitions/errordef'], - ['Extension', 'https://serverlessworkflow.io/schemas/0.8/workflowextensions.json#/definitions/extension'], - ['Secrets', 'https://serverlessworkflow.io/schemas/0.8/secrets.json#/secrets'], - ['Timeouts', 'https://serverlessworkflow.io/schemas/0.8/timeouts.json#/timeouts'], - ['Errors', 'https://serverlessworkflow.io/schemas/0.8/errors.json#/errors'], - ['Events', 'https://serverlessworkflow.io/schemas/0.8/events.json#/events'], - ['Functions', 'https://serverlessworkflow.io/schemas/0.8/functions.json#/functions'], - ['Retries', 'https://serverlessworkflow.io/schemas/0.8/retries.json#/retries'], - ['Auth', 'https://serverlessworkflow.io/schemas/0.8/auth.json#/auth'], - ['Extensions', 'https://serverlessworkflow.io/schemas/0.8/workflowextensions.json#/extensions'], -] \ No newline at end of file diff --git a/src/lib/validators.ts b/src/lib/validators.ts deleted file mode 100644 index 394bd1a1..00000000 --- a/src/lib/validators.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ajv, { ValidateFunction } from 'ajv'; -import authSchema from './schema/auth.json'; -import commonSchema from './schema/common.json'; -import errorsSchema from './schema/errors.json'; -import eventsSchema from './schema/events.json'; -import functionsSchema from './schema/functions.json'; -import retriesSchema from './schema/retries.json'; -import secretsSchema from './schema/secrets.json'; -import timeoutsSchema from './schema/timeouts.json'; -import odataSchema from './schema/odata.json'; -import workflowSchema from './schema/workflow.json'; -import workflowExtensionsSchema from './schema/workflowextensions.json'; -import { validatorsPaths } from './validation/validators-paths'; - -const schemas: any[] = [ - authSchema, - commonSchema, - eventsSchema, - errorsSchema, - functionsSchema, - odataSchema, - retriesSchema, - secretsSchema, - timeoutsSchema, - workflowSchema, - workflowExtensionsSchema, -]; -const strict: boolean = false; -const ajv = new Ajv({ schemas, strict }); -ajv.addFormat('uri', (uri: string): boolean => true); -/** - * A Map of validation functions, where the key is the name of the schema to validate with - */ -export const validators: Map = new Map( - validatorsPaths.map(([dataType, schemaPath]) => { - const validate = ajv.getSchema(schemaPath); - if (!validate) throw `Unable to find schema '${schemaPath}' for type '${dataType}'`; - return [dataType, validate as ValidateFunction]; - }) -); diff --git a/src/lib/workflow-validator.ts b/src/lib/workflow-validator.ts deleted file mode 100644 index 1faca005..00000000 --- a/src/lib/workflow-validator.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { ValidateFunction } from 'ajv'; -import { Specification } from './definitions'; -import { validators } from './validators'; -import { ValidationError } from './validation-error'; - -import { schemaVersion } from '../../package.json'; - -export class WorkflowValidator { - /** The validation errors after running validate(), if any */ - readonly errors: ValidationError[] = []; - - /** Whether the workflow is valid or not */ - readonly isValid: boolean; - - /** - * Creates a new WorkflowValidator for the provided workflow - * @param {Workflow} workflow The workflow to validate - */ - constructor(private workflow: Specification.Workflow) { - const validateFn = validators.get('Workflow') as ValidateFunction; - const normalizedWf = this.workflow.normalize(); - validateFn(JSON.parse(JSON.stringify(normalizedWf))); - if (validateFn.errors) { - this.errors = validateFn.errors.map((error) => { - const message = `Workflow is invalid: ${error.instancePath} | ${error.schemaPath} | ${error.message} - data: ${JSON.stringify(normalizedWf, null, 4)}`; - return new ValidationError(message); - }); - } - - const specVersion = workflow.specVersion; - if (schemaVersion !== specVersion) { - const message = `provided workflow.specVersion value '${specVersion}' can not be different from the SDK supported version '${schemaVersion}'`; - this.errors.push(new ValidationError(message)); - } - - this.isValid = this.errors.length === 0; - } -} diff --git a/src/serverless-workflow-sdk.ts b/src/serverless-workflow-sdk.ts deleted file mode 100644 index 0d865f7a..00000000 --- a/src/serverless-workflow-sdk.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export * from './lib/validation-error'; -export * from './lib/workflow-validator'; -export * from './lib/validators'; -export * from './lib/builders'; -export * from './lib/definitions'; diff --git a/tests/examples/applicantrequest.json b/tests/examples/applicantrequest.json deleted file mode 100644 index 6a295a96..00000000 --- a/tests/examples/applicantrequest.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "id": "applicantrequest", - "name": "Applicant Request Decision Workflow", - "version": "1.0.0", - "description": "Determine if applicant request is valid", - "specVersion": "0.8", - "start": "CheckApplication", - "states": [ - { - "name": "CheckApplication", - "type": "switch", - "dataConditions": [ - { - "condition": "${ .applicants | .age >= 18 }", - "transition": "StartApplication" - }, - { - "condition": "${ .applicants | .age < 18 }", - "transition": "RejectApplication" - } - ], - "defaultCondition": { - "transition": "RejectApplication" - } - }, - { - "name": "StartApplication", - "type": "operation", - "actions": [ - { - "subFlowRef": "startApplicationWorkflowId" - } - ], - "end": true - }, - { - "name": "RejectApplication", - "type": "operation", - "actionMode": "sequential", - "actions": [ - { - "functionRef": { - "refName": "sendRejectionEmailFunction", - "arguments": { - "applicant": "${ .applicant }" - } - } - } - ], - "end": true - } - ], - "functions": [ - { - "name": "sendRejectionEmailFunction", - "operation": "http://myapis.org/applicationapi.json#emailRejection" - } - ] -} \ No newline at end of file diff --git a/tests/examples/applicantrequest.spec.ts b/tests/examples/applicantrequest.spec.ts deleted file mode 100644 index 2f00b4e6..00000000 --- a/tests/examples/applicantrequest.spec.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - *

- * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - *

- * http://www.apache.org/licenses/LICENSE-2.0 - *

- * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -import * as fs from 'fs'; -import { - actionBuilder, - databasedswitchstateBuilder, - defaultconditiondefBuilder, - functionBuilder, - functionrefBuilder, - operationstateBuilder, - transitiondataconditionBuilder, - workflowBuilder, -} from '../../src'; - -describe('applicationrequest workflow example', () => { - it('should generate Workflow object', function () { - const workflow = workflowBuilder() - .id('applicantrequest') - .version('1.0.0') - .specVersion('0.8') - .name('Applicant Request Decision Workflow') - .description('Determine if applicant request is valid') - .start('CheckApplication') - .functions([ - functionBuilder() - .name('sendRejectionEmailFunction') - .operation('http://myapis.org/applicationapi.json#emailRejection') - .build(), - ]) - .states([ - databasedswitchstateBuilder() - .name('CheckApplication') - .dataConditions([ - transitiondataconditionBuilder() - .condition('${ .applicants | .age >= 18 }') - .transition('StartApplication') - .build(), - transitiondataconditionBuilder() - .condition('${ .applicants | .age < 18 }') - .transition('RejectApplication') - .build(), - ]) - .defaultCondition(defaultconditiondefBuilder().transition('RejectApplication').build()) - .build(), - operationstateBuilder() - .name('StartApplication') - .actions([actionBuilder().subFlowRef('startApplicationWorkflowId').build()]) - .build(), - operationstateBuilder() - .name('RejectApplication') - .actionMode('sequential') - .actions([ - actionBuilder() - .functionRef( - functionrefBuilder() - .refName('sendRejectionEmailFunction') - .arguments({ applicant: '${ .applicant }' }) - .build() - ) - .build(), - ]) - .build(), - ]) - .build(); - - const expected = JSON.parse(fs.readFileSync('./tests/examples/applicantrequest.json', 'utf8')); - expect(JSON.stringify(workflow.normalize())).toEqual(JSON.stringify(expected)); - }); -}); diff --git a/tests/examples/booklending.json b/tests/examples/booklending.json deleted file mode 100644 index fc3c8df1..00000000 --- a/tests/examples/booklending.json +++ /dev/null @@ -1,138 +0,0 @@ -{ - "id": "booklending", - "name": "Book Lending Workflow", - "version": "1.0.0", - "specVersion": "0.8", - "start": "Book Lending Request", - "states": [ - { - "name": "Book Lending Request", - "type": "event", - "onEvents": [ - { - "eventRefs": [ - "Book Lending Request Event" - ] - } - ], - "transition": "Get Book Status" - }, - { - "name": "Get Book Status", - "type": "operation", - "actions": [ - { - "functionRef": { - "refName": "Get status for book", - "arguments": { - "bookid": "${ .book.id }" - } - } - } - ], - "transition": "Book Status Decision" - }, - { - "name": "Book Status Decision", - "type": "switch", - "dataConditions": [ - { - "name": "Book is on loan", - "condition": "${ .book.status == \"onloan\" }", - "transition": "Report Status To Lender" - }, - { - "name": "Check is available", - "condition": "${ .book.status == \"available\" }", - "transition": "Check Out Book" - } - ], - "defaultCondition": { - "end": true - } - }, - { - "name": "Report Status To Lender", - "type": "operation", - "actions": [ - { - "functionRef": { - "refName": "Send status to lender", - "arguments": { - "bookid": "${ .book.id }", - "message": "Book ${ .book.title } is already on loan" - } - } - } - ], - "transition": "Wait for Lender response" - }, - { - "name": "Wait for Lender response", - "type": "switch", - "eventConditions": [ - { - "name": "Hold Book", - "eventRef": "Hold Book Event", - "transition": "Request Hold" - }, - { - "name": "Decline Book Hold", - "eventRef": "Decline Hold Event", - "transition": "Cancel Request" - } - ], - "defaultCondition": { - "end": true - } - }, - { - "name": "Request Hold", - "type": "operation", - "actions": [ - { - "functionRef": { - "refName": "Request hold for lender", - "arguments": { - "bookid": "${ .book.id }", - "lender": "${ .lender }" - } - } - } - ], - "transition": "Sleep two weeks" - }, - { - "name": "Sleep two weeks", - "type": "sleep", - "duration": "PT2W", - "transition": "Get Book Status" - }, - { - "name": "Check Out Book", - "type": "operation", - "actions": [ - { - "functionRef": { - "refName": "Check out book with id", - "arguments": { - "bookid": "${ .book.id }" - } - } - }, - { - "functionRef": { - "refName": "Notify Lender for checkout", - "arguments": { - "bookid": "${ .book.id }", - "lender": "${ .lender }" - } - } - } - ], - "end": true - } - ], - "functions": "file://books/lending/functions.json", - "events": "file://books/lending/events.json" -} diff --git a/tests/examples/booklending.spec.ts b/tests/examples/booklending.spec.ts deleted file mode 100644 index bda3e65a..00000000 --- a/tests/examples/booklending.spec.ts +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - *

- * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - *

- * http://www.apache.org/licenses/LICENSE-2.0 - *

- * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -import * as fs from 'fs'; -import { - actionBuilder, - databasedswitchstateBuilder, - defaultconditiondefBuilder, - eventbasedswitchstateBuilder, - eventstateBuilder, - functionrefBuilder, - oneventsBuilder, - operationstateBuilder, - sleepstateBuilder, - transitiondataconditionBuilder, - transitioneventconditionBuilder, - workflowBuilder, -} from '../../src'; - -describe('booklending workflow example', () => { - it('should generate Workflow object', function () { - const workflow = workflowBuilder() - .id('booklending') - .name('Book Lending Workflow') - .version('1.0.0') - .specVersion('0.8') - .start('Book Lending Request') - .states([ - eventstateBuilder() - .name('Book Lending Request') - .onEvents([oneventsBuilder().eventRefs(['Book Lending Request Event']).build()]) - .transition('Get Book Status') - .build(), - operationstateBuilder() - .name('Get Book Status') - .actions([ - actionBuilder() - .functionRef( - functionrefBuilder() - .refName('Get status for book') - .arguments({ - bookid: '${ .book.id }', - }) - .build() - ) - .build(), - ]) - .transition('Book Status Decision') - .build(), - databasedswitchstateBuilder() - .name('Book Status Decision') - .dataConditions([ - transitiondataconditionBuilder() - .name('Book is on loan') - .condition('${ .book.status == "onloan" }') - .transition('Report Status To Lender') - .build(), - transitiondataconditionBuilder() - .name('Check is available') - .condition('${ .book.status == "available" }') - .transition('Check Out Book') - .build(), - ]) - .defaultCondition(defaultconditiondefBuilder().end(true).build()) - .build(), - operationstateBuilder() - .name('Report Status To Lender') - .actions([ - actionBuilder() - .functionRef( - functionrefBuilder() - .refName('Send status to lender') - .arguments({ - bookid: '${ .book.id }', - message: 'Book ${ .book.title } is already on loan', - }) - .build() - ) - .build(), - ]) - .transition('Wait for Lender response') - .build(), - eventbasedswitchstateBuilder() - .name('Wait for Lender response') - .eventConditions([ - transitioneventconditionBuilder() - .name('Hold Book') - .eventRef('Hold Book Event') - .transition('Request Hold') - .build(), - transitioneventconditionBuilder() - .name('Decline Book Hold') - .eventRef('Decline Hold Event') - .transition('Cancel Request') - .build(), - ]) - .defaultCondition(defaultconditiondefBuilder().end(true).build()) - .build(), - operationstateBuilder() - .name('Request Hold') - .actions([ - actionBuilder() - .functionRef( - functionrefBuilder() - .refName('Request hold for lender') - .arguments({ - bookid: '${ .book.id }', - lender: '${ .lender }', - }) - .build() - ) - .build(), - ]) - .transition('Sleep two weeks') - .build(), - sleepstateBuilder().name('Sleep two weeks').duration('PT2W').transition('Get Book Status').build(), - operationstateBuilder() - .name('Check Out Book') - .actions([ - actionBuilder() - .functionRef( - functionrefBuilder() - .refName('Check out book with id') - .arguments({ - bookid: '${ .book.id }', - }) - .build() - ) - .build(), - actionBuilder() - .functionRef( - functionrefBuilder() - .refName('Notify Lender for checkout') - .arguments({ - bookid: '${ .book.id }', - lender: '${ .lender }', - }) - .build() - ) - .build(), - ]) - .build(), - ]) - .functions('file://books/lending/functions.json') - .events('file://books/lending/events.json') - .build(); - - const expected = JSON.parse(fs.readFileSync('./tests/examples/booklending.json', 'utf8')); - expect(JSON.stringify(workflow.normalize())).toEqual(JSON.stringify(expected)); - }); -}); diff --git a/tests/examples/carauctionbids.json b/tests/examples/carauctionbids.json deleted file mode 100644 index 9c6ac0d7..00000000 --- a/tests/examples/carauctionbids.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "id": "handleCarAuctionBid", - "name": "Car Auction Bidding Workflow", - "version": "1.0.0", - "description": "Store a single bid whole the car auction is active", - "specVersion": "0.8", - "start": { - "stateName": "StoreCarAuctionBid", - "schedule": "R/PT2H" - }, - "states": [ - { - "name": "StoreCarAuctionBid", - "type": "event", - "exclusive": true, - "onEvents": [ - { - "eventRefs": [ - "CarBidEvent" - ], - "actions": [ - { - "functionRef": { - "refName": "StoreBidFunction", - "arguments": { - "bid": "${ .bid }" - } - } - } - ] - } - ], - "end": true - } - ], - "functions": [ - { - "name": "StoreBidFunction", - "operation": "http://myapis.org/carauctionapi.json#storeBid" - } - ], - "events": [ - { - "name": "CarBidEvent", - "type": "carBidMadeType", - "source": "carBidEventSource" - } - ] -} \ No newline at end of file diff --git a/tests/examples/carauctionbids.spec.ts b/tests/examples/carauctionbids.spec.ts deleted file mode 100644 index 12f6b011..00000000 --- a/tests/examples/carauctionbids.spec.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import * as fs from 'fs'; -import { - actionBuilder, - eventdefBuilder, - eventstateBuilder, - functionBuilder, - functionrefBuilder, - oneventsBuilder, - startdefBuilder, - workflowBuilder, -} from '../../src'; - -describe('carauctionbids workflow example', () => { - it('should generate Workflow object', function () { - const workflow = workflowBuilder() - .id('handleCarAuctionBid') - .version('1.0.0') - .specVersion('0.8') - .name('Car Auction Bidding Workflow') - .description('Store a single bid whole the car auction is active') - .start(startdefBuilder().stateName('StoreCarAuctionBid').schedule('R/PT2H').build()) - .functions([ - functionBuilder().name('StoreBidFunction').operation('http://myapis.org/carauctionapi.json#storeBid').build(), - ]) - .events([eventdefBuilder().name('CarBidEvent').type('carBidMadeType').source('carBidEventSource').build()]) - .states([ - eventstateBuilder() - .name('StoreCarAuctionBid') - .exclusive(true) - .onEvents([ - oneventsBuilder() - .eventRefs(['CarBidEvent']) - .actions([ - actionBuilder() - .functionRef( - functionrefBuilder() - .refName('StoreBidFunction') - .arguments({ - bid: '${ .bid }', - }) - .build() - ) - .build(), - ]) - .build(), - ]) - .build(), - ]) - .build(); - - const expected = JSON.parse(fs.readFileSync('./tests/examples/carauctionbids.json', 'utf8')); - expect(JSON.stringify(workflow.normalize())).toEqual(JSON.stringify(expected)); - }); -}); diff --git a/tests/examples/checkcarvitals.json b/tests/examples/checkcarvitals.json deleted file mode 100644 index 79a61d63..00000000 --- a/tests/examples/checkcarvitals.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "id": "checkcarvitals", - "name": "Check Car Vitals Workflow", - "version": "1.0.0", - "specVersion": "0.8", - "start": "WhenCarIsOn", - "states": [ - { - "name": "WhenCarIsOn", - "type": "event", - "onEvents": [ - { - "eventRefs": [ - "CarTurnedOnEvent" - ] - } - ], - "transition": "DoCarVitalChecks" - }, - { - "name": "DoCarVitalChecks", - "type": "operation", - "actions": [ - { - "subFlowRef": "vitalscheck", - "sleep": { - "after": "PT1S" - } - } - ], - "transition": "CheckContinueVitalChecks" - }, - { - "name": "CheckContinueVitalChecks", - "type": "switch", - "eventConditions": [ - { - "name": "Car Turned Off Condition", - "eventRef": "CarTurnedOffEvent", - "end": true - } - ], - "defaultCondition": { - "transition": "DoCarVitalChecks" - } - } - ], - "events": [ - { - "name": "CarTurnedOnEvent", - "type": "car.events", - "source": "my/car" - }, - { - "name": "CarTurnedOffEvent", - "type": "car.events", - "source": "my/car" - } - ] -} diff --git a/tests/examples/checkcarvitals.spec.ts b/tests/examples/checkcarvitals.spec.ts deleted file mode 100644 index d4e954a2..00000000 --- a/tests/examples/checkcarvitals.spec.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import * as fs from 'fs'; -import { - actionBuilder, - defaultconditiondefBuilder, - endeventconditionBuilder, - eventbasedswitchstateBuilder, - eventdefBuilder, - eventstateBuilder, - oneventsBuilder, - operationstateBuilder, - sleepBuilder, - workflowBuilder, -} from '../../src'; - -describe('checkcarvitals workflow example', () => { - it('should generate Workflow object', function () { - const workflow = workflowBuilder() - .id('checkcarvitals') - .name('Check Car Vitals Workflow') - .version('1.0.0') - .specVersion('0.8') - .start('WhenCarIsOn') - .states([ - eventstateBuilder() - .name('WhenCarIsOn') - .onEvents([oneventsBuilder().eventRefs(['CarTurnedOnEvent']).build()]) - .transition('DoCarVitalChecks') - .build(), - operationstateBuilder() - .name('DoCarVitalChecks') - .actions([actionBuilder().subFlowRef('vitalscheck').sleep(sleepBuilder().after('PT1S').build()).build()]) - - .transition('CheckContinueVitalChecks') - .build(), - - eventbasedswitchstateBuilder() - .name('CheckContinueVitalChecks') - .eventConditions([ - endeventconditionBuilder().name('Car Turned Off Condition').eventRef('CarTurnedOffEvent').end(true).build(), - ]) - .defaultCondition(defaultconditiondefBuilder().transition('DoCarVitalChecks').build()) - .build(), - ]) - .events([ - eventdefBuilder().name('CarTurnedOnEvent').type('car.events').source('my/car').build(), - eventdefBuilder().name('CarTurnedOffEvent').type('car.events').source('my/car').build(), - ]) - .build(); - - const expected = JSON.parse(fs.readFileSync('./tests/examples/checkcarvitals.json', 'utf8')); - expect(JSON.stringify(workflow.normalize())).toEqual(JSON.stringify(expected)); - }); -}); diff --git a/tests/examples/jobmonitoring.json b/tests/examples/jobmonitoring.json deleted file mode 100644 index 6ec7505b..00000000 --- a/tests/examples/jobmonitoring.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "id": "jobmonitoring", - "name": "Job Monitoring", - "version": "1.0.0", - "description": "Monitor finished execution of a submitted job", - "specVersion": "0.8", - "start": "SubmitJob", - "states": [ - { - "name": "SubmitJob", - "type": "operation", - "actionMode": "sequential", - "actions": [ - { - "functionRef": { - "refName": "submitJob", - "arguments": { - "name": "${ .job.name }" - } - }, - "actionDataFilter": { - "results": "${ .jobuid }" - } - } - ], - "stateDataFilter": { - "output": "${ .jobuid }" - }, - "transition": "WaitForCompletion" - }, - { - "name": "WaitForCompletion", - "type": "sleep", - "duration": "PT5S", - "transition": "GetJobStatus" - }, - { - "name": "GetJobStatus", - "type": "operation", - "actionMode": "sequential", - "actions": [ - { - "functionRef": { - "refName": "checkJobStatus", - "arguments": { - "name": "${ .jobuid }" - } - }, - "actionDataFilter": { - "results": "${ .jobstatus }" - } - } - ], - "stateDataFilter": { - "output": "${ .jobstatus }" - }, - "transition": "DetermineCompletion" - }, - { - "name": "DetermineCompletion", - "type": "switch", - "dataConditions": [ - { - "condition": "${ .jobStatus == \"SUCCEEDED\" }", - "transition": "JobSucceeded" - }, - { - "condition": "${ .jobStatus == \"FAILED\" }", - "transition": "JobFailed" - } - ], - "defaultCondition": { - "transition": "WaitForCompletion" - } - }, - { - "name": "JobSucceeded", - "type": "operation", - "actionMode": "sequential", - "actions": [ - { - "functionRef": { - "refName": "reportJobSuceeded", - "arguments": { - "name": "${ .jobuid }" - } - } - } - ], - "end": true - }, - { - "name": "JobFailed", - "type": "operation", - "actionMode": "sequential", - "actions": [ - { - "functionRef": { - "refName": "reportJobFailed", - "arguments": { - "name": "${ .jobuid }" - } - } - } - ], - "end": true - } - ], - "functions": [ - { - "name": "submitJob", - "operation": "http://myapis.org/monitorapi.json#doSubmit" - }, - { - "name": "checkJobStatus", - "operation": "http://myapis.org/monitorapi.json#checkStatus" - }, - { - "name": "reportJobSuceeded", - "operation": "http://myapis.org/monitorapi.json#reportSucceeded" - }, - { - "name": "reportJobFailed", - "operation": "http://myapis.org/monitorapi.json#reportFailure" - } - ] -} \ No newline at end of file diff --git a/tests/examples/jobmonitoring.spec.ts b/tests/examples/jobmonitoring.spec.ts deleted file mode 100644 index 67e2051d..00000000 --- a/tests/examples/jobmonitoring.spec.ts +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import * as fs from 'fs'; -import { - actionBuilder, - actiondatafilterBuilder, - databasedswitchstateBuilder, - defaultconditiondefBuilder, - functionBuilder, - functionrefBuilder, - operationstateBuilder, - sleepstateBuilder, - statedatafilterBuilder, - transitiondataconditionBuilder, - workflowBuilder, -} from '../../src'; - -describe('jobmonitoring workflow example', () => { - it('should generate Workflow object', function () { - const workflow = workflowBuilder() - .id('jobmonitoring') - .version('1.0.0') - .specVersion('0.8') - .name('Job Monitoring') - .description('Monitor finished execution of a submitted job') - .start('SubmitJob') - .functions([ - functionBuilder().name('submitJob').operation('http://myapis.org/monitorapi.json#doSubmit').build(), - functionBuilder().name('checkJobStatus').operation('http://myapis.org/monitorapi.json#checkStatus').build(), - functionBuilder() - .name('reportJobSuceeded') - .operation('http://myapis.org/monitorapi.json#reportSucceeded') - .build(), - functionBuilder().name('reportJobFailed').operation('http://myapis.org/monitorapi.json#reportFailure').build(), - ]) - .states([ - operationstateBuilder() - .name('SubmitJob') - .actionMode('sequential') - .actions([ - actionBuilder() - .functionRef( - functionrefBuilder() - .refName('submitJob') - .arguments({ - name: '${ .job.name }', - }) - .build() - ) - .actionDataFilter(actiondatafilterBuilder().results('${ .jobuid }').build()) - .build(), - ]) - .stateDataFilter(statedatafilterBuilder().output('${ .jobuid }').build()) - .transition('WaitForCompletion') - .build(), - sleepstateBuilder().name('WaitForCompletion').duration('PT5S').transition('GetJobStatus').build(), - operationstateBuilder() - .name('GetJobStatus') - .actionMode('sequential') - .actions([ - actionBuilder() - .functionRef( - functionrefBuilder() - .refName('checkJobStatus') - .arguments({ - name: '${ .jobuid }', - }) - .build() - ) - .actionDataFilter(actiondatafilterBuilder().results('${ .jobstatus }').build()) - .build(), - ]) - .stateDataFilter(statedatafilterBuilder().output('${ .jobstatus }').build()) - .transition('DetermineCompletion') - .build(), - databasedswitchstateBuilder() - .name('DetermineCompletion') - .dataConditions([ - transitiondataconditionBuilder() - .condition('${ .jobStatus == "SUCCEEDED" }') - .transition('JobSucceeded') - .build(), - transitiondataconditionBuilder().condition('${ .jobStatus == "FAILED" }').transition('JobFailed').build(), - ]) - .defaultCondition(defaultconditiondefBuilder().transition('WaitForCompletion').build()) - .build(), - operationstateBuilder() - .name('JobSucceeded') - .actionMode('sequential') - .actions([ - actionBuilder() - .functionRef( - functionrefBuilder() - .refName('reportJobSuceeded') - .arguments({ - name: '${ .jobuid }', - }) - .build() - ) - .build(), - ]) - .build(), - operationstateBuilder() - .name('JobFailed') - .actionMode('sequential') - .actions([ - actionBuilder() - .functionRef( - functionrefBuilder() - .refName('reportJobFailed') - .arguments({ - name: '${ .jobuid }', - }) - .build() - ) - .build(), - ]) - .build(), - ]) - .build(); - - const expected = JSON.parse(fs.readFileSync('./tests/examples/jobmonitoring.json', 'utf8')); - expect(JSON.stringify(workflow.normalize())).toEqual(JSON.stringify(expected)); - }); -}); diff --git a/tests/examples/parallel.json b/tests/examples/parallel.json deleted file mode 100644 index 3cc3e50a..00000000 --- a/tests/examples/parallel.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "parallelexec", - "name": "Parallel Execution Workflow", - "version": "1.0.0", - "description": "Executes two branches in parallel", - "specVersion": "0.8", - "start": "ParallelExec", - "states": [ - { - "name": "ParallelExec", - "type": "parallel", - "completionType": "allOf", - "branches": [ - { - "name": "ShortDelayBranch", - "actions": [ - { - "subFlowRef": "shortdelayworkflowid" - } - ] - }, - { - "name": "LongDelayBranch", - "actions": [ - { - "subFlowRef": "longdelayworkflowid" - } - ] - } - ], - "end": true - } - ] -} \ No newline at end of file diff --git a/tests/examples/parallel.spec.ts b/tests/examples/parallel.spec.ts deleted file mode 100644 index 420c0dc2..00000000 --- a/tests/examples/parallel.spec.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -import * as fs from 'fs'; -import { actionBuilder, branchBuilder, parallelstateBuilder, workflowBuilder } from '../../src'; - -describe('parallel workflow example', () => { - it('should generate Workflow object', function () { - const workflow = workflowBuilder() - .id('parallelexec') - .version('1.0.0') - .specVersion('0.8') - .name('Parallel Execution Workflow') - .description('Executes two branches in parallel') - .start('ParallelExec') - .states([ - parallelstateBuilder() - .name('ParallelExec') - .completionType('allOf') - .branches([ - branchBuilder() - .name('ShortDelayBranch') - .actions([actionBuilder().subFlowRef('shortdelayworkflowid').build()]) - .build(), - branchBuilder() - .name('LongDelayBranch') - .actions([actionBuilder().subFlowRef('longdelayworkflowid').build()]) - .build(), - ]) - .build(), - ]) - .build(); - - const expected = JSON.parse(fs.readFileSync('./tests/examples/parallel.json', 'utf8')); - expect(JSON.stringify(workflow.normalize())).toEqual(JSON.stringify(expected)); - }); -}); diff --git a/tests/examples/provisionorder.json b/tests/examples/provisionorder.json deleted file mode 100644 index 85239754..00000000 --- a/tests/examples/provisionorder.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "id": "provisionorders", - "name": "Provision Orders", - "version": "1.0.0", - "description": "Provision Orders and handle errors thrown", - "specVersion": "0.8", - "start": "ProvisionOrder", - "states": [ - { - "name": "ProvisionOrder", - "type": "operation", - "actionMode": "sequential", - "actions": [ - { - "functionRef": { - "refName": "provisionOrderFunction", - "arguments": { - "order": "${ .order }" - } - } - } - ], - "stateDataFilter": { - "output": "${ .exceptions }" - }, - "transition": "ApplyOrder", - "onErrors": [ - { - "errorRef": "Missing order id", - "transition": "MissingId" - }, - { - "errorRef": "Missing order item", - "transition": "MissingItem" - }, - { - "errorRef": "Missing order quantity", - "transition": "MissingQuantity" - } - ] - }, - { - "name": "MissingId", - "type": "operation", - "actions": [ - { - "subFlowRef": "handleMissingIdExceptionWorkflow" - } - ], - "end": true - }, - { - "name": "MissingItem", - "type": "operation", - "actions": [ - { - "subFlowRef": "handleMissingItemExceptionWorkflow" - } - ], - "end": true - }, - { - "name": "MissingQuantity", - "type": "operation", - "actions": [ - { - "subFlowRef": "handleMissingQuantityExceptionWorkflow" - } - ], - "end": true - }, - { - "name": "ApplyOrder", - "type": "operation", - "actions": [ - { - "subFlowRef": "applyOrderWorkflowId" - } - ], - "end": true - } - ], - "functions": [ - { - "name": "provisionOrderFunction", - "operation": "http://myapis.org/provisioningapi.json#doProvision" - } - ], - "errors": [ - { - "name": "Missing order id" - }, - { - "name": "Missing order item" - }, - { - "name": "Missing order quantity" - } - ] -} \ No newline at end of file diff --git a/tests/examples/provisionorder.spec.ts b/tests/examples/provisionorder.spec.ts deleted file mode 100644 index c49bf80c..00000000 --- a/tests/examples/provisionorder.spec.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import * as fs from 'fs'; -import { - actionBuilder, - errorBuilder, - errordefBuilder, - functionBuilder, - functionrefBuilder, - operationstateBuilder, - statedatafilterBuilder, - workflowBuilder, -} from '../../src'; - -describe('provisionorder workflow example', () => { - it('should generate Workflow object', function () { - const workflow = workflowBuilder() - .id('provisionorders') - .version('1.0.0') - .specVersion('0.8') - .name('Provision Orders') - .description('Provision Orders and handle errors thrown') - .start('ProvisionOrder') - .functions([ - functionBuilder() - .name('provisionOrderFunction') - .operation('http://myapis.org/provisioningapi.json#doProvision') - .build(), - ]) - .errors([ - errordefBuilder().name('Missing order id').build(), - errordefBuilder().name('Missing order item').build(), - errordefBuilder().name('Missing order quantity').build(), - ]) - .states([ - operationstateBuilder() - .name('ProvisionOrder') - .actionMode('sequential') - .actions([ - actionBuilder() - .functionRef( - functionrefBuilder() - .refName('provisionOrderFunction') - .arguments({ - order: '${ .order }', - }) - .build() - ) - .build(), - ]) - .stateDataFilter(statedatafilterBuilder().output('${ .exceptions }').build()) - .transition('ApplyOrder') - .onErrors([ - errorBuilder().errorRef('Missing order id').transition('MissingId').build(), - errorBuilder().errorRef('Missing order item').transition('MissingItem').build(), - errorBuilder().errorRef('Missing order quantity').transition('MissingQuantity').build(), - ]) - .build(), - operationstateBuilder() - .name('MissingId') - .actions([actionBuilder().subFlowRef('handleMissingIdExceptionWorkflow').build()]) - .build(), - operationstateBuilder() - .name('MissingItem') - .actions([actionBuilder().subFlowRef('handleMissingItemExceptionWorkflow').build()]) - .build(), - operationstateBuilder() - .name('MissingQuantity') - .actions([actionBuilder().subFlowRef('handleMissingQuantityExceptionWorkflow').build()]) - .build(), - operationstateBuilder() - .name('ApplyOrder') - .actions([actionBuilder().subFlowRef('applyOrderWorkflowId').build()]) - .build(), - ]) - .build(); - - const expected = JSON.parse(fs.readFileSync('./tests/examples/provisionorder.json', 'utf8')); - expect(JSON.stringify(workflow.normalize())).toEqual(JSON.stringify(expected)); - }); -}); diff --git a/tests/examples/sendcloudevent.json b/tests/examples/sendcloudevent.json deleted file mode 100644 index 8ba8023f..00000000 --- a/tests/examples/sendcloudevent.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "id": "sendcloudeventonprovision", - "name": "Send CloudEvent on provision completion", - "version": "1.0.0", - "specVersion": "0.8", - "start": "ProvisionOrdersState", - "states": [ - { - "name": "ProvisionOrdersState", - "type": "foreach", - "inputCollection": "${ .orders }", - "iterationParam": "singleorder", - "outputCollection": "${ .provisionedOrders }", - "actions": [ - { - "functionRef": { - "refName": "provisionOrderFunction", - "arguments": { - "order": "${ .singleorder }" - } - } - } - ], - "end": { - "produceEvents": [ - { - "eventRef": "provisioningCompleteEvent", - "data": "${ .provisionedOrders }" - } - ] - } - } - ], - "functions": [ - { - "name": "provisionOrderFunction", - "operation": "http://myapis.org/provisioning.json#doProvision" - } - ], - "events": [ - { - "kind": "produced", - "name": "provisioningCompleteEvent", - "type": "provisionCompleteType" - } - ] -} \ No newline at end of file diff --git a/tests/examples/sendcloudevent.spec.ts b/tests/examples/sendcloudevent.spec.ts deleted file mode 100644 index 38b323e7..00000000 --- a/tests/examples/sendcloudevent.spec.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import * as fs from 'fs'; -import { - actionBuilder, - endBuilder, - eventdefBuilder, - foreachstateBuilder, - functionBuilder, - functionrefBuilder, - produceeventdefBuilder, - workflowBuilder, -} from '../../src'; - -describe('sendcloudevent workflow example', () => { - it('should generate Workflow object', function () { - const workflow = workflowBuilder() - .id('sendcloudeventonprovision') - .version('1.0.0') - .specVersion('0.8') - .name('Send CloudEvent on provision completion') - .start('ProvisionOrdersState') - .events([ - eventdefBuilder().name('provisioningCompleteEvent').type('provisionCompleteType').kind('produced').build(), - ]) - .functions([ - functionBuilder() - .name('provisionOrderFunction') - .operation('http://myapis.org/provisioning.json#doProvision') - .build(), - ]) - .states([ - foreachstateBuilder() - .name('ProvisionOrdersState') - .inputCollection('${ .orders }') - .iterationParam('singleorder') - .outputCollection('${ .provisionedOrders }') - .actions([ - actionBuilder() - .functionRef( - functionrefBuilder() - .refName('provisionOrderFunction') - .arguments({ - order: '${ .singleorder }', - }) - .build() - ) - .build(), - ]) - .end( - endBuilder() - .produceEvents([ - produceeventdefBuilder().eventRef('provisioningCompleteEvent').data('${ .provisionedOrders }').build(), - ]) - .build() - ) - .build(), - ]) - .build(); - - const expected = JSON.parse(fs.readFileSync('./tests/examples/sendcloudevent.json', 'utf8')); - expect(JSON.stringify(workflow.normalize())).toEqual(JSON.stringify(expected)); - }); -}); diff --git a/tests/examples/solvemathproblems.json b/tests/examples/solvemathproblems.json deleted file mode 100644 index 9a887acc..00000000 --- a/tests/examples/solvemathproblems.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "id": "solvemathproblems", - "name": "Solve Math Problems Workflow", - "version": "1.0.0", - "description": "Solve math problems", - "specVersion": "0.8", - "start": "Solve", - "states": [ - { - "name": "Solve", - "type": "foreach", - "inputCollection": "${ .expressions }", - "iterationParam": "singleexpression", - "outputCollection": "${ .results }", - "actions": [ - { - "functionRef": { - "refName": "solveMathExpressionFunction", - "arguments": { - "expression": "${ .singleexpression }" - } - } - } - ], - "stateDataFilter": { - "output": "${ .results }" - }, - "end": true - } - ], - "functions": [ - { - "name": "solveMathExpressionFunction", - "operation": "http://myapis.org/mapthapis.json#solveExpression" - } - ] -} \ No newline at end of file diff --git a/tests/examples/solvemathproblems.spec.ts b/tests/examples/solvemathproblems.spec.ts deleted file mode 100644 index f3e717af..00000000 --- a/tests/examples/solvemathproblems.spec.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import * as fs from 'fs'; -import { - actionBuilder, - foreachstateBuilder, - functionBuilder, - functionrefBuilder, - statedatafilterBuilder, - workflowBuilder, -} from '../../src'; - -describe('solvemathproblems workflow example', () => { - it('should generate Workflow object', function () { - const workflow = workflowBuilder() - .id('solvemathproblems') - .version('1.0.0') - .specVersion('0.8') - .name('Solve Math Problems Workflow') - .description('Solve math problems') - .start('Solve') - .functions([ - functionBuilder() - .name('solveMathExpressionFunction') - .operation('http://myapis.org/mapthapis.json#solveExpression') - .build(), - ]) - .states([ - foreachstateBuilder() - .name('Solve') - .inputCollection('${ .expressions }') - .iterationParam('singleexpression') - .outputCollection('${ .results }') - .actions([ - actionBuilder() - .functionRef( - functionrefBuilder() - .refName('solveMathExpressionFunction') - .arguments({ - expression: '${ .singleexpression }', - }) - .build() - ) - .build(), - ]) - .stateDataFilter(statedatafilterBuilder().output('${ .results }').build()) - .build(), - ]) - .build(); - - const expected = JSON.parse(fs.readFileSync('./tests/examples/solvemathproblems.json', 'utf8')); - expect(JSON.stringify(workflow.normalize())).toEqual(JSON.stringify(expected)); - }); -}); diff --git a/tests/lib/builders/eventstate-builder.spec.ts b/tests/lib/builders/eventstate-builder.spec.ts deleted file mode 100644 index f6d6bee7..00000000 --- a/tests/lib/builders/eventstate-builder.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -import { eventstateBuilder } from '../../../src/lib/builders/eventstate-builder'; -import { oneventsBuilder } from '../../../src/lib/builders/onevents-builder'; - -describe('eventstateBuilder ', () => { - it('should build an object', () => { - const object = eventstateBuilder() - .name('Book Lending Request') - .onEvents([oneventsBuilder().eventRefs(['Book Lending Request Event']).build()]) - .transition('Get Book Status') - .build(); - - expect(object.exclusive).toBeTruthy(); - - const serializedObject = object.normalize(); - expect(JSON.stringify(serializedObject)).toBe( - JSON.stringify({ - name: 'Book Lending Request', - type: 'event', - onEvents: [ - { - eventRefs: ['Book Lending Request Event'], - }, - ], - transition: 'Get Book Status', - }) - ); - }); -}); diff --git a/tests/lib/builders/function-builder.spec.ts b/tests/lib/builders/function-builder.spec.ts deleted file mode 100644 index ed17e4c7..00000000 --- a/tests/lib/builders/function-builder.spec.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -import { functionBuilder } from '../../../src/lib/builders/function-builder'; - -describe('functionBuilder ', () => { - it('should build an object without default type if not set', () => { - const fn = functionBuilder().name('function').operation('operation').build(); - - expect(fn.type).toBe('rest'); - }); - - it('should build an object with type= set value ', () => { - expect(functionBuilder().name('function').operation('operation').type('expression').build().type).toBe( - 'expression' - ); - expect(functionBuilder().name('function').operation('operation').type('rest').build().type).toBe('rest'); - }); -}); diff --git a/tests/lib/builders/operationstate-builder.spec.ts b/tests/lib/builders/operationstate-builder.spec.ts deleted file mode 100644 index a7900026..00000000 --- a/tests/lib/builders/operationstate-builder.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -import { actionBuilder, operationstateBuilder } from '../../../src'; - -describe('operationstateBuilder ', () => { - it('should build an object with default values', () => { - const object = operationstateBuilder() - .name('StartApplication') - .actions([actionBuilder().subFlowRef('startApplicationWorkflowId').build()]) - .build(); - - expect(object.actionMode).toBe('sequential'); - - const serializedObject = object.normalize(); - expect(JSON.stringify(serializedObject)).toBe( - JSON.stringify({ - name: 'StartApplication', - type: 'operation', - actions: [{ subFlowRef: 'startApplicationWorkflowId' }], - end: true, - }) - ); - }); -}); diff --git a/tests/lib/definitions/action.spec.ts b/tests/lib/definitions/action.spec.ts deleted file mode 100644 index 5c239e80..00000000 --- a/tests/lib/definitions/action.spec.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { Action } from '../../../src/lib/definitions/action'; - -describe('Action ', () => { - it('should convert non-primitive properties to the desired class', () => { - const data = { - functionRef: {}, - eventRef: {}, - actionDataFilter: {}, - }; - - const model = new Action(data); - - expect(model.functionRef!.constructor.name).toBe('Functionref'); - expect(model.eventRef!.constructor.name).toBe('Eventref'); - expect(model.actionDataFilter!.constructor.name).toBe('Actiondatafilter'); - }); -}); diff --git a/tests/lib/definitions/branch.spec.ts b/tests/lib/definitions/branch.spec.ts deleted file mode 100644 index 976113b4..00000000 --- a/tests/lib/definitions/branch.spec.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { Branch } from '../../../src/lib/definitions/branch'; - -describe('Branch ', () => { - it('should convert non-primitive properties to the desired class', () => { - const data = { - actions: [{}], - }; - - const model = new Branch(data); - - expect(model.actions![0].constructor.name).toBe('Action'); - }); -}); diff --git a/tests/lib/definitions/eventdef.spec.ts b/tests/lib/definitions/eventdef.spec.ts deleted file mode 100644 index 7f087315..00000000 --- a/tests/lib/definitions/eventdef.spec.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { Eventdef } from '../../../src/lib/definitions/eventdef'; - -describe('Eventdef ', () => { - it('should convert non-primitive properties to the desired class', () => { - const data = { - correlation: [{ contextAttributeName: 'contextAttributeName' }], - metadata: { key: 'value' }, - }; - - const model = new Eventdef(data); - - expect(model.correlation![0].constructor.name).toBe('CorrelationDef'); - expect(model.metadata!.constructor.name).toBe('Metadata'); - }); -}); diff --git a/tests/lib/definitions/schedule.spec.ts b/tests/lib/definitions/schedule.spec.ts deleted file mode 100644 index 0d3ca438..00000000 --- a/tests/lib/definitions/schedule.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { Schedule } from '../../../src/lib/definitions/schedule'; - -describe('schedule ', () => { - it('should convert non-primitive properties to the desired class', () => { - const data = { - cron: { expression: '* * * ? * *' }, - }; - - const model = new Schedule(data); - expect(model.cron!.constructor.name).toBe('Crondef'); - }); - - it('should not convert primitive properties', () => { - const data = { - cron: '* * * ? * *', - }; - - const model = new Schedule(data); - expect(typeof model.cron).toBe(typeof ''); - }); -}); diff --git a/tests/lib/definitions/util.spec.ts b/tests/lib/definitions/util.spec.ts deleted file mode 100644 index 2ed49dd7..00000000 --- a/tests/lib/definitions/util.spec.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import { overwriteProperties, overwritePropertyAsPlainType } from '../../../src/lib/definitions/utils'; -import { Properties } from '../../../src/lib/definitions/types'; - -describe('Util ', () => { - describe('overwritePropertyAsPlainType ', () => { - it('should create a copy of data property', () => { - class HasData { - data?: { - key: string; - }; - } - - const source = { - data: { - key: 'action', - }, - } as HasData; - - const target = {} as HasData; - Object.assign(target, source); - overwritePropertyAsPlainType('data', target); - - expect(target.data!.key).toBe('action'); - source.data!.key = 'action2'; - expect(target.data!.key).toBe('action'); - }); - - it('should create a copy of data property', () => { - class HasData { - data?: - | string - | { - [key: string]: any; - }; - } - - const source = { - data: { - key1: 'value1', - }, - } as HasData; - - const target = {} as HasData; - Object.assign(target, source); - overwritePropertyAsPlainType('data', target); - - // @ts-ignore - expect(target!.data['key1']).toBe('value1'); - // @ts-ignore - source!.data['key1'] = 'value2'; - // @ts-ignore - expect(target!.data['key1']).toBe('value1'); - }); - }); - - describe('overwriteProperties ', () => { - class HasProperties { - properties: string | Properties; - } - - it('should create an instance of Basicpropsdef', () => { - const source = { - properties: { - username: 'name', - password: 'pwd', - }, - } as HasProperties; - - const target = Object.assign({}, source); - overwriteProperties(target); - expect(target.properties.constructor.name).toBe('Basicpropsdef'); - }); - - it('should create an instance of Bearerpropsdef', () => { - const source = { - properties: { - token: 'token', - }, - } as HasProperties; - - const target = Object.assign({}, source); - overwriteProperties(target); - expect(target.properties.constructor.name).toBe('Bearerpropsdef'); - }); - - it('should create an instance of Oauth2propsdef', () => { - const source = { - properties: { - grantType: 'password', - clientId: 'cid', - }, - } as HasProperties; - - const target = Object.assign({}, source); - overwriteProperties(target); - expect(target.properties.constructor.name).toBe('Oauth2propsdef'); - }); - - it('should not create an instance of Properties type', () => { - const source = { - properties: 'any value', - } as HasProperties; - - const target = Object.assign({}, source); - overwriteProperties(target); - expect(target.properties.constructor.name).toBe('String'); - }); - }); -}); diff --git a/tests/lib/definitions/workflow-converter-hello-world.json b/tests/lib/definitions/workflow-converter-hello-world.json deleted file mode 100644 index d68b1ee3..00000000 --- a/tests/lib/definitions/workflow-converter-hello-world.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "id": "helloworld", - "version": "1.0", - "specVersion": "0.8", - "name": "Hello World Workflow", - "description": "Inject Hello World", - "start": "Hello State", - "states": [ - { - "type": "inject", - "name": "Hello State", - "data": { - "result": "Hello World!" - }, - "end": true - } - ] -} diff --git a/tests/lib/definitions/workflow-converter-hello-world.xxx b/tests/lib/definitions/workflow-converter-hello-world.xxx deleted file mode 100644 index b9aadde5..00000000 --- a/tests/lib/definitions/workflow-converter-hello-world.xxx +++ /dev/null @@ -1 +0,0 @@ -{ invalid? \ No newline at end of file diff --git a/tests/lib/definitions/workflow-converter-hello-world.yaml b/tests/lib/definitions/workflow-converter-hello-world.yaml deleted file mode 100644 index e6060038..00000000 --- a/tests/lib/definitions/workflow-converter-hello-world.yaml +++ /dev/null @@ -1,12 +0,0 @@ -id: helloworld -version: '1.0' -specVersion": '0.8' -name: Hello World Workflow -description: Inject Hello World -start: Hello State -states: - - type: inject - name: Hello State - data: - result: Hello World! - end: true diff --git a/tests/lib/definitions/workflow-converter-hello-world.yml b/tests/lib/definitions/workflow-converter-hello-world.yml deleted file mode 100644 index e6060038..00000000 --- a/tests/lib/definitions/workflow-converter-hello-world.yml +++ /dev/null @@ -1,12 +0,0 @@ -id: helloworld -version: '1.0' -specVersion": '0.8' -name: Hello World Workflow -description: Inject Hello World -start: Hello State -states: - - type: inject - name: Hello State - data: - result: Hello World! - end: true diff --git a/tests/lib/definitions/workflow.spec.ts b/tests/lib/definitions/workflow.spec.ts deleted file mode 100644 index 0ce6f755..00000000 --- a/tests/lib/definitions/workflow.spec.ts +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -import { injectstateBuilder, Specification, workflowBuilder } from '../../../src'; -import { readFileSync } from 'fs'; -import { Workflow } from '../../../src/lib/definitions/workflow'; - -describe('workflow fromSource', () => { - const testCases = [ - { - description: 'should generate workflow object from JSON file', - file: './tests/lib/definitions/workflow-converter-hello-world.json', - }, - { - description: 'should generate workflow object from YAML file', - file: './tests/lib/definitions/workflow-converter-hello-world.yaml', - }, - { - description: 'should generate workflow object from YML file', - file: './tests/lib/definitions/workflow-converter-hello-world.yml', - }, - ]; - testCases.forEach((test) => { - it(test.description, function () { - const workflow: Specification.Workflow = Workflow.fromSource(readFileSync(test.file, 'utf-8')); - expect(workflow.id).toBe('helloworld'); - expect(workflow.version).toBe('1.0'); - expect(workflow.name).toBe('Hello World Workflow'); - expect(workflow.description).toBe('Inject Hello World'); - expect(workflow.start).toBe('Hello State'); - }); - }); - - it('should throws error if format is not json or yaml', () => { - expect(() => { - Workflow.fromSource(readFileSync('./tests/lib/definitions/workflow-converter-hello-world.xxx', 'utf-8')); - }).toThrow(new Error('Format not supported')); - }); -}); - -describe('workflow ', () => { - it('should convert non-primitive properties to the desired class', () => { - const data = { - functions: [ - { - name: 'Function', - operation: 'operationFunction', - }, - ], - events: [ - { - name: 'CarBidEvent', - type: 'carBidMadeType', - source: 'carBidEventSource', - }, - ], - retries: [ - { - name: 'retrie', - maxAttempts: 4, - }, - ], - timeouts: { - duration: 'P30M5S', - }, - metadata: { - key: 'value', - }, - }; - - const model = new Workflow(data); - - expect(model.functions![0]!.constructor.name).toBe('Function'); - expect(model.timeouts!.constructor.name).toBe('Timeouts'); - expect(model.metadata!.constructor.name).toBe('Metadata'); - expect(model.events![0]!.constructor.name).toBe('Eventdef'); - expect(model.retries![0]!.constructor.name).toBe('Retrydef'); - }); - - it('should generate JSON from workflow object', () => { - const jsonWorkflow: string = Workflow.toJson( - workflowBuilder() - .id('helloworld') - .version('1.0.0') - .specVersion('0.8') - .name('Hello World Workflow') - .description('Inject Hello World') - .start('Hello State') - .states([ - injectstateBuilder() - .name('Hello State') - .data({ - result: 'Hello World!', - }) - .end(true) - .build(), - ]) - .build() - ); - expect(jsonWorkflow).toBe( - '{' + - '"id":"helloworld",' + - '"name":"Hello World Workflow",' + - '"version":"1.0.0",' + - '"description":"Inject Hello World",' + - '"specVersion":"0.8",' + - '"start":"Hello State",' + - '"states":[' + - '{' + - '"name":"Hello State",' + - '"type":"inject",' + - '"data":{' + - '"result":"Hello World!"' + - '},' + - '"end":true' + - '}' + - ']' + - '}' - ); - }); - - it('should generate YAML from workflow object', () => { - const yamlWorkflow: string = Workflow.toYaml( - workflowBuilder() - .id('helloworld') - .version('1.0.0') - .specVersion('0.8') - .name('Hello World Workflow') - .description('Inject Hello World') - .start('Hello State') - .states([ - injectstateBuilder() - .name('Hello State') - .data({ - result: 'Hello World!', - }) - .end(true) - .build(), - ]) - .build() - ); - expect(yamlWorkflow).toBe( - 'id: helloworld\n' + - 'name: Hello World Workflow\n' + - 'version: 1.0.0\n' + - 'description: Inject Hello World\n' + - "specVersion: '0.8'\n" + - 'start: Hello State\n' + - 'states:\n' + - ' - name: Hello State\n' + - ' type: inject\n' + - ' data:\n' + - ' result: Hello World!\n' + - ' end: true\n' - ); - }); -}); diff --git a/tests/lib/diagram/mermaidDiagram.spec.ts b/tests/lib/diagram/mermaidDiagram.spec.ts deleted file mode 100644 index 5d88f0be..00000000 --- a/tests/lib/diagram/mermaidDiagram.spec.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { MermaidDiagram } from '../../../src/lib/diagram/mermaidDiagram'; -import { Specification } from '../../../src/lib/definitions'; -import fs from 'fs'; - -describe('MermaidDiagram', () => { - it('should create mermaid diagram source code', () => { - const jsonSource = fs.readFileSync('./tests/examples/jobmonitoring.json', 'utf8'); - const actual = new MermaidDiagram(Specification.Workflow.fromSource(jsonSource)).sourceCode(); - expect(actual).toBe(`stateDiagram-v2 -SubmitJob : Submit Job -SubmitJob : type = Operation State -SubmitJob : Action mode = sequential -SubmitJob : Num. of actions = 1 -[*] --> SubmitJob -SubmitJob --> WaitForCompletion - -WaitForCompletion : Wait For Completion -WaitForCompletion : type = Sleep State -WaitForCompletion : Duration = PT5S -WaitForCompletion --> GetJobStatus - -GetJobStatus : Get Job Status -GetJobStatus : type = Operation State -GetJobStatus : Action mode = sequential -GetJobStatus : Num. of actions = 1 -GetJobStatus --> DetermineCompletion - -DetermineCompletion : Determine Completion -DetermineCompletion : type = Switch State -DetermineCompletion : Condition type = data-based -DetermineCompletion --> JobSucceeded : \${ .jobStatus == "SUCCEEDED" } -DetermineCompletion --> JobFailed : \${ .jobStatus == "FAILED" } -DetermineCompletion --> WaitForCompletion : default - -JobSucceeded : Job Succeeded -JobSucceeded : type = Operation State -JobSucceeded : Action mode = sequential -JobSucceeded : Num. of actions = 1 -JobSucceeded --> [*] - -JobFailed : Job Failed -JobFailed : type = Operation State -JobFailed : Action mode = sequential -JobFailed : Num. of actions = 1 -JobFailed --> [*]`); - }); - - it(`should handle compensated by`, () => { - const jsonSource = fs.readFileSync('./tests/lib/diagram/wf_with_compensation.json', 'utf8'); - const actual = new MermaidDiagram(Specification.Workflow.fromSource(jsonSource)).sourceCode(); - - expect(actual).toBe(`stateDiagram-v2 -ItemPurchase : Item Purchase -ItemPurchase : type = Event State -[*] --> ItemPurchase -ItemPurchase --> CancelPurchase : compensated by -ItemPurchase --> [*] - -CancelPurchase : Cancel Purchase -CancelPurchase : type = Operation State -CancelPurchase : usedForCompensation -CancelPurchase : Action mode = sequential -CancelPurchase : Num. of actions = 1 -CancelPurchase --> SendConfirmationPurchaseCancelled - -SendConfirmationPurchaseCancelled : Send Confirmation Purchase Cancelled -SendConfirmationPurchaseCancelled : type = Operation State -SendConfirmationPurchaseCancelled : Action mode = sequential -SendConfirmationPurchaseCancelled : Num. of actions = 1`); - }); -}); diff --git a/tests/lib/diagram/mermaidState.spec.ts b/tests/lib/diagram/mermaidState.spec.ts deleted file mode 100644 index b563b256..00000000 --- a/tests/lib/diagram/mermaidState.spec.ts +++ /dev/null @@ -1,352 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { MermaidState } from '../../../src/lib/diagram/mermaidState'; -import { Specification } from '../../../src/lib/definitions'; - -describe('mermaidState', () => { - it('should create source code for parallel state', () => { - expect( - new MermaidState( - new Specification.Parallelstate( - JSON.parse(` - { - "type": "parallel", - "name": "ParallelExec", - "branches": [ - { - "name": "ShortDelayBranch", - "actions": [{ - "subFlowRef": "shortdelayworkflowid" - }] - }, - { - "name": "LongDelayBranch", - "actions": [{ - "subFlowRef": "longdelayworkflowid" - }] - } - ], - "end": true - }`) - ) - ).sourceCode() - ).toBe(`ParallelExec : Parallel Exec -ParallelExec : type = Parallel State -ParallelExec : Completion type = allOf -ParallelExec : Num. of branches = 2 -ParallelExec --> [*]`); - }); - - it('should create source code for event-based state', () => { - const eventbasedswitch = new Specification.Eventbasedswitchstate( - JSON.parse(`{ - "name": "CheckVisaStatus", - "type": "switch", - "eventConditions": [ - { - "eventRef": "visaApprovedEvent", - "transition": "HandleApprovedVisa" - }, - { - "eventRef": "visaRejectedEvent", - "transition": "HandleRejectedVisa" - } - ], - "eventTimeout": "PT1H", - "defaultCondition": { - "transition": "HandleNoVisaDecision" - } - }`) - ); - const mermaidState = new MermaidState(eventbasedswitch); - expect(mermaidState.sourceCode()).toBe(`CheckVisaStatus : Check Visa Status -CheckVisaStatus : type = Switch State -CheckVisaStatus : Condition type = event-based -CheckVisaStatus --> HandleApprovedVisa : visaApprovedEvent -CheckVisaStatus --> HandleRejectedVisa : visaRejectedEvent -CheckVisaStatus --> HandleNoVisaDecision : default`); - }); - - it('should create source code for data-based state', () => { - const databasedswitch = new Specification.Databasedswitchstate( - JSON.parse(`{ - "type":"switch", - "name":"CheckApplication", - "dataConditions": [ - { - "condition": "\${ .applicants | .age >= 18 }", - "transition": "StartApplication" - }, - { - "condition": "\${ .applicants | .age < 18 }", - "transition": "RejectApplication" - } - ], - "defaultCondition": { - "transition": "RejectApplication" - } - }`) - ); - const mermaidState = new MermaidState(databasedswitch); - expect(mermaidState.sourceCode()).toBe(`CheckApplication : Check Application -CheckApplication : type = Switch State -CheckApplication : Condition type = data-based -CheckApplication --> StartApplication : \${ .applicants | .age >= 18 } -CheckApplication --> RejectApplication : \${ .applicants | .age < 18 } -CheckApplication --> RejectApplication : default`); - }); - - it('should create source code for data-based state with end = true ', () => { - const databasedswitch = new Specification.Databasedswitchstate( - JSON.parse(`{ - "type":"switch", - "name":"CheckApplication", - "dataConditions": [ - { - "condition": "\${ .applicants | .age >= 18 }", - "transition": "StartApplication" - }, - { - "condition": "\${ .applicants | .age < 18 }", - "end": true - } - ], - "defaultCondition": { - "transition": "StartApplication" - } - }`) - ); - const mermaidState = new MermaidState(databasedswitch); - expect(mermaidState.sourceCode()).toBe(`CheckApplication : Check Application -CheckApplication : type = Switch State -CheckApplication : Condition type = data-based -CheckApplication --> StartApplication : \${ .applicants | .age >= 18 } -CheckApplication --> [*] : \${ .applicants | .age < 18 } -CheckApplication --> StartApplication : default`); - }); - - it('should create source code for operation state with end.terminate = true ', () => { - const databasedswitch = new Specification.Databasedswitchstate( - JSON.parse(`{ - "name": "GreetPerson", - "type": "operation", - "actions": [ - { - "name": "greetAction", - "functionRef": { - "refName": "greetFunction", - "arguments": { - "message": "$.greeting $.name" - } - } - } - ], - "end": { - "terminate": true - } - }`) - ); - const mermaidState = new MermaidState(databasedswitch); - expect(mermaidState.sourceCode()).toBe(`GreetPerson : Greet Person -GreetPerson : type = Operation State -GreetPerson : Num. of actions = 1 -GreetPerson --> [*]`); - }); - - it('should create source code for operation state', () => { - const states = new Specification.Operationstate( - JSON.parse(`{ - "type":"operation", - "name":"SubmitJob", - "actions":[ - { - "functionRef": { - "refName": "submitJob", - "arguments": { - "name": "\${ .job.name }" - } - }, - "actionDataFilter": { - "results": "\${ .jobuid }" - } - } - ], - "stateDataFilter": { - "output": "\${ .jobuid }" - }, - "transition": "WaitForCompletion" - }`) - ); - const mermaidState = new MermaidState(states); - expect(mermaidState.sourceCode()).toBe(`SubmitJob : Submit Job -SubmitJob : type = Operation State -SubmitJob : Action mode = sequential -SubmitJob : Num. of actions = 1 -SubmitJob --> WaitForCompletion`); - }); - - it('should create source code for sleep state', () => { - const states = new Specification.Sleepstate( - JSON.parse(`{ - "type": "sleep", - "name": "WaitForCompletion", - "duration": "PT5S", - "transition": "GetJobStatus" - }`) - ); - const mermaidState = new MermaidState(states); - expect(mermaidState.sourceCode()).toBe(`WaitForCompletion : Wait For Completion -WaitForCompletion : type = Sleep State -WaitForCompletion : Duration = PT5S -WaitForCompletion --> GetJobStatus`); - }); - - it('should create source code for foreach state', () => { - const states = new Specification.Foreachstate( - JSON.parse(`{ - "type": "foreach", - "name": "ProvisionOrdersState", - "inputCollection": "\${ .orders }", - "iterationParam": "singleorder", - "outputCollection": "\${ .provisionedOrders }", - "actions": [ - { - "functionRef": { - "refName": "provisionOrderFunction", - "arguments": { - "order": "\${ .singleorder }" - } - } - } - ], - "end": { - "produceEvents": [{ - "eventRef": "provisioningCompleteEvent", - "data": "\${ .provisionedOrders }" - }] - } - }`) - ); - const mermaidState = new MermaidState(states, true); - expect(mermaidState.sourceCode()).toBe(`ProvisionOrdersState : Provision Orders State -ProvisionOrdersState : type = Foreach State -ProvisionOrdersState : Input collection = \${ .orders } -ProvisionOrdersState : Num. of actions = 1 -[*] --> ProvisionOrdersState -ProvisionOrdersState --> [*] : Produced event = [provisioningCompleteEvent]`); - }); - - it('should create source code for callback state', () => { - const states = new Specification.Callbackstate( - JSON.parse(`{ - "name": "CheckCredit", - "type": "callback", - "action": { - "functionRef": { - "refName": "callCreditCheckMicroservice", - "arguments": { - "customer": "\${ .customer }" - } - } - }, - "eventRef": "CreditCheckCompletedEvent", - "timeouts": { - "stateExecTimeout": "PT15M" - }, - "transition": "EvaluateDecision" - }`) - ); - const mermaidState = new MermaidState(states, true); - expect(mermaidState.sourceCode()).toBe(`CheckCredit : Check Credit -CheckCredit : type = Callback State -CheckCredit : Callback function = callCreditCheckMicroservice -CheckCredit : Callback event = CreditCheckCompletedEvent -[*] --> CheckCredit -CheckCredit --> EvaluateDecision`); - }); - - it('should create source code for any state with transition as object', () => { - const states = new Specification.Callbackstate( - JSON.parse(`{ - "name": "CheckCredit", - "type": "callback", - "transition": {"nextState": "EvaluateDecision"} - }`) - ); - const mermaidState = new MermaidState(states); - expect(mermaidState.sourceCode()).toBe(`CheckCredit : Check Credit -CheckCredit : type = Callback State -CheckCredit --> EvaluateDecision`); - }); - - it(`should remove white spaces when creating the state key`, () => { - const databasedswitch = new Specification.Databasedswitchstate( - JSON.parse(`{ - "type":"switch", - "name":"Check Application", - "dataConditions": [ - { - "condition": "\${ .applicants | .age >= 18 }", - "transition": "Start Application" - }, - { - "condition": "\${ .applicants | .age < 18 }", - "end": true - } - ], - "defaultCondition": { - "transition": "Start Application" - } - }`) - ); - const mermaidState = new MermaidState(databasedswitch); - expect(mermaidState.sourceCode()).toBe(`CheckApplication : Check Application -CheckApplication : type = Switch State -CheckApplication : Condition type = data-based -CheckApplication --> StartApplication : \${ .applicants | .age >= 18 } -CheckApplication --> [*] : \${ .applicants | .age < 18 } -CheckApplication --> StartApplication : default`); - }); - - it(`should remove dashes when creating the state key`, () => { - const databasedswitch = new Specification.Databasedswitchstate( - JSON.parse(`{ - "type":"switch", - "name":"check-application", - "dataConditions": [ - { - "condition": "\${ .applicants | .age >= 18 }", - "transition": "start-application" - }, - { - "condition": "\${ .applicants | .age < 18 }", - "end": true - } - ], - "defaultCondition": { - "transition": "start-application" - } - }`) - ); - const mermaidState = new MermaidState(databasedswitch); - expect(mermaidState.sourceCode()).toBe(`CheckApplication : Check Application -CheckApplication : type = Switch State -CheckApplication : Condition type = data-based -CheckApplication --> StartApplication : \${ .applicants | .age >= 18 } -CheckApplication --> [*] : \${ .applicants | .age < 18 } -CheckApplication --> StartApplication : default`); - }); -}); diff --git a/tests/lib/diagram/wf_with_compensation.json b/tests/lib/diagram/wf_with_compensation.json deleted file mode 100644 index 627fcf4b..00000000 --- a/tests/lib/diagram/wf_with_compensation.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "id": "newItemPurchaseWorkflow", - "version": "1.0", - "specVersion": "0.8", - "name": "New Item Purchase Workflow", - "states": [ - { - "name": "Item Purchase", - "type": "event", - "onEvents": [ - { - "eventRefs": [ - "New Purchase Event" - ], - "actions": [ - { - "functionRef": { - "refName": "Invoke Debit Customer Function", - "arguments": { - "customerid": "${ .purchase.customerid }", - "amount": "${ .purchase.amount }" - } - } - } - ] - } - ], - "compensatedBy": "Cancel Purchase", - "end": true, - "onErrors": [ - { - "errorRef": "Debit Error", - "end": { - "compensate": true - } - } - ] - }, - { - "name": "Cancel Purchase", - "type": "operation", - "usedForCompensation": true, - "actions": [ - { - "functionRef": { - "refName": "Invoke Credit Customer Function", - "arguments": { - "customerid": "${ .purchase.customerid }", - "amount": "${ .purchase.amount }" - } - } - } - ], - "transition": "Send confirmation purchase cancelled" - }, - { - "name": "Send confirmation purchase cancelled", - "type": "operation", - "actions": [ - { - "functionRef": { - "refName": "Send email", - "arguments": { - "customerid": "${ .purchase.customerid }", - } - } - } - ] - } - ], - "functions": "http://myservicedefs.io/graphqldef.json", - "events": "http://myeventdefs.io/eventdefs.json", - "errors": "file://mydefs/errordefs.json" -} \ No newline at end of file diff --git a/tests/lib/utils.spec.ts b/tests/lib/utils.spec.ts deleted file mode 100644 index a4ba8215..00000000 --- a/tests/lib/utils.spec.ts +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { validate } from '../../src/lib/utils'; - -describe('validate', () => { - it('should throw an error containing the provided data', () => { - expect(() => validate('End', 'any text')).toThrowError(/any text/); - }); - - it('should return true for valid objects', () => { - expect(validate('End', false)); - }); - - it('should ignore "normalize" function as additionalProperty', () => { - const functionObj = { - name: 'function', - operation: 'operation', - type: 'rest', - normalize: () => { - //do something - }, - }; - - expect(validate('Function', functionObj)).toBeTruthy(); - }); - - it('should NOT ignore additionalProperties', () => { - const functionObj = { - name: 'function', - operation: 'operation', - type: 'rest', - keyAdditionalProperty: 'anyValue', - }; - - expect(() => validate('Function', functionObj)).toThrowError(/keyAdditionalProperty/); - }); - - it('should throws an error if validator not found', () => { - expect(() => validate('ValidatorNotDefined', {})).toThrowError(); - }); -}); diff --git a/tests/lib/workflow-validator.spec.ts b/tests/lib/workflow-validator.spec.ts deleted file mode 100644 index 9e9c8682..00000000 --- a/tests/lib/workflow-validator.spec.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -import { ValidationError, WorkflowValidator } from '../../src'; -import { Workflow } from '../../src/lib/definitions/workflow'; -import * as fs from 'fs'; - -describe('workflow-validator, invalid state', () => { - const validWorkflow = { - id: 'helloworld', - version: '1.0.0', - specVersion: '0.8', - name: 'Hello World Workflow', - description: 'Inject Hello World', - start: 'Hello State', - states: [ - { - name: 'Hello State', - type: 'inject', - data: { - result: 'Hello World!', - }, - end: true, - }, - ], - }; - - it('should return errors instance of ValidationError if the workflow provided is not valid', () => { - const workflowWithEmptyStates = Workflow.fromSource(JSON.stringify(validWorkflow)); - - // @ts-ignore - workflowWithEmptyStates.states = []; - - const workflowValidator = new WorkflowValidator(workflowWithEmptyStates); - - const numErrors = 1; - expectInvalidWorkflow(workflowValidator, numErrors); - expect(workflowValidator.errors[0].message).toMatch('states'); - }); - - it('should check if specVersion match the supported sdk version', () => { - const workflowWithInvalidSpecVersion = Workflow.fromSource(JSON.stringify(validWorkflow)); - workflowWithInvalidSpecVersion.specVersion = '0.1'; - - const workflowValidator = new WorkflowValidator(workflowWithInvalidSpecVersion); - - const numErrors = 1; - expectInvalidWorkflow(workflowValidator, numErrors); - - expect(workflowValidator.errors[0].message).toMatch('specVersion'); - }); - - function expectInvalidWorkflow(workflowValidator: WorkflowValidator, numErrors: number) { - expect(workflowValidator.isValid); - expect(workflowValidator.errors.length).toBe(numErrors); - workflowValidator.errors.forEach((error) => { - expect(error.constructor === ValidationError); - }); - } -}); - -describe('workflow-validator, valid state', () => { - it('should have no errors', () => { - const testFolder = './tests/examples/'; - - const jsonFiles = fs.readdirSync(testFolder).filter((f) => f.endsWith('.json')); - - expect(jsonFiles.length).toBe(9); - - jsonFiles.forEach((f) => { - const file = testFolder + f; - const workflow = Workflow.fromSource(fs.readFileSync(file, 'utf8')); - const workflowValidator = new WorkflowValidator(workflow); - expect(workflowValidator.errors.length).toBe(0); - }); - }); -}); diff --git a/tools/download-schemas-github.ts b/tools/download-schemas-github.ts deleted file mode 100644 index 86cc5972..00000000 --- a/tools/download-schemas-github.ts +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * - * ARCHIVE: this file is not used atm - * - */ - -import fetch from 'node-fetch'; -import * as path from 'path'; -import { promises as fsPromises } from 'fs'; -import rimraf from 'rimraf'; -import yargs from 'yargs'; -import { version } from '../package.json'; -import { readMeDisclaimer } from './consts'; - -const { writeFile, mkdir } = fsPromises; -const rimrafP = async (f: string): Promise => - new Promise((resolve, reject) => - rimraf(f, (err) => { - if (err) return reject(err); - resolve(); - }) - ); - -/** - * Represents the links of a GitHub content item - */ -interface GithubContentItemLinks { - self: string; - git: string; - html: string; -} - -/** - * Represents the type of a GitHub content item - */ -enum GithubContentItemType { - File = 'file', - Dir = 'dir', -} - -/** - * Represents a GitHub content item - */ -interface GithubContentItem { - name: string; - path: string; - sha: string; - size: number; - url: string; - html_url: string; - git_url: string; - download_url: string; - type: GithubContentItemType; - _links: GithubContentItemLinks; -} - -/** Resets the destination directory */ -const reset = async (destDir: string) => - rimrafP(destDir) - .then(() => mkdir(destDir, { recursive: true })) - .then(() => writeFile(path.resolve(destDir, 'README.md'), readMeDisclaimer)); - -/** - * A promise that list the schemas in the registry - * @param {string} url The registry entry point - * @returns {GithubContentItem[]} The list of items - */ -const listFiles = async (url: string): Promise => - fetch(url) - .then((res: any) => { - if (res.status !== 200) throw `Cannot fetch ${url}`; - return res.json(); - }) - .then((items: GithubContentItem[]) => { - const queue = items.map((i) => { - if (i.type === GithubContentItemType.Dir) return listFiles(i.url); - return Promise.resolve([i]); - }); - return Promise.all(queue); - }) - .then((items: GithubContentItem[][]) => items.reduce((acc, i) => [...acc, ...i])); -/** - * A promise that maps the item paths and their urls - * @param {GithubContentItem[]} items The list of items - * @returns {Map} The path/url map - */ -const mapFilePaths = async (items: GithubContentItem[]): Promise> => { - const filesMap = new Map(); - items.forEach((i) => { - filesMap.set(i.path, i.download_url); - }); - return Promise.resolve(filesMap); -}; -/** - * A promise to download the file at the provided url to the provided dest - * @param {string} url The URL to get the file from - * @param {string} dest The destination path - * @returns {void} - */ -const downloadFile = async (url: string, dest: string): Promise => - mkdir(path.resolve(process.cwd(), 'src/lib', dest.split('/').slice(0, -1).join('/')), { recursive: true }) - .then(() => fetch(url)) - .then((res: any) => res.arrayBuffer()) - .then((data) => writeFile(path.resolve(process.cwd(), 'src/lib', dest), Buffer.from(data))); -/** - * A promise to download the provided files - * @param {Map} filesMap The path/url map to download to/from - * @returns {void} - */ -const downloadFiles = async (filesMap: Map): Promise => - Promise.all(Array.from(filesMap).map(([dest, url]) => downloadFile(url, dest))); - -const argv = yargs(process.argv.slice(2)).argv; -const ref = `${version.split('.').slice(0, -1).join('.')}.x`; -/** The schema registry base url, either provided in args or based on the package version */ -const registryUrl: string = - (argv.registry as string) || - `https://api.github.com/repos/serverlessworkflow/specification/contents/schema?ref=${ref}`; -console.log(`Using registry '${registryUrl}'`); -/** List, map, download */ -reset(path.resolve(process.cwd(), 'src/lib/schema')) - .then(() => listFiles(registryUrl)) - .then(mapFilePaths) - .then(downloadFiles) - .then(console.log.bind(console)) - .catch(console.error.bind(console)); diff --git a/tools/generate-builders.ts b/tools/generate-builders.ts index f9ae0fa0..d9d96b82 100644 --- a/tools/generate-builders.ts +++ b/tools/generate-builders.ts @@ -196,5 +196,5 @@ const generate = async (source: string, destDir: string): Promise => { }; const buildersDir = path.resolve(process.cwd(), 'src/lib/builders'); -const definitionSrc = path.resolve(process.cwd(), 'src/lib/schema/types/workflow.ts'); +const definitionSrc = path.resolve(process.cwd(), 'src/lib/definitions/workflow.ts'); generate(definitionSrc, buildersDir).then(console.log.bind(console)).catch(console.error.bind(console)); diff --git a/tools/generate-definitions.ts b/tools/generate-definitions.ts index e58bdfbf..ed91d92f 100644 --- a/tools/generate-definitions.ts +++ b/tools/generate-definitions.ts @@ -14,14 +14,14 @@ * limitations under the License. */ -import $RefParser from '@apidevtools/json-schema-ref-parser'; -import dtsGenerator, { JsonSchema as dtsGeneratorJsonSchema, parseSchema } from 'dtsgenerator'; +import { compile, JSONSchema, Options } from 'json-schema-to-typescript'; import { promises as fsPromises } from 'fs'; import * as path from 'path'; +import { Project, QuoteKind } from 'ts-morph'; import { fileHeader } from './consts'; -import { capitalizeFirstLetter, mergeDefinitions, mergeSchemas, reset } from './utils'; +import { reset } from './utils'; -const { writeFile } = fsPromises; +const { writeFile, readFile } = fsPromises; /** * Creates the type->path map for the ajv validators @@ -29,90 +29,71 @@ const { writeFile } = fsPromises; * @param {Map} known$Refs The know references map * @returns {void} */ -const createValidatorsPaths = async (dest: string, known$Refs: Map, baseUrl: string): Promise => { - try { - const validatorsPathsCode = - fileHeader + - `/** -* A map of type names and their corresponding schema -*/ -export const validatorsPaths: [string, string][] = [ - ['Workflow', '${baseUrl}/workflow.json'], -${Array.from(known$Refs) - .map( - ([dataType, path]) => - ` ['${capitalizeFirstLetter(dataType)}', '${baseUrl}/${ - path.includes('.json') ? path : 'workflow.json' + path - }'],` - ) - .join('\r\n')} -]`; - const destDir = path.dirname(dest); - await reset(destDir); - await writeFile(dest, validatorsPathsCode); - } catch (ex) { - return Promise.reject(ex); - } -}; +// const createValidatorsPaths = async (dest: string, known$Refs: Map, baseUrl: string): Promise => { +// //todo +// }; /** - * Generates TypeScript equivalent of the provided JSON Schema - * @param {string} source The input JSON Schema path - * @param {string} dest The output TypeScript path - * @param {string[]} additionnalSchemas Optional schemas to gather and merge definitions from + * Removes duplicate declarations from the provided TypeScript code + * see https://github.com/bcherny/json-schema-to-typescript/issues/193 + * @param tsSource The TypeScript source code to remove the duplicates from + * @returns The source code without duplicates */ -const generate = async (source: string, dest: string, additionnalSchemas: string[] = []): Promise => { - try { - const $refParser = new $RefParser(); - const known$Refs = new Map(); - await $refParser.resolve(source); - const paths = [...$refParser.$refs.paths(), ...additionnalSchemas].filter( - (p, index, arr) => arr.indexOf(p) === index && p !== source - ); - await mergeDefinitions($refParser, paths, known$Refs); - mergeSchemas($refParser, known$Refs, $refParser.schema, '#/'); - let generatedTS = ( - await dtsGenerator({ - contents: [parseSchema($refParser.schema as dtsGeneratorJsonSchema)], - config: { - plugins: { - '@dtsgenerator/replace-namespace': { - map: [ - { - from: [true, true, true, true, true], - to: ['ServerlessWorkflow'], - }, - ], - }, - }, - }, - }) - ) - .replace(/WorkflowJson\.Definitions\./g, '') - .replace(/WorkflowJson/g, 'Workflow'); - const lines = generatedTS.split('\n'); - generatedTS = lines.slice(1, lines.length - 2).join('\n'); // removes 'declare namespace' and keeps 'exports'. - const destDir = path.dirname(dest); - await reset(destDir); - await writeFile(dest, fileHeader + generatedTS); - await writeFile(path.resolve(destDir, 'index.ts'), fileHeader + "export * as Specification from './workflow';"); - const validatorsDest = path.resolve(path.dirname(dest), '../../validation/validators-paths.ts'); - const $id = $refParser.schema.$id; - const baseUrl = path.dirname($id); - await createValidatorsPaths(validatorsDest, known$Refs, baseUrl); - return Promise.resolve(); - } catch (ex) { - return Promise.reject(ex); +function removeDuplicateDeclarations(tsSource: string): string { + const project = new Project({ + useInMemoryFileSystem: true, + manipulationSettings: { + quoteKind: QuoteKind.Single, + }, + }); + const sourceFile = project.createSourceFile('declarations.ts', tsSource); + const duplicates = Array.from(sourceFile.getExportedDeclarations()) + .map(([name, _]) => name) + .filter((name) => name.match(/\d$/)); + const newSource = duplicates.reduce( + (src, name) => src.replace(new RegExp(': ' + name, 'g'), ': ' + name.replace(/\d+$/g, '')), + tsSource, + ); + sourceFile.replaceWithText(newSource); + for (const name of duplicates) { + const declaration = sourceFile.getTypeAlias(name) || sourceFile.getInterface(name); + declaration?.remove(); } -}; + sourceFile.formatText(); + return sourceFile.getFullText(); +} + +/** + * Generates a TypeScript file containing type declarations that represent the structure defined in the JSON Schema + * @param srcFile The path to the JSON Schema file + * @param destFile The destination path where the generated TypeScript file will be saved + * @returns A promise that resolves when the TypeScript file has been successfully written + */ +async function generate(srcFile: string, destFile: string): Promise { + const options: Partial = { + customName: (schema: JSONSchema, keyNameFromDefinition: string | undefined) => + schema.$id?.includes('serverlessworkflow.io') ? 'Workflow' : keyNameFromDefinition, + bannerComment: `${fileHeader} + + /***************************************************************************************** + * + * /!\\ This file is computer generated. Any manual modification can and will be lost. /!\\ + * + *****************************************************************************************/ + + `, + unreachableDefinitions: true, + }; + const schemaText = await readFile(srcFile, { encoding: 'utf-8' }); + const schema = JSON.parse(schemaText); + const declarations = await compile(schema, 'Workflow', options); // no idea what "name" is used for... + const destDir = path.dirname(destFile); + await reset(destDir); + await writeFile(destFile, removeDuplicateDeclarations(declarations)); + await writeFile(path.resolve(destDir, 'index.ts'), fileHeader + "export * as Specification from './specification';"); +} const srcFile = path.resolve(process.cwd(), 'src/lib/schema/workflow.json'); -const destFile = 'src/lib/schema/types/workflow.ts'; -/* -const additionnalSchemas = [ - path.resolve(process.cwd(), 'src/lib/schema/common.json'), // should be resolved already, no need to add it manually - path.resolve(process.cwd(), 'src/lib/schema/extensions/kpi.json'), // not linked by workflow, manually added -]; -generate(srcFile, destFile, additionnalSchemas) -*/ +const destFile = path.resolve(process.cwd(), 'src/lib/definitions/specification.ts'); + generate(srcFile, destFile).then(console.log.bind(console)).catch(console.error.bind(console)); diff --git a/tools/generate-merged_json.ts b/tools/generate-merged_json.ts deleted file mode 100644 index 84881d83..00000000 --- a/tools/generate-merged_json.ts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import $RefParser from '@apidevtools/json-schema-ref-parser'; -import { promises as fsPromises } from 'fs'; -import * as path from 'path'; -import { URL } from 'url'; -import { schemaDir, mergeDefinitions, mergeSchemas, schemaUrl } from './utils'; - -const { writeFile } = fsPromises; - -/** - * Generate a merged schema `__merged.json` from schemas in schemas directory - * @param schemaUrl {string} The URL to download the schema from //TODO this does not like right, revisit mergeDefinitions - * @param destDir {string} The destination path to save the schema to - * @returns {void} - */ -const execute = async (schemaUrl: URL, destDir: string): Promise => { - try { - const $refParser = new $RefParser(); - await $refParser.resolve(schemaUrl.href); - const externalSchemas = $refParser.$refs - .paths() - .filter((p, index, arr) => arr.indexOf(p) === index && p !== schemaUrl.href); - - const known$Refs = new Map(); - await mergeDefinitions($refParser, externalSchemas, known$Refs); - mergeSchemas($refParser, known$Refs, $refParser.schema, '#/'); - await writeFile(path.resolve(destDir, '__merged.json'), JSON.stringify($refParser.schema, null, 2)); - return Promise.resolve(); - } catch (ex) { - return Promise.reject(ex); - } -}; - -execute(schemaUrl, schemaDir).then(console.log.bind(console)).catch(console.error.bind(console)); diff --git a/tools/utils.ts b/tools/utils.ts index 36ee7cce..facec5c8 100644 --- a/tools/utils.ts +++ b/tools/utils.ts @@ -14,10 +14,9 @@ * limitations under the License. */ -import $RefParser from '@apidevtools/json-schema-ref-parser'; import { promises as fsPromises } from 'fs'; import * as path from 'path'; -import rimraf from 'rimraf'; +import { rimraf } from 'rimraf'; import { readMeDisclaimer } from './consts'; import { URL } from 'url'; import yargs from 'yargs'; @@ -25,165 +24,21 @@ import { schemaVersion } from '../package.json'; const { writeFile, mkdir } = fsPromises; -/** - * Wraps rimraf into a Promise - * @param f {string} The target to be deleted - * @returns {void} - */ -export const rimrafP = async (f: string): Promise => - new Promise((resolve, reject) => - rimraf(f, (err) => { - if (err) return reject(err); - resolve(); - }) - ); - -/** - * Capitalized the first letter of the provided string - * @param {} value The string to capitalize - * @returns {string} The capitalized string - */ -export const capitalizeFirstLetter = (value: string): string => { - if (!value) return ''; - const transformable = value.trim(); - return transformable[0].toUpperCase() + transformable.slice(1); -}; - -/** - * Tells if the provided objects hold a reference to another definition - * @param {any} obj The object to test - * @returns {boolean} Returns true if the object holds a reference to another schema - */ -export const isRef = (obj: any): boolean => obj && obj.$ref && typeof obj.$ref === typeof ''; - -/** - * Tells if the provided object holds an external reference - * @param {any} obj The object to test - * @returns {boolean} Returns true if the reference hold by the object is external - */ -export const isRefExernal = (obj: any): boolean => obj && obj.$ref && !obj.$ref.startsWith('#'); - -/** - * Gets the property name (key) in the root schema definitions for the provided ref. Used to avoid key collision - * @param {string} $ref The reference path - * @param {Map} known$Refs The know references map - * @returns {string} The corrected property name - */ -export const getPropName = ($ref: string, known$Refs: Map): string => { - const baseName = $ref.split('/').slice(-1)[0]; - let propName = baseName; - let variantIndex = 0; - while (known$Refs.has(propName) && known$Refs.get(propName) !== $ref) { - variantIndex++; - propName = baseName + variantIndex; - } - return propName; -}; - -/** - * Merges the definitions founds in the schemas in path into the root schema's definitions - * @param {$RefParser} $refParser The $RefParser instance of the root schema - * @param {string[]} paths The path to the schemas containing definitions to merge - * @param {Map} known$Refs The know references map - * @param {string[]} parentPaths (internal) The previously known paths - */ -export const mergeDefinitions = async ( - $refParser: $RefParser, - paths: string[], - known$Refs: Map, - parentPaths: string[] = [] -): Promise => { - try { - if (!parentPaths?.length) { - Object.keys($refParser.schema.definitions || {}).forEach((key: string) => { - if (!known$Refs.has(key)) { - known$Refs.set(key, `#/definitions/${key}`); - } - }); - parentPaths = paths; - } - await Promise.all( - paths.map(async (schemaPath: string) => { - const fileName = path.basename(schemaPath); - const schema = await $RefParser.parse(schemaPath); - Object.entries(schema.definitions || {}).forEach(([key, value]) => { - const propName = getPropName(key, known$Refs); - known$Refs.set(propName, `${fileName}#/definitions/${key}`); - $refParser.$refs.set(`#/definitions/${propName}`, value); - }); - const $schemaRefs = await $RefParser.resolve(schemaPath); - const otherPaths = $schemaRefs.paths().filter((p) => !parentPaths.includes(p)); - otherPaths.forEach((p) => parentPaths.push(p)); - await mergeDefinitions($refParser, otherPaths, known$Refs, parentPaths); - }) - ); - } catch (ex) { - return Promise.reject(ex); - } -}; - -/** - * Merges external schemas references into the root schema definitions - * @param {$RefParser} $refParser The $RefParser instance of the root schema - * @param {Map} known$Refs The know references map - * @param {any} target The object to crawl for references - * @param {string} target$Ref The provided target reference path - */ -export const mergeSchemas = ( - $refParser: $RefParser, - known$Refs: Map, - target: any, - target$Ref: string -): void => { - const isRootDocument = target$Ref.startsWith('#'); - // todo ? handle circular refs ? - Object.entries(target) - .filter(([, value]: [string, any]) => value && typeof value === typeof {} && !ArrayBuffer.isView(value)) - .forEach(([key, value]: [string, any]) => { - if (!isRef(value) || (isRootDocument && !isRefExernal(value))) { - const newTargetRef = `${target$Ref.endsWith('/') ? target$Ref : target$Ref + '/'}${key}/`; - mergeSchemas($refParser, known$Refs, value, newTargetRef); - return; - } - if (isRefExernal(value)) { - const propName = getPropName(value.$ref, known$Refs); - if (known$Refs.has(propName)) { - value.$ref = `#/definitions/${propName}`; - return; - } - const referencedSchema = $refParser.$refs.get(value.$ref); - mergeSchemas($refParser, known$Refs, referencedSchema, value.$ref); - known$Refs.set(propName, value.$ref); - value.$ref = `#/definitions/${propName}`; - $refParser.$refs.set(`#/definitions/${propName}`, referencedSchema); - } else if (!isRootDocument) { - const document = target$Ref.split('#')[0]; - const relative$Ref = document + value.$ref; - const propName = getPropName(relative$Ref, known$Refs); - if (known$Refs.has(propName)) { - value.$ref = `#/definitions/${propName}`; - return; - } - const referencedSchema = $refParser.$refs.get(relative$Ref); - mergeSchemas($refParser, known$Refs, referencedSchema, relative$Ref); - known$Refs.set(propName, relative$Ref); - value.$ref = `#/definitions/${propName}`; - $refParser.$refs.set(`#/definitions/${propName}`, referencedSchema); - } - }); -}; - /** Resets the destination directory, recursively deletes everything and adds the README */ export const reset = async (destDir: string) => - rimrafP(destDir) + rimraf(destDir) .then(() => mkdir(destDir, { recursive: true })) .then(() => writeFile(path.resolve(destDir, 'README.md'), readMeDisclaimer)); /** Schemas directory */ export const schemaDir = path.resolve(process.cwd(), 'src/lib/schema'); +const argv = yargs(process.argv.slice(2)) + .options({ + url: { type: 'string' }, + }) + .parseSync(); /** The URL to download the schema from */ export const schemaUrl: URL = new URL( - (yargs(process.argv.slice(2)).argv.url as string) || - `https://raw.githubusercontent.com/serverlessworkflow/specification/${schemaVersion}.x/schema/workflow.json` + argv.url || `https://serverlessworkflow.io/schemas/${schemaVersion}/workflow.json`, ); From c29c6ac5cc1726c755c0c17fb553834e02c7711a Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Fri, 19 Jul 2024 11:28:39 +0200 Subject: [PATCH 02/24] Added generic fluent builder proxy Signed-off-by: Jean-Baptiste Bianchi --- README.md | 12 +++---- package-lock.json | 11 ++++-- package.json | 3 +- src/index.ts | 15 -------- src/lib/builder.ts | 58 ++++++++++++++++++++++++++++++ tests/builders/builder.spec.ts | 66 ++++++++++++++++++++++++++++++++++ tsconfig.base.json | 2 +- 7 files changed, 142 insertions(+), 25 deletions(-) delete mode 100644 src/index.ts create mode 100644 src/lib/builder.ts create mode 100644 tests/builders/builder.spec.ts diff --git a/README.md b/README.md index b4d5da13..ae577017 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ npm install && npm run build && npm run test ##### Version >= 4.0.0 Note: Version 4.0.0 has not been released yet. ```sh -npm i @serverless-workflow/sdk +npm i @serverlessworkflow/sdk ``` @@ -55,7 +55,7 @@ npm i @severlessworkflow/sdk-typescript #### Create Workflow using builder API ```typescript -import { workflowBuilder, injectstateBuilder, Specification } from '@serverless-workflow/sdk'; +import { workflowBuilder, injectstateBuilder, Specification } from '@serverlessworkflow/sdk'; const workflow: Specification.Workflow = workflowBuilder() .id("helloworld") @@ -78,7 +78,7 @@ const workflow: Specification.Workflow = workflowBuilder() #### Create Workflow from JSON/YAML source ```typescript -import { Specification, Workflow } from '@serverless-workflow/sdk'; +import { Specification, Workflow } from '@serverlessworkflow/sdk'; const source = `id: helloworld version: '1.0' @@ -102,7 +102,7 @@ Where `source` can be in both JSON or YAML format. Having the following workflow instance: ```typescript -import { workflowBuilder, injectstateBuilder, Specification } from '@serverless-workflow/sdk'; +import { workflowBuilder, injectstateBuilder, Specification } from '@serverlessworkflow/sdk'; const workflow: Specification.Workflow = workflowBuilder() .id("helloworld") @@ -156,7 +156,7 @@ The sdk provides a way to validate if a workflow object is compliant with the se - `validate(): boolean` ```typescript -import {WorkflowValidator, Specification} from '@serverless-workflow/sdk'; +import {WorkflowValidator, Specification} from '@serverlessworkflow/sdk'; import {Workflow} from "./workflow"; const workflow = { @@ -188,7 +188,7 @@ You can also validate parts of a workflow using `validators`: ```typescript import { ValidateFunction } from 'ajv'; -import { validators, Specification } from '@serverless-workflow/sdk'; +import { validators, Specification } from '@serverlessworkflow/sdk'; const injectionState: Specification.Injectstate = workflow.states[0]; const injectionStateValidator: ValidateFunction = validators.get('Injectstate'); diff --git a/package-lock.json b/package-lock.json index 99343c4c..fd344ccd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@serverless-workflow/sdk", + "name": "@serverlessworkflow/sdk", "version": "1.0.0-alpha2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@serverless-workflow/sdk", + "name": "@serverlessworkflow/sdk", "version": "1.0.0-alpha2.0", "license": "http://www.apache.org/licenses/LICENSE-2.0.txt", "dependencies": { @@ -39,6 +39,7 @@ "rollup-plugin-terser": "^7.0.2", "rollup-plugin-typescript2": "^0.36.0", "shx": "^0.3.4", + "ts-inference-check": "^0.3.0", "ts-jest": "^29.2.2", "ts-morph": "^23.0.0", "ts-node": "^10.9.2", @@ -7052,6 +7053,12 @@ "typescript": ">=4.2.0" } }, + "node_modules/ts-inference-check": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ts-inference-check/-/ts-inference-check-0.3.0.tgz", + "integrity": "sha512-nJ0MflAJTFmvJq0bP+KYcPze4WWE+VgkVZt2mL+qiizdqSI/PX55b21q9LpqiSLOOiRPdOWjW5Tsxrrf+jByog==", + "dev": true + }, "node_modules/ts-jest": { "version": "29.2.2", "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.2.tgz", diff --git a/package.json b/package.json index f87bdb0d..cf902de9 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@serverless-workflow/sdk", + "name": "@serverlessworkflow/sdk", "version": "1.0.0-alpha2.0", "schemaVersion": "1.0.0-alpha2", "description": "Typescript SDK for Serverless Workflow Specification", @@ -64,6 +64,7 @@ "rollup-plugin-terser": "^7.0.2", "rollup-plugin-typescript2": "^0.36.0", "shx": "^0.3.4", + "ts-inference-check": "^0.3.0", "ts-jest": "^29.2.2", "ts-morph": "^23.0.0", "ts-node": "^10.9.2", diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index 24aa0121..00000000 --- a/src/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ diff --git a/src/lib/builder.ts b/src/lib/builder.ts new file mode 100644 index 00000000..ec8d0c85 --- /dev/null +++ b/src/lib/builder.ts @@ -0,0 +1,58 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/** + * Represents a fluent builder proxy + */ +export type Builder = { + build: () => T; +} & { + [K in keyof T]-?: (arg: T[K]) => Builder; +}; + +/** + * The default function used to build an object, basically just return the provided object + * @param data The object to "build" + * @returns + */ +function defaultBuildingFn(data: Partial): () => T { + return () => data as T; +} + +/** + * A factory for fluent builders that proxy properties assignations and can validate against schema on build() + * @param {Function} buildingFn The function used to validate and produce the object on build() + * @returns {Builder} A fluent builder + */ +export function builder(buildingFn?: (data: Partial) => () => T): Builder { + const data: Partial = {}; + const proxy = new Proxy({} as Builder, { + get: (_, prop) => { + if (prop === 'build') { + return (buildingFn || defaultBuildingFn)(data); + } + return (value: unknown): Builder => { + (data as any)[prop.toString()] = value; + return proxy; + }; + }, + set: () => { + return false; + }, + }); + return proxy; +} diff --git a/tests/builders/builder.spec.ts b/tests/builders/builder.spec.ts new file mode 100644 index 00000000..3f5f9bb7 --- /dev/null +++ b/tests/builders/builder.spec.ts @@ -0,0 +1,66 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import { Builder, builder } from '../../src/lib/builder'; +import { type } from 'ts-inference-check'; + +type Person = { + name: string; + age: number; + friends?: Array; + [k: string]: unknown; +}; + +const darknessMyOldFriend = { name: 'Darkness', age: 999 }; +const isPerson = (data: Partial): data is Person => !!data.name && !!data.age; +function personBuildingFn(data: Partial): () => Person { + return () => { + if (!isPerson(data)) { + throw new Error('The provided object is not a person'); + } + return { + ...data, + friends: [...(data.friends || []), darknessMyOldFriend], + }; + }; +} +const personBuilder = (): Builder => builder(personBuildingFn); + +describe('builder proxy', () => { + it('should infer property types', () => { + const builder = personBuilder(); + expect(type(builder.name).is<(arg: string) => Builder>(true)).toBe(true); + expect(type(builder.age).is<(arg: number) => Builder>(true)).toBe(true); + expect(type(builder.friends).is<(arg: Array | undefined) => Builder>(true)).toBe(true); + expect(type(builder.lover).is<(arg: unknown) => Builder>(true)).toBe(true); + }); + + it('should build', () => { + const name = 'John Doe'; + const age = 42; + const friend = { name: 'Cookie Doe', age: 42 }; + const lover = 'Jane Doe'; + const person = personBuilder().name(name).age(age).friends([friend]).lover(lover).build(); + expect(person).toBeDefined(); + expect(person.name).toBe(name); + expect(person.age).toBe(age); + expect(person.friends?.length).toBe(2); + expect(person.friends?.includes(friend)).toBe(true); + expect(person.friends?.includes(darknessMyOldFriend)).toBe(true); + expect(person.lover).toBe(lover); + }); +}); diff --git a/tsconfig.base.json b/tsconfig.base.json index 7e84fbd8..c46f6cee 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "ES2015", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ + "target": "ES2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */ "lib": [ "ES2019", "DOM" ], /* Specify library files to be included in the compilation. */ "declaration": true, /* Generates corresponding '.d.ts' file. */ From 071794ecc894e55c96ae956f969943ea5c59e83b Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Wed, 24 Jul 2024 19:15:27 +0200 Subject: [PATCH 03/24] 1.0.0-alpha PoC Signed-off-by: Jean-Baptiste Bianchi --- package-lock.json | 17 + package.json | 12 +- src/lib/{definitions => builders}/README.md | 0 src/lib/definitions/specification.ts | 1106 ----------------- .../{schema => generated/builders}/README.md | 0 .../all-event-consumption-strategy-builder.ts | 43 + .../any-event-consumption-strategy-builder.ts | 43 + .../builders/authentication-policy-builder.ts | 43 + ...authentication-policy-reference-builder.ts | 45 + .../basic-authentication-policy-builder.ts | 43 + .../bearer-authentication-policy-builder.ts | 43 + .../builders/call-async-api-builder.ts | 43 + .../builders/call-async-api-with-builder.ts | 43 + .../builders/call-function-builder.ts | 43 + .../builders/call-function-with-builder.ts | 43 + .../generated/builders/call-grpc-builder.ts | 43 + .../call-grpc-with-arguments-builder.ts | 43 + .../builders/call-grpc-with-builder.ts | 43 + .../call-grpc-with-service-builder.ts | 43 + .../generated/builders/call-http-builder.ts | 43 + .../builders/call-http-with-body-builder.ts | 43 + .../builders/call-http-with-builder.ts | 43 + .../call-http-with-endpoint-builder.ts | 43 + .../call-http-with-headers-builder.ts | 43 + .../builders/call-open-api-builder.ts | 43 + .../builders/call-open-api-with-builder.ts | 43 + .../call-open-api-with-parameters-builder.ts | 43 + .../generated/builders/call-task-builder.ts | 43 + src/lib/generated/builders/catch-builder.ts | 43 + .../builders/catch-errors-builder.ts | 43 + .../builders/constant-backoff-builder.ts | 43 + .../generated/builders/container-builder.ts | 43 + .../builders/container-environment-builder.ts | 43 + .../generated/builders/correlate-builder.ts | 43 + src/lib/generated/builders/do-task-builder.ts | 43 + .../generated/builders/duration-builder.ts | 43 + src/lib/generated/builders/emit-builder.ts | 43 + .../generated/builders/emit-event-builder.ts | 43 + .../generated/builders/emit-task-builder.ts | 43 + .../generated/builders/endpoint-builder.ts | 43 + src/lib/generated/builders/error-builder.ts | 43 + .../event-consumption-strategy-all-builder.ts | 43 + .../event-consumption-strategy-any-builder.ts | 43 + .../event-consumption-strategy-builder.ts | 43 + .../builders/event-filter-builder.ts | 43 + ...cit-basic-authentication-policy-builder.ts | 45 + ...it-bearer-authentication-policy-builder.ts | 45 + ...t-o-auth2-authentication-policy-builder.ts | 45 + .../builders/exponential-back-off-builder.ts | 43 + .../generated/builders/export-as-builder.ts | 43 + src/lib/generated/builders/export-builder.ts | 43 + .../generated/builders/extension-builder.ts | 43 + .../builders/extension-item-builder.ts | 43 + .../builders/external-resource-builder.ts | 43 + .../external-resource-u-r-i-builder.ts | 43 + .../builders/flow-directive-builder.ts | 43 + .../builders/flow-directive-enum-builder.ts | 43 + src/lib/generated/builders/for-builder.ts | 43 + .../generated/builders/for-task-builder.ts | 43 + src/lib/generated/builders/fork-builder.ts | 43 + .../generated/builders/fork-task-builder.ts | 43 + src/lib/generated/builders/index.ts | 134 ++ src/lib/generated/builders/input-builder.ts | 43 + .../generated/builders/input-from-builder.ts | 43 + .../builders/linear-backoff-builder.ts | 43 + src/lib/generated/builders/listen-builder.ts | 43 + .../generated/builders/listen-task-builder.ts | 43 + .../o-auth2-authentication-policy-builder.ts | 43 + .../builders/oauth2-token-builder.ts | 43 + .../one-event-consumption-strategy-builder.ts | 43 + .../generated/builders/output-as-builder.ts | 43 + src/lib/generated/builders/output-builder.ts | 43 + src/lib/generated/builders/raise-builder.ts | 43 + .../generated/builders/raise-task-builder.ts | 43 + ...renceable-authentication-policy-builder.ts | 45 + ...eferenced-authentication-policy-builder.ts | 45 + .../builders/retry-policy-attempt-builder.ts | 43 + .../builders/retry-policy-backoff-builder.ts | 43 + .../builders/retry-policy-builder.ts | 43 + .../builders/retry-policy-jitter-builder.ts | 43 + .../builders/retry-policy-limit-builder.ts | 43 + src/lib/generated/builders/run-builder.ts | 43 + .../builders/run-container-builder.ts | 43 + .../generated/builders/run-script-builder.ts | 43 + .../generated/builders/run-shell-builder.ts | 43 + .../generated/builders/run-task-builder.ts | 43 + .../generated/builders/run-wokflow-builder.ts | 43 + .../run-workflow-descriptor-builder.ts | 43 + src/lib/generated/builders/schema-builder.ts | 43 + .../builders/schema-external-builder.ts | 43 + .../builders/schema-inline-builder.ts | 43 + src/lib/generated/builders/script-builder.ts | 43 + .../builders/script-external-builder.ts | 43 + .../builders/script-inline-builder.ts | 43 + ...ret-based-authentication-policy-builder.ts | 45 + src/lib/generated/builders/set-builder.ts | 43 + .../generated/builders/set-task-builder.ts | 43 + .../builders/shell-arguments-builder.ts | 43 + src/lib/generated/builders/shell-builder.ts | 43 + .../builders/shell-environment-builder.ts | 43 + src/lib/generated/builders/switch-builder.ts | 43 + .../generated/builders/switch-case-builder.ts | 43 + .../generated/builders/switch-item-builder.ts | 43 + .../generated/builders/switch-task-builder.ts | 43 + .../generated/builders/task-base-builder.ts | 43 + src/lib/generated/builders/task-builder.ts | 43 + .../generated/builders/task-item-builder.ts | 43 + .../generated/builders/task-list-builder.ts | 43 + src/lib/generated/builders/timeout-builder.ts | 43 + .../generated/builders/try-task-builder.ts | 43 + .../generated/builders/wait-task-builder.ts | 43 + .../generated/builders/with-event-builder.ts | 43 + .../workflow-authentications-builder.ts | 43 + .../generated/builders/workflow-builder.ts | 43 + .../builders/workflow-components-builder.ts | 43 + .../builders/workflow-document-builder.ts | 43 + .../builders/workflow-errors-builder.ts | 43 + .../builders/workflow-extensions-builder.ts | 43 + .../builders/workflow-functions-builder.ts | 43 + .../builders/workflow-input-builder.ts | 43 + .../builders/workflow-retries-builder.ts | 43 + .../builders/workflow-schedule-builder.ts | 43 + .../builders/workflow-secrets-builder.ts | 43 + .../builders/workflow-tags-builder.ts | 43 + src/lib/generated/classes/README.md | 2 + .../classes/all-event-consumption-strategy.ts | 1 + .../classes/any-event-consumption-strategy.ts | 1 + .../authentication-policy-reference.ts | 1 + .../classes/authentication-policy.ts | 1 + .../classes/basic-authentication-policy.ts | 1 + .../classes/bearer-authentication-policy.ts | 1 + .../generated/classes/call-async-api-with.ts | 1 + src/lib/generated/classes/call-async-api.ts | 1 + .../generated/classes/call-function-with.ts | 1 + src/lib/generated/classes/call-function.ts | 1 + .../classes/call-grpc-with-arguments.ts | 1 + .../classes/call-grpc-with-service.ts | 1 + src/lib/generated/classes/call-grpc-with.ts | 1 + src/lib/generated/classes/call-grpc.ts | 1 + .../generated/classes/call-http-with-body.ts | 1 + .../classes/call-http-with-endpoint.ts | 1 + .../classes/call-http-with-headers.ts | 1 + src/lib/generated/classes/call-http-with.ts | 1 + src/lib/generated/classes/call-http.ts | 1 + .../classes/call-open-api-with-parameters.ts | 1 + .../generated/classes/call-open-api-with.ts | 1 + src/lib/generated/classes/call-open-api.ts | 1 + src/lib/generated/classes/call-task.ts | 1 + src/lib/generated/classes/catch-errors.ts | 1 + src/lib/generated/classes/catch.ts | 1 + src/lib/generated/classes/constant-backoff.ts | 1 + .../classes/container-environment.ts | 1 + src/lib/generated/classes/container.ts | 1 + src/lib/generated/classes/correlate.ts | 1 + src/lib/generated/classes/do-task.ts | 1 + src/lib/generated/classes/duration.ts | 1 + src/lib/generated/classes/emit-event.ts | 1 + src/lib/generated/classes/emit-task.ts | 1 + src/lib/generated/classes/emit.ts | 1 + src/lib/generated/classes/endpoint.ts | 1 + src/lib/generated/classes/error.ts | 1 + .../classes/event-consumption-strategy-all.ts | 1 + .../classes/event-consumption-strategy-any.ts | 1 + .../classes/event-consumption-strategy.ts | 1 + src/lib/generated/classes/event-filter.ts | 1 + .../explicit-basic-authentication-policy.ts | 1 + .../explicit-bearer-authentication-policy.ts | 1 + .../explicit-o-auth2-authentication-policy.ts | 1 + .../generated/classes/exponential-back-off.ts | 1 + src/lib/generated/classes/export-as.ts | 1 + src/lib/generated/classes/export.ts | 1 + src/lib/generated/classes/extension-item.ts | 1 + src/lib/generated/classes/extension.ts | 1 + .../classes/external-resource-u-r-i.ts | 1 + .../generated/classes/external-resource.ts | 1 + .../generated/classes/flow-directive-enum.ts | 1 + src/lib/generated/classes/flow-directive.ts | 1 + src/lib/generated/classes/for-task.ts | 1 + src/lib/generated/classes/for.ts | 1 + src/lib/generated/classes/fork-task.ts | 1 + src/lib/generated/classes/fork.ts | 1 + src/lib/generated/classes/index.ts | 255 ++++ src/lib/generated/classes/input-from.ts | 1 + src/lib/generated/classes/input.ts | 1 + src/lib/generated/classes/linear-backoff.ts | 1 + src/lib/generated/classes/listen-task.ts | 1 + src/lib/generated/classes/listen.ts | 1 + .../classes/o-auth2-authentication-policy.ts | 1 + src/lib/generated/classes/oauth2-token.ts | 1 + .../classes/one-event-consumption-strategy.ts | 1 + src/lib/generated/classes/output-as.ts | 1 + src/lib/generated/classes/output.ts | 1 + src/lib/generated/classes/raise-task.ts | 1 + src/lib/generated/classes/raise.ts | 1 + .../referenceable-authentication-policy.ts | 1 + .../referenced-authentication-policy.ts | 1 + .../generated/classes/retry-policy-attempt.ts | 1 + .../generated/classes/retry-policy-backoff.ts | 1 + .../generated/classes/retry-policy-jitter.ts | 1 + .../generated/classes/retry-policy-limit.ts | 1 + src/lib/generated/classes/retry-policy.ts | 1 + src/lib/generated/classes/run-container.ts | 1 + src/lib/generated/classes/run-script.ts | 1 + src/lib/generated/classes/run-shell.ts | 1 + src/lib/generated/classes/run-task.ts | 1 + src/lib/generated/classes/run-wokflow.ts | 1 + .../classes/run-workflow-descriptor.ts | 1 + src/lib/generated/classes/run.ts | 1 + src/lib/generated/classes/schema-external.ts | 1 + src/lib/generated/classes/schema-inline.ts | 1 + src/lib/generated/classes/schema.ts | 1 + src/lib/generated/classes/script-external.ts | 1 + src/lib/generated/classes/script-inline.ts | 1 + src/lib/generated/classes/script.ts | 1 + .../secret-based-authentication-policy.ts | 1 + src/lib/generated/classes/set-task.ts | 1 + src/lib/generated/classes/set.ts | 1 + src/lib/generated/classes/shell-arguments.ts | 1 + .../generated/classes/shell-environment.ts | 1 + src/lib/generated/classes/shell.ts | 1 + src/lib/generated/classes/switch-case.ts | 1 + src/lib/generated/classes/switch-item.ts | 1 + src/lib/generated/classes/switch-task.ts | 1 + src/lib/generated/classes/switch.ts | 1 + src/lib/generated/classes/task-base.ts | 1 + src/lib/generated/classes/task-item.ts | 1 + src/lib/generated/classes/task-list.ts | 1 + src/lib/generated/classes/task.ts | 1 + src/lib/generated/classes/timeout.ts | 1 + src/lib/generated/classes/try-task.ts | 1 + src/lib/generated/classes/wait-task.ts | 1 + src/lib/generated/classes/with-event.ts | 1 + .../classes/workflow-authentications.ts | 1 + .../generated/classes/workflow-components.ts | 1 + .../generated/classes/workflow-document.ts | 1 + src/lib/generated/classes/workflow-errors.ts | 1 + .../generated/classes/workflow-extensions.ts | 1 + .../generated/classes/workflow-functions.ts | 1 + src/lib/generated/classes/workflow-input.ts | 1 + src/lib/generated/classes/workflow-retries.ts | 1 + .../generated/classes/workflow-schedule.ts | 1 + src/lib/generated/classes/workflow-secrets.ts | 1 + src/lib/generated/classes/workflow-tags.ts | 1 + src/lib/generated/classes/workflow.ts | 1 + src/lib/generated/definitions/README.md | 2 + src/lib/{ => generated}/definitions/index.ts | 0 .../generated/definitions/specification.ts | 1074 ++++++++++++++++ src/lib/generated/schema/README.md | 2 + src/lib/{ => generated}/schema/workflow.json | 527 +++++--- src/lib/generated/validation/README.md | 2 + src/lib/generated/validation/index.ts | 17 + .../validation/validation-pointers.ts | 194 +++ src/lib/validation.ts | 43 + ...asic-authentication-policy-builder.spec.ts | 17 + tests/classes/workflow.spec.ts | 8 + ...nload-schemas.ts => 1_download-schemas.ts} | 0 ...finitions.ts => 2_generate-definitions.ts} | 48 +- tools/3_generate-validation-pointers.ts | 95 ++ tools/4_generate-classes.ts | 56 + tools/5_generate-builders.ts | 146 +++ tools/generate-builders.ts | 200 --- tools/utils.ts | 59 +- 262 files changed, 7727 insertions(+), 1495 deletions(-) rename src/lib/{definitions => builders}/README.md (100%) delete mode 100644 src/lib/definitions/specification.ts rename src/lib/{schema => generated/builders}/README.md (100%) create mode 100644 src/lib/generated/builders/all-event-consumption-strategy-builder.ts create mode 100644 src/lib/generated/builders/any-event-consumption-strategy-builder.ts create mode 100644 src/lib/generated/builders/authentication-policy-builder.ts create mode 100644 src/lib/generated/builders/authentication-policy-reference-builder.ts create mode 100644 src/lib/generated/builders/basic-authentication-policy-builder.ts create mode 100644 src/lib/generated/builders/bearer-authentication-policy-builder.ts create mode 100644 src/lib/generated/builders/call-async-api-builder.ts create mode 100644 src/lib/generated/builders/call-async-api-with-builder.ts create mode 100644 src/lib/generated/builders/call-function-builder.ts create mode 100644 src/lib/generated/builders/call-function-with-builder.ts create mode 100644 src/lib/generated/builders/call-grpc-builder.ts create mode 100644 src/lib/generated/builders/call-grpc-with-arguments-builder.ts create mode 100644 src/lib/generated/builders/call-grpc-with-builder.ts create mode 100644 src/lib/generated/builders/call-grpc-with-service-builder.ts create mode 100644 src/lib/generated/builders/call-http-builder.ts create mode 100644 src/lib/generated/builders/call-http-with-body-builder.ts create mode 100644 src/lib/generated/builders/call-http-with-builder.ts create mode 100644 src/lib/generated/builders/call-http-with-endpoint-builder.ts create mode 100644 src/lib/generated/builders/call-http-with-headers-builder.ts create mode 100644 src/lib/generated/builders/call-open-api-builder.ts create mode 100644 src/lib/generated/builders/call-open-api-with-builder.ts create mode 100644 src/lib/generated/builders/call-open-api-with-parameters-builder.ts create mode 100644 src/lib/generated/builders/call-task-builder.ts create mode 100644 src/lib/generated/builders/catch-builder.ts create mode 100644 src/lib/generated/builders/catch-errors-builder.ts create mode 100644 src/lib/generated/builders/constant-backoff-builder.ts create mode 100644 src/lib/generated/builders/container-builder.ts create mode 100644 src/lib/generated/builders/container-environment-builder.ts create mode 100644 src/lib/generated/builders/correlate-builder.ts create mode 100644 src/lib/generated/builders/do-task-builder.ts create mode 100644 src/lib/generated/builders/duration-builder.ts create mode 100644 src/lib/generated/builders/emit-builder.ts create mode 100644 src/lib/generated/builders/emit-event-builder.ts create mode 100644 src/lib/generated/builders/emit-task-builder.ts create mode 100644 src/lib/generated/builders/endpoint-builder.ts create mode 100644 src/lib/generated/builders/error-builder.ts create mode 100644 src/lib/generated/builders/event-consumption-strategy-all-builder.ts create mode 100644 src/lib/generated/builders/event-consumption-strategy-any-builder.ts create mode 100644 src/lib/generated/builders/event-consumption-strategy-builder.ts create mode 100644 src/lib/generated/builders/event-filter-builder.ts create mode 100644 src/lib/generated/builders/explicit-basic-authentication-policy-builder.ts create mode 100644 src/lib/generated/builders/explicit-bearer-authentication-policy-builder.ts create mode 100644 src/lib/generated/builders/explicit-o-auth2-authentication-policy-builder.ts create mode 100644 src/lib/generated/builders/exponential-back-off-builder.ts create mode 100644 src/lib/generated/builders/export-as-builder.ts create mode 100644 src/lib/generated/builders/export-builder.ts create mode 100644 src/lib/generated/builders/extension-builder.ts create mode 100644 src/lib/generated/builders/extension-item-builder.ts create mode 100644 src/lib/generated/builders/external-resource-builder.ts create mode 100644 src/lib/generated/builders/external-resource-u-r-i-builder.ts create mode 100644 src/lib/generated/builders/flow-directive-builder.ts create mode 100644 src/lib/generated/builders/flow-directive-enum-builder.ts create mode 100644 src/lib/generated/builders/for-builder.ts create mode 100644 src/lib/generated/builders/for-task-builder.ts create mode 100644 src/lib/generated/builders/fork-builder.ts create mode 100644 src/lib/generated/builders/fork-task-builder.ts create mode 100644 src/lib/generated/builders/index.ts create mode 100644 src/lib/generated/builders/input-builder.ts create mode 100644 src/lib/generated/builders/input-from-builder.ts create mode 100644 src/lib/generated/builders/linear-backoff-builder.ts create mode 100644 src/lib/generated/builders/listen-builder.ts create mode 100644 src/lib/generated/builders/listen-task-builder.ts create mode 100644 src/lib/generated/builders/o-auth2-authentication-policy-builder.ts create mode 100644 src/lib/generated/builders/oauth2-token-builder.ts create mode 100644 src/lib/generated/builders/one-event-consumption-strategy-builder.ts create mode 100644 src/lib/generated/builders/output-as-builder.ts create mode 100644 src/lib/generated/builders/output-builder.ts create mode 100644 src/lib/generated/builders/raise-builder.ts create mode 100644 src/lib/generated/builders/raise-task-builder.ts create mode 100644 src/lib/generated/builders/referenceable-authentication-policy-builder.ts create mode 100644 src/lib/generated/builders/referenced-authentication-policy-builder.ts create mode 100644 src/lib/generated/builders/retry-policy-attempt-builder.ts create mode 100644 src/lib/generated/builders/retry-policy-backoff-builder.ts create mode 100644 src/lib/generated/builders/retry-policy-builder.ts create mode 100644 src/lib/generated/builders/retry-policy-jitter-builder.ts create mode 100644 src/lib/generated/builders/retry-policy-limit-builder.ts create mode 100644 src/lib/generated/builders/run-builder.ts create mode 100644 src/lib/generated/builders/run-container-builder.ts create mode 100644 src/lib/generated/builders/run-script-builder.ts create mode 100644 src/lib/generated/builders/run-shell-builder.ts create mode 100644 src/lib/generated/builders/run-task-builder.ts create mode 100644 src/lib/generated/builders/run-wokflow-builder.ts create mode 100644 src/lib/generated/builders/run-workflow-descriptor-builder.ts create mode 100644 src/lib/generated/builders/schema-builder.ts create mode 100644 src/lib/generated/builders/schema-external-builder.ts create mode 100644 src/lib/generated/builders/schema-inline-builder.ts create mode 100644 src/lib/generated/builders/script-builder.ts create mode 100644 src/lib/generated/builders/script-external-builder.ts create mode 100644 src/lib/generated/builders/script-inline-builder.ts create mode 100644 src/lib/generated/builders/secret-based-authentication-policy-builder.ts create mode 100644 src/lib/generated/builders/set-builder.ts create mode 100644 src/lib/generated/builders/set-task-builder.ts create mode 100644 src/lib/generated/builders/shell-arguments-builder.ts create mode 100644 src/lib/generated/builders/shell-builder.ts create mode 100644 src/lib/generated/builders/shell-environment-builder.ts create mode 100644 src/lib/generated/builders/switch-builder.ts create mode 100644 src/lib/generated/builders/switch-case-builder.ts create mode 100644 src/lib/generated/builders/switch-item-builder.ts create mode 100644 src/lib/generated/builders/switch-task-builder.ts create mode 100644 src/lib/generated/builders/task-base-builder.ts create mode 100644 src/lib/generated/builders/task-builder.ts create mode 100644 src/lib/generated/builders/task-item-builder.ts create mode 100644 src/lib/generated/builders/task-list-builder.ts create mode 100644 src/lib/generated/builders/timeout-builder.ts create mode 100644 src/lib/generated/builders/try-task-builder.ts create mode 100644 src/lib/generated/builders/wait-task-builder.ts create mode 100644 src/lib/generated/builders/with-event-builder.ts create mode 100644 src/lib/generated/builders/workflow-authentications-builder.ts create mode 100644 src/lib/generated/builders/workflow-builder.ts create mode 100644 src/lib/generated/builders/workflow-components-builder.ts create mode 100644 src/lib/generated/builders/workflow-document-builder.ts create mode 100644 src/lib/generated/builders/workflow-errors-builder.ts create mode 100644 src/lib/generated/builders/workflow-extensions-builder.ts create mode 100644 src/lib/generated/builders/workflow-functions-builder.ts create mode 100644 src/lib/generated/builders/workflow-input-builder.ts create mode 100644 src/lib/generated/builders/workflow-retries-builder.ts create mode 100644 src/lib/generated/builders/workflow-schedule-builder.ts create mode 100644 src/lib/generated/builders/workflow-secrets-builder.ts create mode 100644 src/lib/generated/builders/workflow-tags-builder.ts create mode 100644 src/lib/generated/classes/README.md create mode 100644 src/lib/generated/classes/all-event-consumption-strategy.ts create mode 100644 src/lib/generated/classes/any-event-consumption-strategy.ts create mode 100644 src/lib/generated/classes/authentication-policy-reference.ts create mode 100644 src/lib/generated/classes/authentication-policy.ts create mode 100644 src/lib/generated/classes/basic-authentication-policy.ts create mode 100644 src/lib/generated/classes/bearer-authentication-policy.ts create mode 100644 src/lib/generated/classes/call-async-api-with.ts create mode 100644 src/lib/generated/classes/call-async-api.ts create mode 100644 src/lib/generated/classes/call-function-with.ts create mode 100644 src/lib/generated/classes/call-function.ts create mode 100644 src/lib/generated/classes/call-grpc-with-arguments.ts create mode 100644 src/lib/generated/classes/call-grpc-with-service.ts create mode 100644 src/lib/generated/classes/call-grpc-with.ts create mode 100644 src/lib/generated/classes/call-grpc.ts create mode 100644 src/lib/generated/classes/call-http-with-body.ts create mode 100644 src/lib/generated/classes/call-http-with-endpoint.ts create mode 100644 src/lib/generated/classes/call-http-with-headers.ts create mode 100644 src/lib/generated/classes/call-http-with.ts create mode 100644 src/lib/generated/classes/call-http.ts create mode 100644 src/lib/generated/classes/call-open-api-with-parameters.ts create mode 100644 src/lib/generated/classes/call-open-api-with.ts create mode 100644 src/lib/generated/classes/call-open-api.ts create mode 100644 src/lib/generated/classes/call-task.ts create mode 100644 src/lib/generated/classes/catch-errors.ts create mode 100644 src/lib/generated/classes/catch.ts create mode 100644 src/lib/generated/classes/constant-backoff.ts create mode 100644 src/lib/generated/classes/container-environment.ts create mode 100644 src/lib/generated/classes/container.ts create mode 100644 src/lib/generated/classes/correlate.ts create mode 100644 src/lib/generated/classes/do-task.ts create mode 100644 src/lib/generated/classes/duration.ts create mode 100644 src/lib/generated/classes/emit-event.ts create mode 100644 src/lib/generated/classes/emit-task.ts create mode 100644 src/lib/generated/classes/emit.ts create mode 100644 src/lib/generated/classes/endpoint.ts create mode 100644 src/lib/generated/classes/error.ts create mode 100644 src/lib/generated/classes/event-consumption-strategy-all.ts create mode 100644 src/lib/generated/classes/event-consumption-strategy-any.ts create mode 100644 src/lib/generated/classes/event-consumption-strategy.ts create mode 100644 src/lib/generated/classes/event-filter.ts create mode 100644 src/lib/generated/classes/explicit-basic-authentication-policy.ts create mode 100644 src/lib/generated/classes/explicit-bearer-authentication-policy.ts create mode 100644 src/lib/generated/classes/explicit-o-auth2-authentication-policy.ts create mode 100644 src/lib/generated/classes/exponential-back-off.ts create mode 100644 src/lib/generated/classes/export-as.ts create mode 100644 src/lib/generated/classes/export.ts create mode 100644 src/lib/generated/classes/extension-item.ts create mode 100644 src/lib/generated/classes/extension.ts create mode 100644 src/lib/generated/classes/external-resource-u-r-i.ts create mode 100644 src/lib/generated/classes/external-resource.ts create mode 100644 src/lib/generated/classes/flow-directive-enum.ts create mode 100644 src/lib/generated/classes/flow-directive.ts create mode 100644 src/lib/generated/classes/for-task.ts create mode 100644 src/lib/generated/classes/for.ts create mode 100644 src/lib/generated/classes/fork-task.ts create mode 100644 src/lib/generated/classes/fork.ts create mode 100644 src/lib/generated/classes/index.ts create mode 100644 src/lib/generated/classes/input-from.ts create mode 100644 src/lib/generated/classes/input.ts create mode 100644 src/lib/generated/classes/linear-backoff.ts create mode 100644 src/lib/generated/classes/listen-task.ts create mode 100644 src/lib/generated/classes/listen.ts create mode 100644 src/lib/generated/classes/o-auth2-authentication-policy.ts create mode 100644 src/lib/generated/classes/oauth2-token.ts create mode 100644 src/lib/generated/classes/one-event-consumption-strategy.ts create mode 100644 src/lib/generated/classes/output-as.ts create mode 100644 src/lib/generated/classes/output.ts create mode 100644 src/lib/generated/classes/raise-task.ts create mode 100644 src/lib/generated/classes/raise.ts create mode 100644 src/lib/generated/classes/referenceable-authentication-policy.ts create mode 100644 src/lib/generated/classes/referenced-authentication-policy.ts create mode 100644 src/lib/generated/classes/retry-policy-attempt.ts create mode 100644 src/lib/generated/classes/retry-policy-backoff.ts create mode 100644 src/lib/generated/classes/retry-policy-jitter.ts create mode 100644 src/lib/generated/classes/retry-policy-limit.ts create mode 100644 src/lib/generated/classes/retry-policy.ts create mode 100644 src/lib/generated/classes/run-container.ts create mode 100644 src/lib/generated/classes/run-script.ts create mode 100644 src/lib/generated/classes/run-shell.ts create mode 100644 src/lib/generated/classes/run-task.ts create mode 100644 src/lib/generated/classes/run-wokflow.ts create mode 100644 src/lib/generated/classes/run-workflow-descriptor.ts create mode 100644 src/lib/generated/classes/run.ts create mode 100644 src/lib/generated/classes/schema-external.ts create mode 100644 src/lib/generated/classes/schema-inline.ts create mode 100644 src/lib/generated/classes/schema.ts create mode 100644 src/lib/generated/classes/script-external.ts create mode 100644 src/lib/generated/classes/script-inline.ts create mode 100644 src/lib/generated/classes/script.ts create mode 100644 src/lib/generated/classes/secret-based-authentication-policy.ts create mode 100644 src/lib/generated/classes/set-task.ts create mode 100644 src/lib/generated/classes/set.ts create mode 100644 src/lib/generated/classes/shell-arguments.ts create mode 100644 src/lib/generated/classes/shell-environment.ts create mode 100644 src/lib/generated/classes/shell.ts create mode 100644 src/lib/generated/classes/switch-case.ts create mode 100644 src/lib/generated/classes/switch-item.ts create mode 100644 src/lib/generated/classes/switch-task.ts create mode 100644 src/lib/generated/classes/switch.ts create mode 100644 src/lib/generated/classes/task-base.ts create mode 100644 src/lib/generated/classes/task-item.ts create mode 100644 src/lib/generated/classes/task-list.ts create mode 100644 src/lib/generated/classes/task.ts create mode 100644 src/lib/generated/classes/timeout.ts create mode 100644 src/lib/generated/classes/try-task.ts create mode 100644 src/lib/generated/classes/wait-task.ts create mode 100644 src/lib/generated/classes/with-event.ts create mode 100644 src/lib/generated/classes/workflow-authentications.ts create mode 100644 src/lib/generated/classes/workflow-components.ts create mode 100644 src/lib/generated/classes/workflow-document.ts create mode 100644 src/lib/generated/classes/workflow-errors.ts create mode 100644 src/lib/generated/classes/workflow-extensions.ts create mode 100644 src/lib/generated/classes/workflow-functions.ts create mode 100644 src/lib/generated/classes/workflow-input.ts create mode 100644 src/lib/generated/classes/workflow-retries.ts create mode 100644 src/lib/generated/classes/workflow-schedule.ts create mode 100644 src/lib/generated/classes/workflow-secrets.ts create mode 100644 src/lib/generated/classes/workflow-tags.ts create mode 100644 src/lib/generated/classes/workflow.ts create mode 100644 src/lib/generated/definitions/README.md rename src/lib/{ => generated}/definitions/index.ts (100%) create mode 100644 src/lib/generated/definitions/specification.ts create mode 100644 src/lib/generated/schema/README.md rename src/lib/{ => generated}/schema/workflow.json (79%) create mode 100644 src/lib/generated/validation/README.md create mode 100644 src/lib/generated/validation/index.ts create mode 100644 src/lib/generated/validation/validation-pointers.ts create mode 100644 src/lib/validation.ts create mode 100644 tests/builders/explicit-basic-authentication-policy-builder.spec.ts create mode 100644 tests/classes/workflow.spec.ts rename tools/{download-schemas.ts => 1_download-schemas.ts} (100%) rename tools/{generate-definitions.ts => 2_generate-definitions.ts} (68%) create mode 100644 tools/3_generate-validation-pointers.ts create mode 100644 tools/4_generate-classes.ts create mode 100644 tools/5_generate-builders.ts delete mode 100644 tools/generate-builders.ts diff --git a/package-lock.json b/package-lock.json index fd344ccd..433eebc9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "http://www.apache.org/licenses/LICENSE-2.0.txt", "dependencies": { "ajv": "^8.17.1", + "ajv-formats": "^3.0.1", "js-yaml": "^4.1.0" }, "devDependencies": { @@ -1992,6 +1993,22 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", diff --git a/package.json b/package.json index cf902de9..56a48a83 100644 --- a/package.json +++ b/package.json @@ -16,11 +16,12 @@ "prettier": "npx prettier", "lint-staged": "npx lint-staged", "clean": "npx rimraf dist && rimraf out-tsc", - "tools:download-schemas": "npx ts-node --project ./tools/tsconfig.json ./tools/download-schemas.ts", - "tools:generate-merged_json": "npx ts-node --project ./tools/tsconfig.json ./tools/generate-merged_json.ts", - "tools:generate-definitions": "npx ts-node --project ./tools/tsconfig.json ./tools/generate-definitions.ts", - "tools:generate-builders": "npx ts-node --project ./tools/tsconfig.json ./tools/generate-builders.ts", - "update-code-base": "npm run tools:download-schemas && npm run tools:generate-definitions && npm run tools:generate-builders && npm run format && npm run test", + "tools:1_download-schemas": "npx ts-node --project ./tools/tsconfig.json ./tools/1_download-schemas.ts", + "tools:2_generate-definitions": "npx ts-node --project ./tools/tsconfig.json ./tools/2_generate-definitions.ts", + "tools:3_generate-validation-pointers": "npx ts-node --project ./tools/tsconfig.json ./tools/3_generate-validation-pointers.ts", + "tools:4_generate-classes": "npx ts-node --project ./tools/tsconfig.json ./tools/4_generate-classes.ts", + "tools:5_generate-builders": "npx ts-node --project ./tools/tsconfig.json ./tools/5_generate-builders.ts", + "update-code-base": "npm run tools:1_download-schemas && npm run tools:2_generate-definitions && npm run tools:3_generate-validation-pointers && npm run tools:4_generate-classes && npm run tools:5_generate-builders && npm run format && npm run test", "format": "npx prettier --write \"**/*.ts\"", "lint": "npx eslint . --ext .ts && npx prettier --check \"**/*.ts\"", "pretest": "npx rimraf out-tsc", @@ -35,6 +36,7 @@ }, "dependencies": { "ajv": "^8.17.1", + "ajv-formats": "^3.0.1", "js-yaml": "^4.1.0" }, "devDependencies": { diff --git a/src/lib/definitions/README.md b/src/lib/builders/README.md similarity index 100% rename from src/lib/definitions/README.md rename to src/lib/builders/README.md diff --git a/src/lib/definitions/specification.ts b/src/lib/definitions/specification.ts deleted file mode 100644 index 2bf3163f..00000000 --- a/src/lib/definitions/specification.ts +++ /dev/null @@ -1,1106 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -/** - * The schema used to describe and validate the input of the workflow or task. - */ -export type Schema = { - /** - * The schema's format. Defaults to 'json'. The (optional) version of the format can be set using `{format}:{version}`. - */ - format?: string; - [k: string]: unknown; -} & ( - | { - /** - * The schema's inline definition. - */ - document: { - [k: string]: unknown; - }; - [k: string]: unknown; - } - | { - /** - * The schema's external resource. - */ - resource: - | string - | { - /** - * The endpoint's URI. - */ - uri: string; - /** - * The authentication policy to use. - */ - authentication?: AuthenticationPolicy | string; - /** - * The external resource's name, if any. - */ - name?: string; - [k: string]: unknown; - }; - [k: string]: unknown; - } -); -/** - * Defines an authentication policy. - * - * This interface was referenced by `Workflow`'s JSON-Schema - * via the `definition` "authenticationPolicy". - */ -export type AuthenticationPolicy = - | { - basic: { - /** - * The username to use. - */ - username: string; - /** - * The password to use. - */ - password: string; - [k: string]: unknown; - }; - [k: string]: unknown; - } - | { - bearer: { - /** - * The bearer token to use. - */ - token: string; - [k: string]: unknown; - }; - [k: string]: unknown; - } - | { - oauth2: { - /** - * The URI that references the OAuth2 authority to use. - */ - authority: string; - /** - * The grant type to use. - */ - grant: string; - client: { - /** - * The client id to use. - */ - id: string; - /** - * The client secret to use, if any. - */ - secret?: string; - [k: string]: unknown; - }; - /** - * The scopes, if any, to request the token for. - */ - scopes?: string[]; - /** - * The audiences, if any, to request the token for. - */ - audiences?: string[]; - /** - * The username to use. Used only if the grant type is Password. - */ - username?: string; - /** - * The password to use. Used only if the grant type is Password. - */ - password?: string; - subject?: Oauth2Token; - actor?: Oauth2Token; - [k: string]: unknown; - }; - [k: string]: unknown; - }; -/** - * This interface was referenced by `Workflow`'s JSON-Schema - * via the `definition` "task". - */ -export type Task = - | CallTask - | DoTask - | ForkTask - | EmitTask - | ForTask - | ListenTask - | RaiseTask - | RunTask - | SetTask - | SwitchTask - | TryTask - | WaitTask; -/** - * This interface was referenced by `Workflow`'s JSON-Schema - * via the `definition` "callTask". - */ -export type CallTask = CallAsyncAPI | CallGRPC | CallHTTP | CallOpenAPI | CallFunction; -/** - * Defines the event(s) to listen to. - */ -export type EventConsumptionStrategy = - | { - /** - * A list containing all the events that must be consumed. - */ - all: EventFilter[]; - [k: string]: unknown; - } - | { - /** - * A list containing any of the events to consume. - */ - any: EventFilter[]; - [k: string]: unknown; - } - | { - one: EventFilter; - [k: string]: unknown; - }; -/** - * This interface was referenced by `Workflow`'s JSON-Schema - * via the `definition` "externalResource". - */ -export type ExternalResource = - | string - | { - /** - * The endpoint's URI. - */ - uri: string; - /** - * The authentication policy to use. - */ - authentication?: AuthenticationPolicy | string; - /** - * The external resource's name, if any. - */ - name?: string; - [k: string]: unknown; - }; -/** - * The task(s) to execute before the extended task, if any. - */ -export type TaskList = { - [k: string]: Task; -}[]; -/** - * This interface was referenced by `Workflow`'s JSON-Schema - * via the `definition` "flowDirective". - */ -export type FlowDirective = ('continue' | 'exit' | 'end') | string; - -/** - * Serverless Workflow DSL - Workflow Schema - */ -export interface Workflow { - /** - * Documents the workflow - */ - document: { - /** - * The version of the DSL used by the workflow. - */ - dsl: string; - /** - * The workflow's namespace. - */ - namespace: string; - /** - * The workflow's name. - */ - name: string; - /** - * The workflow's semantic version. - */ - version: string; - /** - * The workflow's title. - */ - title?: string; - /** - * The workflow's Markdown summary. - */ - summary?: string; - /** - * A key/value mapping of the workflow's tags, if any. - */ - tags?: { - [k: string]: unknown; - }; - [k: string]: unknown; - }; - input?: Input; - /** - * Defines the workflow's reusable components. - */ - use?: { - /** - * The workflow's reusable authentication policies. - */ - authentications?: { - [k: string]: AuthenticationPolicy; - }; - /** - * The workflow's reusable errors. - */ - errors?: { - [k: string]: Error; - }; - /** - * The workflow's extensions. - */ - extensions?: { - [k: string]: Extension; - }[]; - /** - * The workflow's reusable functions. - */ - functions?: { - [k: string]: Task; - }; - /** - * The workflow's reusable retry policies. - */ - retries?: { - [k: string]: RetryPolicy; - }; - /** - * The workflow's secrets. - */ - secrets?: string[]; - [k: string]: unknown; - }; - do: TaskList; - timeout?: Timeout; - output?: Output; - /** - * Schedules the workflow - */ - schedule?: { - every?: Duration; - /** - * Specifies the schedule using a cron expression, e.g., '0 0 * * *' for daily at midnight." - */ - cron?: string; - after?: Duration; - on?: EventConsumptionStrategy; - [k: string]: unknown; - }; - [k: string]: unknown; -} -/** - * Configures the workflow's input. - */ -export interface Input { - schema?: Schema; - /** - * A runtime expression, if any, used to mutate and/or filter the input of the workflow or task. - */ - from?: string; - [k: string]: unknown; -} -/** - * The security token that represents the identity of the party on behalf of whom the request is being made. - */ -export interface Oauth2Token { - /** - * The security token to use to use. - */ - token: string; - /** - * The type of the security token to use to use. - */ - type: string; - [k: string]: unknown; -} - -/** - * This interface was referenced by `Workflow`'s JSON-Schema - * via the `definition` "error". - */ -export interface Error { - /** - * A URI reference that identifies the error type. - */ - type: string; - /** - * The status code generated by the origin for this occurrence of the error. - */ - status: number; - /** - * A JSON Pointer used to reference the component the error originates from. - */ - instance: string; - /** - * A short, human-readable summary of the error. - */ - title?: string; - /** - * A human-readable explanation specific to this occurrence of the error. - */ - detail?: string; - [k: string]: unknown; -} -/** - * The definition of a an extension. - * - * This interface was referenced by `Workflow`'s JSON-Schema - * via the `definition` "extension". - */ -export interface Extension { - /** - * The type of task to extend. - */ - extend: - | 'call' - | 'composite' - | 'emit' - | 'for' - | 'listen' - | 'raise' - | 'run' - | 'set' - | 'switch' - | 'try' - | 'wait' - | 'all'; - /** - * A runtime expression, if any, used to determine whether or not the extension should apply in the specified context. - */ - when?: string; - before?: TaskList; - after?: TaskList; - [k: string]: unknown; -} -export interface CallAsyncAPI { - call: 'asyncapi'; - /** - * Defines the AsyncAPI call to perform. - */ - with: { - /** - * The document that defines the AsyncAPI operation to call. - */ - document: - | string - | { - /** - * The endpoint's URI. - */ - uri: string; - /** - * The authentication policy to use. - */ - authentication?: AuthenticationPolicy | string; - /** - * The external resource's name, if any. - */ - name?: string; - [k: string]: unknown; - }; - /** - * A reference to the AsyncAPI operation to call. - */ - operationRef: string; - /** - * A a reference to the server to call the specified AsyncAPI operation on. If not set, default to the first server matching the operation's channel. - */ - server?: string; - /** - * The name of the message to use. If not set, defaults to the first message defined by the operation. - */ - message?: string; - /** - * The name of the binding to use. If not set, defaults to the first binding defined by the operation. - */ - binding?: string; - /** - * The payload to call the AsyncAPI operation with, if any. - */ - payload?: { - [k: string]: unknown; - }; - /** - * The authentication policy, if any, to use when calling the AsyncAPI operation. - */ - authentication?: AuthenticationPolicy | string; - }; - [k: string]: unknown; -} -export interface CallGRPC { - call: 'grpc'; - /** - * Defines the GRPC call to perform. - */ - with: { - /** - * The proto resource that describes the GRPC service to call. - */ - proto: - | string - | { - /** - * The endpoint's URI. - */ - uri: string; - /** - * The authentication policy to use. - */ - authentication?: AuthenticationPolicy | string; - /** - * The external resource's name, if any. - */ - name?: string; - [k: string]: unknown; - }; - service: { - /** - * The name of the GRPC service to call. - */ - name: string; - /** - * The hostname of the GRPC service to call. - */ - host: string; - /** - * The port number of the GRPC service to call. - */ - port?: number; - /** - * The endpoint's authentication policy, if any. - */ - authentication?: AuthenticationPolicy | string; - [k: string]: unknown; - }; - /** - * The name of the method to call on the defined GRPC service. - */ - method: string; - /** - * The arguments, if any, to call the method with. - */ - arguments?: { - [k: string]: unknown; - }; - }; - [k: string]: unknown; -} -export interface CallHTTP { - call: 'http'; - /** - * Defines the HTTP call to perform. - */ - with: { - /** - * The HTTP method of the HTTP request to perform. - */ - method: string; - /** - * The HTTP endpoint to send the request to. - */ - endpoint: Endpoint | string; - /** - * A name/value mapping of the headers, if any, of the HTTP request to perform. - */ - headers?: { - [k: string]: unknown; - }; - /** - * The body, if any, of the HTTP request to perform. - */ - body?: { - [k: string]: unknown; - }; - /** - * The http call output format. Defaults to 'content'. - */ - output?: 'raw' | 'content' | 'response'; - }; - [k: string]: unknown; -} -/** - * This interface was referenced by `Workflow`'s JSON-Schema - * via the `definition` "endpoint". - */ -export interface Endpoint { - /** - * The endpoint's URI. - */ - uri: string; - /** - * The authentication policy to use. - */ - authentication?: AuthenticationPolicy | string; - [k: string]: unknown; -} -export interface CallOpenAPI { - call: 'openapi'; - /** - * Defines the OpenAPI call to perform. - */ - with: { - /** - * The document that defines the OpenAPI operation to call. - */ - document: - | string - | { - /** - * The endpoint's URI. - */ - uri: string; - /** - * The authentication policy to use. - */ - authentication?: AuthenticationPolicy | string; - /** - * The external resource's name, if any. - */ - name?: string; - [k: string]: unknown; - }; - /** - * The id of the OpenAPI operation to call. - */ - operationId: string; - /** - * A name/value mapping of the parameters of the OpenAPI operation to call. - */ - parameters?: { - [k: string]: unknown; - }; - /** - * The authentication policy, if any, to use when calling the OpenAPI operation. - */ - authentication?: AuthenticationPolicy | string; - /** - * The http call output format. Defaults to 'content'. - */ - output?: 'raw' | 'content' | 'response'; - }; - [k: string]: unknown; -} -export interface CallFunction { - /** - * The name of the function to call. - */ - call: string; - /** - * A name/value mapping of the parameters, if any, to call the function with. - */ - with?: { - [k: string]: unknown; - }; - [k: string]: unknown; -} -/** - * Allows to execute a list of tasks in sequence - */ -export interface DoTask { - do: TaskList; - [k: string]: unknown; -} -/** - * Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output. - */ -export interface ForkTask { - fork: { - branches: TaskList; - /** - * Indicates whether or not the concurrent tasks are racing against each other, with a single possible winner, which sets the composite task's output. - */ - compete?: boolean; - [k: string]: unknown; - }; - [k: string]: unknown; -} -/** - * Allows workflows to publish events to event brokers or messaging systems, facilitating communication and coordination between different components and services. - */ -export interface EmitTask { - emit: { - event: { - /** - * The event's unique identifier - */ - id?: string; - /** - * Identifies the context in which an event happened - */ - source: string; - /** - * This attribute contains a value describing the type of event related to the originating occurrence. - */ - type: string; - time?: string; - subject?: string; - /** - * Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format. - */ - datacontenttype?: string; - dataschema?: string; - [k: string]: unknown; - }; - [k: string]: unknown; - }; - [k: string]: unknown; -} -/** - * Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets. - */ -export interface ForTask { - for: { - /** - * The name of the variable used to store the current item being enumerated. - */ - each?: string; - /** - * A runtime expression used to get the collection to enumerate. - */ - in: string; - /** - * The name of the variable used to store the index of the current item being enumerated. - */ - at?: string; - [k: string]: unknown; - }; - /** - * A runtime expression that represents the condition, if any, that must be met for the iteration to continue. - */ - while?: string; - do: TaskList; - [k: string]: unknown; -} -/** - * Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems. - */ -export interface ListenTask { - listen: { - to: EventConsumptionStrategy; - [k: string]: unknown; - }; - [k: string]: unknown; -} -/** - * An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes. - * - * This interface was referenced by `Workflow`'s JSON-Schema - * via the `definition` "eventFilter". - */ -export interface EventFilter { - /** - * An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes. - */ - with: { - /** - * The event's unique identifier - */ - id?: string; - /** - * Identifies the context in which an event happened - */ - source?: string; - /** - * This attribute contains a value describing the type of event related to the originating occurrence. - */ - type?: string; - time?: string; - subject?: string; - /** - * Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format. - */ - datacontenttype?: string; - dataschema?: string; - [k: string]: unknown; - }; - /** - * A correlation is a link between events and data, established by mapping event attributes to specific data attributes, allowing for coordinated processing or handling based on event characteristics. - */ - correlate?: { - [k: string]: { - /** - * A runtime expression used to extract the correlation value from the filtered event. - */ - from: string; - /** - * A constant or a runtime expression, if any, used to determine whether or not the extracted correlation value matches expectations. If not set, the first extracted value will be used as the correlation's expectation. - */ - expect?: string; - [k: string]: unknown; - }; - }; - [k: string]: unknown; -} - -/** - * Intentionally triggers and propagates errors. - */ -export interface RaiseTask { - raise: { - error: Error; - [k: string]: unknown; - }; - [k: string]: unknown; -} - -/** - * Provides the capability to execute external containers, shell commands, scripts, or workflows. - */ -export interface RunTask { - run: - | { - container: { - /** - * The name of the container image to run. - */ - image: string; - /** - * The command, if any, to execute on the container - */ - command?: string; - /** - * The container's port mappings, if any. - */ - ports?: { - [k: string]: unknown; - }; - /** - * The container's volume mappings, if any. - */ - volumes?: { - [k: string]: unknown; - }; - /** - * A key/value mapping of the environment variables, if any, to use when running the configured process. - */ - environment?: { - [k: string]: unknown; - }; - [k: string]: unknown; - }; - [k: string]: unknown; - } - | { - script: - | { - code: string; - [k: string]: unknown; - } - | { - source: ExternalResource; - [k: string]: unknown; - }; - [k: string]: unknown; - } - | { - shell: { - /** - * The shell command to run. - */ - command: string; - /** - * A list of the arguments of the shell command to run. - */ - arguments?: { - [k: string]: unknown; - }; - /** - * A key/value mapping of the environment variables, if any, to use when running the configured process. - */ - environment?: { - [k: string]: unknown; - }; - [k: string]: unknown; - }; - [k: string]: unknown; - } - | { - workflow: { - /** - * The namespace the workflow to run belongs to. - */ - namespace: string; - /** - * The name of the workflow to run. - */ - name: string; - /** - * The version of the workflow to run. Defaults to latest - */ - version: string; - /** - * The data, if any, to pass as input to the workflow to execute. The value should be validated against the target workflow's input schema, if specified. - */ - input?: { - [k: string]: unknown; - }; - [k: string]: unknown; - }; - [k: string]: unknown; - }; - [k: string]: unknown; -} -/** - * A task used to set data - */ -export interface SetTask { - /** - * The data to set - */ - set: { - [k: string]: unknown; - }; - [k: string]: unknown; -} -/** - * Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria - */ -export interface SwitchTask { - /** - * @minItems 1 - */ - switch: [ - { - [k: string]: { - /** - * The case's name. - */ - name?: string; - /** - * A runtime expression used to determine whether or not the case matches. - */ - when?: string; - /** - * The flow directive to execute when the case matches. - */ - then?: ('continue' | 'exit' | 'end') | string; - [k: string]: unknown; - }; - }, - ...{ - [k: string]: { - /** - * The case's name. - */ - name?: string; - /** - * A runtime expression used to determine whether or not the case matches. - */ - when?: string; - /** - * The flow directive to execute when the case matches. - */ - then?: ('continue' | 'exit' | 'end') | string; - [k: string]: unknown; - }; - }[], - ]; - [k: string]: unknown; -} -/** - * Serves as a mechanism within workflows to handle errors gracefully, potentially retrying failed tasks before proceeding with alternate ones. - */ -export interface TryTask { - try: TaskList; - catch: { - errors?: { - [k: string]: unknown; - }; - /** - * The name of the runtime expression variable to save the error as. Defaults to 'error'. - */ - as?: string; - /** - * A runtime expression used to determine whether or not to catch the filtered error - */ - when?: string; - /** - * A runtime expression used to determine whether or not to catch the filtered error - */ - exceptWhen?: string; - retry?: RetryPolicy; - do?: TaskList; - [k: string]: unknown; - }; - [k: string]: unknown; -} -/** - * The retry policy to use, if any, when catching errors. - */ -export interface RetryPolicy { - /** - * A runtime expression, if any, used to determine whether or not to retry running the task, in a given context. - */ - when?: string; - /** - * A runtime expression used to determine whether or not to retry running the task, in a given context. - */ - exceptWhen?: string; - delay?: Duration; - /** - * The retry duration backoff. - */ - backoff?: - | { - /** - * The definition of the constant backoff to use, if any. - */ - constant: { - [k: string]: unknown; - }; - [k: string]: unknown; - } - | { - /** - * The definition of the exponential backoff to use, if any. - */ - exponential: { - [k: string]: unknown; - }; - [k: string]: unknown; - } - | { - /** - * The definition of the linear backoff to use, if any. - */ - linear: { - [k: string]: unknown; - }; - [k: string]: unknown; - }; - /** - * The retry limit, if any - */ - limit?: { - attempt?: { - /** - * The maximum amount of retry attempts, if any. - */ - count?: number; - duration?: Duration; - [k: string]: unknown; - }; - duration?: Duration; - [k: string]: unknown; - }; - /** - * The parameters, if any, that control the randomness or variability of the delay between retry attempts. - */ - jitter?: { - from: Duration; - to: Duration; - [k: string]: unknown; - }; - [k: string]: unknown; -} -/** - * The duration to wait between retry attempts. - */ -export interface Duration { - /** - * Number of days, if any. - */ - days?: number; - /** - * Number of days, if any. - */ - hours?: number; - /** - * Number of minutes, if any. - */ - minutes?: number; - /** - * Number of seconds, if any. - */ - seconds?: number; - /** - * Number of milliseconds, if any. - */ - milliseconds?: number; - [k: string]: unknown; -} - -/** - * Allows workflows to pause or delay their execution for a specified period of time. - */ -export interface WaitTask { - wait: Duration; - [k: string]: unknown; -} - -/** - * The workflow's timeout configuration, if any. - */ -export interface Timeout { - after: Duration; - [k: string]: unknown; -} - -/** - * Configures the workflow's output. - */ -export interface Output { - schema?: Schema; - /** - * A runtime expression, if any, used to mutate and/or filter the output of the workflow or task. - */ - as?: string; - [k: string]: unknown; -} - -/** - * This interface was referenced by `Workflow`'s JSON-Schema - * via the `definition` "taskBase". - */ -export interface TaskBase { - /** - * A runtime expression, if any, used to determine whether or not the task should be run. - */ - if?: string; - input?: Input; - output?: Output; - export?: Export; - timeout?: Timeout; - /** - * The flow directive to be performed upon completion of the task. - */ - then?: ('continue' | 'exit' | 'end') | string; - [k: string]: unknown; -} - -/** - * Export task output to context. - */ -export interface Export { - schema?: Schema; - /** - * A runtime expression, if any, used to export the output data to the context. - */ - as?: string; - [k: string]: unknown; -} diff --git a/src/lib/schema/README.md b/src/lib/generated/builders/README.md similarity index 100% rename from src/lib/schema/README.md rename to src/lib/generated/builders/README.md diff --git a/src/lib/generated/builders/all-event-consumption-strategy-builder.ts b/src/lib/generated/builders/all-event-consumption-strategy-builder.ts new file mode 100644 index 00000000..e091692d --- /dev/null +++ b/src/lib/generated/builders/all-event-consumption-strategy-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.AllEventConsumptionStrategy} data The underlying object + * @returns {Specification.AllEventConsumptionStrategy} The validated underlying object + */ +function buildingFn(data: Specification.AllEventConsumptionStrategy): () => Specification.AllEventConsumptionStrategy { + return () => { + const model = new Classes.AllEventConsumptionStrategy(); + Object.assign(model, data); + + validate('AllEventConsumptionStrategy', model); + return model as Specification.AllEventConsumptionStrategy; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.AllEventConsumptionStrategy` + * @returns {Specification.AllEventConsumptionStrategy} A builder for `Specification.AllEventConsumptionStrategy` + */ +export function allEventConsumptionStrategyBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/any-event-consumption-strategy-builder.ts b/src/lib/generated/builders/any-event-consumption-strategy-builder.ts new file mode 100644 index 00000000..739d54ed --- /dev/null +++ b/src/lib/generated/builders/any-event-consumption-strategy-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.AnyEventConsumptionStrategy} data The underlying object + * @returns {Specification.AnyEventConsumptionStrategy} The validated underlying object + */ +function buildingFn(data: Specification.AnyEventConsumptionStrategy): () => Specification.AnyEventConsumptionStrategy { + return () => { + const model = new Classes.AnyEventConsumptionStrategy(); + Object.assign(model, data); + + validate('AnyEventConsumptionStrategy', model); + return model as Specification.AnyEventConsumptionStrategy; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.AnyEventConsumptionStrategy` + * @returns {Specification.AnyEventConsumptionStrategy} A builder for `Specification.AnyEventConsumptionStrategy` + */ +export function anyEventConsumptionStrategyBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/authentication-policy-builder.ts b/src/lib/generated/builders/authentication-policy-builder.ts new file mode 100644 index 00000000..30a6e8af --- /dev/null +++ b/src/lib/generated/builders/authentication-policy-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.AuthenticationPolicy} data The underlying object + * @returns {Specification.AuthenticationPolicy} The validated underlying object + */ +function buildingFn(data: Specification.AuthenticationPolicy): () => Specification.AuthenticationPolicy { + return () => { + const model = new Classes.AuthenticationPolicy(); + Object.assign(model, data); + + validate('AuthenticationPolicy', model); + return model as Specification.AuthenticationPolicy; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.AuthenticationPolicy` + * @returns {Specification.AuthenticationPolicy} A builder for `Specification.AuthenticationPolicy` + */ +export function authenticationPolicyBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/authentication-policy-reference-builder.ts b/src/lib/generated/builders/authentication-policy-reference-builder.ts new file mode 100644 index 00000000..b96f513a --- /dev/null +++ b/src/lib/generated/builders/authentication-policy-reference-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.AuthenticationPolicyReference} data The underlying object + * @returns {Specification.AuthenticationPolicyReference} The validated underlying object + */ +function buildingFn( + data: Specification.AuthenticationPolicyReference, +): () => Specification.AuthenticationPolicyReference { + return () => { + const model = new Classes.AuthenticationPolicyReference(); + Object.assign(model, data); + + validate('AuthenticationPolicyReference', model); + return model as Specification.AuthenticationPolicyReference; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyReference` + * @returns {Specification.AuthenticationPolicyReference} A builder for `Specification.AuthenticationPolicyReference` + */ +export function authenticationPolicyReferenceBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/basic-authentication-policy-builder.ts b/src/lib/generated/builders/basic-authentication-policy-builder.ts new file mode 100644 index 00000000..b2d2cc17 --- /dev/null +++ b/src/lib/generated/builders/basic-authentication-policy-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.BasicAuthenticationPolicy} data The underlying object + * @returns {Specification.BasicAuthenticationPolicy} The validated underlying object + */ +function buildingFn(data: Specification.BasicAuthenticationPolicy): () => Specification.BasicAuthenticationPolicy { + return () => { + const model = new Classes.BasicAuthenticationPolicy(); + Object.assign(model, data); + + validate('BasicAuthenticationPolicy', model); + return model as Specification.BasicAuthenticationPolicy; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.BasicAuthenticationPolicy` + * @returns {Specification.BasicAuthenticationPolicy} A builder for `Specification.BasicAuthenticationPolicy` + */ +export function basicAuthenticationPolicyBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/bearer-authentication-policy-builder.ts b/src/lib/generated/builders/bearer-authentication-policy-builder.ts new file mode 100644 index 00000000..13c0030c --- /dev/null +++ b/src/lib/generated/builders/bearer-authentication-policy-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.BearerAuthenticationPolicy} data The underlying object + * @returns {Specification.BearerAuthenticationPolicy} The validated underlying object + */ +function buildingFn(data: Specification.BearerAuthenticationPolicy): () => Specification.BearerAuthenticationPolicy { + return () => { + const model = new Classes.BearerAuthenticationPolicy(); + Object.assign(model, data); + + validate('BearerAuthenticationPolicy', model); + return model as Specification.BearerAuthenticationPolicy; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.BearerAuthenticationPolicy` + * @returns {Specification.BearerAuthenticationPolicy} A builder for `Specification.BearerAuthenticationPolicy` + */ +export function bearerAuthenticationPolicyBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/call-async-api-builder.ts b/src/lib/generated/builders/call-async-api-builder.ts new file mode 100644 index 00000000..4179b8b9 --- /dev/null +++ b/src/lib/generated/builders/call-async-api-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CallAsyncAPI} data The underlying object + * @returns {Specification.CallAsyncAPI} The validated underlying object + */ +function buildingFn(data: Specification.CallAsyncAPI): () => Specification.CallAsyncAPI { + return () => { + const model = new Classes.CallAsyncAPI(); + Object.assign(model, data); + + validate('CallAsyncAPI', model); + return model as Specification.CallAsyncAPI; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.CallAsyncAPI` + * @returns {Specification.CallAsyncAPI} A builder for `Specification.CallAsyncAPI` + */ +export function callAsyncAPIBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/call-async-api-with-builder.ts b/src/lib/generated/builders/call-async-api-with-builder.ts new file mode 100644 index 00000000..9d5c50c5 --- /dev/null +++ b/src/lib/generated/builders/call-async-api-with-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CallAsyncAPIWith} data The underlying object + * @returns {Specification.CallAsyncAPIWith} The validated underlying object + */ +function buildingFn(data: Specification.CallAsyncAPIWith): () => Specification.CallAsyncAPIWith { + return () => { + const model = new Classes.CallAsyncAPIWith(); + Object.assign(model, data); + + validate('CallAsyncAPIWith', model); + return model as Specification.CallAsyncAPIWith; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.CallAsyncAPIWith` + * @returns {Specification.CallAsyncAPIWith} A builder for `Specification.CallAsyncAPIWith` + */ +export function callAsyncAPIWithBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/call-function-builder.ts b/src/lib/generated/builders/call-function-builder.ts new file mode 100644 index 00000000..da47b823 --- /dev/null +++ b/src/lib/generated/builders/call-function-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CallFunction} data The underlying object + * @returns {Specification.CallFunction} The validated underlying object + */ +function buildingFn(data: Specification.CallFunction): () => Specification.CallFunction { + return () => { + const model = new Classes.CallFunction(); + Object.assign(model, data); + + validate('CallFunction', model); + return model as Specification.CallFunction; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.CallFunction` + * @returns {Specification.CallFunction} A builder for `Specification.CallFunction` + */ +export function callFunctionBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/call-function-with-builder.ts b/src/lib/generated/builders/call-function-with-builder.ts new file mode 100644 index 00000000..d6e03e6f --- /dev/null +++ b/src/lib/generated/builders/call-function-with-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CallFunctionWith} data The underlying object + * @returns {Specification.CallFunctionWith} The validated underlying object + */ +function buildingFn(data: Specification.CallFunctionWith): () => Specification.CallFunctionWith { + return () => { + const model = new Classes.CallFunctionWith(); + Object.assign(model, data); + + validate('CallFunctionWith', model); + return model as Specification.CallFunctionWith; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.CallFunctionWith` + * @returns {Specification.CallFunctionWith} A builder for `Specification.CallFunctionWith` + */ +export function callFunctionWithBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/call-grpc-builder.ts b/src/lib/generated/builders/call-grpc-builder.ts new file mode 100644 index 00000000..2a5183b1 --- /dev/null +++ b/src/lib/generated/builders/call-grpc-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CallGRPC} data The underlying object + * @returns {Specification.CallGRPC} The validated underlying object + */ +function buildingFn(data: Specification.CallGRPC): () => Specification.CallGRPC { + return () => { + const model = new Classes.CallGRPC(); + Object.assign(model, data); + + validate('CallGRPC', model); + return model as Specification.CallGRPC; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.CallGRPC` + * @returns {Specification.CallGRPC} A builder for `Specification.CallGRPC` + */ +export function callGRPCBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/call-grpc-with-arguments-builder.ts b/src/lib/generated/builders/call-grpc-with-arguments-builder.ts new file mode 100644 index 00000000..3801fa54 --- /dev/null +++ b/src/lib/generated/builders/call-grpc-with-arguments-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CallGRPCWithArguments} data The underlying object + * @returns {Specification.CallGRPCWithArguments} The validated underlying object + */ +function buildingFn(data: Specification.CallGRPCWithArguments): () => Specification.CallGRPCWithArguments { + return () => { + const model = new Classes.CallGRPCWithArguments(); + Object.assign(model, data); + + validate('CallGRPCWithArguments', model); + return model as Specification.CallGRPCWithArguments; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.CallGRPCWithArguments` + * @returns {Specification.CallGRPCWithArguments} A builder for `Specification.CallGRPCWithArguments` + */ +export function callGRPCWithArgumentsBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/call-grpc-with-builder.ts b/src/lib/generated/builders/call-grpc-with-builder.ts new file mode 100644 index 00000000..93538133 --- /dev/null +++ b/src/lib/generated/builders/call-grpc-with-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CallGRPCWith} data The underlying object + * @returns {Specification.CallGRPCWith} The validated underlying object + */ +function buildingFn(data: Specification.CallGRPCWith): () => Specification.CallGRPCWith { + return () => { + const model = new Classes.CallGRPCWith(); + Object.assign(model, data); + + validate('CallGRPCWith', model); + return model as Specification.CallGRPCWith; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.CallGRPCWith` + * @returns {Specification.CallGRPCWith} A builder for `Specification.CallGRPCWith` + */ +export function callGRPCWithBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/call-grpc-with-service-builder.ts b/src/lib/generated/builders/call-grpc-with-service-builder.ts new file mode 100644 index 00000000..0574dcdf --- /dev/null +++ b/src/lib/generated/builders/call-grpc-with-service-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CallGRPCWithService} data The underlying object + * @returns {Specification.CallGRPCWithService} The validated underlying object + */ +function buildingFn(data: Specification.CallGRPCWithService): () => Specification.CallGRPCWithService { + return () => { + const model = new Classes.CallGRPCWithService(); + Object.assign(model, data); + + validate('CallGRPCWithService', model); + return model as Specification.CallGRPCWithService; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.CallGRPCWithService` + * @returns {Specification.CallGRPCWithService} A builder for `Specification.CallGRPCWithService` + */ +export function callGRPCWithServiceBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/call-http-builder.ts b/src/lib/generated/builders/call-http-builder.ts new file mode 100644 index 00000000..3345aa16 --- /dev/null +++ b/src/lib/generated/builders/call-http-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CallHTTP} data The underlying object + * @returns {Specification.CallHTTP} The validated underlying object + */ +function buildingFn(data: Specification.CallHTTP): () => Specification.CallHTTP { + return () => { + const model = new Classes.CallHTTP(); + Object.assign(model, data); + + validate('CallHTTP', model); + return model as Specification.CallHTTP; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.CallHTTP` + * @returns {Specification.CallHTTP} A builder for `Specification.CallHTTP` + */ +export function callHTTPBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/call-http-with-body-builder.ts b/src/lib/generated/builders/call-http-with-body-builder.ts new file mode 100644 index 00000000..5f048e9d --- /dev/null +++ b/src/lib/generated/builders/call-http-with-body-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CallHTTPWithBody} data The underlying object + * @returns {Specification.CallHTTPWithBody} The validated underlying object + */ +function buildingFn(data: Specification.CallHTTPWithBody): () => Specification.CallHTTPWithBody { + return () => { + const model = new Classes.CallHTTPWithBody(); + Object.assign(model, data); + + validate('CallHTTPWithBody', model); + return model as Specification.CallHTTPWithBody; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.CallHTTPWithBody` + * @returns {Specification.CallHTTPWithBody} A builder for `Specification.CallHTTPWithBody` + */ +export function callHTTPWithBodyBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/call-http-with-builder.ts b/src/lib/generated/builders/call-http-with-builder.ts new file mode 100644 index 00000000..6312119f --- /dev/null +++ b/src/lib/generated/builders/call-http-with-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CallHTTPWith} data The underlying object + * @returns {Specification.CallHTTPWith} The validated underlying object + */ +function buildingFn(data: Specification.CallHTTPWith): () => Specification.CallHTTPWith { + return () => { + const model = new Classes.CallHTTPWith(); + Object.assign(model, data); + + validate('CallHTTPWith', model); + return model as Specification.CallHTTPWith; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.CallHTTPWith` + * @returns {Specification.CallHTTPWith} A builder for `Specification.CallHTTPWith` + */ +export function callHTTPWithBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/call-http-with-endpoint-builder.ts b/src/lib/generated/builders/call-http-with-endpoint-builder.ts new file mode 100644 index 00000000..8f5de546 --- /dev/null +++ b/src/lib/generated/builders/call-http-with-endpoint-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CallHTTPWithEndpoint} data The underlying object + * @returns {Specification.CallHTTPWithEndpoint} The validated underlying object + */ +function buildingFn(data: Specification.CallHTTPWithEndpoint): () => Specification.CallHTTPWithEndpoint { + return () => { + const model = new Classes.CallHTTPWithEndpoint(); + Object.assign(model, data); + + validate('CallHTTPWithEndpoint', model); + return model as Specification.CallHTTPWithEndpoint; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.CallHTTPWithEndpoint` + * @returns {Specification.CallHTTPWithEndpoint} A builder for `Specification.CallHTTPWithEndpoint` + */ +export function callHTTPWithEndpointBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/call-http-with-headers-builder.ts b/src/lib/generated/builders/call-http-with-headers-builder.ts new file mode 100644 index 00000000..492590a8 --- /dev/null +++ b/src/lib/generated/builders/call-http-with-headers-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CallHTTPWithHeaders} data The underlying object + * @returns {Specification.CallHTTPWithHeaders} The validated underlying object + */ +function buildingFn(data: Specification.CallHTTPWithHeaders): () => Specification.CallHTTPWithHeaders { + return () => { + const model = new Classes.CallHTTPWithHeaders(); + Object.assign(model, data); + + validate('CallHTTPWithHeaders', model); + return model as Specification.CallHTTPWithHeaders; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.CallHTTPWithHeaders` + * @returns {Specification.CallHTTPWithHeaders} A builder for `Specification.CallHTTPWithHeaders` + */ +export function callHTTPWithHeadersBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/call-open-api-builder.ts b/src/lib/generated/builders/call-open-api-builder.ts new file mode 100644 index 00000000..99263d5f --- /dev/null +++ b/src/lib/generated/builders/call-open-api-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CallOpenAPI} data The underlying object + * @returns {Specification.CallOpenAPI} The validated underlying object + */ +function buildingFn(data: Specification.CallOpenAPI): () => Specification.CallOpenAPI { + return () => { + const model = new Classes.CallOpenAPI(); + Object.assign(model, data); + + validate('CallOpenAPI', model); + return model as Specification.CallOpenAPI; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.CallOpenAPI` + * @returns {Specification.CallOpenAPI} A builder for `Specification.CallOpenAPI` + */ +export function callOpenAPIBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/call-open-api-with-builder.ts b/src/lib/generated/builders/call-open-api-with-builder.ts new file mode 100644 index 00000000..7973ad08 --- /dev/null +++ b/src/lib/generated/builders/call-open-api-with-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CallOpenAPIWith} data The underlying object + * @returns {Specification.CallOpenAPIWith} The validated underlying object + */ +function buildingFn(data: Specification.CallOpenAPIWith): () => Specification.CallOpenAPIWith { + return () => { + const model = new Classes.CallOpenAPIWith(); + Object.assign(model, data); + + validate('CallOpenAPIWith', model); + return model as Specification.CallOpenAPIWith; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.CallOpenAPIWith` + * @returns {Specification.CallOpenAPIWith} A builder for `Specification.CallOpenAPIWith` + */ +export function callOpenAPIWithBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/call-open-api-with-parameters-builder.ts b/src/lib/generated/builders/call-open-api-with-parameters-builder.ts new file mode 100644 index 00000000..2c05fe14 --- /dev/null +++ b/src/lib/generated/builders/call-open-api-with-parameters-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CallOpenAPIWithParameters} data The underlying object + * @returns {Specification.CallOpenAPIWithParameters} The validated underlying object + */ +function buildingFn(data: Specification.CallOpenAPIWithParameters): () => Specification.CallOpenAPIWithParameters { + return () => { + const model = new Classes.CallOpenAPIWithParameters(); + Object.assign(model, data); + + validate('CallOpenAPIWithParameters', model); + return model as Specification.CallOpenAPIWithParameters; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.CallOpenAPIWithParameters` + * @returns {Specification.CallOpenAPIWithParameters} A builder for `Specification.CallOpenAPIWithParameters` + */ +export function callOpenAPIWithParametersBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/call-task-builder.ts b/src/lib/generated/builders/call-task-builder.ts new file mode 100644 index 00000000..af0fff54 --- /dev/null +++ b/src/lib/generated/builders/call-task-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CallTask} data The underlying object + * @returns {Specification.CallTask} The validated underlying object + */ +function buildingFn(data: Specification.CallTask): () => Specification.CallTask { + return () => { + const model = new Classes.CallTask(); + Object.assign(model, data); + + validate('CallTask', model); + return model as Specification.CallTask; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.CallTask` + * @returns {Specification.CallTask} A builder for `Specification.CallTask` + */ +export function callTaskBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/catch-builder.ts b/src/lib/generated/builders/catch-builder.ts new file mode 100644 index 00000000..d10e737e --- /dev/null +++ b/src/lib/generated/builders/catch-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Catch} data The underlying object + * @returns {Specification.Catch} The validated underlying object + */ +function buildingFn(data: Specification.Catch): () => Specification.Catch { + return () => { + const model = new Classes.Catch(); + Object.assign(model, data); + + validate('Catch', model); + return model as Specification.Catch; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Catch` + * @returns {Specification.Catch} A builder for `Specification.Catch` + */ +export function catchBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/catch-errors-builder.ts b/src/lib/generated/builders/catch-errors-builder.ts new file mode 100644 index 00000000..246d12ae --- /dev/null +++ b/src/lib/generated/builders/catch-errors-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CatchErrors} data The underlying object + * @returns {Specification.CatchErrors} The validated underlying object + */ +function buildingFn(data: Specification.CatchErrors): () => Specification.CatchErrors { + return () => { + const model = new Classes.CatchErrors(); + Object.assign(model, data); + + validate('CatchErrors', model); + return model as Specification.CatchErrors; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.CatchErrors` + * @returns {Specification.CatchErrors} A builder for `Specification.CatchErrors` + */ +export function catchErrorsBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/constant-backoff-builder.ts b/src/lib/generated/builders/constant-backoff-builder.ts new file mode 100644 index 00000000..6175d876 --- /dev/null +++ b/src/lib/generated/builders/constant-backoff-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ConstantBackoff} data The underlying object + * @returns {Specification.ConstantBackoff} The validated underlying object + */ +function buildingFn(data: Specification.ConstantBackoff): () => Specification.ConstantBackoff { + return () => { + const model = new Classes.ConstantBackoff(); + Object.assign(model, data); + + validate('ConstantBackoff', model); + return model as Specification.ConstantBackoff; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ConstantBackoff` + * @returns {Specification.ConstantBackoff} A builder for `Specification.ConstantBackoff` + */ +export function constantBackoffBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/container-builder.ts b/src/lib/generated/builders/container-builder.ts new file mode 100644 index 00000000..1f7575b6 --- /dev/null +++ b/src/lib/generated/builders/container-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Container} data The underlying object + * @returns {Specification.Container} The validated underlying object + */ +function buildingFn(data: Specification.Container): () => Specification.Container { + return () => { + const model = new Classes.Container(); + Object.assign(model, data); + + validate('Container', model); + return model as Specification.Container; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Container` + * @returns {Specification.Container} A builder for `Specification.Container` + */ +export function containerBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/container-environment-builder.ts b/src/lib/generated/builders/container-environment-builder.ts new file mode 100644 index 00000000..06b0271b --- /dev/null +++ b/src/lib/generated/builders/container-environment-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ContainerEnvironment} data The underlying object + * @returns {Specification.ContainerEnvironment} The validated underlying object + */ +function buildingFn(data: Specification.ContainerEnvironment): () => Specification.ContainerEnvironment { + return () => { + const model = new Classes.ContainerEnvironment(); + Object.assign(model, data); + + validate('ContainerEnvironment', model); + return model as Specification.ContainerEnvironment; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ContainerEnvironment` + * @returns {Specification.ContainerEnvironment} A builder for `Specification.ContainerEnvironment` + */ +export function containerEnvironmentBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/correlate-builder.ts b/src/lib/generated/builders/correlate-builder.ts new file mode 100644 index 00000000..45360406 --- /dev/null +++ b/src/lib/generated/builders/correlate-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Correlate} data The underlying object + * @returns {Specification.Correlate} The validated underlying object + */ +function buildingFn(data: Specification.Correlate): () => Specification.Correlate { + return () => { + const model = new Classes.Correlate(); + Object.assign(model, data); + + validate('Correlate', model); + return model as Specification.Correlate; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Correlate` + * @returns {Specification.Correlate} A builder for `Specification.Correlate` + */ +export function correlateBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/do-task-builder.ts b/src/lib/generated/builders/do-task-builder.ts new file mode 100644 index 00000000..af0f047b --- /dev/null +++ b/src/lib/generated/builders/do-task-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.DoTask} data The underlying object + * @returns {Specification.DoTask} The validated underlying object + */ +function buildingFn(data: Specification.DoTask): () => Specification.DoTask { + return () => { + const model = new Classes.DoTask(); + Object.assign(model, data); + + validate('DoTask', model); + return model as Specification.DoTask; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.DoTask` + * @returns {Specification.DoTask} A builder for `Specification.DoTask` + */ +export function doTaskBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/duration-builder.ts b/src/lib/generated/builders/duration-builder.ts new file mode 100644 index 00000000..fca4a2d8 --- /dev/null +++ b/src/lib/generated/builders/duration-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Duration} data The underlying object + * @returns {Specification.Duration} The validated underlying object + */ +function buildingFn(data: Specification.Duration): () => Specification.Duration { + return () => { + const model = new Classes.Duration(); + Object.assign(model, data); + + validate('Duration', model); + return model as Specification.Duration; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Duration` + * @returns {Specification.Duration} A builder for `Specification.Duration` + */ +export function durationBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/emit-builder.ts b/src/lib/generated/builders/emit-builder.ts new file mode 100644 index 00000000..9b6236fd --- /dev/null +++ b/src/lib/generated/builders/emit-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Emit} data The underlying object + * @returns {Specification.Emit} The validated underlying object + */ +function buildingFn(data: Specification.Emit): () => Specification.Emit { + return () => { + const model = new Classes.Emit(); + Object.assign(model, data); + + validate('Emit', model); + return model as Specification.Emit; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Emit` + * @returns {Specification.Emit} A builder for `Specification.Emit` + */ +export function emitBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/emit-event-builder.ts b/src/lib/generated/builders/emit-event-builder.ts new file mode 100644 index 00000000..2ae80c71 --- /dev/null +++ b/src/lib/generated/builders/emit-event-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.EmitEvent} data The underlying object + * @returns {Specification.EmitEvent} The validated underlying object + */ +function buildingFn(data: Specification.EmitEvent): () => Specification.EmitEvent { + return () => { + const model = new Classes.EmitEvent(); + Object.assign(model, data); + + validate('EmitEvent', model); + return model as Specification.EmitEvent; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.EmitEvent` + * @returns {Specification.EmitEvent} A builder for `Specification.EmitEvent` + */ +export function emitEventBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/emit-task-builder.ts b/src/lib/generated/builders/emit-task-builder.ts new file mode 100644 index 00000000..9f2057a7 --- /dev/null +++ b/src/lib/generated/builders/emit-task-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.EmitTask} data The underlying object + * @returns {Specification.EmitTask} The validated underlying object + */ +function buildingFn(data: Specification.EmitTask): () => Specification.EmitTask { + return () => { + const model = new Classes.EmitTask(); + Object.assign(model, data); + + validate('EmitTask', model); + return model as Specification.EmitTask; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.EmitTask` + * @returns {Specification.EmitTask} A builder for `Specification.EmitTask` + */ +export function emitTaskBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/endpoint-builder.ts b/src/lib/generated/builders/endpoint-builder.ts new file mode 100644 index 00000000..51b8ca04 --- /dev/null +++ b/src/lib/generated/builders/endpoint-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Endpoint} data The underlying object + * @returns {Specification.Endpoint} The validated underlying object + */ +function buildingFn(data: Specification.Endpoint): () => Specification.Endpoint { + return () => { + const model = new Classes.Endpoint(); + Object.assign(model, data); + + validate('Endpoint', model); + return model as Specification.Endpoint; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Endpoint` + * @returns {Specification.Endpoint} A builder for `Specification.Endpoint` + */ +export function endpointBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/error-builder.ts b/src/lib/generated/builders/error-builder.ts new file mode 100644 index 00000000..73dca095 --- /dev/null +++ b/src/lib/generated/builders/error-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Error} data The underlying object + * @returns {Specification.Error} The validated underlying object + */ +function buildingFn(data: Specification.Error): () => Specification.Error { + return () => { + const model = new Classes.Error(); + Object.assign(model, data); + + validate('Error', model); + return model as Specification.Error; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Error` + * @returns {Specification.Error} A builder for `Specification.Error` + */ +export function errorBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/event-consumption-strategy-all-builder.ts b/src/lib/generated/builders/event-consumption-strategy-all-builder.ts new file mode 100644 index 00000000..33e7a2f3 --- /dev/null +++ b/src/lib/generated/builders/event-consumption-strategy-all-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.EventConsumptionStrategyAll} data The underlying object + * @returns {Specification.EventConsumptionStrategyAll} The validated underlying object + */ +function buildingFn(data: Specification.EventConsumptionStrategyAll): () => Specification.EventConsumptionStrategyAll { + return () => { + const model = new Classes.EventConsumptionStrategyAll(); + Object.assign(model, data); + + validate('EventConsumptionStrategyAll', model); + return model as Specification.EventConsumptionStrategyAll; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.EventConsumptionStrategyAll` + * @returns {Specification.EventConsumptionStrategyAll} A builder for `Specification.EventConsumptionStrategyAll` + */ +export function eventConsumptionStrategyAllBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/event-consumption-strategy-any-builder.ts b/src/lib/generated/builders/event-consumption-strategy-any-builder.ts new file mode 100644 index 00000000..669d0357 --- /dev/null +++ b/src/lib/generated/builders/event-consumption-strategy-any-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.EventConsumptionStrategyAny} data The underlying object + * @returns {Specification.EventConsumptionStrategyAny} The validated underlying object + */ +function buildingFn(data: Specification.EventConsumptionStrategyAny): () => Specification.EventConsumptionStrategyAny { + return () => { + const model = new Classes.EventConsumptionStrategyAny(); + Object.assign(model, data); + + validate('EventConsumptionStrategyAny', model); + return model as Specification.EventConsumptionStrategyAny; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.EventConsumptionStrategyAny` + * @returns {Specification.EventConsumptionStrategyAny} A builder for `Specification.EventConsumptionStrategyAny` + */ +export function eventConsumptionStrategyAnyBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/event-consumption-strategy-builder.ts b/src/lib/generated/builders/event-consumption-strategy-builder.ts new file mode 100644 index 00000000..28f5be18 --- /dev/null +++ b/src/lib/generated/builders/event-consumption-strategy-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.EventConsumptionStrategy} data The underlying object + * @returns {Specification.EventConsumptionStrategy} The validated underlying object + */ +function buildingFn(data: Specification.EventConsumptionStrategy): () => Specification.EventConsumptionStrategy { + return () => { + const model = new Classes.EventConsumptionStrategy(); + Object.assign(model, data); + + validate('EventConsumptionStrategy', model); + return model as Specification.EventConsumptionStrategy; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.EventConsumptionStrategy` + * @returns {Specification.EventConsumptionStrategy} A builder for `Specification.EventConsumptionStrategy` + */ +export function eventConsumptionStrategyBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/event-filter-builder.ts b/src/lib/generated/builders/event-filter-builder.ts new file mode 100644 index 00000000..295aad6b --- /dev/null +++ b/src/lib/generated/builders/event-filter-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.EventFilter} data The underlying object + * @returns {Specification.EventFilter} The validated underlying object + */ +function buildingFn(data: Specification.EventFilter): () => Specification.EventFilter { + return () => { + const model = new Classes.EventFilter(); + Object.assign(model, data); + + validate('EventFilter', model); + return model as Specification.EventFilter; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.EventFilter` + * @returns {Specification.EventFilter} A builder for `Specification.EventFilter` + */ +export function eventFilterBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/explicit-basic-authentication-policy-builder.ts b/src/lib/generated/builders/explicit-basic-authentication-policy-builder.ts new file mode 100644 index 00000000..530edea0 --- /dev/null +++ b/src/lib/generated/builders/explicit-basic-authentication-policy-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ExplicitBasicAuthenticationPolicy} data The underlying object + * @returns {Specification.ExplicitBasicAuthenticationPolicy} The validated underlying object + */ +function buildingFn( + data: Specification.ExplicitBasicAuthenticationPolicy, +): () => Specification.ExplicitBasicAuthenticationPolicy { + return () => { + const model = new Classes.ExplicitBasicAuthenticationPolicy(); + Object.assign(model, data); + + validate('ExplicitBasicAuthenticationPolicy', model); + return model as Specification.ExplicitBasicAuthenticationPolicy; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ExplicitBasicAuthenticationPolicy` + * @returns {Specification.ExplicitBasicAuthenticationPolicy} A builder for `Specification.ExplicitBasicAuthenticationPolicy` + */ +export function explicitBasicAuthenticationPolicyBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/explicit-bearer-authentication-policy-builder.ts b/src/lib/generated/builders/explicit-bearer-authentication-policy-builder.ts new file mode 100644 index 00000000..c5b2daca --- /dev/null +++ b/src/lib/generated/builders/explicit-bearer-authentication-policy-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ExplicitBearerAuthenticationPolicy} data The underlying object + * @returns {Specification.ExplicitBearerAuthenticationPolicy} The validated underlying object + */ +function buildingFn( + data: Specification.ExplicitBearerAuthenticationPolicy, +): () => Specification.ExplicitBearerAuthenticationPolicy { + return () => { + const model = new Classes.ExplicitBearerAuthenticationPolicy(); + Object.assign(model, data); + + validate('ExplicitBearerAuthenticationPolicy', model); + return model as Specification.ExplicitBearerAuthenticationPolicy; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ExplicitBearerAuthenticationPolicy` + * @returns {Specification.ExplicitBearerAuthenticationPolicy} A builder for `Specification.ExplicitBearerAuthenticationPolicy` + */ +export function explicitBearerAuthenticationPolicyBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/explicit-o-auth2-authentication-policy-builder.ts b/src/lib/generated/builders/explicit-o-auth2-authentication-policy-builder.ts new file mode 100644 index 00000000..e5d32098 --- /dev/null +++ b/src/lib/generated/builders/explicit-o-auth2-authentication-policy-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ExplicitOAuth2AuthenticationPolicy} data The underlying object + * @returns {Specification.ExplicitOAuth2AuthenticationPolicy} The validated underlying object + */ +function buildingFn( + data: Specification.ExplicitOAuth2AuthenticationPolicy, +): () => Specification.ExplicitOAuth2AuthenticationPolicy { + return () => { + const model = new Classes.ExplicitOAuth2AuthenticationPolicy(); + Object.assign(model, data); + + validate('ExplicitOAuth2AuthenticationPolicy', model); + return model as Specification.ExplicitOAuth2AuthenticationPolicy; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ExplicitOAuth2AuthenticationPolicy` + * @returns {Specification.ExplicitOAuth2AuthenticationPolicy} A builder for `Specification.ExplicitOAuth2AuthenticationPolicy` + */ +export function explicitOAuth2AuthenticationPolicyBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/exponential-back-off-builder.ts b/src/lib/generated/builders/exponential-back-off-builder.ts new file mode 100644 index 00000000..0a636734 --- /dev/null +++ b/src/lib/generated/builders/exponential-back-off-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ExponentialBackOff} data The underlying object + * @returns {Specification.ExponentialBackOff} The validated underlying object + */ +function buildingFn(data: Specification.ExponentialBackOff): () => Specification.ExponentialBackOff { + return () => { + const model = new Classes.ExponentialBackOff(); + Object.assign(model, data); + + validate('ExponentialBackOff', model); + return model as Specification.ExponentialBackOff; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ExponentialBackOff` + * @returns {Specification.ExponentialBackOff} A builder for `Specification.ExponentialBackOff` + */ +export function exponentialBackOffBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/export-as-builder.ts b/src/lib/generated/builders/export-as-builder.ts new file mode 100644 index 00000000..d9f4a205 --- /dev/null +++ b/src/lib/generated/builders/export-as-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ExportAs} data The underlying object + * @returns {Specification.ExportAs} The validated underlying object + */ +function buildingFn(data: Specification.ExportAs): () => Specification.ExportAs { + return () => { + const model = new Classes.ExportAs(); + Object.assign(model, data); + + validate('ExportAs', model); + return model as Specification.ExportAs; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ExportAs` + * @returns {Specification.ExportAs} A builder for `Specification.ExportAs` + */ +export function exportAsBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/export-builder.ts b/src/lib/generated/builders/export-builder.ts new file mode 100644 index 00000000..c0519fc5 --- /dev/null +++ b/src/lib/generated/builders/export-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Export} data The underlying object + * @returns {Specification.Export} The validated underlying object + */ +function buildingFn(data: Specification.Export): () => Specification.Export { + return () => { + const model = new Classes.Export(); + Object.assign(model, data); + + validate('Export', model); + return model as Specification.Export; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Export` + * @returns {Specification.Export} A builder for `Specification.Export` + */ +export function exportBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/extension-builder.ts b/src/lib/generated/builders/extension-builder.ts new file mode 100644 index 00000000..ef32616d --- /dev/null +++ b/src/lib/generated/builders/extension-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Extension} data The underlying object + * @returns {Specification.Extension} The validated underlying object + */ +function buildingFn(data: Specification.Extension): () => Specification.Extension { + return () => { + const model = new Classes.Extension(); + Object.assign(model, data); + + validate('Extension', model); + return model as Specification.Extension; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Extension` + * @returns {Specification.Extension} A builder for `Specification.Extension` + */ +export function extensionBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/extension-item-builder.ts b/src/lib/generated/builders/extension-item-builder.ts new file mode 100644 index 00000000..1a4439b7 --- /dev/null +++ b/src/lib/generated/builders/extension-item-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ExtensionItem} data The underlying object + * @returns {Specification.ExtensionItem} The validated underlying object + */ +function buildingFn(data: Specification.ExtensionItem): () => Specification.ExtensionItem { + return () => { + const model = new Classes.ExtensionItem(); + Object.assign(model, data); + + validate('ExtensionItem', model); + return model as Specification.ExtensionItem; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ExtensionItem` + * @returns {Specification.ExtensionItem} A builder for `Specification.ExtensionItem` + */ +export function extensionItemBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/external-resource-builder.ts b/src/lib/generated/builders/external-resource-builder.ts new file mode 100644 index 00000000..5a2794b2 --- /dev/null +++ b/src/lib/generated/builders/external-resource-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ExternalResource} data The underlying object + * @returns {Specification.ExternalResource} The validated underlying object + */ +function buildingFn(data: Specification.ExternalResource): () => Specification.ExternalResource { + return () => { + const model = new Classes.ExternalResource(); + Object.assign(model, data); + + validate('ExternalResource', model); + return model as Specification.ExternalResource; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ExternalResource` + * @returns {Specification.ExternalResource} A builder for `Specification.ExternalResource` + */ +export function externalResourceBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/external-resource-u-r-i-builder.ts b/src/lib/generated/builders/external-resource-u-r-i-builder.ts new file mode 100644 index 00000000..67e9652a --- /dev/null +++ b/src/lib/generated/builders/external-resource-u-r-i-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ExternalResourceURI} data The underlying object + * @returns {Specification.ExternalResourceURI} The validated underlying object + */ +function buildingFn(data: Specification.ExternalResourceURI): () => Specification.ExternalResourceURI { + return () => { + const model = new Classes.ExternalResourceURI(); + Object.assign(model, data); + + validate('ExternalResourceURI', model); + return model as Specification.ExternalResourceURI; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ExternalResourceURI` + * @returns {Specification.ExternalResourceURI} A builder for `Specification.ExternalResourceURI` + */ +export function externalResourceURIBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/flow-directive-builder.ts b/src/lib/generated/builders/flow-directive-builder.ts new file mode 100644 index 00000000..9b6f6685 --- /dev/null +++ b/src/lib/generated/builders/flow-directive-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.FlowDirective} data The underlying object + * @returns {Specification.FlowDirective} The validated underlying object + */ +function buildingFn(data: Specification.FlowDirective): () => Specification.FlowDirective { + return () => { + const model = new Classes.FlowDirective(); + Object.assign(model, data); + + validate('FlowDirective', model); + return model as Specification.FlowDirective; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.FlowDirective` + * @returns {Specification.FlowDirective} A builder for `Specification.FlowDirective` + */ +export function flowDirectiveBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/flow-directive-enum-builder.ts b/src/lib/generated/builders/flow-directive-enum-builder.ts new file mode 100644 index 00000000..cdec0a0a --- /dev/null +++ b/src/lib/generated/builders/flow-directive-enum-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.FlowDirectiveEnum} data The underlying object + * @returns {Specification.FlowDirectiveEnum} The validated underlying object + */ +function buildingFn(data: Specification.FlowDirectiveEnum): () => Specification.FlowDirectiveEnum { + return () => { + const model = new Classes.FlowDirectiveEnum(); + Object.assign(model, data); + + validate('FlowDirectiveEnum', model); + return model as Specification.FlowDirectiveEnum; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.FlowDirectiveEnum` + * @returns {Specification.FlowDirectiveEnum} A builder for `Specification.FlowDirectiveEnum` + */ +export function flowDirectiveEnumBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/for-builder.ts b/src/lib/generated/builders/for-builder.ts new file mode 100644 index 00000000..1751aff5 --- /dev/null +++ b/src/lib/generated/builders/for-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.For} data The underlying object + * @returns {Specification.For} The validated underlying object + */ +function buildingFn(data: Specification.For): () => Specification.For { + return () => { + const model = new Classes.For(); + Object.assign(model, data); + + validate('For', model); + return model as Specification.For; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.For` + * @returns {Specification.For} A builder for `Specification.For` + */ +export function forBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/for-task-builder.ts b/src/lib/generated/builders/for-task-builder.ts new file mode 100644 index 00000000..c1c43d59 --- /dev/null +++ b/src/lib/generated/builders/for-task-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ForTask} data The underlying object + * @returns {Specification.ForTask} The validated underlying object + */ +function buildingFn(data: Specification.ForTask): () => Specification.ForTask { + return () => { + const model = new Classes.ForTask(); + Object.assign(model, data); + + validate('ForTask', model); + return model as Specification.ForTask; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ForTask` + * @returns {Specification.ForTask} A builder for `Specification.ForTask` + */ +export function forTaskBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/fork-builder.ts b/src/lib/generated/builders/fork-builder.ts new file mode 100644 index 00000000..cbbc83bb --- /dev/null +++ b/src/lib/generated/builders/fork-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Fork} data The underlying object + * @returns {Specification.Fork} The validated underlying object + */ +function buildingFn(data: Specification.Fork): () => Specification.Fork { + return () => { + const model = new Classes.Fork(); + Object.assign(model, data); + + validate('Fork', model); + return model as Specification.Fork; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Fork` + * @returns {Specification.Fork} A builder for `Specification.Fork` + */ +export function forkBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/fork-task-builder.ts b/src/lib/generated/builders/fork-task-builder.ts new file mode 100644 index 00000000..b932a027 --- /dev/null +++ b/src/lib/generated/builders/fork-task-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ForkTask} data The underlying object + * @returns {Specification.ForkTask} The validated underlying object + */ +function buildingFn(data: Specification.ForkTask): () => Specification.ForkTask { + return () => { + const model = new Classes.ForkTask(); + Object.assign(model, data); + + validate('ForkTask', model); + return model as Specification.ForkTask; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ForkTask` + * @returns {Specification.ForkTask} A builder for `Specification.ForkTask` + */ +export function forkTaskBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/index.ts b/src/lib/generated/builders/index.ts new file mode 100644 index 00000000..e51b521f --- /dev/null +++ b/src/lib/generated/builders/index.ts @@ -0,0 +1,134 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export * from './schema-builder'; +export * from './external-resource-builder'; +export * from './referenceable-authentication-policy-builder'; +export * from './referenced-authentication-policy-builder'; +export * from './input-from-builder'; +export * from './authentication-policy-builder'; +export * from './task-builder'; +export * from './call-task-builder'; +export * from './call-http-with-endpoint-builder'; +export * from './output-as-builder'; +export * from './export-as-builder'; +export * from './flow-directive-builder'; +export * from './flow-directive-enum-builder'; +export * from './event-consumption-strategy-builder'; +export * from './event-consumption-strategy-all-builder'; +export * from './event-consumption-strategy-any-builder'; +export * from './run-builder'; +export * from './script-builder'; +export * from './switch-builder'; +export * from './retry-policy-backoff-builder'; +export * from './task-list-builder'; +export * from './workflow-extensions-builder'; +export * from './workflow-secrets-builder'; +export * from './workflow-builder'; +export * from './workflow-document-builder'; +export * from './workflow-tags-builder'; +export * from './input-builder'; +export * from './schema-inline-builder'; +export * from './schema-external-builder'; +export * from './external-resource-u-r-i-builder'; +export * from './authentication-policy-reference-builder'; +export * from './basic-authentication-policy-builder'; +export * from './explicit-basic-authentication-policy-builder'; +export * from './secret-based-authentication-policy-builder'; +export * from './bearer-authentication-policy-builder'; +export * from './explicit-bearer-authentication-policy-builder'; +export * from './o-auth2-authentication-policy-builder'; +export * from './explicit-o-auth2-authentication-policy-builder'; +export * from './oauth2-token-builder'; +export * from './workflow-components-builder'; +export * from './workflow-authentications-builder'; +export * from './workflow-errors-builder'; +export * from './error-builder'; +export * from './extension-item-builder'; +export * from './extension-builder'; +export * from './task-item-builder'; +export * from './call-async-api-builder'; +export * from './call-async-api-with-builder'; +export * from './call-grpc-builder'; +export * from './call-grpc-with-builder'; +export * from './call-grpc-with-service-builder'; +export * from './call-grpc-with-arguments-builder'; +export * from './call-http-builder'; +export * from './call-http-with-builder'; +export * from './endpoint-builder'; +export * from './call-http-with-headers-builder'; +export * from './call-http-with-body-builder'; +export * from './call-open-api-builder'; +export * from './call-open-api-with-builder'; +export * from './call-open-api-with-parameters-builder'; +export * from './call-function-builder'; +export * from './call-function-with-builder'; +export * from './do-task-builder'; +export * from './fork-task-builder'; +export * from './fork-builder'; +export * from './task-base-builder'; +export * from './output-builder'; +export * from './export-builder'; +export * from './timeout-builder'; +export * from './duration-builder'; +export * from './emit-task-builder'; +export * from './emit-builder'; +export * from './emit-event-builder'; +export * from './for-task-builder'; +export * from './for-builder'; +export * from './listen-task-builder'; +export * from './listen-builder'; +export * from './all-event-consumption-strategy-builder'; +export * from './event-filter-builder'; +export * from './with-event-builder'; +export * from './correlate-builder'; +export * from './any-event-consumption-strategy-builder'; +export * from './one-event-consumption-strategy-builder'; +export * from './raise-task-builder'; +export * from './raise-builder'; +export * from './run-task-builder'; +export * from './run-container-builder'; +export * from './container-builder'; +export * from './container-environment-builder'; +export * from './run-script-builder'; +export * from './script-inline-builder'; +export * from './script-external-builder'; +export * from './run-shell-builder'; +export * from './shell-builder'; +export * from './shell-arguments-builder'; +export * from './shell-environment-builder'; +export * from './run-wokflow-builder'; +export * from './run-workflow-descriptor-builder'; +export * from './workflow-input-builder'; +export * from './set-task-builder'; +export * from './set-builder'; +export * from './switch-task-builder'; +export * from './switch-item-builder'; +export * from './switch-case-builder'; +export * from './try-task-builder'; +export * from './catch-builder'; +export * from './catch-errors-builder'; +export * from './retry-policy-builder'; +export * from './constant-backoff-builder'; +export * from './exponential-back-off-builder'; +export * from './linear-backoff-builder'; +export * from './retry-policy-limit-builder'; +export * from './retry-policy-attempt-builder'; +export * from './retry-policy-jitter-builder'; +export * from './wait-task-builder'; +export * from './workflow-functions-builder'; +export * from './workflow-retries-builder'; +export * from './workflow-schedule-builder'; diff --git a/src/lib/generated/builders/input-builder.ts b/src/lib/generated/builders/input-builder.ts new file mode 100644 index 00000000..339cb5ed --- /dev/null +++ b/src/lib/generated/builders/input-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Input} data The underlying object + * @returns {Specification.Input} The validated underlying object + */ +function buildingFn(data: Specification.Input): () => Specification.Input { + return () => { + const model = new Classes.Input(); + Object.assign(model, data); + + validate('Input', model); + return model as Specification.Input; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Input` + * @returns {Specification.Input} A builder for `Specification.Input` + */ +export function inputBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/input-from-builder.ts b/src/lib/generated/builders/input-from-builder.ts new file mode 100644 index 00000000..e67cf76e --- /dev/null +++ b/src/lib/generated/builders/input-from-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.InputFrom} data The underlying object + * @returns {Specification.InputFrom} The validated underlying object + */ +function buildingFn(data: Specification.InputFrom): () => Specification.InputFrom { + return () => { + const model = new Classes.InputFrom(); + Object.assign(model, data); + + validate('InputFrom', model); + return model as Specification.InputFrom; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.InputFrom` + * @returns {Specification.InputFrom} A builder for `Specification.InputFrom` + */ +export function inputFromBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/linear-backoff-builder.ts b/src/lib/generated/builders/linear-backoff-builder.ts new file mode 100644 index 00000000..ae166406 --- /dev/null +++ b/src/lib/generated/builders/linear-backoff-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.LinearBackoff} data The underlying object + * @returns {Specification.LinearBackoff} The validated underlying object + */ +function buildingFn(data: Specification.LinearBackoff): () => Specification.LinearBackoff { + return () => { + const model = new Classes.LinearBackoff(); + Object.assign(model, data); + + validate('LinearBackoff', model); + return model as Specification.LinearBackoff; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.LinearBackoff` + * @returns {Specification.LinearBackoff} A builder for `Specification.LinearBackoff` + */ +export function linearBackoffBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/listen-builder.ts b/src/lib/generated/builders/listen-builder.ts new file mode 100644 index 00000000..77e40f36 --- /dev/null +++ b/src/lib/generated/builders/listen-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Listen} data The underlying object + * @returns {Specification.Listen} The validated underlying object + */ +function buildingFn(data: Specification.Listen): () => Specification.Listen { + return () => { + const model = new Classes.Listen(); + Object.assign(model, data); + + validate('Listen', model); + return model as Specification.Listen; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Listen` + * @returns {Specification.Listen} A builder for `Specification.Listen` + */ +export function listenBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/listen-task-builder.ts b/src/lib/generated/builders/listen-task-builder.ts new file mode 100644 index 00000000..c3cac143 --- /dev/null +++ b/src/lib/generated/builders/listen-task-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ListenTask} data The underlying object + * @returns {Specification.ListenTask} The validated underlying object + */ +function buildingFn(data: Specification.ListenTask): () => Specification.ListenTask { + return () => { + const model = new Classes.ListenTask(); + Object.assign(model, data); + + validate('ListenTask', model); + return model as Specification.ListenTask; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ListenTask` + * @returns {Specification.ListenTask} A builder for `Specification.ListenTask` + */ +export function listenTaskBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/o-auth2-authentication-policy-builder.ts b/src/lib/generated/builders/o-auth2-authentication-policy-builder.ts new file mode 100644 index 00000000..6565658f --- /dev/null +++ b/src/lib/generated/builders/o-auth2-authentication-policy-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.OAuth2AuthenticationPolicy} data The underlying object + * @returns {Specification.OAuth2AuthenticationPolicy} The validated underlying object + */ +function buildingFn(data: Specification.OAuth2AuthenticationPolicy): () => Specification.OAuth2AuthenticationPolicy { + return () => { + const model = new Classes.OAuth2AuthenticationPolicy(); + Object.assign(model, data); + + validate('OAuth2AuthenticationPolicy', model); + return model as Specification.OAuth2AuthenticationPolicy; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.OAuth2AuthenticationPolicy` + * @returns {Specification.OAuth2AuthenticationPolicy} A builder for `Specification.OAuth2AuthenticationPolicy` + */ +export function oAuth2AuthenticationPolicyBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/oauth2-token-builder.ts b/src/lib/generated/builders/oauth2-token-builder.ts new file mode 100644 index 00000000..bfd6ea76 --- /dev/null +++ b/src/lib/generated/builders/oauth2-token-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Oauth2Token} data The underlying object + * @returns {Specification.Oauth2Token} The validated underlying object + */ +function buildingFn(data: Specification.Oauth2Token): () => Specification.Oauth2Token { + return () => { + const model = new Classes.Oauth2Token(); + Object.assign(model, data); + + validate('Oauth2Token', model); + return model as Specification.Oauth2Token; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Oauth2Token` + * @returns {Specification.Oauth2Token} A builder for `Specification.Oauth2Token` + */ +export function oauth2TokenBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/one-event-consumption-strategy-builder.ts b/src/lib/generated/builders/one-event-consumption-strategy-builder.ts new file mode 100644 index 00000000..a1436931 --- /dev/null +++ b/src/lib/generated/builders/one-event-consumption-strategy-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.OneEventConsumptionStrategy} data The underlying object + * @returns {Specification.OneEventConsumptionStrategy} The validated underlying object + */ +function buildingFn(data: Specification.OneEventConsumptionStrategy): () => Specification.OneEventConsumptionStrategy { + return () => { + const model = new Classes.OneEventConsumptionStrategy(); + Object.assign(model, data); + + validate('OneEventConsumptionStrategy', model); + return model as Specification.OneEventConsumptionStrategy; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.OneEventConsumptionStrategy` + * @returns {Specification.OneEventConsumptionStrategy} A builder for `Specification.OneEventConsumptionStrategy` + */ +export function oneEventConsumptionStrategyBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/output-as-builder.ts b/src/lib/generated/builders/output-as-builder.ts new file mode 100644 index 00000000..f280ef59 --- /dev/null +++ b/src/lib/generated/builders/output-as-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.OutputAs} data The underlying object + * @returns {Specification.OutputAs} The validated underlying object + */ +function buildingFn(data: Specification.OutputAs): () => Specification.OutputAs { + return () => { + const model = new Classes.OutputAs(); + Object.assign(model, data); + + validate('OutputAs', model); + return model as Specification.OutputAs; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.OutputAs` + * @returns {Specification.OutputAs} A builder for `Specification.OutputAs` + */ +export function outputAsBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/output-builder.ts b/src/lib/generated/builders/output-builder.ts new file mode 100644 index 00000000..d40462af --- /dev/null +++ b/src/lib/generated/builders/output-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Output} data The underlying object + * @returns {Specification.Output} The validated underlying object + */ +function buildingFn(data: Specification.Output): () => Specification.Output { + return () => { + const model = new Classes.Output(); + Object.assign(model, data); + + validate('Output', model); + return model as Specification.Output; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Output` + * @returns {Specification.Output} A builder for `Specification.Output` + */ +export function outputBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/raise-builder.ts b/src/lib/generated/builders/raise-builder.ts new file mode 100644 index 00000000..27583ca0 --- /dev/null +++ b/src/lib/generated/builders/raise-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Raise} data The underlying object + * @returns {Specification.Raise} The validated underlying object + */ +function buildingFn(data: Specification.Raise): () => Specification.Raise { + return () => { + const model = new Classes.Raise(); + Object.assign(model, data); + + validate('Raise', model); + return model as Specification.Raise; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Raise` + * @returns {Specification.Raise} A builder for `Specification.Raise` + */ +export function raiseBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/raise-task-builder.ts b/src/lib/generated/builders/raise-task-builder.ts new file mode 100644 index 00000000..5ec045b2 --- /dev/null +++ b/src/lib/generated/builders/raise-task-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.RaiseTask} data The underlying object + * @returns {Specification.RaiseTask} The validated underlying object + */ +function buildingFn(data: Specification.RaiseTask): () => Specification.RaiseTask { + return () => { + const model = new Classes.RaiseTask(); + Object.assign(model, data); + + validate('RaiseTask', model); + return model as Specification.RaiseTask; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.RaiseTask` + * @returns {Specification.RaiseTask} A builder for `Specification.RaiseTask` + */ +export function raiseTaskBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/referenceable-authentication-policy-builder.ts b/src/lib/generated/builders/referenceable-authentication-policy-builder.ts new file mode 100644 index 00000000..f550bb88 --- /dev/null +++ b/src/lib/generated/builders/referenceable-authentication-policy-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ReferenceableAuthenticationPolicy} data The underlying object + * @returns {Specification.ReferenceableAuthenticationPolicy} The validated underlying object + */ +function buildingFn( + data: Specification.ReferenceableAuthenticationPolicy, +): () => Specification.ReferenceableAuthenticationPolicy { + return () => { + const model = new Classes.ReferenceableAuthenticationPolicy(); + Object.assign(model, data); + + validate('ReferenceableAuthenticationPolicy', model); + return model as Specification.ReferenceableAuthenticationPolicy; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ReferenceableAuthenticationPolicy` + * @returns {Specification.ReferenceableAuthenticationPolicy} A builder for `Specification.ReferenceableAuthenticationPolicy` + */ +export function referenceableAuthenticationPolicyBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/referenced-authentication-policy-builder.ts b/src/lib/generated/builders/referenced-authentication-policy-builder.ts new file mode 100644 index 00000000..9924acaf --- /dev/null +++ b/src/lib/generated/builders/referenced-authentication-policy-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ReferencedAuthenticationPolicy} data The underlying object + * @returns {Specification.ReferencedAuthenticationPolicy} The validated underlying object + */ +function buildingFn( + data: Specification.ReferencedAuthenticationPolicy, +): () => Specification.ReferencedAuthenticationPolicy { + return () => { + const model = new Classes.ReferencedAuthenticationPolicy(); + Object.assign(model, data); + + validate('ReferencedAuthenticationPolicy', model); + return model as Specification.ReferencedAuthenticationPolicy; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ReferencedAuthenticationPolicy` + * @returns {Specification.ReferencedAuthenticationPolicy} A builder for `Specification.ReferencedAuthenticationPolicy` + */ +export function referencedAuthenticationPolicyBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/retry-policy-attempt-builder.ts b/src/lib/generated/builders/retry-policy-attempt-builder.ts new file mode 100644 index 00000000..67cc9f76 --- /dev/null +++ b/src/lib/generated/builders/retry-policy-attempt-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.RetryPolicyAttempt} data The underlying object + * @returns {Specification.RetryPolicyAttempt} The validated underlying object + */ +function buildingFn(data: Specification.RetryPolicyAttempt): () => Specification.RetryPolicyAttempt { + return () => { + const model = new Classes.RetryPolicyAttempt(); + Object.assign(model, data); + + validate('RetryPolicyAttempt', model); + return model as Specification.RetryPolicyAttempt; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.RetryPolicyAttempt` + * @returns {Specification.RetryPolicyAttempt} A builder for `Specification.RetryPolicyAttempt` + */ +export function retryPolicyAttemptBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/retry-policy-backoff-builder.ts b/src/lib/generated/builders/retry-policy-backoff-builder.ts new file mode 100644 index 00000000..0bc33c72 --- /dev/null +++ b/src/lib/generated/builders/retry-policy-backoff-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.RetryPolicyBackoff} data The underlying object + * @returns {Specification.RetryPolicyBackoff} The validated underlying object + */ +function buildingFn(data: Specification.RetryPolicyBackoff): () => Specification.RetryPolicyBackoff { + return () => { + const model = new Classes.RetryPolicyBackoff(); + Object.assign(model, data); + + validate('RetryPolicyBackoff', model); + return model as Specification.RetryPolicyBackoff; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.RetryPolicyBackoff` + * @returns {Specification.RetryPolicyBackoff} A builder for `Specification.RetryPolicyBackoff` + */ +export function retryPolicyBackoffBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/retry-policy-builder.ts b/src/lib/generated/builders/retry-policy-builder.ts new file mode 100644 index 00000000..a59c87c0 --- /dev/null +++ b/src/lib/generated/builders/retry-policy-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.RetryPolicy} data The underlying object + * @returns {Specification.RetryPolicy} The validated underlying object + */ +function buildingFn(data: Specification.RetryPolicy): () => Specification.RetryPolicy { + return () => { + const model = new Classes.RetryPolicy(); + Object.assign(model, data); + + validate('RetryPolicy', model); + return model as Specification.RetryPolicy; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.RetryPolicy` + * @returns {Specification.RetryPolicy} A builder for `Specification.RetryPolicy` + */ +export function retryPolicyBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/retry-policy-jitter-builder.ts b/src/lib/generated/builders/retry-policy-jitter-builder.ts new file mode 100644 index 00000000..60fccb27 --- /dev/null +++ b/src/lib/generated/builders/retry-policy-jitter-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.RetryPolicyJitter} data The underlying object + * @returns {Specification.RetryPolicyJitter} The validated underlying object + */ +function buildingFn(data: Specification.RetryPolicyJitter): () => Specification.RetryPolicyJitter { + return () => { + const model = new Classes.RetryPolicyJitter(); + Object.assign(model, data); + + validate('RetryPolicyJitter', model); + return model as Specification.RetryPolicyJitter; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.RetryPolicyJitter` + * @returns {Specification.RetryPolicyJitter} A builder for `Specification.RetryPolicyJitter` + */ +export function retryPolicyJitterBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/retry-policy-limit-builder.ts b/src/lib/generated/builders/retry-policy-limit-builder.ts new file mode 100644 index 00000000..96c912ae --- /dev/null +++ b/src/lib/generated/builders/retry-policy-limit-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.RetryPolicyLimit} data The underlying object + * @returns {Specification.RetryPolicyLimit} The validated underlying object + */ +function buildingFn(data: Specification.RetryPolicyLimit): () => Specification.RetryPolicyLimit { + return () => { + const model = new Classes.RetryPolicyLimit(); + Object.assign(model, data); + + validate('RetryPolicyLimit', model); + return model as Specification.RetryPolicyLimit; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.RetryPolicyLimit` + * @returns {Specification.RetryPolicyLimit} A builder for `Specification.RetryPolicyLimit` + */ +export function retryPolicyLimitBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/run-builder.ts b/src/lib/generated/builders/run-builder.ts new file mode 100644 index 00000000..85747c14 --- /dev/null +++ b/src/lib/generated/builders/run-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Run} data The underlying object + * @returns {Specification.Run} The validated underlying object + */ +function buildingFn(data: Specification.Run): () => Specification.Run { + return () => { + const model = new Classes.Run(); + Object.assign(model, data); + + validate('Run', model); + return model as Specification.Run; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Run` + * @returns {Specification.Run} A builder for `Specification.Run` + */ +export function runBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/run-container-builder.ts b/src/lib/generated/builders/run-container-builder.ts new file mode 100644 index 00000000..f7f8feed --- /dev/null +++ b/src/lib/generated/builders/run-container-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.RunContainer} data The underlying object + * @returns {Specification.RunContainer} The validated underlying object + */ +function buildingFn(data: Specification.RunContainer): () => Specification.RunContainer { + return () => { + const model = new Classes.RunContainer(); + Object.assign(model, data); + + validate('RunContainer', model); + return model as Specification.RunContainer; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.RunContainer` + * @returns {Specification.RunContainer} A builder for `Specification.RunContainer` + */ +export function runContainerBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/run-script-builder.ts b/src/lib/generated/builders/run-script-builder.ts new file mode 100644 index 00000000..09d36ebc --- /dev/null +++ b/src/lib/generated/builders/run-script-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.RunScript} data The underlying object + * @returns {Specification.RunScript} The validated underlying object + */ +function buildingFn(data: Specification.RunScript): () => Specification.RunScript { + return () => { + const model = new Classes.RunScript(); + Object.assign(model, data); + + validate('RunScript', model); + return model as Specification.RunScript; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.RunScript` + * @returns {Specification.RunScript} A builder for `Specification.RunScript` + */ +export function runScriptBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/run-shell-builder.ts b/src/lib/generated/builders/run-shell-builder.ts new file mode 100644 index 00000000..3abb5be5 --- /dev/null +++ b/src/lib/generated/builders/run-shell-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.RunShell} data The underlying object + * @returns {Specification.RunShell} The validated underlying object + */ +function buildingFn(data: Specification.RunShell): () => Specification.RunShell { + return () => { + const model = new Classes.RunShell(); + Object.assign(model, data); + + validate('RunShell', model); + return model as Specification.RunShell; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.RunShell` + * @returns {Specification.RunShell} A builder for `Specification.RunShell` + */ +export function runShellBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/run-task-builder.ts b/src/lib/generated/builders/run-task-builder.ts new file mode 100644 index 00000000..b0371084 --- /dev/null +++ b/src/lib/generated/builders/run-task-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.RunTask} data The underlying object + * @returns {Specification.RunTask} The validated underlying object + */ +function buildingFn(data: Specification.RunTask): () => Specification.RunTask { + return () => { + const model = new Classes.RunTask(); + Object.assign(model, data); + + validate('RunTask', model); + return model as Specification.RunTask; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.RunTask` + * @returns {Specification.RunTask} A builder for `Specification.RunTask` + */ +export function runTaskBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/run-wokflow-builder.ts b/src/lib/generated/builders/run-wokflow-builder.ts new file mode 100644 index 00000000..75355bdd --- /dev/null +++ b/src/lib/generated/builders/run-wokflow-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.RunWokflow} data The underlying object + * @returns {Specification.RunWokflow} The validated underlying object + */ +function buildingFn(data: Specification.RunWokflow): () => Specification.RunWokflow { + return () => { + const model = new Classes.RunWokflow(); + Object.assign(model, data); + + validate('RunWokflow', model); + return model as Specification.RunWokflow; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.RunWokflow` + * @returns {Specification.RunWokflow} A builder for `Specification.RunWokflow` + */ +export function runWokflowBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/run-workflow-descriptor-builder.ts b/src/lib/generated/builders/run-workflow-descriptor-builder.ts new file mode 100644 index 00000000..e0d79624 --- /dev/null +++ b/src/lib/generated/builders/run-workflow-descriptor-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.RunWorkflowDescriptor} data The underlying object + * @returns {Specification.RunWorkflowDescriptor} The validated underlying object + */ +function buildingFn(data: Specification.RunWorkflowDescriptor): () => Specification.RunWorkflowDescriptor { + return () => { + const model = new Classes.RunWorkflowDescriptor(); + Object.assign(model, data); + + validate('RunWorkflowDescriptor', model); + return model as Specification.RunWorkflowDescriptor; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.RunWorkflowDescriptor` + * @returns {Specification.RunWorkflowDescriptor} A builder for `Specification.RunWorkflowDescriptor` + */ +export function runWorkflowDescriptorBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/schema-builder.ts b/src/lib/generated/builders/schema-builder.ts new file mode 100644 index 00000000..5bb7be31 --- /dev/null +++ b/src/lib/generated/builders/schema-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Schema} data The underlying object + * @returns {Specification.Schema} The validated underlying object + */ +function buildingFn(data: Specification.Schema): () => Specification.Schema { + return () => { + const model = new Classes.Schema(); + Object.assign(model, data); + + validate('Schema', model); + return model as Specification.Schema; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Schema` + * @returns {Specification.Schema} A builder for `Specification.Schema` + */ +export function schemaBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/schema-external-builder.ts b/src/lib/generated/builders/schema-external-builder.ts new file mode 100644 index 00000000..6492938a --- /dev/null +++ b/src/lib/generated/builders/schema-external-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.SchemaExternal} data The underlying object + * @returns {Specification.SchemaExternal} The validated underlying object + */ +function buildingFn(data: Specification.SchemaExternal): () => Specification.SchemaExternal { + return () => { + const model = new Classes.SchemaExternal(); + Object.assign(model, data); + + validate('SchemaExternal', model); + return model as Specification.SchemaExternal; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.SchemaExternal` + * @returns {Specification.SchemaExternal} A builder for `Specification.SchemaExternal` + */ +export function schemaExternalBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/schema-inline-builder.ts b/src/lib/generated/builders/schema-inline-builder.ts new file mode 100644 index 00000000..8c3b0275 --- /dev/null +++ b/src/lib/generated/builders/schema-inline-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.SchemaInline} data The underlying object + * @returns {Specification.SchemaInline} The validated underlying object + */ +function buildingFn(data: Specification.SchemaInline): () => Specification.SchemaInline { + return () => { + const model = new Classes.SchemaInline(); + Object.assign(model, data); + + validate('SchemaInline', model); + return model as Specification.SchemaInline; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.SchemaInline` + * @returns {Specification.SchemaInline} A builder for `Specification.SchemaInline` + */ +export function schemaInlineBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/script-builder.ts b/src/lib/generated/builders/script-builder.ts new file mode 100644 index 00000000..99c84123 --- /dev/null +++ b/src/lib/generated/builders/script-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Script} data The underlying object + * @returns {Specification.Script} The validated underlying object + */ +function buildingFn(data: Specification.Script): () => Specification.Script { + return () => { + const model = new Classes.Script(); + Object.assign(model, data); + + validate('Script', model); + return model as Specification.Script; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Script` + * @returns {Specification.Script} A builder for `Specification.Script` + */ +export function scriptBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/script-external-builder.ts b/src/lib/generated/builders/script-external-builder.ts new file mode 100644 index 00000000..b2a6ec94 --- /dev/null +++ b/src/lib/generated/builders/script-external-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ScriptExternal} data The underlying object + * @returns {Specification.ScriptExternal} The validated underlying object + */ +function buildingFn(data: Specification.ScriptExternal): () => Specification.ScriptExternal { + return () => { + const model = new Classes.ScriptExternal(); + Object.assign(model, data); + + validate('ScriptExternal', model); + return model as Specification.ScriptExternal; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ScriptExternal` + * @returns {Specification.ScriptExternal} A builder for `Specification.ScriptExternal` + */ +export function scriptExternalBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/script-inline-builder.ts b/src/lib/generated/builders/script-inline-builder.ts new file mode 100644 index 00000000..02dd8bbd --- /dev/null +++ b/src/lib/generated/builders/script-inline-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ScriptInline} data The underlying object + * @returns {Specification.ScriptInline} The validated underlying object + */ +function buildingFn(data: Specification.ScriptInline): () => Specification.ScriptInline { + return () => { + const model = new Classes.ScriptInline(); + Object.assign(model, data); + + validate('ScriptInline', model); + return model as Specification.ScriptInline; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ScriptInline` + * @returns {Specification.ScriptInline} A builder for `Specification.ScriptInline` + */ +export function scriptInlineBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/secret-based-authentication-policy-builder.ts b/src/lib/generated/builders/secret-based-authentication-policy-builder.ts new file mode 100644 index 00000000..8dedcd43 --- /dev/null +++ b/src/lib/generated/builders/secret-based-authentication-policy-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.SecretBasedAuthenticationPolicy} data The underlying object + * @returns {Specification.SecretBasedAuthenticationPolicy} The validated underlying object + */ +function buildingFn( + data: Specification.SecretBasedAuthenticationPolicy, +): () => Specification.SecretBasedAuthenticationPolicy { + return () => { + const model = new Classes.SecretBasedAuthenticationPolicy(); + Object.assign(model, data); + + validate('SecretBasedAuthenticationPolicy', model); + return model as Specification.SecretBasedAuthenticationPolicy; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.SecretBasedAuthenticationPolicy` + * @returns {Specification.SecretBasedAuthenticationPolicy} A builder for `Specification.SecretBasedAuthenticationPolicy` + */ +export function secretBasedAuthenticationPolicyBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/set-builder.ts b/src/lib/generated/builders/set-builder.ts new file mode 100644 index 00000000..d16b245d --- /dev/null +++ b/src/lib/generated/builders/set-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Set} data The underlying object + * @returns {Specification.Set} The validated underlying object + */ +function buildingFn(data: Specification.Set): () => Specification.Set { + return () => { + const model = new Classes.Set(); + Object.assign(model, data); + + validate('Set', model); + return model as Specification.Set; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Set` + * @returns {Specification.Set} A builder for `Specification.Set` + */ +export function setBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/set-task-builder.ts b/src/lib/generated/builders/set-task-builder.ts new file mode 100644 index 00000000..7c58686b --- /dev/null +++ b/src/lib/generated/builders/set-task-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.SetTask} data The underlying object + * @returns {Specification.SetTask} The validated underlying object + */ +function buildingFn(data: Specification.SetTask): () => Specification.SetTask { + return () => { + const model = new Classes.SetTask(); + Object.assign(model, data); + + validate('SetTask', model); + return model as Specification.SetTask; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.SetTask` + * @returns {Specification.SetTask} A builder for `Specification.SetTask` + */ +export function setTaskBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/shell-arguments-builder.ts b/src/lib/generated/builders/shell-arguments-builder.ts new file mode 100644 index 00000000..68399fe6 --- /dev/null +++ b/src/lib/generated/builders/shell-arguments-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ShellArguments} data The underlying object + * @returns {Specification.ShellArguments} The validated underlying object + */ +function buildingFn(data: Specification.ShellArguments): () => Specification.ShellArguments { + return () => { + const model = new Classes.ShellArguments(); + Object.assign(model, data); + + validate('ShellArguments', model); + return model as Specification.ShellArguments; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ShellArguments` + * @returns {Specification.ShellArguments} A builder for `Specification.ShellArguments` + */ +export function shellArgumentsBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/shell-builder.ts b/src/lib/generated/builders/shell-builder.ts new file mode 100644 index 00000000..a1d16a1f --- /dev/null +++ b/src/lib/generated/builders/shell-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Shell} data The underlying object + * @returns {Specification.Shell} The validated underlying object + */ +function buildingFn(data: Specification.Shell): () => Specification.Shell { + return () => { + const model = new Classes.Shell(); + Object.assign(model, data); + + validate('Shell', model); + return model as Specification.Shell; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Shell` + * @returns {Specification.Shell} A builder for `Specification.Shell` + */ +export function shellBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/shell-environment-builder.ts b/src/lib/generated/builders/shell-environment-builder.ts new file mode 100644 index 00000000..95f9f609 --- /dev/null +++ b/src/lib/generated/builders/shell-environment-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ShellEnvironment} data The underlying object + * @returns {Specification.ShellEnvironment} The validated underlying object + */ +function buildingFn(data: Specification.ShellEnvironment): () => Specification.ShellEnvironment { + return () => { + const model = new Classes.ShellEnvironment(); + Object.assign(model, data); + + validate('ShellEnvironment', model); + return model as Specification.ShellEnvironment; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.ShellEnvironment` + * @returns {Specification.ShellEnvironment} A builder for `Specification.ShellEnvironment` + */ +export function shellEnvironmentBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/switch-builder.ts b/src/lib/generated/builders/switch-builder.ts new file mode 100644 index 00000000..9296682e --- /dev/null +++ b/src/lib/generated/builders/switch-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Switch} data The underlying object + * @returns {Specification.Switch} The validated underlying object + */ +function buildingFn(data: Specification.Switch): () => Specification.Switch { + return () => { + const model = new Classes.Switch(); + Object.assign(model, data); + + validate('Switch', model); + return model as Specification.Switch; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Switch` + * @returns {Specification.Switch} A builder for `Specification.Switch` + */ +export function switchBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/switch-case-builder.ts b/src/lib/generated/builders/switch-case-builder.ts new file mode 100644 index 00000000..c9d6db4c --- /dev/null +++ b/src/lib/generated/builders/switch-case-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.SwitchCase} data The underlying object + * @returns {Specification.SwitchCase} The validated underlying object + */ +function buildingFn(data: Specification.SwitchCase): () => Specification.SwitchCase { + return () => { + const model = new Classes.SwitchCase(); + Object.assign(model, data); + + validate('SwitchCase', model); + return model as Specification.SwitchCase; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.SwitchCase` + * @returns {Specification.SwitchCase} A builder for `Specification.SwitchCase` + */ +export function switchCaseBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/switch-item-builder.ts b/src/lib/generated/builders/switch-item-builder.ts new file mode 100644 index 00000000..dc183866 --- /dev/null +++ b/src/lib/generated/builders/switch-item-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.SwitchItem} data The underlying object + * @returns {Specification.SwitchItem} The validated underlying object + */ +function buildingFn(data: Specification.SwitchItem): () => Specification.SwitchItem { + return () => { + const model = new Classes.SwitchItem(); + Object.assign(model, data); + + validate('SwitchItem', model); + return model as Specification.SwitchItem; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.SwitchItem` + * @returns {Specification.SwitchItem} A builder for `Specification.SwitchItem` + */ +export function switchItemBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/switch-task-builder.ts b/src/lib/generated/builders/switch-task-builder.ts new file mode 100644 index 00000000..1320eb1a --- /dev/null +++ b/src/lib/generated/builders/switch-task-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.SwitchTask} data The underlying object + * @returns {Specification.SwitchTask} The validated underlying object + */ +function buildingFn(data: Specification.SwitchTask): () => Specification.SwitchTask { + return () => { + const model = new Classes.SwitchTask(); + Object.assign(model, data); + + validate('SwitchTask', model); + return model as Specification.SwitchTask; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.SwitchTask` + * @returns {Specification.SwitchTask} A builder for `Specification.SwitchTask` + */ +export function switchTaskBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/task-base-builder.ts b/src/lib/generated/builders/task-base-builder.ts new file mode 100644 index 00000000..c778da18 --- /dev/null +++ b/src/lib/generated/builders/task-base-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.TaskBase} data The underlying object + * @returns {Specification.TaskBase} The validated underlying object + */ +function buildingFn(data: Specification.TaskBase): () => Specification.TaskBase { + return () => { + const model = new Classes.TaskBase(); + Object.assign(model, data); + + validate('TaskBase', model); + return model as Specification.TaskBase; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.TaskBase` + * @returns {Specification.TaskBase} A builder for `Specification.TaskBase` + */ +export function taskBaseBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/task-builder.ts b/src/lib/generated/builders/task-builder.ts new file mode 100644 index 00000000..b3908566 --- /dev/null +++ b/src/lib/generated/builders/task-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Task} data The underlying object + * @returns {Specification.Task} The validated underlying object + */ +function buildingFn(data: Specification.Task): () => Specification.Task { + return () => { + const model = new Classes.Task(); + Object.assign(model, data); + + validate('Task', model); + return model as Specification.Task; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Task` + * @returns {Specification.Task} A builder for `Specification.Task` + */ +export function taskBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/task-item-builder.ts b/src/lib/generated/builders/task-item-builder.ts new file mode 100644 index 00000000..7cde5689 --- /dev/null +++ b/src/lib/generated/builders/task-item-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.TaskItem} data The underlying object + * @returns {Specification.TaskItem} The validated underlying object + */ +function buildingFn(data: Specification.TaskItem): () => Specification.TaskItem { + return () => { + const model = new Classes.TaskItem(); + Object.assign(model, data); + + validate('TaskItem', model); + return model as Specification.TaskItem; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.TaskItem` + * @returns {Specification.TaskItem} A builder for `Specification.TaskItem` + */ +export function taskItemBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/task-list-builder.ts b/src/lib/generated/builders/task-list-builder.ts new file mode 100644 index 00000000..7d435aba --- /dev/null +++ b/src/lib/generated/builders/task-list-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.TaskList} data The underlying object + * @returns {Specification.TaskList} The validated underlying object + */ +function buildingFn(data: Specification.TaskList): () => Specification.TaskList { + return () => { + const model = new Classes.TaskList(); + Object.assign(model, data); + + validate('TaskList', model); + return model as Specification.TaskList; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.TaskList` + * @returns {Specification.TaskList} A builder for `Specification.TaskList` + */ +export function taskListBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/timeout-builder.ts b/src/lib/generated/builders/timeout-builder.ts new file mode 100644 index 00000000..9953a49f --- /dev/null +++ b/src/lib/generated/builders/timeout-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Timeout} data The underlying object + * @returns {Specification.Timeout} The validated underlying object + */ +function buildingFn(data: Specification.Timeout): () => Specification.Timeout { + return () => { + const model = new Classes.Timeout(); + Object.assign(model, data); + + validate('Timeout', model); + return model as Specification.Timeout; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Timeout` + * @returns {Specification.Timeout} A builder for `Specification.Timeout` + */ +export function timeoutBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/try-task-builder.ts b/src/lib/generated/builders/try-task-builder.ts new file mode 100644 index 00000000..aa7ddf6f --- /dev/null +++ b/src/lib/generated/builders/try-task-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.TryTask} data The underlying object + * @returns {Specification.TryTask} The validated underlying object + */ +function buildingFn(data: Specification.TryTask): () => Specification.TryTask { + return () => { + const model = new Classes.TryTask(); + Object.assign(model, data); + + validate('TryTask', model); + return model as Specification.TryTask; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.TryTask` + * @returns {Specification.TryTask} A builder for `Specification.TryTask` + */ +export function tryTaskBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/wait-task-builder.ts b/src/lib/generated/builders/wait-task-builder.ts new file mode 100644 index 00000000..82d2309a --- /dev/null +++ b/src/lib/generated/builders/wait-task-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WaitTask} data The underlying object + * @returns {Specification.WaitTask} The validated underlying object + */ +function buildingFn(data: Specification.WaitTask): () => Specification.WaitTask { + return () => { + const model = new Classes.WaitTask(); + Object.assign(model, data); + + validate('WaitTask', model); + return model as Specification.WaitTask; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.WaitTask` + * @returns {Specification.WaitTask} A builder for `Specification.WaitTask` + */ +export function waitTaskBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/with-event-builder.ts b/src/lib/generated/builders/with-event-builder.ts new file mode 100644 index 00000000..04a85ada --- /dev/null +++ b/src/lib/generated/builders/with-event-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WithEvent} data The underlying object + * @returns {Specification.WithEvent} The validated underlying object + */ +function buildingFn(data: Specification.WithEvent): () => Specification.WithEvent { + return () => { + const model = new Classes.WithEvent(); + Object.assign(model, data); + + validate('WithEvent', model); + return model as Specification.WithEvent; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.WithEvent` + * @returns {Specification.WithEvent} A builder for `Specification.WithEvent` + */ +export function withEventBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/workflow-authentications-builder.ts b/src/lib/generated/builders/workflow-authentications-builder.ts new file mode 100644 index 00000000..26567709 --- /dev/null +++ b/src/lib/generated/builders/workflow-authentications-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WorkflowAuthentications} data The underlying object + * @returns {Specification.WorkflowAuthentications} The validated underlying object + */ +function buildingFn(data: Specification.WorkflowAuthentications): () => Specification.WorkflowAuthentications { + return () => { + const model = new Classes.WorkflowAuthentications(); + Object.assign(model, data); + + validate('WorkflowAuthentications', model); + return model as Specification.WorkflowAuthentications; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.WorkflowAuthentications` + * @returns {Specification.WorkflowAuthentications} A builder for `Specification.WorkflowAuthentications` + */ +export function workflowAuthenticationsBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/workflow-builder.ts b/src/lib/generated/builders/workflow-builder.ts new file mode 100644 index 00000000..9a5028ff --- /dev/null +++ b/src/lib/generated/builders/workflow-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Workflow} data The underlying object + * @returns {Specification.Workflow} The validated underlying object + */ +function buildingFn(data: Specification.Workflow): () => Specification.Workflow { + return () => { + const model = new Classes.Workflow(); + Object.assign(model, data); + + validate('Workflow', model); + return model as Specification.Workflow; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.Workflow` + * @returns {Specification.Workflow} A builder for `Specification.Workflow` + */ +export function workflowBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/workflow-components-builder.ts b/src/lib/generated/builders/workflow-components-builder.ts new file mode 100644 index 00000000..b8d0742c --- /dev/null +++ b/src/lib/generated/builders/workflow-components-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WorkflowComponents} data The underlying object + * @returns {Specification.WorkflowComponents} The validated underlying object + */ +function buildingFn(data: Specification.WorkflowComponents): () => Specification.WorkflowComponents { + return () => { + const model = new Classes.WorkflowComponents(); + Object.assign(model, data); + + validate('WorkflowComponents', model); + return model as Specification.WorkflowComponents; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.WorkflowComponents` + * @returns {Specification.WorkflowComponents} A builder for `Specification.WorkflowComponents` + */ +export function workflowComponentsBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/workflow-document-builder.ts b/src/lib/generated/builders/workflow-document-builder.ts new file mode 100644 index 00000000..b6bf9d96 --- /dev/null +++ b/src/lib/generated/builders/workflow-document-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WorkflowDocument} data The underlying object + * @returns {Specification.WorkflowDocument} The validated underlying object + */ +function buildingFn(data: Specification.WorkflowDocument): () => Specification.WorkflowDocument { + return () => { + const model = new Classes.WorkflowDocument(); + Object.assign(model, data); + + validate('WorkflowDocument', model); + return model as Specification.WorkflowDocument; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.WorkflowDocument` + * @returns {Specification.WorkflowDocument} A builder for `Specification.WorkflowDocument` + */ +export function workflowDocumentBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/workflow-errors-builder.ts b/src/lib/generated/builders/workflow-errors-builder.ts new file mode 100644 index 00000000..26a0de6b --- /dev/null +++ b/src/lib/generated/builders/workflow-errors-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WorkflowErrors} data The underlying object + * @returns {Specification.WorkflowErrors} The validated underlying object + */ +function buildingFn(data: Specification.WorkflowErrors): () => Specification.WorkflowErrors { + return () => { + const model = new Classes.WorkflowErrors(); + Object.assign(model, data); + + validate('WorkflowErrors', model); + return model as Specification.WorkflowErrors; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.WorkflowErrors` + * @returns {Specification.WorkflowErrors} A builder for `Specification.WorkflowErrors` + */ +export function workflowErrorsBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/workflow-extensions-builder.ts b/src/lib/generated/builders/workflow-extensions-builder.ts new file mode 100644 index 00000000..f576a9e5 --- /dev/null +++ b/src/lib/generated/builders/workflow-extensions-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WorkflowExtensions} data The underlying object + * @returns {Specification.WorkflowExtensions} The validated underlying object + */ +function buildingFn(data: Specification.WorkflowExtensions): () => Specification.WorkflowExtensions { + return () => { + const model = new Classes.WorkflowExtensions(); + Object.assign(model, data); + + validate('WorkflowExtensions', model); + return model as Specification.WorkflowExtensions; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.WorkflowExtensions` + * @returns {Specification.WorkflowExtensions} A builder for `Specification.WorkflowExtensions` + */ +export function workflowExtensionsBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/workflow-functions-builder.ts b/src/lib/generated/builders/workflow-functions-builder.ts new file mode 100644 index 00000000..8ac2c2af --- /dev/null +++ b/src/lib/generated/builders/workflow-functions-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WorkflowFunctions} data The underlying object + * @returns {Specification.WorkflowFunctions} The validated underlying object + */ +function buildingFn(data: Specification.WorkflowFunctions): () => Specification.WorkflowFunctions { + return () => { + const model = new Classes.WorkflowFunctions(); + Object.assign(model, data); + + validate('WorkflowFunctions', model); + return model as Specification.WorkflowFunctions; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.WorkflowFunctions` + * @returns {Specification.WorkflowFunctions} A builder for `Specification.WorkflowFunctions` + */ +export function workflowFunctionsBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/workflow-input-builder.ts b/src/lib/generated/builders/workflow-input-builder.ts new file mode 100644 index 00000000..f154b57b --- /dev/null +++ b/src/lib/generated/builders/workflow-input-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WorkflowInput} data The underlying object + * @returns {Specification.WorkflowInput} The validated underlying object + */ +function buildingFn(data: Specification.WorkflowInput): () => Specification.WorkflowInput { + return () => { + const model = new Classes.WorkflowInput(); + Object.assign(model, data); + + validate('WorkflowInput', model); + return model as Specification.WorkflowInput; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.WorkflowInput` + * @returns {Specification.WorkflowInput} A builder for `Specification.WorkflowInput` + */ +export function workflowInputBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/workflow-retries-builder.ts b/src/lib/generated/builders/workflow-retries-builder.ts new file mode 100644 index 00000000..91df72b1 --- /dev/null +++ b/src/lib/generated/builders/workflow-retries-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WorkflowRetries} data The underlying object + * @returns {Specification.WorkflowRetries} The validated underlying object + */ +function buildingFn(data: Specification.WorkflowRetries): () => Specification.WorkflowRetries { + return () => { + const model = new Classes.WorkflowRetries(); + Object.assign(model, data); + + validate('WorkflowRetries', model); + return model as Specification.WorkflowRetries; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.WorkflowRetries` + * @returns {Specification.WorkflowRetries} A builder for `Specification.WorkflowRetries` + */ +export function workflowRetriesBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/workflow-schedule-builder.ts b/src/lib/generated/builders/workflow-schedule-builder.ts new file mode 100644 index 00000000..32e54e21 --- /dev/null +++ b/src/lib/generated/builders/workflow-schedule-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WorkflowSchedule} data The underlying object + * @returns {Specification.WorkflowSchedule} The validated underlying object + */ +function buildingFn(data: Specification.WorkflowSchedule): () => Specification.WorkflowSchedule { + return () => { + const model = new Classes.WorkflowSchedule(); + Object.assign(model, data); + + validate('WorkflowSchedule', model); + return model as Specification.WorkflowSchedule; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.WorkflowSchedule` + * @returns {Specification.WorkflowSchedule} A builder for `Specification.WorkflowSchedule` + */ +export function workflowScheduleBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/workflow-secrets-builder.ts b/src/lib/generated/builders/workflow-secrets-builder.ts new file mode 100644 index 00000000..7b1af56b --- /dev/null +++ b/src/lib/generated/builders/workflow-secrets-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WorkflowSecrets} data The underlying object + * @returns {Specification.WorkflowSecrets} The validated underlying object + */ +function buildingFn(data: Specification.WorkflowSecrets): () => Specification.WorkflowSecrets { + return () => { + const model = new Classes.WorkflowSecrets(); + Object.assign(model, data); + + validate('WorkflowSecrets', model); + return model as Specification.WorkflowSecrets; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.WorkflowSecrets` + * @returns {Specification.WorkflowSecrets} A builder for `Specification.WorkflowSecrets` + */ +export function workflowSecretsBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/workflow-tags-builder.ts b/src/lib/generated/builders/workflow-tags-builder.ts new file mode 100644 index 00000000..105448b3 --- /dev/null +++ b/src/lib/generated/builders/workflow-tags-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WorkflowTags} data The underlying object + * @returns {Specification.WorkflowTags} The validated underlying object + */ +function buildingFn(data: Specification.WorkflowTags): () => Specification.WorkflowTags { + return () => { + const model = new Classes.WorkflowTags(); + Object.assign(model, data); + + validate('WorkflowTags', model); + return model as Specification.WorkflowTags; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.WorkflowTags` + * @returns {Specification.WorkflowTags} A builder for `Specification.WorkflowTags` + */ +export function workflowTagsBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/classes/README.md b/src/lib/generated/classes/README.md new file mode 100644 index 00000000..7d5a8642 --- /dev/null +++ b/src/lib/generated/classes/README.md @@ -0,0 +1,2 @@ +# Auto generated notice +This directory and its content has been generated automatically. Do not modify its content, it WILL be lost. \ No newline at end of file diff --git a/src/lib/generated/classes/all-event-consumption-strategy.ts b/src/lib/generated/classes/all-event-consumption-strategy.ts new file mode 100644 index 00000000..7c80e8ee --- /dev/null +++ b/src/lib/generated/classes/all-event-consumption-strategy.ts @@ -0,0 +1 @@ +export class AllEventConsumptionStrategy {} diff --git a/src/lib/generated/classes/any-event-consumption-strategy.ts b/src/lib/generated/classes/any-event-consumption-strategy.ts new file mode 100644 index 00000000..70d2f749 --- /dev/null +++ b/src/lib/generated/classes/any-event-consumption-strategy.ts @@ -0,0 +1 @@ +export class AnyEventConsumptionStrategy {} diff --git a/src/lib/generated/classes/authentication-policy-reference.ts b/src/lib/generated/classes/authentication-policy-reference.ts new file mode 100644 index 00000000..bacce5a3 --- /dev/null +++ b/src/lib/generated/classes/authentication-policy-reference.ts @@ -0,0 +1 @@ +export class AuthenticationPolicyReference {} diff --git a/src/lib/generated/classes/authentication-policy.ts b/src/lib/generated/classes/authentication-policy.ts new file mode 100644 index 00000000..a397449d --- /dev/null +++ b/src/lib/generated/classes/authentication-policy.ts @@ -0,0 +1 @@ +export class AuthenticationPolicy {} diff --git a/src/lib/generated/classes/basic-authentication-policy.ts b/src/lib/generated/classes/basic-authentication-policy.ts new file mode 100644 index 00000000..06487d48 --- /dev/null +++ b/src/lib/generated/classes/basic-authentication-policy.ts @@ -0,0 +1 @@ +export class BasicAuthenticationPolicy {} diff --git a/src/lib/generated/classes/bearer-authentication-policy.ts b/src/lib/generated/classes/bearer-authentication-policy.ts new file mode 100644 index 00000000..66ffd2b8 --- /dev/null +++ b/src/lib/generated/classes/bearer-authentication-policy.ts @@ -0,0 +1 @@ +export class BearerAuthenticationPolicy {} diff --git a/src/lib/generated/classes/call-async-api-with.ts b/src/lib/generated/classes/call-async-api-with.ts new file mode 100644 index 00000000..e43cf276 --- /dev/null +++ b/src/lib/generated/classes/call-async-api-with.ts @@ -0,0 +1 @@ +export class CallAsyncAPIWith {} diff --git a/src/lib/generated/classes/call-async-api.ts b/src/lib/generated/classes/call-async-api.ts new file mode 100644 index 00000000..d3db27b8 --- /dev/null +++ b/src/lib/generated/classes/call-async-api.ts @@ -0,0 +1 @@ +export class CallAsyncAPI {} diff --git a/src/lib/generated/classes/call-function-with.ts b/src/lib/generated/classes/call-function-with.ts new file mode 100644 index 00000000..98c1c1b8 --- /dev/null +++ b/src/lib/generated/classes/call-function-with.ts @@ -0,0 +1 @@ +export class CallFunctionWith {} diff --git a/src/lib/generated/classes/call-function.ts b/src/lib/generated/classes/call-function.ts new file mode 100644 index 00000000..742814a9 --- /dev/null +++ b/src/lib/generated/classes/call-function.ts @@ -0,0 +1 @@ +export class CallFunction {} diff --git a/src/lib/generated/classes/call-grpc-with-arguments.ts b/src/lib/generated/classes/call-grpc-with-arguments.ts new file mode 100644 index 00000000..055470db --- /dev/null +++ b/src/lib/generated/classes/call-grpc-with-arguments.ts @@ -0,0 +1 @@ +export class CallGRPCWithArguments {} diff --git a/src/lib/generated/classes/call-grpc-with-service.ts b/src/lib/generated/classes/call-grpc-with-service.ts new file mode 100644 index 00000000..b5b0da79 --- /dev/null +++ b/src/lib/generated/classes/call-grpc-with-service.ts @@ -0,0 +1 @@ +export class CallGRPCWithService {} diff --git a/src/lib/generated/classes/call-grpc-with.ts b/src/lib/generated/classes/call-grpc-with.ts new file mode 100644 index 00000000..34c6386c --- /dev/null +++ b/src/lib/generated/classes/call-grpc-with.ts @@ -0,0 +1 @@ +export class CallGRPCWith {} diff --git a/src/lib/generated/classes/call-grpc.ts b/src/lib/generated/classes/call-grpc.ts new file mode 100644 index 00000000..86065287 --- /dev/null +++ b/src/lib/generated/classes/call-grpc.ts @@ -0,0 +1 @@ +export class CallGRPC {} diff --git a/src/lib/generated/classes/call-http-with-body.ts b/src/lib/generated/classes/call-http-with-body.ts new file mode 100644 index 00000000..0219644b --- /dev/null +++ b/src/lib/generated/classes/call-http-with-body.ts @@ -0,0 +1 @@ +export class CallHTTPWithBody {} diff --git a/src/lib/generated/classes/call-http-with-endpoint.ts b/src/lib/generated/classes/call-http-with-endpoint.ts new file mode 100644 index 00000000..0fe8fa29 --- /dev/null +++ b/src/lib/generated/classes/call-http-with-endpoint.ts @@ -0,0 +1 @@ +export class CallHTTPWithEndpoint {} diff --git a/src/lib/generated/classes/call-http-with-headers.ts b/src/lib/generated/classes/call-http-with-headers.ts new file mode 100644 index 00000000..885eaf3d --- /dev/null +++ b/src/lib/generated/classes/call-http-with-headers.ts @@ -0,0 +1 @@ +export class CallHTTPWithHeaders {} diff --git a/src/lib/generated/classes/call-http-with.ts b/src/lib/generated/classes/call-http-with.ts new file mode 100644 index 00000000..68e37615 --- /dev/null +++ b/src/lib/generated/classes/call-http-with.ts @@ -0,0 +1 @@ +export class CallHTTPWith {} diff --git a/src/lib/generated/classes/call-http.ts b/src/lib/generated/classes/call-http.ts new file mode 100644 index 00000000..99515d85 --- /dev/null +++ b/src/lib/generated/classes/call-http.ts @@ -0,0 +1 @@ +export class CallHTTP {} diff --git a/src/lib/generated/classes/call-open-api-with-parameters.ts b/src/lib/generated/classes/call-open-api-with-parameters.ts new file mode 100644 index 00000000..00f0dd04 --- /dev/null +++ b/src/lib/generated/classes/call-open-api-with-parameters.ts @@ -0,0 +1 @@ +export class CallOpenAPIWithParameters {} diff --git a/src/lib/generated/classes/call-open-api-with.ts b/src/lib/generated/classes/call-open-api-with.ts new file mode 100644 index 00000000..6027f4e3 --- /dev/null +++ b/src/lib/generated/classes/call-open-api-with.ts @@ -0,0 +1 @@ +export class CallOpenAPIWith {} diff --git a/src/lib/generated/classes/call-open-api.ts b/src/lib/generated/classes/call-open-api.ts new file mode 100644 index 00000000..e2cbae42 --- /dev/null +++ b/src/lib/generated/classes/call-open-api.ts @@ -0,0 +1 @@ +export class CallOpenAPI {} diff --git a/src/lib/generated/classes/call-task.ts b/src/lib/generated/classes/call-task.ts new file mode 100644 index 00000000..86bfb0ce --- /dev/null +++ b/src/lib/generated/classes/call-task.ts @@ -0,0 +1 @@ +export class CallTask {} diff --git a/src/lib/generated/classes/catch-errors.ts b/src/lib/generated/classes/catch-errors.ts new file mode 100644 index 00000000..c5f9ee0e --- /dev/null +++ b/src/lib/generated/classes/catch-errors.ts @@ -0,0 +1 @@ +export class CatchErrors {} diff --git a/src/lib/generated/classes/catch.ts b/src/lib/generated/classes/catch.ts new file mode 100644 index 00000000..3ee3cfa7 --- /dev/null +++ b/src/lib/generated/classes/catch.ts @@ -0,0 +1 @@ +export class Catch {} diff --git a/src/lib/generated/classes/constant-backoff.ts b/src/lib/generated/classes/constant-backoff.ts new file mode 100644 index 00000000..a5277d9a --- /dev/null +++ b/src/lib/generated/classes/constant-backoff.ts @@ -0,0 +1 @@ +export class ConstantBackoff {} diff --git a/src/lib/generated/classes/container-environment.ts b/src/lib/generated/classes/container-environment.ts new file mode 100644 index 00000000..529be6af --- /dev/null +++ b/src/lib/generated/classes/container-environment.ts @@ -0,0 +1 @@ +export class ContainerEnvironment {} diff --git a/src/lib/generated/classes/container.ts b/src/lib/generated/classes/container.ts new file mode 100644 index 00000000..11e8a24c --- /dev/null +++ b/src/lib/generated/classes/container.ts @@ -0,0 +1 @@ +export class Container {} diff --git a/src/lib/generated/classes/correlate.ts b/src/lib/generated/classes/correlate.ts new file mode 100644 index 00000000..15955259 --- /dev/null +++ b/src/lib/generated/classes/correlate.ts @@ -0,0 +1 @@ +export class Correlate {} diff --git a/src/lib/generated/classes/do-task.ts b/src/lib/generated/classes/do-task.ts new file mode 100644 index 00000000..1afa9b37 --- /dev/null +++ b/src/lib/generated/classes/do-task.ts @@ -0,0 +1 @@ +export class DoTask {} diff --git a/src/lib/generated/classes/duration.ts b/src/lib/generated/classes/duration.ts new file mode 100644 index 00000000..4b11d880 --- /dev/null +++ b/src/lib/generated/classes/duration.ts @@ -0,0 +1 @@ +export class Duration {} diff --git a/src/lib/generated/classes/emit-event.ts b/src/lib/generated/classes/emit-event.ts new file mode 100644 index 00000000..36c0a83c --- /dev/null +++ b/src/lib/generated/classes/emit-event.ts @@ -0,0 +1 @@ +export class EmitEvent {} diff --git a/src/lib/generated/classes/emit-task.ts b/src/lib/generated/classes/emit-task.ts new file mode 100644 index 00000000..9027bfe6 --- /dev/null +++ b/src/lib/generated/classes/emit-task.ts @@ -0,0 +1 @@ +export class EmitTask {} diff --git a/src/lib/generated/classes/emit.ts b/src/lib/generated/classes/emit.ts new file mode 100644 index 00000000..dd73e4ac --- /dev/null +++ b/src/lib/generated/classes/emit.ts @@ -0,0 +1 @@ +export class Emit {} diff --git a/src/lib/generated/classes/endpoint.ts b/src/lib/generated/classes/endpoint.ts new file mode 100644 index 00000000..b9fcff6f --- /dev/null +++ b/src/lib/generated/classes/endpoint.ts @@ -0,0 +1 @@ +export class Endpoint {} diff --git a/src/lib/generated/classes/error.ts b/src/lib/generated/classes/error.ts new file mode 100644 index 00000000..95382cb7 --- /dev/null +++ b/src/lib/generated/classes/error.ts @@ -0,0 +1 @@ +export class Error {} diff --git a/src/lib/generated/classes/event-consumption-strategy-all.ts b/src/lib/generated/classes/event-consumption-strategy-all.ts new file mode 100644 index 00000000..0bf42dd9 --- /dev/null +++ b/src/lib/generated/classes/event-consumption-strategy-all.ts @@ -0,0 +1 @@ +export class EventConsumptionStrategyAll {} diff --git a/src/lib/generated/classes/event-consumption-strategy-any.ts b/src/lib/generated/classes/event-consumption-strategy-any.ts new file mode 100644 index 00000000..303554f5 --- /dev/null +++ b/src/lib/generated/classes/event-consumption-strategy-any.ts @@ -0,0 +1 @@ +export class EventConsumptionStrategyAny {} diff --git a/src/lib/generated/classes/event-consumption-strategy.ts b/src/lib/generated/classes/event-consumption-strategy.ts new file mode 100644 index 00000000..2b956e29 --- /dev/null +++ b/src/lib/generated/classes/event-consumption-strategy.ts @@ -0,0 +1 @@ +export class EventConsumptionStrategy {} diff --git a/src/lib/generated/classes/event-filter.ts b/src/lib/generated/classes/event-filter.ts new file mode 100644 index 00000000..435107c8 --- /dev/null +++ b/src/lib/generated/classes/event-filter.ts @@ -0,0 +1 @@ +export class EventFilter {} diff --git a/src/lib/generated/classes/explicit-basic-authentication-policy.ts b/src/lib/generated/classes/explicit-basic-authentication-policy.ts new file mode 100644 index 00000000..179b71d0 --- /dev/null +++ b/src/lib/generated/classes/explicit-basic-authentication-policy.ts @@ -0,0 +1 @@ +export class ExplicitBasicAuthenticationPolicy {} diff --git a/src/lib/generated/classes/explicit-bearer-authentication-policy.ts b/src/lib/generated/classes/explicit-bearer-authentication-policy.ts new file mode 100644 index 00000000..e151be63 --- /dev/null +++ b/src/lib/generated/classes/explicit-bearer-authentication-policy.ts @@ -0,0 +1 @@ +export class ExplicitBearerAuthenticationPolicy {} diff --git a/src/lib/generated/classes/explicit-o-auth2-authentication-policy.ts b/src/lib/generated/classes/explicit-o-auth2-authentication-policy.ts new file mode 100644 index 00000000..189e40e5 --- /dev/null +++ b/src/lib/generated/classes/explicit-o-auth2-authentication-policy.ts @@ -0,0 +1 @@ +export class ExplicitOAuth2AuthenticationPolicy {} diff --git a/src/lib/generated/classes/exponential-back-off.ts b/src/lib/generated/classes/exponential-back-off.ts new file mode 100644 index 00000000..2ea6526f --- /dev/null +++ b/src/lib/generated/classes/exponential-back-off.ts @@ -0,0 +1 @@ +export class ExponentialBackOff {} diff --git a/src/lib/generated/classes/export-as.ts b/src/lib/generated/classes/export-as.ts new file mode 100644 index 00000000..b78275c4 --- /dev/null +++ b/src/lib/generated/classes/export-as.ts @@ -0,0 +1 @@ +export class ExportAs {} diff --git a/src/lib/generated/classes/export.ts b/src/lib/generated/classes/export.ts new file mode 100644 index 00000000..25b13ba1 --- /dev/null +++ b/src/lib/generated/classes/export.ts @@ -0,0 +1 @@ +export class Export {} diff --git a/src/lib/generated/classes/extension-item.ts b/src/lib/generated/classes/extension-item.ts new file mode 100644 index 00000000..13e73024 --- /dev/null +++ b/src/lib/generated/classes/extension-item.ts @@ -0,0 +1 @@ +export class ExtensionItem {} diff --git a/src/lib/generated/classes/extension.ts b/src/lib/generated/classes/extension.ts new file mode 100644 index 00000000..0db97816 --- /dev/null +++ b/src/lib/generated/classes/extension.ts @@ -0,0 +1 @@ +export class Extension {} diff --git a/src/lib/generated/classes/external-resource-u-r-i.ts b/src/lib/generated/classes/external-resource-u-r-i.ts new file mode 100644 index 00000000..76a4f433 --- /dev/null +++ b/src/lib/generated/classes/external-resource-u-r-i.ts @@ -0,0 +1 @@ +export class ExternalResourceURI {} diff --git a/src/lib/generated/classes/external-resource.ts b/src/lib/generated/classes/external-resource.ts new file mode 100644 index 00000000..18174e80 --- /dev/null +++ b/src/lib/generated/classes/external-resource.ts @@ -0,0 +1 @@ +export class ExternalResource {} diff --git a/src/lib/generated/classes/flow-directive-enum.ts b/src/lib/generated/classes/flow-directive-enum.ts new file mode 100644 index 00000000..0c7744a4 --- /dev/null +++ b/src/lib/generated/classes/flow-directive-enum.ts @@ -0,0 +1 @@ +export class FlowDirectiveEnum {} diff --git a/src/lib/generated/classes/flow-directive.ts b/src/lib/generated/classes/flow-directive.ts new file mode 100644 index 00000000..bc34e6b7 --- /dev/null +++ b/src/lib/generated/classes/flow-directive.ts @@ -0,0 +1 @@ +export class FlowDirective {} diff --git a/src/lib/generated/classes/for-task.ts b/src/lib/generated/classes/for-task.ts new file mode 100644 index 00000000..32dbee83 --- /dev/null +++ b/src/lib/generated/classes/for-task.ts @@ -0,0 +1 @@ +export class ForTask {} diff --git a/src/lib/generated/classes/for.ts b/src/lib/generated/classes/for.ts new file mode 100644 index 00000000..03f18692 --- /dev/null +++ b/src/lib/generated/classes/for.ts @@ -0,0 +1 @@ +export class For {} diff --git a/src/lib/generated/classes/fork-task.ts b/src/lib/generated/classes/fork-task.ts new file mode 100644 index 00000000..943ab5a3 --- /dev/null +++ b/src/lib/generated/classes/fork-task.ts @@ -0,0 +1 @@ +export class ForkTask {} diff --git a/src/lib/generated/classes/fork.ts b/src/lib/generated/classes/fork.ts new file mode 100644 index 00000000..854b1cb7 --- /dev/null +++ b/src/lib/generated/classes/fork.ts @@ -0,0 +1 @@ +export class Fork {} diff --git a/src/lib/generated/classes/index.ts b/src/lib/generated/classes/index.ts new file mode 100644 index 00000000..a216ed00 --- /dev/null +++ b/src/lib/generated/classes/index.ts @@ -0,0 +1,255 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Schema } from './schema'; +import { ExternalResource } from './external-resource'; +import { ReferenceableAuthenticationPolicy } from './referenceable-authentication-policy'; +import { ReferencedAuthenticationPolicy } from './referenced-authentication-policy'; +import { InputFrom } from './input-from'; +import { AuthenticationPolicy } from './authentication-policy'; +import { Task } from './task'; +import { CallTask } from './call-task'; +import { CallHTTPWithEndpoint } from './call-http-with-endpoint'; +import { OutputAs } from './output-as'; +import { ExportAs } from './export-as'; +import { FlowDirective } from './flow-directive'; +import { FlowDirectiveEnum } from './flow-directive-enum'; +import { EventConsumptionStrategy } from './event-consumption-strategy'; +import { EventConsumptionStrategyAll } from './event-consumption-strategy-all'; +import { EventConsumptionStrategyAny } from './event-consumption-strategy-any'; +import { Run } from './run'; +import { Script } from './script'; +import { Switch } from './switch'; +import { RetryPolicyBackoff } from './retry-policy-backoff'; +import { TaskList } from './task-list'; +import { WorkflowExtensions } from './workflow-extensions'; +import { WorkflowSecrets } from './workflow-secrets'; +import { Workflow } from './workflow'; +import { WorkflowDocument } from './workflow-document'; +import { WorkflowTags } from './workflow-tags'; +import { Input } from './input'; +import { SchemaInline } from './schema-inline'; +import { SchemaExternal } from './schema-external'; +import { ExternalResourceURI } from './external-resource-u-r-i'; +import { AuthenticationPolicyReference } from './authentication-policy-reference'; +import { BasicAuthenticationPolicy } from './basic-authentication-policy'; +import { ExplicitBasicAuthenticationPolicy } from './explicit-basic-authentication-policy'; +import { SecretBasedAuthenticationPolicy } from './secret-based-authentication-policy'; +import { BearerAuthenticationPolicy } from './bearer-authentication-policy'; +import { ExplicitBearerAuthenticationPolicy } from './explicit-bearer-authentication-policy'; +import { OAuth2AuthenticationPolicy } from './o-auth2-authentication-policy'; +import { ExplicitOAuth2AuthenticationPolicy } from './explicit-o-auth2-authentication-policy'; +import { Oauth2Token } from './oauth2-token'; +import { WorkflowComponents } from './workflow-components'; +import { WorkflowAuthentications } from './workflow-authentications'; +import { WorkflowErrors } from './workflow-errors'; +import { Error } from './error'; +import { ExtensionItem } from './extension-item'; +import { Extension } from './extension'; +import { TaskItem } from './task-item'; +import { CallAsyncAPI } from './call-async-api'; +import { CallAsyncAPIWith } from './call-async-api-with'; +import { CallGRPC } from './call-grpc'; +import { CallGRPCWith } from './call-grpc-with'; +import { CallGRPCWithService } from './call-grpc-with-service'; +import { CallGRPCWithArguments } from './call-grpc-with-arguments'; +import { CallHTTP } from './call-http'; +import { CallHTTPWith } from './call-http-with'; +import { Endpoint } from './endpoint'; +import { CallHTTPWithHeaders } from './call-http-with-headers'; +import { CallHTTPWithBody } from './call-http-with-body'; +import { CallOpenAPI } from './call-open-api'; +import { CallOpenAPIWith } from './call-open-api-with'; +import { CallOpenAPIWithParameters } from './call-open-api-with-parameters'; +import { CallFunction } from './call-function'; +import { CallFunctionWith } from './call-function-with'; +import { DoTask } from './do-task'; +import { ForkTask } from './fork-task'; +import { Fork } from './fork'; +import { TaskBase } from './task-base'; +import { Output } from './output'; +import { Export } from './export'; +import { Timeout } from './timeout'; +import { Duration } from './duration'; +import { EmitTask } from './emit-task'; +import { Emit } from './emit'; +import { EmitEvent } from './emit-event'; +import { ForTask } from './for-task'; +import { For } from './for'; +import { ListenTask } from './listen-task'; +import { Listen } from './listen'; +import { AllEventConsumptionStrategy } from './all-event-consumption-strategy'; +import { EventFilter } from './event-filter'; +import { WithEvent } from './with-event'; +import { Correlate } from './correlate'; +import { AnyEventConsumptionStrategy } from './any-event-consumption-strategy'; +import { OneEventConsumptionStrategy } from './one-event-consumption-strategy'; +import { RaiseTask } from './raise-task'; +import { Raise } from './raise'; +import { RunTask } from './run-task'; +import { RunContainer } from './run-container'; +import { Container } from './container'; +import { ContainerEnvironment } from './container-environment'; +import { RunScript } from './run-script'; +import { ScriptInline } from './script-inline'; +import { ScriptExternal } from './script-external'; +import { RunShell } from './run-shell'; +import { Shell } from './shell'; +import { ShellArguments } from './shell-arguments'; +import { ShellEnvironment } from './shell-environment'; +import { RunWokflow } from './run-wokflow'; +import { RunWorkflowDescriptor } from './run-workflow-descriptor'; +import { WorkflowInput } from './workflow-input'; +import { SetTask } from './set-task'; +import { Set } from './set'; +import { SwitchTask } from './switch-task'; +import { SwitchItem } from './switch-item'; +import { SwitchCase } from './switch-case'; +import { TryTask } from './try-task'; +import { Catch } from './catch'; +import { CatchErrors } from './catch-errors'; +import { RetryPolicy } from './retry-policy'; +import { ConstantBackoff } from './constant-backoff'; +import { ExponentialBackOff } from './exponential-back-off'; +import { LinearBackoff } from './linear-backoff'; +import { RetryPolicyLimit } from './retry-policy-limit'; +import { RetryPolicyAttempt } from './retry-policy-attempt'; +import { RetryPolicyJitter } from './retry-policy-jitter'; +import { WaitTask } from './wait-task'; +import { WorkflowFunctions } from './workflow-functions'; +import { WorkflowRetries } from './workflow-retries'; +import { WorkflowSchedule } from './workflow-schedule'; + +export const Classes = { + Schema, + ExternalResource, + ReferenceableAuthenticationPolicy, + ReferencedAuthenticationPolicy, + InputFrom, + AuthenticationPolicy, + Task, + CallTask, + CallHTTPWithEndpoint, + OutputAs, + ExportAs, + FlowDirective, + FlowDirectiveEnum, + EventConsumptionStrategy, + EventConsumptionStrategyAll, + EventConsumptionStrategyAny, + Run, + Script, + Switch, + RetryPolicyBackoff, + TaskList, + WorkflowExtensions, + WorkflowSecrets, + Workflow, + WorkflowDocument, + WorkflowTags, + Input, + SchemaInline, + SchemaExternal, + ExternalResourceURI, + AuthenticationPolicyReference, + BasicAuthenticationPolicy, + ExplicitBasicAuthenticationPolicy, + SecretBasedAuthenticationPolicy, + BearerAuthenticationPolicy, + ExplicitBearerAuthenticationPolicy, + OAuth2AuthenticationPolicy, + ExplicitOAuth2AuthenticationPolicy, + Oauth2Token, + WorkflowComponents, + WorkflowAuthentications, + WorkflowErrors, + Error, + ExtensionItem, + Extension, + TaskItem, + CallAsyncAPI, + CallAsyncAPIWith, + CallGRPC, + CallGRPCWith, + CallGRPCWithService, + CallGRPCWithArguments, + CallHTTP, + CallHTTPWith, + Endpoint, + CallHTTPWithHeaders, + CallHTTPWithBody, + CallOpenAPI, + CallOpenAPIWith, + CallOpenAPIWithParameters, + CallFunction, + CallFunctionWith, + DoTask, + ForkTask, + Fork, + TaskBase, + Output, + Export, + Timeout, + Duration, + EmitTask, + Emit, + EmitEvent, + ForTask, + For, + ListenTask, + Listen, + AllEventConsumptionStrategy, + EventFilter, + WithEvent, + Correlate, + AnyEventConsumptionStrategy, + OneEventConsumptionStrategy, + RaiseTask, + Raise, + RunTask, + RunContainer, + Container, + ContainerEnvironment, + RunScript, + ScriptInline, + ScriptExternal, + RunShell, + Shell, + ShellArguments, + ShellEnvironment, + RunWokflow, + RunWorkflowDescriptor, + WorkflowInput, + SetTask, + Set, + SwitchTask, + SwitchItem, + SwitchCase, + TryTask, + Catch, + CatchErrors, + RetryPolicy, + ConstantBackoff, + ExponentialBackOff, + LinearBackoff, + RetryPolicyLimit, + RetryPolicyAttempt, + RetryPolicyJitter, + WaitTask, + WorkflowFunctions, + WorkflowRetries, + WorkflowSchedule, +}; diff --git a/src/lib/generated/classes/input-from.ts b/src/lib/generated/classes/input-from.ts new file mode 100644 index 00000000..883b5753 --- /dev/null +++ b/src/lib/generated/classes/input-from.ts @@ -0,0 +1 @@ +export class InputFrom {} diff --git a/src/lib/generated/classes/input.ts b/src/lib/generated/classes/input.ts new file mode 100644 index 00000000..d0be6c1c --- /dev/null +++ b/src/lib/generated/classes/input.ts @@ -0,0 +1 @@ +export class Input {} diff --git a/src/lib/generated/classes/linear-backoff.ts b/src/lib/generated/classes/linear-backoff.ts new file mode 100644 index 00000000..e521dc55 --- /dev/null +++ b/src/lib/generated/classes/linear-backoff.ts @@ -0,0 +1 @@ +export class LinearBackoff {} diff --git a/src/lib/generated/classes/listen-task.ts b/src/lib/generated/classes/listen-task.ts new file mode 100644 index 00000000..573fbf80 --- /dev/null +++ b/src/lib/generated/classes/listen-task.ts @@ -0,0 +1 @@ +export class ListenTask {} diff --git a/src/lib/generated/classes/listen.ts b/src/lib/generated/classes/listen.ts new file mode 100644 index 00000000..aa7a5e73 --- /dev/null +++ b/src/lib/generated/classes/listen.ts @@ -0,0 +1 @@ +export class Listen {} diff --git a/src/lib/generated/classes/o-auth2-authentication-policy.ts b/src/lib/generated/classes/o-auth2-authentication-policy.ts new file mode 100644 index 00000000..b7c6e415 --- /dev/null +++ b/src/lib/generated/classes/o-auth2-authentication-policy.ts @@ -0,0 +1 @@ +export class OAuth2AuthenticationPolicy {} diff --git a/src/lib/generated/classes/oauth2-token.ts b/src/lib/generated/classes/oauth2-token.ts new file mode 100644 index 00000000..cb5ca152 --- /dev/null +++ b/src/lib/generated/classes/oauth2-token.ts @@ -0,0 +1 @@ +export class Oauth2Token {} diff --git a/src/lib/generated/classes/one-event-consumption-strategy.ts b/src/lib/generated/classes/one-event-consumption-strategy.ts new file mode 100644 index 00000000..fe26d261 --- /dev/null +++ b/src/lib/generated/classes/one-event-consumption-strategy.ts @@ -0,0 +1 @@ +export class OneEventConsumptionStrategy {} diff --git a/src/lib/generated/classes/output-as.ts b/src/lib/generated/classes/output-as.ts new file mode 100644 index 00000000..53be7419 --- /dev/null +++ b/src/lib/generated/classes/output-as.ts @@ -0,0 +1 @@ +export class OutputAs {} diff --git a/src/lib/generated/classes/output.ts b/src/lib/generated/classes/output.ts new file mode 100644 index 00000000..09664d16 --- /dev/null +++ b/src/lib/generated/classes/output.ts @@ -0,0 +1 @@ +export class Output {} diff --git a/src/lib/generated/classes/raise-task.ts b/src/lib/generated/classes/raise-task.ts new file mode 100644 index 00000000..a2cd2b77 --- /dev/null +++ b/src/lib/generated/classes/raise-task.ts @@ -0,0 +1 @@ +export class RaiseTask {} diff --git a/src/lib/generated/classes/raise.ts b/src/lib/generated/classes/raise.ts new file mode 100644 index 00000000..85e3f6f1 --- /dev/null +++ b/src/lib/generated/classes/raise.ts @@ -0,0 +1 @@ +export class Raise {} diff --git a/src/lib/generated/classes/referenceable-authentication-policy.ts b/src/lib/generated/classes/referenceable-authentication-policy.ts new file mode 100644 index 00000000..9062d89b --- /dev/null +++ b/src/lib/generated/classes/referenceable-authentication-policy.ts @@ -0,0 +1 @@ +export class ReferenceableAuthenticationPolicy {} diff --git a/src/lib/generated/classes/referenced-authentication-policy.ts b/src/lib/generated/classes/referenced-authentication-policy.ts new file mode 100644 index 00000000..58a7cbf6 --- /dev/null +++ b/src/lib/generated/classes/referenced-authentication-policy.ts @@ -0,0 +1 @@ +export class ReferencedAuthenticationPolicy {} diff --git a/src/lib/generated/classes/retry-policy-attempt.ts b/src/lib/generated/classes/retry-policy-attempt.ts new file mode 100644 index 00000000..a220ad67 --- /dev/null +++ b/src/lib/generated/classes/retry-policy-attempt.ts @@ -0,0 +1 @@ +export class RetryPolicyAttempt {} diff --git a/src/lib/generated/classes/retry-policy-backoff.ts b/src/lib/generated/classes/retry-policy-backoff.ts new file mode 100644 index 00000000..c5c1e384 --- /dev/null +++ b/src/lib/generated/classes/retry-policy-backoff.ts @@ -0,0 +1 @@ +export class RetryPolicyBackoff {} diff --git a/src/lib/generated/classes/retry-policy-jitter.ts b/src/lib/generated/classes/retry-policy-jitter.ts new file mode 100644 index 00000000..60db393e --- /dev/null +++ b/src/lib/generated/classes/retry-policy-jitter.ts @@ -0,0 +1 @@ +export class RetryPolicyJitter {} diff --git a/src/lib/generated/classes/retry-policy-limit.ts b/src/lib/generated/classes/retry-policy-limit.ts new file mode 100644 index 00000000..765999bc --- /dev/null +++ b/src/lib/generated/classes/retry-policy-limit.ts @@ -0,0 +1 @@ +export class RetryPolicyLimit {} diff --git a/src/lib/generated/classes/retry-policy.ts b/src/lib/generated/classes/retry-policy.ts new file mode 100644 index 00000000..0ff655a1 --- /dev/null +++ b/src/lib/generated/classes/retry-policy.ts @@ -0,0 +1 @@ +export class RetryPolicy {} diff --git a/src/lib/generated/classes/run-container.ts b/src/lib/generated/classes/run-container.ts new file mode 100644 index 00000000..7ac3f465 --- /dev/null +++ b/src/lib/generated/classes/run-container.ts @@ -0,0 +1 @@ +export class RunContainer {} diff --git a/src/lib/generated/classes/run-script.ts b/src/lib/generated/classes/run-script.ts new file mode 100644 index 00000000..8689c81d --- /dev/null +++ b/src/lib/generated/classes/run-script.ts @@ -0,0 +1 @@ +export class RunScript {} diff --git a/src/lib/generated/classes/run-shell.ts b/src/lib/generated/classes/run-shell.ts new file mode 100644 index 00000000..bc8aac57 --- /dev/null +++ b/src/lib/generated/classes/run-shell.ts @@ -0,0 +1 @@ +export class RunShell {} diff --git a/src/lib/generated/classes/run-task.ts b/src/lib/generated/classes/run-task.ts new file mode 100644 index 00000000..93e796f2 --- /dev/null +++ b/src/lib/generated/classes/run-task.ts @@ -0,0 +1 @@ +export class RunTask {} diff --git a/src/lib/generated/classes/run-wokflow.ts b/src/lib/generated/classes/run-wokflow.ts new file mode 100644 index 00000000..276eb0f6 --- /dev/null +++ b/src/lib/generated/classes/run-wokflow.ts @@ -0,0 +1 @@ +export class RunWokflow {} diff --git a/src/lib/generated/classes/run-workflow-descriptor.ts b/src/lib/generated/classes/run-workflow-descriptor.ts new file mode 100644 index 00000000..aa7eb54e --- /dev/null +++ b/src/lib/generated/classes/run-workflow-descriptor.ts @@ -0,0 +1 @@ +export class RunWorkflowDescriptor {} diff --git a/src/lib/generated/classes/run.ts b/src/lib/generated/classes/run.ts new file mode 100644 index 00000000..3502860d --- /dev/null +++ b/src/lib/generated/classes/run.ts @@ -0,0 +1 @@ +export class Run {} diff --git a/src/lib/generated/classes/schema-external.ts b/src/lib/generated/classes/schema-external.ts new file mode 100644 index 00000000..78e06250 --- /dev/null +++ b/src/lib/generated/classes/schema-external.ts @@ -0,0 +1 @@ +export class SchemaExternal {} diff --git a/src/lib/generated/classes/schema-inline.ts b/src/lib/generated/classes/schema-inline.ts new file mode 100644 index 00000000..16c3a61e --- /dev/null +++ b/src/lib/generated/classes/schema-inline.ts @@ -0,0 +1 @@ +export class SchemaInline {} diff --git a/src/lib/generated/classes/schema.ts b/src/lib/generated/classes/schema.ts new file mode 100644 index 00000000..0c689d2d --- /dev/null +++ b/src/lib/generated/classes/schema.ts @@ -0,0 +1 @@ +export class Schema {} diff --git a/src/lib/generated/classes/script-external.ts b/src/lib/generated/classes/script-external.ts new file mode 100644 index 00000000..0a8bfe0c --- /dev/null +++ b/src/lib/generated/classes/script-external.ts @@ -0,0 +1 @@ +export class ScriptExternal {} diff --git a/src/lib/generated/classes/script-inline.ts b/src/lib/generated/classes/script-inline.ts new file mode 100644 index 00000000..f47895c6 --- /dev/null +++ b/src/lib/generated/classes/script-inline.ts @@ -0,0 +1 @@ +export class ScriptInline {} diff --git a/src/lib/generated/classes/script.ts b/src/lib/generated/classes/script.ts new file mode 100644 index 00000000..04e5d324 --- /dev/null +++ b/src/lib/generated/classes/script.ts @@ -0,0 +1 @@ +export class Script {} diff --git a/src/lib/generated/classes/secret-based-authentication-policy.ts b/src/lib/generated/classes/secret-based-authentication-policy.ts new file mode 100644 index 00000000..f1dd1f4c --- /dev/null +++ b/src/lib/generated/classes/secret-based-authentication-policy.ts @@ -0,0 +1 @@ +export class SecretBasedAuthenticationPolicy {} diff --git a/src/lib/generated/classes/set-task.ts b/src/lib/generated/classes/set-task.ts new file mode 100644 index 00000000..739091c1 --- /dev/null +++ b/src/lib/generated/classes/set-task.ts @@ -0,0 +1 @@ +export class SetTask {} diff --git a/src/lib/generated/classes/set.ts b/src/lib/generated/classes/set.ts new file mode 100644 index 00000000..e19548c2 --- /dev/null +++ b/src/lib/generated/classes/set.ts @@ -0,0 +1 @@ +export class Set {} diff --git a/src/lib/generated/classes/shell-arguments.ts b/src/lib/generated/classes/shell-arguments.ts new file mode 100644 index 00000000..d6dff538 --- /dev/null +++ b/src/lib/generated/classes/shell-arguments.ts @@ -0,0 +1 @@ +export class ShellArguments {} diff --git a/src/lib/generated/classes/shell-environment.ts b/src/lib/generated/classes/shell-environment.ts new file mode 100644 index 00000000..fe3b7abc --- /dev/null +++ b/src/lib/generated/classes/shell-environment.ts @@ -0,0 +1 @@ +export class ShellEnvironment {} diff --git a/src/lib/generated/classes/shell.ts b/src/lib/generated/classes/shell.ts new file mode 100644 index 00000000..ed8abcfa --- /dev/null +++ b/src/lib/generated/classes/shell.ts @@ -0,0 +1 @@ +export class Shell {} diff --git a/src/lib/generated/classes/switch-case.ts b/src/lib/generated/classes/switch-case.ts new file mode 100644 index 00000000..8632cc2e --- /dev/null +++ b/src/lib/generated/classes/switch-case.ts @@ -0,0 +1 @@ +export class SwitchCase {} diff --git a/src/lib/generated/classes/switch-item.ts b/src/lib/generated/classes/switch-item.ts new file mode 100644 index 00000000..26edf934 --- /dev/null +++ b/src/lib/generated/classes/switch-item.ts @@ -0,0 +1 @@ +export class SwitchItem {} diff --git a/src/lib/generated/classes/switch-task.ts b/src/lib/generated/classes/switch-task.ts new file mode 100644 index 00000000..cf0dfada --- /dev/null +++ b/src/lib/generated/classes/switch-task.ts @@ -0,0 +1 @@ +export class SwitchTask {} diff --git a/src/lib/generated/classes/switch.ts b/src/lib/generated/classes/switch.ts new file mode 100644 index 00000000..5026b0ad --- /dev/null +++ b/src/lib/generated/classes/switch.ts @@ -0,0 +1 @@ +export class Switch {} diff --git a/src/lib/generated/classes/task-base.ts b/src/lib/generated/classes/task-base.ts new file mode 100644 index 00000000..41fe560f --- /dev/null +++ b/src/lib/generated/classes/task-base.ts @@ -0,0 +1 @@ +export class TaskBase {} diff --git a/src/lib/generated/classes/task-item.ts b/src/lib/generated/classes/task-item.ts new file mode 100644 index 00000000..4ae6d046 --- /dev/null +++ b/src/lib/generated/classes/task-item.ts @@ -0,0 +1 @@ +export class TaskItem {} diff --git a/src/lib/generated/classes/task-list.ts b/src/lib/generated/classes/task-list.ts new file mode 100644 index 00000000..34819e4a --- /dev/null +++ b/src/lib/generated/classes/task-list.ts @@ -0,0 +1 @@ +export class TaskList {} diff --git a/src/lib/generated/classes/task.ts b/src/lib/generated/classes/task.ts new file mode 100644 index 00000000..bb17efbe --- /dev/null +++ b/src/lib/generated/classes/task.ts @@ -0,0 +1 @@ +export class Task {} diff --git a/src/lib/generated/classes/timeout.ts b/src/lib/generated/classes/timeout.ts new file mode 100644 index 00000000..5e5868d0 --- /dev/null +++ b/src/lib/generated/classes/timeout.ts @@ -0,0 +1 @@ +export class Timeout {} diff --git a/src/lib/generated/classes/try-task.ts b/src/lib/generated/classes/try-task.ts new file mode 100644 index 00000000..9ee2b1bf --- /dev/null +++ b/src/lib/generated/classes/try-task.ts @@ -0,0 +1 @@ +export class TryTask {} diff --git a/src/lib/generated/classes/wait-task.ts b/src/lib/generated/classes/wait-task.ts new file mode 100644 index 00000000..fefc0f0a --- /dev/null +++ b/src/lib/generated/classes/wait-task.ts @@ -0,0 +1 @@ +export class WaitTask {} diff --git a/src/lib/generated/classes/with-event.ts b/src/lib/generated/classes/with-event.ts new file mode 100644 index 00000000..2e818619 --- /dev/null +++ b/src/lib/generated/classes/with-event.ts @@ -0,0 +1 @@ +export class WithEvent {} diff --git a/src/lib/generated/classes/workflow-authentications.ts b/src/lib/generated/classes/workflow-authentications.ts new file mode 100644 index 00000000..01e7b53c --- /dev/null +++ b/src/lib/generated/classes/workflow-authentications.ts @@ -0,0 +1 @@ +export class WorkflowAuthentications {} diff --git a/src/lib/generated/classes/workflow-components.ts b/src/lib/generated/classes/workflow-components.ts new file mode 100644 index 00000000..1e764c4d --- /dev/null +++ b/src/lib/generated/classes/workflow-components.ts @@ -0,0 +1 @@ +export class WorkflowComponents {} diff --git a/src/lib/generated/classes/workflow-document.ts b/src/lib/generated/classes/workflow-document.ts new file mode 100644 index 00000000..a96cda25 --- /dev/null +++ b/src/lib/generated/classes/workflow-document.ts @@ -0,0 +1 @@ +export class WorkflowDocument {} diff --git a/src/lib/generated/classes/workflow-errors.ts b/src/lib/generated/classes/workflow-errors.ts new file mode 100644 index 00000000..0ee33fca --- /dev/null +++ b/src/lib/generated/classes/workflow-errors.ts @@ -0,0 +1 @@ +export class WorkflowErrors {} diff --git a/src/lib/generated/classes/workflow-extensions.ts b/src/lib/generated/classes/workflow-extensions.ts new file mode 100644 index 00000000..5c2ed721 --- /dev/null +++ b/src/lib/generated/classes/workflow-extensions.ts @@ -0,0 +1 @@ +export class WorkflowExtensions {} diff --git a/src/lib/generated/classes/workflow-functions.ts b/src/lib/generated/classes/workflow-functions.ts new file mode 100644 index 00000000..a2b77e30 --- /dev/null +++ b/src/lib/generated/classes/workflow-functions.ts @@ -0,0 +1 @@ +export class WorkflowFunctions {} diff --git a/src/lib/generated/classes/workflow-input.ts b/src/lib/generated/classes/workflow-input.ts new file mode 100644 index 00000000..1f43177d --- /dev/null +++ b/src/lib/generated/classes/workflow-input.ts @@ -0,0 +1 @@ +export class WorkflowInput {} diff --git a/src/lib/generated/classes/workflow-retries.ts b/src/lib/generated/classes/workflow-retries.ts new file mode 100644 index 00000000..bbfa0875 --- /dev/null +++ b/src/lib/generated/classes/workflow-retries.ts @@ -0,0 +1 @@ +export class WorkflowRetries {} diff --git a/src/lib/generated/classes/workflow-schedule.ts b/src/lib/generated/classes/workflow-schedule.ts new file mode 100644 index 00000000..d32b382a --- /dev/null +++ b/src/lib/generated/classes/workflow-schedule.ts @@ -0,0 +1 @@ +export class WorkflowSchedule {} diff --git a/src/lib/generated/classes/workflow-secrets.ts b/src/lib/generated/classes/workflow-secrets.ts new file mode 100644 index 00000000..5c0c45b5 --- /dev/null +++ b/src/lib/generated/classes/workflow-secrets.ts @@ -0,0 +1 @@ +export class WorkflowSecrets {} diff --git a/src/lib/generated/classes/workflow-tags.ts b/src/lib/generated/classes/workflow-tags.ts new file mode 100644 index 00000000..ede72da3 --- /dev/null +++ b/src/lib/generated/classes/workflow-tags.ts @@ -0,0 +1 @@ +export class WorkflowTags {} diff --git a/src/lib/generated/classes/workflow.ts b/src/lib/generated/classes/workflow.ts new file mode 100644 index 00000000..5bc621e2 --- /dev/null +++ b/src/lib/generated/classes/workflow.ts @@ -0,0 +1 @@ +export class Workflow {} diff --git a/src/lib/generated/definitions/README.md b/src/lib/generated/definitions/README.md new file mode 100644 index 00000000..7d5a8642 --- /dev/null +++ b/src/lib/generated/definitions/README.md @@ -0,0 +1,2 @@ +# Auto generated notice +This directory and its content has been generated automatically. Do not modify its content, it WILL be lost. \ No newline at end of file diff --git a/src/lib/definitions/index.ts b/src/lib/generated/definitions/index.ts similarity index 100% rename from src/lib/definitions/index.ts rename to src/lib/generated/definitions/index.ts diff --git a/src/lib/generated/definitions/specification.ts b/src/lib/generated/definitions/specification.ts new file mode 100644 index 00000000..931cacf4 --- /dev/null +++ b/src/lib/generated/definitions/specification.ts @@ -0,0 +1,1074 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +/** + * Represents the definition of a schema. + */ +export type Schema = SchemaInline | SchemaExternal; +export type ExternalResource = string | ExternalResourceURI; +export type ReferenceableAuthenticationPolicy = AuthenticationPolicyReference | ReferencedAuthenticationPolicy; +/** + * Defines an authentication policy. + */ +export type ReferencedAuthenticationPolicy = + | BasicAuthenticationPolicy + | BearerAuthenticationPolicy + | OAuth2AuthenticationPolicy; +/** + * A runtime expression, if any, used to mutate and/or filter the input of the workflow or task. + */ +export type InputFrom = + | string + | { + [k: string]: unknown; + }; +/** + * Defines an authentication policy. + */ +export type AuthenticationPolicy = BasicAuthenticationPolicy | BearerAuthenticationPolicy | OAuth2AuthenticationPolicy; +/** + * Defines all possible tasks + */ +export type Task = + | CallTask + | DoTask + | ForkTask + | EmitTask + | ForTask + | ListenTask + | RaiseTask + | RunTask + | SetTask + | SwitchTask + | TryTask + | WaitTask; +/** + * Enables the execution of a specified function within a workflow, allowing seamless integration with custom business logic or external services + */ +export type CallTask = CallAsyncAPI | CallGRPC | CallHTTP | CallOpenAPI | CallFunction; +/** + * The HTTP endpoint to send the request to. + */ +export type CallHTTPWithEndpoint = Endpoint | string; +/** + * A runtime expression, if any, used to mutate and/or filter the output of the workflow or task. + */ +export type OutputAs = + | string + | { + [k: string]: unknown; + }; +/** + * A runtime expression, if any, used to export the output data to the context. + */ +export type ExportAs = + | string + | { + [k: string]: unknown; + }; +export type FlowDirective = FlowDirectiveEnum | string; +export type FlowDirectiveEnum = 'continue' | 'exit' | 'end'; +export type EventConsumptionStrategy = + | AllEventConsumptionStrategy + | AnyEventConsumptionStrategy + | OneEventConsumptionStrategy; +/** + * A list containing all the events that must be consumed. + */ +export type EventConsumptionStrategyAll = EventFilter[]; +/** + * A list containing any of the events to consume. + */ +export type EventConsumptionStrategyAny = EventFilter[]; +export type Run = RunContainer | RunScript | RunShell | RunWokflow; +export type Script = ScriptInline | ScriptExternal; +/** + * @minItems 1 + */ +export type Switch = [SwitchItem, ...SwitchItem[]]; +/** + * The retry duration backoff. + */ +export type RetryPolicyBackoff = ConstantBackoff | ExponentialBackOff | LinearBackoff; +/** + * A name/value mapping of tasks + */ +export type TaskList = TaskItem[]; +/** + * The workflow's extensions. + */ +export type WorkflowExtensions = ExtensionItem[]; +/** + * The workflow's secrets. + */ +export type WorkflowSecrets = string[]; + +/** + * Serverless Workflow DSL - Workflow Schema + */ +export interface Workflow { + document: WorkflowDocument; + input?: Input; + use?: WorkflowComponents; + do: TaskList; + timeout?: Timeout; + output?: Output; + schedule?: WorkflowSchedule; + [k: string]: unknown; +} +/** + * Documents the workflow + */ +export interface WorkflowDocument { + /** + * The version of the DSL used by the workflow. + */ + dsl: string; + /** + * The workflow's namespace. + */ + namespace: string; + /** + * The workflow's name. + */ + name: string; + /** + * The workflow's semantic version. + */ + version: string; + /** + * The workflow's title. + */ + title?: string; + /** + * The workflow's Markdown summary. + */ + summary?: string; + tags?: WorkflowTags; + [k: string]: unknown; +} +/** + * A key/value mapping of the workflow's tags, if any. + */ +export interface WorkflowTags { + [k: string]: unknown; +} +/** + * Configures the input of a workflow or task. + */ +export interface Input { + schema?: Schema; + from?: InputFrom; + [k: string]: unknown; +} +export interface SchemaInline { + /** + * The schema's inline definition. + */ + document: { + [k: string]: unknown; + }; + [k: string]: unknown; +} +export interface SchemaExternal { + resource: ExternalResource; + [k: string]: unknown; +} +export interface ExternalResourceURI { + /** + * The endpoint's URI. + */ + uri: string; + authentication?: ReferenceableAuthenticationPolicy; + /** + * The external resource's name, if any. + */ + name?: string; + [k: string]: unknown; +} +export interface AuthenticationPolicyReference { + /** + * The name of the authentication policy to use + */ + use: string; + [k: string]: unknown; +} +/** + * Use basic authentication. + */ +export interface BasicAuthenticationPolicy { + basic: ExplicitBasicAuthenticationPolicy | SecretBasedAuthenticationPolicy; + [k: string]: unknown; +} +export interface ExplicitBasicAuthenticationPolicy { + /** + * The username to use. + */ + username: string; + /** + * The password to use. + */ + password: string; + [k: string]: unknown; +} +export interface SecretBasedAuthenticationPolicy { + /** + * The name of the authentication policy to use + */ + use: string; + [k: string]: unknown; +} +/** + * Use bearer authentication. + */ +export interface BearerAuthenticationPolicy { + bearer: ExplicitBearerAuthenticationPolicy | SecretBasedAuthenticationPolicy; + [k: string]: unknown; +} +export interface ExplicitBearerAuthenticationPolicy { + /** + * The bearer token to use. + */ + token: string; + [k: string]: unknown; +} +/** + * Use OAUTH2 authentication. + */ +export interface OAuth2AuthenticationPolicy { + oauth2: ExplicitOAuth2AuthenticationPolicy | SecretBasedAuthenticationPolicy; + [k: string]: unknown; +} +export interface ExplicitOAuth2AuthenticationPolicy { + /** + * The URI that references the OAuth2 authority to use. + */ + authority: string; + /** + * The grant type to use. + */ + grant: string; + client: { + /** + * The client id to use. + */ + id: string; + /** + * The client secret to use, if any. + */ + secret?: string; + [k: string]: unknown; + }; + /** + * The scopes, if any, to request the token for. + */ + scopes?: string[]; + /** + * The audiences, if any, to request the token for. + */ + audiences?: string[]; + /** + * The username to use. Used only if the grant type is Password. + */ + username?: string; + /** + * The password to use. Used only if the grant type is Password. + */ + password?: string; + subject?: Oauth2Token; + actor?: Oauth2Token; + [k: string]: unknown; +} +export interface Oauth2Token { + /** + * The security token to use to use. + */ + token: string; + /** + * The type of the security token to use to use. + */ + type: string; + [k: string]: unknown; +} +/** + * Defines the workflow's reusable components. + */ +export interface WorkflowComponents { + authentications?: WorkflowAuthentications; + errors?: WorkflowErrors; + extensions?: WorkflowExtensions; + functions?: WorkflowFunctions; + retries?: WorkflowRetries; + secrets?: WorkflowSecrets; + [k: string]: unknown; +} +/** + * The workflow's reusable authentication policies. + */ +export interface WorkflowAuthentications { + [k: string]: AuthenticationPolicy; +} +/** + * The workflow's reusable errors. + */ +export interface WorkflowErrors { + [k: string]: Error; +} +export interface Error { + /** + * A URI reference that identifies the error type. + */ + type: string; + /** + * The status code generated by the origin for this occurrence of the error. + */ + status: number; + /** + * A JSON Pointer used to reference the component the error originates from. + */ + instance: string; + /** + * A short, human-readable summary of the error. + */ + title?: string; + /** + * A human-readable explanation specific to this occurrence of the error. + */ + detail?: string; + [k: string]: unknown; +} +export interface ExtensionItem { + [k: string]: Extension; +} +/** + * The definition of a an extension. + */ +export interface Extension { + /** + * The type of task to extend. + */ + extend: + | 'call' + | 'composite' + | 'emit' + | 'for' + | 'listen' + | 'raise' + | 'run' + | 'set' + | 'switch' + | 'try' + | 'wait' + | 'all'; + /** + * A runtime expression, if any, used to determine whether or not the extension should apply in the specified context. + */ + when?: string; + before?: TaskList; + after?: TaskList; + [k: string]: unknown; +} +export interface TaskItem { + [k: string]: Task; +} +/** + * Enables workflows to interact with external services described by AsyncAPI. + */ +export interface CallAsyncAPI { + call: 'asyncapi'; + with: CallAsyncAPIWith; + [k: string]: unknown; +} +/** + * Defines the AsyncAPI call to perform. + */ +export interface CallAsyncAPIWith { + document: ExternalResource; + /** + * A reference to the AsyncAPI operation to call. + */ + operationRef: string; + /** + * A a reference to the server to call the specified AsyncAPI operation on. If not set, default to the first server matching the operation's channel. + */ + server?: string; + /** + * The name of the message to use. If not set, defaults to the first message defined by the operation. + */ + message?: string; + /** + * The name of the binding to use. If not set, defaults to the first binding defined by the operation. + */ + binding?: string; + /** + * The payload to call the AsyncAPI operation with, if any. + */ + payload?: { + [k: string]: unknown; + }; + authentication?: ReferenceableAuthenticationPolicy; +} +/** + * The base definition shared by all tasks + */ +export interface CallGRPC { + call: 'grpc'; + with: CallGRPCWith; + [k: string]: unknown; +} +/** + * Defines the GRPC call to perform. + */ +export interface CallGRPCWith { + proto: ExternalResource; + service: CallGRPCWithService; + /** + * The name of the method to call on the defined GRPC service. + */ + method: string; + arguments?: CallGRPCWithArguments; +} +export interface CallGRPCWithService { + /** + * The name of the GRPC service to call. + */ + name: string; + /** + * The hostname of the GRPC service to call. + */ + host: string; + /** + * The port number of the GRPC service to call. + */ + port?: number; + authentication?: ReferenceableAuthenticationPolicy; + [k: string]: unknown; +} +/** + * The arguments, if any, to call the method with. + */ +export interface CallGRPCWithArguments { + [k: string]: unknown; +} +/** + * The base definition shared by all tasks + */ +export interface CallHTTP { + call: 'http'; + with: CallHTTPWith; + [k: string]: unknown; +} +/** + * Defines the HTTP call to perform. + */ +export interface CallHTTPWith { + /** + * The HTTP method of the HTTP request to perform. + */ + method: string; + endpoint: CallHTTPWithEndpoint; + headers?: CallHTTPWithHeaders; + body?: CallHTTPWithBody; + /** + * The http call output format. Defaults to 'content'. + */ + output?: 'raw' | 'content' | 'response'; +} +export interface Endpoint { + /** + * The endpoint's URI. + */ + uri: string; + authentication?: ReferenceableAuthenticationPolicy; + [k: string]: unknown; +} +/** + * A name/value mapping of the headers, if any, of the HTTP request to perform. + */ +export interface CallHTTPWithHeaders { + [k: string]: unknown; +} +/** + * The body, if any, of the HTTP request to perform. + */ +export interface CallHTTPWithBody { + [k: string]: unknown; +} +/** + * The base definition shared by all tasks + */ +export interface CallOpenAPI { + call: 'openapi'; + with: CallOpenAPIWith; + [k: string]: unknown; +} +/** + * Defines the OpenAPI call to perform. + */ +export interface CallOpenAPIWith { + document: ExternalResource; + /** + * The id of the OpenAPI operation to call. + */ + operationId: string; + parameters?: CallOpenAPIWithParameters; + authentication?: ReferenceableAuthenticationPolicy; + /** + * The http call output format. Defaults to 'content'. + */ + output?: 'raw' | 'content' | 'response'; +} +/** + * A name/value mapping of the parameters of the OpenAPI operation to call. + */ +export interface CallOpenAPIWithParameters { + [k: string]: unknown; +} +/** + * The base definition shared by all tasks + */ +export interface CallFunction { + /** + * The name of the function to call. + */ + call: string; + with?: CallFunctionWith; + [k: string]: unknown; +} +/** + * A name/value mapping of the parameters, if any, to call the function with. + */ +export interface CallFunctionWith { + [k: string]: unknown; +} +/** + * Allows to execute a list of tasks in sequence + */ +export interface DoTask { + do: TaskList; + [k: string]: unknown; +} +/** + * Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output. + */ +export interface ForkTask { + fork: Fork; + [k: string]: TaskBase; +} +export interface Fork { + branches: TaskList; + /** + * Indicates whether or not the concurrent tasks are racing against each other, with a single possible winner, which sets the composite task's output. + */ + compete?: boolean; + [k: string]: unknown; +} +/** + * The base definition shared by all tasks + */ +export interface TaskBase { + /** + * A runtime expression, if any, used to determine whether or not the task should be run. + */ + if?: string; + input?: Input; + output?: Output; + export?: Export; + timeout?: Timeout; + then?: FlowDirective; + [k: string]: unknown; +} +/** + * Configures the output of a workflow or task. + */ +export interface Output { + schema?: Schema; + as?: OutputAs; + [k: string]: unknown; +} +/** + * Set the content of the context. + */ +export interface Export { + schema?: Schema; + as?: ExportAs; + [k: string]: unknown; +} +/** + * The definition of a timeout. + */ +export interface Timeout { + after: Duration; + [k: string]: unknown; +} +/** + * The definition of a duration. + */ +export interface Duration { + /** + * Number of days, if any. + */ + days?: number; + /** + * Number of days, if any. + */ + hours?: number; + /** + * Number of minutes, if any. + */ + minutes?: number; + /** + * Number of seconds, if any. + */ + seconds?: number; + /** + * Number of milliseconds, if any. + */ + milliseconds?: number; + [k: string]: unknown; +} +/** + * Allows workflows to publish events to event brokers or messaging systems, facilitating communication and coordination between different components and services. + */ +export interface EmitTask { + emit: Emit; + [k: string]: unknown; +} +export interface Emit { + event: EmitEvent; + [k: string]: unknown; +} +export interface EmitEvent { + /** + * The event's unique identifier + */ + id?: string; + /** + * Identifies the context in which an event happened + */ + source: string; + /** + * This attribute contains a value describing the type of event related to the originating occurrence. + */ + type: string; + time?: string; + subject?: string; + /** + * Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format. + */ + datacontenttype?: string; + dataschema?: string; + [k: string]: unknown; +} +/** + * Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets. + */ +export interface ForTask { + for: For; + /** + * A runtime expression that represents the condition, if any, that must be met for the iteration to continue. + */ + while?: string; + do: TaskList; + [k: string]: unknown; +} +export interface For { + /** + * The name of the variable used to store the current item being enumerated. + */ + each?: string; + /** + * A runtime expression used to get the collection to enumerate. + */ + in: string; + /** + * The name of the variable used to store the index of the current item being enumerated. + */ + at?: string; + [k: string]: unknown; +} +/** + * Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems. + */ +export interface ListenTask { + listen: Listen; + [k: string]: unknown; +} +export interface Listen { + to: EventConsumptionStrategy; + [k: string]: unknown; +} +export interface AllEventConsumptionStrategy { + all: EventConsumptionStrategyAll; + [k: string]: unknown; +} +/** + * An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes. + */ +export interface EventFilter { + with: WithEvent; + correlate?: Correlate; + [k: string]: unknown; +} +/** + * An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes. + */ +export interface WithEvent { + /** + * The event's unique identifier + */ + id?: string; + /** + * Identifies the context in which an event happened + */ + source?: string; + /** + * This attribute contains a value describing the type of event related to the originating occurrence. + */ + type?: string; + time?: string; + subject?: string; + /** + * Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format. + */ + datacontenttype?: string; + dataschema?: string; + [k: string]: unknown; +} +/** + * A correlation is a link between events and data, established by mapping event attributes to specific data attributes, allowing for coordinated processing or handling based on event characteristics. + */ +export interface Correlate { + [k: string]: { + /** + * A runtime expression used to extract the correlation value from the filtered event. + */ + from: string; + /** + * A constant or a runtime expression, if any, used to determine whether or not the extracted correlation value matches expectations. If not set, the first extracted value will be used as the correlation's expectation. + */ + expect?: string; + [k: string]: unknown; + }; +} +export interface AnyEventConsumptionStrategy { + any: EventConsumptionStrategyAny; + [k: string]: unknown; +} +export interface OneEventConsumptionStrategy { + one: EventFilter; + [k: string]: unknown; +} +/** + * Intentionally triggers and propagates errors. + */ +export interface RaiseTask { + raise: Raise; + [k: string]: unknown; +} +export interface Raise { + error: Error; + [k: string]: unknown; +} +/** + * Provides the capability to execute external containers, shell commands, scripts, or workflows. + */ +export interface RunTask { + run: Run; + [k: string]: unknown; +} +/** + * Enables the execution of external processes encapsulated within a containerized environment. + */ +export interface RunContainer { + container: Container; + [k: string]: unknown; +} +export interface Container { + /** + * The name of the container image to run. + */ + image: string; + /** + * The command, if any, to execute on the container + */ + command?: string; + /** + * The container's port mappings, if any. + */ + ports?: { + [k: string]: unknown; + }; + /** + * The container's volume mappings, if any. + */ + volumes?: { + [k: string]: unknown; + }; + environment?: ContainerEnvironment; + [k: string]: unknown; +} +/** + * A key/value mapping of the environment variables, if any, to use when running the configured process. + */ +export interface ContainerEnvironment { + [k: string]: unknown; +} +/** + * Enables the execution of custom scripts or code within a workflow, empowering workflows to perform specialized logic, data processing, or integration tasks by executing user-defined scripts written in various programming languages. + */ +export interface RunScript { + script: Script; + [k: string]: unknown; +} +/** + * The script's code. + */ +export interface ScriptInline { + code: string; + [k: string]: unknown; +} +/** + * The script's resource. + */ +export interface ScriptExternal { + source: ExternalResource; + [k: string]: unknown; +} +/** + * Enables the execution of shell commands within a workflow, enabling workflows to interact with the underlying operating system and perform system-level operations, such as file manipulation, environment configuration, or system administration tasks. + */ +export interface RunShell { + shell: Shell; + [k: string]: unknown; +} +export interface Shell { + /** + * The shell command to run. + */ + command: string; + arguments?: ShellArguments; + environment?: ShellEnvironment; + [k: string]: unknown; +} +/** + * A list of the arguments of the shell command to run. + */ +export interface ShellArguments { + [k: string]: unknown; +} +/** + * A key/value mapping of the environment variables, if any, to use when running the configured process. + */ +export interface ShellEnvironment { + [k: string]: unknown; +} +/** + * Enables the invocation and execution of nested workflows within a parent workflow, facilitating modularization, reusability, and abstraction of complex logic or business processes by encapsulating them into standalone workflow units. + */ +export interface RunWokflow { + workflow: RunWorkflowDescriptor; + [k: string]: unknown; +} +export interface RunWorkflowDescriptor { + /** + * The namespace the workflow to run belongs to. + */ + namespace: string; + /** + * The name of the workflow to run. + */ + name: string; + /** + * The version of the workflow to run. Defaults to latest + */ + version: string; + input?: WorkflowInput; + [k: string]: unknown; +} +/** + * The data, if any, to pass as input to the workflow to execute. The value should be validated against the target workflow's input schema, if specified. + */ +export interface WorkflowInput { + [k: string]: unknown; +} +/** + * A task used to set data + */ +export interface SetTask { + set: Set; + [k: string]: unknown; +} +/** + * The data to set + */ +export interface Set { + [k: string]: unknown; +} +/** + * Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria + */ +export interface SwitchTask { + switch: Switch; + [k: string]: unknown; +} +export interface SwitchItem { + [k: string]: SwitchCase; +} +export interface SwitchCase { + /** + * A runtime expression used to determine whether or not the case matches. + */ + when?: string; + then: FlowDirective; + [k: string]: unknown; +} +/** + * Serves as a mechanism within workflows to handle errors gracefully, potentially retrying failed tasks before proceeding with alternate ones. + */ +export interface TryTask { + try: TaskList; + catch: Catch; + [k: string]: unknown; +} +export interface Catch { + errors?: CatchErrors; + /** + * The name of the runtime expression variable to save the error as. Defaults to 'error'. + */ + as?: string; + /** + * A runtime expression used to determine whether or not to catch the filtered error + */ + when?: string; + /** + * A runtime expression used to determine whether or not to catch the filtered error + */ + exceptWhen?: string; + retry?: RetryPolicy; + do?: TaskList; + [k: string]: unknown; +} +export interface CatchErrors { + [k: string]: unknown; +} +/** + * Defines a retry policy. + */ +export interface RetryPolicy { + /** + * A runtime expression, if any, used to determine whether or not to retry running the task, in a given context. + */ + when?: string; + /** + * A runtime expression used to determine whether or not to retry running the task, in a given context. + */ + exceptWhen?: string; + delay?: Duration; + backoff?: RetryPolicyBackoff; + limit?: RetryPolicyLimit; + jitter?: RetryPolicyJitter; + [k: string]: unknown; +} +export interface ConstantBackoff { + /** + * The definition of the constant backoff to use, if any. + */ + constant: { + [k: string]: unknown; + }; + [k: string]: unknown; +} +export interface ExponentialBackOff { + /** + * The definition of the exponential backoff to use, if any. + */ + exponential: { + [k: string]: unknown; + }; + [k: string]: unknown; +} +export interface LinearBackoff { + /** + * The definition of the linear backoff to use, if any. + */ + linear: { + [k: string]: unknown; + }; + [k: string]: unknown; +} +/** + * The retry limit, if any + */ +export interface RetryPolicyLimit { + attempt?: RetryPolicyAttempt; + duration?: Duration; + [k: string]: unknown; +} +export interface RetryPolicyAttempt { + /** + * The maximum amount of retry attempts, if any. + */ + count?: number; + duration?: Duration; + [k: string]: unknown; +} +/** + * The parameters, if any, that control the randomness or variability of the delay between retry attempts. + */ +export interface RetryPolicyJitter { + from: Duration; + to: Duration; + [k: string]: unknown; +} +/** + * Allows workflows to pause or delay their execution for a specified period of time. + */ +export interface WaitTask { + wait: Duration; + [k: string]: unknown; +} +/** + * The workflow's reusable functions. + */ +export interface WorkflowFunctions { + [k: string]: Task; +} +/** + * The workflow's reusable retry policies. + */ +export interface WorkflowRetries { + [k: string]: RetryPolicy; +} +/** + * Schedules the workflow + */ +export interface WorkflowSchedule { + every?: Duration; + /** + * Specifies the schedule using a cron expression, e.g., '0 0 * * *' for daily at midnight." + */ + cron?: string; + after?: Duration; + on?: EventConsumptionStrategy; + [k: string]: unknown; +} diff --git a/src/lib/generated/schema/README.md b/src/lib/generated/schema/README.md new file mode 100644 index 00000000..7d5a8642 --- /dev/null +++ b/src/lib/generated/schema/README.md @@ -0,0 +1,2 @@ +# Auto generated notice +This directory and its content has been generated automatically. Do not modify its content, it WILL be lost. \ No newline at end of file diff --git a/src/lib/schema/workflow.json b/src/lib/generated/schema/workflow.json similarity index 79% rename from src/lib/schema/workflow.json rename to src/lib/generated/schema/workflow.json index 86500495..ceacf863 100644 --- a/src/lib/schema/workflow.json +++ b/src/lib/generated/schema/workflow.json @@ -1,6 +1,7 @@ { - "$id": "https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json", + "$id": "https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml", "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Workflow", "description": "Serverless Workflow DSL - Workflow Schema", "type": "object", "properties": { @@ -37,8 +38,8 @@ }, "tags": { "type": "object", - "description": "A key/value mapping of the workflow's tags, if any.", - "additionalProperties": true + "title": "WorkflowTags", + "description": "A key/value mapping of the workflow's tags, if any." } }, "required": [ @@ -47,10 +48,12 @@ "name", "version" ], + "title": "WorkflowDocument", "description": "Documents the workflow" }, "input": { "$ref": "#/$defs/input", + "title": "WorkflowInput", "description": "Configures the workflow's input." }, "use": { @@ -61,6 +64,7 @@ "additionalProperties": { "$ref": "#/$defs/authenticationPolicy" }, + "title": "WorkflowAuthentications", "description": "The workflow's reusable authentication policies." }, "errors": { @@ -68,18 +72,21 @@ "additionalProperties": { "$ref": "#/$defs/error" }, + "title": "WorkflowErrors", "description": "The workflow's reusable errors." }, "extensions": { "type": "array", "items": { "type": "object", + "title": "ExtensionItem", "minProperties": 1, "maxProperties": 1, "additionalProperties": { "$ref": "#/$defs/extension" } }, + "title": "WorkflowExtensions", "description": "The workflow's extensions." }, "functions": { @@ -87,6 +94,7 @@ "additionalProperties": { "$ref": "#/$defs/task" }, + "title": "WorkflowFunctions", "description": "The workflow's reusable functions." }, "retries": { @@ -94,6 +102,7 @@ "additionalProperties": { "$ref": "#/$defs/retryPolicy" }, + "title": "WorkflowRetries", "description": "The workflow's reusable retry policies." }, "secrets": { @@ -101,21 +110,26 @@ "items": { "type": "string" }, + "title": "WorkflowSecrets", "description": "The workflow's secrets." } }, + "title": "WorkflowComponents", "description": "Defines the workflow's reusable components." }, "do": { - "description": "Defines the task(s) the workflow must perform", - "$ref": "#/$defs/taskList" + "$ref": "#/$defs/taskList", + "title": "WorkflowTasks", + "description": "Defines the task(s) the workflow must perform" }, "timeout": { "$ref": "#/$defs/timeout", + "title": "WorkflowTimeout", "description": "The workflow's timeout configuration, if any." }, "output": { "$ref": "#/$defs/output", + "title": "WorkflowOutput", "description": "Configures the workflow's output." }, "schedule": { @@ -138,6 +152,7 @@ "description": "Specifies the events that trigger the workflow execution." } }, + "title": "WorkflowSchedule", "description": "Schedules the workflow" } }, @@ -146,12 +161,15 @@ "type": "array", "items": { "type": "object", + "title": "TaskItem", "minProperties": 1, "maxProperties": 1, "additionalProperties": { "$ref": "#/$defs/task" } - } + }, + "title": "TaskList", + "description": "A name/value mapping of tasks" }, "taskBase": { "type": "object", @@ -180,7 +198,9 @@ "$ref": "#/$defs/flowDirective", "description": "The flow directive to be performed upon completion of the task." } - } + }, + "title": "TaskBase", + "description": "The base definition shared by all tasks" }, "task": { "unevaluatedProperties": false, @@ -221,12 +241,15 @@ { "$ref": "#/$defs/waitTask" } - ] + ], + "title": "Task", + "description": "Defines all possible tasks" }, "callTask": { "oneOf": [ { "title": "CallAsyncAPI", + "description": "Enables workflows to interact with external services described by AsyncAPI.", "$ref": "#/$defs/taskBase", "type": "object", "required": [ @@ -240,10 +263,12 @@ "const": "asyncapi" }, "with": { + "title": "CallAsyncAPIWith", "type": "object", "properties": { "document": { "$ref": "#/$defs/externalResource", + "title": "CallAsyncAPIWithDocument", "description": "The document that defines the AsyncAPI operation to call." }, "operationRef": { @@ -267,15 +292,9 @@ "description": "The payload to call the AsyncAPI operation with, if any." }, "authentication": { - "description": "The authentication policy, if any, to use when calling the AsyncAPI operation.", - "oneOf": [ - { - "$ref": "#/$defs/authenticationPolicy" - }, - { - "type": "string" - } - ] + "$ref": "#/$defs/referenceableAuthenticationPolicy", + "title": "CallAsyncAPIWithAuthentication", + "description": "The authentication policy, if any, to use when calling the AsyncAPI operation." } }, "required": [ @@ -302,10 +321,12 @@ "const": "grpc" }, "with": { + "title": "CallGRPCWith", "type": "object", "properties": { "proto": { "$ref": "#/$defs/externalResource", + "title": "CallGRPCWithProto", "description": "The proto resource that describes the GRPC service to call." }, "service": { @@ -322,26 +343,21 @@ }, "port": { "type": "integer", - "min": 0, - "max": 65535, + "minimum": 0, + "maximum": 65535, "description": "The port number of the GRPC service to call." }, "authentication": { - "description": "The endpoint's authentication policy, if any.", - "oneOf": [ - { - "$ref": "#/$defs/authenticationPolicy" - }, - { - "type": "string" - } - ] + "$ref": "#/$defs/referenceableAuthenticationPolicy", + "title": "CallGRPCWithServiceAuthentication", + "description": "The endpoint's authentication policy, if any." } }, "required": [ "name", "host" - ] + ], + "title": "CallGRPCWithService" }, "method": { "type": "string", @@ -350,6 +366,7 @@ "arguments": { "type": "object", "additionalProperties": true, + "title": "CallGRPCWithArguments", "description": "The arguments, if any, to call the method with." } }, @@ -378,6 +395,7 @@ "const": "http" }, "with": { + "title": "CallHTTPWith", "type": "object", "properties": { "method": { @@ -385,6 +403,7 @@ "description": "The HTTP method of the HTTP request to perform." }, "endpoint": { + "title": "CallHTTPWithEndpoint", "description": "The HTTP endpoint to send the request to.", "oneOf": [ { @@ -398,9 +417,11 @@ }, "headers": { "type": "object", + "title": "CallHTTPWithHeaders", "description": "A name/value mapping of the headers, if any, of the HTTP request to perform." }, "body": { + "title": "CallHTTPWithBody", "description": "The body, if any, of the HTTP request to perform." }, "output": { @@ -437,10 +458,12 @@ "const": "openapi" }, "with": { + "title": "CallOpenAPIWith", "type": "object", "properties": { "document": { "$ref": "#/$defs/externalResource", + "title": "CallOpenAPIWithDocument", "description": "The document that defines the OpenAPI operation to call." }, "operationId": { @@ -450,18 +473,13 @@ "parameters": { "type": "object", "additionalProperties": true, + "title": "CallOpenAPIWithParameters", "description": "A name/value mapping of the parameters of the OpenAPI operation to call." }, "authentication": { - "description": "The authentication policy, if any, to use when calling the OpenAPI operation.", - "oneOf": [ - { - "$ref": "#/$defs/authenticationPolicy" - }, - { - "type": "string" - } - ] + "$ref": "#/$defs/referenceableAuthenticationPolicy", + "title": "CallOpenAPIWithAuthentication", + "description": "The authentication policy, if any, to use when calling the OpenAPI operation." }, "output": { "type": "string", @@ -506,15 +524,19 @@ "with": { "type": "object", "additionalProperties": true, + "title": "CallFunctionWith", "description": "A name/value mapping of the parameters, if any, to call the function with." } } } - ] + ], + "title": "CallTask", + "description": "Enables the execution of a specified function within a workflow, allowing seamless integration with custom business logic or external services" }, "forkTask": { - "description": "Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output.", - "$ref": "#/$defs/taskBase", + "additionalProperties": { + "$ref": "#/$defs/taskBase" + }, "type": "object", "unevaluatedProperties": false, "required": [ @@ -528,18 +550,23 @@ ], "properties": { "branches": { - "$ref": "#/$defs/taskList" + "$ref": "#/$defs/taskList", + "title": "Branches" }, "compete": { "description": "Indicates whether or not the concurrent tasks are racing against each other, with a single possible winner, which sets the composite task's output.", "type": "boolean", "default": false } - } + }, + "title": "Fork" } - } + }, + "title": "ForkTask", + "description": "Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output." }, "doTask": { + "title": "DoTask", "description": "Allows to execute a list of tasks in sequence", "$ref": "#/$defs/taskBase", "type": "object", @@ -549,11 +576,13 @@ ], "properties": { "do": { - "$ref": "#/$defs/taskList" + "$ref": "#/$defs/taskList", + "title": "Do" } } }, "emitTask": { + "title": "EmitTask", "description": "Allows workflows to publish events to event brokers or messaging systems, facilitating communication and coordination between different components and services.", "$ref": "#/$defs/taskBase", "type": "object", @@ -601,16 +630,19 @@ "source", "type" ], - "additionalProperties": true + "additionalProperties": true, + "title": "EmitEvent" } }, "required": [ "event" - ] + ], + "title": "Emit" } } }, "forTask": { + "title": "ForTask", "description": "Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets.", "$ref": "#/$defs/taskBase", "type": "object", @@ -640,18 +672,21 @@ }, "required": [ "in" - ] + ], + "title": "For" }, "while": { "type": "string", "description": "A runtime expression that represents the condition, if any, that must be met for the iteration to continue." }, "do": { - "$ref": "#/$defs/taskList" + "$ref": "#/$defs/taskList", + "title": "DoEach" } } }, "listenTask": { + "title": "ListenTask", "description": "Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems.", "$ref": "#/$defs/taskBase", "type": "object", @@ -665,16 +700,19 @@ "properties": { "to": { "$ref": "#/$defs/eventConsumptionStrategy", + "title": "ListenEventConsumptionStrategy", "description": "Defines the event(s) to listen to." } }, "required": [ "to" - ] + ], + "title": "Listen" } } }, "raiseTask": { + "title": "RaiseTask", "description": "Intentionally triggers and propagates errors.", "$ref": "#/$defs/taskBase", "type": "object", @@ -688,16 +726,19 @@ "properties": { "error": { "$ref": "#/$defs/error", + "title": "RaiseError", "description": "Defines the error to raise." } }, "required": [ "error" - ] + ], + "title": "Raise" } } }, "runTask": { + "title": "RunTask", "description": "Provides the capability to execute external containers, shell commands, scripts, or workflows.", "$ref": "#/$defs/taskBase", "type": "object", @@ -710,6 +751,7 @@ "type": "object", "oneOf": [ { + "title": "RunContainer", "properties": { "container": { "type": "object", @@ -731,13 +773,15 @@ "description": "The container's volume mappings, if any." }, "environment": { + "title": "ContainerEnvironment", "type": "object", "description": "A key/value mapping of the environment variables, if any, to use when running the configured process." } }, "required": [ "image" - ] + ], + "title": "Container" } }, "required": [ @@ -746,6 +790,7 @@ "description": "Enables the execution of external processes encapsulated within a containerized environment." }, { + "title": "RunScript", "properties": { "script": { "type": "object", @@ -755,6 +800,7 @@ "description": "The language of the script to run." }, "environment": { + "title": "ScriptEnvironment", "type": "object", "additionalProperties": true, "description": "A key/value mapping of the environment variables, if any, to use when running the configured process." @@ -762,6 +808,7 @@ }, "oneOf": [ { + "title": "ScriptInline", "properties": { "code": { "type": "string" @@ -773,6 +820,7 @@ "description": "The script's code." }, { + "title": "ScriptExternal", "properties": { "source": { "$ref": "#/$defs/externalResource" @@ -786,7 +834,8 @@ ], "required": [ "language" - ] + ], + "title": "Script" } }, "required": [ @@ -795,6 +844,7 @@ "description": "Enables the execution of custom scripts or code within a workflow, empowering workflows to perform specialized logic, data processing, or integration tasks by executing user-defined scripts written in various programming languages." }, { + "title": "RunShell", "properties": { "shell": { "type": "object", @@ -804,11 +854,13 @@ "description": "The shell command to run." }, "arguments": { + "title": "ShellArguments", "type": "object", "additionalProperties": true, "description": "A list of the arguments of the shell command to run." }, "environment": { + "title": "ShellEnvironment", "type": "object", "additionalProperties": true, "description": "A key/value mapping of the environment variables, if any, to use when running the configured process." @@ -816,7 +868,8 @@ }, "required": [ "command" - ] + ], + "title": "Shell" } }, "required": [ @@ -825,8 +878,10 @@ "description": "Enables the execution of shell commands within a workflow, enabling workflows to interact with the underlying operating system and perform system-level operations, such as file manipulation, environment configuration, or system administration tasks." }, { + "title": "RunWokflow", "properties": { "workflow": { + "title": "RunWorkflowDescriptor", "type": "object", "properties": { "namespace": { @@ -843,6 +898,7 @@ "description": "The version of the workflow to run. Defaults to latest" }, "input": { + "title": "WorkflowInput", "type": "object", "additionalProperties": true, "description": "The data, if any, to pass as input to the workflow to execute. The value should be validated against the target workflow's input schema, if specified." @@ -860,11 +916,13 @@ ], "description": "Enables the invocation and execution of nested workflows within a parent workflow, facilitating modularization, reusability, and abstraction of complex logic or business processes by encapsulating them into standalone workflow units." } - ] + ], + "title": "Run" } } }, "setTask": { + "title": "SetTask", "description": "A task used to set data", "$ref": "#/$defs/taskBase", "type": "object", @@ -877,11 +935,13 @@ "type": "object", "minProperties": 1, "additionalProperties": true, + "title": "Set", "description": "The data to set" } } }, "switchTask": { + "title": "SwitchTask", "description": "Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria", "$ref": "#/$defs/taskBase", "type": "object", @@ -897,13 +957,14 @@ "type": "object", "minProperties": 1, "maxProperties": 1, + "title": "SwitchItem", "additionalProperties": { "type": "object", + "title": "SwitchCase", + "required": [ + "then" + ], "properties": { - "name": { - "type": "string", - "description": "The case's name." - }, "when": { "type": "string", "description": "A runtime expression used to determine whether or not the case matches." @@ -914,11 +975,13 @@ } } } - } + }, + "title": "Switch" } } }, "tryTask": { + "title": "TryTask", "description": "Serves as a mechanism within workflows to handle errors gracefully, potentially retrying failed tasks before proceeding with alternate ones.", "$ref": "#/$defs/taskBase", "type": "object", @@ -929,14 +992,16 @@ "unevaluatedProperties": false, "properties": { "try": { - "description": "The task(s) to perform.", - "$ref": "#/$defs/taskList" + "$ref": "#/$defs/taskList", + "title": "Try", + "description": "The task(s) to perform." }, "catch": { "type": "object", "properties": { "errors": { - "type": "object" + "type": "object", + "title": "CatchErrors" }, "as": { "type": "string", @@ -952,17 +1017,21 @@ }, "retry": { "$ref": "#/$defs/retryPolicy", + "title": "CatchRetryPolicy", "description": "The retry policy to use, if any, when catching errors." }, "do": { - "description": "The definition of the task(s) to run when catching an error.", - "$ref": "#/$defs/taskList" + "$ref": "#/$defs/taskList", + "title": "CatchDo", + "description": "The definition of the task(s) to run when catching an error." } - } + }, + "title": "Catch" } } }, "waitTask": { + "title": "WaitTask", "description": "Allows workflows to pause or delay their execution for a specified period of time.", "$ref": "#/$defs/taskBase", "type": "object", @@ -972,13 +1041,13 @@ "unevaluatedProperties": false, "properties": { "wait": { - "description": "The amount of time to wait.", - "$ref": "#/$defs/duration" + "$ref": "#/$defs/duration", + "title": "Wait", + "description": "The amount of time to wait." } } }, "flowDirective": { - "additionalProperties": false, "anyOf": [ { "type": "string", @@ -987,33 +1056,81 @@ "exit", "end" ], - "default": "continue" + "default": "continue", + "title": "FlowDirectiveEnum" }, { "type": "string" } - ] + ], + "title": "FlowDirective" + }, + "referenceableAuthenticationPolicy": { + "type": "object", + "oneOf": [ + { + "title": "AuthenticationPolicyReference", + "properties": { + "use": { + "type": "string", + "minLength": 1, + "description": "The name of the authentication policy to use" + } + }, + "required": [ + "use" + ] + }, + { + "$ref": "#/$defs/authenticationPolicy", + "title": "ReferencedAuthenticationPolicy" + } + ], + "title": "ReferenceableAuthenticationPolicy" + }, + "secretBasedAuthenticationPolicy": { + "type": "object", + "properties": { + "use": { + "type": "string", + "minLength": 1, + "description": "The name of the authentication policy to use" + } + }, + "required": [ + "use" + ], + "title": "SecretBasedAuthenticationPolicy" }, "authenticationPolicy": { "type": "object", "oneOf": [ { + "title": "BasicAuthenticationPolicy", "properties": { "basic": { "type": "object", - "properties": { - "username": { - "type": "string", - "description": "The username to use." + "oneOf": [ + { + "properties": { + "username": { + "type": "string", + "description": "The username to use." + }, + "password": { + "type": "string", + "description": "The password to use." + } + }, + "required": [ + "username", + "password" + ], + "title": "ExplicitBasicAuthenticationPolicy" }, - "password": { - "type": "string", - "description": "The password to use." + { + "$ref": "#/$defs/secretBasedAuthenticationPolicy" } - }, - "required": [ - "username", - "password" ] } }, @@ -1023,17 +1140,26 @@ "description": "Use basic authentication." }, { + "title": "BearerAuthenticationPolicy", "properties": { "bearer": { "type": "object", - "properties": { - "token": { - "type": "string", - "description": "The bearer token to use." + "oneOf": [ + { + "properties": { + "token": { + "type": "string", + "description": "The bearer token to use." + } + }, + "required": [ + "token" + ], + "title": "ExplicitBearerAuthenticationPolicy" + }, + { + "$ref": "#/$defs/secretBasedAuthenticationPolicy" } - }, - "required": [ - "token" ] } }, @@ -1043,70 +1169,79 @@ "description": "Use bearer authentication." }, { + "title": "OAuth2AuthenticationPolicy", "properties": { "oauth2": { "type": "object", - "properties": { - "authority": { - "type": "string", - "format": "uri", - "description": "The URI that references the OAuth2 authority to use." - }, - "grant": { - "type": "string", - "description": "The grant type to use." - }, - "client": { - "type": "object", + "oneOf": [ + { "properties": { - "id": { + "authority": { "type": "string", - "description": "The client id to use." + "format": "uri", + "description": "The URI that references the OAuth2 authority to use." }, - "secret": { + "grant": { "type": "string", - "description": "The client secret to use, if any." + "description": "The grant type to use." + }, + "client": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The client id to use." + }, + "secret": { + "type": "string", + "description": "The client secret to use, if any." + } + }, + "required": [ + "id" + ] + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The scopes, if any, to request the token for." + }, + "audiences": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The audiences, if any, to request the token for." + }, + "username": { + "type": "string", + "description": "The username to use. Used only if the grant type is Password." + }, + "password": { + "type": "string", + "description": "The password to use. Used only if the grant type is Password." + }, + "subject": { + "$ref": "#/$defs/oauth2Token", + "description": "The security token that represents the identity of the party on behalf of whom the request is being made." + }, + "actor": { + "$ref": "#/$defs/oauth2Token", + "description": "The security token that represents the identity of the acting party." } }, "required": [ - "id" - ] - }, - "scopes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The scopes, if any, to request the token for." - }, - "audiences": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The audiences, if any, to request the token for." - }, - "username": { - "type": "string", - "description": "The username to use. Used only if the grant type is Password." - }, - "password": { - "type": "string", - "description": "The password to use. Used only if the grant type is Password." - }, - "subject": { - "$ref": "#/$defs/oauth2Token", - "description": "The security token that represents the identity of the party on behalf of whom the request is being made." + "authority", + "grant", + "client" + ], + "title": "ExplicitOAuth2AuthenticationPolicy" }, - "actor": { - "$ref": "#/$defs/oauth2Token", - "description": "The security token that represents the identity of the acting party." + { + "$ref": "#/$defs/secretBasedAuthenticationPolicy" } - }, - "required": [ - "authority", - "grant", - "client" ] } }, @@ -1116,6 +1251,7 @@ "description": "Use OAUTH2 authentication." } ], + "title": "AuthenticationPolicy", "description": "Defines an authentication policy." }, "oauth2Token": { @@ -1133,7 +1269,8 @@ "required": [ "token", "type" - ] + ], + "title": "OAuth2Token" }, "duration": { "type": "object", @@ -1160,6 +1297,7 @@ "description": "Number of milliseconds, if any." } }, + "title": "Duration", "description": "The definition of a duration." }, "error": { @@ -1188,6 +1326,7 @@ "description": "A human-readable explanation specific to this occurrence of the error." } }, + "title": "Error", "required": [ "type", "status", @@ -1203,17 +1342,12 @@ "description": "The endpoint's URI." }, "authentication": { - "description": "The authentication policy to use.", - "oneOf": [ - { - "$ref": "#/$defs/authenticationPolicy" - }, - { - "type": "string" - } - ] + "$ref": "#/$defs/referenceableAuthenticationPolicy", + "title": "EndpointAuthentication", + "description": "The authentication policy to use." } }, + "title": "Endpoint", "required": [ "uri" ] @@ -1222,12 +1356,14 @@ "type": "object", "oneOf": [ { + "title": "AllEventConsumptionStrategy", "properties": { "all": { "type": "array", "items": { "$ref": "#/$defs/eventFilter" }, + "title": "EventConsumptionStrategyAll", "description": "A list containing all the events that must be consumed." } }, @@ -1236,12 +1372,14 @@ ] }, { + "title": "AnyEventConsumptionStrategy", "properties": { "any": { "type": "array", "items": { "$ref": "#/$defs/eventFilter" }, + "title": "EventConsumptionStrategyAny", "description": "A list containing any of the events to consume." } }, @@ -1250,9 +1388,11 @@ ] }, { + "title": "OneEventConsumptionStrategy", "properties": { "one": { "$ref": "#/$defs/eventFilter", + "title": "EventConsumptionStrategyOne", "description": "The single event to consume." } }, @@ -1260,12 +1400,14 @@ "one" ] } - ] + ], + "title": "EventConsumptionStrategy" }, "eventFilter": { "type": "object", "properties": { "with": { + "title": "WithEvent", "type": "object", "minProperties": 1, "properties": { @@ -1316,12 +1458,14 @@ "from" ] }, + "title": "Correlate", "description": "A correlation is a link between events and data, established by mapping event attributes to specific data attributes, allowing for coordinated processing or handling based on event characteristics." } }, "required": [ "with" ], + "title": "EventFilter", "description": "An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes." }, "extension": { @@ -1350,17 +1494,20 @@ "description": "A runtime expression, if any, used to determine whether or not the extension should apply in the specified context." }, "before": { - "description": "The task(s) to execute before the extended task, if any.", - "$ref": "#/$defs/taskList" + "$ref": "#/$defs/taskList", + "title": "ExtensionBefore", + "description": "The task(s) to execute before the extended task, if any." }, "after": { - "description": "The task(s) to execute after the extended task, if any.", - "$ref": "#/$defs/taskList" + "$ref": "#/$defs/taskList", + "title": "ExtensionAfter", + "description": "The task(s) to execute after the extended task, if any." } }, "required": [ "extend" ], + "title": "Extension", "description": "The definition of a an extension." }, "externalResource": { @@ -1370,6 +1517,7 @@ "format": "uri" }, { + "title": "ExternalResourceURI", "type": "object", "properties": { "uri": { @@ -1378,15 +1526,8 @@ "description": "The endpoint's URI." }, "authentication": { - "description": "The authentication policy to use.", - "oneOf": [ - { - "$ref": "#/$defs/authenticationPolicy" - }, - { - "type": "string" - } - ] + "$ref": "#/$defs/referenceableAuthenticationPolicy", + "description": "The authentication policy to use." }, "name": { "type": "string", @@ -1397,20 +1538,31 @@ "uri" ] } - ] + ], + "title": "ExternalResource" }, "input": { "type": "object", "properties": { "schema": { "$ref": "#/$defs/schema", + "title": "InputSchema", "description": "The schema used to describe and validate the input of the workflow or task." }, "from": { - "type": "string", + "oneOf": [ + { + "type": "string" + }, + { + "type": "object" + } + ], + "title": "InputFrom", "description": "A runtime expression, if any, used to mutate and/or filter the input of the workflow or task." } }, + "title": "Input", "description": "Configures the input of a workflow or task." }, "output": { @@ -1418,13 +1570,23 @@ "properties": { "schema": { "$ref": "#/$defs/schema", + "title": "OutputSchema", "description": "The schema used to describe and validate the output of the workflow or task." }, "as": { - "type": "string", + "oneOf": [ + { + "type": "string" + }, + { + "type": "object" + } + ], + "title": "OutputAs", "description": "A runtime expression, if any, used to mutate and/or filter the output of the workflow or task." } }, + "title": "Output", "description": "Configures the output of a workflow or task." }, "export": { @@ -1432,13 +1594,23 @@ "properties": { "schema": { "$ref": "#/$defs/schema", + "title": "ExportSchema", "description": "The schema used to describe and validate the workflow context." }, "as": { - "type": "string", + "oneOf": [ + { + "type": "string" + }, + { + "type": "object" + } + ], + "title": "ExportAs", "description": "A runtime expression, if any, used to export the output data to the context." } }, + "title": "Export", "description": "Set the content of the context." }, "retryPolicy": { @@ -1454,12 +1626,15 @@ }, "delay": { "$ref": "#/$defs/duration", + "title": "RetryPolicyDelay", "description": "The duration to wait between retry attempts." }, "backoff": { "type": "object", + "title": "RetryPolicyBackoff", "oneOf": [ { + "title": "ConstantBackoff", "properties": { "constant": { "type": "object", @@ -1471,6 +1646,7 @@ ] }, { + "title": "ExponentialBackOff", "properties": { "exponential": { "type": "object", @@ -1482,6 +1658,7 @@ ] }, { + "title": "LinearBackoff", "properties": { "linear": { "type": "object", @@ -1497,8 +1674,10 @@ }, "limit": { "type": "object", + "title": "RetryPolicyLimit", "properties": { "attempt": { + "title": "RetryPolicyAttempt", "type": "object", "properties": { "count": { @@ -1507,26 +1686,31 @@ }, "duration": { "$ref": "#/$defs/duration", + "title": "RetryPolicyAttemptDuration", "description": "The maximum duration for each retry attempt." } } }, "duration": { "$ref": "#/$defs/duration", + "title": "RetryPolicyDuration", "description": "The duration limit, if any, for all retry attempts." } }, "description": "The retry limit, if any" }, "jitter": { + "title": "RetryPolicyJitter", "type": "object", "properties": { "from": { "$ref": "#/$defs/duration", + "title": "RetryPolicyJitterFrom", "description": "The minimum duration of the jitter range" }, "to": { "$ref": "#/$defs/duration", + "title": "RetryPolicyJitterTo", "description": "The maximum duration of the jitter range" } }, @@ -1537,6 +1721,7 @@ "description": "The parameters, if any, that control the randomness or variability of the delay between retry attempts." } }, + "title": "RetryPolicy", "description": "Defines a retry policy." }, "schema": { @@ -1550,6 +1735,7 @@ }, "oneOf": [ { + "title": "SchemaInline", "properties": { "document": { "description": "The schema's inline definition." @@ -1560,6 +1746,7 @@ ] }, { + "title": "SchemaExternal", "properties": { "resource": { "$ref": "#/$defs/externalResource", @@ -1571,6 +1758,7 @@ ] } ], + "title": "Schema", "description": "Represents the definition of a schema." }, "timeout": { @@ -1584,6 +1772,7 @@ "required": [ "after" ], + "title": "Timeout", "description": "The definition of a timeout." } }, diff --git a/src/lib/generated/validation/README.md b/src/lib/generated/validation/README.md new file mode 100644 index 00000000..7d5a8642 --- /dev/null +++ b/src/lib/generated/validation/README.md @@ -0,0 +1,2 @@ +# Auto generated notice +This directory and its content has been generated automatically. Do not modify its content, it WILL be lost. \ No newline at end of file diff --git a/src/lib/generated/validation/index.ts b/src/lib/generated/validation/index.ts new file mode 100644 index 00000000..75ff46e9 --- /dev/null +++ b/src/lib/generated/validation/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { validationPointers } from './validation-pointers'; diff --git a/src/lib/generated/validation/validation-pointers.ts b/src/lib/generated/validation/validation-pointers.ts new file mode 100644 index 00000000..59d17d1f --- /dev/null +++ b/src/lib/generated/validation/validation-pointers.ts @@ -0,0 +1,194 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A map of type names and their corresponding schema + */ +export const validationPointers = { + Workflow: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#', + AllEventConsumptionStrategy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/eventConsumptionStrategy/oneOf/0', + AnyEventConsumptionStrategy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/eventConsumptionStrategy/oneOf/1', + AuthenticationPolicy: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/authenticationPolicy', + AuthenticationPolicyReference: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/referenceableAuthenticationPolicy/oneOf/0', + BasicAuthenticationPolicy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/authenticationPolicy/oneOf/0', + BearerAuthenticationPolicy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/authenticationPolicy/oneOf/1', + CallAsyncAPI: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/0', + CallAsyncAPIWith: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/0/properties/with', + CallFunction: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/4', + CallFunctionWith: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/4/properties/with', + CallGRPC: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/1', + CallGRPCWith: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/1/properties/with', + CallGRPCWithArguments: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/1/properties/with/properties/arguments', + CallGRPCWithService: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/1/properties/with/properties/service', + CallHTTP: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/2', + CallHTTPWith: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/2/properties/with', + CallHTTPWithBody: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/2/properties/with/properties/body', + CallHTTPWithEndpoint: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/2/properties/with/properties/endpoint', + CallHTTPWithHeaders: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/2/properties/with/properties/headers', + CallOpenAPI: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/3', + CallOpenAPIWith: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/3/properties/with', + CallOpenAPIWithParameters: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/3/properties/with/properties/parameters', + CallTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask', + Catch: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/tryTask/properties/catch', + CatchErrors: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/tryTask/properties/catch/properties/errors', + ConstantBackoff: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/retryPolicy/properties/backoff/oneOf/0', + Container: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/0/properties/container', + ContainerEnvironment: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/0/properties/container/properties/environment', + Correlate: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/eventFilter/properties/correlate', + DoTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/doTask', + Duration: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/duration', + Emit: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/emitTask/properties/emit', + EmitEvent: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/emitTask/properties/emit/properties/event', + EmitTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/emitTask', + Endpoint: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/endpoint', + Error: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/error', + EventConsumptionStrategy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/eventConsumptionStrategy', + EventConsumptionStrategyAll: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/eventConsumptionStrategy/oneOf/0/properties/all', + EventConsumptionStrategyAny: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/eventConsumptionStrategy/oneOf/1/properties/any', + EventFilter: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/eventFilter', + ExplicitBasicAuthenticationPolicy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/authenticationPolicy/oneOf/0/properties/basic/oneOf/0', + ExplicitBearerAuthenticationPolicy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/authenticationPolicy/oneOf/1/properties/bearer/oneOf/0', + ExplicitOAuth2AuthenticationPolicy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/authenticationPolicy/oneOf/2/properties/oauth2/oneOf/0', + ExponentialBackOff: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/retryPolicy/properties/backoff/oneOf/1', + Export: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/export', + ExportAs: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/export/properties/as', + Extension: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/extension', + ExtensionItem: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/use/properties/extensions/items', + ExternalResource: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/externalResource', + ExternalResourceURI: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/externalResource/oneOf/1', + FlowDirective: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/flowDirective', + FlowDirectiveEnum: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/flowDirective/anyOf/0', + For: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/forTask/properties/for', + Fork: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/forkTask/properties/fork', + ForkTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/forkTask', + ForTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/forTask', + Input: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/input', + InputFrom: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/input/properties/from', + LinearBackoff: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/retryPolicy/properties/backoff/oneOf/2', + Listen: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/listenTask/properties/listen', + ListenTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/listenTask', + OAuth2AuthenticationPolicy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/authenticationPolicy/oneOf/2', + Oauth2Token: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/oauth2Token', + OneEventConsumptionStrategy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/eventConsumptionStrategy/oneOf/2', + Output: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/output', + OutputAs: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/output/properties/as', + Raise: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/raiseTask/properties/raise', + RaiseTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/raiseTask', + ReferenceableAuthenticationPolicy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/referenceableAuthenticationPolicy', + ReferencedAuthenticationPolicy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/referenceableAuthenticationPolicy/oneOf/1', + RetryPolicy: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/retryPolicy', + RetryPolicyAttempt: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/retryPolicy/properties/limit/properties/attempt', + RetryPolicyBackoff: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/retryPolicy/properties/backoff', + RetryPolicyJitter: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/retryPolicy/properties/jitter', + RetryPolicyLimit: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/retryPolicy/properties/limit', + Run: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run', + RunContainer: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/0', + RunScript: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/1', + RunShell: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/2', + RunTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask', + RunWokflow: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/3', + RunWorkflowDescriptor: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/3/properties/workflow', + Schema: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/schema', + SchemaExternal: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/schema/oneOf/1', + SchemaInline: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/schema/oneOf/0', + Script: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/1/properties/script', + ScriptExternal: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/1/properties/script/oneOf/1', + ScriptInline: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/1/properties/script/oneOf/0', + SecretBasedAuthenticationPolicy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/secretBasedAuthenticationPolicy', + Set: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/setTask/properties/set', + SetTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/setTask', + Shell: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/2/properties/shell', + ShellArguments: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/2/properties/shell/properties/arguments', + ShellEnvironment: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/2/properties/shell/properties/environment', + Switch: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/switchTask/properties/switch', + SwitchCase: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/switchTask/properties/switch/items/additionalProperties', + SwitchItem: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/switchTask/properties/switch/items', + SwitchTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/switchTask', + Task: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/task', + TaskBase: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/taskBase', + TaskItem: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/taskList/items', + TaskList: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/taskList', + Timeout: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/timeout', + TryTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/tryTask', + WaitTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/waitTask', + WithEvent: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/eventFilter/properties/with', + WorkflowAuthentications: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/use/properties/authentications', + WorkflowComponents: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/use', + WorkflowDocument: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/document', + WorkflowErrors: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/use/properties/errors', + WorkflowExtensions: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/use/properties/extensions', + WorkflowFunctions: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/use/properties/functions', + WorkflowInput: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/input', + WorkflowRetries: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/use/properties/retries', + WorkflowSchedule: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/schedule', + WorkflowSecrets: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/use/properties/secrets', + WorkflowTags: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/document/properties/tags', +}; diff --git a/src/lib/validation.ts b/src/lib/validation.ts new file mode 100644 index 00000000..707dfd75 --- /dev/null +++ b/src/lib/validation.ts @@ -0,0 +1,43 @@ +import Ajv, { ValidateFunction } from 'ajv/dist/2020'; +import addFormats from 'ajv-formats'; +import workflowSchema from './generated/schema/workflow.json'; +import { validationPointers } from './generated/validation'; + +const ajv = new Ajv({ + schemas: [workflowSchema], + strict: false, +}); +addFormats(ajv); + +/** + * A Map of validation functions, where the key is the name of the schema to validate with + */ +export const validators: Map = new Map( + Object.entries(validationPointers).map(([typeName, jsonPointer]) => { + const validate = ajv.getSchema(jsonPointer); + if (!validate) throw `Unable to find schema '${jsonPointer}' for type '${typeName}'`; + return [typeName, validate as ValidateFunction]; + }), +); + +/** + * Validates the provided data or throws an error + * @param typeName The data type to validate + * @param data The data to validate + * @returns True if valid, throws if invalid + */ +export const validate = (typeName: string, data: T): boolean => { + const validateFn: ValidateFunction | undefined = validators.get(typeName); + if (!validateFn) { + throw Error(`Unable to find a validation function for '${typeName}'`); + } + if (!validateFn(JSON.parse(JSON.stringify(data)))) { + throw new Error( + `'${typeName}' is invalid: +${validateFn.errors?.reduce((acc, error) => acc + `- ${error.instancePath} | ${error.schemaPath} | ${error.message}\n`, '') ?? ''} + +data: ${JSON.stringify(data, null, 4)}`, + ); + } + return true; +}; diff --git a/tests/builders/explicit-basic-authentication-policy-builder.spec.ts b/tests/builders/explicit-basic-authentication-policy-builder.spec.ts new file mode 100644 index 00000000..bb090173 --- /dev/null +++ b/tests/builders/explicit-basic-authentication-policy-builder.spec.ts @@ -0,0 +1,17 @@ +import { explicitBasicAuthenticationPolicyBuilder } from '../../src/lib/generated/builders/explicit-basic-authentication-policy-builder'; +import { Classes } from '../../src/lib/generated/classes'; + +describe('ExplicitBasicAuthenticationPolicy builder', () => { + it('should build', () => { + const username = 'foo'; + const password = 'bar'; + const explicitBasicAuthenticationPolicy = explicitBasicAuthenticationPolicyBuilder() + .username(username) + .password(password) + .build(); + expect(explicitBasicAuthenticationPolicy).toBeDefined(); + expect(explicitBasicAuthenticationPolicy.username).toBe(username); + expect(explicitBasicAuthenticationPolicy.password).toBe(password); + expect(explicitBasicAuthenticationPolicy instanceof Classes.ExplicitBasicAuthenticationPolicy).toBe(true); + }); +}); diff --git a/tests/classes/workflow.spec.ts b/tests/classes/workflow.spec.ts new file mode 100644 index 00000000..2d0cb776 --- /dev/null +++ b/tests/classes/workflow.spec.ts @@ -0,0 +1,8 @@ +import { Classes } from '../../src/lib/generated/classes'; + +describe('workflow class', () => { + it('should be an instance of Workflow', () => { + const workflow = new Classes.Workflow(); + expect(workflow instanceof Classes.Workflow).toBe(true); + }); +}); diff --git a/tools/download-schemas.ts b/tools/1_download-schemas.ts similarity index 100% rename from tools/download-schemas.ts rename to tools/1_download-schemas.ts diff --git a/tools/generate-definitions.ts b/tools/2_generate-definitions.ts similarity index 68% rename from tools/generate-definitions.ts rename to tools/2_generate-definitions.ts index ed91d92f..52bd65a7 100644 --- a/tools/generate-definitions.ts +++ b/tools/2_generate-definitions.ts @@ -19,19 +19,37 @@ import { promises as fsPromises } from 'fs'; import * as path from 'path'; import { Project, QuoteKind } from 'ts-morph'; import { fileHeader } from './consts'; -import { reset } from './utils'; +import { definitionsDir, isObject, reset, schemaDir } from './utils'; const { writeFile, readFile } = fsPromises; /** - * Creates the type->path map for the ajv validators - * @param {string} dest The output path - * @param {Map} known$Refs The know references map - * @returns {void} + * Try to prevent type duplicate by removing metadata where $ref are used + * see https://github.com/bcherny/json-schema-to-typescript/issues/193 + * @param schema The raw schema + * @returns The schema without conflicting metadata */ -// const createValidatorsPaths = async (dest: string, known$Refs: Map, baseUrl: string): Promise => { -// //todo -// }; +function removeConflictingMetadata(schema: any): any { + const blacklistedProperties = ['title', 'description', 'default']; + if (!isObject(schema) && !Array.isArray(schema)) { + return schema; + } + if (Array.isArray(schema)) { + return schema.map((item) => removeConflictingMetadata(item)); + } + return Object.entries(schema).reduce((outputSchema, [key, value]: [string, any]) => { + let newValue = JSON.parse(JSON.stringify(value)); + if (!!newValue['$ref']) { + // leave only $ref if the definition only includes $ref and some metadata. If there are additionnal properties, leave it untouched + blacklistedProperties.forEach((prop) => delete newValue[prop]); + if (Object.keys(newValue).length > 1) { + newValue = JSON.parse(JSON.stringify(value)); + } + } + outputSchema[key] = removeConflictingMetadata(newValue); + return outputSchema; + }, {} as any); +} /** * Removes duplicate declarations from the provided TypeScript code @@ -82,18 +100,20 @@ async function generate(srcFile: string, destFile: string): Promise { *****************************************************************************************/ `, - unreachableDefinitions: true, + //unreachableDefinitions: true, }; const schemaText = await readFile(srcFile, { encoding: 'utf-8' }); - const schema = JSON.parse(schemaText); - const declarations = await compile(schema, 'Workflow', options); // no idea what "name" is used for... + const schema = removeConflictingMetadata(JSON.parse(schemaText)); + //const schema = JSON.parse(schemaText); + const declarations = await compile(schema, 'Workflow', options); const destDir = path.dirname(destFile); await reset(destDir); - await writeFile(destFile, removeDuplicateDeclarations(declarations)); + await writeFile(destFile, declarations); + //await writeFile(destFile, removeDuplicateDeclarations(declarations)); await writeFile(path.resolve(destDir, 'index.ts'), fileHeader + "export * as Specification from './specification';"); } -const srcFile = path.resolve(process.cwd(), 'src/lib/schema/workflow.json'); -const destFile = path.resolve(process.cwd(), 'src/lib/definitions/specification.ts'); +const srcFile = path.resolve(schemaDir, 'workflow.json'); +const destFile = path.resolve(definitionsDir, 'specification.ts'); generate(srcFile, destFile).then(console.log.bind(console)).catch(console.error.bind(console)); diff --git a/tools/3_generate-validation-pointers.ts b/tools/3_generate-validation-pointers.ts new file mode 100644 index 00000000..d921a9e9 --- /dev/null +++ b/tools/3_generate-validation-pointers.ts @@ -0,0 +1,95 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { promises as fsPromises } from 'fs'; +import * as path from 'path'; +import { fileHeader } from './consts'; +import { definitionsDir, getExportedDeclarations, isObject, reset, schemaDir, vallidationDir } from './utils'; +import { JSONSchema } from 'json-schema-to-typescript'; + +const { writeFile, readFile } = fsPromises; + +/** + * Gets the JSON pointer of the subschema with the provided title + * @param schema The schema to get the pointer from + * @param title The title to lookup + * @param parentPath The JSON pointer of the parent schema + * @returns The JSON pointer of the subschema with the provided title, or undefined if none is found + */ +function getJsonPointer(schema: JSONSchema, title: string, parentPointer: string = '#'): string | undefined { + if (typeof schema.title === 'string' && schema.title.toLowerCase() === title.toLowerCase()) { + return parentPointer; + } + for (const [key, value] of Object.entries(schema) as [string, any]) { + if (!isObject(value) && !Array.isArray(value)) { + continue; + } + if (!Array.isArray(value)) { + const match = getJsonPointer(value, title, `${parentPointer}/${key}`); + if (match) { + return match; + } + } else { + for (let i = 0, c = value.length; i < c; i++) { + const match = getJsonPointer(value[i], title, `${parentPointer}/${key}/${i}`); + if (match) { + return match; + } + } + } + } +} + +/** + * Generates a file containing a mapping of type and their JSON pointers + * @param schemaFile The schema to get the pointers from + * @param definitionFile The definition file to get the declarations from + * @param destFile The output file + */ +async function generate(schemaFile: string, definitionFile: string, destFile: string): Promise { + const definitions = await readFile(definitionFile, { encoding: 'utf-8' }); + const schemaTxt = await readFile(schemaFile, { encoding: 'utf-8' }); + const declarations = getExportedDeclarations(definitions) + .filter((name) => name !== 'Workflow') + .sort((a, b) => a.localeCompare(b)); + const schema = JSON.parse(schemaTxt) as JSONSchema; + const baseUri = schema.$id + '#'; + const jsonPointers = [ + ['Workflow', baseUri], + ...declarations.map((name) => [name, getJsonPointer(schema, name, baseUri)]), + ]; + const validationPointersSrc = `${fileHeader} +/** +* A map of type names and their corresponding schema +*/ +export const validationPointers = { +${jsonPointers.reduce((src, [key, value]) => `${src} ${key}: ${value ? `'${value}'` : 'undefined'},\n`, '')} +}; + `; + const destDir = path.dirname(destFile); + await reset(destDir); + await writeFile(destFile, validationPointersSrc); + await writeFile( + path.resolve(destDir, 'index.ts'), + fileHeader + "export { validationPointers } from './validation-pointers';", + ); +} + +const schemaFile = path.resolve(schemaDir, 'workflow.json'); +const definitionFile = path.resolve(definitionsDir, 'specification.ts'); +const destFile = path.resolve(vallidationDir, 'validation-pointers.ts'); + +generate(schemaFile, definitionFile, destFile).then(console.log.bind(console)).catch(console.error.bind(console)); diff --git a/tools/4_generate-classes.ts b/tools/4_generate-classes.ts new file mode 100644 index 00000000..b4ae1dae --- /dev/null +++ b/tools/4_generate-classes.ts @@ -0,0 +1,56 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { promises as fsPromises } from 'fs'; +import * as path from 'path'; +import { fileHeader } from './consts'; +import { + classesDir, + definitionsDir, + getExportedDeclarations, + normalizeKnownAllCaps, + reset, + toKebabCase, +} from './utils'; + +const { writeFile, readFile } = fsPromises; + +/** + * Generates empty classes. Used + * @param definitionFile + * @param destDir + */ +async function generate(definitionFile: string, destDir: string): Promise { + const definitions = await readFile(definitionFile, { encoding: 'utf-8' }); + const declarations = getExportedDeclarations(definitions); + await reset(destDir); + for (const declaration of declarations) { + const classSrc = `export class ${declaration} {}`; + const destFile = path.resolve(destDir, toKebabCase(normalizeKnownAllCaps(declaration)) + '.ts'); + await writeFile(destFile, classSrc); + } + const indexSrc = `${fileHeader} +${declarations.reduce((imports, declaration) => `${imports}import { ${declaration} } from './${toKebabCase(normalizeKnownAllCaps(declaration))}';\n`, '')} +export const Classes = { + ${declarations.reduce((exports, declaration) => `${exports} ${declaration},\n`, '')} +};`; + const destFile = path.resolve(destDir, 'index.ts'); + await writeFile(destFile, indexSrc); +} + +const definitionFile = path.resolve(definitionsDir, 'specification.ts'); + +generate(definitionFile, classesDir).then(console.log.bind(console)).catch(console.error.bind(console)); diff --git a/tools/5_generate-builders.ts b/tools/5_generate-builders.ts new file mode 100644 index 00000000..139b5f9c --- /dev/null +++ b/tools/5_generate-builders.ts @@ -0,0 +1,146 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { promises as fsPromises } from 'fs'; +import * as path from 'path'; +import { fileHeader } from './consts'; +import { + buildersDir, + definitionsDir, + getExportedDeclarations, + normalizeKnownAllCaps, + reset, + toKebabCase, +} from './utils'; + +const { readFile, writeFile } = fsPromises; + +interface BuilderExtension { + import?: string; + preValidate: string; +} + +/** Stores additional code that needs to be added to builders depending on their type */ +const buildersExtensions: { [key: string]: BuilderExtension } = { + Dummy: { + // example + import: `import { dummyFunction } from '../definitions/utils';`, + preValidate: `\r\n dummyFunction(model);`, + }, +}; + +/** + * Transforms PascalCase into camelCase + * @param {string} value A PascalCase string + * @returns A camelCase string + */ +const toCamelCase = (value: string): string => { + if (!value) return ''; + const transformable = value.trim(); + return transformable[0].toLowerCase() + transformable.slice(1); +}; + +/** + * Creates a builder for the provided type + * @param {string} destDir The builders directory + * @param {string} declaration The type to create the builder for + * @returns {void} + */ +const createBuilder = async (destDir: string, declaration: string): Promise => { + try { + const camelType = toCamelCase(declaration); + const extension = buildersExtensions[declaration]; + const builderCode = + fileHeader + + `import { builder, Builder } from "../../builder"; +import { validate } from "../../validation"; +import { Classes } from "../classes"; +import { Specification } from "../definitions"; +${extension?.import ? extension.import + '\n' : ''} +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.${declaration}} data The underlying object + * @returns {Specification.${declaration}} The validated underlying object + */ +function buildingFn(data: Specification.${declaration}): (() => Specification.${declaration}) { + return () => { + const model = new Classes.${declaration}(); + Object.assign(model, data); + ${extension?.preValidate ? extension.preValidate : ''} + validate('${declaration}', model); + return model as Specification.${declaration}; + }; +} + +/** + * A factory to create a builder proxy for the type \`Specification.${declaration}\` + * @returns {Specification.${declaration}} A builder for \`Specification.${declaration}\` + */ +export function ${camelType}Builder(): Builder { + return builder(buildingFn); +}`; + const destFile = path.resolve(destDir, toKebabCase(normalizeKnownAllCaps(declaration)) + '-builder.ts'); + await writeFile(destFile, builderCode); + return Promise.resolve(); + } catch (ex) { + return Promise.reject(ex); + } +}; + +/** + * Creates the builders index file + * @param destDir The builders directory + * @param declarations The list of types to create the index for + * @returns + */ +const createIndex = async (destDir: string, declarations: string[]): Promise => { + try { + const indexCode: string = + fileHeader + + declarations.reduce( + (acc, declaration) => + acc + `export * from './${toKebabCase(normalizeKnownAllCaps(declaration)) + '-builder'}';\n`, + '', + ); + const indexFile = path.resolve(destDir, 'index.ts'); + await writeFile(indexFile, indexCode); + return Promise.resolve(); + } catch (ex) { + return Promise.reject(ex); + } +}; + +/** + * Generates builders + * @param definitionFile The definition file path + * @param destDir The output directory for builders + * @returns + */ +const generate = async (definitionFile: string, destDir: string): Promise => { + try { + await reset(destDir); + const definitions = await readFile(definitionFile, { encoding: 'utf-8' }); + const declarations = getExportedDeclarations(definitions); + await Promise.all(declarations.map(createBuilder.bind(null, destDir))); + createIndex(destDir, declarations); + return Promise.resolve(); + } catch (ex) { + return Promise.reject(ex); + } +}; + +const definitionFile = path.resolve(definitionsDir, 'specification.ts'); +generate(definitionFile, buildersDir).then(console.log.bind(console)).catch(console.error.bind(console)); diff --git a/tools/generate-builders.ts b/tools/generate-builders.ts deleted file mode 100644 index d9d96b82..00000000 --- a/tools/generate-builders.ts +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { promises as fsPromises } from 'fs'; -import * as path from 'path'; -import { fileHeader } from './consts'; -import { reset } from './utils'; - -const { readFile, writeFile } = fsPromises; - -declare global { - interface String { - matchAll(re: RegExp): RegExpExecArray[]; - } -} - -const types = ['Datacondition', 'Eventcondition', 'Events', 'Functions', 'Retries', 'Switchstate']; - -interface BuilderExtension { - import?: string; - preValidate: string; -} - -/** Stores additional code that needs to be added to builders depending on their type */ -const buildersExtensions: { [key: string]: BuilderExtension } = { - Callbackstate: { - import: `import { setEndValueIfNoTransition } from '../definitions/utils';`, - preValidate: `\r\n setEndValueIfNoTransition(model);`, - }, - Delaystate: { - import: `import { setEndValueIfNoTransition } from '../definitions/utils';`, - preValidate: `\r\n setEndValueIfNoTransition(model);`, - }, - Eventstate: { - import: `import { setEndValueIfNoTransition } from '../definitions/utils';`, - preValidate: `\r\n setEndValueIfNoTransition(model);`, - }, - Foreachstate: { - import: `import { setEndValueIfNoTransition } from '../definitions/utils';`, - preValidate: `\r\n setEndValueIfNoTransition(model);`, - }, - Injectstate: { - import: `import { setEndValueIfNoTransition } from '../definitions/utils';`, - preValidate: `\r\n setEndValueIfNoTransition(model);`, - }, - Operationstate: { - import: `import { setEndValueIfNoTransition } from '../definitions/utils';`, - preValidate: `\r\n setEndValueIfNoTransition(model);`, - }, - Parallelstate: { - import: `import { setEndValueIfNoTransition } from '../definitions/utils';`, - preValidate: `\r\n setEndValueIfNoTransition(model);`, - }, - Subflowstate: { - import: `import { setEndValueIfNoTransition } from '../definitions/utils';`, - preValidate: `\r\n setEndValueIfNoTransition(model);`, - }, - Defaultdef: { - import: `import { setEndValueIfNoTransition } from '../definitions/utils';`, - preValidate: `\r\n setEndValueIfNoTransition(model);`, - }, - Error: { - import: `import { setEndValueIfNoTransition } from '../definitions/utils';`, - preValidate: `\r\n setEndValueIfNoTransition(model);`, - }, -}; - -/** - * Transforms PascalCase/camelCase/snake_case into kebab-case - * @param {string} value A string - * @param {boolean} trim If the string needs to be trimmed before transformation - * @returns A kebab-case string - */ -const toKebabCase = (value: string, trim: boolean = true): string => { - if (!value) return ''; - const transformable = trim ? value.trim() : value; - return transformable - .replace(/([A-Z])/g, '-$1') - .replace(/\s+/g, '-') - .replace(/-+/g, '-') - .replace(/_+/g, '-') - .toLowerCase(); -}; - -/** - * Transforms PascalCase into camelCase - * @param {string} value A PascalCase string - * @returns A camelCase string - */ -const toCamelCase = (value: string): string => { - if (!value) return ''; - const transformable = value.trim(); - return transformable[0].toLowerCase() + transformable.slice(1); -}; - -/** - * Creates a builder for the provided type - * @param {string} destDir The builders directory - * @param {string} dataType The type to create the builder for - * @returns {void} - */ -const createBuilder = async (destDir: string, dataType: string): Promise => { - try { - const camelType = toCamelCase(dataType); - const extension = buildersExtensions[dataType]; - const builderCode = - fileHeader + - `import { Builder, builder } from '../builder'; -import { Specification } from '../definitions'; -import { validate } from '../utils'; -${extension?.import ? extension.import : ''} - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.${dataType}} data The underlying object - * @returns {Specification.${dataType}} The validated underlying object - */ -function ${camelType}BuildingFn(data: Specification.${dataType}): (() => Specification.${dataType}) { - return () => { - const model = new Specification.${dataType}(data); - - ${extension?.preValidate ? extension.preValidate : ''} - - validate('${dataType}', model.normalize()); - return model; - }; -} - -/** - * A factory to create a builder proxy for the type \`Specification.${dataType}\` - * @returns {Specification.${dataType}} A builder for \`Specification.${dataType}\` - */ -export function ${camelType}Builder(): Builder { - return builder(${camelType}BuildingFn); -}`; - const destFile = path.resolve(destDir, toKebabCase(camelType) + '-builder.ts'); - await writeFile(destFile, builderCode); - return Promise.resolve(); - } catch (ex) { - return Promise.reject(ex); - } -}; - -/** - * Creates the builders index file - * @param {string} destDir The builders directory - * @param {string} dataType The type to create the builders index for - * @returns {void} - */ -const createIndex = async (destDir: string, classes: string[]): Promise => { - try { - const indexCode: string = - fileHeader + - classes.reduce((acc, t) => acc + `export * from './${toKebabCase(toCamelCase(t)) + '-builder'}';\n`, ''); - const indexFile = path.resolve(destDir, 'index.ts'); - await writeFile(indexFile, indexCode); - return Promise.resolve(); - } catch (ex) { - return Promise.reject(ex); - } -}; - -/** - * Generates builders - * @param {string} source The definition file path - * @param {string} destDir The output directory for builders - * @returns {void} - */ -const generate = async (source: string, destDir: string): Promise => { - try { - await reset(destDir); - const extractor: RegExp = /export \w* (\w*)/g; - const definition: string = await readFile(source, 'utf-8'); - const classes: string[] = [...definition.matchAll(extractor)] - .map(([, type]) => type) - .filter((cl) => !types.includes(cl)); - await Promise.all(classes.map(createBuilder.bind(null, destDir))); - createIndex(destDir, classes); - return Promise.resolve(); - } catch (ex) { - return Promise.reject(ex); - } -}; - -const buildersDir = path.resolve(process.cwd(), 'src/lib/builders'); -const definitionSrc = path.resolve(process.cwd(), 'src/lib/definitions/workflow.ts'); -generate(definitionSrc, buildersDir).then(console.log.bind(console)).catch(console.error.bind(console)); diff --git a/tools/utils.ts b/tools/utils.ts index facec5c8..567e3e58 100644 --- a/tools/utils.ts +++ b/tools/utils.ts @@ -21,6 +21,7 @@ import { readMeDisclaimer } from './consts'; import { URL } from 'url'; import yargs from 'yargs'; import { schemaVersion } from '../package.json'; +import { Project, QuoteKind } from 'ts-morph'; const { writeFile, mkdir } = fsPromises; @@ -30,8 +31,64 @@ export const reset = async (destDir: string) => .then(() => mkdir(destDir, { recursive: true })) .then(() => writeFile(path.resolve(destDir, 'README.md'), readMeDisclaimer)); +/** + * Check if the provided value is an object but not an array + * @param value The value to check + * @returns True if the value is an object + */ +export const isObject = (value: unknown): boolean => { + if (!value) return false; + return typeof value === 'object' && !Array.isArray(value); +}; + +/** + * Transforms a PascalCased string into a kebab-cased one + * @param source + * @returns + */ +export const toKebabCase = (source: string): string => + source + .replace(/([A-Z])/g, ' $1') + .trim() + .replace(/\s+/g, '-') + .replace(/-+/g, '-') + .replace(/_+/g, '-') + .toLowerCase(); + +/** + * Normalize to capitalize first letter only convention for know accronyms, eg HTTP -> Http + * @param source + * @returns + */ +export const normalizeKnownAllCaps = (source: string): string => + source.replace('API', 'Api').replace('GRPC', 'Grpc').replace('HTTP', 'Http'); + +/** + * Get the exported declarations of the provided TypeScript code + * @param tsSource The TypeScript code to parse + * @returns An array containing the name of the exported declarations + */ +export const getExportedDeclarations = (tsSource: string): Array => { + const project = new Project({ + useInMemoryFileSystem: true, + manipulationSettings: { + quoteKind: QuoteKind.Single, + }, + }); + const sourceFile = project.createSourceFile('declarations.ts', tsSource); + return Array.from(sourceFile.getExportedDeclarations()).map(([name, _]) => name); +}; + /** Schemas directory */ -export const schemaDir = path.resolve(process.cwd(), 'src/lib/schema'); +export const schemaDir = path.resolve(process.cwd(), 'src/lib/generated/schema'); +/** Definitions directory */ +export const definitionsDir = path.resolve(process.cwd(), 'src/lib/generated/definitions'); +/** Vallidation directory */ +export const vallidationDir = path.resolve(process.cwd(), 'src/lib/generated/validation'); +/** Classes directory */ +export const classesDir = path.resolve(process.cwd(), 'src/lib/generated/classes'); +/** Builders directory */ +export const buildersDir = path.resolve(process.cwd(), 'src/lib/generated/builders'); const argv = yargs(process.argv.slice(2)) .options({ From c13ca72377b7219865e8132b3cf0af66bba37b5b Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Thu, 25 Jul 2024 19:13:37 +0200 Subject: [PATCH 04/24] improved stability when generating types declarations Signed-off-by: Jean-Baptiste Bianchi --- src/lib/builders/README.md | 2 - .../all-event-consumption-strategy-builder.ts | 43 - .../any-event-consumption-strategy-builder.ts | 43 - ...=> authentication-policy-basic-builder.ts} | 20 +- ...> authentication-policy-bearer-builder.ts} | 20 +- ...> authentication-policy-oauth2-builder.ts} | 20 +- ...entication-policy-oauth2-client-builder.ts | 45 + ...-async-api-with-authentication-builder.ts} | 22 +- ...pc-with-service-authentication-builder.ts} | 22 +- ...l-open-api-with-authentication-builder.ts} | 22 +- src/lib/generated/builders/catch-builder.ts | 43 - .../builders/catch-errors-builder.ts | 43 - .../generated/builders/container-builder.ts | 43 - .../generated/builders/correlate-builder.ts | 43 - ...tput-as-builder.ts => document-builder.ts} | 20 +- ...ne-builder.ts => document-tags-builder.ts} | 20 +- src/lib/generated/builders/emit-builder.ts | 43 - .../generated/builders/emit-event-builder.ts | 43 - ...r-builder.ts => emit-task-emit-builder.ts} | 20 +- ...der.ts => emit-task-emit-event-builder.ts} | 20 +- ....ts => endpoint-authentication-builder.ts} | 20 +- ...r.ts => event-filter-correlate-builder.ts} | 20 +- ...uilder.ts => event-filter-with-builder.ts} | 20 +- ...it-bearer-authentication-policy-builder.ts | 45 - ...t-o-auth2-authentication-policy-builder.ts | 45 - .../builders/exponential-back-off-builder.ts | 43 - ...ternal-resource-authentication-builder.ts} | 22 +- src/lib/generated/builders/for-builder.ts | 43 - ...low-builder.ts => for-task-for-builder.ts} | 20 +- src/lib/generated/builders/fork-builder.ts | 43 - ...e-builder.ts => fork-task-fork-builder.ts} | 20 +- src/lib/generated/builders/index.ts | 145 +- .../generated/builders/input-from-builder.ts | 43 - .../builders/linear-backoff-builder.ts | 43 - src/lib/generated/builders/listen-builder.ts | 43 - ...ilder.ts => listen-task-listen-builder.ts} | 20 +- .../one-event-consumption-strategy-builder.ts | 43 - src/lib/generated/builders/raise-builder.ts | 43 - ...builder.ts => raise-task-raise-builder.ts} | 20 +- ...renceable-authentication-policy-builder.ts | 45 - .../builders/retry-policy-attempt-builder.ts | 43 - ... => retry-policy-limit-attempt-builder.ts} | 20 +- .../generated/builders/run-script-builder.ts | 43 - .../generated/builders/run-shell-builder.ts | 43 - ...ase-builder.ts => run-task-run-builder.ts} | 20 +- ...r.ts => run-task-run-container-builder.ts} | 20 +- ...lder.ts => run-task-run-script-builder.ts} | 20 +- ...> run-task-run-shell-arguments-builder.ts} | 20 +- ...ilder.ts => run-task-run-shell-builder.ts} | 20 +- ...run-task-run-shell-environment-builder.ts} | 20 +- ...er.ts => run-task-run-workflow-builder.ts} | 20 +- .../run-task-run-workflow-input-builder.ts | 43 + .../run-workflow-descriptor-builder.ts | 43 - ...port-as-builder.ts => schedule-builder.ts} | 20 +- src/lib/generated/builders/script-builder.ts | 43 - .../builders/script-external-builder.ts | 43 - ...tem-builder.ts => set-task-set-builder.ts} | 20 +- .../builders/shell-arguments-builder.ts | 43 - src/lib/generated/builders/shell-builder.ts | 43 - src/lib/generated/builders/switch-builder.ts | 43 - ...ilder.ts => switch-task-switch-builder.ts} | 20 +- .../generated/builders/task-item-builder.ts | 43 - .../builders/try-task-catch-builder.ts | 43 + .../{set-builder.ts => use-builder.ts} | 20 +- ...s-builder.ts => use-extensions-builder.ts} | 20 +- .../generated/builders/with-event-builder.ts | 43 - .../builders/workflow-components-builder.ts | 43 - .../builders/workflow-errors-builder.ts | 43 - .../builders/workflow-input-builder.ts | 43 - .../builders/workflow-schedule-builder.ts | 43 - .../builders/workflow-secrets-builder.ts | 43 - .../builders/workflow-tags-builder.ts | 43 - .../classes/all-event-consumption-strategy.ts | 1 - .../classes/any-event-consumption-strategy.ts | 1 - .../classes/authentication-policy-basic.ts | 1 + .../classes/authentication-policy-bearer.ts | 1 + .../authentication-policy-oauth2-client.ts | 1 + .../classes/authentication-policy-oauth2.ts | 1 + .../authentication-policy-reference.ts | 1 - .../classes/basic-authentication-policy.ts | 1 - .../classes/bearer-authentication-policy.ts | 1 - .../call-async-api-with-authentication.ts | 1 + .../call-grpc-with-service-authentication.ts | 1 + .../generated/classes/call-http-with-body.ts | 1 - .../classes/call-http-with-headers.ts | 1 - .../call-open-api-with-authentication.ts | 1 + src/lib/generated/classes/catch-errors.ts | 1 - src/lib/generated/classes/catch.ts | 1 - src/lib/generated/classes/constant-backoff.ts | 1 - .../classes/container-environment.ts | 1 - src/lib/generated/classes/container.ts | 1 - src/lib/generated/classes/correlate.ts | 1 - src/lib/generated/classes/document-tags.ts | 1 + src/lib/generated/classes/document.ts | 1 + src/lib/generated/classes/emit-event.ts | 1 - .../generated/classes/emit-task-emit-event.ts | 1 + src/lib/generated/classes/emit-task-emit.ts | 1 + src/lib/generated/classes/emit.ts | 1 - .../classes/endpoint-authentication.ts | 1 + .../classes/event-filter-correlate.ts | 1 + .../generated/classes/event-filter-with.ts | 1 + .../explicit-basic-authentication-policy.ts | 1 - .../explicit-bearer-authentication-policy.ts | 1 - .../explicit-o-auth2-authentication-policy.ts | 1 - .../generated/classes/exponential-back-off.ts | 1 - src/lib/generated/classes/export-as.ts | 1 - src/lib/generated/classes/extension-item.ts | 1 - .../external-resource-authentication.ts | 1 + .../classes/external-resource-u-r-i.ts | 1 - .../generated/classes/flow-directive-enum.ts | 1 - src/lib/generated/classes/for-task-for.ts | 1 + src/lib/generated/classes/for.ts | 1 - src/lib/generated/classes/fork-task-fork.ts | 1 + src/lib/generated/classes/fork.ts | 1 - src/lib/generated/classes/index.ts | 290 ++- src/lib/generated/classes/input-from.ts | 1 - src/lib/generated/classes/linear-backoff.ts | 1 - .../generated/classes/listen-task-listen.ts | 1 + src/lib/generated/classes/listen.ts | 1 - .../classes/o-auth2-authentication-policy.ts | 1 - .../classes/one-event-consumption-strategy.ts | 1 - src/lib/generated/classes/output-as.ts | 1 - src/lib/generated/classes/raise-task-raise.ts | 1 + src/lib/generated/classes/raise.ts | 1 - .../referenceable-authentication-policy.ts | 1 - .../referenced-authentication-policy.ts | 1 - .../generated/classes/retry-policy-attempt.ts | 1 - .../classes/retry-policy-limit-attempt.ts | 1 + src/lib/generated/classes/run-container.ts | 1 - src/lib/generated/classes/run-script.ts | 1 - src/lib/generated/classes/run-shell.ts | 1 - .../classes/run-task-run-container.ts | 1 + .../generated/classes/run-task-run-script.ts | 1 + .../classes/run-task-run-shell-arguments.ts | 1 + .../classes/run-task-run-shell-environment.ts | 1 + .../generated/classes/run-task-run-shell.ts | 1 + .../classes/run-task-run-workflow-input.ts | 1 + .../classes/run-task-run-workflow.ts | 1 + src/lib/generated/classes/run-task-run.ts | 1 + src/lib/generated/classes/run-wokflow.ts | 1 - .../classes/run-workflow-descriptor.ts | 1 - src/lib/generated/classes/run.ts | 1 - src/lib/generated/classes/schedule.ts | 1 + src/lib/generated/classes/schema-external.ts | 1 - src/lib/generated/classes/schema-inline.ts | 1 - src/lib/generated/classes/script-external.ts | 1 - src/lib/generated/classes/script-inline.ts | 1 - src/lib/generated/classes/script.ts | 1 - .../secret-based-authentication-policy.ts | 1 - src/lib/generated/classes/set-task-set.ts | 1 + src/lib/generated/classes/set.ts | 1 - src/lib/generated/classes/shell-arguments.ts | 1 - .../generated/classes/shell-environment.ts | 1 - src/lib/generated/classes/shell.ts | 1 - src/lib/generated/classes/switch-case.ts | 1 - src/lib/generated/classes/switch-item.ts | 1 - .../generated/classes/switch-task-switch.ts | 1 + src/lib/generated/classes/switch.ts | 1 - src/lib/generated/classes/task-item.ts | 1 - src/lib/generated/classes/try-task-catch.ts | 1 + src/lib/generated/classes/use-extensions.ts | 1 + src/lib/generated/classes/use.ts | 1 + src/lib/generated/classes/with-event.ts | 1 - .../classes/workflow-authentications.ts | 1 - .../generated/classes/workflow-components.ts | 1 - .../generated/classes/workflow-document.ts | 1 - src/lib/generated/classes/workflow-errors.ts | 1 - .../generated/classes/workflow-extensions.ts | 1 - .../generated/classes/workflow-functions.ts | 1 - src/lib/generated/classes/workflow-input.ts | 1 - src/lib/generated/classes/workflow-retries.ts | 1 - .../generated/classes/workflow-schedule.ts | 1 - src/lib/generated/classes/workflow-secrets.ts | 1 - src/lib/generated/classes/workflow-tags.ts | 1 - .../generated/definitions/specification.ts | 898 ++++----- .../generated/schema/__internal_workflow.json | 1763 +++++++++++++++++ src/lib/generated/schema/workflow.json | 527 ++--- .../validation/validation-pointers.ts | 270 ++- src/lib/validation.ts | 12 +- tests/builders/call-http-builder.spec.ts | 31 + ...asic-authentication-policy-builder.spec.ts | 17 - tests/classes/workflow.spec.ts | 2 +- tools/2_generate-definitions.ts | 172 +- tools/3_generate-validation-pointers.ts | 3 +- tools/utils.ts | 22 +- 185 files changed, 3282 insertions(+), 3286 deletions(-) delete mode 100644 src/lib/builders/README.md delete mode 100644 src/lib/generated/builders/all-event-consumption-strategy-builder.ts delete mode 100644 src/lib/generated/builders/any-event-consumption-strategy-builder.ts rename src/lib/generated/builders/{basic-authentication-policy-builder.ts => authentication-policy-basic-builder.ts} (60%) rename src/lib/generated/builders/{o-auth2-authentication-policy-builder.ts => authentication-policy-bearer-builder.ts} (60%) rename src/lib/generated/builders/{run-builder.ts => authentication-policy-oauth2-builder.ts} (60%) create mode 100644 src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts rename src/lib/generated/builders/{referenced-authentication-policy-builder.ts => call-async-api-with-authentication-builder.ts} (60%) rename src/lib/generated/builders/{explicit-basic-authentication-policy-builder.ts => call-grpc-with-service-authentication-builder.ts} (59%) rename src/lib/generated/builders/{authentication-policy-reference-builder.ts => call-open-api-with-authentication-builder.ts} (60%) delete mode 100644 src/lib/generated/builders/catch-builder.ts delete mode 100644 src/lib/generated/builders/catch-errors-builder.ts delete mode 100644 src/lib/generated/builders/container-builder.ts delete mode 100644 src/lib/generated/builders/correlate-builder.ts rename src/lib/generated/builders/{output-as-builder.ts => document-builder.ts} (66%) rename src/lib/generated/builders/{script-inline-builder.ts => document-tags-builder.ts} (64%) delete mode 100644 src/lib/generated/builders/emit-builder.ts delete mode 100644 src/lib/generated/builders/emit-event-builder.ts rename src/lib/generated/builders/{run-container-builder.ts => emit-task-emit-builder.ts} (64%) rename src/lib/generated/builders/{flow-directive-enum-builder.ts => emit-task-emit-event-builder.ts} (62%) rename src/lib/generated/builders/{extension-item-builder.ts => endpoint-authentication-builder.ts} (61%) rename src/lib/generated/builders/{container-environment-builder.ts => event-filter-correlate-builder.ts} (61%) rename src/lib/generated/builders/{workflow-retries-builder.ts => event-filter-with-builder.ts} (63%) delete mode 100644 src/lib/generated/builders/explicit-bearer-authentication-policy-builder.ts delete mode 100644 src/lib/generated/builders/explicit-o-auth2-authentication-policy-builder.ts delete mode 100644 src/lib/generated/builders/exponential-back-off-builder.ts rename src/lib/generated/builders/{secret-based-authentication-policy-builder.ts => external-resource-authentication-builder.ts} (56%) delete mode 100644 src/lib/generated/builders/for-builder.ts rename src/lib/generated/builders/{run-wokflow-builder.ts => for-task-for-builder.ts} (65%) delete mode 100644 src/lib/generated/builders/fork-builder.ts rename src/lib/generated/builders/{schema-inline-builder.ts => fork-task-fork-builder.ts} (64%) delete mode 100644 src/lib/generated/builders/input-from-builder.ts delete mode 100644 src/lib/generated/builders/linear-backoff-builder.ts delete mode 100644 src/lib/generated/builders/listen-builder.ts rename src/lib/generated/builders/{shell-environment-builder.ts => listen-task-listen-builder.ts} (63%) delete mode 100644 src/lib/generated/builders/one-event-consumption-strategy-builder.ts delete mode 100644 src/lib/generated/builders/raise-builder.ts rename src/lib/generated/builders/{schema-external-builder.ts => raise-task-raise-builder.ts} (63%) delete mode 100644 src/lib/generated/builders/referenceable-authentication-policy-builder.ts delete mode 100644 src/lib/generated/builders/retry-policy-attempt-builder.ts rename src/lib/generated/builders/{workflow-authentications-builder.ts => retry-policy-limit-attempt-builder.ts} (60%) delete mode 100644 src/lib/generated/builders/run-script-builder.ts delete mode 100644 src/lib/generated/builders/run-shell-builder.ts rename src/lib/generated/builders/{switch-case-builder.ts => run-task-run-builder.ts} (65%) rename src/lib/generated/builders/{external-resource-u-r-i-builder.ts => run-task-run-container-builder.ts} (61%) rename src/lib/generated/builders/{call-http-with-body-builder.ts => run-task-run-script-builder.ts} (63%) rename src/lib/generated/builders/{call-http-with-headers-builder.ts => run-task-run-shell-arguments-builder.ts} (58%) rename src/lib/generated/builders/{constant-backoff-builder.ts => run-task-run-shell-builder.ts} (63%) rename src/lib/generated/builders/{bearer-authentication-policy-builder.ts => run-task-run-shell-environment-builder.ts} (60%) rename src/lib/generated/builders/{workflow-extensions-builder.ts => run-task-run-workflow-builder.ts} (62%) create mode 100644 src/lib/generated/builders/run-task-run-workflow-input-builder.ts delete mode 100644 src/lib/generated/builders/run-workflow-descriptor-builder.ts rename src/lib/generated/builders/{export-as-builder.ts => schedule-builder.ts} (66%) delete mode 100644 src/lib/generated/builders/script-builder.ts delete mode 100644 src/lib/generated/builders/script-external-builder.ts rename src/lib/generated/builders/{switch-item-builder.ts => set-task-set-builder.ts} (65%) delete mode 100644 src/lib/generated/builders/shell-arguments-builder.ts delete mode 100644 src/lib/generated/builders/shell-builder.ts delete mode 100644 src/lib/generated/builders/switch-builder.ts rename src/lib/generated/builders/{workflow-document-builder.ts => switch-task-switch-builder.ts} (63%) delete mode 100644 src/lib/generated/builders/task-item-builder.ts create mode 100644 src/lib/generated/builders/try-task-catch-builder.ts rename src/lib/generated/builders/{set-builder.ts => use-builder.ts} (68%) rename src/lib/generated/builders/{workflow-functions-builder.ts => use-extensions-builder.ts} (65%) delete mode 100644 src/lib/generated/builders/with-event-builder.ts delete mode 100644 src/lib/generated/builders/workflow-components-builder.ts delete mode 100644 src/lib/generated/builders/workflow-errors-builder.ts delete mode 100644 src/lib/generated/builders/workflow-input-builder.ts delete mode 100644 src/lib/generated/builders/workflow-schedule-builder.ts delete mode 100644 src/lib/generated/builders/workflow-secrets-builder.ts delete mode 100644 src/lib/generated/builders/workflow-tags-builder.ts delete mode 100644 src/lib/generated/classes/all-event-consumption-strategy.ts delete mode 100644 src/lib/generated/classes/any-event-consumption-strategy.ts create mode 100644 src/lib/generated/classes/authentication-policy-basic.ts create mode 100644 src/lib/generated/classes/authentication-policy-bearer.ts create mode 100644 src/lib/generated/classes/authentication-policy-oauth2-client.ts create mode 100644 src/lib/generated/classes/authentication-policy-oauth2.ts delete mode 100644 src/lib/generated/classes/authentication-policy-reference.ts delete mode 100644 src/lib/generated/classes/basic-authentication-policy.ts delete mode 100644 src/lib/generated/classes/bearer-authentication-policy.ts create mode 100644 src/lib/generated/classes/call-async-api-with-authentication.ts create mode 100644 src/lib/generated/classes/call-grpc-with-service-authentication.ts delete mode 100644 src/lib/generated/classes/call-http-with-body.ts delete mode 100644 src/lib/generated/classes/call-http-with-headers.ts create mode 100644 src/lib/generated/classes/call-open-api-with-authentication.ts delete mode 100644 src/lib/generated/classes/catch-errors.ts delete mode 100644 src/lib/generated/classes/catch.ts delete mode 100644 src/lib/generated/classes/constant-backoff.ts delete mode 100644 src/lib/generated/classes/container-environment.ts delete mode 100644 src/lib/generated/classes/container.ts delete mode 100644 src/lib/generated/classes/correlate.ts create mode 100644 src/lib/generated/classes/document-tags.ts create mode 100644 src/lib/generated/classes/document.ts delete mode 100644 src/lib/generated/classes/emit-event.ts create mode 100644 src/lib/generated/classes/emit-task-emit-event.ts create mode 100644 src/lib/generated/classes/emit-task-emit.ts delete mode 100644 src/lib/generated/classes/emit.ts create mode 100644 src/lib/generated/classes/endpoint-authentication.ts create mode 100644 src/lib/generated/classes/event-filter-correlate.ts create mode 100644 src/lib/generated/classes/event-filter-with.ts delete mode 100644 src/lib/generated/classes/explicit-basic-authentication-policy.ts delete mode 100644 src/lib/generated/classes/explicit-bearer-authentication-policy.ts delete mode 100644 src/lib/generated/classes/explicit-o-auth2-authentication-policy.ts delete mode 100644 src/lib/generated/classes/exponential-back-off.ts delete mode 100644 src/lib/generated/classes/export-as.ts delete mode 100644 src/lib/generated/classes/extension-item.ts create mode 100644 src/lib/generated/classes/external-resource-authentication.ts delete mode 100644 src/lib/generated/classes/external-resource-u-r-i.ts delete mode 100644 src/lib/generated/classes/flow-directive-enum.ts create mode 100644 src/lib/generated/classes/for-task-for.ts delete mode 100644 src/lib/generated/classes/for.ts create mode 100644 src/lib/generated/classes/fork-task-fork.ts delete mode 100644 src/lib/generated/classes/fork.ts delete mode 100644 src/lib/generated/classes/input-from.ts delete mode 100644 src/lib/generated/classes/linear-backoff.ts create mode 100644 src/lib/generated/classes/listen-task-listen.ts delete mode 100644 src/lib/generated/classes/listen.ts delete mode 100644 src/lib/generated/classes/o-auth2-authentication-policy.ts delete mode 100644 src/lib/generated/classes/one-event-consumption-strategy.ts delete mode 100644 src/lib/generated/classes/output-as.ts create mode 100644 src/lib/generated/classes/raise-task-raise.ts delete mode 100644 src/lib/generated/classes/raise.ts delete mode 100644 src/lib/generated/classes/referenceable-authentication-policy.ts delete mode 100644 src/lib/generated/classes/referenced-authentication-policy.ts delete mode 100644 src/lib/generated/classes/retry-policy-attempt.ts create mode 100644 src/lib/generated/classes/retry-policy-limit-attempt.ts delete mode 100644 src/lib/generated/classes/run-container.ts delete mode 100644 src/lib/generated/classes/run-script.ts delete mode 100644 src/lib/generated/classes/run-shell.ts create mode 100644 src/lib/generated/classes/run-task-run-container.ts create mode 100644 src/lib/generated/classes/run-task-run-script.ts create mode 100644 src/lib/generated/classes/run-task-run-shell-arguments.ts create mode 100644 src/lib/generated/classes/run-task-run-shell-environment.ts create mode 100644 src/lib/generated/classes/run-task-run-shell.ts create mode 100644 src/lib/generated/classes/run-task-run-workflow-input.ts create mode 100644 src/lib/generated/classes/run-task-run-workflow.ts create mode 100644 src/lib/generated/classes/run-task-run.ts delete mode 100644 src/lib/generated/classes/run-wokflow.ts delete mode 100644 src/lib/generated/classes/run-workflow-descriptor.ts delete mode 100644 src/lib/generated/classes/run.ts create mode 100644 src/lib/generated/classes/schedule.ts delete mode 100644 src/lib/generated/classes/schema-external.ts delete mode 100644 src/lib/generated/classes/schema-inline.ts delete mode 100644 src/lib/generated/classes/script-external.ts delete mode 100644 src/lib/generated/classes/script-inline.ts delete mode 100644 src/lib/generated/classes/script.ts delete mode 100644 src/lib/generated/classes/secret-based-authentication-policy.ts create mode 100644 src/lib/generated/classes/set-task-set.ts delete mode 100644 src/lib/generated/classes/set.ts delete mode 100644 src/lib/generated/classes/shell-arguments.ts delete mode 100644 src/lib/generated/classes/shell-environment.ts delete mode 100644 src/lib/generated/classes/shell.ts delete mode 100644 src/lib/generated/classes/switch-case.ts delete mode 100644 src/lib/generated/classes/switch-item.ts create mode 100644 src/lib/generated/classes/switch-task-switch.ts delete mode 100644 src/lib/generated/classes/switch.ts delete mode 100644 src/lib/generated/classes/task-item.ts create mode 100644 src/lib/generated/classes/try-task-catch.ts create mode 100644 src/lib/generated/classes/use-extensions.ts create mode 100644 src/lib/generated/classes/use.ts delete mode 100644 src/lib/generated/classes/with-event.ts delete mode 100644 src/lib/generated/classes/workflow-authentications.ts delete mode 100644 src/lib/generated/classes/workflow-components.ts delete mode 100644 src/lib/generated/classes/workflow-document.ts delete mode 100644 src/lib/generated/classes/workflow-errors.ts delete mode 100644 src/lib/generated/classes/workflow-extensions.ts delete mode 100644 src/lib/generated/classes/workflow-functions.ts delete mode 100644 src/lib/generated/classes/workflow-input.ts delete mode 100644 src/lib/generated/classes/workflow-retries.ts delete mode 100644 src/lib/generated/classes/workflow-schedule.ts delete mode 100644 src/lib/generated/classes/workflow-secrets.ts delete mode 100644 src/lib/generated/classes/workflow-tags.ts create mode 100644 src/lib/generated/schema/__internal_workflow.json create mode 100644 tests/builders/call-http-builder.spec.ts delete mode 100644 tests/builders/explicit-basic-authentication-policy-builder.spec.ts diff --git a/src/lib/builders/README.md b/src/lib/builders/README.md deleted file mode 100644 index 7d5a8642..00000000 --- a/src/lib/builders/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Auto generated notice -This directory and its content has been generated automatically. Do not modify its content, it WILL be lost. \ No newline at end of file diff --git a/src/lib/generated/builders/all-event-consumption-strategy-builder.ts b/src/lib/generated/builders/all-event-consumption-strategy-builder.ts deleted file mode 100644 index e091692d..00000000 --- a/src/lib/generated/builders/all-event-consumption-strategy-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.AllEventConsumptionStrategy} data The underlying object - * @returns {Specification.AllEventConsumptionStrategy} The validated underlying object - */ -function buildingFn(data: Specification.AllEventConsumptionStrategy): () => Specification.AllEventConsumptionStrategy { - return () => { - const model = new Classes.AllEventConsumptionStrategy(); - Object.assign(model, data); - - validate('AllEventConsumptionStrategy', model); - return model as Specification.AllEventConsumptionStrategy; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.AllEventConsumptionStrategy` - * @returns {Specification.AllEventConsumptionStrategy} A builder for `Specification.AllEventConsumptionStrategy` - */ -export function allEventConsumptionStrategyBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/any-event-consumption-strategy-builder.ts b/src/lib/generated/builders/any-event-consumption-strategy-builder.ts deleted file mode 100644 index 739d54ed..00000000 --- a/src/lib/generated/builders/any-event-consumption-strategy-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.AnyEventConsumptionStrategy} data The underlying object - * @returns {Specification.AnyEventConsumptionStrategy} The validated underlying object - */ -function buildingFn(data: Specification.AnyEventConsumptionStrategy): () => Specification.AnyEventConsumptionStrategy { - return () => { - const model = new Classes.AnyEventConsumptionStrategy(); - Object.assign(model, data); - - validate('AnyEventConsumptionStrategy', model); - return model as Specification.AnyEventConsumptionStrategy; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.AnyEventConsumptionStrategy` - * @returns {Specification.AnyEventConsumptionStrategy} A builder for `Specification.AnyEventConsumptionStrategy` - */ -export function anyEventConsumptionStrategyBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/basic-authentication-policy-builder.ts b/src/lib/generated/builders/authentication-policy-basic-builder.ts similarity index 60% rename from src/lib/generated/builders/basic-authentication-policy-builder.ts rename to src/lib/generated/builders/authentication-policy-basic-builder.ts index b2d2cc17..a12f66d1 100644 --- a/src/lib/generated/builders/basic-authentication-policy-builder.ts +++ b/src/lib/generated/builders/authentication-policy-basic-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.BasicAuthenticationPolicy} data The underlying object - * @returns {Specification.BasicAuthenticationPolicy} The validated underlying object + * @param {Specification.AuthenticationPolicyBasic} data The underlying object + * @returns {Specification.AuthenticationPolicyBasic} The validated underlying object */ -function buildingFn(data: Specification.BasicAuthenticationPolicy): () => Specification.BasicAuthenticationPolicy { +function buildingFn(data: Specification.AuthenticationPolicyBasic): () => Specification.AuthenticationPolicyBasic { return () => { - const model = new Classes.BasicAuthenticationPolicy(); + const model = new Classes.AuthenticationPolicyBasic(); Object.assign(model, data); - validate('BasicAuthenticationPolicy', model); - return model as Specification.BasicAuthenticationPolicy; + validate('AuthenticationPolicyBasic', model); + return model as Specification.AuthenticationPolicyBasic; }; } /** - * A factory to create a builder proxy for the type `Specification.BasicAuthenticationPolicy` - * @returns {Specification.BasicAuthenticationPolicy} A builder for `Specification.BasicAuthenticationPolicy` + * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyBasic` + * @returns {Specification.AuthenticationPolicyBasic} A builder for `Specification.AuthenticationPolicyBasic` */ -export function basicAuthenticationPolicyBuilder(): Builder { - return builder(buildingFn); +export function authenticationPolicyBasicBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/o-auth2-authentication-policy-builder.ts b/src/lib/generated/builders/authentication-policy-bearer-builder.ts similarity index 60% rename from src/lib/generated/builders/o-auth2-authentication-policy-builder.ts rename to src/lib/generated/builders/authentication-policy-bearer-builder.ts index 6565658f..71100656 100644 --- a/src/lib/generated/builders/o-auth2-authentication-policy-builder.ts +++ b/src/lib/generated/builders/authentication-policy-bearer-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.OAuth2AuthenticationPolicy} data The underlying object - * @returns {Specification.OAuth2AuthenticationPolicy} The validated underlying object + * @param {Specification.AuthenticationPolicyBearer} data The underlying object + * @returns {Specification.AuthenticationPolicyBearer} The validated underlying object */ -function buildingFn(data: Specification.OAuth2AuthenticationPolicy): () => Specification.OAuth2AuthenticationPolicy { +function buildingFn(data: Specification.AuthenticationPolicyBearer): () => Specification.AuthenticationPolicyBearer { return () => { - const model = new Classes.OAuth2AuthenticationPolicy(); + const model = new Classes.AuthenticationPolicyBearer(); Object.assign(model, data); - validate('OAuth2AuthenticationPolicy', model); - return model as Specification.OAuth2AuthenticationPolicy; + validate('AuthenticationPolicyBearer', model); + return model as Specification.AuthenticationPolicyBearer; }; } /** - * A factory to create a builder proxy for the type `Specification.OAuth2AuthenticationPolicy` - * @returns {Specification.OAuth2AuthenticationPolicy} A builder for `Specification.OAuth2AuthenticationPolicy` + * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyBearer` + * @returns {Specification.AuthenticationPolicyBearer} A builder for `Specification.AuthenticationPolicyBearer` */ -export function oAuth2AuthenticationPolicyBuilder(): Builder { - return builder(buildingFn); +export function authenticationPolicyBearerBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/run-builder.ts b/src/lib/generated/builders/authentication-policy-oauth2-builder.ts similarity index 60% rename from src/lib/generated/builders/run-builder.ts rename to src/lib/generated/builders/authentication-policy-oauth2-builder.ts index 85747c14..755b6639 100644 --- a/src/lib/generated/builders/run-builder.ts +++ b/src/lib/generated/builders/authentication-policy-oauth2-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Run} data The underlying object - * @returns {Specification.Run} The validated underlying object + * @param {Specification.AuthenticationPolicyOauth2} data The underlying object + * @returns {Specification.AuthenticationPolicyOauth2} The validated underlying object */ -function buildingFn(data: Specification.Run): () => Specification.Run { +function buildingFn(data: Specification.AuthenticationPolicyOauth2): () => Specification.AuthenticationPolicyOauth2 { return () => { - const model = new Classes.Run(); + const model = new Classes.AuthenticationPolicyOauth2(); Object.assign(model, data); - validate('Run', model); - return model as Specification.Run; + validate('AuthenticationPolicyOauth2', model); + return model as Specification.AuthenticationPolicyOauth2; }; } /** - * A factory to create a builder proxy for the type `Specification.Run` - * @returns {Specification.Run} A builder for `Specification.Run` + * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyOauth2` + * @returns {Specification.AuthenticationPolicyOauth2} A builder for `Specification.AuthenticationPolicyOauth2` */ -export function runBuilder(): Builder { - return builder(buildingFn); +export function authenticationPolicyOauth2Builder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts b/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts new file mode 100644 index 00000000..abc82d89 --- /dev/null +++ b/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.AuthenticationPolicyOauth2Client} data The underlying object + * @returns {Specification.AuthenticationPolicyOauth2Client} The validated underlying object + */ +function buildingFn( + data: Specification.AuthenticationPolicyOauth2Client, +): () => Specification.AuthenticationPolicyOauth2Client { + return () => { + const model = new Classes.AuthenticationPolicyOauth2Client(); + Object.assign(model, data); + + validate('AuthenticationPolicyOauth2Client', model); + return model as Specification.AuthenticationPolicyOauth2Client; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyOauth2Client` + * @returns {Specification.AuthenticationPolicyOauth2Client} A builder for `Specification.AuthenticationPolicyOauth2Client` + */ +export function authenticationPolicyOauth2ClientBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/referenced-authentication-policy-builder.ts b/src/lib/generated/builders/call-async-api-with-authentication-builder.ts similarity index 60% rename from src/lib/generated/builders/referenced-authentication-policy-builder.ts rename to src/lib/generated/builders/call-async-api-with-authentication-builder.ts index 9924acaf..458b3097 100644 --- a/src/lib/generated/builders/referenced-authentication-policy-builder.ts +++ b/src/lib/generated/builders/call-async-api-with-authentication-builder.ts @@ -21,25 +21,25 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ReferencedAuthenticationPolicy} data The underlying object - * @returns {Specification.ReferencedAuthenticationPolicy} The validated underlying object + * @param {Specification.CallAsyncAPIWithAuthentication} data The underlying object + * @returns {Specification.CallAsyncAPIWithAuthentication} The validated underlying object */ function buildingFn( - data: Specification.ReferencedAuthenticationPolicy, -): () => Specification.ReferencedAuthenticationPolicy { + data: Specification.CallAsyncAPIWithAuthentication, +): () => Specification.CallAsyncAPIWithAuthentication { return () => { - const model = new Classes.ReferencedAuthenticationPolicy(); + const model = new Classes.CallAsyncAPIWithAuthentication(); Object.assign(model, data); - validate('ReferencedAuthenticationPolicy', model); - return model as Specification.ReferencedAuthenticationPolicy; + validate('CallAsyncAPIWithAuthentication', model); + return model as Specification.CallAsyncAPIWithAuthentication; }; } /** - * A factory to create a builder proxy for the type `Specification.ReferencedAuthenticationPolicy` - * @returns {Specification.ReferencedAuthenticationPolicy} A builder for `Specification.ReferencedAuthenticationPolicy` + * A factory to create a builder proxy for the type `Specification.CallAsyncAPIWithAuthentication` + * @returns {Specification.CallAsyncAPIWithAuthentication} A builder for `Specification.CallAsyncAPIWithAuthentication` */ -export function referencedAuthenticationPolicyBuilder(): Builder { - return builder(buildingFn); +export function callAsyncAPIWithAuthenticationBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/explicit-basic-authentication-policy-builder.ts b/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts similarity index 59% rename from src/lib/generated/builders/explicit-basic-authentication-policy-builder.ts rename to src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts index 530edea0..c9e52ac1 100644 --- a/src/lib/generated/builders/explicit-basic-authentication-policy-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts @@ -21,25 +21,25 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ExplicitBasicAuthenticationPolicy} data The underlying object - * @returns {Specification.ExplicitBasicAuthenticationPolicy} The validated underlying object + * @param {Specification.CallGRPCWithServiceAuthentication} data The underlying object + * @returns {Specification.CallGRPCWithServiceAuthentication} The validated underlying object */ function buildingFn( - data: Specification.ExplicitBasicAuthenticationPolicy, -): () => Specification.ExplicitBasicAuthenticationPolicy { + data: Specification.CallGRPCWithServiceAuthentication, +): () => Specification.CallGRPCWithServiceAuthentication { return () => { - const model = new Classes.ExplicitBasicAuthenticationPolicy(); + const model = new Classes.CallGRPCWithServiceAuthentication(); Object.assign(model, data); - validate('ExplicitBasicAuthenticationPolicy', model); - return model as Specification.ExplicitBasicAuthenticationPolicy; + validate('CallGRPCWithServiceAuthentication', model); + return model as Specification.CallGRPCWithServiceAuthentication; }; } /** - * A factory to create a builder proxy for the type `Specification.ExplicitBasicAuthenticationPolicy` - * @returns {Specification.ExplicitBasicAuthenticationPolicy} A builder for `Specification.ExplicitBasicAuthenticationPolicy` + * A factory to create a builder proxy for the type `Specification.CallGRPCWithServiceAuthentication` + * @returns {Specification.CallGRPCWithServiceAuthentication} A builder for `Specification.CallGRPCWithServiceAuthentication` */ -export function explicitBasicAuthenticationPolicyBuilder(): Builder { - return builder(buildingFn); +export function callGRPCWithServiceAuthenticationBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/authentication-policy-reference-builder.ts b/src/lib/generated/builders/call-open-api-with-authentication-builder.ts similarity index 60% rename from src/lib/generated/builders/authentication-policy-reference-builder.ts rename to src/lib/generated/builders/call-open-api-with-authentication-builder.ts index b96f513a..43398290 100644 --- a/src/lib/generated/builders/authentication-policy-reference-builder.ts +++ b/src/lib/generated/builders/call-open-api-with-authentication-builder.ts @@ -21,25 +21,25 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.AuthenticationPolicyReference} data The underlying object - * @returns {Specification.AuthenticationPolicyReference} The validated underlying object + * @param {Specification.CallOpenAPIWithAuthentication} data The underlying object + * @returns {Specification.CallOpenAPIWithAuthentication} The validated underlying object */ function buildingFn( - data: Specification.AuthenticationPolicyReference, -): () => Specification.AuthenticationPolicyReference { + data: Specification.CallOpenAPIWithAuthentication, +): () => Specification.CallOpenAPIWithAuthentication { return () => { - const model = new Classes.AuthenticationPolicyReference(); + const model = new Classes.CallOpenAPIWithAuthentication(); Object.assign(model, data); - validate('AuthenticationPolicyReference', model); - return model as Specification.AuthenticationPolicyReference; + validate('CallOpenAPIWithAuthentication', model); + return model as Specification.CallOpenAPIWithAuthentication; }; } /** - * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyReference` - * @returns {Specification.AuthenticationPolicyReference} A builder for `Specification.AuthenticationPolicyReference` + * A factory to create a builder proxy for the type `Specification.CallOpenAPIWithAuthentication` + * @returns {Specification.CallOpenAPIWithAuthentication} A builder for `Specification.CallOpenAPIWithAuthentication` */ -export function authenticationPolicyReferenceBuilder(): Builder { - return builder(buildingFn); +export function callOpenAPIWithAuthenticationBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/catch-builder.ts b/src/lib/generated/builders/catch-builder.ts deleted file mode 100644 index d10e737e..00000000 --- a/src/lib/generated/builders/catch-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Catch} data The underlying object - * @returns {Specification.Catch} The validated underlying object - */ -function buildingFn(data: Specification.Catch): () => Specification.Catch { - return () => { - const model = new Classes.Catch(); - Object.assign(model, data); - - validate('Catch', model); - return model as Specification.Catch; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Catch` - * @returns {Specification.Catch} A builder for `Specification.Catch` - */ -export function catchBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/catch-errors-builder.ts b/src/lib/generated/builders/catch-errors-builder.ts deleted file mode 100644 index 246d12ae..00000000 --- a/src/lib/generated/builders/catch-errors-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CatchErrors} data The underlying object - * @returns {Specification.CatchErrors} The validated underlying object - */ -function buildingFn(data: Specification.CatchErrors): () => Specification.CatchErrors { - return () => { - const model = new Classes.CatchErrors(); - Object.assign(model, data); - - validate('CatchErrors', model); - return model as Specification.CatchErrors; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.CatchErrors` - * @returns {Specification.CatchErrors} A builder for `Specification.CatchErrors` - */ -export function catchErrorsBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/container-builder.ts b/src/lib/generated/builders/container-builder.ts deleted file mode 100644 index 1f7575b6..00000000 --- a/src/lib/generated/builders/container-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Container} data The underlying object - * @returns {Specification.Container} The validated underlying object - */ -function buildingFn(data: Specification.Container): () => Specification.Container { - return () => { - const model = new Classes.Container(); - Object.assign(model, data); - - validate('Container', model); - return model as Specification.Container; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Container` - * @returns {Specification.Container} A builder for `Specification.Container` - */ -export function containerBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/correlate-builder.ts b/src/lib/generated/builders/correlate-builder.ts deleted file mode 100644 index 45360406..00000000 --- a/src/lib/generated/builders/correlate-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Correlate} data The underlying object - * @returns {Specification.Correlate} The validated underlying object - */ -function buildingFn(data: Specification.Correlate): () => Specification.Correlate { - return () => { - const model = new Classes.Correlate(); - Object.assign(model, data); - - validate('Correlate', model); - return model as Specification.Correlate; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Correlate` - * @returns {Specification.Correlate} A builder for `Specification.Correlate` - */ -export function correlateBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/output-as-builder.ts b/src/lib/generated/builders/document-builder.ts similarity index 66% rename from src/lib/generated/builders/output-as-builder.ts rename to src/lib/generated/builders/document-builder.ts index f280ef59..bb71c858 100644 --- a/src/lib/generated/builders/output-as-builder.ts +++ b/src/lib/generated/builders/document-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.OutputAs} data The underlying object - * @returns {Specification.OutputAs} The validated underlying object + * @param {Specification.Document} data The underlying object + * @returns {Specification.Document} The validated underlying object */ -function buildingFn(data: Specification.OutputAs): () => Specification.OutputAs { +function buildingFn(data: Specification.Document): () => Specification.Document { return () => { - const model = new Classes.OutputAs(); + const model = new Classes.Document(); Object.assign(model, data); - validate('OutputAs', model); - return model as Specification.OutputAs; + validate('Document', model); + return model as Specification.Document; }; } /** - * A factory to create a builder proxy for the type `Specification.OutputAs` - * @returns {Specification.OutputAs} A builder for `Specification.OutputAs` + * A factory to create a builder proxy for the type `Specification.Document` + * @returns {Specification.Document} A builder for `Specification.Document` */ -export function outputAsBuilder(): Builder { - return builder(buildingFn); +export function documentBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/script-inline-builder.ts b/src/lib/generated/builders/document-tags-builder.ts similarity index 64% rename from src/lib/generated/builders/script-inline-builder.ts rename to src/lib/generated/builders/document-tags-builder.ts index 02dd8bbd..8c40edc0 100644 --- a/src/lib/generated/builders/script-inline-builder.ts +++ b/src/lib/generated/builders/document-tags-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ScriptInline} data The underlying object - * @returns {Specification.ScriptInline} The validated underlying object + * @param {Specification.DocumentTags} data The underlying object + * @returns {Specification.DocumentTags} The validated underlying object */ -function buildingFn(data: Specification.ScriptInline): () => Specification.ScriptInline { +function buildingFn(data: Specification.DocumentTags): () => Specification.DocumentTags { return () => { - const model = new Classes.ScriptInline(); + const model = new Classes.DocumentTags(); Object.assign(model, data); - validate('ScriptInline', model); - return model as Specification.ScriptInline; + validate('DocumentTags', model); + return model as Specification.DocumentTags; }; } /** - * A factory to create a builder proxy for the type `Specification.ScriptInline` - * @returns {Specification.ScriptInline} A builder for `Specification.ScriptInline` + * A factory to create a builder proxy for the type `Specification.DocumentTags` + * @returns {Specification.DocumentTags} A builder for `Specification.DocumentTags` */ -export function scriptInlineBuilder(): Builder { - return builder(buildingFn); +export function documentTagsBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/emit-builder.ts b/src/lib/generated/builders/emit-builder.ts deleted file mode 100644 index 9b6236fd..00000000 --- a/src/lib/generated/builders/emit-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Emit} data The underlying object - * @returns {Specification.Emit} The validated underlying object - */ -function buildingFn(data: Specification.Emit): () => Specification.Emit { - return () => { - const model = new Classes.Emit(); - Object.assign(model, data); - - validate('Emit', model); - return model as Specification.Emit; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Emit` - * @returns {Specification.Emit} A builder for `Specification.Emit` - */ -export function emitBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/emit-event-builder.ts b/src/lib/generated/builders/emit-event-builder.ts deleted file mode 100644 index 2ae80c71..00000000 --- a/src/lib/generated/builders/emit-event-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EmitEvent} data The underlying object - * @returns {Specification.EmitEvent} The validated underlying object - */ -function buildingFn(data: Specification.EmitEvent): () => Specification.EmitEvent { - return () => { - const model = new Classes.EmitEvent(); - Object.assign(model, data); - - validate('EmitEvent', model); - return model as Specification.EmitEvent; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.EmitEvent` - * @returns {Specification.EmitEvent} A builder for `Specification.EmitEvent` - */ -export function emitEventBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/run-container-builder.ts b/src/lib/generated/builders/emit-task-emit-builder.ts similarity index 64% rename from src/lib/generated/builders/run-container-builder.ts rename to src/lib/generated/builders/emit-task-emit-builder.ts index f7f8feed..b0bff1cb 100644 --- a/src/lib/generated/builders/run-container-builder.ts +++ b/src/lib/generated/builders/emit-task-emit-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunContainer} data The underlying object - * @returns {Specification.RunContainer} The validated underlying object + * @param {Specification.EmitTaskEmit} data The underlying object + * @returns {Specification.EmitTaskEmit} The validated underlying object */ -function buildingFn(data: Specification.RunContainer): () => Specification.RunContainer { +function buildingFn(data: Specification.EmitTaskEmit): () => Specification.EmitTaskEmit { return () => { - const model = new Classes.RunContainer(); + const model = new Classes.EmitTaskEmit(); Object.assign(model, data); - validate('RunContainer', model); - return model as Specification.RunContainer; + validate('EmitTaskEmit', model); + return model as Specification.EmitTaskEmit; }; } /** - * A factory to create a builder proxy for the type `Specification.RunContainer` - * @returns {Specification.RunContainer} A builder for `Specification.RunContainer` + * A factory to create a builder proxy for the type `Specification.EmitTaskEmit` + * @returns {Specification.EmitTaskEmit} A builder for `Specification.EmitTaskEmit` */ -export function runContainerBuilder(): Builder { - return builder(buildingFn); +export function emitTaskEmitBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/flow-directive-enum-builder.ts b/src/lib/generated/builders/emit-task-emit-event-builder.ts similarity index 62% rename from src/lib/generated/builders/flow-directive-enum-builder.ts rename to src/lib/generated/builders/emit-task-emit-event-builder.ts index cdec0a0a..4e7b41fe 100644 --- a/src/lib/generated/builders/flow-directive-enum-builder.ts +++ b/src/lib/generated/builders/emit-task-emit-event-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.FlowDirectiveEnum} data The underlying object - * @returns {Specification.FlowDirectiveEnum} The validated underlying object + * @param {Specification.EmitTaskEmitEvent} data The underlying object + * @returns {Specification.EmitTaskEmitEvent} The validated underlying object */ -function buildingFn(data: Specification.FlowDirectiveEnum): () => Specification.FlowDirectiveEnum { +function buildingFn(data: Specification.EmitTaskEmitEvent): () => Specification.EmitTaskEmitEvent { return () => { - const model = new Classes.FlowDirectiveEnum(); + const model = new Classes.EmitTaskEmitEvent(); Object.assign(model, data); - validate('FlowDirectiveEnum', model); - return model as Specification.FlowDirectiveEnum; + validate('EmitTaskEmitEvent', model); + return model as Specification.EmitTaskEmitEvent; }; } /** - * A factory to create a builder proxy for the type `Specification.FlowDirectiveEnum` - * @returns {Specification.FlowDirectiveEnum} A builder for `Specification.FlowDirectiveEnum` + * A factory to create a builder proxy for the type `Specification.EmitTaskEmitEvent` + * @returns {Specification.EmitTaskEmitEvent} A builder for `Specification.EmitTaskEmitEvent` */ -export function flowDirectiveEnumBuilder(): Builder { - return builder(buildingFn); +export function emitTaskEmitEventBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/extension-item-builder.ts b/src/lib/generated/builders/endpoint-authentication-builder.ts similarity index 61% rename from src/lib/generated/builders/extension-item-builder.ts rename to src/lib/generated/builders/endpoint-authentication-builder.ts index 1a4439b7..b8aa0bb1 100644 --- a/src/lib/generated/builders/extension-item-builder.ts +++ b/src/lib/generated/builders/endpoint-authentication-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ExtensionItem} data The underlying object - * @returns {Specification.ExtensionItem} The validated underlying object + * @param {Specification.EndpointAuthentication} data The underlying object + * @returns {Specification.EndpointAuthentication} The validated underlying object */ -function buildingFn(data: Specification.ExtensionItem): () => Specification.ExtensionItem { +function buildingFn(data: Specification.EndpointAuthentication): () => Specification.EndpointAuthentication { return () => { - const model = new Classes.ExtensionItem(); + const model = new Classes.EndpointAuthentication(); Object.assign(model, data); - validate('ExtensionItem', model); - return model as Specification.ExtensionItem; + validate('EndpointAuthentication', model); + return model as Specification.EndpointAuthentication; }; } /** - * A factory to create a builder proxy for the type `Specification.ExtensionItem` - * @returns {Specification.ExtensionItem} A builder for `Specification.ExtensionItem` + * A factory to create a builder proxy for the type `Specification.EndpointAuthentication` + * @returns {Specification.EndpointAuthentication} A builder for `Specification.EndpointAuthentication` */ -export function extensionItemBuilder(): Builder { - return builder(buildingFn); +export function endpointAuthenticationBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/container-environment-builder.ts b/src/lib/generated/builders/event-filter-correlate-builder.ts similarity index 61% rename from src/lib/generated/builders/container-environment-builder.ts rename to src/lib/generated/builders/event-filter-correlate-builder.ts index 06b0271b..e1319f8f 100644 --- a/src/lib/generated/builders/container-environment-builder.ts +++ b/src/lib/generated/builders/event-filter-correlate-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ContainerEnvironment} data The underlying object - * @returns {Specification.ContainerEnvironment} The validated underlying object + * @param {Specification.EventFilterCorrelate} data The underlying object + * @returns {Specification.EventFilterCorrelate} The validated underlying object */ -function buildingFn(data: Specification.ContainerEnvironment): () => Specification.ContainerEnvironment { +function buildingFn(data: Specification.EventFilterCorrelate): () => Specification.EventFilterCorrelate { return () => { - const model = new Classes.ContainerEnvironment(); + const model = new Classes.EventFilterCorrelate(); Object.assign(model, data); - validate('ContainerEnvironment', model); - return model as Specification.ContainerEnvironment; + validate('EventFilterCorrelate', model); + return model as Specification.EventFilterCorrelate; }; } /** - * A factory to create a builder proxy for the type `Specification.ContainerEnvironment` - * @returns {Specification.ContainerEnvironment} A builder for `Specification.ContainerEnvironment` + * A factory to create a builder proxy for the type `Specification.EventFilterCorrelate` + * @returns {Specification.EventFilterCorrelate} A builder for `Specification.EventFilterCorrelate` */ -export function containerEnvironmentBuilder(): Builder { - return builder(buildingFn); +export function eventFilterCorrelateBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/workflow-retries-builder.ts b/src/lib/generated/builders/event-filter-with-builder.ts similarity index 63% rename from src/lib/generated/builders/workflow-retries-builder.ts rename to src/lib/generated/builders/event-filter-with-builder.ts index 91df72b1..8ba50a2a 100644 --- a/src/lib/generated/builders/workflow-retries-builder.ts +++ b/src/lib/generated/builders/event-filter-with-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.WorkflowRetries} data The underlying object - * @returns {Specification.WorkflowRetries} The validated underlying object + * @param {Specification.EventFilterWith} data The underlying object + * @returns {Specification.EventFilterWith} The validated underlying object */ -function buildingFn(data: Specification.WorkflowRetries): () => Specification.WorkflowRetries { +function buildingFn(data: Specification.EventFilterWith): () => Specification.EventFilterWith { return () => { - const model = new Classes.WorkflowRetries(); + const model = new Classes.EventFilterWith(); Object.assign(model, data); - validate('WorkflowRetries', model); - return model as Specification.WorkflowRetries; + validate('EventFilterWith', model); + return model as Specification.EventFilterWith; }; } /** - * A factory to create a builder proxy for the type `Specification.WorkflowRetries` - * @returns {Specification.WorkflowRetries} A builder for `Specification.WorkflowRetries` + * A factory to create a builder proxy for the type `Specification.EventFilterWith` + * @returns {Specification.EventFilterWith} A builder for `Specification.EventFilterWith` */ -export function workflowRetriesBuilder(): Builder { - return builder(buildingFn); +export function eventFilterWithBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/explicit-bearer-authentication-policy-builder.ts b/src/lib/generated/builders/explicit-bearer-authentication-policy-builder.ts deleted file mode 100644 index c5b2daca..00000000 --- a/src/lib/generated/builders/explicit-bearer-authentication-policy-builder.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ExplicitBearerAuthenticationPolicy} data The underlying object - * @returns {Specification.ExplicitBearerAuthenticationPolicy} The validated underlying object - */ -function buildingFn( - data: Specification.ExplicitBearerAuthenticationPolicy, -): () => Specification.ExplicitBearerAuthenticationPolicy { - return () => { - const model = new Classes.ExplicitBearerAuthenticationPolicy(); - Object.assign(model, data); - - validate('ExplicitBearerAuthenticationPolicy', model); - return model as Specification.ExplicitBearerAuthenticationPolicy; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.ExplicitBearerAuthenticationPolicy` - * @returns {Specification.ExplicitBearerAuthenticationPolicy} A builder for `Specification.ExplicitBearerAuthenticationPolicy` - */ -export function explicitBearerAuthenticationPolicyBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/explicit-o-auth2-authentication-policy-builder.ts b/src/lib/generated/builders/explicit-o-auth2-authentication-policy-builder.ts deleted file mode 100644 index e5d32098..00000000 --- a/src/lib/generated/builders/explicit-o-auth2-authentication-policy-builder.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ExplicitOAuth2AuthenticationPolicy} data The underlying object - * @returns {Specification.ExplicitOAuth2AuthenticationPolicy} The validated underlying object - */ -function buildingFn( - data: Specification.ExplicitOAuth2AuthenticationPolicy, -): () => Specification.ExplicitOAuth2AuthenticationPolicy { - return () => { - const model = new Classes.ExplicitOAuth2AuthenticationPolicy(); - Object.assign(model, data); - - validate('ExplicitOAuth2AuthenticationPolicy', model); - return model as Specification.ExplicitOAuth2AuthenticationPolicy; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.ExplicitOAuth2AuthenticationPolicy` - * @returns {Specification.ExplicitOAuth2AuthenticationPolicy} A builder for `Specification.ExplicitOAuth2AuthenticationPolicy` - */ -export function explicitOAuth2AuthenticationPolicyBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/exponential-back-off-builder.ts b/src/lib/generated/builders/exponential-back-off-builder.ts deleted file mode 100644 index 0a636734..00000000 --- a/src/lib/generated/builders/exponential-back-off-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ExponentialBackOff} data The underlying object - * @returns {Specification.ExponentialBackOff} The validated underlying object - */ -function buildingFn(data: Specification.ExponentialBackOff): () => Specification.ExponentialBackOff { - return () => { - const model = new Classes.ExponentialBackOff(); - Object.assign(model, data); - - validate('ExponentialBackOff', model); - return model as Specification.ExponentialBackOff; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.ExponentialBackOff` - * @returns {Specification.ExponentialBackOff} A builder for `Specification.ExponentialBackOff` - */ -export function exponentialBackOffBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/secret-based-authentication-policy-builder.ts b/src/lib/generated/builders/external-resource-authentication-builder.ts similarity index 56% rename from src/lib/generated/builders/secret-based-authentication-policy-builder.ts rename to src/lib/generated/builders/external-resource-authentication-builder.ts index 8dedcd43..03435992 100644 --- a/src/lib/generated/builders/secret-based-authentication-policy-builder.ts +++ b/src/lib/generated/builders/external-resource-authentication-builder.ts @@ -21,25 +21,25 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.SecretBasedAuthenticationPolicy} data The underlying object - * @returns {Specification.SecretBasedAuthenticationPolicy} The validated underlying object + * @param {Specification.ExternalResourceAuthentication} data The underlying object + * @returns {Specification.ExternalResourceAuthentication} The validated underlying object */ function buildingFn( - data: Specification.SecretBasedAuthenticationPolicy, -): () => Specification.SecretBasedAuthenticationPolicy { + data: Specification.ExternalResourceAuthentication, +): () => Specification.ExternalResourceAuthentication { return () => { - const model = new Classes.SecretBasedAuthenticationPolicy(); + const model = new Classes.ExternalResourceAuthentication(); Object.assign(model, data); - validate('SecretBasedAuthenticationPolicy', model); - return model as Specification.SecretBasedAuthenticationPolicy; + validate('ExternalResourceAuthentication', model); + return model as Specification.ExternalResourceAuthentication; }; } /** - * A factory to create a builder proxy for the type `Specification.SecretBasedAuthenticationPolicy` - * @returns {Specification.SecretBasedAuthenticationPolicy} A builder for `Specification.SecretBasedAuthenticationPolicy` + * A factory to create a builder proxy for the type `Specification.ExternalResourceAuthentication` + * @returns {Specification.ExternalResourceAuthentication} A builder for `Specification.ExternalResourceAuthentication` */ -export function secretBasedAuthenticationPolicyBuilder(): Builder { - return builder(buildingFn); +export function externalResourceAuthenticationBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/for-builder.ts b/src/lib/generated/builders/for-builder.ts deleted file mode 100644 index 1751aff5..00000000 --- a/src/lib/generated/builders/for-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.For} data The underlying object - * @returns {Specification.For} The validated underlying object - */ -function buildingFn(data: Specification.For): () => Specification.For { - return () => { - const model = new Classes.For(); - Object.assign(model, data); - - validate('For', model); - return model as Specification.For; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.For` - * @returns {Specification.For} A builder for `Specification.For` - */ -export function forBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/run-wokflow-builder.ts b/src/lib/generated/builders/for-task-for-builder.ts similarity index 65% rename from src/lib/generated/builders/run-wokflow-builder.ts rename to src/lib/generated/builders/for-task-for-builder.ts index 75355bdd..20279774 100644 --- a/src/lib/generated/builders/run-wokflow-builder.ts +++ b/src/lib/generated/builders/for-task-for-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunWokflow} data The underlying object - * @returns {Specification.RunWokflow} The validated underlying object + * @param {Specification.ForTaskFor} data The underlying object + * @returns {Specification.ForTaskFor} The validated underlying object */ -function buildingFn(data: Specification.RunWokflow): () => Specification.RunWokflow { +function buildingFn(data: Specification.ForTaskFor): () => Specification.ForTaskFor { return () => { - const model = new Classes.RunWokflow(); + const model = new Classes.ForTaskFor(); Object.assign(model, data); - validate('RunWokflow', model); - return model as Specification.RunWokflow; + validate('ForTaskFor', model); + return model as Specification.ForTaskFor; }; } /** - * A factory to create a builder proxy for the type `Specification.RunWokflow` - * @returns {Specification.RunWokflow} A builder for `Specification.RunWokflow` + * A factory to create a builder proxy for the type `Specification.ForTaskFor` + * @returns {Specification.ForTaskFor} A builder for `Specification.ForTaskFor` */ -export function runWokflowBuilder(): Builder { - return builder(buildingFn); +export function forTaskForBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/fork-builder.ts b/src/lib/generated/builders/fork-builder.ts deleted file mode 100644 index cbbc83bb..00000000 --- a/src/lib/generated/builders/fork-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Fork} data The underlying object - * @returns {Specification.Fork} The validated underlying object - */ -function buildingFn(data: Specification.Fork): () => Specification.Fork { - return () => { - const model = new Classes.Fork(); - Object.assign(model, data); - - validate('Fork', model); - return model as Specification.Fork; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Fork` - * @returns {Specification.Fork} A builder for `Specification.Fork` - */ -export function forkBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/schema-inline-builder.ts b/src/lib/generated/builders/fork-task-fork-builder.ts similarity index 64% rename from src/lib/generated/builders/schema-inline-builder.ts rename to src/lib/generated/builders/fork-task-fork-builder.ts index 8c3b0275..5c3c93de 100644 --- a/src/lib/generated/builders/schema-inline-builder.ts +++ b/src/lib/generated/builders/fork-task-fork-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.SchemaInline} data The underlying object - * @returns {Specification.SchemaInline} The validated underlying object + * @param {Specification.ForkTaskFork} data The underlying object + * @returns {Specification.ForkTaskFork} The validated underlying object */ -function buildingFn(data: Specification.SchemaInline): () => Specification.SchemaInline { +function buildingFn(data: Specification.ForkTaskFork): () => Specification.ForkTaskFork { return () => { - const model = new Classes.SchemaInline(); + const model = new Classes.ForkTaskFork(); Object.assign(model, data); - validate('SchemaInline', model); - return model as Specification.SchemaInline; + validate('ForkTaskFork', model); + return model as Specification.ForkTaskFork; }; } /** - * A factory to create a builder proxy for the type `Specification.SchemaInline` - * @returns {Specification.SchemaInline} A builder for `Specification.SchemaInline` + * A factory to create a builder proxy for the type `Specification.ForkTaskFork` + * @returns {Specification.ForkTaskFork} A builder for `Specification.ForkTaskFork` */ -export function schemaInlineBuilder(): Builder { - return builder(buildingFn); +export function forkTaskForkBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/index.ts b/src/lib/generated/builders/index.ts index e51b521f..3ee3a75b 100644 --- a/src/lib/generated/builders/index.ts +++ b/src/lib/generated/builders/index.ts @@ -16,119 +16,86 @@ export * from './schema-builder'; export * from './external-resource-builder'; -export * from './referenceable-authentication-policy-builder'; -export * from './referenced-authentication-policy-builder'; -export * from './input-from-builder'; +export * from './external-resource-authentication-builder'; export * from './authentication-policy-builder'; export * from './task-builder'; export * from './call-task-builder'; -export * from './call-http-with-endpoint-builder'; -export * from './output-as-builder'; -export * from './export-as-builder'; +export * from './call-async-api-builder'; export * from './flow-directive-builder'; -export * from './flow-directive-enum-builder'; +export * from './call-async-api-with-authentication-builder'; +export * from './call-grpc-builder'; +export * from './call-grpc-with-service-authentication-builder'; +export * from './call-http-builder'; +export * from './call-http-with-endpoint-builder'; +export * from './endpoint-authentication-builder'; +export * from './call-open-api-builder'; +export * from './call-open-api-with-authentication-builder'; +export * from './call-function-builder'; +export * from './do-task-builder'; +export * from './fork-task-builder'; +export * from './emit-task-builder'; +export * from './for-task-builder'; +export * from './listen-task-builder'; export * from './event-consumption-strategy-builder'; export * from './event-consumption-strategy-all-builder'; export * from './event-consumption-strategy-any-builder'; -export * from './run-builder'; -export * from './script-builder'; -export * from './switch-builder'; +export * from './raise-task-builder'; +export * from './run-task-builder'; +export * from './run-task-run-builder'; +export * from './run-task-run-script-builder'; +export * from './set-task-builder'; +export * from './switch-task-builder'; +export * from './switch-task-switch-builder'; +export * from './try-task-builder'; export * from './retry-policy-backoff-builder'; +export * from './wait-task-builder'; export * from './task-list-builder'; -export * from './workflow-extensions-builder'; -export * from './workflow-secrets-builder'; +export * from './use-extensions-builder'; export * from './workflow-builder'; -export * from './workflow-document-builder'; -export * from './workflow-tags-builder'; +export * from './document-builder'; +export * from './document-tags-builder'; export * from './input-builder'; -export * from './schema-inline-builder'; -export * from './schema-external-builder'; -export * from './external-resource-u-r-i-builder'; -export * from './authentication-policy-reference-builder'; -export * from './basic-authentication-policy-builder'; -export * from './explicit-basic-authentication-policy-builder'; -export * from './secret-based-authentication-policy-builder'; -export * from './bearer-authentication-policy-builder'; -export * from './explicit-bearer-authentication-policy-builder'; -export * from './o-auth2-authentication-policy-builder'; -export * from './explicit-o-auth2-authentication-policy-builder'; +export * from './authentication-policy-basic-builder'; +export * from './authentication-policy-bearer-builder'; +export * from './authentication-policy-oauth2-builder'; +export * from './authentication-policy-oauth2-client-builder'; export * from './oauth2-token-builder'; -export * from './workflow-components-builder'; -export * from './workflow-authentications-builder'; -export * from './workflow-errors-builder'; +export * from './use-builder'; export * from './error-builder'; -export * from './extension-item-builder'; export * from './extension-builder'; -export * from './task-item-builder'; -export * from './call-async-api-builder'; +export * from './task-base-builder'; +export * from './output-builder'; +export * from './export-builder'; +export * from './timeout-builder'; +export * from './duration-builder'; export * from './call-async-api-with-builder'; -export * from './call-grpc-builder'; export * from './call-grpc-with-builder'; export * from './call-grpc-with-service-builder'; export * from './call-grpc-with-arguments-builder'; -export * from './call-http-builder'; export * from './call-http-with-builder'; export * from './endpoint-builder'; -export * from './call-http-with-headers-builder'; -export * from './call-http-with-body-builder'; -export * from './call-open-api-builder'; export * from './call-open-api-with-builder'; export * from './call-open-api-with-parameters-builder'; -export * from './call-function-builder'; export * from './call-function-with-builder'; -export * from './do-task-builder'; -export * from './fork-task-builder'; -export * from './fork-builder'; -export * from './task-base-builder'; -export * from './output-builder'; -export * from './export-builder'; -export * from './timeout-builder'; -export * from './duration-builder'; -export * from './emit-task-builder'; -export * from './emit-builder'; -export * from './emit-event-builder'; -export * from './for-task-builder'; -export * from './for-builder'; -export * from './listen-task-builder'; -export * from './listen-builder'; -export * from './all-event-consumption-strategy-builder'; +export * from './fork-task-fork-builder'; +export * from './emit-task-emit-builder'; +export * from './emit-task-emit-event-builder'; +export * from './for-task-for-builder'; +export * from './listen-task-listen-builder'; export * from './event-filter-builder'; -export * from './with-event-builder'; -export * from './correlate-builder'; -export * from './any-event-consumption-strategy-builder'; -export * from './one-event-consumption-strategy-builder'; -export * from './raise-task-builder'; -export * from './raise-builder'; -export * from './run-task-builder'; -export * from './run-container-builder'; -export * from './container-builder'; -export * from './container-environment-builder'; -export * from './run-script-builder'; -export * from './script-inline-builder'; -export * from './script-external-builder'; -export * from './run-shell-builder'; -export * from './shell-builder'; -export * from './shell-arguments-builder'; -export * from './shell-environment-builder'; -export * from './run-wokflow-builder'; -export * from './run-workflow-descriptor-builder'; -export * from './workflow-input-builder'; -export * from './set-task-builder'; -export * from './set-builder'; -export * from './switch-task-builder'; -export * from './switch-item-builder'; -export * from './switch-case-builder'; -export * from './try-task-builder'; -export * from './catch-builder'; -export * from './catch-errors-builder'; +export * from './event-filter-with-builder'; +export * from './event-filter-correlate-builder'; +export * from './raise-task-raise-builder'; +export * from './run-task-run-container-builder'; +export * from './run-task-run-shell-builder'; +export * from './run-task-run-shell-arguments-builder'; +export * from './run-task-run-shell-environment-builder'; +export * from './run-task-run-workflow-builder'; +export * from './run-task-run-workflow-input-builder'; +export * from './set-task-set-builder'; +export * from './try-task-catch-builder'; export * from './retry-policy-builder'; -export * from './constant-backoff-builder'; -export * from './exponential-back-off-builder'; -export * from './linear-backoff-builder'; export * from './retry-policy-limit-builder'; -export * from './retry-policy-attempt-builder'; +export * from './retry-policy-limit-attempt-builder'; export * from './retry-policy-jitter-builder'; -export * from './wait-task-builder'; -export * from './workflow-functions-builder'; -export * from './workflow-retries-builder'; -export * from './workflow-schedule-builder'; +export * from './schedule-builder'; diff --git a/src/lib/generated/builders/input-from-builder.ts b/src/lib/generated/builders/input-from-builder.ts deleted file mode 100644 index e67cf76e..00000000 --- a/src/lib/generated/builders/input-from-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.InputFrom} data The underlying object - * @returns {Specification.InputFrom} The validated underlying object - */ -function buildingFn(data: Specification.InputFrom): () => Specification.InputFrom { - return () => { - const model = new Classes.InputFrom(); - Object.assign(model, data); - - validate('InputFrom', model); - return model as Specification.InputFrom; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.InputFrom` - * @returns {Specification.InputFrom} A builder for `Specification.InputFrom` - */ -export function inputFromBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/linear-backoff-builder.ts b/src/lib/generated/builders/linear-backoff-builder.ts deleted file mode 100644 index ae166406..00000000 --- a/src/lib/generated/builders/linear-backoff-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.LinearBackoff} data The underlying object - * @returns {Specification.LinearBackoff} The validated underlying object - */ -function buildingFn(data: Specification.LinearBackoff): () => Specification.LinearBackoff { - return () => { - const model = new Classes.LinearBackoff(); - Object.assign(model, data); - - validate('LinearBackoff', model); - return model as Specification.LinearBackoff; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.LinearBackoff` - * @returns {Specification.LinearBackoff} A builder for `Specification.LinearBackoff` - */ -export function linearBackoffBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/listen-builder.ts b/src/lib/generated/builders/listen-builder.ts deleted file mode 100644 index 77e40f36..00000000 --- a/src/lib/generated/builders/listen-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Listen} data The underlying object - * @returns {Specification.Listen} The validated underlying object - */ -function buildingFn(data: Specification.Listen): () => Specification.Listen { - return () => { - const model = new Classes.Listen(); - Object.assign(model, data); - - validate('Listen', model); - return model as Specification.Listen; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Listen` - * @returns {Specification.Listen} A builder for `Specification.Listen` - */ -export function listenBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/shell-environment-builder.ts b/src/lib/generated/builders/listen-task-listen-builder.ts similarity index 63% rename from src/lib/generated/builders/shell-environment-builder.ts rename to src/lib/generated/builders/listen-task-listen-builder.ts index 95f9f609..6fb26d4e 100644 --- a/src/lib/generated/builders/shell-environment-builder.ts +++ b/src/lib/generated/builders/listen-task-listen-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ShellEnvironment} data The underlying object - * @returns {Specification.ShellEnvironment} The validated underlying object + * @param {Specification.ListenTaskListen} data The underlying object + * @returns {Specification.ListenTaskListen} The validated underlying object */ -function buildingFn(data: Specification.ShellEnvironment): () => Specification.ShellEnvironment { +function buildingFn(data: Specification.ListenTaskListen): () => Specification.ListenTaskListen { return () => { - const model = new Classes.ShellEnvironment(); + const model = new Classes.ListenTaskListen(); Object.assign(model, data); - validate('ShellEnvironment', model); - return model as Specification.ShellEnvironment; + validate('ListenTaskListen', model); + return model as Specification.ListenTaskListen; }; } /** - * A factory to create a builder proxy for the type `Specification.ShellEnvironment` - * @returns {Specification.ShellEnvironment} A builder for `Specification.ShellEnvironment` + * A factory to create a builder proxy for the type `Specification.ListenTaskListen` + * @returns {Specification.ListenTaskListen} A builder for `Specification.ListenTaskListen` */ -export function shellEnvironmentBuilder(): Builder { - return builder(buildingFn); +export function listenTaskListenBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/one-event-consumption-strategy-builder.ts b/src/lib/generated/builders/one-event-consumption-strategy-builder.ts deleted file mode 100644 index a1436931..00000000 --- a/src/lib/generated/builders/one-event-consumption-strategy-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.OneEventConsumptionStrategy} data The underlying object - * @returns {Specification.OneEventConsumptionStrategy} The validated underlying object - */ -function buildingFn(data: Specification.OneEventConsumptionStrategy): () => Specification.OneEventConsumptionStrategy { - return () => { - const model = new Classes.OneEventConsumptionStrategy(); - Object.assign(model, data); - - validate('OneEventConsumptionStrategy', model); - return model as Specification.OneEventConsumptionStrategy; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.OneEventConsumptionStrategy` - * @returns {Specification.OneEventConsumptionStrategy} A builder for `Specification.OneEventConsumptionStrategy` - */ -export function oneEventConsumptionStrategyBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/raise-builder.ts b/src/lib/generated/builders/raise-builder.ts deleted file mode 100644 index 27583ca0..00000000 --- a/src/lib/generated/builders/raise-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Raise} data The underlying object - * @returns {Specification.Raise} The validated underlying object - */ -function buildingFn(data: Specification.Raise): () => Specification.Raise { - return () => { - const model = new Classes.Raise(); - Object.assign(model, data); - - validate('Raise', model); - return model as Specification.Raise; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Raise` - * @returns {Specification.Raise} A builder for `Specification.Raise` - */ -export function raiseBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/schema-external-builder.ts b/src/lib/generated/builders/raise-task-raise-builder.ts similarity index 63% rename from src/lib/generated/builders/schema-external-builder.ts rename to src/lib/generated/builders/raise-task-raise-builder.ts index 6492938a..70f0276b 100644 --- a/src/lib/generated/builders/schema-external-builder.ts +++ b/src/lib/generated/builders/raise-task-raise-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.SchemaExternal} data The underlying object - * @returns {Specification.SchemaExternal} The validated underlying object + * @param {Specification.RaiseTaskRaise} data The underlying object + * @returns {Specification.RaiseTaskRaise} The validated underlying object */ -function buildingFn(data: Specification.SchemaExternal): () => Specification.SchemaExternal { +function buildingFn(data: Specification.RaiseTaskRaise): () => Specification.RaiseTaskRaise { return () => { - const model = new Classes.SchemaExternal(); + const model = new Classes.RaiseTaskRaise(); Object.assign(model, data); - validate('SchemaExternal', model); - return model as Specification.SchemaExternal; + validate('RaiseTaskRaise', model); + return model as Specification.RaiseTaskRaise; }; } /** - * A factory to create a builder proxy for the type `Specification.SchemaExternal` - * @returns {Specification.SchemaExternal} A builder for `Specification.SchemaExternal` + * A factory to create a builder proxy for the type `Specification.RaiseTaskRaise` + * @returns {Specification.RaiseTaskRaise} A builder for `Specification.RaiseTaskRaise` */ -export function schemaExternalBuilder(): Builder { - return builder(buildingFn); +export function raiseTaskRaiseBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/referenceable-authentication-policy-builder.ts b/src/lib/generated/builders/referenceable-authentication-policy-builder.ts deleted file mode 100644 index f550bb88..00000000 --- a/src/lib/generated/builders/referenceable-authentication-policy-builder.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ReferenceableAuthenticationPolicy} data The underlying object - * @returns {Specification.ReferenceableAuthenticationPolicy} The validated underlying object - */ -function buildingFn( - data: Specification.ReferenceableAuthenticationPolicy, -): () => Specification.ReferenceableAuthenticationPolicy { - return () => { - const model = new Classes.ReferenceableAuthenticationPolicy(); - Object.assign(model, data); - - validate('ReferenceableAuthenticationPolicy', model); - return model as Specification.ReferenceableAuthenticationPolicy; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.ReferenceableAuthenticationPolicy` - * @returns {Specification.ReferenceableAuthenticationPolicy} A builder for `Specification.ReferenceableAuthenticationPolicy` - */ -export function referenceableAuthenticationPolicyBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/retry-policy-attempt-builder.ts b/src/lib/generated/builders/retry-policy-attempt-builder.ts deleted file mode 100644 index 67cc9f76..00000000 --- a/src/lib/generated/builders/retry-policy-attempt-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RetryPolicyAttempt} data The underlying object - * @returns {Specification.RetryPolicyAttempt} The validated underlying object - */ -function buildingFn(data: Specification.RetryPolicyAttempt): () => Specification.RetryPolicyAttempt { - return () => { - const model = new Classes.RetryPolicyAttempt(); - Object.assign(model, data); - - validate('RetryPolicyAttempt', model); - return model as Specification.RetryPolicyAttempt; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.RetryPolicyAttempt` - * @returns {Specification.RetryPolicyAttempt} A builder for `Specification.RetryPolicyAttempt` - */ -export function retryPolicyAttemptBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/workflow-authentications-builder.ts b/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts similarity index 60% rename from src/lib/generated/builders/workflow-authentications-builder.ts rename to src/lib/generated/builders/retry-policy-limit-attempt-builder.ts index 26567709..c83c68bc 100644 --- a/src/lib/generated/builders/workflow-authentications-builder.ts +++ b/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.WorkflowAuthentications} data The underlying object - * @returns {Specification.WorkflowAuthentications} The validated underlying object + * @param {Specification.RetryPolicyLimitAttempt} data The underlying object + * @returns {Specification.RetryPolicyLimitAttempt} The validated underlying object */ -function buildingFn(data: Specification.WorkflowAuthentications): () => Specification.WorkflowAuthentications { +function buildingFn(data: Specification.RetryPolicyLimitAttempt): () => Specification.RetryPolicyLimitAttempt { return () => { - const model = new Classes.WorkflowAuthentications(); + const model = new Classes.RetryPolicyLimitAttempt(); Object.assign(model, data); - validate('WorkflowAuthentications', model); - return model as Specification.WorkflowAuthentications; + validate('RetryPolicyLimitAttempt', model); + return model as Specification.RetryPolicyLimitAttempt; }; } /** - * A factory to create a builder proxy for the type `Specification.WorkflowAuthentications` - * @returns {Specification.WorkflowAuthentications} A builder for `Specification.WorkflowAuthentications` + * A factory to create a builder proxy for the type `Specification.RetryPolicyLimitAttempt` + * @returns {Specification.RetryPolicyLimitAttempt} A builder for `Specification.RetryPolicyLimitAttempt` */ -export function workflowAuthenticationsBuilder(): Builder { - return builder(buildingFn); +export function retryPolicyLimitAttemptBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/run-script-builder.ts b/src/lib/generated/builders/run-script-builder.ts deleted file mode 100644 index 09d36ebc..00000000 --- a/src/lib/generated/builders/run-script-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunScript} data The underlying object - * @returns {Specification.RunScript} The validated underlying object - */ -function buildingFn(data: Specification.RunScript): () => Specification.RunScript { - return () => { - const model = new Classes.RunScript(); - Object.assign(model, data); - - validate('RunScript', model); - return model as Specification.RunScript; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.RunScript` - * @returns {Specification.RunScript} A builder for `Specification.RunScript` - */ -export function runScriptBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/run-shell-builder.ts b/src/lib/generated/builders/run-shell-builder.ts deleted file mode 100644 index 3abb5be5..00000000 --- a/src/lib/generated/builders/run-shell-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunShell} data The underlying object - * @returns {Specification.RunShell} The validated underlying object - */ -function buildingFn(data: Specification.RunShell): () => Specification.RunShell { - return () => { - const model = new Classes.RunShell(); - Object.assign(model, data); - - validate('RunShell', model); - return model as Specification.RunShell; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.RunShell` - * @returns {Specification.RunShell} A builder for `Specification.RunShell` - */ -export function runShellBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/switch-case-builder.ts b/src/lib/generated/builders/run-task-run-builder.ts similarity index 65% rename from src/lib/generated/builders/switch-case-builder.ts rename to src/lib/generated/builders/run-task-run-builder.ts index c9d6db4c..5d4ddfed 100644 --- a/src/lib/generated/builders/switch-case-builder.ts +++ b/src/lib/generated/builders/run-task-run-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.SwitchCase} data The underlying object - * @returns {Specification.SwitchCase} The validated underlying object + * @param {Specification.RunTaskRun} data The underlying object + * @returns {Specification.RunTaskRun} The validated underlying object */ -function buildingFn(data: Specification.SwitchCase): () => Specification.SwitchCase { +function buildingFn(data: Specification.RunTaskRun): () => Specification.RunTaskRun { return () => { - const model = new Classes.SwitchCase(); + const model = new Classes.RunTaskRun(); Object.assign(model, data); - validate('SwitchCase', model); - return model as Specification.SwitchCase; + validate('RunTaskRun', model); + return model as Specification.RunTaskRun; }; } /** - * A factory to create a builder proxy for the type `Specification.SwitchCase` - * @returns {Specification.SwitchCase} A builder for `Specification.SwitchCase` + * A factory to create a builder proxy for the type `Specification.RunTaskRun` + * @returns {Specification.RunTaskRun} A builder for `Specification.RunTaskRun` */ -export function switchCaseBuilder(): Builder { - return builder(buildingFn); +export function runTaskRunBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/external-resource-u-r-i-builder.ts b/src/lib/generated/builders/run-task-run-container-builder.ts similarity index 61% rename from src/lib/generated/builders/external-resource-u-r-i-builder.ts rename to src/lib/generated/builders/run-task-run-container-builder.ts index 67e9652a..ebc42cae 100644 --- a/src/lib/generated/builders/external-resource-u-r-i-builder.ts +++ b/src/lib/generated/builders/run-task-run-container-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ExternalResourceURI} data The underlying object - * @returns {Specification.ExternalResourceURI} The validated underlying object + * @param {Specification.RunTaskRunContainer} data The underlying object + * @returns {Specification.RunTaskRunContainer} The validated underlying object */ -function buildingFn(data: Specification.ExternalResourceURI): () => Specification.ExternalResourceURI { +function buildingFn(data: Specification.RunTaskRunContainer): () => Specification.RunTaskRunContainer { return () => { - const model = new Classes.ExternalResourceURI(); + const model = new Classes.RunTaskRunContainer(); Object.assign(model, data); - validate('ExternalResourceURI', model); - return model as Specification.ExternalResourceURI; + validate('RunTaskRunContainer', model); + return model as Specification.RunTaskRunContainer; }; } /** - * A factory to create a builder proxy for the type `Specification.ExternalResourceURI` - * @returns {Specification.ExternalResourceURI} A builder for `Specification.ExternalResourceURI` + * A factory to create a builder proxy for the type `Specification.RunTaskRunContainer` + * @returns {Specification.RunTaskRunContainer} A builder for `Specification.RunTaskRunContainer` */ -export function externalResourceURIBuilder(): Builder { - return builder(buildingFn); +export function runTaskRunContainerBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/call-http-with-body-builder.ts b/src/lib/generated/builders/run-task-run-script-builder.ts similarity index 63% rename from src/lib/generated/builders/call-http-with-body-builder.ts rename to src/lib/generated/builders/run-task-run-script-builder.ts index 5f048e9d..5532f7a3 100644 --- a/src/lib/generated/builders/call-http-with-body-builder.ts +++ b/src/lib/generated/builders/run-task-run-script-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallHTTPWithBody} data The underlying object - * @returns {Specification.CallHTTPWithBody} The validated underlying object + * @param {Specification.RunTaskRunScript} data The underlying object + * @returns {Specification.RunTaskRunScript} The validated underlying object */ -function buildingFn(data: Specification.CallHTTPWithBody): () => Specification.CallHTTPWithBody { +function buildingFn(data: Specification.RunTaskRunScript): () => Specification.RunTaskRunScript { return () => { - const model = new Classes.CallHTTPWithBody(); + const model = new Classes.RunTaskRunScript(); Object.assign(model, data); - validate('CallHTTPWithBody', model); - return model as Specification.CallHTTPWithBody; + validate('RunTaskRunScript', model); + return model as Specification.RunTaskRunScript; }; } /** - * A factory to create a builder proxy for the type `Specification.CallHTTPWithBody` - * @returns {Specification.CallHTTPWithBody} A builder for `Specification.CallHTTPWithBody` + * A factory to create a builder proxy for the type `Specification.RunTaskRunScript` + * @returns {Specification.RunTaskRunScript} A builder for `Specification.RunTaskRunScript` */ -export function callHTTPWithBodyBuilder(): Builder { - return builder(buildingFn); +export function runTaskRunScriptBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/call-http-with-headers-builder.ts b/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts similarity index 58% rename from src/lib/generated/builders/call-http-with-headers-builder.ts rename to src/lib/generated/builders/run-task-run-shell-arguments-builder.ts index 492590a8..f364fea7 100644 --- a/src/lib/generated/builders/call-http-with-headers-builder.ts +++ b/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallHTTPWithHeaders} data The underlying object - * @returns {Specification.CallHTTPWithHeaders} The validated underlying object + * @param {Specification.RunTaskRunShellArguments} data The underlying object + * @returns {Specification.RunTaskRunShellArguments} The validated underlying object */ -function buildingFn(data: Specification.CallHTTPWithHeaders): () => Specification.CallHTTPWithHeaders { +function buildingFn(data: Specification.RunTaskRunShellArguments): () => Specification.RunTaskRunShellArguments { return () => { - const model = new Classes.CallHTTPWithHeaders(); + const model = new Classes.RunTaskRunShellArguments(); Object.assign(model, data); - validate('CallHTTPWithHeaders', model); - return model as Specification.CallHTTPWithHeaders; + validate('RunTaskRunShellArguments', model); + return model as Specification.RunTaskRunShellArguments; }; } /** - * A factory to create a builder proxy for the type `Specification.CallHTTPWithHeaders` - * @returns {Specification.CallHTTPWithHeaders} A builder for `Specification.CallHTTPWithHeaders` + * A factory to create a builder proxy for the type `Specification.RunTaskRunShellArguments` + * @returns {Specification.RunTaskRunShellArguments} A builder for `Specification.RunTaskRunShellArguments` */ -export function callHTTPWithHeadersBuilder(): Builder { - return builder(buildingFn); +export function runTaskRunShellArgumentsBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/constant-backoff-builder.ts b/src/lib/generated/builders/run-task-run-shell-builder.ts similarity index 63% rename from src/lib/generated/builders/constant-backoff-builder.ts rename to src/lib/generated/builders/run-task-run-shell-builder.ts index 6175d876..858fc37e 100644 --- a/src/lib/generated/builders/constant-backoff-builder.ts +++ b/src/lib/generated/builders/run-task-run-shell-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ConstantBackoff} data The underlying object - * @returns {Specification.ConstantBackoff} The validated underlying object + * @param {Specification.RunTaskRunShell} data The underlying object + * @returns {Specification.RunTaskRunShell} The validated underlying object */ -function buildingFn(data: Specification.ConstantBackoff): () => Specification.ConstantBackoff { +function buildingFn(data: Specification.RunTaskRunShell): () => Specification.RunTaskRunShell { return () => { - const model = new Classes.ConstantBackoff(); + const model = new Classes.RunTaskRunShell(); Object.assign(model, data); - validate('ConstantBackoff', model); - return model as Specification.ConstantBackoff; + validate('RunTaskRunShell', model); + return model as Specification.RunTaskRunShell; }; } /** - * A factory to create a builder proxy for the type `Specification.ConstantBackoff` - * @returns {Specification.ConstantBackoff} A builder for `Specification.ConstantBackoff` + * A factory to create a builder proxy for the type `Specification.RunTaskRunShell` + * @returns {Specification.RunTaskRunShell} A builder for `Specification.RunTaskRunShell` */ -export function constantBackoffBuilder(): Builder { - return builder(buildingFn); +export function runTaskRunShellBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/bearer-authentication-policy-builder.ts b/src/lib/generated/builders/run-task-run-shell-environment-builder.ts similarity index 60% rename from src/lib/generated/builders/bearer-authentication-policy-builder.ts rename to src/lib/generated/builders/run-task-run-shell-environment-builder.ts index 13c0030c..f5bf4fa2 100644 --- a/src/lib/generated/builders/bearer-authentication-policy-builder.ts +++ b/src/lib/generated/builders/run-task-run-shell-environment-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.BearerAuthenticationPolicy} data The underlying object - * @returns {Specification.BearerAuthenticationPolicy} The validated underlying object + * @param {Specification.RunTaskRunShellEnvironment} data The underlying object + * @returns {Specification.RunTaskRunShellEnvironment} The validated underlying object */ -function buildingFn(data: Specification.BearerAuthenticationPolicy): () => Specification.BearerAuthenticationPolicy { +function buildingFn(data: Specification.RunTaskRunShellEnvironment): () => Specification.RunTaskRunShellEnvironment { return () => { - const model = new Classes.BearerAuthenticationPolicy(); + const model = new Classes.RunTaskRunShellEnvironment(); Object.assign(model, data); - validate('BearerAuthenticationPolicy', model); - return model as Specification.BearerAuthenticationPolicy; + validate('RunTaskRunShellEnvironment', model); + return model as Specification.RunTaskRunShellEnvironment; }; } /** - * A factory to create a builder proxy for the type `Specification.BearerAuthenticationPolicy` - * @returns {Specification.BearerAuthenticationPolicy} A builder for `Specification.BearerAuthenticationPolicy` + * A factory to create a builder proxy for the type `Specification.RunTaskRunShellEnvironment` + * @returns {Specification.RunTaskRunShellEnvironment} A builder for `Specification.RunTaskRunShellEnvironment` */ -export function bearerAuthenticationPolicyBuilder(): Builder { - return builder(buildingFn); +export function runTaskRunShellEnvironmentBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/workflow-extensions-builder.ts b/src/lib/generated/builders/run-task-run-workflow-builder.ts similarity index 62% rename from src/lib/generated/builders/workflow-extensions-builder.ts rename to src/lib/generated/builders/run-task-run-workflow-builder.ts index f576a9e5..05fd74c2 100644 --- a/src/lib/generated/builders/workflow-extensions-builder.ts +++ b/src/lib/generated/builders/run-task-run-workflow-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.WorkflowExtensions} data The underlying object - * @returns {Specification.WorkflowExtensions} The validated underlying object + * @param {Specification.RunTaskRunWorkflow} data The underlying object + * @returns {Specification.RunTaskRunWorkflow} The validated underlying object */ -function buildingFn(data: Specification.WorkflowExtensions): () => Specification.WorkflowExtensions { +function buildingFn(data: Specification.RunTaskRunWorkflow): () => Specification.RunTaskRunWorkflow { return () => { - const model = new Classes.WorkflowExtensions(); + const model = new Classes.RunTaskRunWorkflow(); Object.assign(model, data); - validate('WorkflowExtensions', model); - return model as Specification.WorkflowExtensions; + validate('RunTaskRunWorkflow', model); + return model as Specification.RunTaskRunWorkflow; }; } /** - * A factory to create a builder proxy for the type `Specification.WorkflowExtensions` - * @returns {Specification.WorkflowExtensions} A builder for `Specification.WorkflowExtensions` + * A factory to create a builder proxy for the type `Specification.RunTaskRunWorkflow` + * @returns {Specification.RunTaskRunWorkflow} A builder for `Specification.RunTaskRunWorkflow` */ -export function workflowExtensionsBuilder(): Builder { - return builder(buildingFn); +export function runTaskRunWorkflowBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/run-task-run-workflow-input-builder.ts b/src/lib/generated/builders/run-task-run-workflow-input-builder.ts new file mode 100644 index 00000000..b832c589 --- /dev/null +++ b/src/lib/generated/builders/run-task-run-workflow-input-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.RunTaskRunWorkflowInput} data The underlying object + * @returns {Specification.RunTaskRunWorkflowInput} The validated underlying object + */ +function buildingFn(data: Specification.RunTaskRunWorkflowInput): () => Specification.RunTaskRunWorkflowInput { + return () => { + const model = new Classes.RunTaskRunWorkflowInput(); + Object.assign(model, data); + + validate('RunTaskRunWorkflowInput', model); + return model as Specification.RunTaskRunWorkflowInput; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.RunTaskRunWorkflowInput` + * @returns {Specification.RunTaskRunWorkflowInput} A builder for `Specification.RunTaskRunWorkflowInput` + */ +export function runTaskRunWorkflowInputBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/run-workflow-descriptor-builder.ts b/src/lib/generated/builders/run-workflow-descriptor-builder.ts deleted file mode 100644 index e0d79624..00000000 --- a/src/lib/generated/builders/run-workflow-descriptor-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunWorkflowDescriptor} data The underlying object - * @returns {Specification.RunWorkflowDescriptor} The validated underlying object - */ -function buildingFn(data: Specification.RunWorkflowDescriptor): () => Specification.RunWorkflowDescriptor { - return () => { - const model = new Classes.RunWorkflowDescriptor(); - Object.assign(model, data); - - validate('RunWorkflowDescriptor', model); - return model as Specification.RunWorkflowDescriptor; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.RunWorkflowDescriptor` - * @returns {Specification.RunWorkflowDescriptor} A builder for `Specification.RunWorkflowDescriptor` - */ -export function runWorkflowDescriptorBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/export-as-builder.ts b/src/lib/generated/builders/schedule-builder.ts similarity index 66% rename from src/lib/generated/builders/export-as-builder.ts rename to src/lib/generated/builders/schedule-builder.ts index d9f4a205..0cdc5d32 100644 --- a/src/lib/generated/builders/export-as-builder.ts +++ b/src/lib/generated/builders/schedule-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ExportAs} data The underlying object - * @returns {Specification.ExportAs} The validated underlying object + * @param {Specification.Schedule} data The underlying object + * @returns {Specification.Schedule} The validated underlying object */ -function buildingFn(data: Specification.ExportAs): () => Specification.ExportAs { +function buildingFn(data: Specification.Schedule): () => Specification.Schedule { return () => { - const model = new Classes.ExportAs(); + const model = new Classes.Schedule(); Object.assign(model, data); - validate('ExportAs', model); - return model as Specification.ExportAs; + validate('Schedule', model); + return model as Specification.Schedule; }; } /** - * A factory to create a builder proxy for the type `Specification.ExportAs` - * @returns {Specification.ExportAs} A builder for `Specification.ExportAs` + * A factory to create a builder proxy for the type `Specification.Schedule` + * @returns {Specification.Schedule} A builder for `Specification.Schedule` */ -export function exportAsBuilder(): Builder { - return builder(buildingFn); +export function scheduleBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/script-builder.ts b/src/lib/generated/builders/script-builder.ts deleted file mode 100644 index 99c84123..00000000 --- a/src/lib/generated/builders/script-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Script} data The underlying object - * @returns {Specification.Script} The validated underlying object - */ -function buildingFn(data: Specification.Script): () => Specification.Script { - return () => { - const model = new Classes.Script(); - Object.assign(model, data); - - validate('Script', model); - return model as Specification.Script; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Script` - * @returns {Specification.Script} A builder for `Specification.Script` - */ -export function scriptBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/script-external-builder.ts b/src/lib/generated/builders/script-external-builder.ts deleted file mode 100644 index b2a6ec94..00000000 --- a/src/lib/generated/builders/script-external-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ScriptExternal} data The underlying object - * @returns {Specification.ScriptExternal} The validated underlying object - */ -function buildingFn(data: Specification.ScriptExternal): () => Specification.ScriptExternal { - return () => { - const model = new Classes.ScriptExternal(); - Object.assign(model, data); - - validate('ScriptExternal', model); - return model as Specification.ScriptExternal; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.ScriptExternal` - * @returns {Specification.ScriptExternal} A builder for `Specification.ScriptExternal` - */ -export function scriptExternalBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/switch-item-builder.ts b/src/lib/generated/builders/set-task-set-builder.ts similarity index 65% rename from src/lib/generated/builders/switch-item-builder.ts rename to src/lib/generated/builders/set-task-set-builder.ts index dc183866..d426416f 100644 --- a/src/lib/generated/builders/switch-item-builder.ts +++ b/src/lib/generated/builders/set-task-set-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.SwitchItem} data The underlying object - * @returns {Specification.SwitchItem} The validated underlying object + * @param {Specification.SetTaskSet} data The underlying object + * @returns {Specification.SetTaskSet} The validated underlying object */ -function buildingFn(data: Specification.SwitchItem): () => Specification.SwitchItem { +function buildingFn(data: Specification.SetTaskSet): () => Specification.SetTaskSet { return () => { - const model = new Classes.SwitchItem(); + const model = new Classes.SetTaskSet(); Object.assign(model, data); - validate('SwitchItem', model); - return model as Specification.SwitchItem; + validate('SetTaskSet', model); + return model as Specification.SetTaskSet; }; } /** - * A factory to create a builder proxy for the type `Specification.SwitchItem` - * @returns {Specification.SwitchItem} A builder for `Specification.SwitchItem` + * A factory to create a builder proxy for the type `Specification.SetTaskSet` + * @returns {Specification.SetTaskSet} A builder for `Specification.SetTaskSet` */ -export function switchItemBuilder(): Builder { - return builder(buildingFn); +export function setTaskSetBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/shell-arguments-builder.ts b/src/lib/generated/builders/shell-arguments-builder.ts deleted file mode 100644 index 68399fe6..00000000 --- a/src/lib/generated/builders/shell-arguments-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ShellArguments} data The underlying object - * @returns {Specification.ShellArguments} The validated underlying object - */ -function buildingFn(data: Specification.ShellArguments): () => Specification.ShellArguments { - return () => { - const model = new Classes.ShellArguments(); - Object.assign(model, data); - - validate('ShellArguments', model); - return model as Specification.ShellArguments; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.ShellArguments` - * @returns {Specification.ShellArguments} A builder for `Specification.ShellArguments` - */ -export function shellArgumentsBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/shell-builder.ts b/src/lib/generated/builders/shell-builder.ts deleted file mode 100644 index a1d16a1f..00000000 --- a/src/lib/generated/builders/shell-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Shell} data The underlying object - * @returns {Specification.Shell} The validated underlying object - */ -function buildingFn(data: Specification.Shell): () => Specification.Shell { - return () => { - const model = new Classes.Shell(); - Object.assign(model, data); - - validate('Shell', model); - return model as Specification.Shell; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Shell` - * @returns {Specification.Shell} A builder for `Specification.Shell` - */ -export function shellBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/switch-builder.ts b/src/lib/generated/builders/switch-builder.ts deleted file mode 100644 index 9296682e..00000000 --- a/src/lib/generated/builders/switch-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Switch} data The underlying object - * @returns {Specification.Switch} The validated underlying object - */ -function buildingFn(data: Specification.Switch): () => Specification.Switch { - return () => { - const model = new Classes.Switch(); - Object.assign(model, data); - - validate('Switch', model); - return model as Specification.Switch; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.Switch` - * @returns {Specification.Switch} A builder for `Specification.Switch` - */ -export function switchBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/workflow-document-builder.ts b/src/lib/generated/builders/switch-task-switch-builder.ts similarity index 63% rename from src/lib/generated/builders/workflow-document-builder.ts rename to src/lib/generated/builders/switch-task-switch-builder.ts index b6bf9d96..38069755 100644 --- a/src/lib/generated/builders/workflow-document-builder.ts +++ b/src/lib/generated/builders/switch-task-switch-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.WorkflowDocument} data The underlying object - * @returns {Specification.WorkflowDocument} The validated underlying object + * @param {Specification.SwitchTaskSwitch} data The underlying object + * @returns {Specification.SwitchTaskSwitch} The validated underlying object */ -function buildingFn(data: Specification.WorkflowDocument): () => Specification.WorkflowDocument { +function buildingFn(data: Specification.SwitchTaskSwitch): () => Specification.SwitchTaskSwitch { return () => { - const model = new Classes.WorkflowDocument(); + const model = new Classes.SwitchTaskSwitch(); Object.assign(model, data); - validate('WorkflowDocument', model); - return model as Specification.WorkflowDocument; + validate('SwitchTaskSwitch', model); + return model as Specification.SwitchTaskSwitch; }; } /** - * A factory to create a builder proxy for the type `Specification.WorkflowDocument` - * @returns {Specification.WorkflowDocument} A builder for `Specification.WorkflowDocument` + * A factory to create a builder proxy for the type `Specification.SwitchTaskSwitch` + * @returns {Specification.SwitchTaskSwitch} A builder for `Specification.SwitchTaskSwitch` */ -export function workflowDocumentBuilder(): Builder { - return builder(buildingFn); +export function switchTaskSwitchBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/task-item-builder.ts b/src/lib/generated/builders/task-item-builder.ts deleted file mode 100644 index 7cde5689..00000000 --- a/src/lib/generated/builders/task-item-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.TaskItem} data The underlying object - * @returns {Specification.TaskItem} The validated underlying object - */ -function buildingFn(data: Specification.TaskItem): () => Specification.TaskItem { - return () => { - const model = new Classes.TaskItem(); - Object.assign(model, data); - - validate('TaskItem', model); - return model as Specification.TaskItem; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.TaskItem` - * @returns {Specification.TaskItem} A builder for `Specification.TaskItem` - */ -export function taskItemBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/try-task-catch-builder.ts b/src/lib/generated/builders/try-task-catch-builder.ts new file mode 100644 index 00000000..43b0697c --- /dev/null +++ b/src/lib/generated/builders/try-task-catch-builder.ts @@ -0,0 +1,43 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.TryTaskCatch} data The underlying object + * @returns {Specification.TryTaskCatch} The validated underlying object + */ +function buildingFn(data: Specification.TryTaskCatch): () => Specification.TryTaskCatch { + return () => { + const model = new Classes.TryTaskCatch(); + Object.assign(model, data); + + validate('TryTaskCatch', model); + return model as Specification.TryTaskCatch; + }; +} + +/** + * A factory to create a builder proxy for the type `Specification.TryTaskCatch` + * @returns {Specification.TryTaskCatch} A builder for `Specification.TryTaskCatch` + */ +export function tryTaskCatchBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/set-builder.ts b/src/lib/generated/builders/use-builder.ts similarity index 68% rename from src/lib/generated/builders/set-builder.ts rename to src/lib/generated/builders/use-builder.ts index d16b245d..1b9cc1ff 100644 --- a/src/lib/generated/builders/set-builder.ts +++ b/src/lib/generated/builders/use-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Set} data The underlying object - * @returns {Specification.Set} The validated underlying object + * @param {Specification.Use} data The underlying object + * @returns {Specification.Use} The validated underlying object */ -function buildingFn(data: Specification.Set): () => Specification.Set { +function buildingFn(data: Specification.Use): () => Specification.Use { return () => { - const model = new Classes.Set(); + const model = new Classes.Use(); Object.assign(model, data); - validate('Set', model); - return model as Specification.Set; + validate('Use', model); + return model as Specification.Use; }; } /** - * A factory to create a builder proxy for the type `Specification.Set` - * @returns {Specification.Set} A builder for `Specification.Set` + * A factory to create a builder proxy for the type `Specification.Use` + * @returns {Specification.Use} A builder for `Specification.Use` */ -export function setBuilder(): Builder { - return builder(buildingFn); +export function useBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/workflow-functions-builder.ts b/src/lib/generated/builders/use-extensions-builder.ts similarity index 65% rename from src/lib/generated/builders/workflow-functions-builder.ts rename to src/lib/generated/builders/use-extensions-builder.ts index 8ac2c2af..3db961eb 100644 --- a/src/lib/generated/builders/workflow-functions-builder.ts +++ b/src/lib/generated/builders/use-extensions-builder.ts @@ -21,23 +21,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.WorkflowFunctions} data The underlying object - * @returns {Specification.WorkflowFunctions} The validated underlying object + * @param {Specification.UseExtensions} data The underlying object + * @returns {Specification.UseExtensions} The validated underlying object */ -function buildingFn(data: Specification.WorkflowFunctions): () => Specification.WorkflowFunctions { +function buildingFn(data: Specification.UseExtensions): () => Specification.UseExtensions { return () => { - const model = new Classes.WorkflowFunctions(); + const model = new Classes.UseExtensions(); Object.assign(model, data); - validate('WorkflowFunctions', model); - return model as Specification.WorkflowFunctions; + validate('UseExtensions', model); + return model as Specification.UseExtensions; }; } /** - * A factory to create a builder proxy for the type `Specification.WorkflowFunctions` - * @returns {Specification.WorkflowFunctions} A builder for `Specification.WorkflowFunctions` + * A factory to create a builder proxy for the type `Specification.UseExtensions` + * @returns {Specification.UseExtensions} A builder for `Specification.UseExtensions` */ -export function workflowFunctionsBuilder(): Builder { - return builder(buildingFn); +export function useExtensionsBuilder(): Builder { + return builder(buildingFn); } diff --git a/src/lib/generated/builders/with-event-builder.ts b/src/lib/generated/builders/with-event-builder.ts deleted file mode 100644 index 04a85ada..00000000 --- a/src/lib/generated/builders/with-event-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.WithEvent} data The underlying object - * @returns {Specification.WithEvent} The validated underlying object - */ -function buildingFn(data: Specification.WithEvent): () => Specification.WithEvent { - return () => { - const model = new Classes.WithEvent(); - Object.assign(model, data); - - validate('WithEvent', model); - return model as Specification.WithEvent; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.WithEvent` - * @returns {Specification.WithEvent} A builder for `Specification.WithEvent` - */ -export function withEventBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/workflow-components-builder.ts b/src/lib/generated/builders/workflow-components-builder.ts deleted file mode 100644 index b8d0742c..00000000 --- a/src/lib/generated/builders/workflow-components-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.WorkflowComponents} data The underlying object - * @returns {Specification.WorkflowComponents} The validated underlying object - */ -function buildingFn(data: Specification.WorkflowComponents): () => Specification.WorkflowComponents { - return () => { - const model = new Classes.WorkflowComponents(); - Object.assign(model, data); - - validate('WorkflowComponents', model); - return model as Specification.WorkflowComponents; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.WorkflowComponents` - * @returns {Specification.WorkflowComponents} A builder for `Specification.WorkflowComponents` - */ -export function workflowComponentsBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/workflow-errors-builder.ts b/src/lib/generated/builders/workflow-errors-builder.ts deleted file mode 100644 index 26a0de6b..00000000 --- a/src/lib/generated/builders/workflow-errors-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.WorkflowErrors} data The underlying object - * @returns {Specification.WorkflowErrors} The validated underlying object - */ -function buildingFn(data: Specification.WorkflowErrors): () => Specification.WorkflowErrors { - return () => { - const model = new Classes.WorkflowErrors(); - Object.assign(model, data); - - validate('WorkflowErrors', model); - return model as Specification.WorkflowErrors; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.WorkflowErrors` - * @returns {Specification.WorkflowErrors} A builder for `Specification.WorkflowErrors` - */ -export function workflowErrorsBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/workflow-input-builder.ts b/src/lib/generated/builders/workflow-input-builder.ts deleted file mode 100644 index f154b57b..00000000 --- a/src/lib/generated/builders/workflow-input-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.WorkflowInput} data The underlying object - * @returns {Specification.WorkflowInput} The validated underlying object - */ -function buildingFn(data: Specification.WorkflowInput): () => Specification.WorkflowInput { - return () => { - const model = new Classes.WorkflowInput(); - Object.assign(model, data); - - validate('WorkflowInput', model); - return model as Specification.WorkflowInput; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.WorkflowInput` - * @returns {Specification.WorkflowInput} A builder for `Specification.WorkflowInput` - */ -export function workflowInputBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/workflow-schedule-builder.ts b/src/lib/generated/builders/workflow-schedule-builder.ts deleted file mode 100644 index 32e54e21..00000000 --- a/src/lib/generated/builders/workflow-schedule-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.WorkflowSchedule} data The underlying object - * @returns {Specification.WorkflowSchedule} The validated underlying object - */ -function buildingFn(data: Specification.WorkflowSchedule): () => Specification.WorkflowSchedule { - return () => { - const model = new Classes.WorkflowSchedule(); - Object.assign(model, data); - - validate('WorkflowSchedule', model); - return model as Specification.WorkflowSchedule; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.WorkflowSchedule` - * @returns {Specification.WorkflowSchedule} A builder for `Specification.WorkflowSchedule` - */ -export function workflowScheduleBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/workflow-secrets-builder.ts b/src/lib/generated/builders/workflow-secrets-builder.ts deleted file mode 100644 index 7b1af56b..00000000 --- a/src/lib/generated/builders/workflow-secrets-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.WorkflowSecrets} data The underlying object - * @returns {Specification.WorkflowSecrets} The validated underlying object - */ -function buildingFn(data: Specification.WorkflowSecrets): () => Specification.WorkflowSecrets { - return () => { - const model = new Classes.WorkflowSecrets(); - Object.assign(model, data); - - validate('WorkflowSecrets', model); - return model as Specification.WorkflowSecrets; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.WorkflowSecrets` - * @returns {Specification.WorkflowSecrets} A builder for `Specification.WorkflowSecrets` - */ -export function workflowSecretsBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/builders/workflow-tags-builder.ts b/src/lib/generated/builders/workflow-tags-builder.ts deleted file mode 100644 index 105448b3..00000000 --- a/src/lib/generated/builders/workflow-tags-builder.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.WorkflowTags} data The underlying object - * @returns {Specification.WorkflowTags} The validated underlying object - */ -function buildingFn(data: Specification.WorkflowTags): () => Specification.WorkflowTags { - return () => { - const model = new Classes.WorkflowTags(); - Object.assign(model, data); - - validate('WorkflowTags', model); - return model as Specification.WorkflowTags; - }; -} - -/** - * A factory to create a builder proxy for the type `Specification.WorkflowTags` - * @returns {Specification.WorkflowTags} A builder for `Specification.WorkflowTags` - */ -export function workflowTagsBuilder(): Builder { - return builder(buildingFn); -} diff --git a/src/lib/generated/classes/all-event-consumption-strategy.ts b/src/lib/generated/classes/all-event-consumption-strategy.ts deleted file mode 100644 index 7c80e8ee..00000000 --- a/src/lib/generated/classes/all-event-consumption-strategy.ts +++ /dev/null @@ -1 +0,0 @@ -export class AllEventConsumptionStrategy {} diff --git a/src/lib/generated/classes/any-event-consumption-strategy.ts b/src/lib/generated/classes/any-event-consumption-strategy.ts deleted file mode 100644 index 70d2f749..00000000 --- a/src/lib/generated/classes/any-event-consumption-strategy.ts +++ /dev/null @@ -1 +0,0 @@ -export class AnyEventConsumptionStrategy {} diff --git a/src/lib/generated/classes/authentication-policy-basic.ts b/src/lib/generated/classes/authentication-policy-basic.ts new file mode 100644 index 00000000..fb95d394 --- /dev/null +++ b/src/lib/generated/classes/authentication-policy-basic.ts @@ -0,0 +1 @@ +export class AuthenticationPolicyBasic {} diff --git a/src/lib/generated/classes/authentication-policy-bearer.ts b/src/lib/generated/classes/authentication-policy-bearer.ts new file mode 100644 index 00000000..ab4dbf99 --- /dev/null +++ b/src/lib/generated/classes/authentication-policy-bearer.ts @@ -0,0 +1 @@ +export class AuthenticationPolicyBearer {} diff --git a/src/lib/generated/classes/authentication-policy-oauth2-client.ts b/src/lib/generated/classes/authentication-policy-oauth2-client.ts new file mode 100644 index 00000000..91c689d2 --- /dev/null +++ b/src/lib/generated/classes/authentication-policy-oauth2-client.ts @@ -0,0 +1 @@ +export class AuthenticationPolicyOauth2Client {} diff --git a/src/lib/generated/classes/authentication-policy-oauth2.ts b/src/lib/generated/classes/authentication-policy-oauth2.ts new file mode 100644 index 00000000..ad9b11f3 --- /dev/null +++ b/src/lib/generated/classes/authentication-policy-oauth2.ts @@ -0,0 +1 @@ +export class AuthenticationPolicyOauth2 {} diff --git a/src/lib/generated/classes/authentication-policy-reference.ts b/src/lib/generated/classes/authentication-policy-reference.ts deleted file mode 100644 index bacce5a3..00000000 --- a/src/lib/generated/classes/authentication-policy-reference.ts +++ /dev/null @@ -1 +0,0 @@ -export class AuthenticationPolicyReference {} diff --git a/src/lib/generated/classes/basic-authentication-policy.ts b/src/lib/generated/classes/basic-authentication-policy.ts deleted file mode 100644 index 06487d48..00000000 --- a/src/lib/generated/classes/basic-authentication-policy.ts +++ /dev/null @@ -1 +0,0 @@ -export class BasicAuthenticationPolicy {} diff --git a/src/lib/generated/classes/bearer-authentication-policy.ts b/src/lib/generated/classes/bearer-authentication-policy.ts deleted file mode 100644 index 66ffd2b8..00000000 --- a/src/lib/generated/classes/bearer-authentication-policy.ts +++ /dev/null @@ -1 +0,0 @@ -export class BearerAuthenticationPolicy {} diff --git a/src/lib/generated/classes/call-async-api-with-authentication.ts b/src/lib/generated/classes/call-async-api-with-authentication.ts new file mode 100644 index 00000000..5d8d03ff --- /dev/null +++ b/src/lib/generated/classes/call-async-api-with-authentication.ts @@ -0,0 +1 @@ +export class CallAsyncAPIWithAuthentication {} diff --git a/src/lib/generated/classes/call-grpc-with-service-authentication.ts b/src/lib/generated/classes/call-grpc-with-service-authentication.ts new file mode 100644 index 00000000..8c4f0f58 --- /dev/null +++ b/src/lib/generated/classes/call-grpc-with-service-authentication.ts @@ -0,0 +1 @@ +export class CallGRPCWithServiceAuthentication {} diff --git a/src/lib/generated/classes/call-http-with-body.ts b/src/lib/generated/classes/call-http-with-body.ts deleted file mode 100644 index 0219644b..00000000 --- a/src/lib/generated/classes/call-http-with-body.ts +++ /dev/null @@ -1 +0,0 @@ -export class CallHTTPWithBody {} diff --git a/src/lib/generated/classes/call-http-with-headers.ts b/src/lib/generated/classes/call-http-with-headers.ts deleted file mode 100644 index 885eaf3d..00000000 --- a/src/lib/generated/classes/call-http-with-headers.ts +++ /dev/null @@ -1 +0,0 @@ -export class CallHTTPWithHeaders {} diff --git a/src/lib/generated/classes/call-open-api-with-authentication.ts b/src/lib/generated/classes/call-open-api-with-authentication.ts new file mode 100644 index 00000000..3c129b07 --- /dev/null +++ b/src/lib/generated/classes/call-open-api-with-authentication.ts @@ -0,0 +1 @@ +export class CallOpenAPIWithAuthentication {} diff --git a/src/lib/generated/classes/catch-errors.ts b/src/lib/generated/classes/catch-errors.ts deleted file mode 100644 index c5f9ee0e..00000000 --- a/src/lib/generated/classes/catch-errors.ts +++ /dev/null @@ -1 +0,0 @@ -export class CatchErrors {} diff --git a/src/lib/generated/classes/catch.ts b/src/lib/generated/classes/catch.ts deleted file mode 100644 index 3ee3cfa7..00000000 --- a/src/lib/generated/classes/catch.ts +++ /dev/null @@ -1 +0,0 @@ -export class Catch {} diff --git a/src/lib/generated/classes/constant-backoff.ts b/src/lib/generated/classes/constant-backoff.ts deleted file mode 100644 index a5277d9a..00000000 --- a/src/lib/generated/classes/constant-backoff.ts +++ /dev/null @@ -1 +0,0 @@ -export class ConstantBackoff {} diff --git a/src/lib/generated/classes/container-environment.ts b/src/lib/generated/classes/container-environment.ts deleted file mode 100644 index 529be6af..00000000 --- a/src/lib/generated/classes/container-environment.ts +++ /dev/null @@ -1 +0,0 @@ -export class ContainerEnvironment {} diff --git a/src/lib/generated/classes/container.ts b/src/lib/generated/classes/container.ts deleted file mode 100644 index 11e8a24c..00000000 --- a/src/lib/generated/classes/container.ts +++ /dev/null @@ -1 +0,0 @@ -export class Container {} diff --git a/src/lib/generated/classes/correlate.ts b/src/lib/generated/classes/correlate.ts deleted file mode 100644 index 15955259..00000000 --- a/src/lib/generated/classes/correlate.ts +++ /dev/null @@ -1 +0,0 @@ -export class Correlate {} diff --git a/src/lib/generated/classes/document-tags.ts b/src/lib/generated/classes/document-tags.ts new file mode 100644 index 00000000..29fa9671 --- /dev/null +++ b/src/lib/generated/classes/document-tags.ts @@ -0,0 +1 @@ +export class DocumentTags {} diff --git a/src/lib/generated/classes/document.ts b/src/lib/generated/classes/document.ts new file mode 100644 index 00000000..8ea0a151 --- /dev/null +++ b/src/lib/generated/classes/document.ts @@ -0,0 +1 @@ +export class Document {} diff --git a/src/lib/generated/classes/emit-event.ts b/src/lib/generated/classes/emit-event.ts deleted file mode 100644 index 36c0a83c..00000000 --- a/src/lib/generated/classes/emit-event.ts +++ /dev/null @@ -1 +0,0 @@ -export class EmitEvent {} diff --git a/src/lib/generated/classes/emit-task-emit-event.ts b/src/lib/generated/classes/emit-task-emit-event.ts new file mode 100644 index 00000000..c8ce14f0 --- /dev/null +++ b/src/lib/generated/classes/emit-task-emit-event.ts @@ -0,0 +1 @@ +export class EmitTaskEmitEvent {} diff --git a/src/lib/generated/classes/emit-task-emit.ts b/src/lib/generated/classes/emit-task-emit.ts new file mode 100644 index 00000000..183fafa6 --- /dev/null +++ b/src/lib/generated/classes/emit-task-emit.ts @@ -0,0 +1 @@ +export class EmitTaskEmit {} diff --git a/src/lib/generated/classes/emit.ts b/src/lib/generated/classes/emit.ts deleted file mode 100644 index dd73e4ac..00000000 --- a/src/lib/generated/classes/emit.ts +++ /dev/null @@ -1 +0,0 @@ -export class Emit {} diff --git a/src/lib/generated/classes/endpoint-authentication.ts b/src/lib/generated/classes/endpoint-authentication.ts new file mode 100644 index 00000000..fbee5038 --- /dev/null +++ b/src/lib/generated/classes/endpoint-authentication.ts @@ -0,0 +1 @@ +export class EndpointAuthentication {} diff --git a/src/lib/generated/classes/event-filter-correlate.ts b/src/lib/generated/classes/event-filter-correlate.ts new file mode 100644 index 00000000..62270c66 --- /dev/null +++ b/src/lib/generated/classes/event-filter-correlate.ts @@ -0,0 +1 @@ +export class EventFilterCorrelate {} diff --git a/src/lib/generated/classes/event-filter-with.ts b/src/lib/generated/classes/event-filter-with.ts new file mode 100644 index 00000000..e902fa78 --- /dev/null +++ b/src/lib/generated/classes/event-filter-with.ts @@ -0,0 +1 @@ +export class EventFilterWith {} diff --git a/src/lib/generated/classes/explicit-basic-authentication-policy.ts b/src/lib/generated/classes/explicit-basic-authentication-policy.ts deleted file mode 100644 index 179b71d0..00000000 --- a/src/lib/generated/classes/explicit-basic-authentication-policy.ts +++ /dev/null @@ -1 +0,0 @@ -export class ExplicitBasicAuthenticationPolicy {} diff --git a/src/lib/generated/classes/explicit-bearer-authentication-policy.ts b/src/lib/generated/classes/explicit-bearer-authentication-policy.ts deleted file mode 100644 index e151be63..00000000 --- a/src/lib/generated/classes/explicit-bearer-authentication-policy.ts +++ /dev/null @@ -1 +0,0 @@ -export class ExplicitBearerAuthenticationPolicy {} diff --git a/src/lib/generated/classes/explicit-o-auth2-authentication-policy.ts b/src/lib/generated/classes/explicit-o-auth2-authentication-policy.ts deleted file mode 100644 index 189e40e5..00000000 --- a/src/lib/generated/classes/explicit-o-auth2-authentication-policy.ts +++ /dev/null @@ -1 +0,0 @@ -export class ExplicitOAuth2AuthenticationPolicy {} diff --git a/src/lib/generated/classes/exponential-back-off.ts b/src/lib/generated/classes/exponential-back-off.ts deleted file mode 100644 index 2ea6526f..00000000 --- a/src/lib/generated/classes/exponential-back-off.ts +++ /dev/null @@ -1 +0,0 @@ -export class ExponentialBackOff {} diff --git a/src/lib/generated/classes/export-as.ts b/src/lib/generated/classes/export-as.ts deleted file mode 100644 index b78275c4..00000000 --- a/src/lib/generated/classes/export-as.ts +++ /dev/null @@ -1 +0,0 @@ -export class ExportAs {} diff --git a/src/lib/generated/classes/extension-item.ts b/src/lib/generated/classes/extension-item.ts deleted file mode 100644 index 13e73024..00000000 --- a/src/lib/generated/classes/extension-item.ts +++ /dev/null @@ -1 +0,0 @@ -export class ExtensionItem {} diff --git a/src/lib/generated/classes/external-resource-authentication.ts b/src/lib/generated/classes/external-resource-authentication.ts new file mode 100644 index 00000000..8ec9e67e --- /dev/null +++ b/src/lib/generated/classes/external-resource-authentication.ts @@ -0,0 +1 @@ +export class ExternalResourceAuthentication {} diff --git a/src/lib/generated/classes/external-resource-u-r-i.ts b/src/lib/generated/classes/external-resource-u-r-i.ts deleted file mode 100644 index 76a4f433..00000000 --- a/src/lib/generated/classes/external-resource-u-r-i.ts +++ /dev/null @@ -1 +0,0 @@ -export class ExternalResourceURI {} diff --git a/src/lib/generated/classes/flow-directive-enum.ts b/src/lib/generated/classes/flow-directive-enum.ts deleted file mode 100644 index 0c7744a4..00000000 --- a/src/lib/generated/classes/flow-directive-enum.ts +++ /dev/null @@ -1 +0,0 @@ -export class FlowDirectiveEnum {} diff --git a/src/lib/generated/classes/for-task-for.ts b/src/lib/generated/classes/for-task-for.ts new file mode 100644 index 00000000..7bd1314c --- /dev/null +++ b/src/lib/generated/classes/for-task-for.ts @@ -0,0 +1 @@ +export class ForTaskFor {} diff --git a/src/lib/generated/classes/for.ts b/src/lib/generated/classes/for.ts deleted file mode 100644 index 03f18692..00000000 --- a/src/lib/generated/classes/for.ts +++ /dev/null @@ -1 +0,0 @@ -export class For {} diff --git a/src/lib/generated/classes/fork-task-fork.ts b/src/lib/generated/classes/fork-task-fork.ts new file mode 100644 index 00000000..d7b67f53 --- /dev/null +++ b/src/lib/generated/classes/fork-task-fork.ts @@ -0,0 +1 @@ +export class ForkTaskFork {} diff --git a/src/lib/generated/classes/fork.ts b/src/lib/generated/classes/fork.ts deleted file mode 100644 index 854b1cb7..00000000 --- a/src/lib/generated/classes/fork.ts +++ /dev/null @@ -1 +0,0 @@ -export class Fork {} diff --git a/src/lib/generated/classes/index.ts b/src/lib/generated/classes/index.ts index a216ed00..209d3c9f 100644 --- a/src/lib/generated/classes/index.ts +++ b/src/lib/generated/classes/index.ts @@ -16,240 +16,174 @@ import { Schema } from './schema'; import { ExternalResource } from './external-resource'; -import { ReferenceableAuthenticationPolicy } from './referenceable-authentication-policy'; -import { ReferencedAuthenticationPolicy } from './referenced-authentication-policy'; -import { InputFrom } from './input-from'; +import { ExternalResourceAuthentication } from './external-resource-authentication'; import { AuthenticationPolicy } from './authentication-policy'; import { Task } from './task'; import { CallTask } from './call-task'; -import { CallHTTPWithEndpoint } from './call-http-with-endpoint'; -import { OutputAs } from './output-as'; -import { ExportAs } from './export-as'; +import { CallAsyncAPI } from './call-async-api'; import { FlowDirective } from './flow-directive'; -import { FlowDirectiveEnum } from './flow-directive-enum'; +import { CallAsyncAPIWithAuthentication } from './call-async-api-with-authentication'; +import { CallGRPC } from './call-grpc'; +import { CallGRPCWithServiceAuthentication } from './call-grpc-with-service-authentication'; +import { CallHTTP } from './call-http'; +import { CallHTTPWithEndpoint } from './call-http-with-endpoint'; +import { EndpointAuthentication } from './endpoint-authentication'; +import { CallOpenAPI } from './call-open-api'; +import { CallOpenAPIWithAuthentication } from './call-open-api-with-authentication'; +import { CallFunction } from './call-function'; +import { DoTask } from './do-task'; +import { ForkTask } from './fork-task'; +import { EmitTask } from './emit-task'; +import { ForTask } from './for-task'; +import { ListenTask } from './listen-task'; import { EventConsumptionStrategy } from './event-consumption-strategy'; import { EventConsumptionStrategyAll } from './event-consumption-strategy-all'; import { EventConsumptionStrategyAny } from './event-consumption-strategy-any'; -import { Run } from './run'; -import { Script } from './script'; -import { Switch } from './switch'; +import { RaiseTask } from './raise-task'; +import { RunTask } from './run-task'; +import { RunTaskRun } from './run-task-run'; +import { RunTaskRunScript } from './run-task-run-script'; +import { SetTask } from './set-task'; +import { SwitchTask } from './switch-task'; +import { SwitchTaskSwitch } from './switch-task-switch'; +import { TryTask } from './try-task'; import { RetryPolicyBackoff } from './retry-policy-backoff'; +import { WaitTask } from './wait-task'; import { TaskList } from './task-list'; -import { WorkflowExtensions } from './workflow-extensions'; -import { WorkflowSecrets } from './workflow-secrets'; +import { UseExtensions } from './use-extensions'; import { Workflow } from './workflow'; -import { WorkflowDocument } from './workflow-document'; -import { WorkflowTags } from './workflow-tags'; +import { Document } from './document'; +import { DocumentTags } from './document-tags'; import { Input } from './input'; -import { SchemaInline } from './schema-inline'; -import { SchemaExternal } from './schema-external'; -import { ExternalResourceURI } from './external-resource-u-r-i'; -import { AuthenticationPolicyReference } from './authentication-policy-reference'; -import { BasicAuthenticationPolicy } from './basic-authentication-policy'; -import { ExplicitBasicAuthenticationPolicy } from './explicit-basic-authentication-policy'; -import { SecretBasedAuthenticationPolicy } from './secret-based-authentication-policy'; -import { BearerAuthenticationPolicy } from './bearer-authentication-policy'; -import { ExplicitBearerAuthenticationPolicy } from './explicit-bearer-authentication-policy'; -import { OAuth2AuthenticationPolicy } from './o-auth2-authentication-policy'; -import { ExplicitOAuth2AuthenticationPolicy } from './explicit-o-auth2-authentication-policy'; +import { AuthenticationPolicyBasic } from './authentication-policy-basic'; +import { AuthenticationPolicyBearer } from './authentication-policy-bearer'; +import { AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; +import { AuthenticationPolicyOauth2Client } from './authentication-policy-oauth2-client'; import { Oauth2Token } from './oauth2-token'; -import { WorkflowComponents } from './workflow-components'; -import { WorkflowAuthentications } from './workflow-authentications'; -import { WorkflowErrors } from './workflow-errors'; +import { Use } from './use'; import { Error } from './error'; -import { ExtensionItem } from './extension-item'; import { Extension } from './extension'; -import { TaskItem } from './task-item'; -import { CallAsyncAPI } from './call-async-api'; +import { TaskBase } from './task-base'; +import { Output } from './output'; +import { Export } from './export'; +import { Timeout } from './timeout'; +import { Duration } from './duration'; import { CallAsyncAPIWith } from './call-async-api-with'; -import { CallGRPC } from './call-grpc'; import { CallGRPCWith } from './call-grpc-with'; import { CallGRPCWithService } from './call-grpc-with-service'; import { CallGRPCWithArguments } from './call-grpc-with-arguments'; -import { CallHTTP } from './call-http'; import { CallHTTPWith } from './call-http-with'; import { Endpoint } from './endpoint'; -import { CallHTTPWithHeaders } from './call-http-with-headers'; -import { CallHTTPWithBody } from './call-http-with-body'; -import { CallOpenAPI } from './call-open-api'; import { CallOpenAPIWith } from './call-open-api-with'; import { CallOpenAPIWithParameters } from './call-open-api-with-parameters'; -import { CallFunction } from './call-function'; import { CallFunctionWith } from './call-function-with'; -import { DoTask } from './do-task'; -import { ForkTask } from './fork-task'; -import { Fork } from './fork'; -import { TaskBase } from './task-base'; -import { Output } from './output'; -import { Export } from './export'; -import { Timeout } from './timeout'; -import { Duration } from './duration'; -import { EmitTask } from './emit-task'; -import { Emit } from './emit'; -import { EmitEvent } from './emit-event'; -import { ForTask } from './for-task'; -import { For } from './for'; -import { ListenTask } from './listen-task'; -import { Listen } from './listen'; -import { AllEventConsumptionStrategy } from './all-event-consumption-strategy'; +import { ForkTaskFork } from './fork-task-fork'; +import { EmitTaskEmit } from './emit-task-emit'; +import { EmitTaskEmitEvent } from './emit-task-emit-event'; +import { ForTaskFor } from './for-task-for'; +import { ListenTaskListen } from './listen-task-listen'; import { EventFilter } from './event-filter'; -import { WithEvent } from './with-event'; -import { Correlate } from './correlate'; -import { AnyEventConsumptionStrategy } from './any-event-consumption-strategy'; -import { OneEventConsumptionStrategy } from './one-event-consumption-strategy'; -import { RaiseTask } from './raise-task'; -import { Raise } from './raise'; -import { RunTask } from './run-task'; -import { RunContainer } from './run-container'; -import { Container } from './container'; -import { ContainerEnvironment } from './container-environment'; -import { RunScript } from './run-script'; -import { ScriptInline } from './script-inline'; -import { ScriptExternal } from './script-external'; -import { RunShell } from './run-shell'; -import { Shell } from './shell'; -import { ShellArguments } from './shell-arguments'; -import { ShellEnvironment } from './shell-environment'; -import { RunWokflow } from './run-wokflow'; -import { RunWorkflowDescriptor } from './run-workflow-descriptor'; -import { WorkflowInput } from './workflow-input'; -import { SetTask } from './set-task'; -import { Set } from './set'; -import { SwitchTask } from './switch-task'; -import { SwitchItem } from './switch-item'; -import { SwitchCase } from './switch-case'; -import { TryTask } from './try-task'; -import { Catch } from './catch'; -import { CatchErrors } from './catch-errors'; +import { EventFilterWith } from './event-filter-with'; +import { EventFilterCorrelate } from './event-filter-correlate'; +import { RaiseTaskRaise } from './raise-task-raise'; +import { RunTaskRunContainer } from './run-task-run-container'; +import { RunTaskRunShell } from './run-task-run-shell'; +import { RunTaskRunShellArguments } from './run-task-run-shell-arguments'; +import { RunTaskRunShellEnvironment } from './run-task-run-shell-environment'; +import { RunTaskRunWorkflow } from './run-task-run-workflow'; +import { RunTaskRunWorkflowInput } from './run-task-run-workflow-input'; +import { SetTaskSet } from './set-task-set'; +import { TryTaskCatch } from './try-task-catch'; import { RetryPolicy } from './retry-policy'; -import { ConstantBackoff } from './constant-backoff'; -import { ExponentialBackOff } from './exponential-back-off'; -import { LinearBackoff } from './linear-backoff'; import { RetryPolicyLimit } from './retry-policy-limit'; -import { RetryPolicyAttempt } from './retry-policy-attempt'; +import { RetryPolicyLimitAttempt } from './retry-policy-limit-attempt'; import { RetryPolicyJitter } from './retry-policy-jitter'; -import { WaitTask } from './wait-task'; -import { WorkflowFunctions } from './workflow-functions'; -import { WorkflowRetries } from './workflow-retries'; -import { WorkflowSchedule } from './workflow-schedule'; +import { Schedule } from './schedule'; export const Classes = { Schema, ExternalResource, - ReferenceableAuthenticationPolicy, - ReferencedAuthenticationPolicy, - InputFrom, + ExternalResourceAuthentication, AuthenticationPolicy, Task, CallTask, - CallHTTPWithEndpoint, - OutputAs, - ExportAs, + CallAsyncAPI, FlowDirective, - FlowDirectiveEnum, + CallAsyncAPIWithAuthentication, + CallGRPC, + CallGRPCWithServiceAuthentication, + CallHTTP, + CallHTTPWithEndpoint, + EndpointAuthentication, + CallOpenAPI, + CallOpenAPIWithAuthentication, + CallFunction, + DoTask, + ForkTask, + EmitTask, + ForTask, + ListenTask, EventConsumptionStrategy, EventConsumptionStrategyAll, EventConsumptionStrategyAny, - Run, - Script, - Switch, + RaiseTask, + RunTask, + RunTaskRun, + RunTaskRunScript, + SetTask, + SwitchTask, + SwitchTaskSwitch, + TryTask, RetryPolicyBackoff, + WaitTask, TaskList, - WorkflowExtensions, - WorkflowSecrets, + UseExtensions, Workflow, - WorkflowDocument, - WorkflowTags, + Document, + DocumentTags, Input, - SchemaInline, - SchemaExternal, - ExternalResourceURI, - AuthenticationPolicyReference, - BasicAuthenticationPolicy, - ExplicitBasicAuthenticationPolicy, - SecretBasedAuthenticationPolicy, - BearerAuthenticationPolicy, - ExplicitBearerAuthenticationPolicy, - OAuth2AuthenticationPolicy, - ExplicitOAuth2AuthenticationPolicy, + AuthenticationPolicyBasic, + AuthenticationPolicyBearer, + AuthenticationPolicyOauth2, + AuthenticationPolicyOauth2Client, Oauth2Token, - WorkflowComponents, - WorkflowAuthentications, - WorkflowErrors, + Use, Error, - ExtensionItem, Extension, - TaskItem, - CallAsyncAPI, + TaskBase, + Output, + Export, + Timeout, + Duration, CallAsyncAPIWith, - CallGRPC, CallGRPCWith, CallGRPCWithService, CallGRPCWithArguments, - CallHTTP, CallHTTPWith, Endpoint, - CallHTTPWithHeaders, - CallHTTPWithBody, - CallOpenAPI, CallOpenAPIWith, CallOpenAPIWithParameters, - CallFunction, CallFunctionWith, - DoTask, - ForkTask, - Fork, - TaskBase, - Output, - Export, - Timeout, - Duration, - EmitTask, - Emit, - EmitEvent, - ForTask, - For, - ListenTask, - Listen, - AllEventConsumptionStrategy, + ForkTaskFork, + EmitTaskEmit, + EmitTaskEmitEvent, + ForTaskFor, + ListenTaskListen, EventFilter, - WithEvent, - Correlate, - AnyEventConsumptionStrategy, - OneEventConsumptionStrategy, - RaiseTask, - Raise, - RunTask, - RunContainer, - Container, - ContainerEnvironment, - RunScript, - ScriptInline, - ScriptExternal, - RunShell, - Shell, - ShellArguments, - ShellEnvironment, - RunWokflow, - RunWorkflowDescriptor, - WorkflowInput, - SetTask, - Set, - SwitchTask, - SwitchItem, - SwitchCase, - TryTask, - Catch, - CatchErrors, + EventFilterWith, + EventFilterCorrelate, + RaiseTaskRaise, + RunTaskRunContainer, + RunTaskRunShell, + RunTaskRunShellArguments, + RunTaskRunShellEnvironment, + RunTaskRunWorkflow, + RunTaskRunWorkflowInput, + SetTaskSet, + TryTaskCatch, RetryPolicy, - ConstantBackoff, - ExponentialBackOff, - LinearBackoff, RetryPolicyLimit, - RetryPolicyAttempt, + RetryPolicyLimitAttempt, RetryPolicyJitter, - WaitTask, - WorkflowFunctions, - WorkflowRetries, - WorkflowSchedule, + Schedule, }; diff --git a/src/lib/generated/classes/input-from.ts b/src/lib/generated/classes/input-from.ts deleted file mode 100644 index 883b5753..00000000 --- a/src/lib/generated/classes/input-from.ts +++ /dev/null @@ -1 +0,0 @@ -export class InputFrom {} diff --git a/src/lib/generated/classes/linear-backoff.ts b/src/lib/generated/classes/linear-backoff.ts deleted file mode 100644 index e521dc55..00000000 --- a/src/lib/generated/classes/linear-backoff.ts +++ /dev/null @@ -1 +0,0 @@ -export class LinearBackoff {} diff --git a/src/lib/generated/classes/listen-task-listen.ts b/src/lib/generated/classes/listen-task-listen.ts new file mode 100644 index 00000000..447b01e1 --- /dev/null +++ b/src/lib/generated/classes/listen-task-listen.ts @@ -0,0 +1 @@ +export class ListenTaskListen {} diff --git a/src/lib/generated/classes/listen.ts b/src/lib/generated/classes/listen.ts deleted file mode 100644 index aa7a5e73..00000000 --- a/src/lib/generated/classes/listen.ts +++ /dev/null @@ -1 +0,0 @@ -export class Listen {} diff --git a/src/lib/generated/classes/o-auth2-authentication-policy.ts b/src/lib/generated/classes/o-auth2-authentication-policy.ts deleted file mode 100644 index b7c6e415..00000000 --- a/src/lib/generated/classes/o-auth2-authentication-policy.ts +++ /dev/null @@ -1 +0,0 @@ -export class OAuth2AuthenticationPolicy {} diff --git a/src/lib/generated/classes/one-event-consumption-strategy.ts b/src/lib/generated/classes/one-event-consumption-strategy.ts deleted file mode 100644 index fe26d261..00000000 --- a/src/lib/generated/classes/one-event-consumption-strategy.ts +++ /dev/null @@ -1 +0,0 @@ -export class OneEventConsumptionStrategy {} diff --git a/src/lib/generated/classes/output-as.ts b/src/lib/generated/classes/output-as.ts deleted file mode 100644 index 53be7419..00000000 --- a/src/lib/generated/classes/output-as.ts +++ /dev/null @@ -1 +0,0 @@ -export class OutputAs {} diff --git a/src/lib/generated/classes/raise-task-raise.ts b/src/lib/generated/classes/raise-task-raise.ts new file mode 100644 index 00000000..91aec89b --- /dev/null +++ b/src/lib/generated/classes/raise-task-raise.ts @@ -0,0 +1 @@ +export class RaiseTaskRaise {} diff --git a/src/lib/generated/classes/raise.ts b/src/lib/generated/classes/raise.ts deleted file mode 100644 index 85e3f6f1..00000000 --- a/src/lib/generated/classes/raise.ts +++ /dev/null @@ -1 +0,0 @@ -export class Raise {} diff --git a/src/lib/generated/classes/referenceable-authentication-policy.ts b/src/lib/generated/classes/referenceable-authentication-policy.ts deleted file mode 100644 index 9062d89b..00000000 --- a/src/lib/generated/classes/referenceable-authentication-policy.ts +++ /dev/null @@ -1 +0,0 @@ -export class ReferenceableAuthenticationPolicy {} diff --git a/src/lib/generated/classes/referenced-authentication-policy.ts b/src/lib/generated/classes/referenced-authentication-policy.ts deleted file mode 100644 index 58a7cbf6..00000000 --- a/src/lib/generated/classes/referenced-authentication-policy.ts +++ /dev/null @@ -1 +0,0 @@ -export class ReferencedAuthenticationPolicy {} diff --git a/src/lib/generated/classes/retry-policy-attempt.ts b/src/lib/generated/classes/retry-policy-attempt.ts deleted file mode 100644 index a220ad67..00000000 --- a/src/lib/generated/classes/retry-policy-attempt.ts +++ /dev/null @@ -1 +0,0 @@ -export class RetryPolicyAttempt {} diff --git a/src/lib/generated/classes/retry-policy-limit-attempt.ts b/src/lib/generated/classes/retry-policy-limit-attempt.ts new file mode 100644 index 00000000..cbaf287d --- /dev/null +++ b/src/lib/generated/classes/retry-policy-limit-attempt.ts @@ -0,0 +1 @@ +export class RetryPolicyLimitAttempt {} diff --git a/src/lib/generated/classes/run-container.ts b/src/lib/generated/classes/run-container.ts deleted file mode 100644 index 7ac3f465..00000000 --- a/src/lib/generated/classes/run-container.ts +++ /dev/null @@ -1 +0,0 @@ -export class RunContainer {} diff --git a/src/lib/generated/classes/run-script.ts b/src/lib/generated/classes/run-script.ts deleted file mode 100644 index 8689c81d..00000000 --- a/src/lib/generated/classes/run-script.ts +++ /dev/null @@ -1 +0,0 @@ -export class RunScript {} diff --git a/src/lib/generated/classes/run-shell.ts b/src/lib/generated/classes/run-shell.ts deleted file mode 100644 index bc8aac57..00000000 --- a/src/lib/generated/classes/run-shell.ts +++ /dev/null @@ -1 +0,0 @@ -export class RunShell {} diff --git a/src/lib/generated/classes/run-task-run-container.ts b/src/lib/generated/classes/run-task-run-container.ts new file mode 100644 index 00000000..405b2760 --- /dev/null +++ b/src/lib/generated/classes/run-task-run-container.ts @@ -0,0 +1 @@ +export class RunTaskRunContainer {} diff --git a/src/lib/generated/classes/run-task-run-script.ts b/src/lib/generated/classes/run-task-run-script.ts new file mode 100644 index 00000000..da4068d5 --- /dev/null +++ b/src/lib/generated/classes/run-task-run-script.ts @@ -0,0 +1 @@ +export class RunTaskRunScript {} diff --git a/src/lib/generated/classes/run-task-run-shell-arguments.ts b/src/lib/generated/classes/run-task-run-shell-arguments.ts new file mode 100644 index 00000000..8a3ecb5d --- /dev/null +++ b/src/lib/generated/classes/run-task-run-shell-arguments.ts @@ -0,0 +1 @@ +export class RunTaskRunShellArguments {} diff --git a/src/lib/generated/classes/run-task-run-shell-environment.ts b/src/lib/generated/classes/run-task-run-shell-environment.ts new file mode 100644 index 00000000..95d45141 --- /dev/null +++ b/src/lib/generated/classes/run-task-run-shell-environment.ts @@ -0,0 +1 @@ +export class RunTaskRunShellEnvironment {} diff --git a/src/lib/generated/classes/run-task-run-shell.ts b/src/lib/generated/classes/run-task-run-shell.ts new file mode 100644 index 00000000..4c9ce0be --- /dev/null +++ b/src/lib/generated/classes/run-task-run-shell.ts @@ -0,0 +1 @@ +export class RunTaskRunShell {} diff --git a/src/lib/generated/classes/run-task-run-workflow-input.ts b/src/lib/generated/classes/run-task-run-workflow-input.ts new file mode 100644 index 00000000..66fb5875 --- /dev/null +++ b/src/lib/generated/classes/run-task-run-workflow-input.ts @@ -0,0 +1 @@ +export class RunTaskRunWorkflowInput {} diff --git a/src/lib/generated/classes/run-task-run-workflow.ts b/src/lib/generated/classes/run-task-run-workflow.ts new file mode 100644 index 00000000..e18f88f5 --- /dev/null +++ b/src/lib/generated/classes/run-task-run-workflow.ts @@ -0,0 +1 @@ +export class RunTaskRunWorkflow {} diff --git a/src/lib/generated/classes/run-task-run.ts b/src/lib/generated/classes/run-task-run.ts new file mode 100644 index 00000000..a52a856e --- /dev/null +++ b/src/lib/generated/classes/run-task-run.ts @@ -0,0 +1 @@ +export class RunTaskRun {} diff --git a/src/lib/generated/classes/run-wokflow.ts b/src/lib/generated/classes/run-wokflow.ts deleted file mode 100644 index 276eb0f6..00000000 --- a/src/lib/generated/classes/run-wokflow.ts +++ /dev/null @@ -1 +0,0 @@ -export class RunWokflow {} diff --git a/src/lib/generated/classes/run-workflow-descriptor.ts b/src/lib/generated/classes/run-workflow-descriptor.ts deleted file mode 100644 index aa7eb54e..00000000 --- a/src/lib/generated/classes/run-workflow-descriptor.ts +++ /dev/null @@ -1 +0,0 @@ -export class RunWorkflowDescriptor {} diff --git a/src/lib/generated/classes/run.ts b/src/lib/generated/classes/run.ts deleted file mode 100644 index 3502860d..00000000 --- a/src/lib/generated/classes/run.ts +++ /dev/null @@ -1 +0,0 @@ -export class Run {} diff --git a/src/lib/generated/classes/schedule.ts b/src/lib/generated/classes/schedule.ts new file mode 100644 index 00000000..0c62c9a8 --- /dev/null +++ b/src/lib/generated/classes/schedule.ts @@ -0,0 +1 @@ +export class Schedule {} diff --git a/src/lib/generated/classes/schema-external.ts b/src/lib/generated/classes/schema-external.ts deleted file mode 100644 index 78e06250..00000000 --- a/src/lib/generated/classes/schema-external.ts +++ /dev/null @@ -1 +0,0 @@ -export class SchemaExternal {} diff --git a/src/lib/generated/classes/schema-inline.ts b/src/lib/generated/classes/schema-inline.ts deleted file mode 100644 index 16c3a61e..00000000 --- a/src/lib/generated/classes/schema-inline.ts +++ /dev/null @@ -1 +0,0 @@ -export class SchemaInline {} diff --git a/src/lib/generated/classes/script-external.ts b/src/lib/generated/classes/script-external.ts deleted file mode 100644 index 0a8bfe0c..00000000 --- a/src/lib/generated/classes/script-external.ts +++ /dev/null @@ -1 +0,0 @@ -export class ScriptExternal {} diff --git a/src/lib/generated/classes/script-inline.ts b/src/lib/generated/classes/script-inline.ts deleted file mode 100644 index f47895c6..00000000 --- a/src/lib/generated/classes/script-inline.ts +++ /dev/null @@ -1 +0,0 @@ -export class ScriptInline {} diff --git a/src/lib/generated/classes/script.ts b/src/lib/generated/classes/script.ts deleted file mode 100644 index 04e5d324..00000000 --- a/src/lib/generated/classes/script.ts +++ /dev/null @@ -1 +0,0 @@ -export class Script {} diff --git a/src/lib/generated/classes/secret-based-authentication-policy.ts b/src/lib/generated/classes/secret-based-authentication-policy.ts deleted file mode 100644 index f1dd1f4c..00000000 --- a/src/lib/generated/classes/secret-based-authentication-policy.ts +++ /dev/null @@ -1 +0,0 @@ -export class SecretBasedAuthenticationPolicy {} diff --git a/src/lib/generated/classes/set-task-set.ts b/src/lib/generated/classes/set-task-set.ts new file mode 100644 index 00000000..0ce85843 --- /dev/null +++ b/src/lib/generated/classes/set-task-set.ts @@ -0,0 +1 @@ +export class SetTaskSet {} diff --git a/src/lib/generated/classes/set.ts b/src/lib/generated/classes/set.ts deleted file mode 100644 index e19548c2..00000000 --- a/src/lib/generated/classes/set.ts +++ /dev/null @@ -1 +0,0 @@ -export class Set {} diff --git a/src/lib/generated/classes/shell-arguments.ts b/src/lib/generated/classes/shell-arguments.ts deleted file mode 100644 index d6dff538..00000000 --- a/src/lib/generated/classes/shell-arguments.ts +++ /dev/null @@ -1 +0,0 @@ -export class ShellArguments {} diff --git a/src/lib/generated/classes/shell-environment.ts b/src/lib/generated/classes/shell-environment.ts deleted file mode 100644 index fe3b7abc..00000000 --- a/src/lib/generated/classes/shell-environment.ts +++ /dev/null @@ -1 +0,0 @@ -export class ShellEnvironment {} diff --git a/src/lib/generated/classes/shell.ts b/src/lib/generated/classes/shell.ts deleted file mode 100644 index ed8abcfa..00000000 --- a/src/lib/generated/classes/shell.ts +++ /dev/null @@ -1 +0,0 @@ -export class Shell {} diff --git a/src/lib/generated/classes/switch-case.ts b/src/lib/generated/classes/switch-case.ts deleted file mode 100644 index 8632cc2e..00000000 --- a/src/lib/generated/classes/switch-case.ts +++ /dev/null @@ -1 +0,0 @@ -export class SwitchCase {} diff --git a/src/lib/generated/classes/switch-item.ts b/src/lib/generated/classes/switch-item.ts deleted file mode 100644 index 26edf934..00000000 --- a/src/lib/generated/classes/switch-item.ts +++ /dev/null @@ -1 +0,0 @@ -export class SwitchItem {} diff --git a/src/lib/generated/classes/switch-task-switch.ts b/src/lib/generated/classes/switch-task-switch.ts new file mode 100644 index 00000000..33c026b0 --- /dev/null +++ b/src/lib/generated/classes/switch-task-switch.ts @@ -0,0 +1 @@ +export class SwitchTaskSwitch {} diff --git a/src/lib/generated/classes/switch.ts b/src/lib/generated/classes/switch.ts deleted file mode 100644 index 5026b0ad..00000000 --- a/src/lib/generated/classes/switch.ts +++ /dev/null @@ -1 +0,0 @@ -export class Switch {} diff --git a/src/lib/generated/classes/task-item.ts b/src/lib/generated/classes/task-item.ts deleted file mode 100644 index 4ae6d046..00000000 --- a/src/lib/generated/classes/task-item.ts +++ /dev/null @@ -1 +0,0 @@ -export class TaskItem {} diff --git a/src/lib/generated/classes/try-task-catch.ts b/src/lib/generated/classes/try-task-catch.ts new file mode 100644 index 00000000..a3472949 --- /dev/null +++ b/src/lib/generated/classes/try-task-catch.ts @@ -0,0 +1 @@ +export class TryTaskCatch {} diff --git a/src/lib/generated/classes/use-extensions.ts b/src/lib/generated/classes/use-extensions.ts new file mode 100644 index 00000000..d9d64c91 --- /dev/null +++ b/src/lib/generated/classes/use-extensions.ts @@ -0,0 +1 @@ +export class UseExtensions {} diff --git a/src/lib/generated/classes/use.ts b/src/lib/generated/classes/use.ts new file mode 100644 index 00000000..caa5664e --- /dev/null +++ b/src/lib/generated/classes/use.ts @@ -0,0 +1 @@ +export class Use {} diff --git a/src/lib/generated/classes/with-event.ts b/src/lib/generated/classes/with-event.ts deleted file mode 100644 index 2e818619..00000000 --- a/src/lib/generated/classes/with-event.ts +++ /dev/null @@ -1 +0,0 @@ -export class WithEvent {} diff --git a/src/lib/generated/classes/workflow-authentications.ts b/src/lib/generated/classes/workflow-authentications.ts deleted file mode 100644 index 01e7b53c..00000000 --- a/src/lib/generated/classes/workflow-authentications.ts +++ /dev/null @@ -1 +0,0 @@ -export class WorkflowAuthentications {} diff --git a/src/lib/generated/classes/workflow-components.ts b/src/lib/generated/classes/workflow-components.ts deleted file mode 100644 index 1e764c4d..00000000 --- a/src/lib/generated/classes/workflow-components.ts +++ /dev/null @@ -1 +0,0 @@ -export class WorkflowComponents {} diff --git a/src/lib/generated/classes/workflow-document.ts b/src/lib/generated/classes/workflow-document.ts deleted file mode 100644 index a96cda25..00000000 --- a/src/lib/generated/classes/workflow-document.ts +++ /dev/null @@ -1 +0,0 @@ -export class WorkflowDocument {} diff --git a/src/lib/generated/classes/workflow-errors.ts b/src/lib/generated/classes/workflow-errors.ts deleted file mode 100644 index 0ee33fca..00000000 --- a/src/lib/generated/classes/workflow-errors.ts +++ /dev/null @@ -1 +0,0 @@ -export class WorkflowErrors {} diff --git a/src/lib/generated/classes/workflow-extensions.ts b/src/lib/generated/classes/workflow-extensions.ts deleted file mode 100644 index 5c2ed721..00000000 --- a/src/lib/generated/classes/workflow-extensions.ts +++ /dev/null @@ -1 +0,0 @@ -export class WorkflowExtensions {} diff --git a/src/lib/generated/classes/workflow-functions.ts b/src/lib/generated/classes/workflow-functions.ts deleted file mode 100644 index a2b77e30..00000000 --- a/src/lib/generated/classes/workflow-functions.ts +++ /dev/null @@ -1 +0,0 @@ -export class WorkflowFunctions {} diff --git a/src/lib/generated/classes/workflow-input.ts b/src/lib/generated/classes/workflow-input.ts deleted file mode 100644 index 1f43177d..00000000 --- a/src/lib/generated/classes/workflow-input.ts +++ /dev/null @@ -1 +0,0 @@ -export class WorkflowInput {} diff --git a/src/lib/generated/classes/workflow-retries.ts b/src/lib/generated/classes/workflow-retries.ts deleted file mode 100644 index bbfa0875..00000000 --- a/src/lib/generated/classes/workflow-retries.ts +++ /dev/null @@ -1 +0,0 @@ -export class WorkflowRetries {} diff --git a/src/lib/generated/classes/workflow-schedule.ts b/src/lib/generated/classes/workflow-schedule.ts deleted file mode 100644 index d32b382a..00000000 --- a/src/lib/generated/classes/workflow-schedule.ts +++ /dev/null @@ -1 +0,0 @@ -export class WorkflowSchedule {} diff --git a/src/lib/generated/classes/workflow-secrets.ts b/src/lib/generated/classes/workflow-secrets.ts deleted file mode 100644 index 5c0c45b5..00000000 --- a/src/lib/generated/classes/workflow-secrets.ts +++ /dev/null @@ -1 +0,0 @@ -export class WorkflowSecrets {} diff --git a/src/lib/generated/classes/workflow-tags.ts b/src/lib/generated/classes/workflow-tags.ts deleted file mode 100644 index ede72da3..00000000 --- a/src/lib/generated/classes/workflow-tags.ts +++ /dev/null @@ -1 +0,0 @@ -export class WorkflowTags {} diff --git a/src/lib/generated/definitions/specification.ts b/src/lib/generated/definitions/specification.ts index 931cacf4..92078bb6 100644 --- a/src/lib/generated/definitions/specification.ts +++ b/src/lib/generated/definitions/specification.ts @@ -23,31 +23,54 @@ /** * Represents the definition of a schema. */ -export type Schema = SchemaInline | SchemaExternal; -export type ExternalResource = string | ExternalResourceURI; -export type ReferenceableAuthenticationPolicy = AuthenticationPolicyReference | ReferencedAuthenticationPolicy; -/** - * Defines an authentication policy. - */ -export type ReferencedAuthenticationPolicy = - | BasicAuthenticationPolicy - | BearerAuthenticationPolicy - | OAuth2AuthenticationPolicy; -/** - * A runtime expression, if any, used to mutate and/or filter the input of the workflow or task. - */ -export type InputFrom = +export type Schema = + | { + /** + * The schema's inline definition. + */ + document: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + | { + resource: ExternalResource; + [k: string]: unknown; + }; +export type ExternalResource = | string | { + /** + * The endpoint's URI. + */ + uri: string; + authentication?: ExternalResourceAuthentication; + /** + * The external resource's name, if any. + */ + name?: string; [k: string]: unknown; }; /** - * Defines an authentication policy. + * The authentication policy to use. */ -export type AuthenticationPolicy = BasicAuthenticationPolicy | BearerAuthenticationPolicy | OAuth2AuthenticationPolicy; +export type ExternalResourceAuthentication = AuthenticationPolicy | string; /** - * Defines all possible tasks + * Defines an authentication policy. */ +export type AuthenticationPolicy = + | { + basic: AuthenticationPolicyBasic; + [k: string]: unknown; + } + | { + bearer: AuthenticationPolicyBearer; + [k: string]: unknown; + } + | { + oauth2: AuthenticationPolicyOauth2; + [k: string]: unknown; + }; export type Task = | CallTask | DoTask @@ -61,36 +84,109 @@ export type Task = | SwitchTask | TryTask | WaitTask; +export type CallTask = CallAsyncAPI | CallGRPC | CallHTTP | CallOpenAPI | CallFunction; +export type CallAsyncAPI = TaskBase & { + call?: 'asyncapi'; + with?: CallAsyncAPIWith; + [k: string]: unknown; +}; +export type FlowDirective = ('continue' | 'exit' | 'end') | string; /** - * Enables the execution of a specified function within a workflow, allowing seamless integration with custom business logic or external services + * The authentication policy, if any, to use when calling the AsyncAPI operation. */ -export type CallTask = CallAsyncAPI | CallGRPC | CallHTTP | CallOpenAPI | CallFunction; +export type CallAsyncAPIWithAuthentication = AuthenticationPolicy | string; +export type CallGRPC = TaskBase & { + call?: 'grpc'; + with?: CallGRPCWith; + [k: string]: unknown; +}; +/** + * The endpoint's authentication policy, if any. + */ +export type CallGRPCWithServiceAuthentication = AuthenticationPolicy | string; +export type CallHTTP = TaskBase & { + call?: 'http'; + with?: CallHTTPWith; + [k: string]: unknown; +}; /** * The HTTP endpoint to send the request to. */ export type CallHTTPWithEndpoint = Endpoint | string; /** - * A runtime expression, if any, used to mutate and/or filter the output of the workflow or task. + * The authentication policy to use. */ -export type OutputAs = - | string - | { - [k: string]: unknown; - }; +export type EndpointAuthentication = AuthenticationPolicy | string; +export type CallOpenAPI = TaskBase & { + call?: 'openapi'; + with?: CallOpenAPIWith; + [k: string]: unknown; +}; /** - * A runtime expression, if any, used to export the output data to the context. + * The authentication policy, if any, to use when calling the OpenAPI operation. */ -export type ExportAs = - | string +export type CallOpenAPIWithAuthentication = AuthenticationPolicy | string; +export type CallFunction = TaskBase & { + /** + * The name of the function to call. + */ + call?: string; + with?: CallFunctionWith; + [k: string]: unknown; +}; +/** + * Allows to execute a list of tasks in sequence + */ +export type DoTask = TaskBase & { + do?: TaskList; + [k: string]: unknown; +}; +/** + * Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output. + */ +export type ForkTask = TaskBase & { + fork?: ForkTaskFork; + [k: string]: unknown; +}; +/** + * Allows workflows to publish events to event brokers or messaging systems, facilitating communication and coordination between different components and services. + */ +export type EmitTask = TaskBase & { + emit?: EmitTaskEmit; + [k: string]: unknown; +}; +/** + * Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets. + */ +export type ForTask = TaskBase & { + for?: ForTaskFor; + /** + * A runtime expression that represents the condition, if any, that must be met for the iteration to continue. + */ + while?: string; + do?: TaskList; + [k: string]: unknown; +}; +/** + * Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems. + */ +export type ListenTask = TaskBase & { + listen?: ListenTaskListen; + [k: string]: unknown; +}; +export type EventConsumptionStrategy = + | { + all: EventConsumptionStrategyAll; + [k: string]: unknown; + } | { + any: EventConsumptionStrategyAny; + [k: string]: unknown; + } + | { + one: EventFilter; [k: string]: unknown; }; -export type FlowDirective = FlowDirectiveEnum | string; -export type FlowDirectiveEnum = 'continue' | 'exit' | 'end'; -export type EventConsumptionStrategy = - | AllEventConsumptionStrategy - | AnyEventConsumptionStrategy - | OneEventConsumptionStrategy; /** * A list containing all the events that must be consumed. */ @@ -99,46 +195,166 @@ export type EventConsumptionStrategyAll = EventFilter[]; * A list containing any of the events to consume. */ export type EventConsumptionStrategyAny = EventFilter[]; -export type Run = RunContainer | RunScript | RunShell | RunWokflow; -export type Script = ScriptInline | ScriptExternal; +/** + * Intentionally triggers and propagates errors. + */ +export type RaiseTask = TaskBase & { + raise?: RaiseTaskRaise; + [k: string]: unknown; +}; +/** + * Provides the capability to execute external containers, shell commands, scripts, or workflows. + */ +export type RunTask = TaskBase & { + run?: RunTaskRun; + [k: string]: unknown; +}; +export type RunTaskRun = + | { + container: RunTaskRunContainer; + [k: string]: unknown; + } + | { + script: RunTaskRunScript; + [k: string]: unknown; + } + | { + shell: RunTaskRunShell; + [k: string]: unknown; + } + | { + workflow: RunTaskRunWorkflow; + [k: string]: unknown; + }; +export type RunTaskRunScript = + | { + code: string; + [k: string]: unknown; + } + | { + source: ExternalResource; + [k: string]: unknown; + }; +/** + * A task used to set data + */ +export type SetTask = TaskBase & { + set?: SetTaskSet; + [k: string]: unknown; +}; +/** + * Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria + */ +export type SwitchTask = TaskBase & { + switch?: SwitchTaskSwitch; + [k: string]: unknown; +}; /** * @minItems 1 */ -export type Switch = [SwitchItem, ...SwitchItem[]]; +export type SwitchTaskSwitch = [ + { + [k: string]: { + /** + * The case's name. + */ + name?: string; + /** + * A runtime expression used to determine whether or not the case matches. + */ + when?: string; + then?: FlowDirective; + [k: string]: unknown; + }; + }, + ...{ + [k: string]: { + /** + * The case's name. + */ + name?: string; + /** + * A runtime expression used to determine whether or not the case matches. + */ + when?: string; + then?: FlowDirective; + [k: string]: unknown; + }; + }[], +]; /** - * The retry duration backoff. + * Serves as a mechanism within workflows to handle errors gracefully, potentially retrying failed tasks before proceeding with alternate ones. */ -export type RetryPolicyBackoff = ConstantBackoff | ExponentialBackOff | LinearBackoff; +export type TryTask = TaskBase & { + try?: TaskList; + catch?: TryTaskCatch; + [k: string]: unknown; +}; /** - * A name/value mapping of tasks + * The retry duration backoff. */ -export type TaskList = TaskItem[]; +export type RetryPolicyBackoff = + | { + /** + * The definition of the constant backoff to use, if any. + */ + constant: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + | { + /** + * The definition of the exponential backoff to use, if any. + */ + exponential: { + [k: string]: unknown; + }; + [k: string]: unknown; + } + | { + /** + * The definition of the linear backoff to use, if any. + */ + linear: { + [k: string]: unknown; + }; + [k: string]: unknown; + }; /** - * The workflow's extensions. + * Allows workflows to pause or delay their execution for a specified period of time. */ -export type WorkflowExtensions = ExtensionItem[]; +export type WaitTask = TaskBase & { + wait?: Duration; + [k: string]: unknown; +}; +export type TaskList = { + [k: string]: Task; +}[]; /** - * The workflow's secrets. + * The workflow's extensions. */ -export type WorkflowSecrets = string[]; +export type UseExtensions = { + [k: string]: Extension; +}[]; /** * Serverless Workflow DSL - Workflow Schema */ export interface Workflow { - document: WorkflowDocument; + document: Document; input?: Input; - use?: WorkflowComponents; + use?: Use; do: TaskList; timeout?: Timeout; output?: Output; - schedule?: WorkflowSchedule; + schedule?: Schedule; [k: string]: unknown; } /** * Documents the workflow */ -export interface WorkflowDocument { +export interface Document { /** * The version of the DSL used by the workflow. */ @@ -163,13 +379,13 @@ export interface WorkflowDocument { * The workflow's Markdown summary. */ summary?: string; - tags?: WorkflowTags; + tags?: DocumentTags; [k: string]: unknown; } /** * A key/value mapping of the workflow's tags, if any. */ -export interface WorkflowTags { +export interface DocumentTags { [k: string]: unknown; } /** @@ -177,49 +393,13 @@ export interface WorkflowTags { */ export interface Input { schema?: Schema; - from?: InputFrom; - [k: string]: unknown; -} -export interface SchemaInline { - /** - * The schema's inline definition. - */ - document: { - [k: string]: unknown; - }; - [k: string]: unknown; -} -export interface SchemaExternal { - resource: ExternalResource; - [k: string]: unknown; -} -export interface ExternalResourceURI { - /** - * The endpoint's URI. - */ - uri: string; - authentication?: ReferenceableAuthenticationPolicy; /** - * The external resource's name, if any. + * A runtime expression, if any, used to mutate and/or filter the input of the workflow or task. */ - name?: string; + from?: string; [k: string]: unknown; } -export interface AuthenticationPolicyReference { - /** - * The name of the authentication policy to use - */ - use: string; - [k: string]: unknown; -} -/** - * Use basic authentication. - */ -export interface BasicAuthenticationPolicy { - basic: ExplicitBasicAuthenticationPolicy | SecretBasedAuthenticationPolicy; - [k: string]: unknown; -} -export interface ExplicitBasicAuthenticationPolicy { +export interface AuthenticationPolicyBasic { /** * The username to use. */ @@ -230,35 +410,14 @@ export interface ExplicitBasicAuthenticationPolicy { password: string; [k: string]: unknown; } -export interface SecretBasedAuthenticationPolicy { - /** - * The name of the authentication policy to use - */ - use: string; - [k: string]: unknown; -} -/** - * Use bearer authentication. - */ -export interface BearerAuthenticationPolicy { - bearer: ExplicitBearerAuthenticationPolicy | SecretBasedAuthenticationPolicy; - [k: string]: unknown; -} -export interface ExplicitBearerAuthenticationPolicy { +export interface AuthenticationPolicyBearer { /** * The bearer token to use. */ token: string; [k: string]: unknown; } -/** - * Use OAUTH2 authentication. - */ -export interface OAuth2AuthenticationPolicy { - oauth2: ExplicitOAuth2AuthenticationPolicy | SecretBasedAuthenticationPolicy; - [k: string]: unknown; -} -export interface ExplicitOAuth2AuthenticationPolicy { +export interface AuthenticationPolicyOauth2 { /** * The URI that references the OAuth2 authority to use. */ @@ -267,17 +426,7 @@ export interface ExplicitOAuth2AuthenticationPolicy { * The grant type to use. */ grant: string; - client: { - /** - * The client id to use. - */ - id: string; - /** - * The client secret to use, if any. - */ - secret?: string; - [k: string]: unknown; - }; + client: AuthenticationPolicyOauth2Client; /** * The scopes, if any, to request the token for. */ @@ -298,6 +447,17 @@ export interface ExplicitOAuth2AuthenticationPolicy { actor?: Oauth2Token; [k: string]: unknown; } +export interface AuthenticationPolicyOauth2Client { + /** + * The client id to use. + */ + id: string; + /** + * The client secret to use, if any. + */ + secret?: string; + [k: string]: unknown; +} export interface Oauth2Token { /** * The security token to use to use. @@ -312,27 +472,18 @@ export interface Oauth2Token { /** * Defines the workflow's reusable components. */ -export interface WorkflowComponents { - authentications?: WorkflowAuthentications; - errors?: WorkflowErrors; - extensions?: WorkflowExtensions; - functions?: WorkflowFunctions; - retries?: WorkflowRetries; - secrets?: WorkflowSecrets; +export interface Use { + authentications?: AuthenticationPolicy; + errors?: Error; + extensions?: UseExtensions; + functions?: Task; + retries?: RetryPolicy; + /** + * The workflow's secrets. + */ + secrets?: string[]; [k: string]: unknown; } -/** - * The workflow's reusable authentication policies. - */ -export interface WorkflowAuthentications { - [k: string]: AuthenticationPolicy; -} -/** - * The workflow's reusable errors. - */ -export interface WorkflowErrors { - [k: string]: Error; -} export interface Error { /** * A URI reference that identifies the error type. @@ -356,9 +507,6 @@ export interface Error { detail?: string; [k: string]: unknown; } -export interface ExtensionItem { - [k: string]: Extension; -} /** * The definition of a an extension. */ @@ -387,15 +535,71 @@ export interface Extension { after?: TaskList; [k: string]: unknown; } -export interface TaskItem { - [k: string]: Task; +export interface TaskBase { + /** + * A runtime expression, if any, used to determine whether or not the task should be run. + */ + if?: string; + input?: Input; + output?: Output; + export?: Export; + timeout?: Timeout; + then?: FlowDirective; + [k: string]: unknown; +} +/** + * Configures the output of a workflow or task. + */ +export interface Output { + schema?: Schema; + /** + * A runtime expression, if any, used to mutate and/or filter the output of the workflow or task. + */ + as?: string; + [k: string]: unknown; +} +/** + * Set the content of the context. + */ +export interface Export { + schema?: Schema; + /** + * A runtime expression, if any, used to export the output data to the context. + */ + as?: string; + [k: string]: unknown; } /** - * Enables workflows to interact with external services described by AsyncAPI. + * The definition of a timeout. */ -export interface CallAsyncAPI { - call: 'asyncapi'; - with: CallAsyncAPIWith; +export interface Timeout { + after: Duration; + [k: string]: unknown; +} +/** + * The definition of a duration. + */ +export interface Duration { + /** + * Number of days, if any. + */ + days?: number; + /** + * Number of days, if any. + */ + hours?: number; + /** + * Number of minutes, if any. + */ + minutes?: number; + /** + * Number of seconds, if any. + */ + seconds?: number; + /** + * Number of milliseconds, if any. + */ + milliseconds?: number; [k: string]: unknown; } /** @@ -425,15 +629,7 @@ export interface CallAsyncAPIWith { payload?: { [k: string]: unknown; }; - authentication?: ReferenceableAuthenticationPolicy; -} -/** - * The base definition shared by all tasks - */ -export interface CallGRPC { - call: 'grpc'; - with: CallGRPCWith; - [k: string]: unknown; + authentication?: CallAsyncAPIWithAuthentication; } /** * Defines the GRPC call to perform. @@ -460,7 +656,7 @@ export interface CallGRPCWithService { * The port number of the GRPC service to call. */ port?: number; - authentication?: ReferenceableAuthenticationPolicy; + authentication?: CallGRPCWithServiceAuthentication; [k: string]: unknown; } /** @@ -469,14 +665,6 @@ export interface CallGRPCWithService { export interface CallGRPCWithArguments { [k: string]: unknown; } -/** - * The base definition shared by all tasks - */ -export interface CallHTTP { - call: 'http'; - with: CallHTTPWith; - [k: string]: unknown; -} /** * Defines the HTTP call to perform. */ @@ -486,8 +674,18 @@ export interface CallHTTPWith { */ method: string; endpoint: CallHTTPWithEndpoint; - headers?: CallHTTPWithHeaders; - body?: CallHTTPWithBody; + /** + * A name/value mapping of the headers, if any, of the HTTP request to perform. + */ + headers?: { + [k: string]: unknown; + }; + /** + * The body, if any, of the HTTP request to perform. + */ + body?: { + [k: string]: unknown; + }; /** * The http call output format. Defaults to 'content'. */ @@ -498,27 +696,7 @@ export interface Endpoint { * The endpoint's URI. */ uri: string; - authentication?: ReferenceableAuthenticationPolicy; - [k: string]: unknown; -} -/** - * A name/value mapping of the headers, if any, of the HTTP request to perform. - */ -export interface CallHTTPWithHeaders { - [k: string]: unknown; -} -/** - * The body, if any, of the HTTP request to perform. - */ -export interface CallHTTPWithBody { - [k: string]: unknown; -} -/** - * The base definition shared by all tasks - */ -export interface CallOpenAPI { - call: 'openapi'; - with: CallOpenAPIWith; + authentication?: EndpointAuthentication; [k: string]: unknown; } /** @@ -531,7 +709,7 @@ export interface CallOpenAPIWith { */ operationId: string; parameters?: CallOpenAPIWithParameters; - authentication?: ReferenceableAuthenticationPolicy; + authentication?: CallOpenAPIWithAuthentication; /** * The http call output format. Defaults to 'content'. */ @@ -543,38 +721,13 @@ export interface CallOpenAPIWith { export interface CallOpenAPIWithParameters { [k: string]: unknown; } -/** - * The base definition shared by all tasks - */ -export interface CallFunction { - /** - * The name of the function to call. - */ - call: string; - with?: CallFunctionWith; - [k: string]: unknown; -} /** * A name/value mapping of the parameters, if any, to call the function with. */ export interface CallFunctionWith { [k: string]: unknown; } -/** - * Allows to execute a list of tasks in sequence - */ -export interface DoTask { - do: TaskList; - [k: string]: unknown; -} -/** - * Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output. - */ -export interface ForkTask { - fork: Fork; - [k: string]: TaskBase; -} -export interface Fork { +export interface ForkTaskFork { branches: TaskList; /** * Indicates whether or not the concurrent tasks are racing against each other, with a single possible winner, which sets the composite task's output. @@ -582,82 +735,11 @@ export interface Fork { compete?: boolean; [k: string]: unknown; } -/** - * The base definition shared by all tasks - */ -export interface TaskBase { - /** - * A runtime expression, if any, used to determine whether or not the task should be run. - */ - if?: string; - input?: Input; - output?: Output; - export?: Export; - timeout?: Timeout; - then?: FlowDirective; - [k: string]: unknown; -} -/** - * Configures the output of a workflow or task. - */ -export interface Output { - schema?: Schema; - as?: OutputAs; - [k: string]: unknown; -} -/** - * Set the content of the context. - */ -export interface Export { - schema?: Schema; - as?: ExportAs; - [k: string]: unknown; -} -/** - * The definition of a timeout. - */ -export interface Timeout { - after: Duration; - [k: string]: unknown; -} -/** - * The definition of a duration. - */ -export interface Duration { - /** - * Number of days, if any. - */ - days?: number; - /** - * Number of days, if any. - */ - hours?: number; - /** - * Number of minutes, if any. - */ - minutes?: number; - /** - * Number of seconds, if any. - */ - seconds?: number; - /** - * Number of milliseconds, if any. - */ - milliseconds?: number; - [k: string]: unknown; -} -/** - * Allows workflows to publish events to event brokers or messaging systems, facilitating communication and coordination between different components and services. - */ -export interface EmitTask { - emit: Emit; +export interface EmitTaskEmit { + event: EmitTaskEmitEvent; [k: string]: unknown; } -export interface Emit { - event: EmitEvent; - [k: string]: unknown; -} -export interface EmitEvent { +export interface EmitTaskEmitEvent { /** * The event's unique identifier */ @@ -679,19 +761,7 @@ export interface EmitEvent { dataschema?: string; [k: string]: unknown; } -/** - * Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets. - */ -export interface ForTask { - for: For; - /** - * A runtime expression that represents the condition, if any, that must be met for the iteration to continue. - */ - while?: string; - do: TaskList; - [k: string]: unknown; -} -export interface For { +export interface ForTaskFor { /** * The name of the variable used to store the current item being enumerated. */ @@ -706,33 +776,22 @@ export interface For { at?: string; [k: string]: unknown; } -/** - * Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems. - */ -export interface ListenTask { - listen: Listen; - [k: string]: unknown; -} -export interface Listen { +export interface ListenTaskListen { to: EventConsumptionStrategy; [k: string]: unknown; } -export interface AllEventConsumptionStrategy { - all: EventConsumptionStrategyAll; - [k: string]: unknown; -} /** * An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes. */ export interface EventFilter { - with: WithEvent; - correlate?: Correlate; + with: EventFilterWith; + correlate?: EventFilterCorrelate; [k: string]: unknown; } /** * An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes. */ -export interface WithEvent { +export interface EventFilterWith { /** * The event's unique identifier */ @@ -757,7 +816,7 @@ export interface WithEvent { /** * A correlation is a link between events and data, established by mapping event attributes to specific data attributes, allowing for coordinated processing or handling based on event characteristics. */ -export interface Correlate { +export interface EventFilterCorrelate { [k: string]: { /** * A runtime expression used to extract the correlation value from the filtered event. @@ -770,40 +829,11 @@ export interface Correlate { [k: string]: unknown; }; } -export interface AnyEventConsumptionStrategy { - any: EventConsumptionStrategyAny; - [k: string]: unknown; -} -export interface OneEventConsumptionStrategy { - one: EventFilter; - [k: string]: unknown; -} -/** - * Intentionally triggers and propagates errors. - */ -export interface RaiseTask { - raise: Raise; - [k: string]: unknown; -} -export interface Raise { +export interface RaiseTaskRaise { error: Error; [k: string]: unknown; } -/** - * Provides the capability to execute external containers, shell commands, scripts, or workflows. - */ -export interface RunTask { - run: Run; - [k: string]: unknown; -} -/** - * Enables the execution of external processes encapsulated within a containerized environment. - */ -export interface RunContainer { - container: Container; - [k: string]: unknown; -} -export interface Container { +export interface RunTaskRunContainer { /** * The name of the container image to run. */ @@ -824,72 +854,36 @@ export interface Container { volumes?: { [k: string]: unknown; }; - environment?: ContainerEnvironment; - [k: string]: unknown; -} -/** - * A key/value mapping of the environment variables, if any, to use when running the configured process. - */ -export interface ContainerEnvironment { - [k: string]: unknown; -} -/** - * Enables the execution of custom scripts or code within a workflow, empowering workflows to perform specialized logic, data processing, or integration tasks by executing user-defined scripts written in various programming languages. - */ -export interface RunScript { - script: Script; - [k: string]: unknown; -} -/** - * The script's code. - */ -export interface ScriptInline { - code: string; - [k: string]: unknown; -} -/** - * The script's resource. - */ -export interface ScriptExternal { - source: ExternalResource; - [k: string]: unknown; -} -/** - * Enables the execution of shell commands within a workflow, enabling workflows to interact with the underlying operating system and perform system-level operations, such as file manipulation, environment configuration, or system administration tasks. - */ -export interface RunShell { - shell: Shell; + /** + * A key/value mapping of the environment variables, if any, to use when running the configured process. + */ + environment?: { + [k: string]: unknown; + }; [k: string]: unknown; } -export interface Shell { +export interface RunTaskRunShell { /** * The shell command to run. */ command: string; - arguments?: ShellArguments; - environment?: ShellEnvironment; + arguments?: RunTaskRunShellArguments; + environment?: RunTaskRunShellEnvironment; [k: string]: unknown; } /** * A list of the arguments of the shell command to run. */ -export interface ShellArguments { +export interface RunTaskRunShellArguments { [k: string]: unknown; } /** * A key/value mapping of the environment variables, if any, to use when running the configured process. */ -export interface ShellEnvironment { +export interface RunTaskRunShellEnvironment { [k: string]: unknown; } -/** - * Enables the invocation and execution of nested workflows within a parent workflow, facilitating modularization, reusability, and abstraction of complex logic or business processes by encapsulating them into standalone workflow units. - */ -export interface RunWokflow { - workflow: RunWorkflowDescriptor; - [k: string]: unknown; -} -export interface RunWorkflowDescriptor { +export interface RunTaskRunWorkflow { /** * The namespace the workflow to run belongs to. */ @@ -902,56 +896,25 @@ export interface RunWorkflowDescriptor { * The version of the workflow to run. Defaults to latest */ version: string; - input?: WorkflowInput; + input?: RunTaskRunWorkflowInput; [k: string]: unknown; } /** * The data, if any, to pass as input to the workflow to execute. The value should be validated against the target workflow's input schema, if specified. */ -export interface WorkflowInput { - [k: string]: unknown; -} -/** - * A task used to set data - */ -export interface SetTask { - set: Set; +export interface RunTaskRunWorkflowInput { [k: string]: unknown; } /** * The data to set */ -export interface Set { +export interface SetTaskSet { [k: string]: unknown; } -/** - * Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria - */ -export interface SwitchTask { - switch: Switch; - [k: string]: unknown; -} -export interface SwitchItem { - [k: string]: SwitchCase; -} -export interface SwitchCase { - /** - * A runtime expression used to determine whether or not the case matches. - */ - when?: string; - then: FlowDirective; - [k: string]: unknown; -} -/** - * Serves as a mechanism within workflows to handle errors gracefully, potentially retrying failed tasks before proceeding with alternate ones. - */ -export interface TryTask { - try: TaskList; - catch: Catch; - [k: string]: unknown; -} -export interface Catch { - errors?: CatchErrors; +export interface TryTaskCatch { + errors?: { + [k: string]: unknown; + }; /** * The name of the runtime expression variable to save the error as. Defaults to 'error'. */ @@ -968,9 +931,6 @@ export interface Catch { do?: TaskList; [k: string]: unknown; } -export interface CatchErrors { - [k: string]: unknown; -} /** * Defines a retry policy. */ @@ -989,42 +949,15 @@ export interface RetryPolicy { jitter?: RetryPolicyJitter; [k: string]: unknown; } -export interface ConstantBackoff { - /** - * The definition of the constant backoff to use, if any. - */ - constant: { - [k: string]: unknown; - }; - [k: string]: unknown; -} -export interface ExponentialBackOff { - /** - * The definition of the exponential backoff to use, if any. - */ - exponential: { - [k: string]: unknown; - }; - [k: string]: unknown; -} -export interface LinearBackoff { - /** - * The definition of the linear backoff to use, if any. - */ - linear: { - [k: string]: unknown; - }; - [k: string]: unknown; -} /** * The retry limit, if any */ export interface RetryPolicyLimit { - attempt?: RetryPolicyAttempt; + attempt?: RetryPolicyLimitAttempt; duration?: Duration; [k: string]: unknown; } -export interface RetryPolicyAttempt { +export interface RetryPolicyLimitAttempt { /** * The maximum amount of retry attempts, if any. */ @@ -1040,29 +973,10 @@ export interface RetryPolicyJitter { to: Duration; [k: string]: unknown; } -/** - * Allows workflows to pause or delay their execution for a specified period of time. - */ -export interface WaitTask { - wait: Duration; - [k: string]: unknown; -} -/** - * The workflow's reusable functions. - */ -export interface WorkflowFunctions { - [k: string]: Task; -} -/** - * The workflow's reusable retry policies. - */ -export interface WorkflowRetries { - [k: string]: RetryPolicy; -} /** * Schedules the workflow */ -export interface WorkflowSchedule { +export interface Schedule { every?: Duration; /** * Specifies the schedule using a cron expression, e.g., '0 0 * * *' for daily at midnight." diff --git a/src/lib/generated/schema/__internal_workflow.json b/src/lib/generated/schema/__internal_workflow.json new file mode 100644 index 00000000..c7de9beb --- /dev/null +++ b/src/lib/generated/schema/__internal_workflow.json @@ -0,0 +1,1763 @@ +{ + "$id": "https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "description": "Serverless Workflow DSL - Workflow Schema", + "type": "object", + "properties": { + "document": { + "type": "object", + "properties": { + "dsl": { + "type": "string", + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", + "description": "The version of the DSL used by the workflow." + }, + "namespace": { + "type": "string", + "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$", + "description": "The workflow's namespace." + }, + "name": { + "type": "string", + "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$", + "description": "The workflow's name." + }, + "version": { + "type": "string", + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", + "description": "The workflow's semantic version." + }, + "title": { + "type": "string", + "description": "The workflow's title." + }, + "summary": { + "type": "string", + "description": "The workflow's Markdown summary." + }, + "tags": { + "type": "object", + "description": "A key/value mapping of the workflow's tags, if any.", + "additionalProperties": true, + "title": "DocumentTags" + } + }, + "required": [ + "dsl", + "namespace", + "name", + "version" + ], + "description": "Documents the workflow", + "title": "Document" + }, + "input": { + "$ref": "#/$defs/input" + }, + "use": { + "type": "object", + "properties": { + "authentications": { + "$ref": "#/$defs/authenticationPolicy" + }, + "errors": { + "$ref": "#/$defs/error" + }, + "extensions": { + "type": "array", + "items": { + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": { + "$ref": "#/$defs/extension" + } + }, + "description": "The workflow's extensions.", + "title": "UseExtensions" + }, + "functions": { + "$ref": "#/$defs/task" + }, + "retries": { + "$ref": "#/$defs/retryPolicy" + }, + "secrets": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The workflow's secrets." + } + }, + "description": "Defines the workflow's reusable components.", + "title": "Use" + }, + "do": { + "$ref": "#/$defs/taskList" + }, + "timeout": { + "$ref": "#/$defs/timeout" + }, + "output": { + "$ref": "#/$defs/output" + }, + "schedule": { + "type": "object", + "properties": { + "every": { + "$ref": "#/$defs/duration" + }, + "cron": { + "type": "string", + "description": "Specifies the schedule using a cron expression, e.g., '0 0 * * *' for daily at midnight.\"" + }, + "after": { + "$ref": "#/$defs/duration" + }, + "on": { + "$ref": "#/$defs/eventConsumptionStrategy" + } + }, + "description": "Schedules the workflow", + "title": "Schedule" + } + }, + "$defs": { + "taskList": { + "type": "array", + "items": { + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": { + "$ref": "#/$defs/task" + } + }, + "title": "TaskList" + }, + "taskBase": { + "type": "object", + "properties": { + "if": { + "type": "string", + "description": "A runtime expression, if any, used to determine whether or not the task should be run." + }, + "input": { + "$ref": "#/$defs/input" + }, + "output": { + "$ref": "#/$defs/output" + }, + "export": { + "$ref": "#/$defs/export" + }, + "timeout": { + "$ref": "#/$defs/timeout" + }, + "then": { + "$ref": "#/$defs/flowDirective" + } + }, + "title": "TaskBase" + }, + "task": { + "oneOf": [ + { + "$ref": "#/$defs/callTask" + }, + { + "$ref": "#/$defs/doTask" + }, + { + "$ref": "#/$defs/forkTask" + }, + { + "$ref": "#/$defs/emitTask" + }, + { + "$ref": "#/$defs/forTask" + }, + { + "$ref": "#/$defs/listenTask" + }, + { + "$ref": "#/$defs/raiseTask" + }, + { + "$ref": "#/$defs/runTask" + }, + { + "$ref": "#/$defs/setTask" + }, + { + "$ref": "#/$defs/switchTask" + }, + { + "$ref": "#/$defs/tryTask" + }, + { + "$ref": "#/$defs/waitTask" + } + ], + "type": "object", + "title": "Task", + "additionalProperties": false + }, + "callTask": { + "oneOf": [ + { + "title": "CallAsyncAPI", + "type": "object", + "required": [ + "call", + "with" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/$defs/taskBase" + }, + { + "properties": { + "call": { + "type": "string", + "const": "asyncapi" + }, + "with": { + "type": "object", + "properties": { + "document": { + "$ref": "#/$defs/externalResource" + }, + "operationRef": { + "type": "string", + "description": "A reference to the AsyncAPI operation to call." + }, + "server": { + "type": "string", + "description": "A a reference to the server to call the specified AsyncAPI operation on. If not set, default to the first server matching the operation's channel." + }, + "message": { + "type": "string", + "description": "The name of the message to use. If not set, defaults to the first message defined by the operation." + }, + "binding": { + "type": "string", + "description": "The name of the binding to use. If not set, defaults to the first binding defined by the operation." + }, + "payload": { + "type": "object", + "description": "The payload to call the AsyncAPI operation with, if any." + }, + "authentication": { + "description": "The authentication policy, if any, to use when calling the AsyncAPI operation.", + "oneOf": [ + { + "$ref": "#/$defs/authenticationPolicy" + }, + { + "type": "string" + } + ], + "type": "object", + "title": "CallAsyncAPIWithAuthentication" + } + }, + "required": [ + "document", + "operationRef" + ], + "additionalProperties": false, + "description": "Defines the AsyncAPI call to perform.", + "title": "CallAsyncAPIWith" + } + }, + "type": "object" + } + ] + }, + { + "title": "CallGRPC", + "type": "object", + "required": [ + "call", + "with" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/$defs/taskBase" + }, + { + "properties": { + "call": { + "type": "string", + "const": "grpc" + }, + "with": { + "type": "object", + "properties": { + "proto": { + "$ref": "#/$defs/externalResource" + }, + "service": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the GRPC service to call." + }, + "host": { + "type": "string", + "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$", + "description": "The hostname of the GRPC service to call." + }, + "port": { + "type": "integer", + "min": 0, + "max": 65535, + "description": "The port number of the GRPC service to call." + }, + "authentication": { + "description": "The endpoint's authentication policy, if any.", + "oneOf": [ + { + "$ref": "#/$defs/authenticationPolicy" + }, + { + "type": "string" + } + ], + "type": "object", + "title": "CallGRPCWithServiceAuthentication" + } + }, + "required": [ + "name", + "host" + ], + "title": "CallGRPCWithService" + }, + "method": { + "type": "string", + "description": "The name of the method to call on the defined GRPC service." + }, + "arguments": { + "type": "object", + "additionalProperties": true, + "description": "The arguments, if any, to call the method with.", + "title": "CallGRPCWithArguments" + } + }, + "required": [ + "proto", + "service", + "method" + ], + "additionalProperties": false, + "description": "Defines the GRPC call to perform.", + "title": "CallGRPCWith" + } + }, + "type": "object" + } + ] + }, + { + "title": "CallHTTP", + "type": "object", + "required": [ + "call", + "with" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/$defs/taskBase" + }, + { + "properties": { + "call": { + "type": "string", + "const": "http" + }, + "with": { + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "The HTTP method of the HTTP request to perform." + }, + "endpoint": { + "description": "The HTTP endpoint to send the request to.", + "oneOf": [ + { + "$ref": "#/$defs/endpoint" + }, + { + "type": "string", + "format": "uri-template" + } + ], + "type": "object", + "title": "CallHTTPWithEndpoint" + }, + "headers": { + "type": "object", + "description": "A name/value mapping of the headers, if any, of the HTTP request to perform." + }, + "body": { + "description": "The body, if any, of the HTTP request to perform.", + "type": "object" + }, + "output": { + "type": "string", + "enum": [ + "raw", + "content", + "response" + ], + "description": "The http call output format. Defaults to 'content'." + } + }, + "required": [ + "method", + "endpoint" + ], + "additionalProperties": false, + "description": "Defines the HTTP call to perform.", + "title": "CallHTTPWith" + } + }, + "type": "object" + } + ] + }, + { + "title": "CallOpenAPI", + "type": "object", + "required": [ + "call", + "with" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/$defs/taskBase" + }, + { + "properties": { + "call": { + "type": "string", + "const": "openapi" + }, + "with": { + "type": "object", + "properties": { + "document": { + "$ref": "#/$defs/externalResource" + }, + "operationId": { + "type": "string", + "description": "The id of the OpenAPI operation to call." + }, + "parameters": { + "type": "object", + "additionalProperties": true, + "description": "A name/value mapping of the parameters of the OpenAPI operation to call.", + "title": "CallOpenAPIWithParameters" + }, + "authentication": { + "description": "The authentication policy, if any, to use when calling the OpenAPI operation.", + "oneOf": [ + { + "$ref": "#/$defs/authenticationPolicy" + }, + { + "type": "string" + } + ], + "type": "object", + "title": "CallOpenAPIWithAuthentication" + }, + "output": { + "type": "string", + "enum": [ + "raw", + "content", + "response" + ], + "description": "The http call output format. Defaults to 'content'." + } + }, + "required": [ + "document", + "operationId" + ], + "additionalProperties": false, + "description": "Defines the OpenAPI call to perform.", + "title": "CallOpenAPIWith" + } + }, + "type": "object" + } + ] + }, + { + "title": "CallFunction", + "type": "object", + "required": [ + "call" + ], + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/$defs/taskBase" + }, + { + "properties": { + "call": { + "type": "string", + "not": { + "enum": [ + "asyncapi", + "grpc", + "http", + "openapi" + ] + }, + "description": "The name of the function to call." + }, + "with": { + "type": "object", + "additionalProperties": true, + "description": "A name/value mapping of the parameters, if any, to call the function with.", + "title": "CallFunctionWith" + } + }, + "type": "object" + } + ] + } + ], + "type": "object", + "title": "CallTask" + }, + "forkTask": { + "description": "Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output.", + "type": "object", + "required": [ + "fork" + ], + "title": "ForkTask", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/$defs/taskBase" + }, + { + "properties": { + "fork": { + "type": "object", + "required": [ + "branches" + ], + "properties": { + "branches": { + "$ref": "#/$defs/taskList" + }, + "compete": { + "description": "Indicates whether or not the concurrent tasks are racing against each other, with a single possible winner, which sets the composite task's output.", + "type": "boolean", + "default": false + } + }, + "title": "ForkTaskFork" + } + }, + "type": "object" + } + ] + }, + "doTask": { + "description": "Allows to execute a list of tasks in sequence", + "type": "object", + "required": [ + "do" + ], + "title": "DoTask", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/$defs/taskBase" + }, + { + "properties": { + "do": { + "$ref": "#/$defs/taskList" + } + }, + "type": "object" + } + ] + }, + "emitTask": { + "description": "Allows workflows to publish events to event brokers or messaging systems, facilitating communication and coordination between different components and services.", + "type": "object", + "required": [ + "emit" + ], + "title": "EmitTask", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/$defs/taskBase" + }, + { + "properties": { + "emit": { + "type": "object", + "properties": { + "event": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The event's unique identifier" + }, + "source": { + "type": "string", + "format": "uri", + "description": "Identifies the context in which an event happened" + }, + "type": { + "type": "string", + "description": "This attribute contains a value describing the type of event related to the originating occurrence." + }, + "time": { + "type": "string", + "format": "date-time" + }, + "subject": { + "type": "string" + }, + "datacontenttype": { + "type": "string", + "description": "Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format." + }, + "dataschema": { + "type": "string", + "format": "uri" + } + }, + "required": [ + "source", + "type" + ], + "additionalProperties": true, + "title": "EmitTaskEmitEvent" + } + }, + "required": [ + "event" + ], + "title": "EmitTaskEmit" + } + }, + "type": "object" + } + ] + }, + "forTask": { + "description": "Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets.", + "type": "object", + "required": [ + "for", + "do" + ], + "title": "ForTask", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/$defs/taskBase" + }, + { + "properties": { + "for": { + "type": "object", + "properties": { + "each": { + "type": "string", + "description": "The name of the variable used to store the current item being enumerated.", + "default": "item" + }, + "in": { + "type": "string", + "description": "A runtime expression used to get the collection to enumerate." + }, + "at": { + "type": "string", + "description": "The name of the variable used to store the index of the current item being enumerated.", + "default": "index" + } + }, + "required": [ + "in" + ], + "title": "ForTaskFor" + }, + "while": { + "type": "string", + "description": "A runtime expression that represents the condition, if any, that must be met for the iteration to continue." + }, + "do": { + "$ref": "#/$defs/taskList" + } + }, + "type": "object" + } + ] + }, + "listenTask": { + "description": "Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems.", + "type": "object", + "required": [ + "listen" + ], + "title": "ListenTask", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/$defs/taskBase" + }, + { + "properties": { + "listen": { + "type": "object", + "properties": { + "to": { + "$ref": "#/$defs/eventConsumptionStrategy" + } + }, + "required": [ + "to" + ], + "title": "ListenTaskListen" + } + }, + "type": "object" + } + ] + }, + "raiseTask": { + "description": "Intentionally triggers and propagates errors.", + "type": "object", + "required": [ + "raise" + ], + "title": "RaiseTask", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/$defs/taskBase" + }, + { + "properties": { + "raise": { + "type": "object", + "properties": { + "error": { + "$ref": "#/$defs/error" + } + }, + "required": [ + "error" + ], + "title": "RaiseTaskRaise" + } + }, + "type": "object" + } + ] + }, + "runTask": { + "description": "Provides the capability to execute external containers, shell commands, scripts, or workflows.", + "type": "object", + "required": [ + "run" + ], + "title": "RunTask", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/$defs/taskBase" + }, + { + "properties": { + "run": { + "type": "object", + "oneOf": [ + { + "properties": { + "container": { + "type": "object", + "properties": { + "image": { + "type": "string", + "description": "The name of the container image to run." + }, + "command": { + "type": "string", + "description": "The command, if any, to execute on the container" + }, + "ports": { + "type": "object", + "description": "The container's port mappings, if any." + }, + "volumes": { + "type": "object", + "description": "The container's volume mappings, if any." + }, + "environment": { + "type": "object", + "description": "A key/value mapping of the environment variables, if any, to use when running the configured process." + } + }, + "required": [ + "image" + ], + "title": "RunTaskRunContainer" + } + }, + "required": [ + "container" + ], + "description": "Enables the execution of external processes encapsulated within a containerized environment.", + "type": "object" + }, + { + "properties": { + "script": { + "type": "object", + "properties": { + "language": { + "type": "string", + "description": "The language of the script to run." + }, + "environment": { + "type": "object", + "additionalProperties": true, + "description": "A key/value mapping of the environment variables, if any, to use when running the configured process.", + "title": "RunTaskRunScriptEnvironment" + } + }, + "oneOf": [ + { + "properties": { + "code": { + "type": "string" + } + }, + "required": [ + "code" + ], + "description": "The script's code.", + "type": "object" + }, + { + "properties": { + "source": { + "$ref": "#/$defs/externalResource" + } + }, + "description": "The script's resource.", + "required": [ + "source" + ], + "type": "object" + } + ], + "required": [ + "language" + ], + "title": "RunTaskRunScript" + } + }, + "required": [ + "script" + ], + "description": "Enables the execution of custom scripts or code within a workflow, empowering workflows to perform specialized logic, data processing, or integration tasks by executing user-defined scripts written in various programming languages.", + "type": "object" + }, + { + "properties": { + "shell": { + "type": "object", + "properties": { + "command": { + "type": "string", + "description": "The shell command to run." + }, + "arguments": { + "type": "object", + "additionalProperties": true, + "description": "A list of the arguments of the shell command to run.", + "title": "RunTaskRunShellArguments" + }, + "environment": { + "type": "object", + "additionalProperties": true, + "description": "A key/value mapping of the environment variables, if any, to use when running the configured process.", + "title": "RunTaskRunShellEnvironment" + } + }, + "required": [ + "command" + ], + "title": "RunTaskRunShell" + } + }, + "required": [ + "shell" + ], + "description": "Enables the execution of shell commands within a workflow, enabling workflows to interact with the underlying operating system and perform system-level operations, such as file manipulation, environment configuration, or system administration tasks.", + "type": "object" + }, + { + "properties": { + "workflow": { + "type": "object", + "properties": { + "namespace": { + "type": "string", + "description": "The namespace the workflow to run belongs to." + }, + "name": { + "type": "string", + "description": "The name of the workflow to run." + }, + "version": { + "type": "string", + "default": "latest", + "description": "The version of the workflow to run. Defaults to latest" + }, + "input": { + "type": "object", + "additionalProperties": true, + "description": "The data, if any, to pass as input to the workflow to execute. The value should be validated against the target workflow's input schema, if specified.", + "title": "RunTaskRunWorkflowInput" + } + }, + "required": [ + "namespace", + "name", + "version" + ], + "title": "RunTaskRunWorkflow" + } + }, + "required": [ + "workflow" + ], + "description": "Enables the invocation and execution of nested workflows within a parent workflow, facilitating modularization, reusability, and abstraction of complex logic or business processes by encapsulating them into standalone workflow units.", + "type": "object" + } + ], + "title": "RunTaskRun" + } + }, + "type": "object" + } + ] + }, + "setTask": { + "description": "A task used to set data", + "type": "object", + "required": [ + "set" + ], + "title": "SetTask", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/$defs/taskBase" + }, + { + "properties": { + "set": { + "type": "object", + "minProperties": 1, + "additionalProperties": true, + "description": "The data to set", + "title": "SetTaskSet" + } + }, + "type": "object" + } + ] + }, + "switchTask": { + "description": "Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria", + "type": "object", + "required": [ + "switch" + ], + "title": "SwitchTask", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/$defs/taskBase" + }, + { + "properties": { + "switch": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The case's name." + }, + "when": { + "type": "string", + "description": "A runtime expression used to determine whether or not the case matches." + }, + "then": { + "$ref": "#/$defs/flowDirective" + } + } + } + }, + "title": "SwitchTaskSwitch" + } + }, + "type": "object" + } + ] + }, + "tryTask": { + "description": "Serves as a mechanism within workflows to handle errors gracefully, potentially retrying failed tasks before proceeding with alternate ones.", + "type": "object", + "required": [ + "try", + "catch" + ], + "title": "TryTask", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/$defs/taskBase" + }, + { + "properties": { + "try": { + "$ref": "#/$defs/taskList" + }, + "catch": { + "type": "object", + "properties": { + "errors": { + "type": "object" + }, + "as": { + "type": "string", + "description": "The name of the runtime expression variable to save the error as. Defaults to 'error'." + }, + "when": { + "type": "string", + "description": "A runtime expression used to determine whether or not to catch the filtered error" + }, + "exceptWhen": { + "type": "string", + "description": "A runtime expression used to determine whether or not to catch the filtered error" + }, + "retry": { + "$ref": "#/$defs/retryPolicy" + }, + "do": { + "$ref": "#/$defs/taskList" + } + }, + "title": "TryTaskCatch" + } + }, + "type": "object" + } + ] + }, + "waitTask": { + "description": "Allows workflows to pause or delay their execution for a specified period of time.", + "type": "object", + "required": [ + "wait" + ], + "title": "WaitTask", + "additionalProperties": false, + "allOf": [ + { + "$ref": "#/$defs/taskBase" + }, + { + "properties": { + "wait": { + "$ref": "#/$defs/duration" + } + }, + "type": "object" + } + ] + }, + "flowDirective": { + "additionalProperties": false, + "anyOf": [ + { + "type": "string", + "enum": [ + "continue", + "exit", + "end" + ], + "default": "continue" + }, + { + "type": "string" + } + ], + "type": "object", + "title": "FlowDirective" + }, + "authenticationPolicy": { + "type": "object", + "oneOf": [ + { + "properties": { + "basic": { + "type": "object", + "properties": { + "username": { + "type": "string", + "description": "The username to use." + }, + "password": { + "type": "string", + "description": "The password to use." + } + }, + "required": [ + "username", + "password" + ], + "title": "AuthenticationPolicyBasic" + } + }, + "required": [ + "basic" + ], + "description": "Use basic authentication.", + "type": "object" + }, + { + "properties": { + "bearer": { + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "The bearer token to use." + } + }, + "required": [ + "token" + ], + "title": "AuthenticationPolicyBearer" + } + }, + "required": [ + "bearer" + ], + "description": "Use bearer authentication.", + "type": "object" + }, + { + "properties": { + "oauth2": { + "type": "object", + "properties": { + "authority": { + "type": "string", + "format": "uri", + "description": "The URI that references the OAuth2 authority to use." + }, + "grant": { + "type": "string", + "description": "The grant type to use." + }, + "client": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The client id to use." + }, + "secret": { + "type": "string", + "description": "The client secret to use, if any." + } + }, + "required": [ + "id" + ], + "title": "AuthenticationPolicyOauth2Client" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The scopes, if any, to request the token for." + }, + "audiences": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The audiences, if any, to request the token for." + }, + "username": { + "type": "string", + "description": "The username to use. Used only if the grant type is Password." + }, + "password": { + "type": "string", + "description": "The password to use. Used only if the grant type is Password." + }, + "subject": { + "$ref": "#/$defs/oauth2Token" + }, + "actor": { + "$ref": "#/$defs/oauth2Token" + } + }, + "required": [ + "authority", + "grant", + "client" + ], + "title": "AuthenticationPolicyOauth2" + } + }, + "required": [ + "oauth2" + ], + "description": "Use OAUTH2 authentication.", + "type": "object" + } + ], + "description": "Defines an authentication policy.", + "title": "AuthenticationPolicy" + }, + "oauth2Token": { + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "The security token to use to use." + }, + "type": { + "type": "string", + "description": "The type of the security token to use to use." + } + }, + "required": [ + "token", + "type" + ], + "title": "Oauth2Token" + }, + "duration": { + "type": "object", + "minProperties": 1, + "properties": { + "days": { + "type": "integer", + "description": "Number of days, if any." + }, + "hours": { + "type": "integer", + "description": "Number of days, if any." + }, + "minutes": { + "type": "integer", + "description": "Number of minutes, if any." + }, + "seconds": { + "type": "integer", + "description": "Number of seconds, if any." + }, + "milliseconds": { + "type": "integer", + "description": "Number of milliseconds, if any." + } + }, + "description": "The definition of a duration.", + "title": "Duration" + }, + "error": { + "type": "object", + "properties": { + "type": { + "type": "string", + "format": "uri", + "description": "A URI reference that identifies the error type." + }, + "status": { + "type": "integer", + "description": "The status code generated by the origin for this occurrence of the error." + }, + "instance": { + "type": "string", + "format": "json-pointer", + "description": "A JSON Pointer used to reference the component the error originates from." + }, + "title": { + "type": "string", + "description": "A short, human-readable summary of the error." + }, + "detail": { + "type": "string", + "description": "A human-readable explanation specific to this occurrence of the error." + } + }, + "required": [ + "type", + "status", + "instance" + ], + "title": "Error" + }, + "endpoint": { + "type": "object", + "properties": { + "uri": { + "type": "string", + "format": "uri-template", + "description": "The endpoint's URI." + }, + "authentication": { + "description": "The authentication policy to use.", + "oneOf": [ + { + "$ref": "#/$defs/authenticationPolicy" + }, + { + "type": "string" + } + ], + "type": "object", + "title": "EndpointAuthentication" + } + }, + "required": [ + "uri" + ], + "title": "Endpoint" + }, + "eventConsumptionStrategy": { + "type": "object", + "oneOf": [ + { + "properties": { + "all": { + "type": "array", + "items": { + "$ref": "#/$defs/eventFilter" + }, + "description": "A list containing all the events that must be consumed.", + "title": "EventConsumptionStrategyAll" + } + }, + "required": [ + "all" + ], + "type": "object" + }, + { + "properties": { + "any": { + "type": "array", + "items": { + "$ref": "#/$defs/eventFilter" + }, + "description": "A list containing any of the events to consume.", + "title": "EventConsumptionStrategyAny" + } + }, + "required": [ + "any" + ], + "type": "object" + }, + { + "properties": { + "one": { + "$ref": "#/$defs/eventFilter" + } + }, + "required": [ + "one" + ], + "type": "object" + } + ], + "title": "EventConsumptionStrategy" + }, + "eventFilter": { + "type": "object", + "properties": { + "with": { + "type": "object", + "minProperties": 1, + "properties": { + "id": { + "type": "string", + "description": "The event's unique identifier" + }, + "source": { + "type": "string", + "description": "Identifies the context in which an event happened" + }, + "type": { + "type": "string", + "description": "This attribute contains a value describing the type of event related to the originating occurrence." + }, + "time": { + "type": "string" + }, + "subject": { + "type": "string" + }, + "datacontenttype": { + "type": "string", + "description": "Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format." + }, + "dataschema": { + "type": "string" + } + }, + "additionalProperties": true, + "description": "An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes.", + "title": "EventFilterWith" + }, + "correlate": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "A runtime expression used to extract the correlation value from the filtered event." + }, + "expect": { + "type": "string", + "description": "A constant or a runtime expression, if any, used to determine whether or not the extracted correlation value matches expectations. If not set, the first extracted value will be used as the correlation's expectation." + } + }, + "required": [ + "from" + ] + }, + "description": "A correlation is a link between events and data, established by mapping event attributes to specific data attributes, allowing for coordinated processing or handling based on event characteristics.", + "title": "EventFilterCorrelate" + } + }, + "required": [ + "with" + ], + "description": "An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes.", + "title": "EventFilter" + }, + "extension": { + "type": "object", + "properties": { + "extend": { + "type": "string", + "enum": [ + "call", + "composite", + "emit", + "for", + "listen", + "raise", + "run", + "set", + "switch", + "try", + "wait", + "all" + ], + "description": "The type of task to extend." + }, + "when": { + "type": "string", + "description": "A runtime expression, if any, used to determine whether or not the extension should apply in the specified context." + }, + "before": { + "$ref": "#/$defs/taskList" + }, + "after": { + "$ref": "#/$defs/taskList" + } + }, + "required": [ + "extend" + ], + "description": "The definition of a an extension.", + "title": "Extension" + }, + "externalResource": { + "oneOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "object", + "properties": { + "uri": { + "type": "string", + "format": "uri", + "description": "The endpoint's URI." + }, + "authentication": { + "description": "The authentication policy to use.", + "oneOf": [ + { + "$ref": "#/$defs/authenticationPolicy" + }, + { + "type": "string" + } + ], + "type": "object", + "title": "ExternalResourceAuthentication" + }, + "name": { + "type": "string", + "description": "The external resource's name, if any." + } + }, + "required": [ + "uri" + ] + } + ], + "type": "object", + "title": "ExternalResource" + }, + "input": { + "type": "object", + "properties": { + "schema": { + "$ref": "#/$defs/schema" + }, + "from": { + "type": "string", + "description": "A runtime expression, if any, used to mutate and/or filter the input of the workflow or task." + } + }, + "description": "Configures the input of a workflow or task.", + "title": "Input" + }, + "output": { + "type": "object", + "properties": { + "schema": { + "$ref": "#/$defs/schema" + }, + "as": { + "type": "string", + "description": "A runtime expression, if any, used to mutate and/or filter the output of the workflow or task." + } + }, + "description": "Configures the output of a workflow or task.", + "title": "Output" + }, + "export": { + "type": "object", + "properties": { + "schema": { + "$ref": "#/$defs/schema" + }, + "as": { + "type": "string", + "description": "A runtime expression, if any, used to export the output data to the context." + } + }, + "description": "Set the content of the context.", + "title": "Export" + }, + "retryPolicy": { + "type": "object", + "properties": { + "when": { + "type": "string", + "description": "A runtime expression, if any, used to determine whether or not to retry running the task, in a given context." + }, + "exceptWhen": { + "type": "string", + "description": "A runtime expression used to determine whether or not to retry running the task, in a given context." + }, + "delay": { + "$ref": "#/$defs/duration" + }, + "backoff": { + "type": "object", + "oneOf": [ + { + "properties": { + "constant": { + "type": "object", + "description": "The definition of the constant backoff to use, if any." + } + }, + "required": [ + "constant" + ], + "type": "object" + }, + { + "properties": { + "exponential": { + "type": "object", + "description": "The definition of the exponential backoff to use, if any." + } + }, + "required": [ + "exponential" + ], + "type": "object" + }, + { + "properties": { + "linear": { + "type": "object", + "description": "The definition of the linear backoff to use, if any." + } + }, + "required": [ + "linear" + ], + "type": "object" + } + ], + "description": "The retry duration backoff.", + "title": "RetryPolicyBackoff" + }, + "limit": { + "type": "object", + "properties": { + "attempt": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "The maximum amount of retry attempts, if any." + }, + "duration": { + "$ref": "#/$defs/duration" + } + }, + "title": "RetryPolicyLimitAttempt" + }, + "duration": { + "$ref": "#/$defs/duration" + } + }, + "description": "The retry limit, if any", + "title": "RetryPolicyLimit" + }, + "jitter": { + "type": "object", + "properties": { + "from": { + "$ref": "#/$defs/duration" + }, + "to": { + "$ref": "#/$defs/duration" + } + }, + "required": [ + "from", + "to" + ], + "description": "The parameters, if any, that control the randomness or variability of the delay between retry attempts.", + "title": "RetryPolicyJitter" + } + }, + "description": "Defines a retry policy.", + "title": "RetryPolicy" + }, + "schema": { + "type": "object", + "properties": { + "format": { + "type": "string", + "default": "json", + "description": "The schema's format. Defaults to 'json'. The (optional) version of the format can be set using `{format}:{version}`." + } + }, + "oneOf": [ + { + "properties": { + "document": { + "description": "The schema's inline definition.", + "type": "object" + } + }, + "required": [ + "document" + ], + "type": "object" + }, + { + "properties": { + "resource": { + "$ref": "#/$defs/externalResource" + } + }, + "required": [ + "resource" + ], + "type": "object" + } + ], + "description": "Represents the definition of a schema.", + "title": "Schema" + }, + "timeout": { + "type": "object", + "properties": { + "after": { + "$ref": "#/$defs/duration" + } + }, + "required": [ + "after" + ], + "description": "The definition of a timeout.", + "title": "Timeout" + } + }, + "required": [ + "document", + "do" + ], + "title": "" +} \ No newline at end of file diff --git a/src/lib/generated/schema/workflow.json b/src/lib/generated/schema/workflow.json index ceacf863..86500495 100644 --- a/src/lib/generated/schema/workflow.json +++ b/src/lib/generated/schema/workflow.json @@ -1,7 +1,6 @@ { - "$id": "https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml", + "$id": "https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json", "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "Workflow", "description": "Serverless Workflow DSL - Workflow Schema", "type": "object", "properties": { @@ -38,8 +37,8 @@ }, "tags": { "type": "object", - "title": "WorkflowTags", - "description": "A key/value mapping of the workflow's tags, if any." + "description": "A key/value mapping of the workflow's tags, if any.", + "additionalProperties": true } }, "required": [ @@ -48,12 +47,10 @@ "name", "version" ], - "title": "WorkflowDocument", "description": "Documents the workflow" }, "input": { "$ref": "#/$defs/input", - "title": "WorkflowInput", "description": "Configures the workflow's input." }, "use": { @@ -64,7 +61,6 @@ "additionalProperties": { "$ref": "#/$defs/authenticationPolicy" }, - "title": "WorkflowAuthentications", "description": "The workflow's reusable authentication policies." }, "errors": { @@ -72,21 +68,18 @@ "additionalProperties": { "$ref": "#/$defs/error" }, - "title": "WorkflowErrors", "description": "The workflow's reusable errors." }, "extensions": { "type": "array", "items": { "type": "object", - "title": "ExtensionItem", "minProperties": 1, "maxProperties": 1, "additionalProperties": { "$ref": "#/$defs/extension" } }, - "title": "WorkflowExtensions", "description": "The workflow's extensions." }, "functions": { @@ -94,7 +87,6 @@ "additionalProperties": { "$ref": "#/$defs/task" }, - "title": "WorkflowFunctions", "description": "The workflow's reusable functions." }, "retries": { @@ -102,7 +94,6 @@ "additionalProperties": { "$ref": "#/$defs/retryPolicy" }, - "title": "WorkflowRetries", "description": "The workflow's reusable retry policies." }, "secrets": { @@ -110,26 +101,21 @@ "items": { "type": "string" }, - "title": "WorkflowSecrets", "description": "The workflow's secrets." } }, - "title": "WorkflowComponents", "description": "Defines the workflow's reusable components." }, "do": { - "$ref": "#/$defs/taskList", - "title": "WorkflowTasks", - "description": "Defines the task(s) the workflow must perform" + "description": "Defines the task(s) the workflow must perform", + "$ref": "#/$defs/taskList" }, "timeout": { "$ref": "#/$defs/timeout", - "title": "WorkflowTimeout", "description": "The workflow's timeout configuration, if any." }, "output": { "$ref": "#/$defs/output", - "title": "WorkflowOutput", "description": "Configures the workflow's output." }, "schedule": { @@ -152,7 +138,6 @@ "description": "Specifies the events that trigger the workflow execution." } }, - "title": "WorkflowSchedule", "description": "Schedules the workflow" } }, @@ -161,15 +146,12 @@ "type": "array", "items": { "type": "object", - "title": "TaskItem", "minProperties": 1, "maxProperties": 1, "additionalProperties": { "$ref": "#/$defs/task" } - }, - "title": "TaskList", - "description": "A name/value mapping of tasks" + } }, "taskBase": { "type": "object", @@ -198,9 +180,7 @@ "$ref": "#/$defs/flowDirective", "description": "The flow directive to be performed upon completion of the task." } - }, - "title": "TaskBase", - "description": "The base definition shared by all tasks" + } }, "task": { "unevaluatedProperties": false, @@ -241,15 +221,12 @@ { "$ref": "#/$defs/waitTask" } - ], - "title": "Task", - "description": "Defines all possible tasks" + ] }, "callTask": { "oneOf": [ { "title": "CallAsyncAPI", - "description": "Enables workflows to interact with external services described by AsyncAPI.", "$ref": "#/$defs/taskBase", "type": "object", "required": [ @@ -263,12 +240,10 @@ "const": "asyncapi" }, "with": { - "title": "CallAsyncAPIWith", "type": "object", "properties": { "document": { "$ref": "#/$defs/externalResource", - "title": "CallAsyncAPIWithDocument", "description": "The document that defines the AsyncAPI operation to call." }, "operationRef": { @@ -292,9 +267,15 @@ "description": "The payload to call the AsyncAPI operation with, if any." }, "authentication": { - "$ref": "#/$defs/referenceableAuthenticationPolicy", - "title": "CallAsyncAPIWithAuthentication", - "description": "The authentication policy, if any, to use when calling the AsyncAPI operation." + "description": "The authentication policy, if any, to use when calling the AsyncAPI operation.", + "oneOf": [ + { + "$ref": "#/$defs/authenticationPolicy" + }, + { + "type": "string" + } + ] } }, "required": [ @@ -321,12 +302,10 @@ "const": "grpc" }, "with": { - "title": "CallGRPCWith", "type": "object", "properties": { "proto": { "$ref": "#/$defs/externalResource", - "title": "CallGRPCWithProto", "description": "The proto resource that describes the GRPC service to call." }, "service": { @@ -343,21 +322,26 @@ }, "port": { "type": "integer", - "minimum": 0, - "maximum": 65535, + "min": 0, + "max": 65535, "description": "The port number of the GRPC service to call." }, "authentication": { - "$ref": "#/$defs/referenceableAuthenticationPolicy", - "title": "CallGRPCWithServiceAuthentication", - "description": "The endpoint's authentication policy, if any." + "description": "The endpoint's authentication policy, if any.", + "oneOf": [ + { + "$ref": "#/$defs/authenticationPolicy" + }, + { + "type": "string" + } + ] } }, "required": [ "name", "host" - ], - "title": "CallGRPCWithService" + ] }, "method": { "type": "string", @@ -366,7 +350,6 @@ "arguments": { "type": "object", "additionalProperties": true, - "title": "CallGRPCWithArguments", "description": "The arguments, if any, to call the method with." } }, @@ -395,7 +378,6 @@ "const": "http" }, "with": { - "title": "CallHTTPWith", "type": "object", "properties": { "method": { @@ -403,7 +385,6 @@ "description": "The HTTP method of the HTTP request to perform." }, "endpoint": { - "title": "CallHTTPWithEndpoint", "description": "The HTTP endpoint to send the request to.", "oneOf": [ { @@ -417,11 +398,9 @@ }, "headers": { "type": "object", - "title": "CallHTTPWithHeaders", "description": "A name/value mapping of the headers, if any, of the HTTP request to perform." }, "body": { - "title": "CallHTTPWithBody", "description": "The body, if any, of the HTTP request to perform." }, "output": { @@ -458,12 +437,10 @@ "const": "openapi" }, "with": { - "title": "CallOpenAPIWith", "type": "object", "properties": { "document": { "$ref": "#/$defs/externalResource", - "title": "CallOpenAPIWithDocument", "description": "The document that defines the OpenAPI operation to call." }, "operationId": { @@ -473,13 +450,18 @@ "parameters": { "type": "object", "additionalProperties": true, - "title": "CallOpenAPIWithParameters", "description": "A name/value mapping of the parameters of the OpenAPI operation to call." }, "authentication": { - "$ref": "#/$defs/referenceableAuthenticationPolicy", - "title": "CallOpenAPIWithAuthentication", - "description": "The authentication policy, if any, to use when calling the OpenAPI operation." + "description": "The authentication policy, if any, to use when calling the OpenAPI operation.", + "oneOf": [ + { + "$ref": "#/$defs/authenticationPolicy" + }, + { + "type": "string" + } + ] }, "output": { "type": "string", @@ -524,19 +506,15 @@ "with": { "type": "object", "additionalProperties": true, - "title": "CallFunctionWith", "description": "A name/value mapping of the parameters, if any, to call the function with." } } } - ], - "title": "CallTask", - "description": "Enables the execution of a specified function within a workflow, allowing seamless integration with custom business logic or external services" + ] }, "forkTask": { - "additionalProperties": { - "$ref": "#/$defs/taskBase" - }, + "description": "Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output.", + "$ref": "#/$defs/taskBase", "type": "object", "unevaluatedProperties": false, "required": [ @@ -550,23 +528,18 @@ ], "properties": { "branches": { - "$ref": "#/$defs/taskList", - "title": "Branches" + "$ref": "#/$defs/taskList" }, "compete": { "description": "Indicates whether or not the concurrent tasks are racing against each other, with a single possible winner, which sets the composite task's output.", "type": "boolean", "default": false } - }, - "title": "Fork" + } } - }, - "title": "ForkTask", - "description": "Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output." + } }, "doTask": { - "title": "DoTask", "description": "Allows to execute a list of tasks in sequence", "$ref": "#/$defs/taskBase", "type": "object", @@ -576,13 +549,11 @@ ], "properties": { "do": { - "$ref": "#/$defs/taskList", - "title": "Do" + "$ref": "#/$defs/taskList" } } }, "emitTask": { - "title": "EmitTask", "description": "Allows workflows to publish events to event brokers or messaging systems, facilitating communication and coordination between different components and services.", "$ref": "#/$defs/taskBase", "type": "object", @@ -630,19 +601,16 @@ "source", "type" ], - "additionalProperties": true, - "title": "EmitEvent" + "additionalProperties": true } }, "required": [ "event" - ], - "title": "Emit" + ] } } }, "forTask": { - "title": "ForTask", "description": "Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets.", "$ref": "#/$defs/taskBase", "type": "object", @@ -672,21 +640,18 @@ }, "required": [ "in" - ], - "title": "For" + ] }, "while": { "type": "string", "description": "A runtime expression that represents the condition, if any, that must be met for the iteration to continue." }, "do": { - "$ref": "#/$defs/taskList", - "title": "DoEach" + "$ref": "#/$defs/taskList" } } }, "listenTask": { - "title": "ListenTask", "description": "Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems.", "$ref": "#/$defs/taskBase", "type": "object", @@ -700,19 +665,16 @@ "properties": { "to": { "$ref": "#/$defs/eventConsumptionStrategy", - "title": "ListenEventConsumptionStrategy", "description": "Defines the event(s) to listen to." } }, "required": [ "to" - ], - "title": "Listen" + ] } } }, "raiseTask": { - "title": "RaiseTask", "description": "Intentionally triggers and propagates errors.", "$ref": "#/$defs/taskBase", "type": "object", @@ -726,19 +688,16 @@ "properties": { "error": { "$ref": "#/$defs/error", - "title": "RaiseError", "description": "Defines the error to raise." } }, "required": [ "error" - ], - "title": "Raise" + ] } } }, "runTask": { - "title": "RunTask", "description": "Provides the capability to execute external containers, shell commands, scripts, or workflows.", "$ref": "#/$defs/taskBase", "type": "object", @@ -751,7 +710,6 @@ "type": "object", "oneOf": [ { - "title": "RunContainer", "properties": { "container": { "type": "object", @@ -773,15 +731,13 @@ "description": "The container's volume mappings, if any." }, "environment": { - "title": "ContainerEnvironment", "type": "object", "description": "A key/value mapping of the environment variables, if any, to use when running the configured process." } }, "required": [ "image" - ], - "title": "Container" + ] } }, "required": [ @@ -790,7 +746,6 @@ "description": "Enables the execution of external processes encapsulated within a containerized environment." }, { - "title": "RunScript", "properties": { "script": { "type": "object", @@ -800,7 +755,6 @@ "description": "The language of the script to run." }, "environment": { - "title": "ScriptEnvironment", "type": "object", "additionalProperties": true, "description": "A key/value mapping of the environment variables, if any, to use when running the configured process." @@ -808,7 +762,6 @@ }, "oneOf": [ { - "title": "ScriptInline", "properties": { "code": { "type": "string" @@ -820,7 +773,6 @@ "description": "The script's code." }, { - "title": "ScriptExternal", "properties": { "source": { "$ref": "#/$defs/externalResource" @@ -834,8 +786,7 @@ ], "required": [ "language" - ], - "title": "Script" + ] } }, "required": [ @@ -844,7 +795,6 @@ "description": "Enables the execution of custom scripts or code within a workflow, empowering workflows to perform specialized logic, data processing, or integration tasks by executing user-defined scripts written in various programming languages." }, { - "title": "RunShell", "properties": { "shell": { "type": "object", @@ -854,13 +804,11 @@ "description": "The shell command to run." }, "arguments": { - "title": "ShellArguments", "type": "object", "additionalProperties": true, "description": "A list of the arguments of the shell command to run." }, "environment": { - "title": "ShellEnvironment", "type": "object", "additionalProperties": true, "description": "A key/value mapping of the environment variables, if any, to use when running the configured process." @@ -868,8 +816,7 @@ }, "required": [ "command" - ], - "title": "Shell" + ] } }, "required": [ @@ -878,10 +825,8 @@ "description": "Enables the execution of shell commands within a workflow, enabling workflows to interact with the underlying operating system and perform system-level operations, such as file manipulation, environment configuration, or system administration tasks." }, { - "title": "RunWokflow", "properties": { "workflow": { - "title": "RunWorkflowDescriptor", "type": "object", "properties": { "namespace": { @@ -898,7 +843,6 @@ "description": "The version of the workflow to run. Defaults to latest" }, "input": { - "title": "WorkflowInput", "type": "object", "additionalProperties": true, "description": "The data, if any, to pass as input to the workflow to execute. The value should be validated against the target workflow's input schema, if specified." @@ -916,13 +860,11 @@ ], "description": "Enables the invocation and execution of nested workflows within a parent workflow, facilitating modularization, reusability, and abstraction of complex logic or business processes by encapsulating them into standalone workflow units." } - ], - "title": "Run" + ] } } }, "setTask": { - "title": "SetTask", "description": "A task used to set data", "$ref": "#/$defs/taskBase", "type": "object", @@ -935,13 +877,11 @@ "type": "object", "minProperties": 1, "additionalProperties": true, - "title": "Set", "description": "The data to set" } } }, "switchTask": { - "title": "SwitchTask", "description": "Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria", "$ref": "#/$defs/taskBase", "type": "object", @@ -957,14 +897,13 @@ "type": "object", "minProperties": 1, "maxProperties": 1, - "title": "SwitchItem", "additionalProperties": { "type": "object", - "title": "SwitchCase", - "required": [ - "then" - ], "properties": { + "name": { + "type": "string", + "description": "The case's name." + }, "when": { "type": "string", "description": "A runtime expression used to determine whether or not the case matches." @@ -975,13 +914,11 @@ } } } - }, - "title": "Switch" + } } } }, "tryTask": { - "title": "TryTask", "description": "Serves as a mechanism within workflows to handle errors gracefully, potentially retrying failed tasks before proceeding with alternate ones.", "$ref": "#/$defs/taskBase", "type": "object", @@ -992,16 +929,14 @@ "unevaluatedProperties": false, "properties": { "try": { - "$ref": "#/$defs/taskList", - "title": "Try", - "description": "The task(s) to perform." + "description": "The task(s) to perform.", + "$ref": "#/$defs/taskList" }, "catch": { "type": "object", "properties": { "errors": { - "type": "object", - "title": "CatchErrors" + "type": "object" }, "as": { "type": "string", @@ -1017,21 +952,17 @@ }, "retry": { "$ref": "#/$defs/retryPolicy", - "title": "CatchRetryPolicy", "description": "The retry policy to use, if any, when catching errors." }, "do": { - "$ref": "#/$defs/taskList", - "title": "CatchDo", - "description": "The definition of the task(s) to run when catching an error." + "description": "The definition of the task(s) to run when catching an error.", + "$ref": "#/$defs/taskList" } - }, - "title": "Catch" + } } } }, "waitTask": { - "title": "WaitTask", "description": "Allows workflows to pause or delay their execution for a specified period of time.", "$ref": "#/$defs/taskBase", "type": "object", @@ -1041,13 +972,13 @@ "unevaluatedProperties": false, "properties": { "wait": { - "$ref": "#/$defs/duration", - "title": "Wait", - "description": "The amount of time to wait." + "description": "The amount of time to wait.", + "$ref": "#/$defs/duration" } } }, "flowDirective": { + "additionalProperties": false, "anyOf": [ { "type": "string", @@ -1056,81 +987,33 @@ "exit", "end" ], - "default": "continue", - "title": "FlowDirectiveEnum" + "default": "continue" }, { "type": "string" } - ], - "title": "FlowDirective" - }, - "referenceableAuthenticationPolicy": { - "type": "object", - "oneOf": [ - { - "title": "AuthenticationPolicyReference", - "properties": { - "use": { - "type": "string", - "minLength": 1, - "description": "The name of the authentication policy to use" - } - }, - "required": [ - "use" - ] - }, - { - "$ref": "#/$defs/authenticationPolicy", - "title": "ReferencedAuthenticationPolicy" - } - ], - "title": "ReferenceableAuthenticationPolicy" - }, - "secretBasedAuthenticationPolicy": { - "type": "object", - "properties": { - "use": { - "type": "string", - "minLength": 1, - "description": "The name of the authentication policy to use" - } - }, - "required": [ - "use" - ], - "title": "SecretBasedAuthenticationPolicy" + ] }, "authenticationPolicy": { "type": "object", "oneOf": [ { - "title": "BasicAuthenticationPolicy", "properties": { "basic": { "type": "object", - "oneOf": [ - { - "properties": { - "username": { - "type": "string", - "description": "The username to use." - }, - "password": { - "type": "string", - "description": "The password to use." - } - }, - "required": [ - "username", - "password" - ], - "title": "ExplicitBasicAuthenticationPolicy" + "properties": { + "username": { + "type": "string", + "description": "The username to use." }, - { - "$ref": "#/$defs/secretBasedAuthenticationPolicy" + "password": { + "type": "string", + "description": "The password to use." } + }, + "required": [ + "username", + "password" ] } }, @@ -1140,26 +1023,17 @@ "description": "Use basic authentication." }, { - "title": "BearerAuthenticationPolicy", "properties": { "bearer": { "type": "object", - "oneOf": [ - { - "properties": { - "token": { - "type": "string", - "description": "The bearer token to use." - } - }, - "required": [ - "token" - ], - "title": "ExplicitBearerAuthenticationPolicy" - }, - { - "$ref": "#/$defs/secretBasedAuthenticationPolicy" + "properties": { + "token": { + "type": "string", + "description": "The bearer token to use." } + }, + "required": [ + "token" ] } }, @@ -1169,79 +1043,70 @@ "description": "Use bearer authentication." }, { - "title": "OAuth2AuthenticationPolicy", "properties": { "oauth2": { "type": "object", - "oneOf": [ - { + "properties": { + "authority": { + "type": "string", + "format": "uri", + "description": "The URI that references the OAuth2 authority to use." + }, + "grant": { + "type": "string", + "description": "The grant type to use." + }, + "client": { + "type": "object", "properties": { - "authority": { + "id": { "type": "string", - "format": "uri", - "description": "The URI that references the OAuth2 authority to use." + "description": "The client id to use." }, - "grant": { + "secret": { "type": "string", - "description": "The grant type to use." - }, - "client": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The client id to use." - }, - "secret": { - "type": "string", - "description": "The client secret to use, if any." - } - }, - "required": [ - "id" - ] - }, - "scopes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The scopes, if any, to request the token for." - }, - "audiences": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The audiences, if any, to request the token for." - }, - "username": { - "type": "string", - "description": "The username to use. Used only if the grant type is Password." - }, - "password": { - "type": "string", - "description": "The password to use. Used only if the grant type is Password." - }, - "subject": { - "$ref": "#/$defs/oauth2Token", - "description": "The security token that represents the identity of the party on behalf of whom the request is being made." - }, - "actor": { - "$ref": "#/$defs/oauth2Token", - "description": "The security token that represents the identity of the acting party." + "description": "The client secret to use, if any." } }, "required": [ - "authority", - "grant", - "client" - ], - "title": "ExplicitOAuth2AuthenticationPolicy" + "id" + ] }, - { - "$ref": "#/$defs/secretBasedAuthenticationPolicy" + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The scopes, if any, to request the token for." + }, + "audiences": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The audiences, if any, to request the token for." + }, + "username": { + "type": "string", + "description": "The username to use. Used only if the grant type is Password." + }, + "password": { + "type": "string", + "description": "The password to use. Used only if the grant type is Password." + }, + "subject": { + "$ref": "#/$defs/oauth2Token", + "description": "The security token that represents the identity of the party on behalf of whom the request is being made." + }, + "actor": { + "$ref": "#/$defs/oauth2Token", + "description": "The security token that represents the identity of the acting party." } + }, + "required": [ + "authority", + "grant", + "client" ] } }, @@ -1251,7 +1116,6 @@ "description": "Use OAUTH2 authentication." } ], - "title": "AuthenticationPolicy", "description": "Defines an authentication policy." }, "oauth2Token": { @@ -1269,8 +1133,7 @@ "required": [ "token", "type" - ], - "title": "OAuth2Token" + ] }, "duration": { "type": "object", @@ -1297,7 +1160,6 @@ "description": "Number of milliseconds, if any." } }, - "title": "Duration", "description": "The definition of a duration." }, "error": { @@ -1326,7 +1188,6 @@ "description": "A human-readable explanation specific to this occurrence of the error." } }, - "title": "Error", "required": [ "type", "status", @@ -1342,12 +1203,17 @@ "description": "The endpoint's URI." }, "authentication": { - "$ref": "#/$defs/referenceableAuthenticationPolicy", - "title": "EndpointAuthentication", - "description": "The authentication policy to use." + "description": "The authentication policy to use.", + "oneOf": [ + { + "$ref": "#/$defs/authenticationPolicy" + }, + { + "type": "string" + } + ] } }, - "title": "Endpoint", "required": [ "uri" ] @@ -1356,14 +1222,12 @@ "type": "object", "oneOf": [ { - "title": "AllEventConsumptionStrategy", "properties": { "all": { "type": "array", "items": { "$ref": "#/$defs/eventFilter" }, - "title": "EventConsumptionStrategyAll", "description": "A list containing all the events that must be consumed." } }, @@ -1372,14 +1236,12 @@ ] }, { - "title": "AnyEventConsumptionStrategy", "properties": { "any": { "type": "array", "items": { "$ref": "#/$defs/eventFilter" }, - "title": "EventConsumptionStrategyAny", "description": "A list containing any of the events to consume." } }, @@ -1388,11 +1250,9 @@ ] }, { - "title": "OneEventConsumptionStrategy", "properties": { "one": { "$ref": "#/$defs/eventFilter", - "title": "EventConsumptionStrategyOne", "description": "The single event to consume." } }, @@ -1400,14 +1260,12 @@ "one" ] } - ], - "title": "EventConsumptionStrategy" + ] }, "eventFilter": { "type": "object", "properties": { "with": { - "title": "WithEvent", "type": "object", "minProperties": 1, "properties": { @@ -1458,14 +1316,12 @@ "from" ] }, - "title": "Correlate", "description": "A correlation is a link between events and data, established by mapping event attributes to specific data attributes, allowing for coordinated processing or handling based on event characteristics." } }, "required": [ "with" ], - "title": "EventFilter", "description": "An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes." }, "extension": { @@ -1494,20 +1350,17 @@ "description": "A runtime expression, if any, used to determine whether or not the extension should apply in the specified context." }, "before": { - "$ref": "#/$defs/taskList", - "title": "ExtensionBefore", - "description": "The task(s) to execute before the extended task, if any." + "description": "The task(s) to execute before the extended task, if any.", + "$ref": "#/$defs/taskList" }, "after": { - "$ref": "#/$defs/taskList", - "title": "ExtensionAfter", - "description": "The task(s) to execute after the extended task, if any." + "description": "The task(s) to execute after the extended task, if any.", + "$ref": "#/$defs/taskList" } }, "required": [ "extend" ], - "title": "Extension", "description": "The definition of a an extension." }, "externalResource": { @@ -1517,7 +1370,6 @@ "format": "uri" }, { - "title": "ExternalResourceURI", "type": "object", "properties": { "uri": { @@ -1526,8 +1378,15 @@ "description": "The endpoint's URI." }, "authentication": { - "$ref": "#/$defs/referenceableAuthenticationPolicy", - "description": "The authentication policy to use." + "description": "The authentication policy to use.", + "oneOf": [ + { + "$ref": "#/$defs/authenticationPolicy" + }, + { + "type": "string" + } + ] }, "name": { "type": "string", @@ -1538,31 +1397,20 @@ "uri" ] } - ], - "title": "ExternalResource" + ] }, "input": { "type": "object", "properties": { "schema": { "$ref": "#/$defs/schema", - "title": "InputSchema", "description": "The schema used to describe and validate the input of the workflow or task." }, "from": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ], - "title": "InputFrom", + "type": "string", "description": "A runtime expression, if any, used to mutate and/or filter the input of the workflow or task." } }, - "title": "Input", "description": "Configures the input of a workflow or task." }, "output": { @@ -1570,23 +1418,13 @@ "properties": { "schema": { "$ref": "#/$defs/schema", - "title": "OutputSchema", "description": "The schema used to describe and validate the output of the workflow or task." }, "as": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ], - "title": "OutputAs", + "type": "string", "description": "A runtime expression, if any, used to mutate and/or filter the output of the workflow or task." } }, - "title": "Output", "description": "Configures the output of a workflow or task." }, "export": { @@ -1594,23 +1432,13 @@ "properties": { "schema": { "$ref": "#/$defs/schema", - "title": "ExportSchema", "description": "The schema used to describe and validate the workflow context." }, "as": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "object" - } - ], - "title": "ExportAs", + "type": "string", "description": "A runtime expression, if any, used to export the output data to the context." } }, - "title": "Export", "description": "Set the content of the context." }, "retryPolicy": { @@ -1626,15 +1454,12 @@ }, "delay": { "$ref": "#/$defs/duration", - "title": "RetryPolicyDelay", "description": "The duration to wait between retry attempts." }, "backoff": { "type": "object", - "title": "RetryPolicyBackoff", "oneOf": [ { - "title": "ConstantBackoff", "properties": { "constant": { "type": "object", @@ -1646,7 +1471,6 @@ ] }, { - "title": "ExponentialBackOff", "properties": { "exponential": { "type": "object", @@ -1658,7 +1482,6 @@ ] }, { - "title": "LinearBackoff", "properties": { "linear": { "type": "object", @@ -1674,10 +1497,8 @@ }, "limit": { "type": "object", - "title": "RetryPolicyLimit", "properties": { "attempt": { - "title": "RetryPolicyAttempt", "type": "object", "properties": { "count": { @@ -1686,31 +1507,26 @@ }, "duration": { "$ref": "#/$defs/duration", - "title": "RetryPolicyAttemptDuration", "description": "The maximum duration for each retry attempt." } } }, "duration": { "$ref": "#/$defs/duration", - "title": "RetryPolicyDuration", "description": "The duration limit, if any, for all retry attempts." } }, "description": "The retry limit, if any" }, "jitter": { - "title": "RetryPolicyJitter", "type": "object", "properties": { "from": { "$ref": "#/$defs/duration", - "title": "RetryPolicyJitterFrom", "description": "The minimum duration of the jitter range" }, "to": { "$ref": "#/$defs/duration", - "title": "RetryPolicyJitterTo", "description": "The maximum duration of the jitter range" } }, @@ -1721,7 +1537,6 @@ "description": "The parameters, if any, that control the randomness or variability of the delay between retry attempts." } }, - "title": "RetryPolicy", "description": "Defines a retry policy." }, "schema": { @@ -1735,7 +1550,6 @@ }, "oneOf": [ { - "title": "SchemaInline", "properties": { "document": { "description": "The schema's inline definition." @@ -1746,7 +1560,6 @@ ] }, { - "title": "SchemaExternal", "properties": { "resource": { "$ref": "#/$defs/externalResource", @@ -1758,7 +1571,6 @@ ] } ], - "title": "Schema", "description": "Represents the definition of a schema." }, "timeout": { @@ -1772,7 +1584,6 @@ "required": [ "after" ], - "title": "Timeout", "description": "The definition of a timeout." } }, diff --git a/src/lib/generated/validation/validation-pointers.ts b/src/lib/generated/validation/validation-pointers.ts index 59d17d1f..977414eb 100644 --- a/src/lib/generated/validation/validation-pointers.ts +++ b/src/lib/generated/validation/validation-pointers.ts @@ -18,177 +18,131 @@ * A map of type names and their corresponding schema */ export const validationPointers = { - Workflow: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#', - AllEventConsumptionStrategy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/eventConsumptionStrategy/oneOf/0', - AnyEventConsumptionStrategy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/eventConsumptionStrategy/oneOf/1', - AuthenticationPolicy: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/authenticationPolicy', - AuthenticationPolicyReference: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/referenceableAuthenticationPolicy/oneOf/0', - BasicAuthenticationPolicy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/authenticationPolicy/oneOf/0', - BearerAuthenticationPolicy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/authenticationPolicy/oneOf/1', - CallAsyncAPI: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/0', + Workflow: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#', + AuthenticationPolicy: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/authenticationPolicy', + AuthenticationPolicyBasic: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/authenticationPolicy/oneOf/0/properties/basic', + AuthenticationPolicyBearer: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/authenticationPolicy/oneOf/1/properties/bearer', + AuthenticationPolicyOauth2: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/authenticationPolicy/oneOf/2/properties/oauth2', + AuthenticationPolicyOauth2Client: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/authenticationPolicy/oneOf/2/properties/oauth2/properties/client', + CallAsyncAPI: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/0', CallAsyncAPIWith: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/0/properties/with', - CallFunction: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/4', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/0/allOf/1/properties/with', + CallAsyncAPIWithAuthentication: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/0/allOf/1/properties/with/properties/authentication', + CallFunction: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/4', CallFunctionWith: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/4/properties/with', - CallGRPC: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/1', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/4/allOf/1/properties/with', + CallGRPC: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1', CallGRPCWith: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/1/properties/with', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1/allOf/1/properties/with', CallGRPCWithArguments: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/1/properties/with/properties/arguments', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1/allOf/1/properties/with/properties/arguments', CallGRPCWithService: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/1/properties/with/properties/service', - CallHTTP: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/2', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1/allOf/1/properties/with/properties/service', + CallGRPCWithServiceAuthentication: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1/allOf/1/properties/with/properties/service/properties/authentication', + CallHTTP: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/2', CallHTTPWith: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/2/properties/with', - CallHTTPWithBody: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/2/properties/with/properties/body', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/2/allOf/1/properties/with', CallHTTPWithEndpoint: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/2/properties/with/properties/endpoint', - CallHTTPWithHeaders: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/2/properties/with/properties/headers', - CallOpenAPI: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/3', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/2/allOf/1/properties/with/properties/endpoint', + CallOpenAPI: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/3', CallOpenAPIWith: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/3/properties/with', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/3/allOf/1/properties/with', + CallOpenAPIWithAuthentication: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/3/allOf/1/properties/with/properties/authentication', CallOpenAPIWithParameters: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask/oneOf/3/properties/with/properties/parameters', - CallTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/callTask', - Catch: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/tryTask/properties/catch', - CatchErrors: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/tryTask/properties/catch/properties/errors', - ConstantBackoff: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/retryPolicy/properties/backoff/oneOf/0', - Container: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/0/properties/container', - ContainerEnvironment: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/0/properties/container/properties/environment', - Correlate: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/eventFilter/properties/correlate', - DoTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/doTask', - Duration: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/duration', - Emit: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/emitTask/properties/emit', - EmitEvent: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/emitTask/properties/emit/properties/event', - EmitTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/emitTask', - Endpoint: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/endpoint', - Error: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/error', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/3/allOf/1/properties/with/properties/parameters', + CallTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask', + Document: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/document', + DocumentTags: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/document/properties/tags', + DoTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/doTask', + Duration: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/duration', + EmitTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/emitTask', + EmitTaskEmit: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/emitTask/allOf/1/properties/emit', + EmitTaskEmitEvent: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/emitTask/allOf/1/properties/emit/properties/event', + Endpoint: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/endpoint', + EndpointAuthentication: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/endpoint/properties/authentication', + Error: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/error', EventConsumptionStrategy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/eventConsumptionStrategy', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/eventConsumptionStrategy', EventConsumptionStrategyAll: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/eventConsumptionStrategy/oneOf/0/properties/all', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/eventConsumptionStrategy/oneOf/0/properties/all', EventConsumptionStrategyAny: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/eventConsumptionStrategy/oneOf/1/properties/any', - EventFilter: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/eventFilter', - ExplicitBasicAuthenticationPolicy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/authenticationPolicy/oneOf/0/properties/basic/oneOf/0', - ExplicitBearerAuthenticationPolicy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/authenticationPolicy/oneOf/1/properties/bearer/oneOf/0', - ExplicitOAuth2AuthenticationPolicy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/authenticationPolicy/oneOf/2/properties/oauth2/oneOf/0', - ExponentialBackOff: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/retryPolicy/properties/backoff/oneOf/1', - Export: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/export', - ExportAs: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/export/properties/as', - Extension: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/extension', - ExtensionItem: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/use/properties/extensions/items', - ExternalResource: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/externalResource', - ExternalResourceURI: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/externalResource/oneOf/1', - FlowDirective: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/flowDirective', - FlowDirectiveEnum: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/flowDirective/anyOf/0', - For: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/forTask/properties/for', - Fork: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/forkTask/properties/fork', - ForkTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/forkTask', - ForTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/forTask', - Input: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/input', - InputFrom: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/input/properties/from', - LinearBackoff: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/retryPolicy/properties/backoff/oneOf/2', - Listen: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/listenTask/properties/listen', - ListenTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/listenTask', - OAuth2AuthenticationPolicy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/authenticationPolicy/oneOf/2', - Oauth2Token: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/oauth2Token', - OneEventConsumptionStrategy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/eventConsumptionStrategy/oneOf/2', - Output: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/output', - OutputAs: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/output/properties/as', - Raise: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/raiseTask/properties/raise', - RaiseTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/raiseTask', - ReferenceableAuthenticationPolicy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/referenceableAuthenticationPolicy', - ReferencedAuthenticationPolicy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/referenceableAuthenticationPolicy/oneOf/1', - RetryPolicy: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/retryPolicy', - RetryPolicyAttempt: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/retryPolicy/properties/limit/properties/attempt', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/eventConsumptionStrategy/oneOf/1/properties/any', + EventFilter: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/eventFilter', + EventFilterCorrelate: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/eventFilter/properties/correlate', + EventFilterWith: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/eventFilter/properties/with', + Export: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/export', + Extension: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/extension', + ExternalResource: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/externalResource', + ExternalResourceAuthentication: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/externalResource/oneOf/1/properties/authentication', + FlowDirective: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/flowDirective', + ForkTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/forkTask', + ForkTaskFork: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/forkTask/allOf/1/properties/fork', + ForTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/forTask', + ForTaskFor: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/forTask/allOf/1/properties/for', + Input: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/input', + ListenTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/listenTask', + ListenTaskListen: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/listenTask/allOf/1/properties/listen', + Oauth2Token: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/oauth2Token', + Output: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/output', + RaiseTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/raiseTask', + RaiseTaskRaise: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/raiseTask/allOf/1/properties/raise', + RetryPolicy: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/retryPolicy', RetryPolicyBackoff: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/retryPolicy/properties/backoff', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/retryPolicy/properties/backoff', RetryPolicyJitter: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/retryPolicy/properties/jitter', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/retryPolicy/properties/jitter', RetryPolicyLimit: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/retryPolicy/properties/limit', - Run: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run', - RunContainer: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/0', - RunScript: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/1', - RunShell: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/2', - RunTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask', - RunWokflow: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/3', - RunWorkflowDescriptor: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/3/properties/workflow', - Schema: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/schema', - SchemaExternal: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/schema/oneOf/1', - SchemaInline: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/schema/oneOf/0', - Script: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/1/properties/script', - ScriptExternal: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/1/properties/script/oneOf/1', - ScriptInline: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/1/properties/script/oneOf/0', - SecretBasedAuthenticationPolicy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/secretBasedAuthenticationPolicy', - Set: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/setTask/properties/set', - SetTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/setTask', - Shell: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/2/properties/shell', - ShellArguments: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/2/properties/shell/properties/arguments', - ShellEnvironment: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/runTask/properties/run/oneOf/2/properties/shell/properties/environment', - Switch: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/switchTask/properties/switch', - SwitchCase: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/switchTask/properties/switch/items/additionalProperties', - SwitchItem: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/switchTask/properties/switch/items', - SwitchTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/switchTask', - Task: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/task', - TaskBase: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/taskBase', - TaskItem: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/taskList/items', - TaskList: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/taskList', - Timeout: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/timeout', - TryTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/tryTask', - WaitTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/waitTask', - WithEvent: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/$defs/eventFilter/properties/with', - WorkflowAuthentications: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/use/properties/authentications', - WorkflowComponents: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/use', - WorkflowDocument: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/document', - WorkflowErrors: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/use/properties/errors', - WorkflowExtensions: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/use/properties/extensions', - WorkflowFunctions: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/use/properties/functions', - WorkflowInput: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/input', - WorkflowRetries: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/use/properties/retries', - WorkflowSchedule: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/schedule', - WorkflowSecrets: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/use/properties/secrets', - WorkflowTags: 'https://serverlessworkflow.io/schemas/1.0.0-alpha1/workflow.yaml#/properties/document/properties/tags', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/retryPolicy/properties/limit', + RetryPolicyLimitAttempt: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/retryPolicy/properties/limit/properties/attempt', + RunTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask', + RunTaskRun: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/allOf/1/properties/run', + RunTaskRunContainer: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/allOf/1/properties/run/oneOf/0/properties/container', + RunTaskRunScript: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/allOf/1/properties/run/oneOf/1/properties/script', + RunTaskRunShell: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/allOf/1/properties/run/oneOf/2/properties/shell', + RunTaskRunShellArguments: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/allOf/1/properties/run/oneOf/2/properties/shell/properties/arguments', + RunTaskRunShellEnvironment: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/allOf/1/properties/run/oneOf/2/properties/shell/properties/environment', + RunTaskRunWorkflow: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/allOf/1/properties/run/oneOf/3/properties/workflow', + RunTaskRunWorkflowInput: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/allOf/1/properties/run/oneOf/3/properties/workflow/properties/input', + Schedule: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/schedule', + Schema: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/schema', + SetTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/setTask', + SetTaskSet: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/setTask/allOf/1/properties/set', + SwitchTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/switchTask', + SwitchTaskSwitch: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/switchTask/allOf/1/properties/switch', + Task: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/task', + TaskBase: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/taskBase', + TaskList: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/taskList', + Timeout: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/timeout', + TryTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/tryTask', + TryTaskCatch: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/tryTask/allOf/1/properties/catch', + Use: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/use', + UseExtensions: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/use/properties/extensions', + WaitTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/waitTask', }; diff --git a/src/lib/validation.ts b/src/lib/validation.ts index 707dfd75..b2fafeca 100644 --- a/src/lib/validation.ts +++ b/src/lib/validation.ts @@ -1,6 +1,7 @@ import Ajv, { ValidateFunction } from 'ajv/dist/2020'; import addFormats from 'ajv-formats'; import workflowSchema from './generated/schema/workflow.json'; +import internalWorkflowSchema from './generated/schema/__internal_workflow.json'; import { validationPointers } from './generated/validation'; const ajv = new Ajv({ @@ -9,12 +10,21 @@ const ajv = new Ajv({ }); addFormats(ajv); +// uses an altered version of the JSON Schema, might introduce unwanted results +const __internal_ajv = new Ajv({ + schemas: [internalWorkflowSchema], + strict: false, +}); +addFormats(__internal_ajv); + /** * A Map of validation functions, where the key is the name of the schema to validate with */ export const validators: Map = new Map( Object.entries(validationPointers).map(([typeName, jsonPointer]) => { - const validate = ajv.getSchema(jsonPointer); + if (!jsonPointer) throw `No JSON pointer provided for type '${typeName}'`; + let validate = ajv.getSchema(jsonPointer); + if (!validate) validate = __internal_ajv.getSchema(jsonPointer); if (!validate) throw `Unable to find schema '${jsonPointer}' for type '${typeName}'`; return [typeName, validate as ValidateFunction]; }), diff --git a/tests/builders/call-http-builder.spec.ts b/tests/builders/call-http-builder.spec.ts new file mode 100644 index 00000000..e63e7da8 --- /dev/null +++ b/tests/builders/call-http-builder.spec.ts @@ -0,0 +1,31 @@ +import { callHTTPBuilder } from '../../src/lib/generated/builders/call-http-builder'; +import { Classes } from '../../src/lib/generated/classes'; + +describe('CallHTTP builder', () => { + it('should build', () => { + const endpoint = 'https://serverlessworkflow.io'; + const method = 'get'; + const callHttp = callHTTPBuilder() + .call('http') + .with({ + endpoint, + method, + }) + .build(); + expect(callHttp).toBeDefined(); + expect(callHttp.call).toBe('http'); + expect(callHttp.with).toBeDefined(); + expect(callHttp.with!.endpoint).toBe(endpoint); + expect(callHttp.with!.method).toBe(method); + expect(callHttp).toBeInstanceOf(Classes.CallHTTP); + }); + + it('should validate', () => { + const test = () => { + callHTTPBuilder().build(); + }; + expect(test).toThrow(Error); + expect(test).toThrow(/'CallHTTP' is invalid/); + expect(test).toThrow(/must have required property 'call'/); + }); +}); diff --git a/tests/builders/explicit-basic-authentication-policy-builder.spec.ts b/tests/builders/explicit-basic-authentication-policy-builder.spec.ts deleted file mode 100644 index bb090173..00000000 --- a/tests/builders/explicit-basic-authentication-policy-builder.spec.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { explicitBasicAuthenticationPolicyBuilder } from '../../src/lib/generated/builders/explicit-basic-authentication-policy-builder'; -import { Classes } from '../../src/lib/generated/classes'; - -describe('ExplicitBasicAuthenticationPolicy builder', () => { - it('should build', () => { - const username = 'foo'; - const password = 'bar'; - const explicitBasicAuthenticationPolicy = explicitBasicAuthenticationPolicyBuilder() - .username(username) - .password(password) - .build(); - expect(explicitBasicAuthenticationPolicy).toBeDefined(); - expect(explicitBasicAuthenticationPolicy.username).toBe(username); - expect(explicitBasicAuthenticationPolicy.password).toBe(password); - expect(explicitBasicAuthenticationPolicy instanceof Classes.ExplicitBasicAuthenticationPolicy).toBe(true); - }); -}); diff --git a/tests/classes/workflow.spec.ts b/tests/classes/workflow.spec.ts index 2d0cb776..7a6b4003 100644 --- a/tests/classes/workflow.spec.ts +++ b/tests/classes/workflow.spec.ts @@ -3,6 +3,6 @@ import { Classes } from '../../src/lib/generated/classes'; describe('workflow class', () => { it('should be an instance of Workflow', () => { const workflow = new Classes.Workflow(); - expect(workflow instanceof Classes.Workflow).toBe(true); + expect(workflow).toBeInstanceOf(Classes.Workflow); }); }); diff --git a/tools/2_generate-definitions.ts b/tools/2_generate-definitions.ts index 52bd65a7..1410a4bd 100644 --- a/tools/2_generate-definitions.ts +++ b/tools/2_generate-definitions.ts @@ -17,70 +17,138 @@ import { compile, JSONSchema, Options } from 'json-schema-to-typescript'; import { promises as fsPromises } from 'fs'; import * as path from 'path'; -import { Project, QuoteKind } from 'ts-morph'; import { fileHeader } from './consts'; -import { definitionsDir, isObject, reset, schemaDir } from './utils'; +import { definitionsDir, isObject, reset, schemaDir, toPascalCase } from './utils'; const { writeFile, readFile } = fsPromises; +const structuralObjectProperties = [ + '$defs', + 'definitions', + 'properties', + 'patternProperties', + 'additionalProperties', + 'dependencies', + 'dependentSchemas', + 'if', + //'then', // creates a duplicate FlowDirective because of switch case then + 'else', + 'not', + 'items', + 'additionalItems', + 'unevaluatedItems', + 'contains', + 'propertyNames', + 'unevaluatedProperties', +]; +const structuralArrayProperties = [ + 'allOf', + 'anyOf', + 'oneOf', + 'items', + 'enum', + 'type', + 'examples', + 'required', + 'dependentRequired', +]; + +const metadataProperties = ['title', 'description', 'default', 'type']; + /** - * Try to prevent type duplicate by removing metadata where $ref are used - * see https://github.com/bcherny/json-schema-to-typescript/issues/193 - * @param schema The raw schema - * @returns The schema without conflicting metadata + * Transforms the provided schema to increase its compatibility with json-schema-to-typescript + * - replaces `unevaluatedProperties` with `additionalProperties` + * - adds missing titles to objects + * - transforms `additionalProperties.$ref` (with no other props) as $ref + * - transforms inheritance via `$ref` or `additionalProperties.$ref` to `allOf.$ref` + * - removes metadata where only $ref is used + * @param schema + * @param path + * @returns */ -function removeConflictingMetadata(schema: any): any { - const blacklistedProperties = ['title', 'description', 'default']; +function prepareSchema(schema: any, path: string[] = ['#'], parentTitle: string = ''): any { if (!isObject(schema) && !Array.isArray(schema)) { return schema; } if (Array.isArray(schema)) { - return schema.map((item) => removeConflictingMetadata(item)); + return schema.map((item, i) => prepareSchema(item, [...path, i.toString()], parentTitle)); } - return Object.entries(schema).reduce((outputSchema, [key, value]: [string, any]) => { - let newValue = JSON.parse(JSON.stringify(value)); - if (!!newValue['$ref']) { - // leave only $ref if the definition only includes $ref and some metadata. If there are additionnal properties, leave it untouched - blacklistedProperties.forEach((prop) => delete newValue[prop]); - if (Object.keys(newValue).length > 1) { - newValue = JSON.parse(JSON.stringify(value)); + const newSchema = JSON.parse(JSON.stringify(schema)); + const parent = path.slice(-1)[0]; + const schemaKeys = Object.keys(newSchema); + if (!structuralObjectProperties.includes(parent)) { + if (!newSchema.type) { + // not necessary ? + newSchema.type = 'object'; + schemaKeys.push('type'); + } + if (newSchema.title) { + parentTitle = newSchema.title; + } + if ( + !newSchema.title && + (newSchema.type === 'object' || newSchema.type === 'array') && // only naming object or array types + isNaN(parseInt(parent, 10)) && // it comes from a oneOf/anyOf/allOf, it should be titled manually + newSchema.items?.type !== 'string' && // if it's an array of string, it doesn't need to be named + newSchema.items?.type !== 'number' && // if it's an array of number, it doesn't need to be named + schemaKeys.filter((key) => !metadataProperties.includes(key)).length // if it's just a plain object, with nothing but a type an some description + ) { + if (parentTitle.trim()) { + newSchema.title = toPascalCase(`${parentTitle} ${parent}`); + } else { + newSchema.title = toPascalCase( + path + .slice(1) + .filter((part) => !structuralObjectProperties.includes(part) && !structuralArrayProperties.includes(part)) + .join(' '), + ); + } + schemaKeys.push('title'); + parentTitle = newSchema.title; + } + if (newSchema.unevaluatedProperties != null) { + newSchema.additionalProperties = newSchema.unevaluatedProperties; + delete newSchema.unevaluatedProperties; + schemaKeys[schemaKeys.indexOf('unevaluatedProperties')] = 'additionalProperties'; + } + if ( + isObject(newSchema.additionalProperties) && + Object.keys(newSchema.additionalProperties).every((key) => key === '$ref') + ) { + newSchema['$ref'] = newSchema.additionalProperties['$ref']; + delete newSchema.additionalProperties; + schemaKeys[schemaKeys.indexOf('additionalProperties')] = '$ref'; + } + if (newSchema['$ref']) { + if (schemaKeys.filter((key) => !metadataProperties.includes(key)).length == 1) { + // only $ref + metadataProperties.forEach((prop) => delete newSchema[prop]); + } else if (newSchema.properties) { + const $ref = { $ref: newSchema['$ref'] }; + const properties = { + properties: newSchema.properties, + } as any; + delete newSchema['$ref']; + delete newSchema.properties; + newSchema.allOf = [$ref, properties]; } } - outputSchema[key] = removeConflictingMetadata(newValue); + // if (newSchema.additionalProperties?.['$ref'] && newSchema.properties) { // shouldn't happen as it has been migrated to $ref in most cases + // const $ref = { $ref: newSchema.additionalProperties['$ref']}; + // const properties = { + // properties: newSchema.properties + // } as any; + // delete newSchema.additionalProperties; + // delete newSchema.properties; + // newSchema.allOf = [$ref, properties]; + // } + } + return Object.entries(newSchema).reduce((outputSchema, [key, value]: [string, any]) => { + outputSchema[key] = prepareSchema(value, [...path, key], parentTitle); return outputSchema; }, {} as any); } -/** - * Removes duplicate declarations from the provided TypeScript code - * see https://github.com/bcherny/json-schema-to-typescript/issues/193 - * @param tsSource The TypeScript source code to remove the duplicates from - * @returns The source code without duplicates - */ -function removeDuplicateDeclarations(tsSource: string): string { - const project = new Project({ - useInMemoryFileSystem: true, - manipulationSettings: { - quoteKind: QuoteKind.Single, - }, - }); - const sourceFile = project.createSourceFile('declarations.ts', tsSource); - const duplicates = Array.from(sourceFile.getExportedDeclarations()) - .map(([name, _]) => name) - .filter((name) => name.match(/\d$/)); - const newSource = duplicates.reduce( - (src, name) => src.replace(new RegExp(': ' + name, 'g'), ': ' + name.replace(/\d+$/g, '')), - tsSource, - ); - sourceFile.replaceWithText(newSource); - for (const name of duplicates) { - const declaration = sourceFile.getTypeAlias(name) || sourceFile.getInterface(name); - declaration?.remove(); - } - sourceFile.formatText(); - return sourceFile.getFullText(); -} - /** * Generates a TypeScript file containing type declarations that represent the structure defined in the JSON Schema * @param srcFile The path to the JSON Schema file @@ -100,17 +168,19 @@ async function generate(srcFile: string, destFile: string): Promise { *****************************************************************************************/ `, + style: { + singleQuote: true, + }, //unreachableDefinitions: true, }; const schemaText = await readFile(srcFile, { encoding: 'utf-8' }); - const schema = removeConflictingMetadata(JSON.parse(schemaText)); - //const schema = JSON.parse(schemaText); + const schema = prepareSchema(JSON.parse(schemaText)); const declarations = await compile(schema, 'Workflow', options); const destDir = path.dirname(destFile); await reset(destDir); + await writeFile(srcFile.replace('workflow', '__internal_workflow'), JSON.stringify(schema, null, 2)); await writeFile(destFile, declarations); - //await writeFile(destFile, removeDuplicateDeclarations(declarations)); - await writeFile(path.resolve(destDir, 'index.ts'), fileHeader + "export * as Specification from './specification';"); + await writeFile(path.resolve(destDir, 'index.ts'), `${fileHeader}export * as Specification from './specification';`); } const srcFile = path.resolve(schemaDir, 'workflow.json'); diff --git a/tools/3_generate-validation-pointers.ts b/tools/3_generate-validation-pointers.ts index d921a9e9..d60cd0f8 100644 --- a/tools/3_generate-validation-pointers.ts +++ b/tools/3_generate-validation-pointers.ts @@ -88,7 +88,8 @@ ${jsonPointers.reduce((src, [key, value]) => `${src} ${key}: ${value ? `'${valu ); } -const schemaFile = path.resolve(schemaDir, 'workflow.json'); +const schemaFile = path.resolve(schemaDir, '__internal_workflow.json'); +//const schemaFile = path.resolve(schemaDir, 'workflow.json'); const definitionFile = path.resolve(definitionsDir, 'specification.ts'); const destFile = path.resolve(vallidationDir, 'validation-pointers.ts'); diff --git a/tools/utils.ts b/tools/utils.ts index 567e3e58..8941e114 100644 --- a/tools/utils.ts +++ b/tools/utils.ts @@ -42,7 +42,7 @@ export const isObject = (value: unknown): boolean => { }; /** - * Transforms a PascalCased string into a kebab-cased one + * Transforms a PascalCased string or with space into a kebab-cased one * @param source * @returns */ @@ -55,13 +55,29 @@ export const toKebabCase = (source: string): string => .replace(/_+/g, '-') .toLowerCase(); +/** + * Converts a string to pascal case (PascalCase) + * @param source string The string to convert to pascal case + * @returns string The pascal case string + */ +export const toPascalCase = (source: string): string => { + if (!source) return ''; + return source + .replace(/-+/g, ' ') + .replace(/_+/g, ' ') + .replace(/\.+/g, ' ') + .replace(/\s+(.)(\w+)/g, ($1, $2, $3) => `${$2.toUpperCase()}${$3.toLowerCase()}`) + .replace(/\s/g, '') + .replace(/\w/, (s) => s.toUpperCase()); +}; + /** * Normalize to capitalize first letter only convention for know accronyms, eg HTTP -> Http * @param source * @returns */ export const normalizeKnownAllCaps = (source: string): string => - source.replace('API', 'Api').replace('GRPC', 'Grpc').replace('HTTP', 'Http'); + source.replace('API', 'Api').replace('GRPC', 'Grpc').replace('HTTP', 'Http').replace('OAuth2', 'Oauth2'); /** * Get the exported declarations of the provided TypeScript code @@ -76,7 +92,7 @@ export const getExportedDeclarations = (tsSource: string): Array => { }, }); const sourceFile = project.createSourceFile('declarations.ts', tsSource); - return Array.from(sourceFile.getExportedDeclarations()).map(([name, _]) => name); + return Array.from(sourceFile.getExportedDeclarations()).map(([name]) => name); }; /** Schemas directory */ From d8b3f44fa3dc93ccdf345c791868a39b663729fd Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Fri, 26 Jul 2024 16:38:00 +0200 Subject: [PATCH 05/24] Generated classes now reflects their associated type Signed-off-by: Jean-Baptiste Bianchi --- src/lib/builder.ts | 10 +- .../authentication-policy-basic-builder.ts | 12 +- .../authentication-policy-bearer-builder.ts | 12 +- .../builders/authentication-policy-builder.ts | 12 +- .../authentication-policy-oauth2-builder.ts | 12 +- ...entication-policy-oauth2-client-builder.ts | 12 +- .../builders/call-async-api-builder.ts | 12 +- ...l-async-api-with-authentication-builder.ts | 14 +- .../builders/call-async-api-with-builder.ts | 12 +- .../builders/call-function-builder.ts | 12 +- .../builders/call-function-with-builder.ts | 12 +- .../generated/builders/call-grpc-builder.ts | 12 +- .../call-grpc-with-arguments-builder.ts | 12 +- .../builders/call-grpc-with-builder.ts | 12 +- ...rpc-with-service-authentication-builder.ts | 12 +- .../call-grpc-with-service-builder.ts | 12 +- .../generated/builders/call-http-builder.ts | 12 +- .../builders/call-http-with-builder.ts | 12 +- .../call-http-with-endpoint-builder.ts | 12 +- .../builders/call-open-api-builder.ts | 12 +- ...ll-open-api-with-authentication-builder.ts | 14 +- .../builders/call-open-api-with-builder.ts | 12 +- .../call-open-api-with-parameters-builder.ts | 12 +- .../generated/builders/call-task-builder.ts | 12 +- src/lib/generated/builders/do-task-builder.ts | 12 +- .../generated/builders/document-builder.ts | 12 +- .../builders/document-tags-builder.ts | 12 +- .../generated/builders/duration-builder.ts | 12 +- .../generated/builders/emit-task-builder.ts | 12 +- .../builders/emit-task-emit-builder.ts | 12 +- .../builders/emit-task-emit-event-builder.ts | 12 +- .../endpoint-authentication-builder.ts | 12 +- .../generated/builders/endpoint-builder.ts | 12 +- src/lib/generated/builders/error-builder.ts | 12 +- .../event-consumption-strategy-all-builder.ts | 12 +- .../event-consumption-strategy-any-builder.ts | 12 +- .../event-consumption-strategy-builder.ts | 12 +- .../builders/event-filter-builder.ts | 12 +- .../event-filter-correlate-builder.ts | 12 +- .../builders/event-filter-with-builder.ts | 12 +- src/lib/generated/builders/export-builder.ts | 12 +- .../generated/builders/extension-builder.ts | 12 +- ...xternal-resource-authentication-builder.ts | 14 +- .../builders/external-resource-builder.ts | 12 +- .../builders/flow-directive-builder.ts | 12 +- .../generated/builders/for-task-builder.ts | 12 +- .../builders/for-task-for-builder.ts | 12 +- .../generated/builders/fork-task-builder.ts | 12 +- .../builders/fork-task-fork-builder.ts | 12 +- src/lib/generated/builders/index.ts | 4 + src/lib/generated/builders/input-builder.ts | 12 +- .../generated/builders/listen-task-builder.ts | 12 +- .../builders/listen-task-listen-builder.ts | 12 +- .../builders/oauth2-token-builder.ts | 12 +- src/lib/generated/builders/output-builder.ts | 12 +- .../generated/builders/raise-task-builder.ts | 12 +- .../builders/raise-task-raise-builder.ts | 12 +- .../builders/retry-policy-backoff-builder.ts | 12 +- .../builders/retry-policy-builder.ts | 12 +- .../builders/retry-policy-jitter-builder.ts | 12 +- .../retry-policy-limit-attempt-builder.ts | 12 +- .../builders/retry-policy-limit-builder.ts | 12 +- .../generated/builders/run-task-builder.ts | 12 +- .../builders/run-task-run-builder.ts | 12 +- .../run-task-run-container-builder.ts | 12 +- .../builders/run-task-run-script-builder.ts | 12 +- .../run-task-run-shell-arguments-builder.ts | 12 +- .../builders/run-task-run-shell-builder.ts | 12 +- .../run-task-run-shell-environment-builder.ts | 12 +- .../builders/run-task-run-workflow-builder.ts | 12 +- .../run-task-run-workflow-input-builder.ts | 12 +- .../generated/builders/schedule-builder.ts | 12 +- src/lib/generated/builders/schema-builder.ts | 12 +- .../generated/builders/set-task-builder.ts | 12 +- .../builders/set-task-set-builder.ts | 12 +- .../generated/builders/switch-task-builder.ts | 12 +- .../builders/switch-task-switch-builder.ts | 12 +- .../generated/builders/task-base-builder.ts | 12 +- src/lib/generated/builders/task-builder.ts | 12 +- .../generated/builders/task-list-builder.ts | 12 +- src/lib/generated/builders/timeout-builder.ts | 12 +- .../generated/builders/try-task-builder.ts | 12 +- .../builders/try-task-catch-builder.ts | 12 +- .../builders/use-authentications-builder.ts | 41 + src/lib/generated/builders/use-builder.ts | 12 +- .../generated/builders/use-errors-builder.ts | 41 + .../builders/use-extensions-builder.ts | 12 +- .../builders/use-functions-builder.ts | 41 + .../generated/builders/use-retries-builder.ts | 41 + .../generated/builders/wait-task-builder.ts | 12 +- .../generated/builders/workflow-builder.ts | 12 +- .../classes/authentication-policy-basic.ts | 15 +- .../classes/authentication-policy-bearer.ts | 15 +- .../authentication-policy-oauth2-client.ts | 15 +- .../classes/authentication-policy-oauth2.ts | 15 +- .../classes/authentication-policy.ts | 13 +- .../call-async-api-with-authentication.ts | 15 +- .../generated/classes/call-async-api-with.ts | 13 +- src/lib/generated/classes/call-async-api.ts | 13 +- .../generated/classes/call-function-with.ts | 13 +- src/lib/generated/classes/call-function.ts | 13 +- .../classes/call-grpc-with-arguments.ts | 15 +- .../call-grpc-with-service-authentication.ts | 15 +- .../classes/call-grpc-with-service.ts | 13 +- src/lib/generated/classes/call-grpc-with.ts | 13 +- src/lib/generated/classes/call-grpc.ts | 13 +- .../classes/call-http-with-endpoint.ts | 13 +- src/lib/generated/classes/call-http-with.ts | 13 +- src/lib/generated/classes/call-http.ts | 13 +- .../call-open-api-with-authentication.ts | 15 +- .../classes/call-open-api-with-parameters.ts | 15 +- .../generated/classes/call-open-api-with.ts | 13 +- src/lib/generated/classes/call-open-api.ts | 13 +- src/lib/generated/classes/call-task.ts | 13 +- src/lib/generated/classes/do-task.ts | 13 +- src/lib/generated/classes/document-tags.ts | 13 +- src/lib/generated/classes/document.ts | 13 +- src/lib/generated/classes/duration.ts | 13 +- .../generated/classes/emit-task-emit-event.ts | 13 +- src/lib/generated/classes/emit-task-emit.ts | 13 +- src/lib/generated/classes/emit-task.ts | 13 +- .../classes/endpoint-authentication.ts | 15 +- src/lib/generated/classes/endpoint.ts | 13 +- src/lib/generated/classes/error.ts | 13 +- .../classes/event-consumption-strategy-all.ts | 15 +- .../classes/event-consumption-strategy-any.ts | 15 +- .../classes/event-consumption-strategy.ts | 15 +- .../classes/event-filter-correlate.ts | 13 +- .../generated/classes/event-filter-with.ts | 13 +- src/lib/generated/classes/event-filter.ts | 13 +- src/lib/generated/classes/export.ts | 13 +- src/lib/generated/classes/extension.ts | 13 +- .../external-resource-authentication.ts | 15 +- .../generated/classes/external-resource.ts | 13 +- src/lib/generated/classes/flow-directive.ts | 13 +- src/lib/generated/classes/for-task-for.ts | 13 +- src/lib/generated/classes/for-task.ts | 13 +- src/lib/generated/classes/fork-task-fork.ts | 13 +- src/lib/generated/classes/fork-task.ts | 13 +- src/lib/generated/classes/index.ts | 8 + src/lib/generated/classes/input.ts | 13 +- .../generated/classes/listen-task-listen.ts | 13 +- src/lib/generated/classes/listen-task.ts | 13 +- src/lib/generated/classes/oauth2-token.ts | 13 +- src/lib/generated/classes/output.ts | 13 +- src/lib/generated/classes/raise-task-raise.ts | 13 +- src/lib/generated/classes/raise-task.ts | 13 +- .../generated/classes/retry-policy-backoff.ts | 13 +- .../generated/classes/retry-policy-jitter.ts | 13 +- .../classes/retry-policy-limit-attempt.ts | 15 +- .../generated/classes/retry-policy-limit.ts | 13 +- src/lib/generated/classes/retry-policy.ts | 13 +- .../classes/run-task-run-container.ts | 13 +- .../generated/classes/run-task-run-script.ts | 13 +- .../classes/run-task-run-shell-arguments.ts | 15 +- .../classes/run-task-run-shell-environment.ts | 15 +- .../generated/classes/run-task-run-shell.ts | 13 +- .../classes/run-task-run-workflow-input.ts | 15 +- .../classes/run-task-run-workflow.ts | 13 +- src/lib/generated/classes/run-task-run.ts | 13 +- src/lib/generated/classes/run-task.ts | 13 +- src/lib/generated/classes/schedule.ts | 13 +- src/lib/generated/classes/schema.ts | 13 +- src/lib/generated/classes/set-task-set.ts | 13 +- src/lib/generated/classes/set-task.ts | 13 +- .../generated/classes/switch-task-switch.ts | 13 +- src/lib/generated/classes/switch-task.ts | 13 +- src/lib/generated/classes/task-base.ts | 13 +- src/lib/generated/classes/task-list.ts | 13 +- src/lib/generated/classes/task.ts | 13 +- src/lib/generated/classes/timeout.ts | 13 +- src/lib/generated/classes/try-task-catch.ts | 13 +- src/lib/generated/classes/try-task.ts | 13 +- .../generated/classes/use-authentications.ts | 12 + src/lib/generated/classes/use-errors.ts | 12 + src/lib/generated/classes/use-extensions.ts | 13 +- src/lib/generated/classes/use-functions.ts | 12 + src/lib/generated/classes/use-retries.ts | 12 + src/lib/generated/classes/use.ts | 13 +- src/lib/generated/classes/wait-task.ts | 13 +- src/lib/generated/classes/workflow.ts | 13 +- .../generated/definitions/specification.ts | 32 +- .../generated/schema/__internal_workflow.json | 1449 +++++++++-------- .../validation/validation-pointers.ts | 73 +- src/lib/reflector.ts | 13 + src/lib/utils.ts | 9 + src/lib/validation.ts | 30 +- tests/builders/builder.spec.ts | 16 +- tests/builders/call-http-builder.spec.ts | 9 +- tests/classes/workflow.spec.ts | 12 +- tests/validation/workflow-validation.spec.ts | 11 + tools/2_generate-definitions.ts | 71 +- tools/4_generate-classes.ts | 15 +- tools/5_generate-builders.ts | 51 +- 194 files changed, 2671 insertions(+), 1521 deletions(-) create mode 100644 src/lib/generated/builders/use-authentications-builder.ts create mode 100644 src/lib/generated/builders/use-errors-builder.ts create mode 100644 src/lib/generated/builders/use-functions-builder.ts create mode 100644 src/lib/generated/builders/use-retries-builder.ts create mode 100644 src/lib/generated/classes/use-authentications.ts create mode 100644 src/lib/generated/classes/use-errors.ts create mode 100644 src/lib/generated/classes/use-functions.ts create mode 100644 src/lib/generated/classes/use-retries.ts create mode 100644 src/lib/reflector.ts create mode 100644 src/lib/utils.ts create mode 100644 tests/validation/workflow-validation.spec.ts diff --git a/src/lib/builder.ts b/src/lib/builder.ts index ec8d0c85..7bd2c6df 100644 --- a/src/lib/builder.ts +++ b/src/lib/builder.ts @@ -19,7 +19,7 @@ * Represents a fluent builder proxy */ export type Builder = { - build: () => T; + build: (validate?: boolean) => T; } & { [K in keyof T]-?: (arg: T[K]) => Builder; }; @@ -29,8 +29,8 @@ export type Builder = { * @param data The object to "build" * @returns */ -function defaultBuildingFn(data: Partial): () => T { - return () => data as T; +function defaultBuildingFn(data: Partial): T { + return data as T; } /** @@ -38,12 +38,12 @@ function defaultBuildingFn(data: Partial): () => T { * @param {Function} buildingFn The function used to validate and produce the object on build() * @returns {Builder} A fluent builder */ -export function builder(buildingFn?: (data: Partial) => () => T): Builder { +export function builder(buildingFn?: (data: Partial) => T): Builder { const data: Partial = {}; const proxy = new Proxy({} as Builder, { get: (_, prop) => { if (prop === 'build') { - return (buildingFn || defaultBuildingFn)(data); + return (validate: boolean = true) => (validate ? (buildingFn || defaultBuildingFn)(data) : data); } return (value: unknown): Builder => { (data as any)[prop.toString()] = value; diff --git a/src/lib/generated/builders/authentication-policy-basic-builder.ts b/src/lib/generated/builders/authentication-policy-basic-builder.ts index a12f66d1..ee79b66e 100644 --- a/src/lib/generated/builders/authentication-policy-basic-builder.ts +++ b/src/lib/generated/builders/authentication-policy-basic-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.AuthenticationPolicyBasic} data The underlying object * @returns {Specification.AuthenticationPolicyBasic} The validated underlying object */ -function buildingFn(data: Specification.AuthenticationPolicyBasic): () => Specification.AuthenticationPolicyBasic { - return () => { - const model = new Classes.AuthenticationPolicyBasic(); - Object.assign(model, data); +function buildingFn(data: Specification.AuthenticationPolicyBasic): Specification.AuthenticationPolicyBasic { + const model = new Classes.AuthenticationPolicyBasic(); + Object.assign(model, data); - validate('AuthenticationPolicyBasic', model); - return model as Specification.AuthenticationPolicyBasic; - }; + validate('AuthenticationPolicyBasic', model); + return model as Specification.AuthenticationPolicyBasic; } /** diff --git a/src/lib/generated/builders/authentication-policy-bearer-builder.ts b/src/lib/generated/builders/authentication-policy-bearer-builder.ts index 71100656..9f34a819 100644 --- a/src/lib/generated/builders/authentication-policy-bearer-builder.ts +++ b/src/lib/generated/builders/authentication-policy-bearer-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.AuthenticationPolicyBearer} data The underlying object * @returns {Specification.AuthenticationPolicyBearer} The validated underlying object */ -function buildingFn(data: Specification.AuthenticationPolicyBearer): () => Specification.AuthenticationPolicyBearer { - return () => { - const model = new Classes.AuthenticationPolicyBearer(); - Object.assign(model, data); +function buildingFn(data: Specification.AuthenticationPolicyBearer): Specification.AuthenticationPolicyBearer { + const model = new Classes.AuthenticationPolicyBearer(); + Object.assign(model, data); - validate('AuthenticationPolicyBearer', model); - return model as Specification.AuthenticationPolicyBearer; - }; + validate('AuthenticationPolicyBearer', model); + return model as Specification.AuthenticationPolicyBearer; } /** diff --git a/src/lib/generated/builders/authentication-policy-builder.ts b/src/lib/generated/builders/authentication-policy-builder.ts index 30a6e8af..53346682 100644 --- a/src/lib/generated/builders/authentication-policy-builder.ts +++ b/src/lib/generated/builders/authentication-policy-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.AuthenticationPolicy} data The underlying object * @returns {Specification.AuthenticationPolicy} The validated underlying object */ -function buildingFn(data: Specification.AuthenticationPolicy): () => Specification.AuthenticationPolicy { - return () => { - const model = new Classes.AuthenticationPolicy(); - Object.assign(model, data); +function buildingFn(data: Specification.AuthenticationPolicy): Specification.AuthenticationPolicy { + const model = new Classes.AuthenticationPolicy(); + Object.assign(model, data); - validate('AuthenticationPolicy', model); - return model as Specification.AuthenticationPolicy; - }; + validate('AuthenticationPolicy', model); + return model as Specification.AuthenticationPolicy; } /** diff --git a/src/lib/generated/builders/authentication-policy-oauth2-builder.ts b/src/lib/generated/builders/authentication-policy-oauth2-builder.ts index 755b6639..521c851f 100644 --- a/src/lib/generated/builders/authentication-policy-oauth2-builder.ts +++ b/src/lib/generated/builders/authentication-policy-oauth2-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.AuthenticationPolicyOauth2} data The underlying object * @returns {Specification.AuthenticationPolicyOauth2} The validated underlying object */ -function buildingFn(data: Specification.AuthenticationPolicyOauth2): () => Specification.AuthenticationPolicyOauth2 { - return () => { - const model = new Classes.AuthenticationPolicyOauth2(); - Object.assign(model, data); +function buildingFn(data: Specification.AuthenticationPolicyOauth2): Specification.AuthenticationPolicyOauth2 { + const model = new Classes.AuthenticationPolicyOauth2(); + Object.assign(model, data); - validate('AuthenticationPolicyOauth2', model); - return model as Specification.AuthenticationPolicyOauth2; - }; + validate('AuthenticationPolicyOauth2', model); + return model as Specification.AuthenticationPolicyOauth2; } /** diff --git a/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts b/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts index abc82d89..33f54f17 100644 --- a/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts +++ b/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts @@ -26,14 +26,12 @@ import { Specification } from '../definitions'; */ function buildingFn( data: Specification.AuthenticationPolicyOauth2Client, -): () => Specification.AuthenticationPolicyOauth2Client { - return () => { - const model = new Classes.AuthenticationPolicyOauth2Client(); - Object.assign(model, data); +): Specification.AuthenticationPolicyOauth2Client { + const model = new Classes.AuthenticationPolicyOauth2Client(); + Object.assign(model, data); - validate('AuthenticationPolicyOauth2Client', model); - return model as Specification.AuthenticationPolicyOauth2Client; - }; + validate('AuthenticationPolicyOauth2Client', model); + return model as Specification.AuthenticationPolicyOauth2Client; } /** diff --git a/src/lib/generated/builders/call-async-api-builder.ts b/src/lib/generated/builders/call-async-api-builder.ts index 4179b8b9..894e84eb 100644 --- a/src/lib/generated/builders/call-async-api-builder.ts +++ b/src/lib/generated/builders/call-async-api-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.CallAsyncAPI} data The underlying object * @returns {Specification.CallAsyncAPI} The validated underlying object */ -function buildingFn(data: Specification.CallAsyncAPI): () => Specification.CallAsyncAPI { - return () => { - const model = new Classes.CallAsyncAPI(); - Object.assign(model, data); +function buildingFn(data: Specification.CallAsyncAPI): Specification.CallAsyncAPI { + const model = new Classes.CallAsyncAPI(); + Object.assign(model, data); - validate('CallAsyncAPI', model); - return model as Specification.CallAsyncAPI; - }; + validate('CallAsyncAPI', model); + return model as Specification.CallAsyncAPI; } /** diff --git a/src/lib/generated/builders/call-async-api-with-authentication-builder.ts b/src/lib/generated/builders/call-async-api-with-authentication-builder.ts index 458b3097..c1aec40f 100644 --- a/src/lib/generated/builders/call-async-api-with-authentication-builder.ts +++ b/src/lib/generated/builders/call-async-api-with-authentication-builder.ts @@ -24,16 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.CallAsyncAPIWithAuthentication} data The underlying object * @returns {Specification.CallAsyncAPIWithAuthentication} The validated underlying object */ -function buildingFn( - data: Specification.CallAsyncAPIWithAuthentication, -): () => Specification.CallAsyncAPIWithAuthentication { - return () => { - const model = new Classes.CallAsyncAPIWithAuthentication(); - Object.assign(model, data); +function buildingFn(data: Specification.CallAsyncAPIWithAuthentication): Specification.CallAsyncAPIWithAuthentication { + const model = new Classes.CallAsyncAPIWithAuthentication(); + Object.assign(model, data); - validate('CallAsyncAPIWithAuthentication', model); - return model as Specification.CallAsyncAPIWithAuthentication; - }; + validate('CallAsyncAPIWithAuthentication', model); + return model as Specification.CallAsyncAPIWithAuthentication; } /** diff --git a/src/lib/generated/builders/call-async-api-with-builder.ts b/src/lib/generated/builders/call-async-api-with-builder.ts index 9d5c50c5..c9146f86 100644 --- a/src/lib/generated/builders/call-async-api-with-builder.ts +++ b/src/lib/generated/builders/call-async-api-with-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.CallAsyncAPIWith} data The underlying object * @returns {Specification.CallAsyncAPIWith} The validated underlying object */ -function buildingFn(data: Specification.CallAsyncAPIWith): () => Specification.CallAsyncAPIWith { - return () => { - const model = new Classes.CallAsyncAPIWith(); - Object.assign(model, data); +function buildingFn(data: Specification.CallAsyncAPIWith): Specification.CallAsyncAPIWith { + const model = new Classes.CallAsyncAPIWith(); + Object.assign(model, data); - validate('CallAsyncAPIWith', model); - return model as Specification.CallAsyncAPIWith; - }; + validate('CallAsyncAPIWith', model); + return model as Specification.CallAsyncAPIWith; } /** diff --git a/src/lib/generated/builders/call-function-builder.ts b/src/lib/generated/builders/call-function-builder.ts index da47b823..dafa72b6 100644 --- a/src/lib/generated/builders/call-function-builder.ts +++ b/src/lib/generated/builders/call-function-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.CallFunction} data The underlying object * @returns {Specification.CallFunction} The validated underlying object */ -function buildingFn(data: Specification.CallFunction): () => Specification.CallFunction { - return () => { - const model = new Classes.CallFunction(); - Object.assign(model, data); +function buildingFn(data: Specification.CallFunction): Specification.CallFunction { + const model = new Classes.CallFunction(); + Object.assign(model, data); - validate('CallFunction', model); - return model as Specification.CallFunction; - }; + validate('CallFunction', model); + return model as Specification.CallFunction; } /** diff --git a/src/lib/generated/builders/call-function-with-builder.ts b/src/lib/generated/builders/call-function-with-builder.ts index d6e03e6f..5a3c33a8 100644 --- a/src/lib/generated/builders/call-function-with-builder.ts +++ b/src/lib/generated/builders/call-function-with-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.CallFunctionWith} data The underlying object * @returns {Specification.CallFunctionWith} The validated underlying object */ -function buildingFn(data: Specification.CallFunctionWith): () => Specification.CallFunctionWith { - return () => { - const model = new Classes.CallFunctionWith(); - Object.assign(model, data); +function buildingFn(data: Specification.CallFunctionWith): Specification.CallFunctionWith { + const model = new Classes.CallFunctionWith(); + Object.assign(model, data); - validate('CallFunctionWith', model); - return model as Specification.CallFunctionWith; - }; + validate('CallFunctionWith', model); + return model as Specification.CallFunctionWith; } /** diff --git a/src/lib/generated/builders/call-grpc-builder.ts b/src/lib/generated/builders/call-grpc-builder.ts index 2a5183b1..762797e8 100644 --- a/src/lib/generated/builders/call-grpc-builder.ts +++ b/src/lib/generated/builders/call-grpc-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.CallGRPC} data The underlying object * @returns {Specification.CallGRPC} The validated underlying object */ -function buildingFn(data: Specification.CallGRPC): () => Specification.CallGRPC { - return () => { - const model = new Classes.CallGRPC(); - Object.assign(model, data); +function buildingFn(data: Specification.CallGRPC): Specification.CallGRPC { + const model = new Classes.CallGRPC(); + Object.assign(model, data); - validate('CallGRPC', model); - return model as Specification.CallGRPC; - }; + validate('CallGRPC', model); + return model as Specification.CallGRPC; } /** diff --git a/src/lib/generated/builders/call-grpc-with-arguments-builder.ts b/src/lib/generated/builders/call-grpc-with-arguments-builder.ts index 3801fa54..6c235608 100644 --- a/src/lib/generated/builders/call-grpc-with-arguments-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-arguments-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.CallGRPCWithArguments} data The underlying object * @returns {Specification.CallGRPCWithArguments} The validated underlying object */ -function buildingFn(data: Specification.CallGRPCWithArguments): () => Specification.CallGRPCWithArguments { - return () => { - const model = new Classes.CallGRPCWithArguments(); - Object.assign(model, data); +function buildingFn(data: Specification.CallGRPCWithArguments): Specification.CallGRPCWithArguments { + const model = new Classes.CallGRPCWithArguments(); + Object.assign(model, data); - validate('CallGRPCWithArguments', model); - return model as Specification.CallGRPCWithArguments; - }; + validate('CallGRPCWithArguments', model); + return model as Specification.CallGRPCWithArguments; } /** diff --git a/src/lib/generated/builders/call-grpc-with-builder.ts b/src/lib/generated/builders/call-grpc-with-builder.ts index 93538133..92f33004 100644 --- a/src/lib/generated/builders/call-grpc-with-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.CallGRPCWith} data The underlying object * @returns {Specification.CallGRPCWith} The validated underlying object */ -function buildingFn(data: Specification.CallGRPCWith): () => Specification.CallGRPCWith { - return () => { - const model = new Classes.CallGRPCWith(); - Object.assign(model, data); +function buildingFn(data: Specification.CallGRPCWith): Specification.CallGRPCWith { + const model = new Classes.CallGRPCWith(); + Object.assign(model, data); - validate('CallGRPCWith', model); - return model as Specification.CallGRPCWith; - }; + validate('CallGRPCWith', model); + return model as Specification.CallGRPCWith; } /** diff --git a/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts b/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts index c9e52ac1..fa13533f 100644 --- a/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts @@ -26,14 +26,12 @@ import { Specification } from '../definitions'; */ function buildingFn( data: Specification.CallGRPCWithServiceAuthentication, -): () => Specification.CallGRPCWithServiceAuthentication { - return () => { - const model = new Classes.CallGRPCWithServiceAuthentication(); - Object.assign(model, data); +): Specification.CallGRPCWithServiceAuthentication { + const model = new Classes.CallGRPCWithServiceAuthentication(); + Object.assign(model, data); - validate('CallGRPCWithServiceAuthentication', model); - return model as Specification.CallGRPCWithServiceAuthentication; - }; + validate('CallGRPCWithServiceAuthentication', model); + return model as Specification.CallGRPCWithServiceAuthentication; } /** diff --git a/src/lib/generated/builders/call-grpc-with-service-builder.ts b/src/lib/generated/builders/call-grpc-with-service-builder.ts index 0574dcdf..1ab8ded8 100644 --- a/src/lib/generated/builders/call-grpc-with-service-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-service-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.CallGRPCWithService} data The underlying object * @returns {Specification.CallGRPCWithService} The validated underlying object */ -function buildingFn(data: Specification.CallGRPCWithService): () => Specification.CallGRPCWithService { - return () => { - const model = new Classes.CallGRPCWithService(); - Object.assign(model, data); +function buildingFn(data: Specification.CallGRPCWithService): Specification.CallGRPCWithService { + const model = new Classes.CallGRPCWithService(); + Object.assign(model, data); - validate('CallGRPCWithService', model); - return model as Specification.CallGRPCWithService; - }; + validate('CallGRPCWithService', model); + return model as Specification.CallGRPCWithService; } /** diff --git a/src/lib/generated/builders/call-http-builder.ts b/src/lib/generated/builders/call-http-builder.ts index 3345aa16..fb3d7dfa 100644 --- a/src/lib/generated/builders/call-http-builder.ts +++ b/src/lib/generated/builders/call-http-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.CallHTTP} data The underlying object * @returns {Specification.CallHTTP} The validated underlying object */ -function buildingFn(data: Specification.CallHTTP): () => Specification.CallHTTP { - return () => { - const model = new Classes.CallHTTP(); - Object.assign(model, data); +function buildingFn(data: Specification.CallHTTP): Specification.CallHTTP { + const model = new Classes.CallHTTP(); + Object.assign(model, data); - validate('CallHTTP', model); - return model as Specification.CallHTTP; - }; + validate('CallHTTP', model); + return model as Specification.CallHTTP; } /** diff --git a/src/lib/generated/builders/call-http-with-builder.ts b/src/lib/generated/builders/call-http-with-builder.ts index 6312119f..1942ae6f 100644 --- a/src/lib/generated/builders/call-http-with-builder.ts +++ b/src/lib/generated/builders/call-http-with-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.CallHTTPWith} data The underlying object * @returns {Specification.CallHTTPWith} The validated underlying object */ -function buildingFn(data: Specification.CallHTTPWith): () => Specification.CallHTTPWith { - return () => { - const model = new Classes.CallHTTPWith(); - Object.assign(model, data); +function buildingFn(data: Specification.CallHTTPWith): Specification.CallHTTPWith { + const model = new Classes.CallHTTPWith(); + Object.assign(model, data); - validate('CallHTTPWith', model); - return model as Specification.CallHTTPWith; - }; + validate('CallHTTPWith', model); + return model as Specification.CallHTTPWith; } /** diff --git a/src/lib/generated/builders/call-http-with-endpoint-builder.ts b/src/lib/generated/builders/call-http-with-endpoint-builder.ts index 8f5de546..373016dc 100644 --- a/src/lib/generated/builders/call-http-with-endpoint-builder.ts +++ b/src/lib/generated/builders/call-http-with-endpoint-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.CallHTTPWithEndpoint} data The underlying object * @returns {Specification.CallHTTPWithEndpoint} The validated underlying object */ -function buildingFn(data: Specification.CallHTTPWithEndpoint): () => Specification.CallHTTPWithEndpoint { - return () => { - const model = new Classes.CallHTTPWithEndpoint(); - Object.assign(model, data); +function buildingFn(data: Specification.CallHTTPWithEndpoint): Specification.CallHTTPWithEndpoint { + const model = new Classes.CallHTTPWithEndpoint(); + Object.assign(model, data); - validate('CallHTTPWithEndpoint', model); - return model as Specification.CallHTTPWithEndpoint; - }; + validate('CallHTTPWithEndpoint', model); + return model as Specification.CallHTTPWithEndpoint; } /** diff --git a/src/lib/generated/builders/call-open-api-builder.ts b/src/lib/generated/builders/call-open-api-builder.ts index 99263d5f..20eabe37 100644 --- a/src/lib/generated/builders/call-open-api-builder.ts +++ b/src/lib/generated/builders/call-open-api-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.CallOpenAPI} data The underlying object * @returns {Specification.CallOpenAPI} The validated underlying object */ -function buildingFn(data: Specification.CallOpenAPI): () => Specification.CallOpenAPI { - return () => { - const model = new Classes.CallOpenAPI(); - Object.assign(model, data); +function buildingFn(data: Specification.CallOpenAPI): Specification.CallOpenAPI { + const model = new Classes.CallOpenAPI(); + Object.assign(model, data); - validate('CallOpenAPI', model); - return model as Specification.CallOpenAPI; - }; + validate('CallOpenAPI', model); + return model as Specification.CallOpenAPI; } /** diff --git a/src/lib/generated/builders/call-open-api-with-authentication-builder.ts b/src/lib/generated/builders/call-open-api-with-authentication-builder.ts index 43398290..a88d8cc2 100644 --- a/src/lib/generated/builders/call-open-api-with-authentication-builder.ts +++ b/src/lib/generated/builders/call-open-api-with-authentication-builder.ts @@ -24,16 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.CallOpenAPIWithAuthentication} data The underlying object * @returns {Specification.CallOpenAPIWithAuthentication} The validated underlying object */ -function buildingFn( - data: Specification.CallOpenAPIWithAuthentication, -): () => Specification.CallOpenAPIWithAuthentication { - return () => { - const model = new Classes.CallOpenAPIWithAuthentication(); - Object.assign(model, data); +function buildingFn(data: Specification.CallOpenAPIWithAuthentication): Specification.CallOpenAPIWithAuthentication { + const model = new Classes.CallOpenAPIWithAuthentication(); + Object.assign(model, data); - validate('CallOpenAPIWithAuthentication', model); - return model as Specification.CallOpenAPIWithAuthentication; - }; + validate('CallOpenAPIWithAuthentication', model); + return model as Specification.CallOpenAPIWithAuthentication; } /** diff --git a/src/lib/generated/builders/call-open-api-with-builder.ts b/src/lib/generated/builders/call-open-api-with-builder.ts index 7973ad08..7e5bf80f 100644 --- a/src/lib/generated/builders/call-open-api-with-builder.ts +++ b/src/lib/generated/builders/call-open-api-with-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.CallOpenAPIWith} data The underlying object * @returns {Specification.CallOpenAPIWith} The validated underlying object */ -function buildingFn(data: Specification.CallOpenAPIWith): () => Specification.CallOpenAPIWith { - return () => { - const model = new Classes.CallOpenAPIWith(); - Object.assign(model, data); +function buildingFn(data: Specification.CallOpenAPIWith): Specification.CallOpenAPIWith { + const model = new Classes.CallOpenAPIWith(); + Object.assign(model, data); - validate('CallOpenAPIWith', model); - return model as Specification.CallOpenAPIWith; - }; + validate('CallOpenAPIWith', model); + return model as Specification.CallOpenAPIWith; } /** diff --git a/src/lib/generated/builders/call-open-api-with-parameters-builder.ts b/src/lib/generated/builders/call-open-api-with-parameters-builder.ts index 2c05fe14..a711b496 100644 --- a/src/lib/generated/builders/call-open-api-with-parameters-builder.ts +++ b/src/lib/generated/builders/call-open-api-with-parameters-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.CallOpenAPIWithParameters} data The underlying object * @returns {Specification.CallOpenAPIWithParameters} The validated underlying object */ -function buildingFn(data: Specification.CallOpenAPIWithParameters): () => Specification.CallOpenAPIWithParameters { - return () => { - const model = new Classes.CallOpenAPIWithParameters(); - Object.assign(model, data); +function buildingFn(data: Specification.CallOpenAPIWithParameters): Specification.CallOpenAPIWithParameters { + const model = new Classes.CallOpenAPIWithParameters(); + Object.assign(model, data); - validate('CallOpenAPIWithParameters', model); - return model as Specification.CallOpenAPIWithParameters; - }; + validate('CallOpenAPIWithParameters', model); + return model as Specification.CallOpenAPIWithParameters; } /** diff --git a/src/lib/generated/builders/call-task-builder.ts b/src/lib/generated/builders/call-task-builder.ts index af0fff54..3be1cca3 100644 --- a/src/lib/generated/builders/call-task-builder.ts +++ b/src/lib/generated/builders/call-task-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.CallTask} data The underlying object * @returns {Specification.CallTask} The validated underlying object */ -function buildingFn(data: Specification.CallTask): () => Specification.CallTask { - return () => { - const model = new Classes.CallTask(); - Object.assign(model, data); +function buildingFn(data: Specification.CallTask): Specification.CallTask { + const model = new Classes.CallTask(); + Object.assign(model, data); - validate('CallTask', model); - return model as Specification.CallTask; - }; + validate('CallTask', model); + return model as Specification.CallTask; } /** diff --git a/src/lib/generated/builders/do-task-builder.ts b/src/lib/generated/builders/do-task-builder.ts index af0f047b..ad405999 100644 --- a/src/lib/generated/builders/do-task-builder.ts +++ b/src/lib/generated/builders/do-task-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.DoTask} data The underlying object * @returns {Specification.DoTask} The validated underlying object */ -function buildingFn(data: Specification.DoTask): () => Specification.DoTask { - return () => { - const model = new Classes.DoTask(); - Object.assign(model, data); +function buildingFn(data: Specification.DoTask): Specification.DoTask { + const model = new Classes.DoTask(); + Object.assign(model, data); - validate('DoTask', model); - return model as Specification.DoTask; - }; + validate('DoTask', model); + return model as Specification.DoTask; } /** diff --git a/src/lib/generated/builders/document-builder.ts b/src/lib/generated/builders/document-builder.ts index bb71c858..ca0c0c64 100644 --- a/src/lib/generated/builders/document-builder.ts +++ b/src/lib/generated/builders/document-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.Document} data The underlying object * @returns {Specification.Document} The validated underlying object */ -function buildingFn(data: Specification.Document): () => Specification.Document { - return () => { - const model = new Classes.Document(); - Object.assign(model, data); +function buildingFn(data: Specification.Document): Specification.Document { + const model = new Classes.Document(); + Object.assign(model, data); - validate('Document', model); - return model as Specification.Document; - }; + validate('Document', model); + return model as Specification.Document; } /** diff --git a/src/lib/generated/builders/document-tags-builder.ts b/src/lib/generated/builders/document-tags-builder.ts index 8c40edc0..c3e13f1e 100644 --- a/src/lib/generated/builders/document-tags-builder.ts +++ b/src/lib/generated/builders/document-tags-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.DocumentTags} data The underlying object * @returns {Specification.DocumentTags} The validated underlying object */ -function buildingFn(data: Specification.DocumentTags): () => Specification.DocumentTags { - return () => { - const model = new Classes.DocumentTags(); - Object.assign(model, data); +function buildingFn(data: Specification.DocumentTags): Specification.DocumentTags { + const model = new Classes.DocumentTags(); + Object.assign(model, data); - validate('DocumentTags', model); - return model as Specification.DocumentTags; - }; + validate('DocumentTags', model); + return model as Specification.DocumentTags; } /** diff --git a/src/lib/generated/builders/duration-builder.ts b/src/lib/generated/builders/duration-builder.ts index fca4a2d8..9723b863 100644 --- a/src/lib/generated/builders/duration-builder.ts +++ b/src/lib/generated/builders/duration-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.Duration} data The underlying object * @returns {Specification.Duration} The validated underlying object */ -function buildingFn(data: Specification.Duration): () => Specification.Duration { - return () => { - const model = new Classes.Duration(); - Object.assign(model, data); +function buildingFn(data: Specification.Duration): Specification.Duration { + const model = new Classes.Duration(); + Object.assign(model, data); - validate('Duration', model); - return model as Specification.Duration; - }; + validate('Duration', model); + return model as Specification.Duration; } /** diff --git a/src/lib/generated/builders/emit-task-builder.ts b/src/lib/generated/builders/emit-task-builder.ts index 9f2057a7..3099cb1c 100644 --- a/src/lib/generated/builders/emit-task-builder.ts +++ b/src/lib/generated/builders/emit-task-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.EmitTask} data The underlying object * @returns {Specification.EmitTask} The validated underlying object */ -function buildingFn(data: Specification.EmitTask): () => Specification.EmitTask { - return () => { - const model = new Classes.EmitTask(); - Object.assign(model, data); +function buildingFn(data: Specification.EmitTask): Specification.EmitTask { + const model = new Classes.EmitTask(); + Object.assign(model, data); - validate('EmitTask', model); - return model as Specification.EmitTask; - }; + validate('EmitTask', model); + return model as Specification.EmitTask; } /** diff --git a/src/lib/generated/builders/emit-task-emit-builder.ts b/src/lib/generated/builders/emit-task-emit-builder.ts index b0bff1cb..53123537 100644 --- a/src/lib/generated/builders/emit-task-emit-builder.ts +++ b/src/lib/generated/builders/emit-task-emit-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.EmitTaskEmit} data The underlying object * @returns {Specification.EmitTaskEmit} The validated underlying object */ -function buildingFn(data: Specification.EmitTaskEmit): () => Specification.EmitTaskEmit { - return () => { - const model = new Classes.EmitTaskEmit(); - Object.assign(model, data); +function buildingFn(data: Specification.EmitTaskEmit): Specification.EmitTaskEmit { + const model = new Classes.EmitTaskEmit(); + Object.assign(model, data); - validate('EmitTaskEmit', model); - return model as Specification.EmitTaskEmit; - }; + validate('EmitTaskEmit', model); + return model as Specification.EmitTaskEmit; } /** diff --git a/src/lib/generated/builders/emit-task-emit-event-builder.ts b/src/lib/generated/builders/emit-task-emit-event-builder.ts index 4e7b41fe..b4604b73 100644 --- a/src/lib/generated/builders/emit-task-emit-event-builder.ts +++ b/src/lib/generated/builders/emit-task-emit-event-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.EmitTaskEmitEvent} data The underlying object * @returns {Specification.EmitTaskEmitEvent} The validated underlying object */ -function buildingFn(data: Specification.EmitTaskEmitEvent): () => Specification.EmitTaskEmitEvent { - return () => { - const model = new Classes.EmitTaskEmitEvent(); - Object.assign(model, data); +function buildingFn(data: Specification.EmitTaskEmitEvent): Specification.EmitTaskEmitEvent { + const model = new Classes.EmitTaskEmitEvent(); + Object.assign(model, data); - validate('EmitTaskEmitEvent', model); - return model as Specification.EmitTaskEmitEvent; - }; + validate('EmitTaskEmitEvent', model); + return model as Specification.EmitTaskEmitEvent; } /** diff --git a/src/lib/generated/builders/endpoint-authentication-builder.ts b/src/lib/generated/builders/endpoint-authentication-builder.ts index b8aa0bb1..b4da1c4f 100644 --- a/src/lib/generated/builders/endpoint-authentication-builder.ts +++ b/src/lib/generated/builders/endpoint-authentication-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.EndpointAuthentication} data The underlying object * @returns {Specification.EndpointAuthentication} The validated underlying object */ -function buildingFn(data: Specification.EndpointAuthentication): () => Specification.EndpointAuthentication { - return () => { - const model = new Classes.EndpointAuthentication(); - Object.assign(model, data); +function buildingFn(data: Specification.EndpointAuthentication): Specification.EndpointAuthentication { + const model = new Classes.EndpointAuthentication(); + Object.assign(model, data); - validate('EndpointAuthentication', model); - return model as Specification.EndpointAuthentication; - }; + validate('EndpointAuthentication', model); + return model as Specification.EndpointAuthentication; } /** diff --git a/src/lib/generated/builders/endpoint-builder.ts b/src/lib/generated/builders/endpoint-builder.ts index 51b8ca04..5d0b437e 100644 --- a/src/lib/generated/builders/endpoint-builder.ts +++ b/src/lib/generated/builders/endpoint-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.Endpoint} data The underlying object * @returns {Specification.Endpoint} The validated underlying object */ -function buildingFn(data: Specification.Endpoint): () => Specification.Endpoint { - return () => { - const model = new Classes.Endpoint(); - Object.assign(model, data); +function buildingFn(data: Specification.Endpoint): Specification.Endpoint { + const model = new Classes.Endpoint(); + Object.assign(model, data); - validate('Endpoint', model); - return model as Specification.Endpoint; - }; + validate('Endpoint', model); + return model as Specification.Endpoint; } /** diff --git a/src/lib/generated/builders/error-builder.ts b/src/lib/generated/builders/error-builder.ts index 73dca095..e2561ca8 100644 --- a/src/lib/generated/builders/error-builder.ts +++ b/src/lib/generated/builders/error-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.Error} data The underlying object * @returns {Specification.Error} The validated underlying object */ -function buildingFn(data: Specification.Error): () => Specification.Error { - return () => { - const model = new Classes.Error(); - Object.assign(model, data); +function buildingFn(data: Specification.Error): Specification.Error { + const model = new Classes.Error(); + Object.assign(model, data); - validate('Error', model); - return model as Specification.Error; - }; + validate('Error', model); + return model as Specification.Error; } /** diff --git a/src/lib/generated/builders/event-consumption-strategy-all-builder.ts b/src/lib/generated/builders/event-consumption-strategy-all-builder.ts index 33e7a2f3..abadb94e 100644 --- a/src/lib/generated/builders/event-consumption-strategy-all-builder.ts +++ b/src/lib/generated/builders/event-consumption-strategy-all-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.EventConsumptionStrategyAll} data The underlying object * @returns {Specification.EventConsumptionStrategyAll} The validated underlying object */ -function buildingFn(data: Specification.EventConsumptionStrategyAll): () => Specification.EventConsumptionStrategyAll { - return () => { - const model = new Classes.EventConsumptionStrategyAll(); - Object.assign(model, data); +function buildingFn(data: Specification.EventConsumptionStrategyAll): Specification.EventConsumptionStrategyAll { + const model = new Classes.EventConsumptionStrategyAll(); + Object.assign(model, data); - validate('EventConsumptionStrategyAll', model); - return model as Specification.EventConsumptionStrategyAll; - }; + validate('EventConsumptionStrategyAll', model); + return model as Specification.EventConsumptionStrategyAll; } /** diff --git a/src/lib/generated/builders/event-consumption-strategy-any-builder.ts b/src/lib/generated/builders/event-consumption-strategy-any-builder.ts index 669d0357..4f23a961 100644 --- a/src/lib/generated/builders/event-consumption-strategy-any-builder.ts +++ b/src/lib/generated/builders/event-consumption-strategy-any-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.EventConsumptionStrategyAny} data The underlying object * @returns {Specification.EventConsumptionStrategyAny} The validated underlying object */ -function buildingFn(data: Specification.EventConsumptionStrategyAny): () => Specification.EventConsumptionStrategyAny { - return () => { - const model = new Classes.EventConsumptionStrategyAny(); - Object.assign(model, data); +function buildingFn(data: Specification.EventConsumptionStrategyAny): Specification.EventConsumptionStrategyAny { + const model = new Classes.EventConsumptionStrategyAny(); + Object.assign(model, data); - validate('EventConsumptionStrategyAny', model); - return model as Specification.EventConsumptionStrategyAny; - }; + validate('EventConsumptionStrategyAny', model); + return model as Specification.EventConsumptionStrategyAny; } /** diff --git a/src/lib/generated/builders/event-consumption-strategy-builder.ts b/src/lib/generated/builders/event-consumption-strategy-builder.ts index 28f5be18..a696fb87 100644 --- a/src/lib/generated/builders/event-consumption-strategy-builder.ts +++ b/src/lib/generated/builders/event-consumption-strategy-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.EventConsumptionStrategy} data The underlying object * @returns {Specification.EventConsumptionStrategy} The validated underlying object */ -function buildingFn(data: Specification.EventConsumptionStrategy): () => Specification.EventConsumptionStrategy { - return () => { - const model = new Classes.EventConsumptionStrategy(); - Object.assign(model, data); +function buildingFn(data: Specification.EventConsumptionStrategy): Specification.EventConsumptionStrategy { + const model = new Classes.EventConsumptionStrategy(); + Object.assign(model, data); - validate('EventConsumptionStrategy', model); - return model as Specification.EventConsumptionStrategy; - }; + validate('EventConsumptionStrategy', model); + return model as Specification.EventConsumptionStrategy; } /** diff --git a/src/lib/generated/builders/event-filter-builder.ts b/src/lib/generated/builders/event-filter-builder.ts index 295aad6b..83fc09b4 100644 --- a/src/lib/generated/builders/event-filter-builder.ts +++ b/src/lib/generated/builders/event-filter-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.EventFilter} data The underlying object * @returns {Specification.EventFilter} The validated underlying object */ -function buildingFn(data: Specification.EventFilter): () => Specification.EventFilter { - return () => { - const model = new Classes.EventFilter(); - Object.assign(model, data); +function buildingFn(data: Specification.EventFilter): Specification.EventFilter { + const model = new Classes.EventFilter(); + Object.assign(model, data); - validate('EventFilter', model); - return model as Specification.EventFilter; - }; + validate('EventFilter', model); + return model as Specification.EventFilter; } /** diff --git a/src/lib/generated/builders/event-filter-correlate-builder.ts b/src/lib/generated/builders/event-filter-correlate-builder.ts index e1319f8f..43bcc3e8 100644 --- a/src/lib/generated/builders/event-filter-correlate-builder.ts +++ b/src/lib/generated/builders/event-filter-correlate-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.EventFilterCorrelate} data The underlying object * @returns {Specification.EventFilterCorrelate} The validated underlying object */ -function buildingFn(data: Specification.EventFilterCorrelate): () => Specification.EventFilterCorrelate { - return () => { - const model = new Classes.EventFilterCorrelate(); - Object.assign(model, data); +function buildingFn(data: Specification.EventFilterCorrelate): Specification.EventFilterCorrelate { + const model = new Classes.EventFilterCorrelate(); + Object.assign(model, data); - validate('EventFilterCorrelate', model); - return model as Specification.EventFilterCorrelate; - }; + validate('EventFilterCorrelate', model); + return model as Specification.EventFilterCorrelate; } /** diff --git a/src/lib/generated/builders/event-filter-with-builder.ts b/src/lib/generated/builders/event-filter-with-builder.ts index 8ba50a2a..267ae035 100644 --- a/src/lib/generated/builders/event-filter-with-builder.ts +++ b/src/lib/generated/builders/event-filter-with-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.EventFilterWith} data The underlying object * @returns {Specification.EventFilterWith} The validated underlying object */ -function buildingFn(data: Specification.EventFilterWith): () => Specification.EventFilterWith { - return () => { - const model = new Classes.EventFilterWith(); - Object.assign(model, data); +function buildingFn(data: Specification.EventFilterWith): Specification.EventFilterWith { + const model = new Classes.EventFilterWith(); + Object.assign(model, data); - validate('EventFilterWith', model); - return model as Specification.EventFilterWith; - }; + validate('EventFilterWith', model); + return model as Specification.EventFilterWith; } /** diff --git a/src/lib/generated/builders/export-builder.ts b/src/lib/generated/builders/export-builder.ts index c0519fc5..3c2a4a66 100644 --- a/src/lib/generated/builders/export-builder.ts +++ b/src/lib/generated/builders/export-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.Export} data The underlying object * @returns {Specification.Export} The validated underlying object */ -function buildingFn(data: Specification.Export): () => Specification.Export { - return () => { - const model = new Classes.Export(); - Object.assign(model, data); +function buildingFn(data: Specification.Export): Specification.Export { + const model = new Classes.Export(); + Object.assign(model, data); - validate('Export', model); - return model as Specification.Export; - }; + validate('Export', model); + return model as Specification.Export; } /** diff --git a/src/lib/generated/builders/extension-builder.ts b/src/lib/generated/builders/extension-builder.ts index ef32616d..56d01860 100644 --- a/src/lib/generated/builders/extension-builder.ts +++ b/src/lib/generated/builders/extension-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.Extension} data The underlying object * @returns {Specification.Extension} The validated underlying object */ -function buildingFn(data: Specification.Extension): () => Specification.Extension { - return () => { - const model = new Classes.Extension(); - Object.assign(model, data); +function buildingFn(data: Specification.Extension): Specification.Extension { + const model = new Classes.Extension(); + Object.assign(model, data); - validate('Extension', model); - return model as Specification.Extension; - }; + validate('Extension', model); + return model as Specification.Extension; } /** diff --git a/src/lib/generated/builders/external-resource-authentication-builder.ts b/src/lib/generated/builders/external-resource-authentication-builder.ts index 03435992..cb2c199a 100644 --- a/src/lib/generated/builders/external-resource-authentication-builder.ts +++ b/src/lib/generated/builders/external-resource-authentication-builder.ts @@ -24,16 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.ExternalResourceAuthentication} data The underlying object * @returns {Specification.ExternalResourceAuthentication} The validated underlying object */ -function buildingFn( - data: Specification.ExternalResourceAuthentication, -): () => Specification.ExternalResourceAuthentication { - return () => { - const model = new Classes.ExternalResourceAuthentication(); - Object.assign(model, data); +function buildingFn(data: Specification.ExternalResourceAuthentication): Specification.ExternalResourceAuthentication { + const model = new Classes.ExternalResourceAuthentication(); + Object.assign(model, data); - validate('ExternalResourceAuthentication', model); - return model as Specification.ExternalResourceAuthentication; - }; + validate('ExternalResourceAuthentication', model); + return model as Specification.ExternalResourceAuthentication; } /** diff --git a/src/lib/generated/builders/external-resource-builder.ts b/src/lib/generated/builders/external-resource-builder.ts index 5a2794b2..0f6dc9ee 100644 --- a/src/lib/generated/builders/external-resource-builder.ts +++ b/src/lib/generated/builders/external-resource-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.ExternalResource} data The underlying object * @returns {Specification.ExternalResource} The validated underlying object */ -function buildingFn(data: Specification.ExternalResource): () => Specification.ExternalResource { - return () => { - const model = new Classes.ExternalResource(); - Object.assign(model, data); +function buildingFn(data: Specification.ExternalResource): Specification.ExternalResource { + const model = new Classes.ExternalResource(); + Object.assign(model, data); - validate('ExternalResource', model); - return model as Specification.ExternalResource; - }; + validate('ExternalResource', model); + return model as Specification.ExternalResource; } /** diff --git a/src/lib/generated/builders/flow-directive-builder.ts b/src/lib/generated/builders/flow-directive-builder.ts index 9b6f6685..25118cff 100644 --- a/src/lib/generated/builders/flow-directive-builder.ts +++ b/src/lib/generated/builders/flow-directive-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.FlowDirective} data The underlying object * @returns {Specification.FlowDirective} The validated underlying object */ -function buildingFn(data: Specification.FlowDirective): () => Specification.FlowDirective { - return () => { - const model = new Classes.FlowDirective(); - Object.assign(model, data); +function buildingFn(data: Specification.FlowDirective): Specification.FlowDirective { + const model = new Classes.FlowDirective(); + Object.assign(model, data); - validate('FlowDirective', model); - return model as Specification.FlowDirective; - }; + validate('FlowDirective', model); + return model as Specification.FlowDirective; } /** diff --git a/src/lib/generated/builders/for-task-builder.ts b/src/lib/generated/builders/for-task-builder.ts index c1c43d59..5da132d2 100644 --- a/src/lib/generated/builders/for-task-builder.ts +++ b/src/lib/generated/builders/for-task-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.ForTask} data The underlying object * @returns {Specification.ForTask} The validated underlying object */ -function buildingFn(data: Specification.ForTask): () => Specification.ForTask { - return () => { - const model = new Classes.ForTask(); - Object.assign(model, data); +function buildingFn(data: Specification.ForTask): Specification.ForTask { + const model = new Classes.ForTask(); + Object.assign(model, data); - validate('ForTask', model); - return model as Specification.ForTask; - }; + validate('ForTask', model); + return model as Specification.ForTask; } /** diff --git a/src/lib/generated/builders/for-task-for-builder.ts b/src/lib/generated/builders/for-task-for-builder.ts index 20279774..4d115bfe 100644 --- a/src/lib/generated/builders/for-task-for-builder.ts +++ b/src/lib/generated/builders/for-task-for-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.ForTaskFor} data The underlying object * @returns {Specification.ForTaskFor} The validated underlying object */ -function buildingFn(data: Specification.ForTaskFor): () => Specification.ForTaskFor { - return () => { - const model = new Classes.ForTaskFor(); - Object.assign(model, data); +function buildingFn(data: Specification.ForTaskFor): Specification.ForTaskFor { + const model = new Classes.ForTaskFor(); + Object.assign(model, data); - validate('ForTaskFor', model); - return model as Specification.ForTaskFor; - }; + validate('ForTaskFor', model); + return model as Specification.ForTaskFor; } /** diff --git a/src/lib/generated/builders/fork-task-builder.ts b/src/lib/generated/builders/fork-task-builder.ts index b932a027..08984d81 100644 --- a/src/lib/generated/builders/fork-task-builder.ts +++ b/src/lib/generated/builders/fork-task-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.ForkTask} data The underlying object * @returns {Specification.ForkTask} The validated underlying object */ -function buildingFn(data: Specification.ForkTask): () => Specification.ForkTask { - return () => { - const model = new Classes.ForkTask(); - Object.assign(model, data); +function buildingFn(data: Specification.ForkTask): Specification.ForkTask { + const model = new Classes.ForkTask(); + Object.assign(model, data); - validate('ForkTask', model); - return model as Specification.ForkTask; - }; + validate('ForkTask', model); + return model as Specification.ForkTask; } /** diff --git a/src/lib/generated/builders/fork-task-fork-builder.ts b/src/lib/generated/builders/fork-task-fork-builder.ts index 5c3c93de..cf478249 100644 --- a/src/lib/generated/builders/fork-task-fork-builder.ts +++ b/src/lib/generated/builders/fork-task-fork-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.ForkTaskFork} data The underlying object * @returns {Specification.ForkTaskFork} The validated underlying object */ -function buildingFn(data: Specification.ForkTaskFork): () => Specification.ForkTaskFork { - return () => { - const model = new Classes.ForkTaskFork(); - Object.assign(model, data); +function buildingFn(data: Specification.ForkTaskFork): Specification.ForkTaskFork { + const model = new Classes.ForkTaskFork(); + Object.assign(model, data); - validate('ForkTaskFork', model); - return model as Specification.ForkTaskFork; - }; + validate('ForkTaskFork', model); + return model as Specification.ForkTaskFork; } /** diff --git a/src/lib/generated/builders/index.ts b/src/lib/generated/builders/index.ts index 3ee3a75b..10c275d5 100644 --- a/src/lib/generated/builders/index.ts +++ b/src/lib/generated/builders/index.ts @@ -61,6 +61,8 @@ export * from './authentication-policy-oauth2-builder'; export * from './authentication-policy-oauth2-client-builder'; export * from './oauth2-token-builder'; export * from './use-builder'; +export * from './use-authentications-builder'; +export * from './use-errors-builder'; export * from './error-builder'; export * from './extension-builder'; export * from './task-base-builder'; @@ -98,4 +100,6 @@ export * from './retry-policy-builder'; export * from './retry-policy-limit-builder'; export * from './retry-policy-limit-attempt-builder'; export * from './retry-policy-jitter-builder'; +export * from './use-functions-builder'; +export * from './use-retries-builder'; export * from './schedule-builder'; diff --git a/src/lib/generated/builders/input-builder.ts b/src/lib/generated/builders/input-builder.ts index 339cb5ed..477fe960 100644 --- a/src/lib/generated/builders/input-builder.ts +++ b/src/lib/generated/builders/input-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.Input} data The underlying object * @returns {Specification.Input} The validated underlying object */ -function buildingFn(data: Specification.Input): () => Specification.Input { - return () => { - const model = new Classes.Input(); - Object.assign(model, data); +function buildingFn(data: Specification.Input): Specification.Input { + const model = new Classes.Input(); + Object.assign(model, data); - validate('Input', model); - return model as Specification.Input; - }; + validate('Input', model); + return model as Specification.Input; } /** diff --git a/src/lib/generated/builders/listen-task-builder.ts b/src/lib/generated/builders/listen-task-builder.ts index c3cac143..901eeb9a 100644 --- a/src/lib/generated/builders/listen-task-builder.ts +++ b/src/lib/generated/builders/listen-task-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.ListenTask} data The underlying object * @returns {Specification.ListenTask} The validated underlying object */ -function buildingFn(data: Specification.ListenTask): () => Specification.ListenTask { - return () => { - const model = new Classes.ListenTask(); - Object.assign(model, data); +function buildingFn(data: Specification.ListenTask): Specification.ListenTask { + const model = new Classes.ListenTask(); + Object.assign(model, data); - validate('ListenTask', model); - return model as Specification.ListenTask; - }; + validate('ListenTask', model); + return model as Specification.ListenTask; } /** diff --git a/src/lib/generated/builders/listen-task-listen-builder.ts b/src/lib/generated/builders/listen-task-listen-builder.ts index 6fb26d4e..0aa45f32 100644 --- a/src/lib/generated/builders/listen-task-listen-builder.ts +++ b/src/lib/generated/builders/listen-task-listen-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.ListenTaskListen} data The underlying object * @returns {Specification.ListenTaskListen} The validated underlying object */ -function buildingFn(data: Specification.ListenTaskListen): () => Specification.ListenTaskListen { - return () => { - const model = new Classes.ListenTaskListen(); - Object.assign(model, data); +function buildingFn(data: Specification.ListenTaskListen): Specification.ListenTaskListen { + const model = new Classes.ListenTaskListen(); + Object.assign(model, data); - validate('ListenTaskListen', model); - return model as Specification.ListenTaskListen; - }; + validate('ListenTaskListen', model); + return model as Specification.ListenTaskListen; } /** diff --git a/src/lib/generated/builders/oauth2-token-builder.ts b/src/lib/generated/builders/oauth2-token-builder.ts index bfd6ea76..d5c2a8da 100644 --- a/src/lib/generated/builders/oauth2-token-builder.ts +++ b/src/lib/generated/builders/oauth2-token-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.Oauth2Token} data The underlying object * @returns {Specification.Oauth2Token} The validated underlying object */ -function buildingFn(data: Specification.Oauth2Token): () => Specification.Oauth2Token { - return () => { - const model = new Classes.Oauth2Token(); - Object.assign(model, data); +function buildingFn(data: Specification.Oauth2Token): Specification.Oauth2Token { + const model = new Classes.Oauth2Token(); + Object.assign(model, data); - validate('Oauth2Token', model); - return model as Specification.Oauth2Token; - }; + validate('Oauth2Token', model); + return model as Specification.Oauth2Token; } /** diff --git a/src/lib/generated/builders/output-builder.ts b/src/lib/generated/builders/output-builder.ts index d40462af..aa5f8295 100644 --- a/src/lib/generated/builders/output-builder.ts +++ b/src/lib/generated/builders/output-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.Output} data The underlying object * @returns {Specification.Output} The validated underlying object */ -function buildingFn(data: Specification.Output): () => Specification.Output { - return () => { - const model = new Classes.Output(); - Object.assign(model, data); +function buildingFn(data: Specification.Output): Specification.Output { + const model = new Classes.Output(); + Object.assign(model, data); - validate('Output', model); - return model as Specification.Output; - }; + validate('Output', model); + return model as Specification.Output; } /** diff --git a/src/lib/generated/builders/raise-task-builder.ts b/src/lib/generated/builders/raise-task-builder.ts index 5ec045b2..001175ca 100644 --- a/src/lib/generated/builders/raise-task-builder.ts +++ b/src/lib/generated/builders/raise-task-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.RaiseTask} data The underlying object * @returns {Specification.RaiseTask} The validated underlying object */ -function buildingFn(data: Specification.RaiseTask): () => Specification.RaiseTask { - return () => { - const model = new Classes.RaiseTask(); - Object.assign(model, data); +function buildingFn(data: Specification.RaiseTask): Specification.RaiseTask { + const model = new Classes.RaiseTask(); + Object.assign(model, data); - validate('RaiseTask', model); - return model as Specification.RaiseTask; - }; + validate('RaiseTask', model); + return model as Specification.RaiseTask; } /** diff --git a/src/lib/generated/builders/raise-task-raise-builder.ts b/src/lib/generated/builders/raise-task-raise-builder.ts index 70f0276b..0ce9c00c 100644 --- a/src/lib/generated/builders/raise-task-raise-builder.ts +++ b/src/lib/generated/builders/raise-task-raise-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.RaiseTaskRaise} data The underlying object * @returns {Specification.RaiseTaskRaise} The validated underlying object */ -function buildingFn(data: Specification.RaiseTaskRaise): () => Specification.RaiseTaskRaise { - return () => { - const model = new Classes.RaiseTaskRaise(); - Object.assign(model, data); +function buildingFn(data: Specification.RaiseTaskRaise): Specification.RaiseTaskRaise { + const model = new Classes.RaiseTaskRaise(); + Object.assign(model, data); - validate('RaiseTaskRaise', model); - return model as Specification.RaiseTaskRaise; - }; + validate('RaiseTaskRaise', model); + return model as Specification.RaiseTaskRaise; } /** diff --git a/src/lib/generated/builders/retry-policy-backoff-builder.ts b/src/lib/generated/builders/retry-policy-backoff-builder.ts index 0bc33c72..efa22d6e 100644 --- a/src/lib/generated/builders/retry-policy-backoff-builder.ts +++ b/src/lib/generated/builders/retry-policy-backoff-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.RetryPolicyBackoff} data The underlying object * @returns {Specification.RetryPolicyBackoff} The validated underlying object */ -function buildingFn(data: Specification.RetryPolicyBackoff): () => Specification.RetryPolicyBackoff { - return () => { - const model = new Classes.RetryPolicyBackoff(); - Object.assign(model, data); +function buildingFn(data: Specification.RetryPolicyBackoff): Specification.RetryPolicyBackoff { + const model = new Classes.RetryPolicyBackoff(); + Object.assign(model, data); - validate('RetryPolicyBackoff', model); - return model as Specification.RetryPolicyBackoff; - }; + validate('RetryPolicyBackoff', model); + return model as Specification.RetryPolicyBackoff; } /** diff --git a/src/lib/generated/builders/retry-policy-builder.ts b/src/lib/generated/builders/retry-policy-builder.ts index a59c87c0..58050fd8 100644 --- a/src/lib/generated/builders/retry-policy-builder.ts +++ b/src/lib/generated/builders/retry-policy-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.RetryPolicy} data The underlying object * @returns {Specification.RetryPolicy} The validated underlying object */ -function buildingFn(data: Specification.RetryPolicy): () => Specification.RetryPolicy { - return () => { - const model = new Classes.RetryPolicy(); - Object.assign(model, data); +function buildingFn(data: Specification.RetryPolicy): Specification.RetryPolicy { + const model = new Classes.RetryPolicy(); + Object.assign(model, data); - validate('RetryPolicy', model); - return model as Specification.RetryPolicy; - }; + validate('RetryPolicy', model); + return model as Specification.RetryPolicy; } /** diff --git a/src/lib/generated/builders/retry-policy-jitter-builder.ts b/src/lib/generated/builders/retry-policy-jitter-builder.ts index 60fccb27..6fc8cd9f 100644 --- a/src/lib/generated/builders/retry-policy-jitter-builder.ts +++ b/src/lib/generated/builders/retry-policy-jitter-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.RetryPolicyJitter} data The underlying object * @returns {Specification.RetryPolicyJitter} The validated underlying object */ -function buildingFn(data: Specification.RetryPolicyJitter): () => Specification.RetryPolicyJitter { - return () => { - const model = new Classes.RetryPolicyJitter(); - Object.assign(model, data); +function buildingFn(data: Specification.RetryPolicyJitter): Specification.RetryPolicyJitter { + const model = new Classes.RetryPolicyJitter(); + Object.assign(model, data); - validate('RetryPolicyJitter', model); - return model as Specification.RetryPolicyJitter; - }; + validate('RetryPolicyJitter', model); + return model as Specification.RetryPolicyJitter; } /** diff --git a/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts b/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts index c83c68bc..f6a81384 100644 --- a/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts +++ b/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.RetryPolicyLimitAttempt} data The underlying object * @returns {Specification.RetryPolicyLimitAttempt} The validated underlying object */ -function buildingFn(data: Specification.RetryPolicyLimitAttempt): () => Specification.RetryPolicyLimitAttempt { - return () => { - const model = new Classes.RetryPolicyLimitAttempt(); - Object.assign(model, data); +function buildingFn(data: Specification.RetryPolicyLimitAttempt): Specification.RetryPolicyLimitAttempt { + const model = new Classes.RetryPolicyLimitAttempt(); + Object.assign(model, data); - validate('RetryPolicyLimitAttempt', model); - return model as Specification.RetryPolicyLimitAttempt; - }; + validate('RetryPolicyLimitAttempt', model); + return model as Specification.RetryPolicyLimitAttempt; } /** diff --git a/src/lib/generated/builders/retry-policy-limit-builder.ts b/src/lib/generated/builders/retry-policy-limit-builder.ts index 96c912ae..253c5e1f 100644 --- a/src/lib/generated/builders/retry-policy-limit-builder.ts +++ b/src/lib/generated/builders/retry-policy-limit-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.RetryPolicyLimit} data The underlying object * @returns {Specification.RetryPolicyLimit} The validated underlying object */ -function buildingFn(data: Specification.RetryPolicyLimit): () => Specification.RetryPolicyLimit { - return () => { - const model = new Classes.RetryPolicyLimit(); - Object.assign(model, data); +function buildingFn(data: Specification.RetryPolicyLimit): Specification.RetryPolicyLimit { + const model = new Classes.RetryPolicyLimit(); + Object.assign(model, data); - validate('RetryPolicyLimit', model); - return model as Specification.RetryPolicyLimit; - }; + validate('RetryPolicyLimit', model); + return model as Specification.RetryPolicyLimit; } /** diff --git a/src/lib/generated/builders/run-task-builder.ts b/src/lib/generated/builders/run-task-builder.ts index b0371084..5924a00f 100644 --- a/src/lib/generated/builders/run-task-builder.ts +++ b/src/lib/generated/builders/run-task-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.RunTask} data The underlying object * @returns {Specification.RunTask} The validated underlying object */ -function buildingFn(data: Specification.RunTask): () => Specification.RunTask { - return () => { - const model = new Classes.RunTask(); - Object.assign(model, data); +function buildingFn(data: Specification.RunTask): Specification.RunTask { + const model = new Classes.RunTask(); + Object.assign(model, data); - validate('RunTask', model); - return model as Specification.RunTask; - }; + validate('RunTask', model); + return model as Specification.RunTask; } /** diff --git a/src/lib/generated/builders/run-task-run-builder.ts b/src/lib/generated/builders/run-task-run-builder.ts index 5d4ddfed..a91bb1f3 100644 --- a/src/lib/generated/builders/run-task-run-builder.ts +++ b/src/lib/generated/builders/run-task-run-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.RunTaskRun} data The underlying object * @returns {Specification.RunTaskRun} The validated underlying object */ -function buildingFn(data: Specification.RunTaskRun): () => Specification.RunTaskRun { - return () => { - const model = new Classes.RunTaskRun(); - Object.assign(model, data); +function buildingFn(data: Specification.RunTaskRun): Specification.RunTaskRun { + const model = new Classes.RunTaskRun(); + Object.assign(model, data); - validate('RunTaskRun', model); - return model as Specification.RunTaskRun; - }; + validate('RunTaskRun', model); + return model as Specification.RunTaskRun; } /** diff --git a/src/lib/generated/builders/run-task-run-container-builder.ts b/src/lib/generated/builders/run-task-run-container-builder.ts index ebc42cae..88ef7139 100644 --- a/src/lib/generated/builders/run-task-run-container-builder.ts +++ b/src/lib/generated/builders/run-task-run-container-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.RunTaskRunContainer} data The underlying object * @returns {Specification.RunTaskRunContainer} The validated underlying object */ -function buildingFn(data: Specification.RunTaskRunContainer): () => Specification.RunTaskRunContainer { - return () => { - const model = new Classes.RunTaskRunContainer(); - Object.assign(model, data); +function buildingFn(data: Specification.RunTaskRunContainer): Specification.RunTaskRunContainer { + const model = new Classes.RunTaskRunContainer(); + Object.assign(model, data); - validate('RunTaskRunContainer', model); - return model as Specification.RunTaskRunContainer; - }; + validate('RunTaskRunContainer', model); + return model as Specification.RunTaskRunContainer; } /** diff --git a/src/lib/generated/builders/run-task-run-script-builder.ts b/src/lib/generated/builders/run-task-run-script-builder.ts index 5532f7a3..456b8731 100644 --- a/src/lib/generated/builders/run-task-run-script-builder.ts +++ b/src/lib/generated/builders/run-task-run-script-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.RunTaskRunScript} data The underlying object * @returns {Specification.RunTaskRunScript} The validated underlying object */ -function buildingFn(data: Specification.RunTaskRunScript): () => Specification.RunTaskRunScript { - return () => { - const model = new Classes.RunTaskRunScript(); - Object.assign(model, data); +function buildingFn(data: Specification.RunTaskRunScript): Specification.RunTaskRunScript { + const model = new Classes.RunTaskRunScript(); + Object.assign(model, data); - validate('RunTaskRunScript', model); - return model as Specification.RunTaskRunScript; - }; + validate('RunTaskRunScript', model); + return model as Specification.RunTaskRunScript; } /** diff --git a/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts b/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts index f364fea7..9d9aa373 100644 --- a/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts +++ b/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.RunTaskRunShellArguments} data The underlying object * @returns {Specification.RunTaskRunShellArguments} The validated underlying object */ -function buildingFn(data: Specification.RunTaskRunShellArguments): () => Specification.RunTaskRunShellArguments { - return () => { - const model = new Classes.RunTaskRunShellArguments(); - Object.assign(model, data); +function buildingFn(data: Specification.RunTaskRunShellArguments): Specification.RunTaskRunShellArguments { + const model = new Classes.RunTaskRunShellArguments(); + Object.assign(model, data); - validate('RunTaskRunShellArguments', model); - return model as Specification.RunTaskRunShellArguments; - }; + validate('RunTaskRunShellArguments', model); + return model as Specification.RunTaskRunShellArguments; } /** diff --git a/src/lib/generated/builders/run-task-run-shell-builder.ts b/src/lib/generated/builders/run-task-run-shell-builder.ts index 858fc37e..65430640 100644 --- a/src/lib/generated/builders/run-task-run-shell-builder.ts +++ b/src/lib/generated/builders/run-task-run-shell-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.RunTaskRunShell} data The underlying object * @returns {Specification.RunTaskRunShell} The validated underlying object */ -function buildingFn(data: Specification.RunTaskRunShell): () => Specification.RunTaskRunShell { - return () => { - const model = new Classes.RunTaskRunShell(); - Object.assign(model, data); +function buildingFn(data: Specification.RunTaskRunShell): Specification.RunTaskRunShell { + const model = new Classes.RunTaskRunShell(); + Object.assign(model, data); - validate('RunTaskRunShell', model); - return model as Specification.RunTaskRunShell; - }; + validate('RunTaskRunShell', model); + return model as Specification.RunTaskRunShell; } /** diff --git a/src/lib/generated/builders/run-task-run-shell-environment-builder.ts b/src/lib/generated/builders/run-task-run-shell-environment-builder.ts index f5bf4fa2..ac4b31e4 100644 --- a/src/lib/generated/builders/run-task-run-shell-environment-builder.ts +++ b/src/lib/generated/builders/run-task-run-shell-environment-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.RunTaskRunShellEnvironment} data The underlying object * @returns {Specification.RunTaskRunShellEnvironment} The validated underlying object */ -function buildingFn(data: Specification.RunTaskRunShellEnvironment): () => Specification.RunTaskRunShellEnvironment { - return () => { - const model = new Classes.RunTaskRunShellEnvironment(); - Object.assign(model, data); +function buildingFn(data: Specification.RunTaskRunShellEnvironment): Specification.RunTaskRunShellEnvironment { + const model = new Classes.RunTaskRunShellEnvironment(); + Object.assign(model, data); - validate('RunTaskRunShellEnvironment', model); - return model as Specification.RunTaskRunShellEnvironment; - }; + validate('RunTaskRunShellEnvironment', model); + return model as Specification.RunTaskRunShellEnvironment; } /** diff --git a/src/lib/generated/builders/run-task-run-workflow-builder.ts b/src/lib/generated/builders/run-task-run-workflow-builder.ts index 05fd74c2..bf355abb 100644 --- a/src/lib/generated/builders/run-task-run-workflow-builder.ts +++ b/src/lib/generated/builders/run-task-run-workflow-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.RunTaskRunWorkflow} data The underlying object * @returns {Specification.RunTaskRunWorkflow} The validated underlying object */ -function buildingFn(data: Specification.RunTaskRunWorkflow): () => Specification.RunTaskRunWorkflow { - return () => { - const model = new Classes.RunTaskRunWorkflow(); - Object.assign(model, data); +function buildingFn(data: Specification.RunTaskRunWorkflow): Specification.RunTaskRunWorkflow { + const model = new Classes.RunTaskRunWorkflow(); + Object.assign(model, data); - validate('RunTaskRunWorkflow', model); - return model as Specification.RunTaskRunWorkflow; - }; + validate('RunTaskRunWorkflow', model); + return model as Specification.RunTaskRunWorkflow; } /** diff --git a/src/lib/generated/builders/run-task-run-workflow-input-builder.ts b/src/lib/generated/builders/run-task-run-workflow-input-builder.ts index b832c589..513d845b 100644 --- a/src/lib/generated/builders/run-task-run-workflow-input-builder.ts +++ b/src/lib/generated/builders/run-task-run-workflow-input-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.RunTaskRunWorkflowInput} data The underlying object * @returns {Specification.RunTaskRunWorkflowInput} The validated underlying object */ -function buildingFn(data: Specification.RunTaskRunWorkflowInput): () => Specification.RunTaskRunWorkflowInput { - return () => { - const model = new Classes.RunTaskRunWorkflowInput(); - Object.assign(model, data); +function buildingFn(data: Specification.RunTaskRunWorkflowInput): Specification.RunTaskRunWorkflowInput { + const model = new Classes.RunTaskRunWorkflowInput(); + Object.assign(model, data); - validate('RunTaskRunWorkflowInput', model); - return model as Specification.RunTaskRunWorkflowInput; - }; + validate('RunTaskRunWorkflowInput', model); + return model as Specification.RunTaskRunWorkflowInput; } /** diff --git a/src/lib/generated/builders/schedule-builder.ts b/src/lib/generated/builders/schedule-builder.ts index 0cdc5d32..e1b957c4 100644 --- a/src/lib/generated/builders/schedule-builder.ts +++ b/src/lib/generated/builders/schedule-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.Schedule} data The underlying object * @returns {Specification.Schedule} The validated underlying object */ -function buildingFn(data: Specification.Schedule): () => Specification.Schedule { - return () => { - const model = new Classes.Schedule(); - Object.assign(model, data); +function buildingFn(data: Specification.Schedule): Specification.Schedule { + const model = new Classes.Schedule(); + Object.assign(model, data); - validate('Schedule', model); - return model as Specification.Schedule; - }; + validate('Schedule', model); + return model as Specification.Schedule; } /** diff --git a/src/lib/generated/builders/schema-builder.ts b/src/lib/generated/builders/schema-builder.ts index 5bb7be31..292088c2 100644 --- a/src/lib/generated/builders/schema-builder.ts +++ b/src/lib/generated/builders/schema-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.Schema} data The underlying object * @returns {Specification.Schema} The validated underlying object */ -function buildingFn(data: Specification.Schema): () => Specification.Schema { - return () => { - const model = new Classes.Schema(); - Object.assign(model, data); +function buildingFn(data: Specification.Schema): Specification.Schema { + const model = new Classes.Schema(); + Object.assign(model, data); - validate('Schema', model); - return model as Specification.Schema; - }; + validate('Schema', model); + return model as Specification.Schema; } /** diff --git a/src/lib/generated/builders/set-task-builder.ts b/src/lib/generated/builders/set-task-builder.ts index 7c58686b..b59b5fa8 100644 --- a/src/lib/generated/builders/set-task-builder.ts +++ b/src/lib/generated/builders/set-task-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.SetTask} data The underlying object * @returns {Specification.SetTask} The validated underlying object */ -function buildingFn(data: Specification.SetTask): () => Specification.SetTask { - return () => { - const model = new Classes.SetTask(); - Object.assign(model, data); +function buildingFn(data: Specification.SetTask): Specification.SetTask { + const model = new Classes.SetTask(); + Object.assign(model, data); - validate('SetTask', model); - return model as Specification.SetTask; - }; + validate('SetTask', model); + return model as Specification.SetTask; } /** diff --git a/src/lib/generated/builders/set-task-set-builder.ts b/src/lib/generated/builders/set-task-set-builder.ts index d426416f..71f986c2 100644 --- a/src/lib/generated/builders/set-task-set-builder.ts +++ b/src/lib/generated/builders/set-task-set-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.SetTaskSet} data The underlying object * @returns {Specification.SetTaskSet} The validated underlying object */ -function buildingFn(data: Specification.SetTaskSet): () => Specification.SetTaskSet { - return () => { - const model = new Classes.SetTaskSet(); - Object.assign(model, data); +function buildingFn(data: Specification.SetTaskSet): Specification.SetTaskSet { + const model = new Classes.SetTaskSet(); + Object.assign(model, data); - validate('SetTaskSet', model); - return model as Specification.SetTaskSet; - }; + validate('SetTaskSet', model); + return model as Specification.SetTaskSet; } /** diff --git a/src/lib/generated/builders/switch-task-builder.ts b/src/lib/generated/builders/switch-task-builder.ts index 1320eb1a..8763d16a 100644 --- a/src/lib/generated/builders/switch-task-builder.ts +++ b/src/lib/generated/builders/switch-task-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.SwitchTask} data The underlying object * @returns {Specification.SwitchTask} The validated underlying object */ -function buildingFn(data: Specification.SwitchTask): () => Specification.SwitchTask { - return () => { - const model = new Classes.SwitchTask(); - Object.assign(model, data); +function buildingFn(data: Specification.SwitchTask): Specification.SwitchTask { + const model = new Classes.SwitchTask(); + Object.assign(model, data); - validate('SwitchTask', model); - return model as Specification.SwitchTask; - }; + validate('SwitchTask', model); + return model as Specification.SwitchTask; } /** diff --git a/src/lib/generated/builders/switch-task-switch-builder.ts b/src/lib/generated/builders/switch-task-switch-builder.ts index 38069755..142d0f9d 100644 --- a/src/lib/generated/builders/switch-task-switch-builder.ts +++ b/src/lib/generated/builders/switch-task-switch-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.SwitchTaskSwitch} data The underlying object * @returns {Specification.SwitchTaskSwitch} The validated underlying object */ -function buildingFn(data: Specification.SwitchTaskSwitch): () => Specification.SwitchTaskSwitch { - return () => { - const model = new Classes.SwitchTaskSwitch(); - Object.assign(model, data); +function buildingFn(data: Specification.SwitchTaskSwitch): Specification.SwitchTaskSwitch { + const model = new Classes.SwitchTaskSwitch(); + Object.assign(model, data); - validate('SwitchTaskSwitch', model); - return model as Specification.SwitchTaskSwitch; - }; + validate('SwitchTaskSwitch', model); + return model as Specification.SwitchTaskSwitch; } /** diff --git a/src/lib/generated/builders/task-base-builder.ts b/src/lib/generated/builders/task-base-builder.ts index c778da18..04bf4267 100644 --- a/src/lib/generated/builders/task-base-builder.ts +++ b/src/lib/generated/builders/task-base-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.TaskBase} data The underlying object * @returns {Specification.TaskBase} The validated underlying object */ -function buildingFn(data: Specification.TaskBase): () => Specification.TaskBase { - return () => { - const model = new Classes.TaskBase(); - Object.assign(model, data); +function buildingFn(data: Specification.TaskBase): Specification.TaskBase { + const model = new Classes.TaskBase(); + Object.assign(model, data); - validate('TaskBase', model); - return model as Specification.TaskBase; - }; + validate('TaskBase', model); + return model as Specification.TaskBase; } /** diff --git a/src/lib/generated/builders/task-builder.ts b/src/lib/generated/builders/task-builder.ts index b3908566..16f75bd7 100644 --- a/src/lib/generated/builders/task-builder.ts +++ b/src/lib/generated/builders/task-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.Task} data The underlying object * @returns {Specification.Task} The validated underlying object */ -function buildingFn(data: Specification.Task): () => Specification.Task { - return () => { - const model = new Classes.Task(); - Object.assign(model, data); +function buildingFn(data: Specification.Task): Specification.Task { + const model = new Classes.Task(); + Object.assign(model, data); - validate('Task', model); - return model as Specification.Task; - }; + validate('Task', model); + return model as Specification.Task; } /** diff --git a/src/lib/generated/builders/task-list-builder.ts b/src/lib/generated/builders/task-list-builder.ts index 7d435aba..f2d176cb 100644 --- a/src/lib/generated/builders/task-list-builder.ts +++ b/src/lib/generated/builders/task-list-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.TaskList} data The underlying object * @returns {Specification.TaskList} The validated underlying object */ -function buildingFn(data: Specification.TaskList): () => Specification.TaskList { - return () => { - const model = new Classes.TaskList(); - Object.assign(model, data); +function buildingFn(data: Specification.TaskList): Specification.TaskList { + const model = new Classes.TaskList(); + Object.assign(model, data); - validate('TaskList', model); - return model as Specification.TaskList; - }; + validate('TaskList', model); + return model as Specification.TaskList; } /** diff --git a/src/lib/generated/builders/timeout-builder.ts b/src/lib/generated/builders/timeout-builder.ts index 9953a49f..20b6d50c 100644 --- a/src/lib/generated/builders/timeout-builder.ts +++ b/src/lib/generated/builders/timeout-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.Timeout} data The underlying object * @returns {Specification.Timeout} The validated underlying object */ -function buildingFn(data: Specification.Timeout): () => Specification.Timeout { - return () => { - const model = new Classes.Timeout(); - Object.assign(model, data); +function buildingFn(data: Specification.Timeout): Specification.Timeout { + const model = new Classes.Timeout(); + Object.assign(model, data); - validate('Timeout', model); - return model as Specification.Timeout; - }; + validate('Timeout', model); + return model as Specification.Timeout; } /** diff --git a/src/lib/generated/builders/try-task-builder.ts b/src/lib/generated/builders/try-task-builder.ts index aa7ddf6f..42645293 100644 --- a/src/lib/generated/builders/try-task-builder.ts +++ b/src/lib/generated/builders/try-task-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.TryTask} data The underlying object * @returns {Specification.TryTask} The validated underlying object */ -function buildingFn(data: Specification.TryTask): () => Specification.TryTask { - return () => { - const model = new Classes.TryTask(); - Object.assign(model, data); +function buildingFn(data: Specification.TryTask): Specification.TryTask { + const model = new Classes.TryTask(); + Object.assign(model, data); - validate('TryTask', model); - return model as Specification.TryTask; - }; + validate('TryTask', model); + return model as Specification.TryTask; } /** diff --git a/src/lib/generated/builders/try-task-catch-builder.ts b/src/lib/generated/builders/try-task-catch-builder.ts index 43b0697c..c332c1a7 100644 --- a/src/lib/generated/builders/try-task-catch-builder.ts +++ b/src/lib/generated/builders/try-task-catch-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.TryTaskCatch} data The underlying object * @returns {Specification.TryTaskCatch} The validated underlying object */ -function buildingFn(data: Specification.TryTaskCatch): () => Specification.TryTaskCatch { - return () => { - const model = new Classes.TryTaskCatch(); - Object.assign(model, data); +function buildingFn(data: Specification.TryTaskCatch): Specification.TryTaskCatch { + const model = new Classes.TryTaskCatch(); + Object.assign(model, data); - validate('TryTaskCatch', model); - return model as Specification.TryTaskCatch; - }; + validate('TryTaskCatch', model); + return model as Specification.TryTaskCatch; } /** diff --git a/src/lib/generated/builders/use-authentications-builder.ts b/src/lib/generated/builders/use-authentications-builder.ts new file mode 100644 index 00000000..d818a5db --- /dev/null +++ b/src/lib/generated/builders/use-authentications-builder.ts @@ -0,0 +1,41 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.UseAuthentications} data The underlying object + * @returns {Specification.UseAuthentications} The validated underlying object + */ +function buildingFn(data: Specification.UseAuthentications): Specification.UseAuthentications { + const model = new Classes.UseAuthentications(); + Object.assign(model, data); + + validate('UseAuthentications', model); + return model as Specification.UseAuthentications; +} + +/** + * A factory to create a builder proxy for the type `Specification.UseAuthentications` + * @returns {Specification.UseAuthentications} A builder for `Specification.UseAuthentications` + */ +export function useAuthenticationsBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/use-builder.ts b/src/lib/generated/builders/use-builder.ts index 1b9cc1ff..22540e41 100644 --- a/src/lib/generated/builders/use-builder.ts +++ b/src/lib/generated/builders/use-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.Use} data The underlying object * @returns {Specification.Use} The validated underlying object */ -function buildingFn(data: Specification.Use): () => Specification.Use { - return () => { - const model = new Classes.Use(); - Object.assign(model, data); +function buildingFn(data: Specification.Use): Specification.Use { + const model = new Classes.Use(); + Object.assign(model, data); - validate('Use', model); - return model as Specification.Use; - }; + validate('Use', model); + return model as Specification.Use; } /** diff --git a/src/lib/generated/builders/use-errors-builder.ts b/src/lib/generated/builders/use-errors-builder.ts new file mode 100644 index 00000000..000be51f --- /dev/null +++ b/src/lib/generated/builders/use-errors-builder.ts @@ -0,0 +1,41 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.UseErrors} data The underlying object + * @returns {Specification.UseErrors} The validated underlying object + */ +function buildingFn(data: Specification.UseErrors): Specification.UseErrors { + const model = new Classes.UseErrors(); + Object.assign(model, data); + + validate('UseErrors', model); + return model as Specification.UseErrors; +} + +/** + * A factory to create a builder proxy for the type `Specification.UseErrors` + * @returns {Specification.UseErrors} A builder for `Specification.UseErrors` + */ +export function useErrorsBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/use-extensions-builder.ts b/src/lib/generated/builders/use-extensions-builder.ts index 3db961eb..53924503 100644 --- a/src/lib/generated/builders/use-extensions-builder.ts +++ b/src/lib/generated/builders/use-extensions-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.UseExtensions} data The underlying object * @returns {Specification.UseExtensions} The validated underlying object */ -function buildingFn(data: Specification.UseExtensions): () => Specification.UseExtensions { - return () => { - const model = new Classes.UseExtensions(); - Object.assign(model, data); +function buildingFn(data: Specification.UseExtensions): Specification.UseExtensions { + const model = new Classes.UseExtensions(); + Object.assign(model, data); - validate('UseExtensions', model); - return model as Specification.UseExtensions; - }; + validate('UseExtensions', model); + return model as Specification.UseExtensions; } /** diff --git a/src/lib/generated/builders/use-functions-builder.ts b/src/lib/generated/builders/use-functions-builder.ts new file mode 100644 index 00000000..2b10a6e9 --- /dev/null +++ b/src/lib/generated/builders/use-functions-builder.ts @@ -0,0 +1,41 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.UseFunctions} data The underlying object + * @returns {Specification.UseFunctions} The validated underlying object + */ +function buildingFn(data: Specification.UseFunctions): Specification.UseFunctions { + const model = new Classes.UseFunctions(); + Object.assign(model, data); + + validate('UseFunctions', model); + return model as Specification.UseFunctions; +} + +/** + * A factory to create a builder proxy for the type `Specification.UseFunctions` + * @returns {Specification.UseFunctions} A builder for `Specification.UseFunctions` + */ +export function useFunctionsBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/use-retries-builder.ts b/src/lib/generated/builders/use-retries-builder.ts new file mode 100644 index 00000000..c58552b8 --- /dev/null +++ b/src/lib/generated/builders/use-retries-builder.ts @@ -0,0 +1,41 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.UseRetries} data The underlying object + * @returns {Specification.UseRetries} The validated underlying object + */ +function buildingFn(data: Specification.UseRetries): Specification.UseRetries { + const model = new Classes.UseRetries(); + Object.assign(model, data); + + validate('UseRetries', model); + return model as Specification.UseRetries; +} + +/** + * A factory to create a builder proxy for the type `Specification.UseRetries` + * @returns {Specification.UseRetries} A builder for `Specification.UseRetries` + */ +export function useRetriesBuilder(): Builder { + return builder(buildingFn); +} diff --git a/src/lib/generated/builders/wait-task-builder.ts b/src/lib/generated/builders/wait-task-builder.ts index 82d2309a..54435a77 100644 --- a/src/lib/generated/builders/wait-task-builder.ts +++ b/src/lib/generated/builders/wait-task-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.WaitTask} data The underlying object * @returns {Specification.WaitTask} The validated underlying object */ -function buildingFn(data: Specification.WaitTask): () => Specification.WaitTask { - return () => { - const model = new Classes.WaitTask(); - Object.assign(model, data); +function buildingFn(data: Specification.WaitTask): Specification.WaitTask { + const model = new Classes.WaitTask(); + Object.assign(model, data); - validate('WaitTask', model); - return model as Specification.WaitTask; - }; + validate('WaitTask', model); + return model as Specification.WaitTask; } /** diff --git a/src/lib/generated/builders/workflow-builder.ts b/src/lib/generated/builders/workflow-builder.ts index 9a5028ff..3de21c98 100644 --- a/src/lib/generated/builders/workflow-builder.ts +++ b/src/lib/generated/builders/workflow-builder.ts @@ -24,14 +24,12 @@ import { Specification } from '../definitions'; * @param {Specification.Workflow} data The underlying object * @returns {Specification.Workflow} The validated underlying object */ -function buildingFn(data: Specification.Workflow): () => Specification.Workflow { - return () => { - const model = new Classes.Workflow(); - Object.assign(model, data); +function buildingFn(data: Specification.Workflow): Specification.Workflow { + const model = new Classes.Workflow(); + Object.assign(model, data); - validate('Workflow', model); - return model as Specification.Workflow; - }; + validate('Workflow', model); + return model as Specification.Workflow; } /** diff --git a/src/lib/generated/classes/authentication-policy-basic.ts b/src/lib/generated/classes/authentication-policy-basic.ts index fb95d394..52e54643 100644 --- a/src/lib/generated/classes/authentication-policy-basic.ts +++ b/src/lib/generated/classes/authentication-policy-basic.ts @@ -1 +1,14 @@ -export class AuthenticationPolicyBasic {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _AuthenticationPolicyBasic extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const AuthenticationPolicyBasic = _AuthenticationPolicyBasic as { + new ( + data?: Partial, + ): _AuthenticationPolicyBasic & Specification.AuthenticationPolicyBasic; +}; diff --git a/src/lib/generated/classes/authentication-policy-bearer.ts b/src/lib/generated/classes/authentication-policy-bearer.ts index ab4dbf99..91d39e62 100644 --- a/src/lib/generated/classes/authentication-policy-bearer.ts +++ b/src/lib/generated/classes/authentication-policy-bearer.ts @@ -1 +1,14 @@ -export class AuthenticationPolicyBearer {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _AuthenticationPolicyBearer extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const AuthenticationPolicyBearer = _AuthenticationPolicyBearer as { + new ( + data?: Partial, + ): _AuthenticationPolicyBearer & Specification.AuthenticationPolicyBearer; +}; diff --git a/src/lib/generated/classes/authentication-policy-oauth2-client.ts b/src/lib/generated/classes/authentication-policy-oauth2-client.ts index 91c689d2..5acb50d9 100644 --- a/src/lib/generated/classes/authentication-policy-oauth2-client.ts +++ b/src/lib/generated/classes/authentication-policy-oauth2-client.ts @@ -1 +1,14 @@ -export class AuthenticationPolicyOauth2Client {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _AuthenticationPolicyOauth2Client extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const AuthenticationPolicyOauth2Client = _AuthenticationPolicyOauth2Client as { + new ( + data?: Partial, + ): _AuthenticationPolicyOauth2Client & Specification.AuthenticationPolicyOauth2Client; +}; diff --git a/src/lib/generated/classes/authentication-policy-oauth2.ts b/src/lib/generated/classes/authentication-policy-oauth2.ts index ad9b11f3..5ce389ea 100644 --- a/src/lib/generated/classes/authentication-policy-oauth2.ts +++ b/src/lib/generated/classes/authentication-policy-oauth2.ts @@ -1 +1,14 @@ -export class AuthenticationPolicyOauth2 {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _AuthenticationPolicyOauth2 extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const AuthenticationPolicyOauth2 = _AuthenticationPolicyOauth2 as { + new ( + data?: Partial, + ): _AuthenticationPolicyOauth2 & Specification.AuthenticationPolicyOauth2; +}; diff --git a/src/lib/generated/classes/authentication-policy.ts b/src/lib/generated/classes/authentication-policy.ts index a397449d..381ca9eb 100644 --- a/src/lib/generated/classes/authentication-policy.ts +++ b/src/lib/generated/classes/authentication-policy.ts @@ -1 +1,12 @@ -export class AuthenticationPolicy {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _AuthenticationPolicy extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const AuthenticationPolicy = _AuthenticationPolicy as { + new (data?: Partial): _AuthenticationPolicy & Specification.AuthenticationPolicy; +}; diff --git a/src/lib/generated/classes/call-async-api-with-authentication.ts b/src/lib/generated/classes/call-async-api-with-authentication.ts index 5d8d03ff..94f6ad4c 100644 --- a/src/lib/generated/classes/call-async-api-with-authentication.ts +++ b/src/lib/generated/classes/call-async-api-with-authentication.ts @@ -1 +1,14 @@ -export class CallAsyncAPIWithAuthentication {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _CallAsyncAPIWithAuthentication extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const CallAsyncAPIWithAuthentication = _CallAsyncAPIWithAuthentication as { + new ( + data?: Partial, + ): _CallAsyncAPIWithAuthentication & Specification.CallAsyncAPIWithAuthentication; +}; diff --git a/src/lib/generated/classes/call-async-api-with.ts b/src/lib/generated/classes/call-async-api-with.ts index e43cf276..5befdf62 100644 --- a/src/lib/generated/classes/call-async-api-with.ts +++ b/src/lib/generated/classes/call-async-api-with.ts @@ -1 +1,12 @@ -export class CallAsyncAPIWith {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _CallAsyncAPIWith extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const CallAsyncAPIWith = _CallAsyncAPIWith as { + new (data?: Partial): _CallAsyncAPIWith & Specification.CallAsyncAPIWith; +}; diff --git a/src/lib/generated/classes/call-async-api.ts b/src/lib/generated/classes/call-async-api.ts index d3db27b8..81bd786c 100644 --- a/src/lib/generated/classes/call-async-api.ts +++ b/src/lib/generated/classes/call-async-api.ts @@ -1 +1,12 @@ -export class CallAsyncAPI {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _CallAsyncAPI extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const CallAsyncAPI = _CallAsyncAPI as { + new (data?: Partial): _CallAsyncAPI & Specification.CallAsyncAPI; +}; diff --git a/src/lib/generated/classes/call-function-with.ts b/src/lib/generated/classes/call-function-with.ts index 98c1c1b8..aa5bd209 100644 --- a/src/lib/generated/classes/call-function-with.ts +++ b/src/lib/generated/classes/call-function-with.ts @@ -1 +1,12 @@ -export class CallFunctionWith {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _CallFunctionWith extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const CallFunctionWith = _CallFunctionWith as { + new (data?: Partial): _CallFunctionWith & Specification.CallFunctionWith; +}; diff --git a/src/lib/generated/classes/call-function.ts b/src/lib/generated/classes/call-function.ts index 742814a9..513c6c38 100644 --- a/src/lib/generated/classes/call-function.ts +++ b/src/lib/generated/classes/call-function.ts @@ -1 +1,12 @@ -export class CallFunction {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _CallFunction extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const CallFunction = _CallFunction as { + new (data?: Partial): _CallFunction & Specification.CallFunction; +}; diff --git a/src/lib/generated/classes/call-grpc-with-arguments.ts b/src/lib/generated/classes/call-grpc-with-arguments.ts index 055470db..e6fea56d 100644 --- a/src/lib/generated/classes/call-grpc-with-arguments.ts +++ b/src/lib/generated/classes/call-grpc-with-arguments.ts @@ -1 +1,14 @@ -export class CallGRPCWithArguments {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _CallGRPCWithArguments extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const CallGRPCWithArguments = _CallGRPCWithArguments as { + new ( + data?: Partial, + ): _CallGRPCWithArguments & Specification.CallGRPCWithArguments; +}; diff --git a/src/lib/generated/classes/call-grpc-with-service-authentication.ts b/src/lib/generated/classes/call-grpc-with-service-authentication.ts index 8c4f0f58..00087a39 100644 --- a/src/lib/generated/classes/call-grpc-with-service-authentication.ts +++ b/src/lib/generated/classes/call-grpc-with-service-authentication.ts @@ -1 +1,14 @@ -export class CallGRPCWithServiceAuthentication {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _CallGRPCWithServiceAuthentication extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const CallGRPCWithServiceAuthentication = _CallGRPCWithServiceAuthentication as { + new ( + data?: Partial, + ): _CallGRPCWithServiceAuthentication & Specification.CallGRPCWithServiceAuthentication; +}; diff --git a/src/lib/generated/classes/call-grpc-with-service.ts b/src/lib/generated/classes/call-grpc-with-service.ts index b5b0da79..50861cf4 100644 --- a/src/lib/generated/classes/call-grpc-with-service.ts +++ b/src/lib/generated/classes/call-grpc-with-service.ts @@ -1 +1,12 @@ -export class CallGRPCWithService {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _CallGRPCWithService extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const CallGRPCWithService = _CallGRPCWithService as { + new (data?: Partial): _CallGRPCWithService & Specification.CallGRPCWithService; +}; diff --git a/src/lib/generated/classes/call-grpc-with.ts b/src/lib/generated/classes/call-grpc-with.ts index 34c6386c..c4470468 100644 --- a/src/lib/generated/classes/call-grpc-with.ts +++ b/src/lib/generated/classes/call-grpc-with.ts @@ -1 +1,12 @@ -export class CallGRPCWith {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _CallGRPCWith extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const CallGRPCWith = _CallGRPCWith as { + new (data?: Partial): _CallGRPCWith & Specification.CallGRPCWith; +}; diff --git a/src/lib/generated/classes/call-grpc.ts b/src/lib/generated/classes/call-grpc.ts index 86065287..44a29bae 100644 --- a/src/lib/generated/classes/call-grpc.ts +++ b/src/lib/generated/classes/call-grpc.ts @@ -1 +1,12 @@ -export class CallGRPC {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _CallGRPC extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const CallGRPC = _CallGRPC as { + new (data?: Partial): _CallGRPC & Specification.CallGRPC; +}; diff --git a/src/lib/generated/classes/call-http-with-endpoint.ts b/src/lib/generated/classes/call-http-with-endpoint.ts index 0fe8fa29..f37a0cbc 100644 --- a/src/lib/generated/classes/call-http-with-endpoint.ts +++ b/src/lib/generated/classes/call-http-with-endpoint.ts @@ -1 +1,12 @@ -export class CallHTTPWithEndpoint {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _CallHTTPWithEndpoint extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const CallHTTPWithEndpoint = _CallHTTPWithEndpoint as { + new (data?: Partial): _CallHTTPWithEndpoint & Specification.CallHTTPWithEndpoint; +}; diff --git a/src/lib/generated/classes/call-http-with.ts b/src/lib/generated/classes/call-http-with.ts index 68e37615..e3724727 100644 --- a/src/lib/generated/classes/call-http-with.ts +++ b/src/lib/generated/classes/call-http-with.ts @@ -1 +1,12 @@ -export class CallHTTPWith {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _CallHTTPWith extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const CallHTTPWith = _CallHTTPWith as { + new (data?: Partial): _CallHTTPWith & Specification.CallHTTPWith; +}; diff --git a/src/lib/generated/classes/call-http.ts b/src/lib/generated/classes/call-http.ts index 99515d85..ed070211 100644 --- a/src/lib/generated/classes/call-http.ts +++ b/src/lib/generated/classes/call-http.ts @@ -1 +1,12 @@ -export class CallHTTP {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _CallHTTP extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const CallHTTP = _CallHTTP as { + new (data?: Partial): _CallHTTP & Specification.CallHTTP; +}; diff --git a/src/lib/generated/classes/call-open-api-with-authentication.ts b/src/lib/generated/classes/call-open-api-with-authentication.ts index 3c129b07..8dcc5d4f 100644 --- a/src/lib/generated/classes/call-open-api-with-authentication.ts +++ b/src/lib/generated/classes/call-open-api-with-authentication.ts @@ -1 +1,14 @@ -export class CallOpenAPIWithAuthentication {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _CallOpenAPIWithAuthentication extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const CallOpenAPIWithAuthentication = _CallOpenAPIWithAuthentication as { + new ( + data?: Partial, + ): _CallOpenAPIWithAuthentication & Specification.CallOpenAPIWithAuthentication; +}; diff --git a/src/lib/generated/classes/call-open-api-with-parameters.ts b/src/lib/generated/classes/call-open-api-with-parameters.ts index 00f0dd04..a615d738 100644 --- a/src/lib/generated/classes/call-open-api-with-parameters.ts +++ b/src/lib/generated/classes/call-open-api-with-parameters.ts @@ -1 +1,14 @@ -export class CallOpenAPIWithParameters {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _CallOpenAPIWithParameters extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const CallOpenAPIWithParameters = _CallOpenAPIWithParameters as { + new ( + data?: Partial, + ): _CallOpenAPIWithParameters & Specification.CallOpenAPIWithParameters; +}; diff --git a/src/lib/generated/classes/call-open-api-with.ts b/src/lib/generated/classes/call-open-api-with.ts index 6027f4e3..70488706 100644 --- a/src/lib/generated/classes/call-open-api-with.ts +++ b/src/lib/generated/classes/call-open-api-with.ts @@ -1 +1,12 @@ -export class CallOpenAPIWith {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _CallOpenAPIWith extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const CallOpenAPIWith = _CallOpenAPIWith as { + new (data?: Partial): _CallOpenAPIWith & Specification.CallOpenAPIWith; +}; diff --git a/src/lib/generated/classes/call-open-api.ts b/src/lib/generated/classes/call-open-api.ts index e2cbae42..14e32575 100644 --- a/src/lib/generated/classes/call-open-api.ts +++ b/src/lib/generated/classes/call-open-api.ts @@ -1 +1,12 @@ -export class CallOpenAPI {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _CallOpenAPI extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const CallOpenAPI = _CallOpenAPI as { + new (data?: Partial): _CallOpenAPI & Specification.CallOpenAPI; +}; diff --git a/src/lib/generated/classes/call-task.ts b/src/lib/generated/classes/call-task.ts index 86bfb0ce..67f4fdcd 100644 --- a/src/lib/generated/classes/call-task.ts +++ b/src/lib/generated/classes/call-task.ts @@ -1 +1,12 @@ -export class CallTask {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _CallTask extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const CallTask = _CallTask as { + new (data?: Partial): _CallTask & Specification.CallTask; +}; diff --git a/src/lib/generated/classes/do-task.ts b/src/lib/generated/classes/do-task.ts index 1afa9b37..78df6b17 100644 --- a/src/lib/generated/classes/do-task.ts +++ b/src/lib/generated/classes/do-task.ts @@ -1 +1,12 @@ -export class DoTask {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _DoTask extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const DoTask = _DoTask as { + new (data?: Partial): _DoTask & Specification.DoTask; +}; diff --git a/src/lib/generated/classes/document-tags.ts b/src/lib/generated/classes/document-tags.ts index 29fa9671..ed8b5cbf 100644 --- a/src/lib/generated/classes/document-tags.ts +++ b/src/lib/generated/classes/document-tags.ts @@ -1 +1,12 @@ -export class DocumentTags {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _DocumentTags extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const DocumentTags = _DocumentTags as { + new (data?: Partial): _DocumentTags & Specification.DocumentTags; +}; diff --git a/src/lib/generated/classes/document.ts b/src/lib/generated/classes/document.ts index 8ea0a151..633e6e4f 100644 --- a/src/lib/generated/classes/document.ts +++ b/src/lib/generated/classes/document.ts @@ -1 +1,12 @@ -export class Document {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _Document extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const Document = _Document as { + new (data?: Partial): _Document & Specification.Document; +}; diff --git a/src/lib/generated/classes/duration.ts b/src/lib/generated/classes/duration.ts index 4b11d880..e10aa9d3 100644 --- a/src/lib/generated/classes/duration.ts +++ b/src/lib/generated/classes/duration.ts @@ -1 +1,12 @@ -export class Duration {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _Duration extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const Duration = _Duration as { + new (data?: Partial): _Duration & Specification.Duration; +}; diff --git a/src/lib/generated/classes/emit-task-emit-event.ts b/src/lib/generated/classes/emit-task-emit-event.ts index c8ce14f0..af0de1a1 100644 --- a/src/lib/generated/classes/emit-task-emit-event.ts +++ b/src/lib/generated/classes/emit-task-emit-event.ts @@ -1 +1,12 @@ -export class EmitTaskEmitEvent {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _EmitTaskEmitEvent extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const EmitTaskEmitEvent = _EmitTaskEmitEvent as { + new (data?: Partial): _EmitTaskEmitEvent & Specification.EmitTaskEmitEvent; +}; diff --git a/src/lib/generated/classes/emit-task-emit.ts b/src/lib/generated/classes/emit-task-emit.ts index 183fafa6..c2073093 100644 --- a/src/lib/generated/classes/emit-task-emit.ts +++ b/src/lib/generated/classes/emit-task-emit.ts @@ -1 +1,12 @@ -export class EmitTaskEmit {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _EmitTaskEmit extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const EmitTaskEmit = _EmitTaskEmit as { + new (data?: Partial): _EmitTaskEmit & Specification.EmitTaskEmit; +}; diff --git a/src/lib/generated/classes/emit-task.ts b/src/lib/generated/classes/emit-task.ts index 9027bfe6..d0b795a7 100644 --- a/src/lib/generated/classes/emit-task.ts +++ b/src/lib/generated/classes/emit-task.ts @@ -1 +1,12 @@ -export class EmitTask {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _EmitTask extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const EmitTask = _EmitTask as { + new (data?: Partial): _EmitTask & Specification.EmitTask; +}; diff --git a/src/lib/generated/classes/endpoint-authentication.ts b/src/lib/generated/classes/endpoint-authentication.ts index fbee5038..1eb3a9c7 100644 --- a/src/lib/generated/classes/endpoint-authentication.ts +++ b/src/lib/generated/classes/endpoint-authentication.ts @@ -1 +1,14 @@ -export class EndpointAuthentication {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _EndpointAuthentication extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const EndpointAuthentication = _EndpointAuthentication as { + new ( + data?: Partial, + ): _EndpointAuthentication & Specification.EndpointAuthentication; +}; diff --git a/src/lib/generated/classes/endpoint.ts b/src/lib/generated/classes/endpoint.ts index b9fcff6f..44975952 100644 --- a/src/lib/generated/classes/endpoint.ts +++ b/src/lib/generated/classes/endpoint.ts @@ -1 +1,12 @@ -export class Endpoint {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _Endpoint extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const Endpoint = _Endpoint as { + new (data?: Partial): _Endpoint & Specification.Endpoint; +}; diff --git a/src/lib/generated/classes/error.ts b/src/lib/generated/classes/error.ts index 95382cb7..133b760b 100644 --- a/src/lib/generated/classes/error.ts +++ b/src/lib/generated/classes/error.ts @@ -1 +1,12 @@ -export class Error {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _Error extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const Error = _Error as { + new (data?: Partial): _Error & Specification.Error; +}; diff --git a/src/lib/generated/classes/event-consumption-strategy-all.ts b/src/lib/generated/classes/event-consumption-strategy-all.ts index 0bf42dd9..1bbe81b5 100644 --- a/src/lib/generated/classes/event-consumption-strategy-all.ts +++ b/src/lib/generated/classes/event-consumption-strategy-all.ts @@ -1 +1,14 @@ -export class EventConsumptionStrategyAll {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _EventConsumptionStrategyAll extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const EventConsumptionStrategyAll = _EventConsumptionStrategyAll as { + new ( + data?: Partial, + ): _EventConsumptionStrategyAll & Specification.EventConsumptionStrategyAll; +}; diff --git a/src/lib/generated/classes/event-consumption-strategy-any.ts b/src/lib/generated/classes/event-consumption-strategy-any.ts index 303554f5..31d9a78e 100644 --- a/src/lib/generated/classes/event-consumption-strategy-any.ts +++ b/src/lib/generated/classes/event-consumption-strategy-any.ts @@ -1 +1,14 @@ -export class EventConsumptionStrategyAny {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _EventConsumptionStrategyAny extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const EventConsumptionStrategyAny = _EventConsumptionStrategyAny as { + new ( + data?: Partial, + ): _EventConsumptionStrategyAny & Specification.EventConsumptionStrategyAny; +}; diff --git a/src/lib/generated/classes/event-consumption-strategy.ts b/src/lib/generated/classes/event-consumption-strategy.ts index 2b956e29..7d55c377 100644 --- a/src/lib/generated/classes/event-consumption-strategy.ts +++ b/src/lib/generated/classes/event-consumption-strategy.ts @@ -1 +1,14 @@ -export class EventConsumptionStrategy {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _EventConsumptionStrategy extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const EventConsumptionStrategy = _EventConsumptionStrategy as { + new ( + data?: Partial, + ): _EventConsumptionStrategy & Specification.EventConsumptionStrategy; +}; diff --git a/src/lib/generated/classes/event-filter-correlate.ts b/src/lib/generated/classes/event-filter-correlate.ts index 62270c66..16d891b0 100644 --- a/src/lib/generated/classes/event-filter-correlate.ts +++ b/src/lib/generated/classes/event-filter-correlate.ts @@ -1 +1,12 @@ -export class EventFilterCorrelate {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _EventFilterCorrelate extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const EventFilterCorrelate = _EventFilterCorrelate as { + new (data?: Partial): _EventFilterCorrelate & Specification.EventFilterCorrelate; +}; diff --git a/src/lib/generated/classes/event-filter-with.ts b/src/lib/generated/classes/event-filter-with.ts index e902fa78..c638f25e 100644 --- a/src/lib/generated/classes/event-filter-with.ts +++ b/src/lib/generated/classes/event-filter-with.ts @@ -1 +1,12 @@ -export class EventFilterWith {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _EventFilterWith extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const EventFilterWith = _EventFilterWith as { + new (data?: Partial): _EventFilterWith & Specification.EventFilterWith; +}; diff --git a/src/lib/generated/classes/event-filter.ts b/src/lib/generated/classes/event-filter.ts index 435107c8..b1415ae4 100644 --- a/src/lib/generated/classes/event-filter.ts +++ b/src/lib/generated/classes/event-filter.ts @@ -1 +1,12 @@ -export class EventFilter {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _EventFilter extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const EventFilter = _EventFilter as { + new (data?: Partial): _EventFilter & Specification.EventFilter; +}; diff --git a/src/lib/generated/classes/export.ts b/src/lib/generated/classes/export.ts index 25b13ba1..1a1ad509 100644 --- a/src/lib/generated/classes/export.ts +++ b/src/lib/generated/classes/export.ts @@ -1 +1,12 @@ -export class Export {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _Export extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const Export = _Export as { + new (data?: Partial): _Export & Specification.Export; +}; diff --git a/src/lib/generated/classes/extension.ts b/src/lib/generated/classes/extension.ts index 0db97816..a9821a5c 100644 --- a/src/lib/generated/classes/extension.ts +++ b/src/lib/generated/classes/extension.ts @@ -1 +1,12 @@ -export class Extension {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _Extension extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const Extension = _Extension as { + new (data?: Partial): _Extension & Specification.Extension; +}; diff --git a/src/lib/generated/classes/external-resource-authentication.ts b/src/lib/generated/classes/external-resource-authentication.ts index 8ec9e67e..2741f60e 100644 --- a/src/lib/generated/classes/external-resource-authentication.ts +++ b/src/lib/generated/classes/external-resource-authentication.ts @@ -1 +1,14 @@ -export class ExternalResourceAuthentication {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _ExternalResourceAuthentication extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const ExternalResourceAuthentication = _ExternalResourceAuthentication as { + new ( + data?: Partial, + ): _ExternalResourceAuthentication & Specification.ExternalResourceAuthentication; +}; diff --git a/src/lib/generated/classes/external-resource.ts b/src/lib/generated/classes/external-resource.ts index 18174e80..c948aa1a 100644 --- a/src/lib/generated/classes/external-resource.ts +++ b/src/lib/generated/classes/external-resource.ts @@ -1 +1,12 @@ -export class ExternalResource {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _ExternalResource extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const ExternalResource = _ExternalResource as { + new (data?: Partial): _ExternalResource & Specification.ExternalResource; +}; diff --git a/src/lib/generated/classes/flow-directive.ts b/src/lib/generated/classes/flow-directive.ts index bc34e6b7..85f64ca3 100644 --- a/src/lib/generated/classes/flow-directive.ts +++ b/src/lib/generated/classes/flow-directive.ts @@ -1 +1,12 @@ -export class FlowDirective {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _FlowDirective extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const FlowDirective = _FlowDirective as { + new (data?: Partial): _FlowDirective & Specification.FlowDirective; +}; diff --git a/src/lib/generated/classes/for-task-for.ts b/src/lib/generated/classes/for-task-for.ts index 7bd1314c..06c4b4d4 100644 --- a/src/lib/generated/classes/for-task-for.ts +++ b/src/lib/generated/classes/for-task-for.ts @@ -1 +1,12 @@ -export class ForTaskFor {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _ForTaskFor extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const ForTaskFor = _ForTaskFor as { + new (data?: Partial): _ForTaskFor & Specification.ForTaskFor; +}; diff --git a/src/lib/generated/classes/for-task.ts b/src/lib/generated/classes/for-task.ts index 32dbee83..40c82c41 100644 --- a/src/lib/generated/classes/for-task.ts +++ b/src/lib/generated/classes/for-task.ts @@ -1 +1,12 @@ -export class ForTask {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _ForTask extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const ForTask = _ForTask as { + new (data?: Partial): _ForTask & Specification.ForTask; +}; diff --git a/src/lib/generated/classes/fork-task-fork.ts b/src/lib/generated/classes/fork-task-fork.ts index d7b67f53..0ddd27c9 100644 --- a/src/lib/generated/classes/fork-task-fork.ts +++ b/src/lib/generated/classes/fork-task-fork.ts @@ -1 +1,12 @@ -export class ForkTaskFork {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _ForkTaskFork extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const ForkTaskFork = _ForkTaskFork as { + new (data?: Partial): _ForkTaskFork & Specification.ForkTaskFork; +}; diff --git a/src/lib/generated/classes/fork-task.ts b/src/lib/generated/classes/fork-task.ts index 943ab5a3..6979e213 100644 --- a/src/lib/generated/classes/fork-task.ts +++ b/src/lib/generated/classes/fork-task.ts @@ -1 +1,12 @@ -export class ForkTask {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _ForkTask extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const ForkTask = _ForkTask as { + new (data?: Partial): _ForkTask & Specification.ForkTask; +}; diff --git a/src/lib/generated/classes/index.ts b/src/lib/generated/classes/index.ts index 209d3c9f..c8ff3f41 100644 --- a/src/lib/generated/classes/index.ts +++ b/src/lib/generated/classes/index.ts @@ -61,6 +61,8 @@ import { AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; import { AuthenticationPolicyOauth2Client } from './authentication-policy-oauth2-client'; import { Oauth2Token } from './oauth2-token'; import { Use } from './use'; +import { UseAuthentications } from './use-authentications'; +import { UseErrors } from './use-errors'; import { Error } from './error'; import { Extension } from './extension'; import { TaskBase } from './task-base'; @@ -98,6 +100,8 @@ import { RetryPolicy } from './retry-policy'; import { RetryPolicyLimit } from './retry-policy-limit'; import { RetryPolicyLimitAttempt } from './retry-policy-limit-attempt'; import { RetryPolicyJitter } from './retry-policy-jitter'; +import { UseFunctions } from './use-functions'; +import { UseRetries } from './use-retries'; import { Schedule } from './schedule'; export const Classes = { @@ -148,6 +152,8 @@ export const Classes = { AuthenticationPolicyOauth2Client, Oauth2Token, Use, + UseAuthentications, + UseErrors, Error, Extension, TaskBase, @@ -185,5 +191,7 @@ export const Classes = { RetryPolicyLimit, RetryPolicyLimitAttempt, RetryPolicyJitter, + UseFunctions, + UseRetries, Schedule, }; diff --git a/src/lib/generated/classes/input.ts b/src/lib/generated/classes/input.ts index d0be6c1c..e4fa01a5 100644 --- a/src/lib/generated/classes/input.ts +++ b/src/lib/generated/classes/input.ts @@ -1 +1,12 @@ -export class Input {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _Input extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const Input = _Input as { + new (data?: Partial): _Input & Specification.Input; +}; diff --git a/src/lib/generated/classes/listen-task-listen.ts b/src/lib/generated/classes/listen-task-listen.ts index 447b01e1..2856db0d 100644 --- a/src/lib/generated/classes/listen-task-listen.ts +++ b/src/lib/generated/classes/listen-task-listen.ts @@ -1 +1,12 @@ -export class ListenTaskListen {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _ListenTaskListen extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const ListenTaskListen = _ListenTaskListen as { + new (data?: Partial): _ListenTaskListen & Specification.ListenTaskListen; +}; diff --git a/src/lib/generated/classes/listen-task.ts b/src/lib/generated/classes/listen-task.ts index 573fbf80..0e0aef72 100644 --- a/src/lib/generated/classes/listen-task.ts +++ b/src/lib/generated/classes/listen-task.ts @@ -1 +1,12 @@ -export class ListenTask {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _ListenTask extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const ListenTask = _ListenTask as { + new (data?: Partial): _ListenTask & Specification.ListenTask; +}; diff --git a/src/lib/generated/classes/oauth2-token.ts b/src/lib/generated/classes/oauth2-token.ts index cb5ca152..4091cb96 100644 --- a/src/lib/generated/classes/oauth2-token.ts +++ b/src/lib/generated/classes/oauth2-token.ts @@ -1 +1,12 @@ -export class Oauth2Token {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _Oauth2Token extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const Oauth2Token = _Oauth2Token as { + new (data?: Partial): _Oauth2Token & Specification.Oauth2Token; +}; diff --git a/src/lib/generated/classes/output.ts b/src/lib/generated/classes/output.ts index 09664d16..c09cb8ac 100644 --- a/src/lib/generated/classes/output.ts +++ b/src/lib/generated/classes/output.ts @@ -1 +1,12 @@ -export class Output {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _Output extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const Output = _Output as { + new (data?: Partial): _Output & Specification.Output; +}; diff --git a/src/lib/generated/classes/raise-task-raise.ts b/src/lib/generated/classes/raise-task-raise.ts index 91aec89b..415a6e5f 100644 --- a/src/lib/generated/classes/raise-task-raise.ts +++ b/src/lib/generated/classes/raise-task-raise.ts @@ -1 +1,12 @@ -export class RaiseTaskRaise {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _RaiseTaskRaise extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const RaiseTaskRaise = _RaiseTaskRaise as { + new (data?: Partial): _RaiseTaskRaise & Specification.RaiseTaskRaise; +}; diff --git a/src/lib/generated/classes/raise-task.ts b/src/lib/generated/classes/raise-task.ts index a2cd2b77..7a54543a 100644 --- a/src/lib/generated/classes/raise-task.ts +++ b/src/lib/generated/classes/raise-task.ts @@ -1 +1,12 @@ -export class RaiseTask {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _RaiseTask extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const RaiseTask = _RaiseTask as { + new (data?: Partial): _RaiseTask & Specification.RaiseTask; +}; diff --git a/src/lib/generated/classes/retry-policy-backoff.ts b/src/lib/generated/classes/retry-policy-backoff.ts index c5c1e384..a8688d97 100644 --- a/src/lib/generated/classes/retry-policy-backoff.ts +++ b/src/lib/generated/classes/retry-policy-backoff.ts @@ -1 +1,12 @@ -export class RetryPolicyBackoff {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _RetryPolicyBackoff extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const RetryPolicyBackoff = _RetryPolicyBackoff as { + new (data?: Partial): _RetryPolicyBackoff & Specification.RetryPolicyBackoff; +}; diff --git a/src/lib/generated/classes/retry-policy-jitter.ts b/src/lib/generated/classes/retry-policy-jitter.ts index 60db393e..0e53f28b 100644 --- a/src/lib/generated/classes/retry-policy-jitter.ts +++ b/src/lib/generated/classes/retry-policy-jitter.ts @@ -1 +1,12 @@ -export class RetryPolicyJitter {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _RetryPolicyJitter extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const RetryPolicyJitter = _RetryPolicyJitter as { + new (data?: Partial): _RetryPolicyJitter & Specification.RetryPolicyJitter; +}; diff --git a/src/lib/generated/classes/retry-policy-limit-attempt.ts b/src/lib/generated/classes/retry-policy-limit-attempt.ts index cbaf287d..3be6d726 100644 --- a/src/lib/generated/classes/retry-policy-limit-attempt.ts +++ b/src/lib/generated/classes/retry-policy-limit-attempt.ts @@ -1 +1,14 @@ -export class RetryPolicyLimitAttempt {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _RetryPolicyLimitAttempt extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const RetryPolicyLimitAttempt = _RetryPolicyLimitAttempt as { + new ( + data?: Partial, + ): _RetryPolicyLimitAttempt & Specification.RetryPolicyLimitAttempt; +}; diff --git a/src/lib/generated/classes/retry-policy-limit.ts b/src/lib/generated/classes/retry-policy-limit.ts index 765999bc..f84b69e3 100644 --- a/src/lib/generated/classes/retry-policy-limit.ts +++ b/src/lib/generated/classes/retry-policy-limit.ts @@ -1 +1,12 @@ -export class RetryPolicyLimit {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _RetryPolicyLimit extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const RetryPolicyLimit = _RetryPolicyLimit as { + new (data?: Partial): _RetryPolicyLimit & Specification.RetryPolicyLimit; +}; diff --git a/src/lib/generated/classes/retry-policy.ts b/src/lib/generated/classes/retry-policy.ts index 0ff655a1..baa7c638 100644 --- a/src/lib/generated/classes/retry-policy.ts +++ b/src/lib/generated/classes/retry-policy.ts @@ -1 +1,12 @@ -export class RetryPolicy {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _RetryPolicy extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const RetryPolicy = _RetryPolicy as { + new (data?: Partial): _RetryPolicy & Specification.RetryPolicy; +}; diff --git a/src/lib/generated/classes/run-task-run-container.ts b/src/lib/generated/classes/run-task-run-container.ts index 405b2760..0fa769fe 100644 --- a/src/lib/generated/classes/run-task-run-container.ts +++ b/src/lib/generated/classes/run-task-run-container.ts @@ -1 +1,12 @@ -export class RunTaskRunContainer {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _RunTaskRunContainer extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const RunTaskRunContainer = _RunTaskRunContainer as { + new (data?: Partial): _RunTaskRunContainer & Specification.RunTaskRunContainer; +}; diff --git a/src/lib/generated/classes/run-task-run-script.ts b/src/lib/generated/classes/run-task-run-script.ts index da4068d5..e4158b14 100644 --- a/src/lib/generated/classes/run-task-run-script.ts +++ b/src/lib/generated/classes/run-task-run-script.ts @@ -1 +1,12 @@ -export class RunTaskRunScript {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _RunTaskRunScript extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const RunTaskRunScript = _RunTaskRunScript as { + new (data?: Partial): _RunTaskRunScript & Specification.RunTaskRunScript; +}; diff --git a/src/lib/generated/classes/run-task-run-shell-arguments.ts b/src/lib/generated/classes/run-task-run-shell-arguments.ts index 8a3ecb5d..53a807aa 100644 --- a/src/lib/generated/classes/run-task-run-shell-arguments.ts +++ b/src/lib/generated/classes/run-task-run-shell-arguments.ts @@ -1 +1,14 @@ -export class RunTaskRunShellArguments {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _RunTaskRunShellArguments extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const RunTaskRunShellArguments = _RunTaskRunShellArguments as { + new ( + data?: Partial, + ): _RunTaskRunShellArguments & Specification.RunTaskRunShellArguments; +}; diff --git a/src/lib/generated/classes/run-task-run-shell-environment.ts b/src/lib/generated/classes/run-task-run-shell-environment.ts index 95d45141..97f26019 100644 --- a/src/lib/generated/classes/run-task-run-shell-environment.ts +++ b/src/lib/generated/classes/run-task-run-shell-environment.ts @@ -1 +1,14 @@ -export class RunTaskRunShellEnvironment {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _RunTaskRunShellEnvironment extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const RunTaskRunShellEnvironment = _RunTaskRunShellEnvironment as { + new ( + data?: Partial, + ): _RunTaskRunShellEnvironment & Specification.RunTaskRunShellEnvironment; +}; diff --git a/src/lib/generated/classes/run-task-run-shell.ts b/src/lib/generated/classes/run-task-run-shell.ts index 4c9ce0be..cba42998 100644 --- a/src/lib/generated/classes/run-task-run-shell.ts +++ b/src/lib/generated/classes/run-task-run-shell.ts @@ -1 +1,12 @@ -export class RunTaskRunShell {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _RunTaskRunShell extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const RunTaskRunShell = _RunTaskRunShell as { + new (data?: Partial): _RunTaskRunShell & Specification.RunTaskRunShell; +}; diff --git a/src/lib/generated/classes/run-task-run-workflow-input.ts b/src/lib/generated/classes/run-task-run-workflow-input.ts index 66fb5875..b5586feb 100644 --- a/src/lib/generated/classes/run-task-run-workflow-input.ts +++ b/src/lib/generated/classes/run-task-run-workflow-input.ts @@ -1 +1,14 @@ -export class RunTaskRunWorkflowInput {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _RunTaskRunWorkflowInput extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const RunTaskRunWorkflowInput = _RunTaskRunWorkflowInput as { + new ( + data?: Partial, + ): _RunTaskRunWorkflowInput & Specification.RunTaskRunWorkflowInput; +}; diff --git a/src/lib/generated/classes/run-task-run-workflow.ts b/src/lib/generated/classes/run-task-run-workflow.ts index e18f88f5..07c3ffc9 100644 --- a/src/lib/generated/classes/run-task-run-workflow.ts +++ b/src/lib/generated/classes/run-task-run-workflow.ts @@ -1 +1,12 @@ -export class RunTaskRunWorkflow {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _RunTaskRunWorkflow extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const RunTaskRunWorkflow = _RunTaskRunWorkflow as { + new (data?: Partial): _RunTaskRunWorkflow & Specification.RunTaskRunWorkflow; +}; diff --git a/src/lib/generated/classes/run-task-run.ts b/src/lib/generated/classes/run-task-run.ts index a52a856e..9b9745dc 100644 --- a/src/lib/generated/classes/run-task-run.ts +++ b/src/lib/generated/classes/run-task-run.ts @@ -1 +1,12 @@ -export class RunTaskRun {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _RunTaskRun extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const RunTaskRun = _RunTaskRun as { + new (data?: Partial): _RunTaskRun & Specification.RunTaskRun; +}; diff --git a/src/lib/generated/classes/run-task.ts b/src/lib/generated/classes/run-task.ts index 93e796f2..c5d2a862 100644 --- a/src/lib/generated/classes/run-task.ts +++ b/src/lib/generated/classes/run-task.ts @@ -1 +1,12 @@ -export class RunTask {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _RunTask extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const RunTask = _RunTask as { + new (data?: Partial): _RunTask & Specification.RunTask; +}; diff --git a/src/lib/generated/classes/schedule.ts b/src/lib/generated/classes/schedule.ts index 0c62c9a8..0396e311 100644 --- a/src/lib/generated/classes/schedule.ts +++ b/src/lib/generated/classes/schedule.ts @@ -1 +1,12 @@ -export class Schedule {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _Schedule extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const Schedule = _Schedule as { + new (data?: Partial): _Schedule & Specification.Schedule; +}; diff --git a/src/lib/generated/classes/schema.ts b/src/lib/generated/classes/schema.ts index 0c689d2d..7a8579bc 100644 --- a/src/lib/generated/classes/schema.ts +++ b/src/lib/generated/classes/schema.ts @@ -1 +1,12 @@ -export class Schema {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _Schema extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const Schema = _Schema as { + new (data?: Partial): _Schema & Specification.Schema; +}; diff --git a/src/lib/generated/classes/set-task-set.ts b/src/lib/generated/classes/set-task-set.ts index 0ce85843..6e6b2e37 100644 --- a/src/lib/generated/classes/set-task-set.ts +++ b/src/lib/generated/classes/set-task-set.ts @@ -1 +1,12 @@ -export class SetTaskSet {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _SetTaskSet extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const SetTaskSet = _SetTaskSet as { + new (data?: Partial): _SetTaskSet & Specification.SetTaskSet; +}; diff --git a/src/lib/generated/classes/set-task.ts b/src/lib/generated/classes/set-task.ts index 739091c1..6d720a3e 100644 --- a/src/lib/generated/classes/set-task.ts +++ b/src/lib/generated/classes/set-task.ts @@ -1 +1,12 @@ -export class SetTask {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _SetTask extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const SetTask = _SetTask as { + new (data?: Partial): _SetTask & Specification.SetTask; +}; diff --git a/src/lib/generated/classes/switch-task-switch.ts b/src/lib/generated/classes/switch-task-switch.ts index 33c026b0..a5b075d2 100644 --- a/src/lib/generated/classes/switch-task-switch.ts +++ b/src/lib/generated/classes/switch-task-switch.ts @@ -1 +1,12 @@ -export class SwitchTaskSwitch {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _SwitchTaskSwitch extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const SwitchTaskSwitch = _SwitchTaskSwitch as { + new (data?: Partial): _SwitchTaskSwitch & Specification.SwitchTaskSwitch; +}; diff --git a/src/lib/generated/classes/switch-task.ts b/src/lib/generated/classes/switch-task.ts index cf0dfada..4dd8bdc1 100644 --- a/src/lib/generated/classes/switch-task.ts +++ b/src/lib/generated/classes/switch-task.ts @@ -1 +1,12 @@ -export class SwitchTask {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _SwitchTask extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const SwitchTask = _SwitchTask as { + new (data?: Partial): _SwitchTask & Specification.SwitchTask; +}; diff --git a/src/lib/generated/classes/task-base.ts b/src/lib/generated/classes/task-base.ts index 41fe560f..f3a94a89 100644 --- a/src/lib/generated/classes/task-base.ts +++ b/src/lib/generated/classes/task-base.ts @@ -1 +1,12 @@ -export class TaskBase {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _TaskBase extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const TaskBase = _TaskBase as { + new (data?: Partial): _TaskBase & Specification.TaskBase; +}; diff --git a/src/lib/generated/classes/task-list.ts b/src/lib/generated/classes/task-list.ts index 34819e4a..944908b9 100644 --- a/src/lib/generated/classes/task-list.ts +++ b/src/lib/generated/classes/task-list.ts @@ -1 +1,12 @@ -export class TaskList {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _TaskList extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const TaskList = _TaskList as { + new (data?: Partial): _TaskList & Specification.TaskList; +}; diff --git a/src/lib/generated/classes/task.ts b/src/lib/generated/classes/task.ts index bb17efbe..0ae61bd9 100644 --- a/src/lib/generated/classes/task.ts +++ b/src/lib/generated/classes/task.ts @@ -1 +1,12 @@ -export class Task {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _Task extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const Task = _Task as { + new (data?: Partial): _Task & Specification.Task; +}; diff --git a/src/lib/generated/classes/timeout.ts b/src/lib/generated/classes/timeout.ts index 5e5868d0..722d4c20 100644 --- a/src/lib/generated/classes/timeout.ts +++ b/src/lib/generated/classes/timeout.ts @@ -1 +1,12 @@ -export class Timeout {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _Timeout extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const Timeout = _Timeout as { + new (data?: Partial): _Timeout & Specification.Timeout; +}; diff --git a/src/lib/generated/classes/try-task-catch.ts b/src/lib/generated/classes/try-task-catch.ts index a3472949..97088428 100644 --- a/src/lib/generated/classes/try-task-catch.ts +++ b/src/lib/generated/classes/try-task-catch.ts @@ -1 +1,12 @@ -export class TryTaskCatch {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _TryTaskCatch extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const TryTaskCatch = _TryTaskCatch as { + new (data?: Partial): _TryTaskCatch & Specification.TryTaskCatch; +}; diff --git a/src/lib/generated/classes/try-task.ts b/src/lib/generated/classes/try-task.ts index 9ee2b1bf..c30bde0f 100644 --- a/src/lib/generated/classes/try-task.ts +++ b/src/lib/generated/classes/try-task.ts @@ -1 +1,12 @@ -export class TryTask {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _TryTask extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const TryTask = _TryTask as { + new (data?: Partial): _TryTask & Specification.TryTask; +}; diff --git a/src/lib/generated/classes/use-authentications.ts b/src/lib/generated/classes/use-authentications.ts new file mode 100644 index 00000000..2b2f3029 --- /dev/null +++ b/src/lib/generated/classes/use-authentications.ts @@ -0,0 +1,12 @@ +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _UseAuthentications extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const UseAuthentications = _UseAuthentications as { + new (data?: Partial): _UseAuthentications & Specification.UseAuthentications; +}; diff --git a/src/lib/generated/classes/use-errors.ts b/src/lib/generated/classes/use-errors.ts new file mode 100644 index 00000000..3f9d1fcc --- /dev/null +++ b/src/lib/generated/classes/use-errors.ts @@ -0,0 +1,12 @@ +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _UseErrors extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const UseErrors = _UseErrors as { + new (data?: Partial): _UseErrors & Specification.UseErrors; +}; diff --git a/src/lib/generated/classes/use-extensions.ts b/src/lib/generated/classes/use-extensions.ts index d9d64c91..d13618ff 100644 --- a/src/lib/generated/classes/use-extensions.ts +++ b/src/lib/generated/classes/use-extensions.ts @@ -1 +1,12 @@ -export class UseExtensions {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _UseExtensions extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const UseExtensions = _UseExtensions as { + new (data?: Partial): _UseExtensions & Specification.UseExtensions; +}; diff --git a/src/lib/generated/classes/use-functions.ts b/src/lib/generated/classes/use-functions.ts new file mode 100644 index 00000000..14279f81 --- /dev/null +++ b/src/lib/generated/classes/use-functions.ts @@ -0,0 +1,12 @@ +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _UseFunctions extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const UseFunctions = _UseFunctions as { + new (data?: Partial): _UseFunctions & Specification.UseFunctions; +}; diff --git a/src/lib/generated/classes/use-retries.ts b/src/lib/generated/classes/use-retries.ts new file mode 100644 index 00000000..02a94d49 --- /dev/null +++ b/src/lib/generated/classes/use-retries.ts @@ -0,0 +1,12 @@ +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _UseRetries extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const UseRetries = _UseRetries as { + new (data?: Partial): _UseRetries & Specification.UseRetries; +}; diff --git a/src/lib/generated/classes/use.ts b/src/lib/generated/classes/use.ts index caa5664e..3e46dc1b 100644 --- a/src/lib/generated/classes/use.ts +++ b/src/lib/generated/classes/use.ts @@ -1 +1,12 @@ -export class Use {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _Use extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const Use = _Use as { + new (data?: Partial): _Use & Specification.Use; +}; diff --git a/src/lib/generated/classes/wait-task.ts b/src/lib/generated/classes/wait-task.ts index fefc0f0a..eaa7e6f1 100644 --- a/src/lib/generated/classes/wait-task.ts +++ b/src/lib/generated/classes/wait-task.ts @@ -1 +1,12 @@ -export class WaitTask {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _WaitTask extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const WaitTask = _WaitTask as { + new (data?: Partial): _WaitTask & Specification.WaitTask; +}; diff --git a/src/lib/generated/classes/workflow.ts b/src/lib/generated/classes/workflow.ts index 5bc621e2..d3b8c39c 100644 --- a/src/lib/generated/classes/workflow.ts +++ b/src/lib/generated/classes/workflow.ts @@ -1 +1,12 @@ -export class Workflow {} +import { _Reflector } from '../../reflector'; +import { Specification } from '../definitions'; + +class _Workflow extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const Workflow = _Workflow as { + new (data?: Partial): _Workflow & Specification.Workflow; +}; diff --git a/src/lib/generated/definitions/specification.ts b/src/lib/generated/definitions/specification.ts index 92078bb6..29604730 100644 --- a/src/lib/generated/definitions/specification.ts +++ b/src/lib/generated/definitions/specification.ts @@ -473,17 +473,29 @@ export interface Oauth2Token { * Defines the workflow's reusable components. */ export interface Use { - authentications?: AuthenticationPolicy; - errors?: Error; + authentications?: UseAuthentications; + errors?: UseErrors; extensions?: UseExtensions; - functions?: Task; - retries?: RetryPolicy; + functions?: UseFunctions; + retries?: UseRetries; /** * The workflow's secrets. */ secrets?: string[]; [k: string]: unknown; } +/** + * The workflow's reusable authentication policies. + */ +export interface UseAuthentications { + [k: string]: AuthenticationPolicy; +} +/** + * The workflow's reusable errors. + */ +export interface UseErrors { + [k: string]: Error; +} export interface Error { /** * A URI reference that identifies the error type. @@ -973,6 +985,18 @@ export interface RetryPolicyJitter { to: Duration; [k: string]: unknown; } +/** + * The workflow's reusable functions. + */ +export interface UseFunctions { + [k: string]: Task; +} +/** + * The workflow's reusable retry policies. + */ +export interface UseRetries { + [k: string]: RetryPolicy; +} /** * Schedules the workflow */ diff --git a/src/lib/generated/schema/__internal_workflow.json b/src/lib/generated/schema/__internal_workflow.json index c7de9beb..2dc8debc 100644 --- a/src/lib/generated/schema/__internal_workflow.json +++ b/src/lib/generated/schema/__internal_workflow.json @@ -52,16 +52,29 @@ "title": "Document" }, "input": { - "$ref": "#/$defs/input" + "$ref": "#/$defs/input", + "description": "Configures the workflow's input.", + "type": "object", + "title": "Input" }, "use": { "type": "object", "properties": { "authentications": { - "$ref": "#/$defs/authenticationPolicy" + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/authenticationPolicy" + }, + "description": "The workflow's reusable authentication policies.", + "title": "UseAuthentications" }, "errors": { - "$ref": "#/$defs/error" + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/error" + }, + "description": "The workflow's reusable errors.", + "title": "UseErrors" }, "extensions": { "type": "array", @@ -77,10 +90,20 @@ "title": "UseExtensions" }, "functions": { - "$ref": "#/$defs/task" + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/task" + }, + "description": "The workflow's reusable functions.", + "title": "UseFunctions" }, "retries": { - "$ref": "#/$defs/retryPolicy" + "type": "object", + "additionalProperties": { + "$ref": "#/$defs/retryPolicy" + }, + "description": "The workflow's reusable retry policies.", + "title": "UseRetries" }, "secrets": { "type": "array", @@ -94,29 +117,47 @@ "title": "Use" }, "do": { - "$ref": "#/$defs/taskList" + "description": "Defines the task(s) the workflow must perform", + "$ref": "#/$defs/taskList", + "type": "object", + "title": "Do" }, "timeout": { - "$ref": "#/$defs/timeout" + "$ref": "#/$defs/timeout", + "description": "The workflow's timeout configuration, if any.", + "type": "object", + "title": "Timeout" }, "output": { - "$ref": "#/$defs/output" + "$ref": "#/$defs/output", + "description": "Configures the workflow's output.", + "type": "object", + "title": "Output" }, "schedule": { "type": "object", "properties": { "every": { - "$ref": "#/$defs/duration" + "$ref": "#/$defs/duration", + "description": "Specifies the duration of the interval at which the workflow should be executed.", + "type": "object", + "title": "ScheduleEvery" }, "cron": { "type": "string", "description": "Specifies the schedule using a cron expression, e.g., '0 0 * * *' for daily at midnight.\"" }, "after": { - "$ref": "#/$defs/duration" + "$ref": "#/$defs/duration", + "description": "Specifies a delay duration that the workflow must wait before starting again after it completes.", + "type": "object", + "title": "ScheduleAfter" }, "on": { - "$ref": "#/$defs/eventConsumptionStrategy" + "$ref": "#/$defs/eventConsumptionStrategy", + "description": "Specifies the events that trigger the workflow execution.", + "type": "object", + "title": "ScheduleOn" } }, "description": "Schedules the workflow", @@ -144,975 +185,926 @@ "description": "A runtime expression, if any, used to determine whether or not the task should be run." }, "input": { - "$ref": "#/$defs/input" + "$ref": "#/$defs/input", + "description": "Configure the task's input.", + "type": "object", + "title": "TaskBaseInput" }, "output": { - "$ref": "#/$defs/output" + "$ref": "#/$defs/output", + "description": "Configure the task's output.", + "type": "object", + "title": "TaskBaseOutput" }, "export": { - "$ref": "#/$defs/export" + "$ref": "#/$defs/export", + "description": "Export task output to context.", + "type": "object", + "title": "TaskBaseExport" }, "timeout": { - "$ref": "#/$defs/timeout" + "$ref": "#/$defs/timeout", + "description": "The task's timeout configuration, if any.", + "type": "object", + "title": "TaskBaseTimeout" }, "then": { - "$ref": "#/$defs/flowDirective" + "$ref": "#/$defs/flowDirective", + "description": "The flow directive to be performed upon completion of the task.", + "type": "object", + "title": "TaskBaseThen" } }, "title": "TaskBase" }, "task": { + "unevaluatedProperties": false, "oneOf": [ { - "$ref": "#/$defs/callTask" + "$ref": "#/$defs/callTask", + "type": "object" }, { - "$ref": "#/$defs/doTask" + "$ref": "#/$defs/doTask", + "type": "object" }, { - "$ref": "#/$defs/forkTask" + "$ref": "#/$defs/forkTask", + "type": "object" }, { - "$ref": "#/$defs/emitTask" + "$ref": "#/$defs/emitTask", + "type": "object" }, { - "$ref": "#/$defs/forTask" + "$ref": "#/$defs/forTask", + "type": "object" }, { - "$ref": "#/$defs/listenTask" + "$ref": "#/$defs/listenTask", + "type": "object" }, { - "$ref": "#/$defs/raiseTask" + "$ref": "#/$defs/raiseTask", + "type": "object" }, { - "$ref": "#/$defs/runTask" + "$ref": "#/$defs/runTask", + "type": "object" }, { - "$ref": "#/$defs/setTask" + "$ref": "#/$defs/setTask", + "type": "object" }, { - "$ref": "#/$defs/switchTask" + "$ref": "#/$defs/switchTask", + "type": "object" }, { - "$ref": "#/$defs/tryTask" + "$ref": "#/$defs/tryTask", + "type": "object" }, { - "$ref": "#/$defs/waitTask" + "$ref": "#/$defs/waitTask", + "type": "object" } ], - "type": "object", - "title": "Task", - "additionalProperties": false + "title": "Task" }, "callTask": { "oneOf": [ { "title": "CallAsyncAPI", + "$ref": "#/$defs/taskBase", "type": "object", "required": [ "call", "with" ], - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/$defs/taskBase" + "unevaluatedProperties": false, + "properties": { + "call": { + "type": "string", + "const": "asyncapi" }, - { + "with": { + "type": "object", "properties": { - "call": { + "document": { + "$ref": "#/$defs/externalResource", + "description": "The document that defines the AsyncAPI operation to call.", + "type": "object", + "title": "CallAsyncAPIWithDocument" + }, + "operationRef": { + "type": "string", + "description": "A reference to the AsyncAPI operation to call." + }, + "server": { + "type": "string", + "description": "A a reference to the server to call the specified AsyncAPI operation on. If not set, default to the first server matching the operation's channel." + }, + "message": { + "type": "string", + "description": "The name of the message to use. If not set, defaults to the first message defined by the operation." + }, + "binding": { "type": "string", - "const": "asyncapi" + "description": "The name of the binding to use. If not set, defaults to the first binding defined by the operation." }, - "with": { + "payload": { "type": "object", - "properties": { - "document": { - "$ref": "#/$defs/externalResource" - }, - "operationRef": { - "type": "string", - "description": "A reference to the AsyncAPI operation to call." - }, - "server": { - "type": "string", - "description": "A a reference to the server to call the specified AsyncAPI operation on. If not set, default to the first server matching the operation's channel." - }, - "message": { - "type": "string", - "description": "The name of the message to use. If not set, defaults to the first message defined by the operation." - }, - "binding": { - "type": "string", - "description": "The name of the binding to use. If not set, defaults to the first binding defined by the operation." - }, - "payload": { - "type": "object", - "description": "The payload to call the AsyncAPI operation with, if any." + "description": "The payload to call the AsyncAPI operation with, if any." + }, + "authentication": { + "description": "The authentication policy, if any, to use when calling the AsyncAPI operation.", + "oneOf": [ + { + "$ref": "#/$defs/authenticationPolicy", + "type": "object" }, - "authentication": { - "description": "The authentication policy, if any, to use when calling the AsyncAPI operation.", - "oneOf": [ - { - "$ref": "#/$defs/authenticationPolicy" - }, - { - "type": "string" - } - ], - "type": "object", - "title": "CallAsyncAPIWithAuthentication" + { + "type": "string" } - }, - "required": [ - "document", - "operationRef" ], - "additionalProperties": false, - "description": "Defines the AsyncAPI call to perform.", - "title": "CallAsyncAPIWith" + "title": "CallAsyncAPIWithAuthentication" } }, - "type": "object" + "required": [ + "document", + "operationRef" + ], + "additionalProperties": false, + "description": "Defines the AsyncAPI call to perform.", + "title": "CallAsyncAPIWith" } - ] + } }, { "title": "CallGRPC", + "$ref": "#/$defs/taskBase", "type": "object", + "unevaluatedProperties": false, "required": [ "call", "with" ], - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/$defs/taskBase" + "properties": { + "call": { + "type": "string", + "const": "grpc" }, - { + "with": { + "type": "object", "properties": { - "call": { - "type": "string", - "const": "grpc" + "proto": { + "$ref": "#/$defs/externalResource", + "description": "The proto resource that describes the GRPC service to call.", + "type": "object", + "title": "CallGRPCWithProto" }, - "with": { + "service": { "type": "object", "properties": { - "proto": { - "$ref": "#/$defs/externalResource" + "name": { + "type": "string", + "description": "The name of the GRPC service to call." }, - "service": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the GRPC service to call." - }, - "host": { - "type": "string", - "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$", - "description": "The hostname of the GRPC service to call." - }, - "port": { - "type": "integer", - "min": 0, - "max": 65535, - "description": "The port number of the GRPC service to call." + "host": { + "type": "string", + "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$", + "description": "The hostname of the GRPC service to call." + }, + "port": { + "type": "integer", + "min": 0, + "max": 65535, + "description": "The port number of the GRPC service to call." + }, + "authentication": { + "description": "The endpoint's authentication policy, if any.", + "oneOf": [ + { + "$ref": "#/$defs/authenticationPolicy", + "type": "object" }, - "authentication": { - "description": "The endpoint's authentication policy, if any.", - "oneOf": [ - { - "$ref": "#/$defs/authenticationPolicy" - }, - { - "type": "string" - } - ], - "type": "object", - "title": "CallGRPCWithServiceAuthentication" + { + "type": "string" } - }, - "required": [ - "name", - "host" ], - "title": "CallGRPCWithService" - }, - "method": { - "type": "string", - "description": "The name of the method to call on the defined GRPC service." - }, - "arguments": { - "type": "object", - "additionalProperties": true, - "description": "The arguments, if any, to call the method with.", - "title": "CallGRPCWithArguments" + "title": "CallGRPCWithServiceAuthentication" } }, "required": [ - "proto", - "service", - "method" + "name", + "host" ], - "additionalProperties": false, - "description": "Defines the GRPC call to perform.", - "title": "CallGRPCWith" + "title": "CallGRPCWithService" + }, + "method": { + "type": "string", + "description": "The name of the method to call on the defined GRPC service." + }, + "arguments": { + "type": "object", + "additionalProperties": true, + "description": "The arguments, if any, to call the method with.", + "title": "CallGRPCWithArguments" } }, - "type": "object" + "required": [ + "proto", + "service", + "method" + ], + "additionalProperties": false, + "description": "Defines the GRPC call to perform.", + "title": "CallGRPCWith" } - ] + } }, { "title": "CallHTTP", + "$ref": "#/$defs/taskBase", "type": "object", + "unevaluatedProperties": false, "required": [ "call", "with" ], - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/$defs/taskBase" + "properties": { + "call": { + "type": "string", + "const": "http" }, - { + "with": { + "type": "object", "properties": { - "call": { + "method": { "type": "string", - "const": "http" + "description": "The HTTP method of the HTTP request to perform." }, - "with": { - "type": "object", - "properties": { - "method": { - "type": "string", - "description": "The HTTP method of the HTTP request to perform." - }, - "endpoint": { - "description": "The HTTP endpoint to send the request to.", - "oneOf": [ - { - "$ref": "#/$defs/endpoint" - }, - { - "type": "string", - "format": "uri-template" - } - ], - "type": "object", - "title": "CallHTTPWithEndpoint" - }, - "headers": { - "type": "object", - "description": "A name/value mapping of the headers, if any, of the HTTP request to perform." - }, - "body": { - "description": "The body, if any, of the HTTP request to perform.", + "endpoint": { + "description": "The HTTP endpoint to send the request to.", + "oneOf": [ + { + "$ref": "#/$defs/endpoint", "type": "object" }, - "output": { + { "type": "string", - "enum": [ - "raw", - "content", - "response" - ], - "description": "The http call output format. Defaults to 'content'." + "format": "uri-template" } - }, - "required": [ - "method", - "endpoint" ], - "additionalProperties": false, - "description": "Defines the HTTP call to perform.", - "title": "CallHTTPWith" + "title": "CallHTTPWithEndpoint" + }, + "headers": { + "type": "object", + "description": "A name/value mapping of the headers, if any, of the HTTP request to perform." + }, + "body": { + "description": "The body, if any, of the HTTP request to perform.", + "type": "object" + }, + "output": { + "type": "string", + "enum": [ + "raw", + "content", + "response" + ], + "description": "The http call output format. Defaults to 'content'." } }, - "type": "object" + "required": [ + "method", + "endpoint" + ], + "additionalProperties": false, + "description": "Defines the HTTP call to perform.", + "title": "CallHTTPWith" } - ] + } }, { "title": "CallOpenAPI", + "$ref": "#/$defs/taskBase", "type": "object", + "unevaluatedProperties": false, "required": [ "call", "with" ], - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/$defs/taskBase" + "properties": { + "call": { + "type": "string", + "const": "openapi" }, - { + "with": { + "type": "object", "properties": { - "call": { + "document": { + "$ref": "#/$defs/externalResource", + "description": "The document that defines the OpenAPI operation to call.", + "type": "object", + "title": "CallOpenAPIWithDocument" + }, + "operationId": { "type": "string", - "const": "openapi" + "description": "The id of the OpenAPI operation to call." }, - "with": { + "parameters": { "type": "object", - "properties": { - "document": { - "$ref": "#/$defs/externalResource" - }, - "operationId": { - "type": "string", - "description": "The id of the OpenAPI operation to call." - }, - "parameters": { - "type": "object", - "additionalProperties": true, - "description": "A name/value mapping of the parameters of the OpenAPI operation to call.", - "title": "CallOpenAPIWithParameters" - }, - "authentication": { - "description": "The authentication policy, if any, to use when calling the OpenAPI operation.", - "oneOf": [ - { - "$ref": "#/$defs/authenticationPolicy" - }, - { - "type": "string" - } - ], - "type": "object", - "title": "CallOpenAPIWithAuthentication" + "additionalProperties": true, + "description": "A name/value mapping of the parameters of the OpenAPI operation to call.", + "title": "CallOpenAPIWithParameters" + }, + "authentication": { + "description": "The authentication policy, if any, to use when calling the OpenAPI operation.", + "oneOf": [ + { + "$ref": "#/$defs/authenticationPolicy", + "type": "object" }, - "output": { - "type": "string", - "enum": [ - "raw", - "content", - "response" - ], - "description": "The http call output format. Defaults to 'content'." + { + "type": "string" } - }, - "required": [ - "document", - "operationId" ], - "additionalProperties": false, - "description": "Defines the OpenAPI call to perform.", - "title": "CallOpenAPIWith" + "title": "CallOpenAPIWithAuthentication" + }, + "output": { + "type": "string", + "enum": [ + "raw", + "content", + "response" + ], + "description": "The http call output format. Defaults to 'content'." } }, - "type": "object" + "required": [ + "document", + "operationId" + ], + "additionalProperties": false, + "description": "Defines the OpenAPI call to perform.", + "title": "CallOpenAPIWith" } - ] + } }, { "title": "CallFunction", + "$ref": "#/$defs/taskBase", "type": "object", + "unevaluatedProperties": false, "required": [ "call" ], - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/$defs/taskBase" - }, - { - "properties": { - "call": { - "type": "string", - "not": { - "enum": [ - "asyncapi", - "grpc", - "http", - "openapi" - ] - }, - "description": "The name of the function to call." - }, - "with": { - "type": "object", - "additionalProperties": true, - "description": "A name/value mapping of the parameters, if any, to call the function with.", - "title": "CallFunctionWith" - } + "properties": { + "call": { + "type": "string", + "not": { + "enum": [ + "asyncapi", + "grpc", + "http", + "openapi" + ] }, - "type": "object" + "description": "The name of the function to call." + }, + "with": { + "type": "object", + "additionalProperties": true, + "description": "A name/value mapping of the parameters, if any, to call the function with.", + "title": "CallFunctionWith" } - ] + } } ], - "type": "object", "title": "CallTask" }, "forkTask": { "description": "Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output.", + "$ref": "#/$defs/taskBase", "type": "object", + "unevaluatedProperties": false, "required": [ "fork" ], - "title": "ForkTask", - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/$defs/taskBase" - }, - { + "properties": { + "fork": { + "type": "object", + "required": [ + "branches" + ], "properties": { - "fork": { + "branches": { + "$ref": "#/$defs/taskList", "type": "object", - "required": [ - "branches" - ], - "properties": { - "branches": { - "$ref": "#/$defs/taskList" - }, - "compete": { - "description": "Indicates whether or not the concurrent tasks are racing against each other, with a single possible winner, which sets the composite task's output.", - "type": "boolean", - "default": false - } - }, - "title": "ForkTaskFork" + "title": "ForkTaskForkBranches" + }, + "compete": { + "description": "Indicates whether or not the concurrent tasks are racing against each other, with a single possible winner, which sets the composite task's output.", + "type": "boolean", + "default": false } }, - "type": "object" + "title": "ForkTaskFork" } - ] + }, + "title": "ForkTask" }, "doTask": { "description": "Allows to execute a list of tasks in sequence", + "$ref": "#/$defs/taskBase", "type": "object", + "unevaluatedProperties": false, "required": [ "do" ], - "title": "DoTask", - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/$defs/taskBase" - }, - { - "properties": { - "do": { - "$ref": "#/$defs/taskList" - } - }, - "type": "object" + "properties": { + "do": { + "$ref": "#/$defs/taskList", + "type": "object", + "title": "DoTaskDo" } - ] + }, + "title": "DoTask" }, "emitTask": { "description": "Allows workflows to publish events to event brokers or messaging systems, facilitating communication and coordination between different components and services.", + "$ref": "#/$defs/taskBase", "type": "object", "required": [ "emit" ], - "title": "EmitTask", - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/$defs/taskBase" - }, - { + "unevaluatedProperties": false, + "properties": { + "emit": { + "type": "object", "properties": { - "emit": { + "event": { "type": "object", "properties": { - "event": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The event's unique identifier" - }, - "source": { - "type": "string", - "format": "uri", - "description": "Identifies the context in which an event happened" - }, - "type": { - "type": "string", - "description": "This attribute contains a value describing the type of event related to the originating occurrence." - }, - "time": { - "type": "string", - "format": "date-time" - }, - "subject": { - "type": "string" - }, - "datacontenttype": { - "type": "string", - "description": "Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format." - }, - "dataschema": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "source", - "type" - ], - "additionalProperties": true, - "title": "EmitTaskEmitEvent" + "id": { + "type": "string", + "description": "The event's unique identifier" + }, + "source": { + "type": "string", + "format": "uri", + "description": "Identifies the context in which an event happened" + }, + "type": { + "type": "string", + "description": "This attribute contains a value describing the type of event related to the originating occurrence." + }, + "time": { + "type": "string", + "format": "date-time" + }, + "subject": { + "type": "string" + }, + "datacontenttype": { + "type": "string", + "description": "Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format." + }, + "dataschema": { + "type": "string", + "format": "uri" } }, "required": [ - "event" + "source", + "type" ], - "title": "EmitTaskEmit" + "additionalProperties": true, + "title": "EmitTaskEmitEvent" } }, - "type": "object" + "required": [ + "event" + ], + "title": "EmitTaskEmit" } - ] + }, + "title": "EmitTask" }, "forTask": { "description": "Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets.", + "$ref": "#/$defs/taskBase", "type": "object", "required": [ "for", "do" ], - "title": "ForTask", - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/$defs/taskBase" - }, - { + "unevaluatedProperties": false, + "properties": { + "for": { + "type": "object", "properties": { - "for": { - "type": "object", - "properties": { - "each": { - "type": "string", - "description": "The name of the variable used to store the current item being enumerated.", - "default": "item" - }, - "in": { - "type": "string", - "description": "A runtime expression used to get the collection to enumerate." - }, - "at": { - "type": "string", - "description": "The name of the variable used to store the index of the current item being enumerated.", - "default": "index" - } - }, - "required": [ - "in" - ], - "title": "ForTaskFor" + "each": { + "type": "string", + "description": "The name of the variable used to store the current item being enumerated.", + "default": "item" }, - "while": { + "in": { "type": "string", - "description": "A runtime expression that represents the condition, if any, that must be met for the iteration to continue." + "description": "A runtime expression used to get the collection to enumerate." }, - "do": { - "$ref": "#/$defs/taskList" + "at": { + "type": "string", + "description": "The name of the variable used to store the index of the current item being enumerated.", + "default": "index" } }, - "type": "object" + "required": [ + "in" + ], + "title": "ForTaskFor" + }, + "while": { + "type": "string", + "description": "A runtime expression that represents the condition, if any, that must be met for the iteration to continue." + }, + "do": { + "$ref": "#/$defs/taskList", + "type": "object", + "title": "ForTaskDo" } - ] + }, + "title": "ForTask" }, "listenTask": { "description": "Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems.", + "$ref": "#/$defs/taskBase", "type": "object", "required": [ "listen" ], - "title": "ListenTask", - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/$defs/taskBase" - }, - { + "unevaluatedProperties": false, + "properties": { + "listen": { + "type": "object", "properties": { - "listen": { + "to": { + "$ref": "#/$defs/eventConsumptionStrategy", + "description": "Defines the event(s) to listen to.", "type": "object", - "properties": { - "to": { - "$ref": "#/$defs/eventConsumptionStrategy" - } - }, - "required": [ - "to" - ], - "title": "ListenTaskListen" + "title": "ListenTaskListenTo" } }, - "type": "object" + "required": [ + "to" + ], + "title": "ListenTaskListen" } - ] + }, + "title": "ListenTask" }, "raiseTask": { "description": "Intentionally triggers and propagates errors.", + "$ref": "#/$defs/taskBase", "type": "object", "required": [ "raise" ], - "title": "RaiseTask", - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/$defs/taskBase" - }, - { + "unevaluatedProperties": false, + "properties": { + "raise": { + "type": "object", "properties": { - "raise": { + "error": { + "$ref": "#/$defs/error", + "description": "Defines the error to raise.", "type": "object", - "properties": { - "error": { - "$ref": "#/$defs/error" - } - }, - "required": [ - "error" - ], - "title": "RaiseTaskRaise" + "title": "RaiseTaskRaiseError" } }, - "type": "object" + "required": [ + "error" + ], + "title": "RaiseTaskRaise" } - ] + }, + "title": "RaiseTask" }, "runTask": { "description": "Provides the capability to execute external containers, shell commands, scripts, or workflows.", + "$ref": "#/$defs/taskBase", "type": "object", "required": [ "run" ], - "title": "RunTask", - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/$defs/taskBase" - }, - { - "properties": { - "run": { - "type": "object", - "oneOf": [ - { + "unevaluatedProperties": false, + "properties": { + "run": { + "type": "object", + "oneOf": [ + { + "properties": { + "container": { + "type": "object", "properties": { - "container": { + "image": { + "type": "string", + "description": "The name of the container image to run." + }, + "command": { + "type": "string", + "description": "The command, if any, to execute on the container" + }, + "ports": { "type": "object", - "properties": { - "image": { - "type": "string", - "description": "The name of the container image to run." - }, - "command": { - "type": "string", - "description": "The command, if any, to execute on the container" - }, - "ports": { - "type": "object", - "description": "The container's port mappings, if any." - }, - "volumes": { - "type": "object", - "description": "The container's volume mappings, if any." - }, - "environment": { - "type": "object", - "description": "A key/value mapping of the environment variables, if any, to use when running the configured process." - } - }, - "required": [ - "image" - ], - "title": "RunTaskRunContainer" + "description": "The container's port mappings, if any." + }, + "volumes": { + "type": "object", + "description": "The container's volume mappings, if any." + }, + "environment": { + "type": "object", + "description": "A key/value mapping of the environment variables, if any, to use when running the configured process." } }, "required": [ - "container" + "image" ], - "description": "Enables the execution of external processes encapsulated within a containerized environment.", - "type": "object" - }, - { + "title": "RunTaskRunContainer" + } + }, + "required": [ + "container" + ], + "description": "Enables the execution of external processes encapsulated within a containerized environment.", + "type": "object" + }, + { + "properties": { + "script": { + "type": "object", "properties": { - "script": { + "language": { + "type": "string", + "description": "The language of the script to run." + }, + "environment": { "type": "object", + "additionalProperties": true, + "description": "A key/value mapping of the environment variables, if any, to use when running the configured process.", + "title": "RunTaskRunScriptEnvironment" + } + }, + "oneOf": [ + { "properties": { - "language": { - "type": "string", - "description": "The language of the script to run." - }, - "environment": { - "type": "object", - "additionalProperties": true, - "description": "A key/value mapping of the environment variables, if any, to use when running the configured process.", - "title": "RunTaskRunScriptEnvironment" + "code": { + "type": "string" } }, - "oneOf": [ - { - "properties": { - "code": { - "type": "string" - } - }, - "required": [ - "code" - ], - "description": "The script's code.", - "type": "object" - }, - { - "properties": { - "source": { - "$ref": "#/$defs/externalResource" - } - }, - "description": "The script's resource.", - "required": [ - "source" - ], - "type": "object" - } - ], "required": [ - "language" + "code" ], - "title": "RunTaskRunScript" - } - }, - "required": [ - "script" - ], - "description": "Enables the execution of custom scripts or code within a workflow, empowering workflows to perform specialized logic, data processing, or integration tasks by executing user-defined scripts written in various programming languages.", - "type": "object" - }, - { - "properties": { - "shell": { - "type": "object", + "description": "The script's code.", + "type": "object" + }, + { "properties": { - "command": { - "type": "string", - "description": "The shell command to run." - }, - "arguments": { + "source": { + "$ref": "#/$defs/externalResource", "type": "object", - "additionalProperties": true, - "description": "A list of the arguments of the shell command to run.", - "title": "RunTaskRunShellArguments" - }, - "environment": { - "type": "object", - "additionalProperties": true, - "description": "A key/value mapping of the environment variables, if any, to use when running the configured process.", - "title": "RunTaskRunShellEnvironment" + "title": "RunTaskRunScriptSource" } }, + "description": "The script's resource.", "required": [ - "command" + "source" ], - "title": "RunTaskRunShell" + "type": "object" + } + ], + "required": [ + "language" + ], + "title": "RunTaskRunScript" + } + }, + "required": [ + "script" + ], + "description": "Enables the execution of custom scripts or code within a workflow, empowering workflows to perform specialized logic, data processing, or integration tasks by executing user-defined scripts written in various programming languages.", + "type": "object" + }, + { + "properties": { + "shell": { + "type": "object", + "properties": { + "command": { + "type": "string", + "description": "The shell command to run." + }, + "arguments": { + "type": "object", + "additionalProperties": true, + "description": "A list of the arguments of the shell command to run.", + "title": "RunTaskRunShellArguments" + }, + "environment": { + "type": "object", + "additionalProperties": true, + "description": "A key/value mapping of the environment variables, if any, to use when running the configured process.", + "title": "RunTaskRunShellEnvironment" } }, "required": [ - "shell" + "command" ], - "description": "Enables the execution of shell commands within a workflow, enabling workflows to interact with the underlying operating system and perform system-level operations, such as file manipulation, environment configuration, or system administration tasks.", - "type": "object" - }, - { + "title": "RunTaskRunShell" + } + }, + "required": [ + "shell" + ], + "description": "Enables the execution of shell commands within a workflow, enabling workflows to interact with the underlying operating system and perform system-level operations, such as file manipulation, environment configuration, or system administration tasks.", + "type": "object" + }, + { + "properties": { + "workflow": { + "type": "object", "properties": { - "workflow": { + "namespace": { + "type": "string", + "description": "The namespace the workflow to run belongs to." + }, + "name": { + "type": "string", + "description": "The name of the workflow to run." + }, + "version": { + "type": "string", + "default": "latest", + "description": "The version of the workflow to run. Defaults to latest" + }, + "input": { "type": "object", - "properties": { - "namespace": { - "type": "string", - "description": "The namespace the workflow to run belongs to." - }, - "name": { - "type": "string", - "description": "The name of the workflow to run." - }, - "version": { - "type": "string", - "default": "latest", - "description": "The version of the workflow to run. Defaults to latest" - }, - "input": { - "type": "object", - "additionalProperties": true, - "description": "The data, if any, to pass as input to the workflow to execute. The value should be validated against the target workflow's input schema, if specified.", - "title": "RunTaskRunWorkflowInput" - } - }, - "required": [ - "namespace", - "name", - "version" - ], - "title": "RunTaskRunWorkflow" + "additionalProperties": true, + "description": "The data, if any, to pass as input to the workflow to execute. The value should be validated against the target workflow's input schema, if specified.", + "title": "RunTaskRunWorkflowInput" } }, "required": [ - "workflow" + "namespace", + "name", + "version" ], - "description": "Enables the invocation and execution of nested workflows within a parent workflow, facilitating modularization, reusability, and abstraction of complex logic or business processes by encapsulating them into standalone workflow units.", - "type": "object" + "title": "RunTaskRunWorkflow" } + }, + "required": [ + "workflow" ], - "title": "RunTaskRun" + "description": "Enables the invocation and execution of nested workflows within a parent workflow, facilitating modularization, reusability, and abstraction of complex logic or business processes by encapsulating them into standalone workflow units.", + "type": "object" } - }, - "type": "object" + ], + "title": "RunTaskRun" } - ] + }, + "title": "RunTask" }, "setTask": { "description": "A task used to set data", + "$ref": "#/$defs/taskBase", "type": "object", "required": [ "set" ], - "title": "SetTask", - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/$defs/taskBase" - }, - { - "properties": { - "set": { - "type": "object", - "minProperties": 1, - "additionalProperties": true, - "description": "The data to set", - "title": "SetTaskSet" - } - }, - "type": "object" + "unevaluatedProperties": false, + "properties": { + "set": { + "type": "object", + "minProperties": 1, + "additionalProperties": true, + "description": "The data to set", + "title": "SetTaskSet" } - ] + }, + "title": "SetTask" }, "switchTask": { "description": "Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria", + "$ref": "#/$defs/taskBase", "type": "object", "required": [ "switch" ], - "title": "SwitchTask", - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/$defs/taskBase" - }, - { - "properties": { - "switch": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "minProperties": 1, - "maxProperties": 1, - "additionalProperties": { + "unevaluatedProperties": false, + "properties": { + "switch": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The case's name." + }, + "when": { + "type": "string", + "description": "A runtime expression used to determine whether or not the case matches." + }, + "then": { + "$ref": "#/$defs/flowDirective", + "description": "The flow directive to execute when the case matches.", "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The case's name." - }, - "when": { - "type": "string", - "description": "A runtime expression used to determine whether or not the case matches." - }, - "then": { - "$ref": "#/$defs/flowDirective" - } - } + "title": "SwitchTaskSwitchThen" } - }, - "title": "SwitchTaskSwitch" + } } }, - "type": "object" + "title": "SwitchTaskSwitch" } - ] + }, + "title": "SwitchTask" }, "tryTask": { "description": "Serves as a mechanism within workflows to handle errors gracefully, potentially retrying failed tasks before proceeding with alternate ones.", + "$ref": "#/$defs/taskBase", "type": "object", "required": [ "try", "catch" ], - "title": "TryTask", - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/$defs/taskBase" + "unevaluatedProperties": false, + "properties": { + "try": { + "description": "The task(s) to perform.", + "$ref": "#/$defs/taskList", + "type": "object", + "title": "TryTaskTry" }, - { + "catch": { + "type": "object", "properties": { - "try": { - "$ref": "#/$defs/taskList" + "errors": { + "type": "object" }, - "catch": { + "as": { + "type": "string", + "description": "The name of the runtime expression variable to save the error as. Defaults to 'error'." + }, + "when": { + "type": "string", + "description": "A runtime expression used to determine whether or not to catch the filtered error" + }, + "exceptWhen": { + "type": "string", + "description": "A runtime expression used to determine whether or not to catch the filtered error" + }, + "retry": { + "$ref": "#/$defs/retryPolicy", + "description": "The retry policy to use, if any, when catching errors.", "type": "object", - "properties": { - "errors": { - "type": "object" - }, - "as": { - "type": "string", - "description": "The name of the runtime expression variable to save the error as. Defaults to 'error'." - }, - "when": { - "type": "string", - "description": "A runtime expression used to determine whether or not to catch the filtered error" - }, - "exceptWhen": { - "type": "string", - "description": "A runtime expression used to determine whether or not to catch the filtered error" - }, - "retry": { - "$ref": "#/$defs/retryPolicy" - }, - "do": { - "$ref": "#/$defs/taskList" - } - }, - "title": "TryTaskCatch" + "title": "TryTaskCatchRetry" + }, + "do": { + "description": "The definition of the task(s) to run when catching an error.", + "$ref": "#/$defs/taskList", + "type": "object", + "title": "TryTaskCatchDo" } }, - "type": "object" + "title": "TryTaskCatch" } - ] + }, + "title": "TryTask" }, "waitTask": { "description": "Allows workflows to pause or delay their execution for a specified period of time.", + "$ref": "#/$defs/taskBase", "type": "object", "required": [ "wait" ], - "title": "WaitTask", - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/$defs/taskBase" - }, - { - "properties": { - "wait": { - "$ref": "#/$defs/duration" - } - }, - "type": "object" + "unevaluatedProperties": false, + "properties": { + "wait": { + "description": "The amount of time to wait.", + "$ref": "#/$defs/duration", + "type": "object", + "title": "WaitTaskWait" } - ] + }, + "title": "WaitTask" }, "flowDirective": { "additionalProperties": false, @@ -1130,7 +1122,6 @@ "type": "string" } ], - "type": "object", "title": "FlowDirective" }, "authenticationPolicy": { @@ -1239,10 +1230,16 @@ "description": "The password to use. Used only if the grant type is Password." }, "subject": { - "$ref": "#/$defs/oauth2Token" + "$ref": "#/$defs/oauth2Token", + "description": "The security token that represents the identity of the party on behalf of whom the request is being made.", + "type": "object", + "title": "AuthenticationPolicyOauth2Subject" }, "actor": { - "$ref": "#/$defs/oauth2Token" + "$ref": "#/$defs/oauth2Token", + "description": "The security token that represents the identity of the acting party.", + "type": "object", + "title": "AuthenticationPolicyOauth2Actor" } }, "required": [ @@ -1354,13 +1351,13 @@ "description": "The authentication policy to use.", "oneOf": [ { - "$ref": "#/$defs/authenticationPolicy" + "$ref": "#/$defs/authenticationPolicy", + "type": "object" }, { "type": "string" } ], - "type": "object", "title": "EndpointAuthentication" } }, @@ -1407,7 +1404,10 @@ { "properties": { "one": { - "$ref": "#/$defs/eventFilter" + "$ref": "#/$defs/eventFilter", + "description": "The single event to consume.", + "type": "object", + "title": "EventConsumptionStrategyOne" } }, "required": [ @@ -1509,10 +1509,16 @@ "description": "A runtime expression, if any, used to determine whether or not the extension should apply in the specified context." }, "before": { - "$ref": "#/$defs/taskList" + "description": "The task(s) to execute before the extended task, if any.", + "$ref": "#/$defs/taskList", + "type": "object", + "title": "ExtensionBefore" }, "after": { - "$ref": "#/$defs/taskList" + "description": "The task(s) to execute after the extended task, if any.", + "$ref": "#/$defs/taskList", + "type": "object", + "title": "ExtensionAfter" } }, "required": [ @@ -1539,13 +1545,13 @@ "description": "The authentication policy to use.", "oneOf": [ { - "$ref": "#/$defs/authenticationPolicy" + "$ref": "#/$defs/authenticationPolicy", + "type": "object" }, { "type": "string" } ], - "type": "object", "title": "ExternalResourceAuthentication" }, "name": { @@ -1558,14 +1564,16 @@ ] } ], - "type": "object", "title": "ExternalResource" }, "input": { "type": "object", "properties": { "schema": { - "$ref": "#/$defs/schema" + "$ref": "#/$defs/schema", + "description": "The schema used to describe and validate the input of the workflow or task.", + "type": "object", + "title": "InputSchema" }, "from": { "type": "string", @@ -1579,7 +1587,10 @@ "type": "object", "properties": { "schema": { - "$ref": "#/$defs/schema" + "$ref": "#/$defs/schema", + "description": "The schema used to describe and validate the output of the workflow or task.", + "type": "object", + "title": "OutputSchema" }, "as": { "type": "string", @@ -1593,7 +1604,10 @@ "type": "object", "properties": { "schema": { - "$ref": "#/$defs/schema" + "$ref": "#/$defs/schema", + "description": "The schema used to describe and validate the workflow context.", + "type": "object", + "title": "ExportSchema" }, "as": { "type": "string", @@ -1615,7 +1629,10 @@ "description": "A runtime expression used to determine whether or not to retry running the task, in a given context." }, "delay": { - "$ref": "#/$defs/duration" + "$ref": "#/$defs/duration", + "description": "The duration to wait between retry attempts.", + "type": "object", + "title": "RetryPolicyDelay" }, "backoff": { "type": "object", @@ -1671,13 +1688,19 @@ "description": "The maximum amount of retry attempts, if any." }, "duration": { - "$ref": "#/$defs/duration" + "$ref": "#/$defs/duration", + "description": "The maximum duration for each retry attempt.", + "type": "object", + "title": "RetryPolicyLimitAttemptDuration" } }, "title": "RetryPolicyLimitAttempt" }, "duration": { - "$ref": "#/$defs/duration" + "$ref": "#/$defs/duration", + "description": "The duration limit, if any, for all retry attempts.", + "type": "object", + "title": "RetryPolicyLimitDuration" } }, "description": "The retry limit, if any", @@ -1687,10 +1710,16 @@ "type": "object", "properties": { "from": { - "$ref": "#/$defs/duration" + "$ref": "#/$defs/duration", + "description": "The minimum duration of the jitter range", + "type": "object", + "title": "RetryPolicyJitterFrom" }, "to": { - "$ref": "#/$defs/duration" + "$ref": "#/$defs/duration", + "description": "The maximum duration of the jitter range", + "type": "object", + "title": "RetryPolicyJitterTo" } }, "required": [ @@ -1729,7 +1758,10 @@ { "properties": { "resource": { - "$ref": "#/$defs/externalResource" + "$ref": "#/$defs/externalResource", + "description": "The schema's external resource.", + "type": "object", + "title": "SchemaResource" } }, "required": [ @@ -1745,7 +1777,10 @@ "type": "object", "properties": { "after": { - "$ref": "#/$defs/duration" + "$ref": "#/$defs/duration", + "description": "The duration after which to timeout.", + "type": "object", + "title": "TimeoutAfter" } }, "required": [ diff --git a/src/lib/generated/validation/validation-pointers.ts b/src/lib/generated/validation/validation-pointers.ts index 977414eb..5c9e6f98 100644 --- a/src/lib/generated/validation/validation-pointers.ts +++ b/src/lib/generated/validation/validation-pointers.ts @@ -30,43 +30,42 @@ export const validationPointers = { 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/authenticationPolicy/oneOf/2/properties/oauth2/properties/client', CallAsyncAPI: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/0', CallAsyncAPIWith: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/0/allOf/1/properties/with', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/0/properties/with', CallAsyncAPIWithAuthentication: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/0/allOf/1/properties/with/properties/authentication', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/0/properties/with/properties/authentication', CallFunction: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/4', CallFunctionWith: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/4/allOf/1/properties/with', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/4/properties/with', CallGRPC: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1', CallGRPCWith: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1/allOf/1/properties/with', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1/properties/with', CallGRPCWithArguments: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1/allOf/1/properties/with/properties/arguments', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1/properties/with/properties/arguments', CallGRPCWithService: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1/allOf/1/properties/with/properties/service', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1/properties/with/properties/service', CallGRPCWithServiceAuthentication: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1/allOf/1/properties/with/properties/service/properties/authentication', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1/properties/with/properties/service/properties/authentication', CallHTTP: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/2', CallHTTPWith: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/2/allOf/1/properties/with', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/2/properties/with', CallHTTPWithEndpoint: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/2/allOf/1/properties/with/properties/endpoint', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/2/properties/with/properties/endpoint', CallOpenAPI: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/3', CallOpenAPIWith: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/3/allOf/1/properties/with', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/3/properties/with', CallOpenAPIWithAuthentication: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/3/allOf/1/properties/with/properties/authentication', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/3/properties/with/properties/authentication', CallOpenAPIWithParameters: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/3/allOf/1/properties/with/properties/parameters', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/3/properties/with/properties/parameters', CallTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask', Document: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/document', DocumentTags: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/document/properties/tags', DoTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/doTask', Duration: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/duration', EmitTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/emitTask', - EmitTaskEmit: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/emitTask/allOf/1/properties/emit', + EmitTaskEmit: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/emitTask/properties/emit', EmitTaskEmitEvent: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/emitTask/allOf/1/properties/emit/properties/event', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/emitTask/properties/emit/properties/event', Endpoint: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/endpoint', EndpointAuthentication: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/endpoint/properties/authentication', @@ -89,19 +88,17 @@ export const validationPointers = { 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/externalResource/oneOf/1/properties/authentication', FlowDirective: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/flowDirective', ForkTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/forkTask', - ForkTaskFork: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/forkTask/allOf/1/properties/fork', + ForkTaskFork: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/forkTask/properties/fork', ForTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/forTask', - ForTaskFor: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/forTask/allOf/1/properties/for', - Input: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/input', + ForTaskFor: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/forTask/properties/for', + Input: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/input', ListenTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/listenTask', ListenTaskListen: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/listenTask/allOf/1/properties/listen', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/listenTask/properties/listen', Oauth2Token: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/oauth2Token', - Output: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/output', + Output: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/output', RaiseTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/raiseTask', - RaiseTaskRaise: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/raiseTask/allOf/1/properties/raise', + RaiseTaskRaise: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/raiseTask/properties/raise', RetryPolicy: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/retryPolicy', RetryPolicyBackoff: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/retryPolicy/properties/backoff', @@ -112,37 +109,41 @@ export const validationPointers = { RetryPolicyLimitAttempt: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/retryPolicy/properties/limit/properties/attempt', RunTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask', - RunTaskRun: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/allOf/1/properties/run', + RunTaskRun: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/properties/run', RunTaskRunContainer: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/allOf/1/properties/run/oneOf/0/properties/container', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/properties/run/oneOf/0/properties/container', RunTaskRunScript: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/allOf/1/properties/run/oneOf/1/properties/script', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/properties/run/oneOf/1/properties/script', RunTaskRunShell: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/allOf/1/properties/run/oneOf/2/properties/shell', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/properties/run/oneOf/2/properties/shell', RunTaskRunShellArguments: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/allOf/1/properties/run/oneOf/2/properties/shell/properties/arguments', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/properties/run/oneOf/2/properties/shell/properties/arguments', RunTaskRunShellEnvironment: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/allOf/1/properties/run/oneOf/2/properties/shell/properties/environment', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/properties/run/oneOf/2/properties/shell/properties/environment', RunTaskRunWorkflow: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/allOf/1/properties/run/oneOf/3/properties/workflow', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/properties/run/oneOf/3/properties/workflow', RunTaskRunWorkflowInput: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/allOf/1/properties/run/oneOf/3/properties/workflow/properties/input', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/properties/run/oneOf/3/properties/workflow/properties/input', Schedule: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/schedule', Schema: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/schema', SetTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/setTask', - SetTaskSet: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/setTask/allOf/1/properties/set', + SetTaskSet: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/setTask/properties/set', SwitchTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/switchTask', SwitchTaskSwitch: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/switchTask/allOf/1/properties/switch', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/switchTask/properties/switch', Task: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/task', TaskBase: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/taskBase', TaskList: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/taskList', - Timeout: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/timeout', + Timeout: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/timeout', TryTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/tryTask', - TryTaskCatch: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/tryTask/allOf/1/properties/catch', + TryTaskCatch: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/tryTask/properties/catch', Use: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/use', + UseAuthentications: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/use/properties/authentications', + UseErrors: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/use/properties/errors', UseExtensions: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/use/properties/extensions', + UseFunctions: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/use/properties/functions', + UseRetries: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/use/properties/retries', WaitTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/waitTask', }; diff --git a/src/lib/reflector.ts b/src/lib/reflector.ts new file mode 100644 index 00000000..5337e8ee --- /dev/null +++ b/src/lib/reflector.ts @@ -0,0 +1,13 @@ +import { isObject } from './utils'; + +/** + * A class used to reflect the parameter type + * see https://stackoverflow.com/questions/54207173/classes-keyof-in-typescript/54207465#54207465 + */ +export class _Reflector { + constructor(model?: Partial) { + if (isObject(model)) { + Object.assign(this, model); + } + } +} diff --git a/src/lib/utils.ts b/src/lib/utils.ts new file mode 100644 index 00000000..55ea5d4f --- /dev/null +++ b/src/lib/utils.ts @@ -0,0 +1,9 @@ +/** + * Check if the provided value is an object but not an array + * @param value The value to check + * @returns True if the value is an object + */ +export const isObject = (value: unknown): boolean => { + if (!value) return false; + return typeof value === 'object' && !Array.isArray(value); +}; diff --git a/src/lib/validation.ts b/src/lib/validation.ts index b2fafeca..53c50a78 100644 --- a/src/lib/validation.ts +++ b/src/lib/validation.ts @@ -1,21 +1,27 @@ -import Ajv, { ValidateFunction } from 'ajv/dist/2020'; +import Ajv, { Options, ValidateFunction } from 'ajv/dist/2020'; import addFormats from 'ajv-formats'; import workflowSchema from './generated/schema/workflow.json'; -import internalWorkflowSchema from './generated/schema/__internal_workflow.json'; +//import internalWorkflowSchema from './generated/schema/__internal_workflow.json'; import { validationPointers } from './generated/validation'; +const options: Options = { + strict: false, + // removeAdditional: true, // if enabled, validateFn(JSON.parse(JSON.stringify(data))) should be replaced + // useDefaults: true, +}; +// uses the original schema, might be missing some "titles" const ajv = new Ajv({ schemas: [workflowSchema], - strict: false, + ...options, }); addFormats(ajv); -// uses an altered version of the JSON Schema, might introduce unwanted results -const __internal_ajv = new Ajv({ - schemas: [internalWorkflowSchema], - strict: false, -}); -addFormats(__internal_ajv); +// // uses an altered version of the JSON Schema, might introduce unwanted results +// const __internal_ajv = new Ajv({ +// schemas: [internalWorkflowSchema], +// ...options +// }); +// addFormats(__internal_ajv); /** * A Map of validation functions, where the key is the name of the schema to validate with @@ -23,8 +29,8 @@ addFormats(__internal_ajv); export const validators: Map = new Map( Object.entries(validationPointers).map(([typeName, jsonPointer]) => { if (!jsonPointer) throw `No JSON pointer provided for type '${typeName}'`; - let validate = ajv.getSchema(jsonPointer); - if (!validate) validate = __internal_ajv.getSchema(jsonPointer); + const validate = ajv.getSchema(jsonPointer); + // if (!validate) validate = __internal_ajv.getSchema(jsonPointer); if (!validate) throw `Unable to find schema '${jsonPointer}' for type '${typeName}'`; return [typeName, validate as ValidateFunction]; }), @@ -44,7 +50,7 @@ export const validate = (typeName: string, data: T): boolean => { if (!validateFn(JSON.parse(JSON.stringify(data)))) { throw new Error( `'${typeName}' is invalid: -${validateFn.errors?.reduce((acc, error) => acc + `- ${error.instancePath} | ${error.schemaPath} | ${error.message}\n`, '') ?? ''} +${validateFn.errors?.reduce((acc, error) => acc + `- ${error.instancePath} | ${error.schemaPath} | ${error.message} | ${JSON.stringify(error.params)}\n`, '') ?? ''} data: ${JSON.stringify(data, null, 4)}`, ); diff --git a/tests/builders/builder.spec.ts b/tests/builders/builder.spec.ts index 3f5f9bb7..571d8f65 100644 --- a/tests/builders/builder.spec.ts +++ b/tests/builders/builder.spec.ts @@ -27,15 +27,13 @@ type Person = { const darknessMyOldFriend = { name: 'Darkness', age: 999 }; const isPerson = (data: Partial): data is Person => !!data.name && !!data.age; -function personBuildingFn(data: Partial): () => Person { - return () => { - if (!isPerson(data)) { - throw new Error('The provided object is not a person'); - } - return { - ...data, - friends: [...(data.friends || []), darknessMyOldFriend], - }; +function personBuildingFn(data: Partial): Person { + if (!isPerson(data)) { + throw new Error('The provided object is not a person'); + } + return { + ...data, + friends: [...(data.friends || []), darknessMyOldFriend], }; } const personBuilder = (): Builder => builder(personBuildingFn); diff --git a/tests/builders/call-http-builder.spec.ts b/tests/builders/call-http-builder.spec.ts index e63e7da8..bd7d74fd 100644 --- a/tests/builders/call-http-builder.spec.ts +++ b/tests/builders/call-http-builder.spec.ts @@ -6,7 +6,7 @@ describe('CallHTTP builder', () => { const endpoint = 'https://serverlessworkflow.io'; const method = 'get'; const callHttp = callHTTPBuilder() - .call('http') + .call('http') // should be set by the CallHTTP class .with({ endpoint, method, @@ -28,4 +28,11 @@ describe('CallHTTP builder', () => { expect(test).toThrow(/'CallHTTP' is invalid/); expect(test).toThrow(/must have required property 'call'/); }); + + it('should not validate', () => { + const test = () => { + callHTTPBuilder().build(false); + }; + expect(test).not.toThrow(); + }); }); diff --git a/tests/classes/workflow.spec.ts b/tests/classes/workflow.spec.ts index 7a6b4003..cadaeb69 100644 --- a/tests/classes/workflow.spec.ts +++ b/tests/classes/workflow.spec.ts @@ -1,8 +1,18 @@ +import { type } from 'ts-inference-check'; import { Classes } from '../../src/lib/generated/classes'; +import { Specification } from '../../src/lib/generated/definitions'; -describe('workflow class', () => { +describe('Workflow class', () => { it('should be an instance of Workflow', () => { const workflow = new Classes.Workflow(); expect(workflow).toBeInstanceOf(Classes.Workflow); + expect(type(workflow.document).is(true)).toBe(true); + expect(type(workflow.input).is(true)).toBe(true); + expect(type(workflow.use).is(true)).toBe(true); + expect(type(workflow.do).is(true)).toBe(true); + expect(type(workflow.timeout).is(true)).toBe(true); + expect(type(workflow.output).is(true)).toBe(true); + expect(type(workflow.schedule).is(true)).toBe(true); + expect(type(workflow.foobar).is(true)).toBe(true); }); }); diff --git a/tests/validation/workflow-validation.spec.ts b/tests/validation/workflow-validation.spec.ts new file mode 100644 index 00000000..4908bb66 --- /dev/null +++ b/tests/validation/workflow-validation.spec.ts @@ -0,0 +1,11 @@ +import { Classes } from '../../src/lib/generated/classes'; +import { validate } from '../../src/lib/validation'; + +describe('Workflow validation', () => { + it('should be invalid', () => { + const workflow = new Classes.Workflow(); + const test = () => validate('Workflow', workflow); + expect(test).toThrow(Error); + expect(test).toThrow(/'Workflow' is invalid/); + }); +}); diff --git a/tools/2_generate-definitions.ts b/tools/2_generate-definitions.ts index 1410a4bd..8281417d 100644 --- a/tools/2_generate-definitions.ts +++ b/tools/2_generate-definitions.ts @@ -41,6 +41,7 @@ const structuralObjectProperties = [ 'propertyNames', 'unevaluatedProperties', ]; + const structuralArrayProperties = [ 'allOf', 'anyOf', @@ -56,15 +57,13 @@ const structuralArrayProperties = [ const metadataProperties = ['title', 'description', 'default', 'type']; /** - * Transforms the provided schema to increase its compatibility with json-schema-to-typescript - * - replaces `unevaluatedProperties` with `additionalProperties` + * Embellishes the provided schema to increase its compatibility with json-schema-to-typescript, the resulting schema should keep the validation properties as the input one (phase 1) + * - adds missing type:object properties * - adds missing titles to objects - * - transforms `additionalProperties.$ref` (with no other props) as $ref - * - transforms inheritance via `$ref` or `additionalProperties.$ref` to `allOf.$ref` - * - removes metadata where only $ref is used - * @param schema - * @param path - * @returns + * @param schema The schema to embellish + * @param path The current path of the schema relative to the original schema + * @param parentTitle The title of the parent object, if any + * @returns An embellished schema with titles and types */ function prepareSchema(schema: any, path: string[] = ['#'], parentTitle: string = ''): any { if (!isObject(schema) && !Array.isArray(schema)) { @@ -77,7 +76,7 @@ function prepareSchema(schema: any, path: string[] = ['#'], parentTitle: string const parent = path.slice(-1)[0]; const schemaKeys = Object.keys(newSchema); if (!structuralObjectProperties.includes(parent)) { - if (!newSchema.type) { + if (!newSchema.type && !newSchema.oneOf && !newSchema.anyOf && !newSchema.allOf) { // not necessary ? newSchema.type = 'object'; schemaKeys.push('type'); @@ -87,7 +86,7 @@ function prepareSchema(schema: any, path: string[] = ['#'], parentTitle: string } if ( !newSchema.title && - (newSchema.type === 'object' || newSchema.type === 'array') && // only naming object or array types + (!newSchema.type || newSchema.type === 'object' || newSchema.type === 'array') && // only naming object or array types isNaN(parseInt(parent, 10)) && // it comes from a oneOf/anyOf/allOf, it should be titled manually newSchema.items?.type !== 'string' && // if it's an array of string, it doesn't need to be named newSchema.items?.type !== 'number' && // if it's an array of number, it doesn't need to be named @@ -106,19 +105,38 @@ function prepareSchema(schema: any, path: string[] = ['#'], parentTitle: string schemaKeys.push('title'); parentTitle = newSchema.title; } + } + return Object.entries(newSchema).reduce((outputSchema, [key, value]: [string, any]) => { + outputSchema[key] = prepareSchema(value, [...path, key], parentTitle); + return outputSchema; + }, {} as any); +} + +/** + * Transforms the provided schema to increase its compatibility with json-schema-to-typescript, the resulting schema **will** behave differently that the input one (phase 2) + * - replaces `unevaluatedProperties` with `additionalProperties` + * - transforms inheritance via `$ref` or `additionalProperties.$ref` to `allOf.$ref` + * - removes metadata where only $ref is used + * @param schema The schema to transform + * @param path The current path of the schema relative to the original schema + * @returns A mutated schema + */ +function mutateSchema(schema: any, path: string[] = ['#']): any { + if (!isObject(schema) && !Array.isArray(schema)) { + return schema; + } + if (Array.isArray(schema)) { + return schema.map((item, i) => mutateSchema(item, [...path, i.toString()])); + } + const newSchema = JSON.parse(JSON.stringify(schema)); + const parent = path.slice(-1)[0]; + const schemaKeys = Object.keys(newSchema); + if (!structuralObjectProperties.includes(parent)) { if (newSchema.unevaluatedProperties != null) { newSchema.additionalProperties = newSchema.unevaluatedProperties; delete newSchema.unevaluatedProperties; schemaKeys[schemaKeys.indexOf('unevaluatedProperties')] = 'additionalProperties'; } - if ( - isObject(newSchema.additionalProperties) && - Object.keys(newSchema.additionalProperties).every((key) => key === '$ref') - ) { - newSchema['$ref'] = newSchema.additionalProperties['$ref']; - delete newSchema.additionalProperties; - schemaKeys[schemaKeys.indexOf('additionalProperties')] = '$ref'; - } if (newSchema['$ref']) { if (schemaKeys.filter((key) => !metadataProperties.includes(key)).length == 1) { // only $ref @@ -133,18 +151,9 @@ function prepareSchema(schema: any, path: string[] = ['#'], parentTitle: string newSchema.allOf = [$ref, properties]; } } - // if (newSchema.additionalProperties?.['$ref'] && newSchema.properties) { // shouldn't happen as it has been migrated to $ref in most cases - // const $ref = { $ref: newSchema.additionalProperties['$ref']}; - // const properties = { - // properties: newSchema.properties - // } as any; - // delete newSchema.additionalProperties; - // delete newSchema.properties; - // newSchema.allOf = [$ref, properties]; - // } } return Object.entries(newSchema).reduce((outputSchema, [key, value]: [string, any]) => { - outputSchema[key] = prepareSchema(value, [...path, key], parentTitle); + outputSchema[key] = mutateSchema(value, [...path, key]); return outputSchema; }, {} as any); } @@ -174,11 +183,13 @@ async function generate(srcFile: string, destFile: string): Promise { //unreachableDefinitions: true, }; const schemaText = await readFile(srcFile, { encoding: 'utf-8' }); - const schema = prepareSchema(JSON.parse(schemaText)); + let schema = prepareSchema(JSON.parse(schemaText)); + await writeFile(srcFile.replace('workflow', '__internal_workflow'), JSON.stringify(schema, null, 2)); + schema = mutateSchema(schema); + //await writeFile(srcFile.replace('workflow', '__mutated_workflow'), JSON.stringify(schema, null, 2)); const declarations = await compile(schema, 'Workflow', options); const destDir = path.dirname(destFile); await reset(destDir); - await writeFile(srcFile.replace('workflow', '__internal_workflow'), JSON.stringify(schema, null, 2)); await writeFile(destFile, declarations); await writeFile(path.resolve(destDir, 'index.ts'), `${fileHeader}export * as Specification from './specification';`); } diff --git a/tools/4_generate-classes.ts b/tools/4_generate-classes.ts index b4ae1dae..6a8359ae 100644 --- a/tools/4_generate-classes.ts +++ b/tools/4_generate-classes.ts @@ -28,6 +28,19 @@ import { const { writeFile, readFile } = fsPromises; +const getClassDeclaration = (className: string): string => `import { _Reflector } from "../../reflector"; +import { Specification } from "../definitions"; + +class _${className} extends _Reflector { + constructor(data?: Partial) { + super(data); + } +} + +export const ${className} = _${className} as ({ + new (data?: Partial): _${className} & Specification.${className} +});`; + /** * Generates empty classes. Used * @param definitionFile @@ -38,7 +51,7 @@ async function generate(definitionFile: string, destDir: string): Promise const declarations = getExportedDeclarations(definitions); await reset(destDir); for (const declaration of declarations) { - const classSrc = `export class ${declaration} {}`; + const classSrc = getClassDeclaration(declaration); const destFile = path.resolve(destDir, toKebabCase(normalizeKnownAllCaps(declaration)) + '.ts'); await writeFile(destFile, classSrc); } diff --git a/tools/5_generate-builders.ts b/tools/5_generate-builders.ts index 139b5f9c..9e97ef23 100644 --- a/tools/5_generate-builders.ts +++ b/tools/5_generate-builders.ts @@ -47,11 +47,11 @@ const buildersExtensions: { [key: string]: BuilderExtension } = { * @param {string} value A PascalCase string * @returns A camelCase string */ -const toCamelCase = (value: string): string => { +function toCamelCase(value: string): string { if (!value) return ''; const transformable = value.trim(); return transformable[0].toLowerCase() + transformable.slice(1); -}; +} /** * Creates a builder for the provided type @@ -59,13 +59,12 @@ const toCamelCase = (value: string): string => { * @param {string} declaration The type to create the builder for * @returns {void} */ -const createBuilder = async (destDir: string, declaration: string): Promise => { - try { - const camelType = toCamelCase(declaration); - const extension = buildersExtensions[declaration]; - const builderCode = - fileHeader + - `import { builder, Builder } from "../../builder"; +async function createBuilder(destDir: string, declaration: string): Promise { + const camelType = toCamelCase(declaration); + const extension = buildersExtensions[declaration]; + const builderCode = + fileHeader + + `import { builder, Builder } from "../../builder"; import { validate } from "../../validation"; import { Classes } from "../classes"; import { Specification } from "../definitions"; @@ -75,14 +74,12 @@ ${extension?.import ? extension.import + '\n' : ''} * @param {Specification.${declaration}} data The underlying object * @returns {Specification.${declaration}} The validated underlying object */ -function buildingFn(data: Specification.${declaration}): (() => Specification.${declaration}) { - return () => { - const model = new Classes.${declaration}(); - Object.assign(model, data); - ${extension?.preValidate ? extension.preValidate : ''} - validate('${declaration}', model); - return model as Specification.${declaration}; - }; +function buildingFn(data: Specification.${declaration}): Specification.${declaration} { + const model = new Classes.${declaration}(); + Object.assign(model, data); + ${extension?.preValidate || ''} + validate('${declaration}', model); + return model as Specification.${declaration}; } /** @@ -90,15 +87,11 @@ function buildingFn(data: Specification.${declaration}): (() => Specification.${ * @returns {Specification.${declaration}} A builder for \`Specification.${declaration}\` */ export function ${camelType}Builder(): Builder { - return builder(buildingFn); +return builder(buildingFn); }`; - const destFile = path.resolve(destDir, toKebabCase(normalizeKnownAllCaps(declaration)) + '-builder.ts'); - await writeFile(destFile, builderCode); - return Promise.resolve(); - } catch (ex) { - return Promise.reject(ex); - } -}; + const destFile = path.resolve(destDir, toKebabCase(normalizeKnownAllCaps(declaration)) + '-builder.ts'); + await writeFile(destFile, builderCode); +} /** * Creates the builders index file @@ -106,7 +99,7 @@ export function ${camelType}Builder(): Builder { * @param declarations The list of types to create the index for * @returns */ -const createIndex = async (destDir: string, declarations: string[]): Promise => { +async function createIndex(destDir: string, declarations: string[]): Promise { try { const indexCode: string = fileHeader + @@ -121,7 +114,7 @@ const createIndex = async (destDir: string, declarations: string[]): Promise => { +async function generate(definitionFile: string, destDir: string): Promise { try { await reset(destDir); const definitions = await readFile(definitionFile, { encoding: 'utf-8' }); @@ -140,7 +133,7 @@ const generate = async (definitionFile: string, destDir: string): Promise } catch (ex) { return Promise.reject(ex); } -}; +} const definitionFile = path.resolve(definitionsDir, 'specification.ts'); generate(definitionFile, buildersDir).then(console.log.bind(console)).catch(console.error.bind(console)); From 0e5d4691930b6a1d3ead2bfd348f516b8e587657 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Sat, 27 Jul 2024 12:49:06 +0200 Subject: [PATCH 06/24] added README in tools/ Signed-off-by: Jean-Baptiste Bianchi --- package-lock.json | 8 +- package.json | 2 +- .../authentication-policy-basic-builder.ts | 8 +- .../authentication-policy-bearer-builder.ts | 8 +- .../builders/authentication-policy-builder.ts | 8 +- .../authentication-policy-oauth2-builder.ts | 8 +- ...entication-policy-oauth2-client-builder.ts | 8 +- .../builders/call-async-api-builder.ts | 8 +- ...l-async-api-with-authentication-builder.ts | 8 +- .../builders/call-async-api-with-builder.ts | 8 +- .../builders/call-function-builder.ts | 8 +- .../builders/call-function-with-builder.ts | 8 +- .../generated/builders/call-grpc-builder.ts | 7 +- .../call-grpc-with-arguments-builder.ts | 8 +- .../builders/call-grpc-with-builder.ts | 8 +- ...rpc-with-service-authentication-builder.ts | 8 +- .../call-grpc-with-service-builder.ts | 8 +- .../generated/builders/call-http-builder.ts | 7 +- .../builders/call-http-with-builder.ts | 8 +- .../call-http-with-endpoint-builder.ts | 8 +- .../builders/call-open-api-builder.ts | 8 +- ...ll-open-api-with-authentication-builder.ts | 8 +- .../builders/call-open-api-with-builder.ts | 8 +- .../call-open-api-with-parameters-builder.ts | 8 +- .../generated/builders/call-task-builder.ts | 7 +- src/lib/generated/builders/do-task-builder.ts | 7 +- .../generated/builders/document-builder.ts | 7 +- .../builders/document-tags-builder.ts | 8 +- .../generated/builders/duration-builder.ts | 7 +- .../generated/builders/emit-task-builder.ts | 7 +- .../builders/emit-task-emit-builder.ts | 8 +- .../builders/emit-task-emit-event-builder.ts | 8 +- .../endpoint-authentication-builder.ts | 8 +- .../generated/builders/endpoint-builder.ts | 7 +- src/lib/generated/builders/error-builder.ts | 7 +- .../event-consumption-strategy-all-builder.ts | 8 +- .../event-consumption-strategy-any-builder.ts | 8 +- .../event-consumption-strategy-builder.ts | 8 +- .../builders/event-filter-builder.ts | 8 +- .../event-filter-correlate-builder.ts | 8 +- .../builders/event-filter-with-builder.ts | 8 +- src/lib/generated/builders/export-builder.ts | 7 +- .../generated/builders/extension-builder.ts | 7 +- ...xternal-resource-authentication-builder.ts | 8 +- .../builders/external-resource-builder.ts | 8 +- .../builders/flow-directive-builder.ts | 8 +- .../generated/builders/for-task-builder.ts | 7 +- .../builders/for-task-for-builder.ts | 7 +- .../generated/builders/fork-task-builder.ts | 7 +- .../builders/fork-task-fork-builder.ts | 8 +- src/lib/generated/builders/input-builder.ts | 7 +- .../generated/builders/listen-task-builder.ts | 7 +- .../builders/listen-task-listen-builder.ts | 8 +- .../builders/oauth2-token-builder.ts | 8 +- src/lib/generated/builders/output-builder.ts | 7 +- .../generated/builders/raise-task-builder.ts | 7 +- .../builders/raise-task-raise-builder.ts | 8 +- .../builders/retry-policy-backoff-builder.ts | 8 +- .../builders/retry-policy-builder.ts | 8 +- .../builders/retry-policy-jitter-builder.ts | 8 +- .../retry-policy-limit-attempt-builder.ts | 8 +- .../builders/retry-policy-limit-builder.ts | 8 +- .../generated/builders/run-task-builder.ts | 7 +- .../builders/run-task-run-builder.ts | 7 +- .../run-task-run-container-builder.ts | 8 +- .../builders/run-task-run-script-builder.ts | 8 +- .../run-task-run-shell-arguments-builder.ts | 8 +- .../builders/run-task-run-shell-builder.ts | 8 +- .../run-task-run-shell-environment-builder.ts | 8 +- .../builders/run-task-run-workflow-builder.ts | 8 +- .../run-task-run-workflow-input-builder.ts | 8 +- .../generated/builders/schedule-builder.ts | 7 +- src/lib/generated/builders/schema-builder.ts | 7 +- .../generated/builders/set-task-builder.ts | 7 +- .../builders/set-task-set-builder.ts | 7 +- .../generated/builders/switch-task-builder.ts | 7 +- .../builders/switch-task-switch-builder.ts | 8 +- .../generated/builders/task-base-builder.ts | 7 +- src/lib/generated/builders/task-builder.ts | 7 +- .../generated/builders/task-list-builder.ts | 7 +- src/lib/generated/builders/timeout-builder.ts | 7 +- .../generated/builders/try-task-builder.ts | 7 +- .../builders/try-task-catch-builder.ts | 8 +- .../builders/use-authentications-builder.ts | 8 +- src/lib/generated/builders/use-builder.ts | 7 +- .../generated/builders/use-errors-builder.ts | 7 +- .../builders/use-extensions-builder.ts | 8 +- .../builders/use-functions-builder.ts | 8 +- .../generated/builders/use-retries-builder.ts | 7 +- .../generated/builders/wait-task-builder.ts | 7 +- .../generated/builders/workflow-builder.ts | 7 +- tools/2_generate-definitions.ts | 2 +- tools/5_generate-builders.ts | 7 +- tools/README.md | 103 ++++++++++++++++++ 94 files changed, 343 insertions(+), 456 deletions(-) create mode 100644 tools/README.md diff --git a/package-lock.json b/package-lock.json index 433eebc9..78ff0dd7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "eslint-plugin-prettier": "^5.1.3", "husky": "^9.0.11", "jest": "^29.7.0", - "json-schema-to-typescript": "^14.1.0", + "json-schema-to-typescript": "^15.0.0", "lint-staged": "^15.2.7", "node-fetch": "^3.3.2", "prettier": "^3.3.3", @@ -4865,9 +4865,9 @@ "dev": true }, "node_modules/json-schema-to-typescript": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-14.1.0.tgz", - "integrity": "sha512-VIeAFQkn88gFh26MSHWG4uX7TjK/arTw0NVLMZn6vX1WrSF+P6xu5MyEdovu+9PJ0uiS5gm0wzwQvYW9eSq1uw==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-15.0.0.tgz", + "integrity": "sha512-gOX3cJB4eL1ztMc3WUh569ubRcKnr8MnYk++6+/WaaN4bufGHSR6EcbUbvLZgirPQOfvni5SSGkRx0pYloYU8A==", "dev": true, "dependencies": { "@apidevtools/json-schema-ref-parser": "^11.5.5", diff --git a/package.json b/package.json index 56a48a83..bdc0531c 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "eslint-plugin-prettier": "^5.1.3", "husky": "^9.0.11", "jest": "^29.7.0", - "json-schema-to-typescript": "^14.1.0", + "json-schema-to-typescript": "^15.0.0", "lint-staged": "^15.2.7", "node-fetch": "^3.3.2", "prettier": "^3.3.3", diff --git a/src/lib/generated/builders/authentication-policy-basic-builder.ts b/src/lib/generated/builders/authentication-policy-basic-builder.ts index ee79b66e..e624d02b 100644 --- a/src/lib/generated/builders/authentication-policy-basic-builder.ts +++ b/src/lib/generated/builders/authentication-policy-basic-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.AuthenticationPolicyBasic} The validated underlying object */ function buildingFn(data: Specification.AuthenticationPolicyBasic): Specification.AuthenticationPolicyBasic { - const model = new Classes.AuthenticationPolicyBasic(); - Object.assign(model, data); + const model = new Classes.AuthenticationPolicyBasic(data); validate('AuthenticationPolicyBasic', model); return model as Specification.AuthenticationPolicyBasic; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.AuthenticationPolicyBasic): Specificatio * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyBasic` * @returns {Specification.AuthenticationPolicyBasic} A builder for `Specification.AuthenticationPolicyBasic` */ -export function authenticationPolicyBasicBuilder(): Builder { - return builder(buildingFn); -} +export const authenticationPolicyBasicBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/authentication-policy-bearer-builder.ts b/src/lib/generated/builders/authentication-policy-bearer-builder.ts index 9f34a819..14587f3c 100644 --- a/src/lib/generated/builders/authentication-policy-bearer-builder.ts +++ b/src/lib/generated/builders/authentication-policy-bearer-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.AuthenticationPolicyBearer} The validated underlying object */ function buildingFn(data: Specification.AuthenticationPolicyBearer): Specification.AuthenticationPolicyBearer { - const model = new Classes.AuthenticationPolicyBearer(); - Object.assign(model, data); + const model = new Classes.AuthenticationPolicyBearer(data); validate('AuthenticationPolicyBearer', model); return model as Specification.AuthenticationPolicyBearer; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.AuthenticationPolicyBearer): Specificati * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyBearer` * @returns {Specification.AuthenticationPolicyBearer} A builder for `Specification.AuthenticationPolicyBearer` */ -export function authenticationPolicyBearerBuilder(): Builder { - return builder(buildingFn); -} +export const authenticationPolicyBearerBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/authentication-policy-builder.ts b/src/lib/generated/builders/authentication-policy-builder.ts index 53346682..060def72 100644 --- a/src/lib/generated/builders/authentication-policy-builder.ts +++ b/src/lib/generated/builders/authentication-policy-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.AuthenticationPolicy} The validated underlying object */ function buildingFn(data: Specification.AuthenticationPolicy): Specification.AuthenticationPolicy { - const model = new Classes.AuthenticationPolicy(); - Object.assign(model, data); + const model = new Classes.AuthenticationPolicy(data); validate('AuthenticationPolicy', model); return model as Specification.AuthenticationPolicy; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.AuthenticationPolicy): Specification.Aut * A factory to create a builder proxy for the type `Specification.AuthenticationPolicy` * @returns {Specification.AuthenticationPolicy} A builder for `Specification.AuthenticationPolicy` */ -export function authenticationPolicyBuilder(): Builder { - return builder(buildingFn); -} +export const authenticationPolicyBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/authentication-policy-oauth2-builder.ts b/src/lib/generated/builders/authentication-policy-oauth2-builder.ts index 521c851f..77f8cce7 100644 --- a/src/lib/generated/builders/authentication-policy-oauth2-builder.ts +++ b/src/lib/generated/builders/authentication-policy-oauth2-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.AuthenticationPolicyOauth2} The validated underlying object */ function buildingFn(data: Specification.AuthenticationPolicyOauth2): Specification.AuthenticationPolicyOauth2 { - const model = new Classes.AuthenticationPolicyOauth2(); - Object.assign(model, data); + const model = new Classes.AuthenticationPolicyOauth2(data); validate('AuthenticationPolicyOauth2', model); return model as Specification.AuthenticationPolicyOauth2; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.AuthenticationPolicyOauth2): Specificati * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyOauth2` * @returns {Specification.AuthenticationPolicyOauth2} A builder for `Specification.AuthenticationPolicyOauth2` */ -export function authenticationPolicyOauth2Builder(): Builder { - return builder(buildingFn); -} +export const authenticationPolicyOauth2Builder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts b/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts index 33f54f17..68093472 100644 --- a/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts +++ b/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts @@ -27,8 +27,7 @@ import { Specification } from '../definitions'; function buildingFn( data: Specification.AuthenticationPolicyOauth2Client, ): Specification.AuthenticationPolicyOauth2Client { - const model = new Classes.AuthenticationPolicyOauth2Client(); - Object.assign(model, data); + const model = new Classes.AuthenticationPolicyOauth2Client(data); validate('AuthenticationPolicyOauth2Client', model); return model as Specification.AuthenticationPolicyOauth2Client; @@ -38,6 +37,5 @@ function buildingFn( * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyOauth2Client` * @returns {Specification.AuthenticationPolicyOauth2Client} A builder for `Specification.AuthenticationPolicyOauth2Client` */ -export function authenticationPolicyOauth2ClientBuilder(): Builder { - return builder(buildingFn); -} +export const authenticationPolicyOauth2ClientBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/call-async-api-builder.ts b/src/lib/generated/builders/call-async-api-builder.ts index 894e84eb..3d81a1a7 100644 --- a/src/lib/generated/builders/call-async-api-builder.ts +++ b/src/lib/generated/builders/call-async-api-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.CallAsyncAPI} The validated underlying object */ function buildingFn(data: Specification.CallAsyncAPI): Specification.CallAsyncAPI { - const model = new Classes.CallAsyncAPI(); - Object.assign(model, data); + const model = new Classes.CallAsyncAPI(data); validate('CallAsyncAPI', model); return model as Specification.CallAsyncAPI; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.CallAsyncAPI): Specification.CallAsyncAP * A factory to create a builder proxy for the type `Specification.CallAsyncAPI` * @returns {Specification.CallAsyncAPI} A builder for `Specification.CallAsyncAPI` */ -export function callAsyncAPIBuilder(): Builder { - return builder(buildingFn); -} +export const callAsyncAPIBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/call-async-api-with-authentication-builder.ts b/src/lib/generated/builders/call-async-api-with-authentication-builder.ts index c1aec40f..00db24ac 100644 --- a/src/lib/generated/builders/call-async-api-with-authentication-builder.ts +++ b/src/lib/generated/builders/call-async-api-with-authentication-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.CallAsyncAPIWithAuthentication} The validated underlying object */ function buildingFn(data: Specification.CallAsyncAPIWithAuthentication): Specification.CallAsyncAPIWithAuthentication { - const model = new Classes.CallAsyncAPIWithAuthentication(); - Object.assign(model, data); + const model = new Classes.CallAsyncAPIWithAuthentication(data); validate('CallAsyncAPIWithAuthentication', model); return model as Specification.CallAsyncAPIWithAuthentication; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.CallAsyncAPIWithAuthentication): Specifi * A factory to create a builder proxy for the type `Specification.CallAsyncAPIWithAuthentication` * @returns {Specification.CallAsyncAPIWithAuthentication} A builder for `Specification.CallAsyncAPIWithAuthentication` */ -export function callAsyncAPIWithAuthenticationBuilder(): Builder { - return builder(buildingFn); -} +export const callAsyncAPIWithAuthenticationBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/call-async-api-with-builder.ts b/src/lib/generated/builders/call-async-api-with-builder.ts index c9146f86..c6fbb305 100644 --- a/src/lib/generated/builders/call-async-api-with-builder.ts +++ b/src/lib/generated/builders/call-async-api-with-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.CallAsyncAPIWith} The validated underlying object */ function buildingFn(data: Specification.CallAsyncAPIWith): Specification.CallAsyncAPIWith { - const model = new Classes.CallAsyncAPIWith(); - Object.assign(model, data); + const model = new Classes.CallAsyncAPIWith(data); validate('CallAsyncAPIWith', model); return model as Specification.CallAsyncAPIWith; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.CallAsyncAPIWith): Specification.CallAsy * A factory to create a builder proxy for the type `Specification.CallAsyncAPIWith` * @returns {Specification.CallAsyncAPIWith} A builder for `Specification.CallAsyncAPIWith` */ -export function callAsyncAPIWithBuilder(): Builder { - return builder(buildingFn); -} +export const callAsyncAPIWithBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/call-function-builder.ts b/src/lib/generated/builders/call-function-builder.ts index dafa72b6..92a092ab 100644 --- a/src/lib/generated/builders/call-function-builder.ts +++ b/src/lib/generated/builders/call-function-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.CallFunction} The validated underlying object */ function buildingFn(data: Specification.CallFunction): Specification.CallFunction { - const model = new Classes.CallFunction(); - Object.assign(model, data); + const model = new Classes.CallFunction(data); validate('CallFunction', model); return model as Specification.CallFunction; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.CallFunction): Specification.CallFunctio * A factory to create a builder proxy for the type `Specification.CallFunction` * @returns {Specification.CallFunction} A builder for `Specification.CallFunction` */ -export function callFunctionBuilder(): Builder { - return builder(buildingFn); -} +export const callFunctionBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/call-function-with-builder.ts b/src/lib/generated/builders/call-function-with-builder.ts index 5a3c33a8..4321a867 100644 --- a/src/lib/generated/builders/call-function-with-builder.ts +++ b/src/lib/generated/builders/call-function-with-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.CallFunctionWith} The validated underlying object */ function buildingFn(data: Specification.CallFunctionWith): Specification.CallFunctionWith { - const model = new Classes.CallFunctionWith(); - Object.assign(model, data); + const model = new Classes.CallFunctionWith(data); validate('CallFunctionWith', model); return model as Specification.CallFunctionWith; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.CallFunctionWith): Specification.CallFun * A factory to create a builder proxy for the type `Specification.CallFunctionWith` * @returns {Specification.CallFunctionWith} A builder for `Specification.CallFunctionWith` */ -export function callFunctionWithBuilder(): Builder { - return builder(buildingFn); -} +export const callFunctionWithBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/call-grpc-builder.ts b/src/lib/generated/builders/call-grpc-builder.ts index 762797e8..6cbc31e9 100644 --- a/src/lib/generated/builders/call-grpc-builder.ts +++ b/src/lib/generated/builders/call-grpc-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.CallGRPC} The validated underlying object */ function buildingFn(data: Specification.CallGRPC): Specification.CallGRPC { - const model = new Classes.CallGRPC(); - Object.assign(model, data); + const model = new Classes.CallGRPC(data); validate('CallGRPC', model); return model as Specification.CallGRPC; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.CallGRPC): Specification.CallGRPC { * A factory to create a builder proxy for the type `Specification.CallGRPC` * @returns {Specification.CallGRPC} A builder for `Specification.CallGRPC` */ -export function callGRPCBuilder(): Builder { - return builder(buildingFn); -} +export const callGRPCBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/call-grpc-with-arguments-builder.ts b/src/lib/generated/builders/call-grpc-with-arguments-builder.ts index 6c235608..dabc72df 100644 --- a/src/lib/generated/builders/call-grpc-with-arguments-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-arguments-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.CallGRPCWithArguments} The validated underlying object */ function buildingFn(data: Specification.CallGRPCWithArguments): Specification.CallGRPCWithArguments { - const model = new Classes.CallGRPCWithArguments(); - Object.assign(model, data); + const model = new Classes.CallGRPCWithArguments(data); validate('CallGRPCWithArguments', model); return model as Specification.CallGRPCWithArguments; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.CallGRPCWithArguments): Specification.Ca * A factory to create a builder proxy for the type `Specification.CallGRPCWithArguments` * @returns {Specification.CallGRPCWithArguments} A builder for `Specification.CallGRPCWithArguments` */ -export function callGRPCWithArgumentsBuilder(): Builder { - return builder(buildingFn); -} +export const callGRPCWithArgumentsBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/call-grpc-with-builder.ts b/src/lib/generated/builders/call-grpc-with-builder.ts index 92f33004..dc71705c 100644 --- a/src/lib/generated/builders/call-grpc-with-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.CallGRPCWith} The validated underlying object */ function buildingFn(data: Specification.CallGRPCWith): Specification.CallGRPCWith { - const model = new Classes.CallGRPCWith(); - Object.assign(model, data); + const model = new Classes.CallGRPCWith(data); validate('CallGRPCWith', model); return model as Specification.CallGRPCWith; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.CallGRPCWith): Specification.CallGRPCWit * A factory to create a builder proxy for the type `Specification.CallGRPCWith` * @returns {Specification.CallGRPCWith} A builder for `Specification.CallGRPCWith` */ -export function callGRPCWithBuilder(): Builder { - return builder(buildingFn); -} +export const callGRPCWithBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts b/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts index fa13533f..b85c544a 100644 --- a/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts @@ -27,8 +27,7 @@ import { Specification } from '../definitions'; function buildingFn( data: Specification.CallGRPCWithServiceAuthentication, ): Specification.CallGRPCWithServiceAuthentication { - const model = new Classes.CallGRPCWithServiceAuthentication(); - Object.assign(model, data); + const model = new Classes.CallGRPCWithServiceAuthentication(data); validate('CallGRPCWithServiceAuthentication', model); return model as Specification.CallGRPCWithServiceAuthentication; @@ -38,6 +37,5 @@ function buildingFn( * A factory to create a builder proxy for the type `Specification.CallGRPCWithServiceAuthentication` * @returns {Specification.CallGRPCWithServiceAuthentication} A builder for `Specification.CallGRPCWithServiceAuthentication` */ -export function callGRPCWithServiceAuthenticationBuilder(): Builder { - return builder(buildingFn); -} +export const callGRPCWithServiceAuthenticationBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/call-grpc-with-service-builder.ts b/src/lib/generated/builders/call-grpc-with-service-builder.ts index 1ab8ded8..ed9f20c2 100644 --- a/src/lib/generated/builders/call-grpc-with-service-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-service-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.CallGRPCWithService} The validated underlying object */ function buildingFn(data: Specification.CallGRPCWithService): Specification.CallGRPCWithService { - const model = new Classes.CallGRPCWithService(); - Object.assign(model, data); + const model = new Classes.CallGRPCWithService(data); validate('CallGRPCWithService', model); return model as Specification.CallGRPCWithService; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.CallGRPCWithService): Specification.Call * A factory to create a builder proxy for the type `Specification.CallGRPCWithService` * @returns {Specification.CallGRPCWithService} A builder for `Specification.CallGRPCWithService` */ -export function callGRPCWithServiceBuilder(): Builder { - return builder(buildingFn); -} +export const callGRPCWithServiceBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/call-http-builder.ts b/src/lib/generated/builders/call-http-builder.ts index fb3d7dfa..1a078b70 100644 --- a/src/lib/generated/builders/call-http-builder.ts +++ b/src/lib/generated/builders/call-http-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.CallHTTP} The validated underlying object */ function buildingFn(data: Specification.CallHTTP): Specification.CallHTTP { - const model = new Classes.CallHTTP(); - Object.assign(model, data); + const model = new Classes.CallHTTP(data); validate('CallHTTP', model); return model as Specification.CallHTTP; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.CallHTTP): Specification.CallHTTP { * A factory to create a builder proxy for the type `Specification.CallHTTP` * @returns {Specification.CallHTTP} A builder for `Specification.CallHTTP` */ -export function callHTTPBuilder(): Builder { - return builder(buildingFn); -} +export const callHTTPBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/call-http-with-builder.ts b/src/lib/generated/builders/call-http-with-builder.ts index 1942ae6f..3c62cc2b 100644 --- a/src/lib/generated/builders/call-http-with-builder.ts +++ b/src/lib/generated/builders/call-http-with-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.CallHTTPWith} The validated underlying object */ function buildingFn(data: Specification.CallHTTPWith): Specification.CallHTTPWith { - const model = new Classes.CallHTTPWith(); - Object.assign(model, data); + const model = new Classes.CallHTTPWith(data); validate('CallHTTPWith', model); return model as Specification.CallHTTPWith; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.CallHTTPWith): Specification.CallHTTPWit * A factory to create a builder proxy for the type `Specification.CallHTTPWith` * @returns {Specification.CallHTTPWith} A builder for `Specification.CallHTTPWith` */ -export function callHTTPWithBuilder(): Builder { - return builder(buildingFn); -} +export const callHTTPWithBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/call-http-with-endpoint-builder.ts b/src/lib/generated/builders/call-http-with-endpoint-builder.ts index 373016dc..c80a5b83 100644 --- a/src/lib/generated/builders/call-http-with-endpoint-builder.ts +++ b/src/lib/generated/builders/call-http-with-endpoint-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.CallHTTPWithEndpoint} The validated underlying object */ function buildingFn(data: Specification.CallHTTPWithEndpoint): Specification.CallHTTPWithEndpoint { - const model = new Classes.CallHTTPWithEndpoint(); - Object.assign(model, data); + const model = new Classes.CallHTTPWithEndpoint(data); validate('CallHTTPWithEndpoint', model); return model as Specification.CallHTTPWithEndpoint; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.CallHTTPWithEndpoint): Specification.Cal * A factory to create a builder proxy for the type `Specification.CallHTTPWithEndpoint` * @returns {Specification.CallHTTPWithEndpoint} A builder for `Specification.CallHTTPWithEndpoint` */ -export function callHTTPWithEndpointBuilder(): Builder { - return builder(buildingFn); -} +export const callHTTPWithEndpointBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/call-open-api-builder.ts b/src/lib/generated/builders/call-open-api-builder.ts index 20eabe37..e25ac67c 100644 --- a/src/lib/generated/builders/call-open-api-builder.ts +++ b/src/lib/generated/builders/call-open-api-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.CallOpenAPI} The validated underlying object */ function buildingFn(data: Specification.CallOpenAPI): Specification.CallOpenAPI { - const model = new Classes.CallOpenAPI(); - Object.assign(model, data); + const model = new Classes.CallOpenAPI(data); validate('CallOpenAPI', model); return model as Specification.CallOpenAPI; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.CallOpenAPI): Specification.CallOpenAPI * A factory to create a builder proxy for the type `Specification.CallOpenAPI` * @returns {Specification.CallOpenAPI} A builder for `Specification.CallOpenAPI` */ -export function callOpenAPIBuilder(): Builder { - return builder(buildingFn); -} +export const callOpenAPIBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/call-open-api-with-authentication-builder.ts b/src/lib/generated/builders/call-open-api-with-authentication-builder.ts index a88d8cc2..ab2eac1b 100644 --- a/src/lib/generated/builders/call-open-api-with-authentication-builder.ts +++ b/src/lib/generated/builders/call-open-api-with-authentication-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.CallOpenAPIWithAuthentication} The validated underlying object */ function buildingFn(data: Specification.CallOpenAPIWithAuthentication): Specification.CallOpenAPIWithAuthentication { - const model = new Classes.CallOpenAPIWithAuthentication(); - Object.assign(model, data); + const model = new Classes.CallOpenAPIWithAuthentication(data); validate('CallOpenAPIWithAuthentication', model); return model as Specification.CallOpenAPIWithAuthentication; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.CallOpenAPIWithAuthentication): Specific * A factory to create a builder proxy for the type `Specification.CallOpenAPIWithAuthentication` * @returns {Specification.CallOpenAPIWithAuthentication} A builder for `Specification.CallOpenAPIWithAuthentication` */ -export function callOpenAPIWithAuthenticationBuilder(): Builder { - return builder(buildingFn); -} +export const callOpenAPIWithAuthenticationBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/call-open-api-with-builder.ts b/src/lib/generated/builders/call-open-api-with-builder.ts index 7e5bf80f..3e6ded0b 100644 --- a/src/lib/generated/builders/call-open-api-with-builder.ts +++ b/src/lib/generated/builders/call-open-api-with-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.CallOpenAPIWith} The validated underlying object */ function buildingFn(data: Specification.CallOpenAPIWith): Specification.CallOpenAPIWith { - const model = new Classes.CallOpenAPIWith(); - Object.assign(model, data); + const model = new Classes.CallOpenAPIWith(data); validate('CallOpenAPIWith', model); return model as Specification.CallOpenAPIWith; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.CallOpenAPIWith): Specification.CallOpen * A factory to create a builder proxy for the type `Specification.CallOpenAPIWith` * @returns {Specification.CallOpenAPIWith} A builder for `Specification.CallOpenAPIWith` */ -export function callOpenAPIWithBuilder(): Builder { - return builder(buildingFn); -} +export const callOpenAPIWithBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/call-open-api-with-parameters-builder.ts b/src/lib/generated/builders/call-open-api-with-parameters-builder.ts index a711b496..4e4ca3f7 100644 --- a/src/lib/generated/builders/call-open-api-with-parameters-builder.ts +++ b/src/lib/generated/builders/call-open-api-with-parameters-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.CallOpenAPIWithParameters} The validated underlying object */ function buildingFn(data: Specification.CallOpenAPIWithParameters): Specification.CallOpenAPIWithParameters { - const model = new Classes.CallOpenAPIWithParameters(); - Object.assign(model, data); + const model = new Classes.CallOpenAPIWithParameters(data); validate('CallOpenAPIWithParameters', model); return model as Specification.CallOpenAPIWithParameters; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.CallOpenAPIWithParameters): Specificatio * A factory to create a builder proxy for the type `Specification.CallOpenAPIWithParameters` * @returns {Specification.CallOpenAPIWithParameters} A builder for `Specification.CallOpenAPIWithParameters` */ -export function callOpenAPIWithParametersBuilder(): Builder { - return builder(buildingFn); -} +export const callOpenAPIWithParametersBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/call-task-builder.ts b/src/lib/generated/builders/call-task-builder.ts index 3be1cca3..e100ecbb 100644 --- a/src/lib/generated/builders/call-task-builder.ts +++ b/src/lib/generated/builders/call-task-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.CallTask} The validated underlying object */ function buildingFn(data: Specification.CallTask): Specification.CallTask { - const model = new Classes.CallTask(); - Object.assign(model, data); + const model = new Classes.CallTask(data); validate('CallTask', model); return model as Specification.CallTask; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.CallTask): Specification.CallTask { * A factory to create a builder proxy for the type `Specification.CallTask` * @returns {Specification.CallTask} A builder for `Specification.CallTask` */ -export function callTaskBuilder(): Builder { - return builder(buildingFn); -} +export const callTaskBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/do-task-builder.ts b/src/lib/generated/builders/do-task-builder.ts index ad405999..803459bc 100644 --- a/src/lib/generated/builders/do-task-builder.ts +++ b/src/lib/generated/builders/do-task-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.DoTask} The validated underlying object */ function buildingFn(data: Specification.DoTask): Specification.DoTask { - const model = new Classes.DoTask(); - Object.assign(model, data); + const model = new Classes.DoTask(data); validate('DoTask', model); return model as Specification.DoTask; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.DoTask): Specification.DoTask { * A factory to create a builder proxy for the type `Specification.DoTask` * @returns {Specification.DoTask} A builder for `Specification.DoTask` */ -export function doTaskBuilder(): Builder { - return builder(buildingFn); -} +export const doTaskBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/document-builder.ts b/src/lib/generated/builders/document-builder.ts index ca0c0c64..b3ffdf92 100644 --- a/src/lib/generated/builders/document-builder.ts +++ b/src/lib/generated/builders/document-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.Document} The validated underlying object */ function buildingFn(data: Specification.Document): Specification.Document { - const model = new Classes.Document(); - Object.assign(model, data); + const model = new Classes.Document(data); validate('Document', model); return model as Specification.Document; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.Document): Specification.Document { * A factory to create a builder proxy for the type `Specification.Document` * @returns {Specification.Document} A builder for `Specification.Document` */ -export function documentBuilder(): Builder { - return builder(buildingFn); -} +export const documentBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/document-tags-builder.ts b/src/lib/generated/builders/document-tags-builder.ts index c3e13f1e..048d52ca 100644 --- a/src/lib/generated/builders/document-tags-builder.ts +++ b/src/lib/generated/builders/document-tags-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.DocumentTags} The validated underlying object */ function buildingFn(data: Specification.DocumentTags): Specification.DocumentTags { - const model = new Classes.DocumentTags(); - Object.assign(model, data); + const model = new Classes.DocumentTags(data); validate('DocumentTags', model); return model as Specification.DocumentTags; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.DocumentTags): Specification.DocumentTag * A factory to create a builder proxy for the type `Specification.DocumentTags` * @returns {Specification.DocumentTags} A builder for `Specification.DocumentTags` */ -export function documentTagsBuilder(): Builder { - return builder(buildingFn); -} +export const documentTagsBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/duration-builder.ts b/src/lib/generated/builders/duration-builder.ts index 9723b863..df944274 100644 --- a/src/lib/generated/builders/duration-builder.ts +++ b/src/lib/generated/builders/duration-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.Duration} The validated underlying object */ function buildingFn(data: Specification.Duration): Specification.Duration { - const model = new Classes.Duration(); - Object.assign(model, data); + const model = new Classes.Duration(data); validate('Duration', model); return model as Specification.Duration; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.Duration): Specification.Duration { * A factory to create a builder proxy for the type `Specification.Duration` * @returns {Specification.Duration} A builder for `Specification.Duration` */ -export function durationBuilder(): Builder { - return builder(buildingFn); -} +export const durationBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/emit-task-builder.ts b/src/lib/generated/builders/emit-task-builder.ts index 3099cb1c..b313c560 100644 --- a/src/lib/generated/builders/emit-task-builder.ts +++ b/src/lib/generated/builders/emit-task-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.EmitTask} The validated underlying object */ function buildingFn(data: Specification.EmitTask): Specification.EmitTask { - const model = new Classes.EmitTask(); - Object.assign(model, data); + const model = new Classes.EmitTask(data); validate('EmitTask', model); return model as Specification.EmitTask; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.EmitTask): Specification.EmitTask { * A factory to create a builder proxy for the type `Specification.EmitTask` * @returns {Specification.EmitTask} A builder for `Specification.EmitTask` */ -export function emitTaskBuilder(): Builder { - return builder(buildingFn); -} +export const emitTaskBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/emit-task-emit-builder.ts b/src/lib/generated/builders/emit-task-emit-builder.ts index 53123537..e2a584e2 100644 --- a/src/lib/generated/builders/emit-task-emit-builder.ts +++ b/src/lib/generated/builders/emit-task-emit-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.EmitTaskEmit} The validated underlying object */ function buildingFn(data: Specification.EmitTaskEmit): Specification.EmitTaskEmit { - const model = new Classes.EmitTaskEmit(); - Object.assign(model, data); + const model = new Classes.EmitTaskEmit(data); validate('EmitTaskEmit', model); return model as Specification.EmitTaskEmit; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.EmitTaskEmit): Specification.EmitTaskEmi * A factory to create a builder proxy for the type `Specification.EmitTaskEmit` * @returns {Specification.EmitTaskEmit} A builder for `Specification.EmitTaskEmit` */ -export function emitTaskEmitBuilder(): Builder { - return builder(buildingFn); -} +export const emitTaskEmitBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/emit-task-emit-event-builder.ts b/src/lib/generated/builders/emit-task-emit-event-builder.ts index b4604b73..6b8046f0 100644 --- a/src/lib/generated/builders/emit-task-emit-event-builder.ts +++ b/src/lib/generated/builders/emit-task-emit-event-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.EmitTaskEmitEvent} The validated underlying object */ function buildingFn(data: Specification.EmitTaskEmitEvent): Specification.EmitTaskEmitEvent { - const model = new Classes.EmitTaskEmitEvent(); - Object.assign(model, data); + const model = new Classes.EmitTaskEmitEvent(data); validate('EmitTaskEmitEvent', model); return model as Specification.EmitTaskEmitEvent; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.EmitTaskEmitEvent): Specification.EmitTa * A factory to create a builder proxy for the type `Specification.EmitTaskEmitEvent` * @returns {Specification.EmitTaskEmitEvent} A builder for `Specification.EmitTaskEmitEvent` */ -export function emitTaskEmitEventBuilder(): Builder { - return builder(buildingFn); -} +export const emitTaskEmitEventBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/endpoint-authentication-builder.ts b/src/lib/generated/builders/endpoint-authentication-builder.ts index b4da1c4f..30e8d021 100644 --- a/src/lib/generated/builders/endpoint-authentication-builder.ts +++ b/src/lib/generated/builders/endpoint-authentication-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.EndpointAuthentication} The validated underlying object */ function buildingFn(data: Specification.EndpointAuthentication): Specification.EndpointAuthentication { - const model = new Classes.EndpointAuthentication(); - Object.assign(model, data); + const model = new Classes.EndpointAuthentication(data); validate('EndpointAuthentication', model); return model as Specification.EndpointAuthentication; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.EndpointAuthentication): Specification.E * A factory to create a builder proxy for the type `Specification.EndpointAuthentication` * @returns {Specification.EndpointAuthentication} A builder for `Specification.EndpointAuthentication` */ -export function endpointAuthenticationBuilder(): Builder { - return builder(buildingFn); -} +export const endpointAuthenticationBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/endpoint-builder.ts b/src/lib/generated/builders/endpoint-builder.ts index 5d0b437e..5106e3a1 100644 --- a/src/lib/generated/builders/endpoint-builder.ts +++ b/src/lib/generated/builders/endpoint-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.Endpoint} The validated underlying object */ function buildingFn(data: Specification.Endpoint): Specification.Endpoint { - const model = new Classes.Endpoint(); - Object.assign(model, data); + const model = new Classes.Endpoint(data); validate('Endpoint', model); return model as Specification.Endpoint; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.Endpoint): Specification.Endpoint { * A factory to create a builder proxy for the type `Specification.Endpoint` * @returns {Specification.Endpoint} A builder for `Specification.Endpoint` */ -export function endpointBuilder(): Builder { - return builder(buildingFn); -} +export const endpointBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/error-builder.ts b/src/lib/generated/builders/error-builder.ts index e2561ca8..9032b0a3 100644 --- a/src/lib/generated/builders/error-builder.ts +++ b/src/lib/generated/builders/error-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.Error} The validated underlying object */ function buildingFn(data: Specification.Error): Specification.Error { - const model = new Classes.Error(); - Object.assign(model, data); + const model = new Classes.Error(data); validate('Error', model); return model as Specification.Error; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.Error): Specification.Error { * A factory to create a builder proxy for the type `Specification.Error` * @returns {Specification.Error} A builder for `Specification.Error` */ -export function errorBuilder(): Builder { - return builder(buildingFn); -} +export const errorBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/event-consumption-strategy-all-builder.ts b/src/lib/generated/builders/event-consumption-strategy-all-builder.ts index abadb94e..90006ada 100644 --- a/src/lib/generated/builders/event-consumption-strategy-all-builder.ts +++ b/src/lib/generated/builders/event-consumption-strategy-all-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.EventConsumptionStrategyAll} The validated underlying object */ function buildingFn(data: Specification.EventConsumptionStrategyAll): Specification.EventConsumptionStrategyAll { - const model = new Classes.EventConsumptionStrategyAll(); - Object.assign(model, data); + const model = new Classes.EventConsumptionStrategyAll(data); validate('EventConsumptionStrategyAll', model); return model as Specification.EventConsumptionStrategyAll; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.EventConsumptionStrategyAll): Specificat * A factory to create a builder proxy for the type `Specification.EventConsumptionStrategyAll` * @returns {Specification.EventConsumptionStrategyAll} A builder for `Specification.EventConsumptionStrategyAll` */ -export function eventConsumptionStrategyAllBuilder(): Builder { - return builder(buildingFn); -} +export const eventConsumptionStrategyAllBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/event-consumption-strategy-any-builder.ts b/src/lib/generated/builders/event-consumption-strategy-any-builder.ts index 4f23a961..77122961 100644 --- a/src/lib/generated/builders/event-consumption-strategy-any-builder.ts +++ b/src/lib/generated/builders/event-consumption-strategy-any-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.EventConsumptionStrategyAny} The validated underlying object */ function buildingFn(data: Specification.EventConsumptionStrategyAny): Specification.EventConsumptionStrategyAny { - const model = new Classes.EventConsumptionStrategyAny(); - Object.assign(model, data); + const model = new Classes.EventConsumptionStrategyAny(data); validate('EventConsumptionStrategyAny', model); return model as Specification.EventConsumptionStrategyAny; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.EventConsumptionStrategyAny): Specificat * A factory to create a builder proxy for the type `Specification.EventConsumptionStrategyAny` * @returns {Specification.EventConsumptionStrategyAny} A builder for `Specification.EventConsumptionStrategyAny` */ -export function eventConsumptionStrategyAnyBuilder(): Builder { - return builder(buildingFn); -} +export const eventConsumptionStrategyAnyBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/event-consumption-strategy-builder.ts b/src/lib/generated/builders/event-consumption-strategy-builder.ts index a696fb87..af5d0715 100644 --- a/src/lib/generated/builders/event-consumption-strategy-builder.ts +++ b/src/lib/generated/builders/event-consumption-strategy-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.EventConsumptionStrategy} The validated underlying object */ function buildingFn(data: Specification.EventConsumptionStrategy): Specification.EventConsumptionStrategy { - const model = new Classes.EventConsumptionStrategy(); - Object.assign(model, data); + const model = new Classes.EventConsumptionStrategy(data); validate('EventConsumptionStrategy', model); return model as Specification.EventConsumptionStrategy; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.EventConsumptionStrategy): Specification * A factory to create a builder proxy for the type `Specification.EventConsumptionStrategy` * @returns {Specification.EventConsumptionStrategy} A builder for `Specification.EventConsumptionStrategy` */ -export function eventConsumptionStrategyBuilder(): Builder { - return builder(buildingFn); -} +export const eventConsumptionStrategyBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/event-filter-builder.ts b/src/lib/generated/builders/event-filter-builder.ts index 83fc09b4..5d100845 100644 --- a/src/lib/generated/builders/event-filter-builder.ts +++ b/src/lib/generated/builders/event-filter-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.EventFilter} The validated underlying object */ function buildingFn(data: Specification.EventFilter): Specification.EventFilter { - const model = new Classes.EventFilter(); - Object.assign(model, data); + const model = new Classes.EventFilter(data); validate('EventFilter', model); return model as Specification.EventFilter; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.EventFilter): Specification.EventFilter * A factory to create a builder proxy for the type `Specification.EventFilter` * @returns {Specification.EventFilter} A builder for `Specification.EventFilter` */ -export function eventFilterBuilder(): Builder { - return builder(buildingFn); -} +export const eventFilterBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/event-filter-correlate-builder.ts b/src/lib/generated/builders/event-filter-correlate-builder.ts index 43bcc3e8..8f83cbfb 100644 --- a/src/lib/generated/builders/event-filter-correlate-builder.ts +++ b/src/lib/generated/builders/event-filter-correlate-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.EventFilterCorrelate} The validated underlying object */ function buildingFn(data: Specification.EventFilterCorrelate): Specification.EventFilterCorrelate { - const model = new Classes.EventFilterCorrelate(); - Object.assign(model, data); + const model = new Classes.EventFilterCorrelate(data); validate('EventFilterCorrelate', model); return model as Specification.EventFilterCorrelate; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.EventFilterCorrelate): Specification.Eve * A factory to create a builder proxy for the type `Specification.EventFilterCorrelate` * @returns {Specification.EventFilterCorrelate} A builder for `Specification.EventFilterCorrelate` */ -export function eventFilterCorrelateBuilder(): Builder { - return builder(buildingFn); -} +export const eventFilterCorrelateBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/event-filter-with-builder.ts b/src/lib/generated/builders/event-filter-with-builder.ts index 267ae035..b46abea6 100644 --- a/src/lib/generated/builders/event-filter-with-builder.ts +++ b/src/lib/generated/builders/event-filter-with-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.EventFilterWith} The validated underlying object */ function buildingFn(data: Specification.EventFilterWith): Specification.EventFilterWith { - const model = new Classes.EventFilterWith(); - Object.assign(model, data); + const model = new Classes.EventFilterWith(data); validate('EventFilterWith', model); return model as Specification.EventFilterWith; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.EventFilterWith): Specification.EventFil * A factory to create a builder proxy for the type `Specification.EventFilterWith` * @returns {Specification.EventFilterWith} A builder for `Specification.EventFilterWith` */ -export function eventFilterWithBuilder(): Builder { - return builder(buildingFn); -} +export const eventFilterWithBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/export-builder.ts b/src/lib/generated/builders/export-builder.ts index 3c2a4a66..9b11decb 100644 --- a/src/lib/generated/builders/export-builder.ts +++ b/src/lib/generated/builders/export-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.Export} The validated underlying object */ function buildingFn(data: Specification.Export): Specification.Export { - const model = new Classes.Export(); - Object.assign(model, data); + const model = new Classes.Export(data); validate('Export', model); return model as Specification.Export; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.Export): Specification.Export { * A factory to create a builder proxy for the type `Specification.Export` * @returns {Specification.Export} A builder for `Specification.Export` */ -export function exportBuilder(): Builder { - return builder(buildingFn); -} +export const exportBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/extension-builder.ts b/src/lib/generated/builders/extension-builder.ts index 56d01860..94b59d99 100644 --- a/src/lib/generated/builders/extension-builder.ts +++ b/src/lib/generated/builders/extension-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.Extension} The validated underlying object */ function buildingFn(data: Specification.Extension): Specification.Extension { - const model = new Classes.Extension(); - Object.assign(model, data); + const model = new Classes.Extension(data); validate('Extension', model); return model as Specification.Extension; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.Extension): Specification.Extension { * A factory to create a builder proxy for the type `Specification.Extension` * @returns {Specification.Extension} A builder for `Specification.Extension` */ -export function extensionBuilder(): Builder { - return builder(buildingFn); -} +export const extensionBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/external-resource-authentication-builder.ts b/src/lib/generated/builders/external-resource-authentication-builder.ts index cb2c199a..79d7830e 100644 --- a/src/lib/generated/builders/external-resource-authentication-builder.ts +++ b/src/lib/generated/builders/external-resource-authentication-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.ExternalResourceAuthentication} The validated underlying object */ function buildingFn(data: Specification.ExternalResourceAuthentication): Specification.ExternalResourceAuthentication { - const model = new Classes.ExternalResourceAuthentication(); - Object.assign(model, data); + const model = new Classes.ExternalResourceAuthentication(data); validate('ExternalResourceAuthentication', model); return model as Specification.ExternalResourceAuthentication; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.ExternalResourceAuthentication): Specifi * A factory to create a builder proxy for the type `Specification.ExternalResourceAuthentication` * @returns {Specification.ExternalResourceAuthentication} A builder for `Specification.ExternalResourceAuthentication` */ -export function externalResourceAuthenticationBuilder(): Builder { - return builder(buildingFn); -} +export const externalResourceAuthenticationBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/external-resource-builder.ts b/src/lib/generated/builders/external-resource-builder.ts index 0f6dc9ee..cfc08d30 100644 --- a/src/lib/generated/builders/external-resource-builder.ts +++ b/src/lib/generated/builders/external-resource-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.ExternalResource} The validated underlying object */ function buildingFn(data: Specification.ExternalResource): Specification.ExternalResource { - const model = new Classes.ExternalResource(); - Object.assign(model, data); + const model = new Classes.ExternalResource(data); validate('ExternalResource', model); return model as Specification.ExternalResource; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.ExternalResource): Specification.Externa * A factory to create a builder proxy for the type `Specification.ExternalResource` * @returns {Specification.ExternalResource} A builder for `Specification.ExternalResource` */ -export function externalResourceBuilder(): Builder { - return builder(buildingFn); -} +export const externalResourceBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/flow-directive-builder.ts b/src/lib/generated/builders/flow-directive-builder.ts index 25118cff..bb2eeca2 100644 --- a/src/lib/generated/builders/flow-directive-builder.ts +++ b/src/lib/generated/builders/flow-directive-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.FlowDirective} The validated underlying object */ function buildingFn(data: Specification.FlowDirective): Specification.FlowDirective { - const model = new Classes.FlowDirective(); - Object.assign(model, data); + const model = new Classes.FlowDirective(data); validate('FlowDirective', model); return model as Specification.FlowDirective; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.FlowDirective): Specification.FlowDirect * A factory to create a builder proxy for the type `Specification.FlowDirective` * @returns {Specification.FlowDirective} A builder for `Specification.FlowDirective` */ -export function flowDirectiveBuilder(): Builder { - return builder(buildingFn); -} +export const flowDirectiveBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/for-task-builder.ts b/src/lib/generated/builders/for-task-builder.ts index 5da132d2..9071cefc 100644 --- a/src/lib/generated/builders/for-task-builder.ts +++ b/src/lib/generated/builders/for-task-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.ForTask} The validated underlying object */ function buildingFn(data: Specification.ForTask): Specification.ForTask { - const model = new Classes.ForTask(); - Object.assign(model, data); + const model = new Classes.ForTask(data); validate('ForTask', model); return model as Specification.ForTask; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.ForTask): Specification.ForTask { * A factory to create a builder proxy for the type `Specification.ForTask` * @returns {Specification.ForTask} A builder for `Specification.ForTask` */ -export function forTaskBuilder(): Builder { - return builder(buildingFn); -} +export const forTaskBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/for-task-for-builder.ts b/src/lib/generated/builders/for-task-for-builder.ts index 4d115bfe..d337537c 100644 --- a/src/lib/generated/builders/for-task-for-builder.ts +++ b/src/lib/generated/builders/for-task-for-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.ForTaskFor} The validated underlying object */ function buildingFn(data: Specification.ForTaskFor): Specification.ForTaskFor { - const model = new Classes.ForTaskFor(); - Object.assign(model, data); + const model = new Classes.ForTaskFor(data); validate('ForTaskFor', model); return model as Specification.ForTaskFor; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.ForTaskFor): Specification.ForTaskFor { * A factory to create a builder proxy for the type `Specification.ForTaskFor` * @returns {Specification.ForTaskFor} A builder for `Specification.ForTaskFor` */ -export function forTaskForBuilder(): Builder { - return builder(buildingFn); -} +export const forTaskForBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/fork-task-builder.ts b/src/lib/generated/builders/fork-task-builder.ts index 08984d81..310394cd 100644 --- a/src/lib/generated/builders/fork-task-builder.ts +++ b/src/lib/generated/builders/fork-task-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.ForkTask} The validated underlying object */ function buildingFn(data: Specification.ForkTask): Specification.ForkTask { - const model = new Classes.ForkTask(); - Object.assign(model, data); + const model = new Classes.ForkTask(data); validate('ForkTask', model); return model as Specification.ForkTask; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.ForkTask): Specification.ForkTask { * A factory to create a builder proxy for the type `Specification.ForkTask` * @returns {Specification.ForkTask} A builder for `Specification.ForkTask` */ -export function forkTaskBuilder(): Builder { - return builder(buildingFn); -} +export const forkTaskBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/fork-task-fork-builder.ts b/src/lib/generated/builders/fork-task-fork-builder.ts index cf478249..8cdc0481 100644 --- a/src/lib/generated/builders/fork-task-fork-builder.ts +++ b/src/lib/generated/builders/fork-task-fork-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.ForkTaskFork} The validated underlying object */ function buildingFn(data: Specification.ForkTaskFork): Specification.ForkTaskFork { - const model = new Classes.ForkTaskFork(); - Object.assign(model, data); + const model = new Classes.ForkTaskFork(data); validate('ForkTaskFork', model); return model as Specification.ForkTaskFork; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.ForkTaskFork): Specification.ForkTaskFor * A factory to create a builder proxy for the type `Specification.ForkTaskFork` * @returns {Specification.ForkTaskFork} A builder for `Specification.ForkTaskFork` */ -export function forkTaskForkBuilder(): Builder { - return builder(buildingFn); -} +export const forkTaskForkBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/input-builder.ts b/src/lib/generated/builders/input-builder.ts index 477fe960..f36d3da6 100644 --- a/src/lib/generated/builders/input-builder.ts +++ b/src/lib/generated/builders/input-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.Input} The validated underlying object */ function buildingFn(data: Specification.Input): Specification.Input { - const model = new Classes.Input(); - Object.assign(model, data); + const model = new Classes.Input(data); validate('Input', model); return model as Specification.Input; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.Input): Specification.Input { * A factory to create a builder proxy for the type `Specification.Input` * @returns {Specification.Input} A builder for `Specification.Input` */ -export function inputBuilder(): Builder { - return builder(buildingFn); -} +export const inputBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/listen-task-builder.ts b/src/lib/generated/builders/listen-task-builder.ts index 901eeb9a..356de93d 100644 --- a/src/lib/generated/builders/listen-task-builder.ts +++ b/src/lib/generated/builders/listen-task-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.ListenTask} The validated underlying object */ function buildingFn(data: Specification.ListenTask): Specification.ListenTask { - const model = new Classes.ListenTask(); - Object.assign(model, data); + const model = new Classes.ListenTask(data); validate('ListenTask', model); return model as Specification.ListenTask; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.ListenTask): Specification.ListenTask { * A factory to create a builder proxy for the type `Specification.ListenTask` * @returns {Specification.ListenTask} A builder for `Specification.ListenTask` */ -export function listenTaskBuilder(): Builder { - return builder(buildingFn); -} +export const listenTaskBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/listen-task-listen-builder.ts b/src/lib/generated/builders/listen-task-listen-builder.ts index 0aa45f32..20fd1e2e 100644 --- a/src/lib/generated/builders/listen-task-listen-builder.ts +++ b/src/lib/generated/builders/listen-task-listen-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.ListenTaskListen} The validated underlying object */ function buildingFn(data: Specification.ListenTaskListen): Specification.ListenTaskListen { - const model = new Classes.ListenTaskListen(); - Object.assign(model, data); + const model = new Classes.ListenTaskListen(data); validate('ListenTaskListen', model); return model as Specification.ListenTaskListen; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.ListenTaskListen): Specification.ListenT * A factory to create a builder proxy for the type `Specification.ListenTaskListen` * @returns {Specification.ListenTaskListen} A builder for `Specification.ListenTaskListen` */ -export function listenTaskListenBuilder(): Builder { - return builder(buildingFn); -} +export const listenTaskListenBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/oauth2-token-builder.ts b/src/lib/generated/builders/oauth2-token-builder.ts index d5c2a8da..8ea67175 100644 --- a/src/lib/generated/builders/oauth2-token-builder.ts +++ b/src/lib/generated/builders/oauth2-token-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.Oauth2Token} The validated underlying object */ function buildingFn(data: Specification.Oauth2Token): Specification.Oauth2Token { - const model = new Classes.Oauth2Token(); - Object.assign(model, data); + const model = new Classes.Oauth2Token(data); validate('Oauth2Token', model); return model as Specification.Oauth2Token; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.Oauth2Token): Specification.Oauth2Token * A factory to create a builder proxy for the type `Specification.Oauth2Token` * @returns {Specification.Oauth2Token} A builder for `Specification.Oauth2Token` */ -export function oauth2TokenBuilder(): Builder { - return builder(buildingFn); -} +export const oauth2TokenBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/output-builder.ts b/src/lib/generated/builders/output-builder.ts index aa5f8295..d1b6261f 100644 --- a/src/lib/generated/builders/output-builder.ts +++ b/src/lib/generated/builders/output-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.Output} The validated underlying object */ function buildingFn(data: Specification.Output): Specification.Output { - const model = new Classes.Output(); - Object.assign(model, data); + const model = new Classes.Output(data); validate('Output', model); return model as Specification.Output; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.Output): Specification.Output { * A factory to create a builder proxy for the type `Specification.Output` * @returns {Specification.Output} A builder for `Specification.Output` */ -export function outputBuilder(): Builder { - return builder(buildingFn); -} +export const outputBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/raise-task-builder.ts b/src/lib/generated/builders/raise-task-builder.ts index 001175ca..f277662c 100644 --- a/src/lib/generated/builders/raise-task-builder.ts +++ b/src/lib/generated/builders/raise-task-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.RaiseTask} The validated underlying object */ function buildingFn(data: Specification.RaiseTask): Specification.RaiseTask { - const model = new Classes.RaiseTask(); - Object.assign(model, data); + const model = new Classes.RaiseTask(data); validate('RaiseTask', model); return model as Specification.RaiseTask; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.RaiseTask): Specification.RaiseTask { * A factory to create a builder proxy for the type `Specification.RaiseTask` * @returns {Specification.RaiseTask} A builder for `Specification.RaiseTask` */ -export function raiseTaskBuilder(): Builder { - return builder(buildingFn); -} +export const raiseTaskBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/raise-task-raise-builder.ts b/src/lib/generated/builders/raise-task-raise-builder.ts index 0ce9c00c..68c18660 100644 --- a/src/lib/generated/builders/raise-task-raise-builder.ts +++ b/src/lib/generated/builders/raise-task-raise-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.RaiseTaskRaise} The validated underlying object */ function buildingFn(data: Specification.RaiseTaskRaise): Specification.RaiseTaskRaise { - const model = new Classes.RaiseTaskRaise(); - Object.assign(model, data); + const model = new Classes.RaiseTaskRaise(data); validate('RaiseTaskRaise', model); return model as Specification.RaiseTaskRaise; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.RaiseTaskRaise): Specification.RaiseTask * A factory to create a builder proxy for the type `Specification.RaiseTaskRaise` * @returns {Specification.RaiseTaskRaise} A builder for `Specification.RaiseTaskRaise` */ -export function raiseTaskRaiseBuilder(): Builder { - return builder(buildingFn); -} +export const raiseTaskRaiseBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/retry-policy-backoff-builder.ts b/src/lib/generated/builders/retry-policy-backoff-builder.ts index efa22d6e..2f928f16 100644 --- a/src/lib/generated/builders/retry-policy-backoff-builder.ts +++ b/src/lib/generated/builders/retry-policy-backoff-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.RetryPolicyBackoff} The validated underlying object */ function buildingFn(data: Specification.RetryPolicyBackoff): Specification.RetryPolicyBackoff { - const model = new Classes.RetryPolicyBackoff(); - Object.assign(model, data); + const model = new Classes.RetryPolicyBackoff(data); validate('RetryPolicyBackoff', model); return model as Specification.RetryPolicyBackoff; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.RetryPolicyBackoff): Specification.Retry * A factory to create a builder proxy for the type `Specification.RetryPolicyBackoff` * @returns {Specification.RetryPolicyBackoff} A builder for `Specification.RetryPolicyBackoff` */ -export function retryPolicyBackoffBuilder(): Builder { - return builder(buildingFn); -} +export const retryPolicyBackoffBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/retry-policy-builder.ts b/src/lib/generated/builders/retry-policy-builder.ts index 58050fd8..3b532c9d 100644 --- a/src/lib/generated/builders/retry-policy-builder.ts +++ b/src/lib/generated/builders/retry-policy-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.RetryPolicy} The validated underlying object */ function buildingFn(data: Specification.RetryPolicy): Specification.RetryPolicy { - const model = new Classes.RetryPolicy(); - Object.assign(model, data); + const model = new Classes.RetryPolicy(data); validate('RetryPolicy', model); return model as Specification.RetryPolicy; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.RetryPolicy): Specification.RetryPolicy * A factory to create a builder proxy for the type `Specification.RetryPolicy` * @returns {Specification.RetryPolicy} A builder for `Specification.RetryPolicy` */ -export function retryPolicyBuilder(): Builder { - return builder(buildingFn); -} +export const retryPolicyBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/retry-policy-jitter-builder.ts b/src/lib/generated/builders/retry-policy-jitter-builder.ts index 6fc8cd9f..181104b6 100644 --- a/src/lib/generated/builders/retry-policy-jitter-builder.ts +++ b/src/lib/generated/builders/retry-policy-jitter-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.RetryPolicyJitter} The validated underlying object */ function buildingFn(data: Specification.RetryPolicyJitter): Specification.RetryPolicyJitter { - const model = new Classes.RetryPolicyJitter(); - Object.assign(model, data); + const model = new Classes.RetryPolicyJitter(data); validate('RetryPolicyJitter', model); return model as Specification.RetryPolicyJitter; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.RetryPolicyJitter): Specification.RetryP * A factory to create a builder proxy for the type `Specification.RetryPolicyJitter` * @returns {Specification.RetryPolicyJitter} A builder for `Specification.RetryPolicyJitter` */ -export function retryPolicyJitterBuilder(): Builder { - return builder(buildingFn); -} +export const retryPolicyJitterBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts b/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts index f6a81384..84767209 100644 --- a/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts +++ b/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.RetryPolicyLimitAttempt} The validated underlying object */ function buildingFn(data: Specification.RetryPolicyLimitAttempt): Specification.RetryPolicyLimitAttempt { - const model = new Classes.RetryPolicyLimitAttempt(); - Object.assign(model, data); + const model = new Classes.RetryPolicyLimitAttempt(data); validate('RetryPolicyLimitAttempt', model); return model as Specification.RetryPolicyLimitAttempt; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.RetryPolicyLimitAttempt): Specification. * A factory to create a builder proxy for the type `Specification.RetryPolicyLimitAttempt` * @returns {Specification.RetryPolicyLimitAttempt} A builder for `Specification.RetryPolicyLimitAttempt` */ -export function retryPolicyLimitAttemptBuilder(): Builder { - return builder(buildingFn); -} +export const retryPolicyLimitAttemptBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/retry-policy-limit-builder.ts b/src/lib/generated/builders/retry-policy-limit-builder.ts index 253c5e1f..84207670 100644 --- a/src/lib/generated/builders/retry-policy-limit-builder.ts +++ b/src/lib/generated/builders/retry-policy-limit-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.RetryPolicyLimit} The validated underlying object */ function buildingFn(data: Specification.RetryPolicyLimit): Specification.RetryPolicyLimit { - const model = new Classes.RetryPolicyLimit(); - Object.assign(model, data); + const model = new Classes.RetryPolicyLimit(data); validate('RetryPolicyLimit', model); return model as Specification.RetryPolicyLimit; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.RetryPolicyLimit): Specification.RetryPo * A factory to create a builder proxy for the type `Specification.RetryPolicyLimit` * @returns {Specification.RetryPolicyLimit} A builder for `Specification.RetryPolicyLimit` */ -export function retryPolicyLimitBuilder(): Builder { - return builder(buildingFn); -} +export const retryPolicyLimitBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/run-task-builder.ts b/src/lib/generated/builders/run-task-builder.ts index 5924a00f..b4b5ae81 100644 --- a/src/lib/generated/builders/run-task-builder.ts +++ b/src/lib/generated/builders/run-task-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.RunTask} The validated underlying object */ function buildingFn(data: Specification.RunTask): Specification.RunTask { - const model = new Classes.RunTask(); - Object.assign(model, data); + const model = new Classes.RunTask(data); validate('RunTask', model); return model as Specification.RunTask; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.RunTask): Specification.RunTask { * A factory to create a builder proxy for the type `Specification.RunTask` * @returns {Specification.RunTask} A builder for `Specification.RunTask` */ -export function runTaskBuilder(): Builder { - return builder(buildingFn); -} +export const runTaskBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/run-task-run-builder.ts b/src/lib/generated/builders/run-task-run-builder.ts index a91bb1f3..effecc75 100644 --- a/src/lib/generated/builders/run-task-run-builder.ts +++ b/src/lib/generated/builders/run-task-run-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.RunTaskRun} The validated underlying object */ function buildingFn(data: Specification.RunTaskRun): Specification.RunTaskRun { - const model = new Classes.RunTaskRun(); - Object.assign(model, data); + const model = new Classes.RunTaskRun(data); validate('RunTaskRun', model); return model as Specification.RunTaskRun; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.RunTaskRun): Specification.RunTaskRun { * A factory to create a builder proxy for the type `Specification.RunTaskRun` * @returns {Specification.RunTaskRun} A builder for `Specification.RunTaskRun` */ -export function runTaskRunBuilder(): Builder { - return builder(buildingFn); -} +export const runTaskRunBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/run-task-run-container-builder.ts b/src/lib/generated/builders/run-task-run-container-builder.ts index 88ef7139..2129e53c 100644 --- a/src/lib/generated/builders/run-task-run-container-builder.ts +++ b/src/lib/generated/builders/run-task-run-container-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.RunTaskRunContainer} The validated underlying object */ function buildingFn(data: Specification.RunTaskRunContainer): Specification.RunTaskRunContainer { - const model = new Classes.RunTaskRunContainer(); - Object.assign(model, data); + const model = new Classes.RunTaskRunContainer(data); validate('RunTaskRunContainer', model); return model as Specification.RunTaskRunContainer; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.RunTaskRunContainer): Specification.RunT * A factory to create a builder proxy for the type `Specification.RunTaskRunContainer` * @returns {Specification.RunTaskRunContainer} A builder for `Specification.RunTaskRunContainer` */ -export function runTaskRunContainerBuilder(): Builder { - return builder(buildingFn); -} +export const runTaskRunContainerBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/run-task-run-script-builder.ts b/src/lib/generated/builders/run-task-run-script-builder.ts index 456b8731..e729fd79 100644 --- a/src/lib/generated/builders/run-task-run-script-builder.ts +++ b/src/lib/generated/builders/run-task-run-script-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.RunTaskRunScript} The validated underlying object */ function buildingFn(data: Specification.RunTaskRunScript): Specification.RunTaskRunScript { - const model = new Classes.RunTaskRunScript(); - Object.assign(model, data); + const model = new Classes.RunTaskRunScript(data); validate('RunTaskRunScript', model); return model as Specification.RunTaskRunScript; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.RunTaskRunScript): Specification.RunTask * A factory to create a builder proxy for the type `Specification.RunTaskRunScript` * @returns {Specification.RunTaskRunScript} A builder for `Specification.RunTaskRunScript` */ -export function runTaskRunScriptBuilder(): Builder { - return builder(buildingFn); -} +export const runTaskRunScriptBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts b/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts index 9d9aa373..897c8ab1 100644 --- a/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts +++ b/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.RunTaskRunShellArguments} The validated underlying object */ function buildingFn(data: Specification.RunTaskRunShellArguments): Specification.RunTaskRunShellArguments { - const model = new Classes.RunTaskRunShellArguments(); - Object.assign(model, data); + const model = new Classes.RunTaskRunShellArguments(data); validate('RunTaskRunShellArguments', model); return model as Specification.RunTaskRunShellArguments; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.RunTaskRunShellArguments): Specification * A factory to create a builder proxy for the type `Specification.RunTaskRunShellArguments` * @returns {Specification.RunTaskRunShellArguments} A builder for `Specification.RunTaskRunShellArguments` */ -export function runTaskRunShellArgumentsBuilder(): Builder { - return builder(buildingFn); -} +export const runTaskRunShellArgumentsBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/run-task-run-shell-builder.ts b/src/lib/generated/builders/run-task-run-shell-builder.ts index 65430640..e810e5b8 100644 --- a/src/lib/generated/builders/run-task-run-shell-builder.ts +++ b/src/lib/generated/builders/run-task-run-shell-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.RunTaskRunShell} The validated underlying object */ function buildingFn(data: Specification.RunTaskRunShell): Specification.RunTaskRunShell { - const model = new Classes.RunTaskRunShell(); - Object.assign(model, data); + const model = new Classes.RunTaskRunShell(data); validate('RunTaskRunShell', model); return model as Specification.RunTaskRunShell; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.RunTaskRunShell): Specification.RunTaskR * A factory to create a builder proxy for the type `Specification.RunTaskRunShell` * @returns {Specification.RunTaskRunShell} A builder for `Specification.RunTaskRunShell` */ -export function runTaskRunShellBuilder(): Builder { - return builder(buildingFn); -} +export const runTaskRunShellBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/run-task-run-shell-environment-builder.ts b/src/lib/generated/builders/run-task-run-shell-environment-builder.ts index ac4b31e4..4456fce5 100644 --- a/src/lib/generated/builders/run-task-run-shell-environment-builder.ts +++ b/src/lib/generated/builders/run-task-run-shell-environment-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.RunTaskRunShellEnvironment} The validated underlying object */ function buildingFn(data: Specification.RunTaskRunShellEnvironment): Specification.RunTaskRunShellEnvironment { - const model = new Classes.RunTaskRunShellEnvironment(); - Object.assign(model, data); + const model = new Classes.RunTaskRunShellEnvironment(data); validate('RunTaskRunShellEnvironment', model); return model as Specification.RunTaskRunShellEnvironment; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.RunTaskRunShellEnvironment): Specificati * A factory to create a builder proxy for the type `Specification.RunTaskRunShellEnvironment` * @returns {Specification.RunTaskRunShellEnvironment} A builder for `Specification.RunTaskRunShellEnvironment` */ -export function runTaskRunShellEnvironmentBuilder(): Builder { - return builder(buildingFn); -} +export const runTaskRunShellEnvironmentBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/run-task-run-workflow-builder.ts b/src/lib/generated/builders/run-task-run-workflow-builder.ts index bf355abb..bae29cb9 100644 --- a/src/lib/generated/builders/run-task-run-workflow-builder.ts +++ b/src/lib/generated/builders/run-task-run-workflow-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.RunTaskRunWorkflow} The validated underlying object */ function buildingFn(data: Specification.RunTaskRunWorkflow): Specification.RunTaskRunWorkflow { - const model = new Classes.RunTaskRunWorkflow(); - Object.assign(model, data); + const model = new Classes.RunTaskRunWorkflow(data); validate('RunTaskRunWorkflow', model); return model as Specification.RunTaskRunWorkflow; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.RunTaskRunWorkflow): Specification.RunTa * A factory to create a builder proxy for the type `Specification.RunTaskRunWorkflow` * @returns {Specification.RunTaskRunWorkflow} A builder for `Specification.RunTaskRunWorkflow` */ -export function runTaskRunWorkflowBuilder(): Builder { - return builder(buildingFn); -} +export const runTaskRunWorkflowBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/run-task-run-workflow-input-builder.ts b/src/lib/generated/builders/run-task-run-workflow-input-builder.ts index 513d845b..78abefbc 100644 --- a/src/lib/generated/builders/run-task-run-workflow-input-builder.ts +++ b/src/lib/generated/builders/run-task-run-workflow-input-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.RunTaskRunWorkflowInput} The validated underlying object */ function buildingFn(data: Specification.RunTaskRunWorkflowInput): Specification.RunTaskRunWorkflowInput { - const model = new Classes.RunTaskRunWorkflowInput(); - Object.assign(model, data); + const model = new Classes.RunTaskRunWorkflowInput(data); validate('RunTaskRunWorkflowInput', model); return model as Specification.RunTaskRunWorkflowInput; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.RunTaskRunWorkflowInput): Specification. * A factory to create a builder proxy for the type `Specification.RunTaskRunWorkflowInput` * @returns {Specification.RunTaskRunWorkflowInput} A builder for `Specification.RunTaskRunWorkflowInput` */ -export function runTaskRunWorkflowInputBuilder(): Builder { - return builder(buildingFn); -} +export const runTaskRunWorkflowInputBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/schedule-builder.ts b/src/lib/generated/builders/schedule-builder.ts index e1b957c4..882c6d47 100644 --- a/src/lib/generated/builders/schedule-builder.ts +++ b/src/lib/generated/builders/schedule-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.Schedule} The validated underlying object */ function buildingFn(data: Specification.Schedule): Specification.Schedule { - const model = new Classes.Schedule(); - Object.assign(model, data); + const model = new Classes.Schedule(data); validate('Schedule', model); return model as Specification.Schedule; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.Schedule): Specification.Schedule { * A factory to create a builder proxy for the type `Specification.Schedule` * @returns {Specification.Schedule} A builder for `Specification.Schedule` */ -export function scheduleBuilder(): Builder { - return builder(buildingFn); -} +export const scheduleBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/schema-builder.ts b/src/lib/generated/builders/schema-builder.ts index 292088c2..75d52a4f 100644 --- a/src/lib/generated/builders/schema-builder.ts +++ b/src/lib/generated/builders/schema-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.Schema} The validated underlying object */ function buildingFn(data: Specification.Schema): Specification.Schema { - const model = new Classes.Schema(); - Object.assign(model, data); + const model = new Classes.Schema(data); validate('Schema', model); return model as Specification.Schema; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.Schema): Specification.Schema { * A factory to create a builder proxy for the type `Specification.Schema` * @returns {Specification.Schema} A builder for `Specification.Schema` */ -export function schemaBuilder(): Builder { - return builder(buildingFn); -} +export const schemaBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/set-task-builder.ts b/src/lib/generated/builders/set-task-builder.ts index b59b5fa8..75a6cf14 100644 --- a/src/lib/generated/builders/set-task-builder.ts +++ b/src/lib/generated/builders/set-task-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.SetTask} The validated underlying object */ function buildingFn(data: Specification.SetTask): Specification.SetTask { - const model = new Classes.SetTask(); - Object.assign(model, data); + const model = new Classes.SetTask(data); validate('SetTask', model); return model as Specification.SetTask; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.SetTask): Specification.SetTask { * A factory to create a builder proxy for the type `Specification.SetTask` * @returns {Specification.SetTask} A builder for `Specification.SetTask` */ -export function setTaskBuilder(): Builder { - return builder(buildingFn); -} +export const setTaskBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/set-task-set-builder.ts b/src/lib/generated/builders/set-task-set-builder.ts index 71f986c2..c6389ae3 100644 --- a/src/lib/generated/builders/set-task-set-builder.ts +++ b/src/lib/generated/builders/set-task-set-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.SetTaskSet} The validated underlying object */ function buildingFn(data: Specification.SetTaskSet): Specification.SetTaskSet { - const model = new Classes.SetTaskSet(); - Object.assign(model, data); + const model = new Classes.SetTaskSet(data); validate('SetTaskSet', model); return model as Specification.SetTaskSet; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.SetTaskSet): Specification.SetTaskSet { * A factory to create a builder proxy for the type `Specification.SetTaskSet` * @returns {Specification.SetTaskSet} A builder for `Specification.SetTaskSet` */ -export function setTaskSetBuilder(): Builder { - return builder(buildingFn); -} +export const setTaskSetBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/switch-task-builder.ts b/src/lib/generated/builders/switch-task-builder.ts index 8763d16a..83d089bf 100644 --- a/src/lib/generated/builders/switch-task-builder.ts +++ b/src/lib/generated/builders/switch-task-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.SwitchTask} The validated underlying object */ function buildingFn(data: Specification.SwitchTask): Specification.SwitchTask { - const model = new Classes.SwitchTask(); - Object.assign(model, data); + const model = new Classes.SwitchTask(data); validate('SwitchTask', model); return model as Specification.SwitchTask; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.SwitchTask): Specification.SwitchTask { * A factory to create a builder proxy for the type `Specification.SwitchTask` * @returns {Specification.SwitchTask} A builder for `Specification.SwitchTask` */ -export function switchTaskBuilder(): Builder { - return builder(buildingFn); -} +export const switchTaskBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/switch-task-switch-builder.ts b/src/lib/generated/builders/switch-task-switch-builder.ts index 142d0f9d..7fcbc930 100644 --- a/src/lib/generated/builders/switch-task-switch-builder.ts +++ b/src/lib/generated/builders/switch-task-switch-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.SwitchTaskSwitch} The validated underlying object */ function buildingFn(data: Specification.SwitchTaskSwitch): Specification.SwitchTaskSwitch { - const model = new Classes.SwitchTaskSwitch(); - Object.assign(model, data); + const model = new Classes.SwitchTaskSwitch(data); validate('SwitchTaskSwitch', model); return model as Specification.SwitchTaskSwitch; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.SwitchTaskSwitch): Specification.SwitchT * A factory to create a builder proxy for the type `Specification.SwitchTaskSwitch` * @returns {Specification.SwitchTaskSwitch} A builder for `Specification.SwitchTaskSwitch` */ -export function switchTaskSwitchBuilder(): Builder { - return builder(buildingFn); -} +export const switchTaskSwitchBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/task-base-builder.ts b/src/lib/generated/builders/task-base-builder.ts index 04bf4267..e9fe96a5 100644 --- a/src/lib/generated/builders/task-base-builder.ts +++ b/src/lib/generated/builders/task-base-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.TaskBase} The validated underlying object */ function buildingFn(data: Specification.TaskBase): Specification.TaskBase { - const model = new Classes.TaskBase(); - Object.assign(model, data); + const model = new Classes.TaskBase(data); validate('TaskBase', model); return model as Specification.TaskBase; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.TaskBase): Specification.TaskBase { * A factory to create a builder proxy for the type `Specification.TaskBase` * @returns {Specification.TaskBase} A builder for `Specification.TaskBase` */ -export function taskBaseBuilder(): Builder { - return builder(buildingFn); -} +export const taskBaseBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/task-builder.ts b/src/lib/generated/builders/task-builder.ts index 16f75bd7..ae0f1578 100644 --- a/src/lib/generated/builders/task-builder.ts +++ b/src/lib/generated/builders/task-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.Task} The validated underlying object */ function buildingFn(data: Specification.Task): Specification.Task { - const model = new Classes.Task(); - Object.assign(model, data); + const model = new Classes.Task(data); validate('Task', model); return model as Specification.Task; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.Task): Specification.Task { * A factory to create a builder proxy for the type `Specification.Task` * @returns {Specification.Task} A builder for `Specification.Task` */ -export function taskBuilder(): Builder { - return builder(buildingFn); -} +export const taskBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/task-list-builder.ts b/src/lib/generated/builders/task-list-builder.ts index f2d176cb..a5c10089 100644 --- a/src/lib/generated/builders/task-list-builder.ts +++ b/src/lib/generated/builders/task-list-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.TaskList} The validated underlying object */ function buildingFn(data: Specification.TaskList): Specification.TaskList { - const model = new Classes.TaskList(); - Object.assign(model, data); + const model = new Classes.TaskList(data); validate('TaskList', model); return model as Specification.TaskList; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.TaskList): Specification.TaskList { * A factory to create a builder proxy for the type `Specification.TaskList` * @returns {Specification.TaskList} A builder for `Specification.TaskList` */ -export function taskListBuilder(): Builder { - return builder(buildingFn); -} +export const taskListBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/timeout-builder.ts b/src/lib/generated/builders/timeout-builder.ts index 20b6d50c..d0228135 100644 --- a/src/lib/generated/builders/timeout-builder.ts +++ b/src/lib/generated/builders/timeout-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.Timeout} The validated underlying object */ function buildingFn(data: Specification.Timeout): Specification.Timeout { - const model = new Classes.Timeout(); - Object.assign(model, data); + const model = new Classes.Timeout(data); validate('Timeout', model); return model as Specification.Timeout; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.Timeout): Specification.Timeout { * A factory to create a builder proxy for the type `Specification.Timeout` * @returns {Specification.Timeout} A builder for `Specification.Timeout` */ -export function timeoutBuilder(): Builder { - return builder(buildingFn); -} +export const timeoutBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/try-task-builder.ts b/src/lib/generated/builders/try-task-builder.ts index 42645293..caf6ff87 100644 --- a/src/lib/generated/builders/try-task-builder.ts +++ b/src/lib/generated/builders/try-task-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.TryTask} The validated underlying object */ function buildingFn(data: Specification.TryTask): Specification.TryTask { - const model = new Classes.TryTask(); - Object.assign(model, data); + const model = new Classes.TryTask(data); validate('TryTask', model); return model as Specification.TryTask; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.TryTask): Specification.TryTask { * A factory to create a builder proxy for the type `Specification.TryTask` * @returns {Specification.TryTask} A builder for `Specification.TryTask` */ -export function tryTaskBuilder(): Builder { - return builder(buildingFn); -} +export const tryTaskBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/try-task-catch-builder.ts b/src/lib/generated/builders/try-task-catch-builder.ts index c332c1a7..6c123940 100644 --- a/src/lib/generated/builders/try-task-catch-builder.ts +++ b/src/lib/generated/builders/try-task-catch-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.TryTaskCatch} The validated underlying object */ function buildingFn(data: Specification.TryTaskCatch): Specification.TryTaskCatch { - const model = new Classes.TryTaskCatch(); - Object.assign(model, data); + const model = new Classes.TryTaskCatch(data); validate('TryTaskCatch', model); return model as Specification.TryTaskCatch; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.TryTaskCatch): Specification.TryTaskCatc * A factory to create a builder proxy for the type `Specification.TryTaskCatch` * @returns {Specification.TryTaskCatch} A builder for `Specification.TryTaskCatch` */ -export function tryTaskCatchBuilder(): Builder { - return builder(buildingFn); -} +export const tryTaskCatchBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/use-authentications-builder.ts b/src/lib/generated/builders/use-authentications-builder.ts index d818a5db..3c52cdc5 100644 --- a/src/lib/generated/builders/use-authentications-builder.ts +++ b/src/lib/generated/builders/use-authentications-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.UseAuthentications} The validated underlying object */ function buildingFn(data: Specification.UseAuthentications): Specification.UseAuthentications { - const model = new Classes.UseAuthentications(); - Object.assign(model, data); + const model = new Classes.UseAuthentications(data); validate('UseAuthentications', model); return model as Specification.UseAuthentications; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.UseAuthentications): Specification.UseAu * A factory to create a builder proxy for the type `Specification.UseAuthentications` * @returns {Specification.UseAuthentications} A builder for `Specification.UseAuthentications` */ -export function useAuthenticationsBuilder(): Builder { - return builder(buildingFn); -} +export const useAuthenticationsBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/use-builder.ts b/src/lib/generated/builders/use-builder.ts index 22540e41..5d580ad7 100644 --- a/src/lib/generated/builders/use-builder.ts +++ b/src/lib/generated/builders/use-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.Use} The validated underlying object */ function buildingFn(data: Specification.Use): Specification.Use { - const model = new Classes.Use(); - Object.assign(model, data); + const model = new Classes.Use(data); validate('Use', model); return model as Specification.Use; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.Use): Specification.Use { * A factory to create a builder proxy for the type `Specification.Use` * @returns {Specification.Use} A builder for `Specification.Use` */ -export function useBuilder(): Builder { - return builder(buildingFn); -} +export const useBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/use-errors-builder.ts b/src/lib/generated/builders/use-errors-builder.ts index 000be51f..7968e50a 100644 --- a/src/lib/generated/builders/use-errors-builder.ts +++ b/src/lib/generated/builders/use-errors-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.UseErrors} The validated underlying object */ function buildingFn(data: Specification.UseErrors): Specification.UseErrors { - const model = new Classes.UseErrors(); - Object.assign(model, data); + const model = new Classes.UseErrors(data); validate('UseErrors', model); return model as Specification.UseErrors; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.UseErrors): Specification.UseErrors { * A factory to create a builder proxy for the type `Specification.UseErrors` * @returns {Specification.UseErrors} A builder for `Specification.UseErrors` */ -export function useErrorsBuilder(): Builder { - return builder(buildingFn); -} +export const useErrorsBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/use-extensions-builder.ts b/src/lib/generated/builders/use-extensions-builder.ts index 53924503..7aba7300 100644 --- a/src/lib/generated/builders/use-extensions-builder.ts +++ b/src/lib/generated/builders/use-extensions-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.UseExtensions} The validated underlying object */ function buildingFn(data: Specification.UseExtensions): Specification.UseExtensions { - const model = new Classes.UseExtensions(); - Object.assign(model, data); + const model = new Classes.UseExtensions(data); validate('UseExtensions', model); return model as Specification.UseExtensions; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.UseExtensions): Specification.UseExtensi * A factory to create a builder proxy for the type `Specification.UseExtensions` * @returns {Specification.UseExtensions} A builder for `Specification.UseExtensions` */ -export function useExtensionsBuilder(): Builder { - return builder(buildingFn); -} +export const useExtensionsBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/use-functions-builder.ts b/src/lib/generated/builders/use-functions-builder.ts index 2b10a6e9..c4e9140b 100644 --- a/src/lib/generated/builders/use-functions-builder.ts +++ b/src/lib/generated/builders/use-functions-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.UseFunctions} The validated underlying object */ function buildingFn(data: Specification.UseFunctions): Specification.UseFunctions { - const model = new Classes.UseFunctions(); - Object.assign(model, data); + const model = new Classes.UseFunctions(data); validate('UseFunctions', model); return model as Specification.UseFunctions; @@ -36,6 +35,5 @@ function buildingFn(data: Specification.UseFunctions): Specification.UseFunction * A factory to create a builder proxy for the type `Specification.UseFunctions` * @returns {Specification.UseFunctions} A builder for `Specification.UseFunctions` */ -export function useFunctionsBuilder(): Builder { - return builder(buildingFn); -} +export const useFunctionsBuilder = (): Builder => + builder(buildingFn); diff --git a/src/lib/generated/builders/use-retries-builder.ts b/src/lib/generated/builders/use-retries-builder.ts index c58552b8..33bf74e1 100644 --- a/src/lib/generated/builders/use-retries-builder.ts +++ b/src/lib/generated/builders/use-retries-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.UseRetries} The validated underlying object */ function buildingFn(data: Specification.UseRetries): Specification.UseRetries { - const model = new Classes.UseRetries(); - Object.assign(model, data); + const model = new Classes.UseRetries(data); validate('UseRetries', model); return model as Specification.UseRetries; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.UseRetries): Specification.UseRetries { * A factory to create a builder proxy for the type `Specification.UseRetries` * @returns {Specification.UseRetries} A builder for `Specification.UseRetries` */ -export function useRetriesBuilder(): Builder { - return builder(buildingFn); -} +export const useRetriesBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/wait-task-builder.ts b/src/lib/generated/builders/wait-task-builder.ts index 54435a77..3e1bde9c 100644 --- a/src/lib/generated/builders/wait-task-builder.ts +++ b/src/lib/generated/builders/wait-task-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.WaitTask} The validated underlying object */ function buildingFn(data: Specification.WaitTask): Specification.WaitTask { - const model = new Classes.WaitTask(); - Object.assign(model, data); + const model = new Classes.WaitTask(data); validate('WaitTask', model); return model as Specification.WaitTask; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.WaitTask): Specification.WaitTask { * A factory to create a builder proxy for the type `Specification.WaitTask` * @returns {Specification.WaitTask} A builder for `Specification.WaitTask` */ -export function waitTaskBuilder(): Builder { - return builder(buildingFn); -} +export const waitTaskBuilder = (): Builder => builder(buildingFn); diff --git a/src/lib/generated/builders/workflow-builder.ts b/src/lib/generated/builders/workflow-builder.ts index 3de21c98..8db32186 100644 --- a/src/lib/generated/builders/workflow-builder.ts +++ b/src/lib/generated/builders/workflow-builder.ts @@ -25,8 +25,7 @@ import { Specification } from '../definitions'; * @returns {Specification.Workflow} The validated underlying object */ function buildingFn(data: Specification.Workflow): Specification.Workflow { - const model = new Classes.Workflow(); - Object.assign(model, data); + const model = new Classes.Workflow(data); validate('Workflow', model); return model as Specification.Workflow; @@ -36,6 +35,4 @@ function buildingFn(data: Specification.Workflow): Specification.Workflow { * A factory to create a builder proxy for the type `Specification.Workflow` * @returns {Specification.Workflow} A builder for `Specification.Workflow` */ -export function workflowBuilder(): Builder { - return builder(buildingFn); -} +export const workflowBuilder = (): Builder => builder(buildingFn); diff --git a/tools/2_generate-definitions.ts b/tools/2_generate-definitions.ts index 8281417d..7e38ce7b 100644 --- a/tools/2_generate-definitions.ts +++ b/tools/2_generate-definitions.ts @@ -58,7 +58,7 @@ const metadataProperties = ['title', 'description', 'default', 'type']; /** * Embellishes the provided schema to increase its compatibility with json-schema-to-typescript, the resulting schema should keep the validation properties as the input one (phase 1) - * - adds missing type:object properties + * - adds missing type:object properties // not necessary ? * - adds missing titles to objects * @param schema The schema to embellish * @param path The current path of the schema relative to the original schema diff --git a/tools/5_generate-builders.ts b/tools/5_generate-builders.ts index 9e97ef23..5d64535f 100644 --- a/tools/5_generate-builders.ts +++ b/tools/5_generate-builders.ts @@ -75,8 +75,7 @@ ${extension?.import ? extension.import + '\n' : ''} * @returns {Specification.${declaration}} The validated underlying object */ function buildingFn(data: Specification.${declaration}): Specification.${declaration} { - const model = new Classes.${declaration}(); - Object.assign(model, data); + const model = new Classes.${declaration}(data); ${extension?.preValidate || ''} validate('${declaration}', model); return model as Specification.${declaration}; @@ -86,9 +85,7 @@ function buildingFn(data: Specification.${declaration}): Specification.${declara * A factory to create a builder proxy for the type \`Specification.${declaration}\` * @returns {Specification.${declaration}} A builder for \`Specification.${declaration}\` */ -export function ${camelType}Builder(): Builder { -return builder(buildingFn); -}`; +export const ${camelType}Builder = (): Builder => builder(buildingFn);`; const destFile = path.resolve(destDir, toKebabCase(normalizeKnownAllCaps(declaration)) + '-builder.ts'); await writeFile(destFile, builderCode); } diff --git a/tools/README.md b/tools/README.md new file mode 100644 index 00000000..ab9e4492 --- /dev/null +++ b/tools/README.md @@ -0,0 +1,103 @@ +# Tooling Architecture + +## 1. Downloader +A simple script that downloads the JSON Schema(s) from `https://serverlessworkflow.io/`. Currently, there is only one schema, but the script supports downloading referenced schemas as well for legacy reasons. As it might be useful in the future and doesn't add much complexity, it has been retained. + +> *(i) The schema(s) are saved in `src/lib/generated/schema/`, the main one being `workflow.json`.* + +## 2. Generating Types +The goal is to automatically generate TypeScript types/interfaces or classes corresponding to the specification's JSON Schema. This step is the trickiest. Its outcome will vary depending on the schema and the library used. + +Some libraries considered: +- [dtsgenerator](https://www.npmjs.com/package/dtsgenerator) - Used with the previous version of the spec but is no longer updated and doesn't support `draft/2020-12` schemas. Replacing `$defs` with `definitions` didn't yield convincing results. With the previous version, manual merging of schemas was needed because external `$refs` were not resolved. +- [quicktype](https://www.npmjs.com/package/quicktype) - Despite its popularity, its output was unsatisfactory. Instead of using union types, it merged all properties into one object and made them nullable. While there might be configuration options to address this, it was not explored in depth. Its support for many languages might make it less specialized. +- [json-schema-to-typescript](https://www.npmjs.com/package/json-schema-to-typescript) - Generates a mix of types and interfaces, using unions and intersections. A red flag is the number of open issues, some dating back to 2018. However, it is still maintained. + +In the end, `json-schema-to-typescript` was selected. Nevertheless, it has some issues to work around: +- [Issue #613](https://github.com/bcherny/json-schema-to-typescript/issues/613) +- [Issue #193](https://github.com/bcherny/json-schema-to-typescript/issues/193) (from 2018) + +To maximize compatibility with `json-schema-to-typescript`, the generator performs a few operations in two phases: + +### Phase 1: Embellishing the JSON Schema +To have better control over the generated type names, every object and array of objects in the schema is given a `title` if none is defined. This allows: +1. Avoiding names like `Schema` and `Schema1` +2. Mapping a generated type to its JSON pointer in the schema (see [3. Generating Validators](#3-generating-validators)) + +The `type: object` is also added when not specified. This doesn't impact type generation but might be useful for strict schema validation. + +Theoretically, *Phase 1* doesn't affect the validity of the schema. + +> *(i) The resulting schema is saved as `src/lib/generated/schema/__internal_workflow.json` for later use.* + +### Phase 2: Mutating the JSON Schema +`json-schema-to-typescript` has limitations, as highlighted in the issues linked above: +- When a property's type is referenced (`$ref`) and also decorated with metadata (e.g., `description`), `json-schema-to-typescript` outputs an additional type instead of using the referenced one. See [Issue #193](https://github.com/bcherny/json-schema-to-typescript/issues/193). +- When an object inherits from another using a reference (`$ref`), the parent is ignored in the generated types. See [Issue #613](https://github.com/bcherny/json-schema-to-typescript/issues/613). +- `unevaluatedProperties` seems to be ignored. + +*Phase 2* addresses these limitations by: +- Removing metadata from properties whose type is a reference. +- Replacing `$ref` inheritance with `allOf` +- Replacing `unevaluatedProperties` with `additionalProperties` + +The resulting schema is used in-memory to generate the types. The schema produced by *Phase 2* is intrinsically different from the original schema and will produce different validation results if used. **This is why this process is done in two phases instead of one, which would have been more performant.** + +After phases 1 & 2, the mutated schema is passed to `json-schema-to-typescript` and the resulting TypeScript declarations are saved to `specification.ts`. + +> *(i) The declarations are saved in `src/lib/generated/definitions/specification.ts`.* + +## 3. Generating Validators +To validate an object of type `T`, where `T` is not the root object described by the JSON Schema, we need to know the subschema's JSON pointer corresponding to `T`. The exported declarations of the TypeScript file produced in [step 2](#2-generating-types) are extracted using `ts-morph`. *(This is probably overkill; a regex could probably do the trick, but this library might be useful later on.)* For each declaration, the internal JSON Schema produced in [step 2 - Phase 1](#phase-1-embellishing-the-json-schema) is crawled to find the object with the matching title. Then, an object where the keys are the names of the types and the values are their JSON pointers is saved as `validation-pointers.ts`. + +> *(i) The validation pointers are saved in `src/lib/generated/validation/validation-pointers.ts`.* + +The produced validation pointers are used by the SDK to expose a `validate` function that takes the name of the type to validate and the object to validate: +```typescript +validate('TypeName', value); +``` + +> *(i) The validation function is located at `src/lib/validation.ts`.* + +## 4. Generating Classes +[Generating types](#2-generating-types) is already a great step, but classes have a few advantages we'd like to leverage in an SDK: +- Unlike types, they can be tested at runtime with `instanceof` +- They can carry business logic such as object hydration (for the aforementioned `instanceof` checking), self-validation, default value handling, etc. + +The aim is to generate a class for each type/interface generated in the 2nd step that shares the same property signatures. This is achieved by exploiting a TypeScript trick: declaring an internal class and then exposing it as an intersection of its constructor and its associated type (see this [StackOverflow reply](https://stackoverflow.com/questions/54207173/classes-keyof-in-typescript/54207465#54207465)). For instance, if our type is `Foo`, we can mimic a class `FooClass` using the following code: +```typescript +class _FooClass { + constructor(model?: Partial) { + if (model) Object.assign(this, model); + } +} + +export const FooClass = _FooClass as { + new(model?: Foo): _FooClass & Foo // aka "the constructor creates an object which is both _FooClass and Foo" +}; + +const fooInstance = new FooClass(); +console.log(fooInstance instanceof FooClass); // true +``` + +At the moment, classes don't do anything else. Validation, for instance, is called by the builders (next step). In the future, validation will be migrated to the classes, along with recursive hydration and default values handling. + +> *(i) The classes are saved in `src/lib/generated/classes/`.* + +## 5. Generating Fluent Builders +One feature of the SDK is to expose fluent builders. This feature heavily relies on the builder proxy in `src/lib/builder.ts`. The generic type `Builder` reflects properties of `T` as methods and adds a `build()` method to return the built object. The proxy sets the property value when the corresponding method is called or calls a "building function" when `build()` is called. + +The generator iterates over the generated types to: +- Define a "building function" that creates an "instance of the type" (of the class that mimics the type) and validates it. +- Wrap the generic proxy into a specific one. e.g., `export const workflowBuilder = (): Builder => builder(buildingFn);`. + +At the moment, the "building function" can be extended to include pre-validation code, but this will likely migrate to the class level. + +> *(i) The builders are saved in `src/lib/generated/builders/`.* + +## Conclusion +With the tooling in place, we can automatically provide the required features of the SDK: +- Type checking +- Validation +- Typed instances +- Fluent builder \ No newline at end of file From d7704bae4d161ecaaf686d8f5f5b86d60863d7ca Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Sat, 27 Jul 2024 21:44:26 +0200 Subject: [PATCH 07/24] Extended support to array types Signed-off-by: Jean-Baptiste Bianchi --- src/lib/builder.ts | 61 ++++++++-- .../authentication-policy-basic-builder.ts | 19 +-- .../authentication-policy-bearer-builder.ts | 19 +-- .../builders/authentication-policy-builder.ts | 18 +-- .../authentication-policy-oauth2-builder.ts | 19 +-- ...entication-policy-oauth2-client-builder.ts | 19 +-- .../builders/call-async-api-builder.ts | 17 ++- ...l-async-api-with-authentication-builder.ts | 19 +-- .../builders/call-async-api-with-builder.ts | 18 +-- .../builders/call-function-builder.ts | 17 ++- .../builders/call-function-with-builder.ts | 18 +-- .../generated/builders/call-grpc-builder.ts | 16 +-- .../call-grpc-with-arguments-builder.ts | 18 +-- .../builders/call-grpc-with-builder.ts | 17 ++- ...rpc-with-service-authentication-builder.ts | 19 +-- .../call-grpc-with-service-builder.ts | 18 +-- .../generated/builders/call-http-builder.ts | 16 +-- .../builders/call-http-with-builder.ts | 17 ++- .../call-http-with-endpoint-builder.ts | 18 +-- .../builders/call-open-api-builder.ts | 17 ++- ...ll-open-api-with-authentication-builder.ts | 19 +-- .../builders/call-open-api-with-builder.ts | 18 +-- .../call-open-api-with-parameters-builder.ts | 19 +-- .../generated/builders/call-task-builder.ts | 16 +-- src/lib/generated/builders/do-task-builder.ts | 16 +-- .../generated/builders/document-builder.ts | 16 +-- .../builders/document-tags-builder.ts | 17 ++- .../generated/builders/duration-builder.ts | 16 +-- .../generated/builders/emit-task-builder.ts | 16 +-- .../builders/emit-task-emit-builder.ts | 17 ++- .../builders/emit-task-emit-event-builder.ts | 18 +-- .../endpoint-authentication-builder.ts | 18 +-- .../generated/builders/endpoint-builder.ts | 16 +-- src/lib/generated/builders/error-builder.ts | 16 +-- .../event-consumption-strategy-all-builder.ts | 24 ++-- .../event-consumption-strategy-any-builder.ts | 24 ++-- .../event-consumption-strategy-builder.ts | 19 +-- .../builders/event-filter-builder.ts | 17 ++- .../event-filter-correlate-builder.ts | 18 +-- .../builders/event-filter-with-builder.ts | 18 +-- src/lib/generated/builders/export-builder.ts | 16 +-- .../generated/builders/extension-builder.ts | 16 +-- ...xternal-resource-authentication-builder.ts | 19 +-- .../builders/external-resource-builder.ts | 18 +-- .../builders/flow-directive-builder.ts | 18 +-- .../generated/builders/for-task-builder.ts | 16 +-- .../builders/for-task-for-builder.ts | 16 +-- .../generated/builders/fork-task-builder.ts | 16 +-- .../builders/fork-task-fork-builder.ts | 17 ++- src/lib/generated/builders/index.ts | 1 + src/lib/generated/builders/input-builder.ts | 16 +-- .../generated/builders/listen-task-builder.ts | 16 +-- .../builders/listen-task-listen-builder.ts | 18 +-- .../builders/oauth2-token-builder.ts | 17 ++- src/lib/generated/builders/output-builder.ts | 16 +-- .../generated/builders/raise-task-builder.ts | 16 +-- .../builders/raise-task-raise-builder.ts | 18 +-- .../builders/retry-policy-backoff-builder.ts | 18 +-- .../builders/retry-policy-builder.ts | 17 ++- .../builders/retry-policy-jitter-builder.ts | 18 +-- .../retry-policy-limit-attempt-builder.ts | 18 +-- .../builders/retry-policy-limit-builder.ts | 18 +-- .../generated/builders/run-task-builder.ts | 16 +-- .../builders/run-task-run-builder.ts | 16 +-- .../run-task-run-container-builder.ts | 18 +-- .../builders/run-task-run-script-builder.ts | 18 +-- .../run-task-run-shell-arguments-builder.ts | 19 +-- .../builders/run-task-run-shell-builder.ts | 18 +-- .../run-task-run-shell-environment-builder.ts | 19 +-- .../builders/run-task-run-workflow-builder.ts | 18 +-- .../run-task-run-workflow-input-builder.ts | 18 +-- .../generated/builders/schedule-builder.ts | 16 +-- src/lib/generated/builders/schema-builder.ts | 16 +-- .../generated/builders/set-task-builder.ts | 16 +-- .../builders/set-task-set-builder.ts | 16 +-- .../generated/builders/switch-task-builder.ts | 16 +-- .../builders/switch-task-switch-builder.ts | 18 +-- .../switch-task-switch-case-builder.ts | 39 +++++++ .../generated/builders/task-base-builder.ts | 16 +-- src/lib/generated/builders/task-builder.ts | 16 +-- .../generated/builders/task-list-builder.ts | 22 ++-- src/lib/generated/builders/timeout-builder.ts | 16 +-- .../generated/builders/try-task-builder.ts | 16 +-- .../builders/try-task-catch-builder.ts | 17 ++- .../builders/use-authentications-builder.ts | 18 +-- src/lib/generated/builders/use-builder.ts | 16 +-- .../generated/builders/use-errors-builder.ts | 16 +-- .../builders/use-extensions-builder.ts | 25 ++-- .../builders/use-functions-builder.ts | 17 ++- .../generated/builders/use-retries-builder.ts | 16 +-- .../generated/builders/wait-task-builder.ts | 16 +-- .../generated/builders/workflow-builder.ts | 16 +-- .../classes/authentication-policy-basic.ts | 32 ++++- .../classes/authentication-policy-bearer.ts | 32 ++++- .../authentication-policy-oauth2-client.ts | 32 ++++- .../classes/authentication-policy-oauth2.ts | 32 ++++- .../classes/authentication-policy.ts | 32 ++++- .../call-async-api-with-authentication.ts | 32 ++++- .../generated/classes/call-async-api-with.ts | 32 ++++- src/lib/generated/classes/call-async-api.ts | 32 ++++- .../generated/classes/call-function-with.ts | 32 ++++- src/lib/generated/classes/call-function.ts | 32 ++++- .../classes/call-grpc-with-arguments.ts | 32 ++++- .../call-grpc-with-service-authentication.ts | 32 ++++- .../classes/call-grpc-with-service.ts | 32 ++++- src/lib/generated/classes/call-grpc-with.ts | 32 ++++- src/lib/generated/classes/call-grpc.ts | 32 ++++- .../classes/call-http-with-endpoint.ts | 32 ++++- src/lib/generated/classes/call-http-with.ts | 32 ++++- src/lib/generated/classes/call-http.ts | 32 ++++- .../call-open-api-with-authentication.ts | 32 ++++- .../classes/call-open-api-with-parameters.ts | 32 ++++- .../generated/classes/call-open-api-with.ts | 32 ++++- src/lib/generated/classes/call-open-api.ts | 32 ++++- src/lib/generated/classes/call-task.ts | 32 ++++- src/lib/generated/classes/do-task.ts | 32 ++++- src/lib/generated/classes/document-tags.ts | 32 ++++- src/lib/generated/classes/document.ts | 32 ++++- src/lib/generated/classes/duration.ts | 32 ++++- .../generated/classes/emit-task-emit-event.ts | 32 ++++- src/lib/generated/classes/emit-task-emit.ts | 32 ++++- src/lib/generated/classes/emit-task.ts | 32 ++++- .../classes/endpoint-authentication.ts | 32 ++++- src/lib/generated/classes/endpoint.ts | 32 ++++- src/lib/generated/classes/error.ts | 32 ++++- .../classes/event-consumption-strategy-all.ts | 39 +++++-- .../classes/event-consumption-strategy-any.ts | 39 +++++-- .../classes/event-consumption-strategy.ts | 32 ++++- .../classes/event-filter-correlate.ts | 32 ++++- .../generated/classes/event-filter-with.ts | 32 ++++- src/lib/generated/classes/event-filter.ts | 32 ++++- src/lib/generated/classes/export.ts | 32 ++++- src/lib/generated/classes/extension.ts | 32 ++++- .../external-resource-authentication.ts | 32 ++++- .../generated/classes/external-resource.ts | 32 ++++- src/lib/generated/classes/flow-directive.ts | 32 ++++- src/lib/generated/classes/for-task-for.ts | 32 ++++- src/lib/generated/classes/for-task.ts | 32 ++++- src/lib/generated/classes/fork-task-fork.ts | 32 ++++- src/lib/generated/classes/fork-task.ts | 32 ++++- src/lib/generated/classes/index.ts | 2 + src/lib/generated/classes/input.ts | 32 ++++- .../generated/classes/listen-task-listen.ts | 32 ++++- src/lib/generated/classes/listen-task.ts | 32 ++++- src/lib/generated/classes/oauth2-token.ts | 32 ++++- src/lib/generated/classes/output.ts | 32 ++++- src/lib/generated/classes/raise-task-raise.ts | 32 ++++- src/lib/generated/classes/raise-task.ts | 32 ++++- .../generated/classes/retry-policy-backoff.ts | 32 ++++- .../generated/classes/retry-policy-jitter.ts | 32 ++++- .../classes/retry-policy-limit-attempt.ts | 32 ++++- .../generated/classes/retry-policy-limit.ts | 32 ++++- src/lib/generated/classes/retry-policy.ts | 32 ++++- .../classes/run-task-run-container.ts | 32 ++++- .../generated/classes/run-task-run-script.ts | 32 ++++- .../classes/run-task-run-shell-arguments.ts | 32 ++++- .../classes/run-task-run-shell-environment.ts | 32 ++++- .../generated/classes/run-task-run-shell.ts | 32 ++++- .../classes/run-task-run-workflow-input.ts | 32 ++++- .../classes/run-task-run-workflow.ts | 32 ++++- src/lib/generated/classes/run-task-run.ts | 32 ++++- src/lib/generated/classes/run-task.ts | 32 ++++- src/lib/generated/classes/schedule.ts | 32 ++++- src/lib/generated/classes/schema.ts | 32 ++++- src/lib/generated/classes/set-task-set.ts | 32 ++++- src/lib/generated/classes/set-task.ts | 32 ++++- .../classes/switch-task-switch-case.ts | 34 ++++++ .../generated/classes/switch-task-switch.ts | 32 ++++- src/lib/generated/classes/switch-task.ts | 32 ++++- src/lib/generated/classes/task-base.ts | 32 ++++- src/lib/generated/classes/task-list.ts | 37 ++++-- src/lib/generated/classes/task.ts | 32 ++++- src/lib/generated/classes/timeout.ts | 32 ++++- src/lib/generated/classes/try-task-catch.ts | 32 ++++- src/lib/generated/classes/try-task.ts | 32 ++++- .../generated/classes/use-authentications.ts | 32 ++++- src/lib/generated/classes/use-errors.ts | 32 ++++- src/lib/generated/classes/use-extensions.ts | 37 ++++-- src/lib/generated/classes/use-functions.ts | 32 ++++- src/lib/generated/classes/use-retries.ts | 32 ++++- src/lib/generated/classes/use.ts | 32 ++++- src/lib/generated/classes/wait-task.ts | 32 ++++- src/lib/generated/classes/workflow.ts | 32 ++++- .../generated/definitions/specification.ts | 38 +++--- .../generated/schema/__internal_workflow.json | 5 +- src/lib/hydrator.ts | 12 ++ src/lib/reflector.ts | 13 --- src/lib/validation.ts | 19 +-- tests/builders/builder.spec.ts | 12 +- tests/builders/call-http-builder.spec.ts | 23 +++- tests/builders/use-extensions-builder.spec.ts | 38 ++++++ tests/classes/use-extensions.spec.ts | 14 +++ tools/2_generate-definitions.ts | 16 ++- tools/3_generate-validation-pointers.ts | 6 +- tools/4_generate-classes.ts | 79 ++++++++++--- tools/5_generate-builders.ts | 109 +++++++++++------- tools/README.md | 12 +- tools/consts.ts | 8 ++ tools/utils.ts | 6 +- 199 files changed, 3588 insertions(+), 1387 deletions(-) create mode 100644 src/lib/generated/builders/switch-task-switch-case-builder.ts create mode 100644 src/lib/generated/classes/switch-task-switch-case.ts create mode 100644 src/lib/hydrator.ts delete mode 100644 src/lib/reflector.ts create mode 100644 tests/builders/use-extensions-builder.spec.ts create mode 100644 tests/classes/use-extensions.spec.ts diff --git a/src/lib/builder.ts b/src/lib/builder.ts index 7bd2c6df..e0da7102 100644 --- a/src/lib/builder.ts +++ b/src/lib/builder.ts @@ -16,7 +16,7 @@ */ /** - * Represents a fluent builder proxy + * Represents a fluent builder proxy for an object */ export type Builder = { build: (validate?: boolean) => T; @@ -24,29 +24,39 @@ export type Builder = { [K in keyof T]-?: (arg: T[K]) => Builder; }; +/** + * Represents a fluent builder proxy for an array + */ +export type ArrayBuilder = { + push: (item: T) => ArrayBuilder; + build: (validate?: boolean) => Array; +}; + /** * The default function used to build an object, basically just return the provided object - * @param data The object to "build" + * @param model The object to "build" * @returns */ -function defaultBuildingFn(data: Partial): T { - return data as T; +function defaultBuildingFn(model: Partial): T { + return model as T; } /** * A factory for fluent builders that proxy properties assignations and can validate against schema on build() - * @param {Function} buildingFn The function used to validate and produce the object on build() - * @returns {Builder} A fluent builder + * @param buildingFn The function used to validate and produce the object on build() + * @returns A fluent builder */ -export function builder(buildingFn?: (data: Partial) => T): Builder { - const data: Partial = {}; +export function builder( + model: Partial = {}, + buildingFn: (data: Partial) => T = defaultBuildingFn, +): Builder { const proxy = new Proxy({} as Builder, { get: (_, prop) => { if (prop === 'build') { - return (validate: boolean = true) => (validate ? (buildingFn || defaultBuildingFn)(data) : data); + return (validate: boolean = true) => (validate ? buildingFn(model) : model); } return (value: unknown): Builder => { - (data as any)[prop.toString()] = value; + (model as any)[prop.toString()] = value; return proxy; }; }, @@ -56,3 +66,34 @@ export function builder(buildingFn?: (data: Partial) => T): Builder { }); return proxy; } + +/** + * A factory for fluent builders that proxy properties assignations and can validate against schema on build() + * @param buildingFn The function used to validate and produce the object on build() + * @returns A fluent builder + */ +export function arrayBuilder( + model: Array = [], + buildingFn: (data: Array) => Array = defaultBuildingFn, +): ArrayBuilder { + if (model != null && !Array.isArray(model)) { + throw new Error(`The provided model should be an array`); + } + const proxy = new Proxy({} as ArrayBuilder, { + get: (_, prop) => { + if (prop === 'build') { + return (validate: boolean = true) => (validate ? buildingFn(model) : model); + } + if (prop === 'push') { + return (value: T): ArrayBuilder => { + model.push(value); + return proxy; + }; + } + }, + set: () => { + return false; + }, + }); + return proxy; +} diff --git a/src/lib/generated/builders/authentication-policy-basic-builder.ts b/src/lib/generated/builders/authentication-policy-basic-builder.ts index e624d02b..d7288a3d 100644 --- a/src/lib/generated/builders/authentication-policy-basic-builder.ts +++ b/src/lib/generated/builders/authentication-policy-basic-builder.ts @@ -21,19 +21,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.AuthenticationPolicyBasic} data The underlying object + * @param {Specification.AuthenticationPolicyBasic} model The underlying object * @returns {Specification.AuthenticationPolicyBasic} The validated underlying object */ -function buildingFn(data: Specification.AuthenticationPolicyBasic): Specification.AuthenticationPolicyBasic { - const model = new Classes.AuthenticationPolicyBasic(data); - - validate('AuthenticationPolicyBasic', model); - return model as Specification.AuthenticationPolicyBasic; +function buildingFn(model: Specification.AuthenticationPolicyBasic): Specification.AuthenticationPolicyBasic { + const instance = new Classes.AuthenticationPolicyBasic(model); + validate('AuthenticationPolicyBasic', instance); + return instance as Specification.AuthenticationPolicyBasic; } /** * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyBasic` - * @returns {Specification.AuthenticationPolicyBasic} A builder for `Specification.AuthenticationPolicyBasic` + * @returns {Builder} A builder for `Specification.AuthenticationPolicyBasic` */ -export const authenticationPolicyBasicBuilder = (): Builder => - builder(buildingFn); +export const authenticationPolicyBasicBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/authentication-policy-bearer-builder.ts b/src/lib/generated/builders/authentication-policy-bearer-builder.ts index 14587f3c..5ac82599 100644 --- a/src/lib/generated/builders/authentication-policy-bearer-builder.ts +++ b/src/lib/generated/builders/authentication-policy-bearer-builder.ts @@ -21,19 +21,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.AuthenticationPolicyBearer} data The underlying object + * @param {Specification.AuthenticationPolicyBearer} model The underlying object * @returns {Specification.AuthenticationPolicyBearer} The validated underlying object */ -function buildingFn(data: Specification.AuthenticationPolicyBearer): Specification.AuthenticationPolicyBearer { - const model = new Classes.AuthenticationPolicyBearer(data); - - validate('AuthenticationPolicyBearer', model); - return model as Specification.AuthenticationPolicyBearer; +function buildingFn(model: Specification.AuthenticationPolicyBearer): Specification.AuthenticationPolicyBearer { + const instance = new Classes.AuthenticationPolicyBearer(model); + validate('AuthenticationPolicyBearer', instance); + return instance as Specification.AuthenticationPolicyBearer; } /** * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyBearer` - * @returns {Specification.AuthenticationPolicyBearer} A builder for `Specification.AuthenticationPolicyBearer` + * @returns {Builder} A builder for `Specification.AuthenticationPolicyBearer` */ -export const authenticationPolicyBearerBuilder = (): Builder => - builder(buildingFn); +export const authenticationPolicyBearerBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/authentication-policy-builder.ts b/src/lib/generated/builders/authentication-policy-builder.ts index 060def72..461c053a 100644 --- a/src/lib/generated/builders/authentication-policy-builder.ts +++ b/src/lib/generated/builders/authentication-policy-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.AuthenticationPolicy} data The underlying object + * @param {Specification.AuthenticationPolicy} model The underlying object * @returns {Specification.AuthenticationPolicy} The validated underlying object */ -function buildingFn(data: Specification.AuthenticationPolicy): Specification.AuthenticationPolicy { - const model = new Classes.AuthenticationPolicy(data); - - validate('AuthenticationPolicy', model); - return model as Specification.AuthenticationPolicy; +function buildingFn(model: Specification.AuthenticationPolicy): Specification.AuthenticationPolicy { + const instance = new Classes.AuthenticationPolicy(model); + validate('AuthenticationPolicy', instance); + return instance as Specification.AuthenticationPolicy; } /** * A factory to create a builder proxy for the type `Specification.AuthenticationPolicy` - * @returns {Specification.AuthenticationPolicy} A builder for `Specification.AuthenticationPolicy` + * @returns {Builder} A builder for `Specification.AuthenticationPolicy` */ -export const authenticationPolicyBuilder = (): Builder => - builder(buildingFn); +export const authenticationPolicyBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/authentication-policy-oauth2-builder.ts b/src/lib/generated/builders/authentication-policy-oauth2-builder.ts index 77f8cce7..b9097dbb 100644 --- a/src/lib/generated/builders/authentication-policy-oauth2-builder.ts +++ b/src/lib/generated/builders/authentication-policy-oauth2-builder.ts @@ -21,19 +21,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.AuthenticationPolicyOauth2} data The underlying object + * @param {Specification.AuthenticationPolicyOauth2} model The underlying object * @returns {Specification.AuthenticationPolicyOauth2} The validated underlying object */ -function buildingFn(data: Specification.AuthenticationPolicyOauth2): Specification.AuthenticationPolicyOauth2 { - const model = new Classes.AuthenticationPolicyOauth2(data); - - validate('AuthenticationPolicyOauth2', model); - return model as Specification.AuthenticationPolicyOauth2; +function buildingFn(model: Specification.AuthenticationPolicyOauth2): Specification.AuthenticationPolicyOauth2 { + const instance = new Classes.AuthenticationPolicyOauth2(model); + validate('AuthenticationPolicyOauth2', instance); + return instance as Specification.AuthenticationPolicyOauth2; } /** * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyOauth2` - * @returns {Specification.AuthenticationPolicyOauth2} A builder for `Specification.AuthenticationPolicyOauth2` + * @returns {Builder} A builder for `Specification.AuthenticationPolicyOauth2` */ -export const authenticationPolicyOauth2Builder = (): Builder => - builder(buildingFn); +export const authenticationPolicyOauth2Builder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts b/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts index 68093472..9702d6fd 100644 --- a/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts +++ b/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts @@ -21,21 +21,22 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.AuthenticationPolicyOauth2Client} data The underlying object + * @param {Specification.AuthenticationPolicyOauth2Client} model The underlying object * @returns {Specification.AuthenticationPolicyOauth2Client} The validated underlying object */ function buildingFn( - data: Specification.AuthenticationPolicyOauth2Client, + model: Specification.AuthenticationPolicyOauth2Client, ): Specification.AuthenticationPolicyOauth2Client { - const model = new Classes.AuthenticationPolicyOauth2Client(data); - - validate('AuthenticationPolicyOauth2Client', model); - return model as Specification.AuthenticationPolicyOauth2Client; + const instance = new Classes.AuthenticationPolicyOauth2Client(model); + validate('AuthenticationPolicyOauth2Client', instance); + return instance as Specification.AuthenticationPolicyOauth2Client; } /** * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyOauth2Client` - * @returns {Specification.AuthenticationPolicyOauth2Client} A builder for `Specification.AuthenticationPolicyOauth2Client` + * @returns {Builder} A builder for `Specification.AuthenticationPolicyOauth2Client` */ -export const authenticationPolicyOauth2ClientBuilder = (): Builder => - builder(buildingFn); +export const authenticationPolicyOauth2ClientBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-async-api-builder.ts b/src/lib/generated/builders/call-async-api-builder.ts index 3d81a1a7..355bc5bc 100644 --- a/src/lib/generated/builders/call-async-api-builder.ts +++ b/src/lib/generated/builders/call-async-api-builder.ts @@ -21,19 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallAsyncAPI} data The underlying object + * @param {Specification.CallAsyncAPI} model The underlying object * @returns {Specification.CallAsyncAPI} The validated underlying object */ -function buildingFn(data: Specification.CallAsyncAPI): Specification.CallAsyncAPI { - const model = new Classes.CallAsyncAPI(data); - - validate('CallAsyncAPI', model); - return model as Specification.CallAsyncAPI; +function buildingFn(model: Specification.CallAsyncAPI): Specification.CallAsyncAPI { + const instance = new Classes.CallAsyncAPI(model); + validate('CallAsyncAPI', instance); + return instance as Specification.CallAsyncAPI; } /** * A factory to create a builder proxy for the type `Specification.CallAsyncAPI` - * @returns {Specification.CallAsyncAPI} A builder for `Specification.CallAsyncAPI` + * @returns {Builder} A builder for `Specification.CallAsyncAPI` */ -export const callAsyncAPIBuilder = (): Builder => - builder(buildingFn); +export const callAsyncAPIBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-async-api-with-authentication-builder.ts b/src/lib/generated/builders/call-async-api-with-authentication-builder.ts index 00db24ac..2e7c3f85 100644 --- a/src/lib/generated/builders/call-async-api-with-authentication-builder.ts +++ b/src/lib/generated/builders/call-async-api-with-authentication-builder.ts @@ -21,19 +21,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallAsyncAPIWithAuthentication} data The underlying object + * @param {Specification.CallAsyncAPIWithAuthentication} model The underlying object * @returns {Specification.CallAsyncAPIWithAuthentication} The validated underlying object */ -function buildingFn(data: Specification.CallAsyncAPIWithAuthentication): Specification.CallAsyncAPIWithAuthentication { - const model = new Classes.CallAsyncAPIWithAuthentication(data); - - validate('CallAsyncAPIWithAuthentication', model); - return model as Specification.CallAsyncAPIWithAuthentication; +function buildingFn(model: Specification.CallAsyncAPIWithAuthentication): Specification.CallAsyncAPIWithAuthentication { + const instance = new Classes.CallAsyncAPIWithAuthentication(model); + validate('CallAsyncAPIWithAuthentication', instance); + return instance as Specification.CallAsyncAPIWithAuthentication; } /** * A factory to create a builder proxy for the type `Specification.CallAsyncAPIWithAuthentication` - * @returns {Specification.CallAsyncAPIWithAuthentication} A builder for `Specification.CallAsyncAPIWithAuthentication` + * @returns {Builder} A builder for `Specification.CallAsyncAPIWithAuthentication` */ -export const callAsyncAPIWithAuthenticationBuilder = (): Builder => - builder(buildingFn); +export const callAsyncAPIWithAuthenticationBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-async-api-with-builder.ts b/src/lib/generated/builders/call-async-api-with-builder.ts index c6fbb305..bb97f837 100644 --- a/src/lib/generated/builders/call-async-api-with-builder.ts +++ b/src/lib/generated/builders/call-async-api-with-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallAsyncAPIWith} data The underlying object + * @param {Specification.CallAsyncAPIWith} model The underlying object * @returns {Specification.CallAsyncAPIWith} The validated underlying object */ -function buildingFn(data: Specification.CallAsyncAPIWith): Specification.CallAsyncAPIWith { - const model = new Classes.CallAsyncAPIWith(data); - - validate('CallAsyncAPIWith', model); - return model as Specification.CallAsyncAPIWith; +function buildingFn(model: Specification.CallAsyncAPIWith): Specification.CallAsyncAPIWith { + const instance = new Classes.CallAsyncAPIWith(model); + validate('CallAsyncAPIWith', instance); + return instance as Specification.CallAsyncAPIWith; } /** * A factory to create a builder proxy for the type `Specification.CallAsyncAPIWith` - * @returns {Specification.CallAsyncAPIWith} A builder for `Specification.CallAsyncAPIWith` + * @returns {Builder} A builder for `Specification.CallAsyncAPIWith` */ -export const callAsyncAPIWithBuilder = (): Builder => - builder(buildingFn); +export const callAsyncAPIWithBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-function-builder.ts b/src/lib/generated/builders/call-function-builder.ts index 92a092ab..f66a7147 100644 --- a/src/lib/generated/builders/call-function-builder.ts +++ b/src/lib/generated/builders/call-function-builder.ts @@ -21,19 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallFunction} data The underlying object + * @param {Specification.CallFunction} model The underlying object * @returns {Specification.CallFunction} The validated underlying object */ -function buildingFn(data: Specification.CallFunction): Specification.CallFunction { - const model = new Classes.CallFunction(data); - - validate('CallFunction', model); - return model as Specification.CallFunction; +function buildingFn(model: Specification.CallFunction): Specification.CallFunction { + const instance = new Classes.CallFunction(model); + validate('CallFunction', instance); + return instance as Specification.CallFunction; } /** * A factory to create a builder proxy for the type `Specification.CallFunction` - * @returns {Specification.CallFunction} A builder for `Specification.CallFunction` + * @returns {Builder} A builder for `Specification.CallFunction` */ -export const callFunctionBuilder = (): Builder => - builder(buildingFn); +export const callFunctionBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-function-with-builder.ts b/src/lib/generated/builders/call-function-with-builder.ts index 4321a867..6a27d63d 100644 --- a/src/lib/generated/builders/call-function-with-builder.ts +++ b/src/lib/generated/builders/call-function-with-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallFunctionWith} data The underlying object + * @param {Specification.CallFunctionWith} model The underlying object * @returns {Specification.CallFunctionWith} The validated underlying object */ -function buildingFn(data: Specification.CallFunctionWith): Specification.CallFunctionWith { - const model = new Classes.CallFunctionWith(data); - - validate('CallFunctionWith', model); - return model as Specification.CallFunctionWith; +function buildingFn(model: Specification.CallFunctionWith): Specification.CallFunctionWith { + const instance = new Classes.CallFunctionWith(model); + validate('CallFunctionWith', instance); + return instance as Specification.CallFunctionWith; } /** * A factory to create a builder proxy for the type `Specification.CallFunctionWith` - * @returns {Specification.CallFunctionWith} A builder for `Specification.CallFunctionWith` + * @returns {Builder} A builder for `Specification.CallFunctionWith` */ -export const callFunctionWithBuilder = (): Builder => - builder(buildingFn); +export const callFunctionWithBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-grpc-builder.ts b/src/lib/generated/builders/call-grpc-builder.ts index 6cbc31e9..79e79bf1 100644 --- a/src/lib/generated/builders/call-grpc-builder.ts +++ b/src/lib/generated/builders/call-grpc-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallGRPC} data The underlying object + * @param {Specification.CallGRPC} model The underlying object * @returns {Specification.CallGRPC} The validated underlying object */ -function buildingFn(data: Specification.CallGRPC): Specification.CallGRPC { - const model = new Classes.CallGRPC(data); - - validate('CallGRPC', model); - return model as Specification.CallGRPC; +function buildingFn(model: Specification.CallGRPC): Specification.CallGRPC { + const instance = new Classes.CallGRPC(model); + validate('CallGRPC', instance); + return instance as Specification.CallGRPC; } /** * A factory to create a builder proxy for the type `Specification.CallGRPC` - * @returns {Specification.CallGRPC} A builder for `Specification.CallGRPC` + * @returns {Builder} A builder for `Specification.CallGRPC` */ -export const callGRPCBuilder = (): Builder => builder(buildingFn); +export const callGRPCBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-grpc-with-arguments-builder.ts b/src/lib/generated/builders/call-grpc-with-arguments-builder.ts index dabc72df..482841e2 100644 --- a/src/lib/generated/builders/call-grpc-with-arguments-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-arguments-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallGRPCWithArguments} data The underlying object + * @param {Specification.CallGRPCWithArguments} model The underlying object * @returns {Specification.CallGRPCWithArguments} The validated underlying object */ -function buildingFn(data: Specification.CallGRPCWithArguments): Specification.CallGRPCWithArguments { - const model = new Classes.CallGRPCWithArguments(data); - - validate('CallGRPCWithArguments', model); - return model as Specification.CallGRPCWithArguments; +function buildingFn(model: Specification.CallGRPCWithArguments): Specification.CallGRPCWithArguments { + const instance = new Classes.CallGRPCWithArguments(model); + validate('CallGRPCWithArguments', instance); + return instance as Specification.CallGRPCWithArguments; } /** * A factory to create a builder proxy for the type `Specification.CallGRPCWithArguments` - * @returns {Specification.CallGRPCWithArguments} A builder for `Specification.CallGRPCWithArguments` + * @returns {Builder} A builder for `Specification.CallGRPCWithArguments` */ -export const callGRPCWithArgumentsBuilder = (): Builder => - builder(buildingFn); +export const callGRPCWithArgumentsBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-grpc-with-builder.ts b/src/lib/generated/builders/call-grpc-with-builder.ts index dc71705c..73ffedcc 100644 --- a/src/lib/generated/builders/call-grpc-with-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-builder.ts @@ -21,19 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallGRPCWith} data The underlying object + * @param {Specification.CallGRPCWith} model The underlying object * @returns {Specification.CallGRPCWith} The validated underlying object */ -function buildingFn(data: Specification.CallGRPCWith): Specification.CallGRPCWith { - const model = new Classes.CallGRPCWith(data); - - validate('CallGRPCWith', model); - return model as Specification.CallGRPCWith; +function buildingFn(model: Specification.CallGRPCWith): Specification.CallGRPCWith { + const instance = new Classes.CallGRPCWith(model); + validate('CallGRPCWith', instance); + return instance as Specification.CallGRPCWith; } /** * A factory to create a builder proxy for the type `Specification.CallGRPCWith` - * @returns {Specification.CallGRPCWith} A builder for `Specification.CallGRPCWith` + * @returns {Builder} A builder for `Specification.CallGRPCWith` */ -export const callGRPCWithBuilder = (): Builder => - builder(buildingFn); +export const callGRPCWithBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts b/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts index b85c544a..f6b4b156 100644 --- a/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts @@ -21,21 +21,22 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallGRPCWithServiceAuthentication} data The underlying object + * @param {Specification.CallGRPCWithServiceAuthentication} model The underlying object * @returns {Specification.CallGRPCWithServiceAuthentication} The validated underlying object */ function buildingFn( - data: Specification.CallGRPCWithServiceAuthentication, + model: Specification.CallGRPCWithServiceAuthentication, ): Specification.CallGRPCWithServiceAuthentication { - const model = new Classes.CallGRPCWithServiceAuthentication(data); - - validate('CallGRPCWithServiceAuthentication', model); - return model as Specification.CallGRPCWithServiceAuthentication; + const instance = new Classes.CallGRPCWithServiceAuthentication(model); + validate('CallGRPCWithServiceAuthentication', instance); + return instance as Specification.CallGRPCWithServiceAuthentication; } /** * A factory to create a builder proxy for the type `Specification.CallGRPCWithServiceAuthentication` - * @returns {Specification.CallGRPCWithServiceAuthentication} A builder for `Specification.CallGRPCWithServiceAuthentication` + * @returns {Builder} A builder for `Specification.CallGRPCWithServiceAuthentication` */ -export const callGRPCWithServiceAuthenticationBuilder = (): Builder => - builder(buildingFn); +export const callGRPCWithServiceAuthenticationBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-grpc-with-service-builder.ts b/src/lib/generated/builders/call-grpc-with-service-builder.ts index ed9f20c2..be2e48de 100644 --- a/src/lib/generated/builders/call-grpc-with-service-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-service-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallGRPCWithService} data The underlying object + * @param {Specification.CallGRPCWithService} model The underlying object * @returns {Specification.CallGRPCWithService} The validated underlying object */ -function buildingFn(data: Specification.CallGRPCWithService): Specification.CallGRPCWithService { - const model = new Classes.CallGRPCWithService(data); - - validate('CallGRPCWithService', model); - return model as Specification.CallGRPCWithService; +function buildingFn(model: Specification.CallGRPCWithService): Specification.CallGRPCWithService { + const instance = new Classes.CallGRPCWithService(model); + validate('CallGRPCWithService', instance); + return instance as Specification.CallGRPCWithService; } /** * A factory to create a builder proxy for the type `Specification.CallGRPCWithService` - * @returns {Specification.CallGRPCWithService} A builder for `Specification.CallGRPCWithService` + * @returns {Builder} A builder for `Specification.CallGRPCWithService` */ -export const callGRPCWithServiceBuilder = (): Builder => - builder(buildingFn); +export const callGRPCWithServiceBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-http-builder.ts b/src/lib/generated/builders/call-http-builder.ts index 1a078b70..22c1f5af 100644 --- a/src/lib/generated/builders/call-http-builder.ts +++ b/src/lib/generated/builders/call-http-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallHTTP} data The underlying object + * @param {Specification.CallHTTP} model The underlying object * @returns {Specification.CallHTTP} The validated underlying object */ -function buildingFn(data: Specification.CallHTTP): Specification.CallHTTP { - const model = new Classes.CallHTTP(data); - - validate('CallHTTP', model); - return model as Specification.CallHTTP; +function buildingFn(model: Specification.CallHTTP): Specification.CallHTTP { + const instance = new Classes.CallHTTP(model); + validate('CallHTTP', instance); + return instance as Specification.CallHTTP; } /** * A factory to create a builder proxy for the type `Specification.CallHTTP` - * @returns {Specification.CallHTTP} A builder for `Specification.CallHTTP` + * @returns {Builder} A builder for `Specification.CallHTTP` */ -export const callHTTPBuilder = (): Builder => builder(buildingFn); +export const callHTTPBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-http-with-builder.ts b/src/lib/generated/builders/call-http-with-builder.ts index 3c62cc2b..cb6fdef1 100644 --- a/src/lib/generated/builders/call-http-with-builder.ts +++ b/src/lib/generated/builders/call-http-with-builder.ts @@ -21,19 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallHTTPWith} data The underlying object + * @param {Specification.CallHTTPWith} model The underlying object * @returns {Specification.CallHTTPWith} The validated underlying object */ -function buildingFn(data: Specification.CallHTTPWith): Specification.CallHTTPWith { - const model = new Classes.CallHTTPWith(data); - - validate('CallHTTPWith', model); - return model as Specification.CallHTTPWith; +function buildingFn(model: Specification.CallHTTPWith): Specification.CallHTTPWith { + const instance = new Classes.CallHTTPWith(model); + validate('CallHTTPWith', instance); + return instance as Specification.CallHTTPWith; } /** * A factory to create a builder proxy for the type `Specification.CallHTTPWith` - * @returns {Specification.CallHTTPWith} A builder for `Specification.CallHTTPWith` + * @returns {Builder} A builder for `Specification.CallHTTPWith` */ -export const callHTTPWithBuilder = (): Builder => - builder(buildingFn); +export const callHTTPWithBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-http-with-endpoint-builder.ts b/src/lib/generated/builders/call-http-with-endpoint-builder.ts index c80a5b83..e88921fa 100644 --- a/src/lib/generated/builders/call-http-with-endpoint-builder.ts +++ b/src/lib/generated/builders/call-http-with-endpoint-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallHTTPWithEndpoint} data The underlying object + * @param {Specification.CallHTTPWithEndpoint} model The underlying object * @returns {Specification.CallHTTPWithEndpoint} The validated underlying object */ -function buildingFn(data: Specification.CallHTTPWithEndpoint): Specification.CallHTTPWithEndpoint { - const model = new Classes.CallHTTPWithEndpoint(data); - - validate('CallHTTPWithEndpoint', model); - return model as Specification.CallHTTPWithEndpoint; +function buildingFn(model: Specification.CallHTTPWithEndpoint): Specification.CallHTTPWithEndpoint { + const instance = new Classes.CallHTTPWithEndpoint(model); + validate('CallHTTPWithEndpoint', instance); + return instance as Specification.CallHTTPWithEndpoint; } /** * A factory to create a builder proxy for the type `Specification.CallHTTPWithEndpoint` - * @returns {Specification.CallHTTPWithEndpoint} A builder for `Specification.CallHTTPWithEndpoint` + * @returns {Builder} A builder for `Specification.CallHTTPWithEndpoint` */ -export const callHTTPWithEndpointBuilder = (): Builder => - builder(buildingFn); +export const callHTTPWithEndpointBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-open-api-builder.ts b/src/lib/generated/builders/call-open-api-builder.ts index e25ac67c..8e7db01c 100644 --- a/src/lib/generated/builders/call-open-api-builder.ts +++ b/src/lib/generated/builders/call-open-api-builder.ts @@ -21,19 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallOpenAPI} data The underlying object + * @param {Specification.CallOpenAPI} model The underlying object * @returns {Specification.CallOpenAPI} The validated underlying object */ -function buildingFn(data: Specification.CallOpenAPI): Specification.CallOpenAPI { - const model = new Classes.CallOpenAPI(data); - - validate('CallOpenAPI', model); - return model as Specification.CallOpenAPI; +function buildingFn(model: Specification.CallOpenAPI): Specification.CallOpenAPI { + const instance = new Classes.CallOpenAPI(model); + validate('CallOpenAPI', instance); + return instance as Specification.CallOpenAPI; } /** * A factory to create a builder proxy for the type `Specification.CallOpenAPI` - * @returns {Specification.CallOpenAPI} A builder for `Specification.CallOpenAPI` + * @returns {Builder} A builder for `Specification.CallOpenAPI` */ -export const callOpenAPIBuilder = (): Builder => - builder(buildingFn); +export const callOpenAPIBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-open-api-with-authentication-builder.ts b/src/lib/generated/builders/call-open-api-with-authentication-builder.ts index ab2eac1b..795137c5 100644 --- a/src/lib/generated/builders/call-open-api-with-authentication-builder.ts +++ b/src/lib/generated/builders/call-open-api-with-authentication-builder.ts @@ -21,19 +21,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallOpenAPIWithAuthentication} data The underlying object + * @param {Specification.CallOpenAPIWithAuthentication} model The underlying object * @returns {Specification.CallOpenAPIWithAuthentication} The validated underlying object */ -function buildingFn(data: Specification.CallOpenAPIWithAuthentication): Specification.CallOpenAPIWithAuthentication { - const model = new Classes.CallOpenAPIWithAuthentication(data); - - validate('CallOpenAPIWithAuthentication', model); - return model as Specification.CallOpenAPIWithAuthentication; +function buildingFn(model: Specification.CallOpenAPIWithAuthentication): Specification.CallOpenAPIWithAuthentication { + const instance = new Classes.CallOpenAPIWithAuthentication(model); + validate('CallOpenAPIWithAuthentication', instance); + return instance as Specification.CallOpenAPIWithAuthentication; } /** * A factory to create a builder proxy for the type `Specification.CallOpenAPIWithAuthentication` - * @returns {Specification.CallOpenAPIWithAuthentication} A builder for `Specification.CallOpenAPIWithAuthentication` + * @returns {Builder} A builder for `Specification.CallOpenAPIWithAuthentication` */ -export const callOpenAPIWithAuthenticationBuilder = (): Builder => - builder(buildingFn); +export const callOpenAPIWithAuthenticationBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-open-api-with-builder.ts b/src/lib/generated/builders/call-open-api-with-builder.ts index 3e6ded0b..83b369ed 100644 --- a/src/lib/generated/builders/call-open-api-with-builder.ts +++ b/src/lib/generated/builders/call-open-api-with-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallOpenAPIWith} data The underlying object + * @param {Specification.CallOpenAPIWith} model The underlying object * @returns {Specification.CallOpenAPIWith} The validated underlying object */ -function buildingFn(data: Specification.CallOpenAPIWith): Specification.CallOpenAPIWith { - const model = new Classes.CallOpenAPIWith(data); - - validate('CallOpenAPIWith', model); - return model as Specification.CallOpenAPIWith; +function buildingFn(model: Specification.CallOpenAPIWith): Specification.CallOpenAPIWith { + const instance = new Classes.CallOpenAPIWith(model); + validate('CallOpenAPIWith', instance); + return instance as Specification.CallOpenAPIWith; } /** * A factory to create a builder proxy for the type `Specification.CallOpenAPIWith` - * @returns {Specification.CallOpenAPIWith} A builder for `Specification.CallOpenAPIWith` + * @returns {Builder} A builder for `Specification.CallOpenAPIWith` */ -export const callOpenAPIWithBuilder = (): Builder => - builder(buildingFn); +export const callOpenAPIWithBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-open-api-with-parameters-builder.ts b/src/lib/generated/builders/call-open-api-with-parameters-builder.ts index 4e4ca3f7..ae98a28b 100644 --- a/src/lib/generated/builders/call-open-api-with-parameters-builder.ts +++ b/src/lib/generated/builders/call-open-api-with-parameters-builder.ts @@ -21,19 +21,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallOpenAPIWithParameters} data The underlying object + * @param {Specification.CallOpenAPIWithParameters} model The underlying object * @returns {Specification.CallOpenAPIWithParameters} The validated underlying object */ -function buildingFn(data: Specification.CallOpenAPIWithParameters): Specification.CallOpenAPIWithParameters { - const model = new Classes.CallOpenAPIWithParameters(data); - - validate('CallOpenAPIWithParameters', model); - return model as Specification.CallOpenAPIWithParameters; +function buildingFn(model: Specification.CallOpenAPIWithParameters): Specification.CallOpenAPIWithParameters { + const instance = new Classes.CallOpenAPIWithParameters(model); + validate('CallOpenAPIWithParameters', instance); + return instance as Specification.CallOpenAPIWithParameters; } /** * A factory to create a builder proxy for the type `Specification.CallOpenAPIWithParameters` - * @returns {Specification.CallOpenAPIWithParameters} A builder for `Specification.CallOpenAPIWithParameters` + * @returns {Builder} A builder for `Specification.CallOpenAPIWithParameters` */ -export const callOpenAPIWithParametersBuilder = (): Builder => - builder(buildingFn); +export const callOpenAPIWithParametersBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-task-builder.ts b/src/lib/generated/builders/call-task-builder.ts index e100ecbb..4f8a7ef9 100644 --- a/src/lib/generated/builders/call-task-builder.ts +++ b/src/lib/generated/builders/call-task-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallTask} data The underlying object + * @param {Specification.CallTask} model The underlying object * @returns {Specification.CallTask} The validated underlying object */ -function buildingFn(data: Specification.CallTask): Specification.CallTask { - const model = new Classes.CallTask(data); - - validate('CallTask', model); - return model as Specification.CallTask; +function buildingFn(model: Specification.CallTask): Specification.CallTask { + const instance = new Classes.CallTask(model); + validate('CallTask', instance); + return instance as Specification.CallTask; } /** * A factory to create a builder proxy for the type `Specification.CallTask` - * @returns {Specification.CallTask} A builder for `Specification.CallTask` + * @returns {Builder} A builder for `Specification.CallTask` */ -export const callTaskBuilder = (): Builder => builder(buildingFn); +export const callTaskBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/do-task-builder.ts b/src/lib/generated/builders/do-task-builder.ts index 803459bc..0a9d1f58 100644 --- a/src/lib/generated/builders/do-task-builder.ts +++ b/src/lib/generated/builders/do-task-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.DoTask} data The underlying object + * @param {Specification.DoTask} model The underlying object * @returns {Specification.DoTask} The validated underlying object */ -function buildingFn(data: Specification.DoTask): Specification.DoTask { - const model = new Classes.DoTask(data); - - validate('DoTask', model); - return model as Specification.DoTask; +function buildingFn(model: Specification.DoTask): Specification.DoTask { + const instance = new Classes.DoTask(model); + validate('DoTask', instance); + return instance as Specification.DoTask; } /** * A factory to create a builder proxy for the type `Specification.DoTask` - * @returns {Specification.DoTask} A builder for `Specification.DoTask` + * @returns {Builder} A builder for `Specification.DoTask` */ -export const doTaskBuilder = (): Builder => builder(buildingFn); +export const doTaskBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/document-builder.ts b/src/lib/generated/builders/document-builder.ts index b3ffdf92..ca3d7d4e 100644 --- a/src/lib/generated/builders/document-builder.ts +++ b/src/lib/generated/builders/document-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Document} data The underlying object + * @param {Specification.Document} model The underlying object * @returns {Specification.Document} The validated underlying object */ -function buildingFn(data: Specification.Document): Specification.Document { - const model = new Classes.Document(data); - - validate('Document', model); - return model as Specification.Document; +function buildingFn(model: Specification.Document): Specification.Document { + const instance = new Classes.Document(model); + validate('Document', instance); + return instance as Specification.Document; } /** * A factory to create a builder proxy for the type `Specification.Document` - * @returns {Specification.Document} A builder for `Specification.Document` + * @returns {Builder} A builder for `Specification.Document` */ -export const documentBuilder = (): Builder => builder(buildingFn); +export const documentBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/document-tags-builder.ts b/src/lib/generated/builders/document-tags-builder.ts index 048d52ca..b5d37541 100644 --- a/src/lib/generated/builders/document-tags-builder.ts +++ b/src/lib/generated/builders/document-tags-builder.ts @@ -21,19 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.DocumentTags} data The underlying object + * @param {Specification.DocumentTags} model The underlying object * @returns {Specification.DocumentTags} The validated underlying object */ -function buildingFn(data: Specification.DocumentTags): Specification.DocumentTags { - const model = new Classes.DocumentTags(data); - - validate('DocumentTags', model); - return model as Specification.DocumentTags; +function buildingFn(model: Specification.DocumentTags): Specification.DocumentTags { + const instance = new Classes.DocumentTags(model); + validate('DocumentTags', instance); + return instance as Specification.DocumentTags; } /** * A factory to create a builder proxy for the type `Specification.DocumentTags` - * @returns {Specification.DocumentTags} A builder for `Specification.DocumentTags` + * @returns {Builder} A builder for `Specification.DocumentTags` */ -export const documentTagsBuilder = (): Builder => - builder(buildingFn); +export const documentTagsBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/duration-builder.ts b/src/lib/generated/builders/duration-builder.ts index df944274..bf080b99 100644 --- a/src/lib/generated/builders/duration-builder.ts +++ b/src/lib/generated/builders/duration-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Duration} data The underlying object + * @param {Specification.Duration} model The underlying object * @returns {Specification.Duration} The validated underlying object */ -function buildingFn(data: Specification.Duration): Specification.Duration { - const model = new Classes.Duration(data); - - validate('Duration', model); - return model as Specification.Duration; +function buildingFn(model: Specification.Duration): Specification.Duration { + const instance = new Classes.Duration(model); + validate('Duration', instance); + return instance as Specification.Duration; } /** * A factory to create a builder proxy for the type `Specification.Duration` - * @returns {Specification.Duration} A builder for `Specification.Duration` + * @returns {Builder} A builder for `Specification.Duration` */ -export const durationBuilder = (): Builder => builder(buildingFn); +export const durationBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/emit-task-builder.ts b/src/lib/generated/builders/emit-task-builder.ts index b313c560..a1f83061 100644 --- a/src/lib/generated/builders/emit-task-builder.ts +++ b/src/lib/generated/builders/emit-task-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EmitTask} data The underlying object + * @param {Specification.EmitTask} model The underlying object * @returns {Specification.EmitTask} The validated underlying object */ -function buildingFn(data: Specification.EmitTask): Specification.EmitTask { - const model = new Classes.EmitTask(data); - - validate('EmitTask', model); - return model as Specification.EmitTask; +function buildingFn(model: Specification.EmitTask): Specification.EmitTask { + const instance = new Classes.EmitTask(model); + validate('EmitTask', instance); + return instance as Specification.EmitTask; } /** * A factory to create a builder proxy for the type `Specification.EmitTask` - * @returns {Specification.EmitTask} A builder for `Specification.EmitTask` + * @returns {Builder} A builder for `Specification.EmitTask` */ -export const emitTaskBuilder = (): Builder => builder(buildingFn); +export const emitTaskBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/emit-task-emit-builder.ts b/src/lib/generated/builders/emit-task-emit-builder.ts index e2a584e2..afcc82ad 100644 --- a/src/lib/generated/builders/emit-task-emit-builder.ts +++ b/src/lib/generated/builders/emit-task-emit-builder.ts @@ -21,19 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EmitTaskEmit} data The underlying object + * @param {Specification.EmitTaskEmit} model The underlying object * @returns {Specification.EmitTaskEmit} The validated underlying object */ -function buildingFn(data: Specification.EmitTaskEmit): Specification.EmitTaskEmit { - const model = new Classes.EmitTaskEmit(data); - - validate('EmitTaskEmit', model); - return model as Specification.EmitTaskEmit; +function buildingFn(model: Specification.EmitTaskEmit): Specification.EmitTaskEmit { + const instance = new Classes.EmitTaskEmit(model); + validate('EmitTaskEmit', instance); + return instance as Specification.EmitTaskEmit; } /** * A factory to create a builder proxy for the type `Specification.EmitTaskEmit` - * @returns {Specification.EmitTaskEmit} A builder for `Specification.EmitTaskEmit` + * @returns {Builder} A builder for `Specification.EmitTaskEmit` */ -export const emitTaskEmitBuilder = (): Builder => - builder(buildingFn); +export const emitTaskEmitBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/emit-task-emit-event-builder.ts b/src/lib/generated/builders/emit-task-emit-event-builder.ts index 6b8046f0..42362330 100644 --- a/src/lib/generated/builders/emit-task-emit-event-builder.ts +++ b/src/lib/generated/builders/emit-task-emit-event-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EmitTaskEmitEvent} data The underlying object + * @param {Specification.EmitTaskEmitEvent} model The underlying object * @returns {Specification.EmitTaskEmitEvent} The validated underlying object */ -function buildingFn(data: Specification.EmitTaskEmitEvent): Specification.EmitTaskEmitEvent { - const model = new Classes.EmitTaskEmitEvent(data); - - validate('EmitTaskEmitEvent', model); - return model as Specification.EmitTaskEmitEvent; +function buildingFn(model: Specification.EmitTaskEmitEvent): Specification.EmitTaskEmitEvent { + const instance = new Classes.EmitTaskEmitEvent(model); + validate('EmitTaskEmitEvent', instance); + return instance as Specification.EmitTaskEmitEvent; } /** * A factory to create a builder proxy for the type `Specification.EmitTaskEmitEvent` - * @returns {Specification.EmitTaskEmitEvent} A builder for `Specification.EmitTaskEmitEvent` + * @returns {Builder} A builder for `Specification.EmitTaskEmitEvent` */ -export const emitTaskEmitEventBuilder = (): Builder => - builder(buildingFn); +export const emitTaskEmitEventBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/endpoint-authentication-builder.ts b/src/lib/generated/builders/endpoint-authentication-builder.ts index 30e8d021..cf9a29cb 100644 --- a/src/lib/generated/builders/endpoint-authentication-builder.ts +++ b/src/lib/generated/builders/endpoint-authentication-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EndpointAuthentication} data The underlying object + * @param {Specification.EndpointAuthentication} model The underlying object * @returns {Specification.EndpointAuthentication} The validated underlying object */ -function buildingFn(data: Specification.EndpointAuthentication): Specification.EndpointAuthentication { - const model = new Classes.EndpointAuthentication(data); - - validate('EndpointAuthentication', model); - return model as Specification.EndpointAuthentication; +function buildingFn(model: Specification.EndpointAuthentication): Specification.EndpointAuthentication { + const instance = new Classes.EndpointAuthentication(model); + validate('EndpointAuthentication', instance); + return instance as Specification.EndpointAuthentication; } /** * A factory to create a builder proxy for the type `Specification.EndpointAuthentication` - * @returns {Specification.EndpointAuthentication} A builder for `Specification.EndpointAuthentication` + * @returns {Builder} A builder for `Specification.EndpointAuthentication` */ -export const endpointAuthenticationBuilder = (): Builder => - builder(buildingFn); +export const endpointAuthenticationBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/endpoint-builder.ts b/src/lib/generated/builders/endpoint-builder.ts index 5106e3a1..687142eb 100644 --- a/src/lib/generated/builders/endpoint-builder.ts +++ b/src/lib/generated/builders/endpoint-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Endpoint} data The underlying object + * @param {Specification.Endpoint} model The underlying object * @returns {Specification.Endpoint} The validated underlying object */ -function buildingFn(data: Specification.Endpoint): Specification.Endpoint { - const model = new Classes.Endpoint(data); - - validate('Endpoint', model); - return model as Specification.Endpoint; +function buildingFn(model: Specification.Endpoint): Specification.Endpoint { + const instance = new Classes.Endpoint(model); + validate('Endpoint', instance); + return instance as Specification.Endpoint; } /** * A factory to create a builder proxy for the type `Specification.Endpoint` - * @returns {Specification.Endpoint} A builder for `Specification.Endpoint` + * @returns {Builder} A builder for `Specification.Endpoint` */ -export const endpointBuilder = (): Builder => builder(buildingFn); +export const endpointBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/error-builder.ts b/src/lib/generated/builders/error-builder.ts index 9032b0a3..642678f4 100644 --- a/src/lib/generated/builders/error-builder.ts +++ b/src/lib/generated/builders/error-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Error} data The underlying object + * @param {Specification.Error} model The underlying object * @returns {Specification.Error} The validated underlying object */ -function buildingFn(data: Specification.Error): Specification.Error { - const model = new Classes.Error(data); - - validate('Error', model); - return model as Specification.Error; +function buildingFn(model: Specification.Error): Specification.Error { + const instance = new Classes.Error(model); + validate('Error', instance); + return instance as Specification.Error; } /** * A factory to create a builder proxy for the type `Specification.Error` - * @returns {Specification.Error} A builder for `Specification.Error` + * @returns {Builder} A builder for `Specification.Error` */ -export const errorBuilder = (): Builder => builder(buildingFn); +export const errorBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/event-consumption-strategy-all-builder.ts b/src/lib/generated/builders/event-consumption-strategy-all-builder.ts index 90006ada..ecec3dc1 100644 --- a/src/lib/generated/builders/event-consumption-strategy-all-builder.ts +++ b/src/lib/generated/builders/event-consumption-strategy-all-builder.ts @@ -14,26 +14,26 @@ * limitations under the License. */ -import { builder, Builder } from '../../builder'; +import { arrayBuilder, ArrayBuilder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EventConsumptionStrategyAll} data The underlying object - * @returns {Specification.EventConsumptionStrategyAll} The validated underlying object + * The internal function used by the builder proxy to validate and return its underlying array + * @param {Specification.EventConsumptionStrategyAll} model The underlying array + * @returns {Specification.EventConsumptionStrategyAll} The validated underlying array */ -function buildingFn(data: Specification.EventConsumptionStrategyAll): Specification.EventConsumptionStrategyAll { - const model = new Classes.EventConsumptionStrategyAll(data); - - validate('EventConsumptionStrategyAll', model); - return model as Specification.EventConsumptionStrategyAll; +function buildingFn(model: Specification.EventConsumptionStrategyAll): Specification.EventConsumptionStrategyAll { + const instance = new Classes.EventConsumptionStrategyAll(model); + validate('EventConsumptionStrategyAll', instance); + return instance as Specification.EventConsumptionStrategyAll; } /** * A factory to create a builder proxy for the type `Specification.EventConsumptionStrategyAll` - * @returns {Specification.EventConsumptionStrategyAll} A builder for `Specification.EventConsumptionStrategyAll` + * @returns {ArrayBuilder} A builder for `Specification.EventConsumptionStrategyAll` */ -export const eventConsumptionStrategyAllBuilder = (): Builder => - builder(buildingFn); +export const eventConsumptionStrategyAllBuilder = ( + model?: Specification.EventConsumptionStrategyAll, +): ArrayBuilder => arrayBuilder(model, buildingFn); diff --git a/src/lib/generated/builders/event-consumption-strategy-any-builder.ts b/src/lib/generated/builders/event-consumption-strategy-any-builder.ts index 77122961..4b42163d 100644 --- a/src/lib/generated/builders/event-consumption-strategy-any-builder.ts +++ b/src/lib/generated/builders/event-consumption-strategy-any-builder.ts @@ -14,26 +14,26 @@ * limitations under the License. */ -import { builder, Builder } from '../../builder'; +import { arrayBuilder, ArrayBuilder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EventConsumptionStrategyAny} data The underlying object - * @returns {Specification.EventConsumptionStrategyAny} The validated underlying object + * The internal function used by the builder proxy to validate and return its underlying array + * @param {Specification.EventConsumptionStrategyAny} model The underlying array + * @returns {Specification.EventConsumptionStrategyAny} The validated underlying array */ -function buildingFn(data: Specification.EventConsumptionStrategyAny): Specification.EventConsumptionStrategyAny { - const model = new Classes.EventConsumptionStrategyAny(data); - - validate('EventConsumptionStrategyAny', model); - return model as Specification.EventConsumptionStrategyAny; +function buildingFn(model: Specification.EventConsumptionStrategyAny): Specification.EventConsumptionStrategyAny { + const instance = new Classes.EventConsumptionStrategyAny(model); + validate('EventConsumptionStrategyAny', instance); + return instance as Specification.EventConsumptionStrategyAny; } /** * A factory to create a builder proxy for the type `Specification.EventConsumptionStrategyAny` - * @returns {Specification.EventConsumptionStrategyAny} A builder for `Specification.EventConsumptionStrategyAny` + * @returns {ArrayBuilder} A builder for `Specification.EventConsumptionStrategyAny` */ -export const eventConsumptionStrategyAnyBuilder = (): Builder => - builder(buildingFn); +export const eventConsumptionStrategyAnyBuilder = ( + model?: Specification.EventConsumptionStrategyAny, +): ArrayBuilder => arrayBuilder(model, buildingFn); diff --git a/src/lib/generated/builders/event-consumption-strategy-builder.ts b/src/lib/generated/builders/event-consumption-strategy-builder.ts index af5d0715..410bc6e4 100644 --- a/src/lib/generated/builders/event-consumption-strategy-builder.ts +++ b/src/lib/generated/builders/event-consumption-strategy-builder.ts @@ -21,19 +21,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EventConsumptionStrategy} data The underlying object + * @param {Specification.EventConsumptionStrategy} model The underlying object * @returns {Specification.EventConsumptionStrategy} The validated underlying object */ -function buildingFn(data: Specification.EventConsumptionStrategy): Specification.EventConsumptionStrategy { - const model = new Classes.EventConsumptionStrategy(data); - - validate('EventConsumptionStrategy', model); - return model as Specification.EventConsumptionStrategy; +function buildingFn(model: Specification.EventConsumptionStrategy): Specification.EventConsumptionStrategy { + const instance = new Classes.EventConsumptionStrategy(model); + validate('EventConsumptionStrategy', instance); + return instance as Specification.EventConsumptionStrategy; } /** * A factory to create a builder proxy for the type `Specification.EventConsumptionStrategy` - * @returns {Specification.EventConsumptionStrategy} A builder for `Specification.EventConsumptionStrategy` + * @returns {Builder} A builder for `Specification.EventConsumptionStrategy` */ -export const eventConsumptionStrategyBuilder = (): Builder => - builder(buildingFn); +export const eventConsumptionStrategyBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/event-filter-builder.ts b/src/lib/generated/builders/event-filter-builder.ts index 5d100845..2a3cdc82 100644 --- a/src/lib/generated/builders/event-filter-builder.ts +++ b/src/lib/generated/builders/event-filter-builder.ts @@ -21,19 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EventFilter} data The underlying object + * @param {Specification.EventFilter} model The underlying object * @returns {Specification.EventFilter} The validated underlying object */ -function buildingFn(data: Specification.EventFilter): Specification.EventFilter { - const model = new Classes.EventFilter(data); - - validate('EventFilter', model); - return model as Specification.EventFilter; +function buildingFn(model: Specification.EventFilter): Specification.EventFilter { + const instance = new Classes.EventFilter(model); + validate('EventFilter', instance); + return instance as Specification.EventFilter; } /** * A factory to create a builder proxy for the type `Specification.EventFilter` - * @returns {Specification.EventFilter} A builder for `Specification.EventFilter` + * @returns {Builder} A builder for `Specification.EventFilter` */ -export const eventFilterBuilder = (): Builder => - builder(buildingFn); +export const eventFilterBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/event-filter-correlate-builder.ts b/src/lib/generated/builders/event-filter-correlate-builder.ts index 8f83cbfb..d243aa67 100644 --- a/src/lib/generated/builders/event-filter-correlate-builder.ts +++ b/src/lib/generated/builders/event-filter-correlate-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EventFilterCorrelate} data The underlying object + * @param {Specification.EventFilterCorrelate} model The underlying object * @returns {Specification.EventFilterCorrelate} The validated underlying object */ -function buildingFn(data: Specification.EventFilterCorrelate): Specification.EventFilterCorrelate { - const model = new Classes.EventFilterCorrelate(data); - - validate('EventFilterCorrelate', model); - return model as Specification.EventFilterCorrelate; +function buildingFn(model: Specification.EventFilterCorrelate): Specification.EventFilterCorrelate { + const instance = new Classes.EventFilterCorrelate(model); + validate('EventFilterCorrelate', instance); + return instance as Specification.EventFilterCorrelate; } /** * A factory to create a builder proxy for the type `Specification.EventFilterCorrelate` - * @returns {Specification.EventFilterCorrelate} A builder for `Specification.EventFilterCorrelate` + * @returns {Builder} A builder for `Specification.EventFilterCorrelate` */ -export const eventFilterCorrelateBuilder = (): Builder => - builder(buildingFn); +export const eventFilterCorrelateBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/event-filter-with-builder.ts b/src/lib/generated/builders/event-filter-with-builder.ts index b46abea6..f99c0203 100644 --- a/src/lib/generated/builders/event-filter-with-builder.ts +++ b/src/lib/generated/builders/event-filter-with-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EventFilterWith} data The underlying object + * @param {Specification.EventFilterWith} model The underlying object * @returns {Specification.EventFilterWith} The validated underlying object */ -function buildingFn(data: Specification.EventFilterWith): Specification.EventFilterWith { - const model = new Classes.EventFilterWith(data); - - validate('EventFilterWith', model); - return model as Specification.EventFilterWith; +function buildingFn(model: Specification.EventFilterWith): Specification.EventFilterWith { + const instance = new Classes.EventFilterWith(model); + validate('EventFilterWith', instance); + return instance as Specification.EventFilterWith; } /** * A factory to create a builder proxy for the type `Specification.EventFilterWith` - * @returns {Specification.EventFilterWith} A builder for `Specification.EventFilterWith` + * @returns {Builder} A builder for `Specification.EventFilterWith` */ -export const eventFilterWithBuilder = (): Builder => - builder(buildingFn); +export const eventFilterWithBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/export-builder.ts b/src/lib/generated/builders/export-builder.ts index 9b11decb..15c9c0d9 100644 --- a/src/lib/generated/builders/export-builder.ts +++ b/src/lib/generated/builders/export-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Export} data The underlying object + * @param {Specification.Export} model The underlying object * @returns {Specification.Export} The validated underlying object */ -function buildingFn(data: Specification.Export): Specification.Export { - const model = new Classes.Export(data); - - validate('Export', model); - return model as Specification.Export; +function buildingFn(model: Specification.Export): Specification.Export { + const instance = new Classes.Export(model); + validate('Export', instance); + return instance as Specification.Export; } /** * A factory to create a builder proxy for the type `Specification.Export` - * @returns {Specification.Export} A builder for `Specification.Export` + * @returns {Builder} A builder for `Specification.Export` */ -export const exportBuilder = (): Builder => builder(buildingFn); +export const exportBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/extension-builder.ts b/src/lib/generated/builders/extension-builder.ts index 94b59d99..7823ce31 100644 --- a/src/lib/generated/builders/extension-builder.ts +++ b/src/lib/generated/builders/extension-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Extension} data The underlying object + * @param {Specification.Extension} model The underlying object * @returns {Specification.Extension} The validated underlying object */ -function buildingFn(data: Specification.Extension): Specification.Extension { - const model = new Classes.Extension(data); - - validate('Extension', model); - return model as Specification.Extension; +function buildingFn(model: Specification.Extension): Specification.Extension { + const instance = new Classes.Extension(model); + validate('Extension', instance); + return instance as Specification.Extension; } /** * A factory to create a builder proxy for the type `Specification.Extension` - * @returns {Specification.Extension} A builder for `Specification.Extension` + * @returns {Builder} A builder for `Specification.Extension` */ -export const extensionBuilder = (): Builder => builder(buildingFn); +export const extensionBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/external-resource-authentication-builder.ts b/src/lib/generated/builders/external-resource-authentication-builder.ts index 79d7830e..5e0ea1a5 100644 --- a/src/lib/generated/builders/external-resource-authentication-builder.ts +++ b/src/lib/generated/builders/external-resource-authentication-builder.ts @@ -21,19 +21,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ExternalResourceAuthentication} data The underlying object + * @param {Specification.ExternalResourceAuthentication} model The underlying object * @returns {Specification.ExternalResourceAuthentication} The validated underlying object */ -function buildingFn(data: Specification.ExternalResourceAuthentication): Specification.ExternalResourceAuthentication { - const model = new Classes.ExternalResourceAuthentication(data); - - validate('ExternalResourceAuthentication', model); - return model as Specification.ExternalResourceAuthentication; +function buildingFn(model: Specification.ExternalResourceAuthentication): Specification.ExternalResourceAuthentication { + const instance = new Classes.ExternalResourceAuthentication(model); + validate('ExternalResourceAuthentication', instance); + return instance as Specification.ExternalResourceAuthentication; } /** * A factory to create a builder proxy for the type `Specification.ExternalResourceAuthentication` - * @returns {Specification.ExternalResourceAuthentication} A builder for `Specification.ExternalResourceAuthentication` + * @returns {Builder} A builder for `Specification.ExternalResourceAuthentication` */ -export const externalResourceAuthenticationBuilder = (): Builder => - builder(buildingFn); +export const externalResourceAuthenticationBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/external-resource-builder.ts b/src/lib/generated/builders/external-resource-builder.ts index cfc08d30..706f03b8 100644 --- a/src/lib/generated/builders/external-resource-builder.ts +++ b/src/lib/generated/builders/external-resource-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ExternalResource} data The underlying object + * @param {Specification.ExternalResource} model The underlying object * @returns {Specification.ExternalResource} The validated underlying object */ -function buildingFn(data: Specification.ExternalResource): Specification.ExternalResource { - const model = new Classes.ExternalResource(data); - - validate('ExternalResource', model); - return model as Specification.ExternalResource; +function buildingFn(model: Specification.ExternalResource): Specification.ExternalResource { + const instance = new Classes.ExternalResource(model); + validate('ExternalResource', instance); + return instance as Specification.ExternalResource; } /** * A factory to create a builder proxy for the type `Specification.ExternalResource` - * @returns {Specification.ExternalResource} A builder for `Specification.ExternalResource` + * @returns {Builder} A builder for `Specification.ExternalResource` */ -export const externalResourceBuilder = (): Builder => - builder(buildingFn); +export const externalResourceBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/flow-directive-builder.ts b/src/lib/generated/builders/flow-directive-builder.ts index bb2eeca2..dd921799 100644 --- a/src/lib/generated/builders/flow-directive-builder.ts +++ b/src/lib/generated/builders/flow-directive-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.FlowDirective} data The underlying object + * @param {Specification.FlowDirective} model The underlying object * @returns {Specification.FlowDirective} The validated underlying object */ -function buildingFn(data: Specification.FlowDirective): Specification.FlowDirective { - const model = new Classes.FlowDirective(data); - - validate('FlowDirective', model); - return model as Specification.FlowDirective; +function buildingFn(model: Specification.FlowDirective): Specification.FlowDirective { + const instance = new Classes.FlowDirective(model); + validate('FlowDirective', instance); + return instance as Specification.FlowDirective; } /** * A factory to create a builder proxy for the type `Specification.FlowDirective` - * @returns {Specification.FlowDirective} A builder for `Specification.FlowDirective` + * @returns {Builder} A builder for `Specification.FlowDirective` */ -export const flowDirectiveBuilder = (): Builder => - builder(buildingFn); +export const flowDirectiveBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/for-task-builder.ts b/src/lib/generated/builders/for-task-builder.ts index 9071cefc..8787045d 100644 --- a/src/lib/generated/builders/for-task-builder.ts +++ b/src/lib/generated/builders/for-task-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ForTask} data The underlying object + * @param {Specification.ForTask} model The underlying object * @returns {Specification.ForTask} The validated underlying object */ -function buildingFn(data: Specification.ForTask): Specification.ForTask { - const model = new Classes.ForTask(data); - - validate('ForTask', model); - return model as Specification.ForTask; +function buildingFn(model: Specification.ForTask): Specification.ForTask { + const instance = new Classes.ForTask(model); + validate('ForTask', instance); + return instance as Specification.ForTask; } /** * A factory to create a builder proxy for the type `Specification.ForTask` - * @returns {Specification.ForTask} A builder for `Specification.ForTask` + * @returns {Builder} A builder for `Specification.ForTask` */ -export const forTaskBuilder = (): Builder => builder(buildingFn); +export const forTaskBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/for-task-for-builder.ts b/src/lib/generated/builders/for-task-for-builder.ts index d337537c..7764fd46 100644 --- a/src/lib/generated/builders/for-task-for-builder.ts +++ b/src/lib/generated/builders/for-task-for-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ForTaskFor} data The underlying object + * @param {Specification.ForTaskFor} model The underlying object * @returns {Specification.ForTaskFor} The validated underlying object */ -function buildingFn(data: Specification.ForTaskFor): Specification.ForTaskFor { - const model = new Classes.ForTaskFor(data); - - validate('ForTaskFor', model); - return model as Specification.ForTaskFor; +function buildingFn(model: Specification.ForTaskFor): Specification.ForTaskFor { + const instance = new Classes.ForTaskFor(model); + validate('ForTaskFor', instance); + return instance as Specification.ForTaskFor; } /** * A factory to create a builder proxy for the type `Specification.ForTaskFor` - * @returns {Specification.ForTaskFor} A builder for `Specification.ForTaskFor` + * @returns {Builder} A builder for `Specification.ForTaskFor` */ -export const forTaskForBuilder = (): Builder => builder(buildingFn); +export const forTaskForBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/fork-task-builder.ts b/src/lib/generated/builders/fork-task-builder.ts index 310394cd..d20ebe53 100644 --- a/src/lib/generated/builders/fork-task-builder.ts +++ b/src/lib/generated/builders/fork-task-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ForkTask} data The underlying object + * @param {Specification.ForkTask} model The underlying object * @returns {Specification.ForkTask} The validated underlying object */ -function buildingFn(data: Specification.ForkTask): Specification.ForkTask { - const model = new Classes.ForkTask(data); - - validate('ForkTask', model); - return model as Specification.ForkTask; +function buildingFn(model: Specification.ForkTask): Specification.ForkTask { + const instance = new Classes.ForkTask(model); + validate('ForkTask', instance); + return instance as Specification.ForkTask; } /** * A factory to create a builder proxy for the type `Specification.ForkTask` - * @returns {Specification.ForkTask} A builder for `Specification.ForkTask` + * @returns {Builder} A builder for `Specification.ForkTask` */ -export const forkTaskBuilder = (): Builder => builder(buildingFn); +export const forkTaskBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/fork-task-fork-builder.ts b/src/lib/generated/builders/fork-task-fork-builder.ts index 8cdc0481..557142d8 100644 --- a/src/lib/generated/builders/fork-task-fork-builder.ts +++ b/src/lib/generated/builders/fork-task-fork-builder.ts @@ -21,19 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ForkTaskFork} data The underlying object + * @param {Specification.ForkTaskFork} model The underlying object * @returns {Specification.ForkTaskFork} The validated underlying object */ -function buildingFn(data: Specification.ForkTaskFork): Specification.ForkTaskFork { - const model = new Classes.ForkTaskFork(data); - - validate('ForkTaskFork', model); - return model as Specification.ForkTaskFork; +function buildingFn(model: Specification.ForkTaskFork): Specification.ForkTaskFork { + const instance = new Classes.ForkTaskFork(model); + validate('ForkTaskFork', instance); + return instance as Specification.ForkTaskFork; } /** * A factory to create a builder proxy for the type `Specification.ForkTaskFork` - * @returns {Specification.ForkTaskFork} A builder for `Specification.ForkTaskFork` + * @returns {Builder} A builder for `Specification.ForkTaskFork` */ -export const forkTaskForkBuilder = (): Builder => - builder(buildingFn); +export const forkTaskForkBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/index.ts b/src/lib/generated/builders/index.ts index 10c275d5..b4d8f4fb 100644 --- a/src/lib/generated/builders/index.ts +++ b/src/lib/generated/builders/index.ts @@ -95,6 +95,7 @@ export * from './run-task-run-shell-environment-builder'; export * from './run-task-run-workflow-builder'; export * from './run-task-run-workflow-input-builder'; export * from './set-task-set-builder'; +export * from './switch-task-switch-case-builder'; export * from './try-task-catch-builder'; export * from './retry-policy-builder'; export * from './retry-policy-limit-builder'; diff --git a/src/lib/generated/builders/input-builder.ts b/src/lib/generated/builders/input-builder.ts index f36d3da6..88461451 100644 --- a/src/lib/generated/builders/input-builder.ts +++ b/src/lib/generated/builders/input-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Input} data The underlying object + * @param {Specification.Input} model The underlying object * @returns {Specification.Input} The validated underlying object */ -function buildingFn(data: Specification.Input): Specification.Input { - const model = new Classes.Input(data); - - validate('Input', model); - return model as Specification.Input; +function buildingFn(model: Specification.Input): Specification.Input { + const instance = new Classes.Input(model); + validate('Input', instance); + return instance as Specification.Input; } /** * A factory to create a builder proxy for the type `Specification.Input` - * @returns {Specification.Input} A builder for `Specification.Input` + * @returns {Builder} A builder for `Specification.Input` */ -export const inputBuilder = (): Builder => builder(buildingFn); +export const inputBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/listen-task-builder.ts b/src/lib/generated/builders/listen-task-builder.ts index 356de93d..d4f6e513 100644 --- a/src/lib/generated/builders/listen-task-builder.ts +++ b/src/lib/generated/builders/listen-task-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ListenTask} data The underlying object + * @param {Specification.ListenTask} model The underlying object * @returns {Specification.ListenTask} The validated underlying object */ -function buildingFn(data: Specification.ListenTask): Specification.ListenTask { - const model = new Classes.ListenTask(data); - - validate('ListenTask', model); - return model as Specification.ListenTask; +function buildingFn(model: Specification.ListenTask): Specification.ListenTask { + const instance = new Classes.ListenTask(model); + validate('ListenTask', instance); + return instance as Specification.ListenTask; } /** * A factory to create a builder proxy for the type `Specification.ListenTask` - * @returns {Specification.ListenTask} A builder for `Specification.ListenTask` + * @returns {Builder} A builder for `Specification.ListenTask` */ -export const listenTaskBuilder = (): Builder => builder(buildingFn); +export const listenTaskBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/listen-task-listen-builder.ts b/src/lib/generated/builders/listen-task-listen-builder.ts index 20fd1e2e..7bc6cf7c 100644 --- a/src/lib/generated/builders/listen-task-listen-builder.ts +++ b/src/lib/generated/builders/listen-task-listen-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ListenTaskListen} data The underlying object + * @param {Specification.ListenTaskListen} model The underlying object * @returns {Specification.ListenTaskListen} The validated underlying object */ -function buildingFn(data: Specification.ListenTaskListen): Specification.ListenTaskListen { - const model = new Classes.ListenTaskListen(data); - - validate('ListenTaskListen', model); - return model as Specification.ListenTaskListen; +function buildingFn(model: Specification.ListenTaskListen): Specification.ListenTaskListen { + const instance = new Classes.ListenTaskListen(model); + validate('ListenTaskListen', instance); + return instance as Specification.ListenTaskListen; } /** * A factory to create a builder proxy for the type `Specification.ListenTaskListen` - * @returns {Specification.ListenTaskListen} A builder for `Specification.ListenTaskListen` + * @returns {Builder} A builder for `Specification.ListenTaskListen` */ -export const listenTaskListenBuilder = (): Builder => - builder(buildingFn); +export const listenTaskListenBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/oauth2-token-builder.ts b/src/lib/generated/builders/oauth2-token-builder.ts index 8ea67175..65d6babc 100644 --- a/src/lib/generated/builders/oauth2-token-builder.ts +++ b/src/lib/generated/builders/oauth2-token-builder.ts @@ -21,19 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Oauth2Token} data The underlying object + * @param {Specification.Oauth2Token} model The underlying object * @returns {Specification.Oauth2Token} The validated underlying object */ -function buildingFn(data: Specification.Oauth2Token): Specification.Oauth2Token { - const model = new Classes.Oauth2Token(data); - - validate('Oauth2Token', model); - return model as Specification.Oauth2Token; +function buildingFn(model: Specification.Oauth2Token): Specification.Oauth2Token { + const instance = new Classes.Oauth2Token(model); + validate('Oauth2Token', instance); + return instance as Specification.Oauth2Token; } /** * A factory to create a builder proxy for the type `Specification.Oauth2Token` - * @returns {Specification.Oauth2Token} A builder for `Specification.Oauth2Token` + * @returns {Builder} A builder for `Specification.Oauth2Token` */ -export const oauth2TokenBuilder = (): Builder => - builder(buildingFn); +export const oauth2TokenBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/output-builder.ts b/src/lib/generated/builders/output-builder.ts index d1b6261f..5e166e82 100644 --- a/src/lib/generated/builders/output-builder.ts +++ b/src/lib/generated/builders/output-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Output} data The underlying object + * @param {Specification.Output} model The underlying object * @returns {Specification.Output} The validated underlying object */ -function buildingFn(data: Specification.Output): Specification.Output { - const model = new Classes.Output(data); - - validate('Output', model); - return model as Specification.Output; +function buildingFn(model: Specification.Output): Specification.Output { + const instance = new Classes.Output(model); + validate('Output', instance); + return instance as Specification.Output; } /** * A factory to create a builder proxy for the type `Specification.Output` - * @returns {Specification.Output} A builder for `Specification.Output` + * @returns {Builder} A builder for `Specification.Output` */ -export const outputBuilder = (): Builder => builder(buildingFn); +export const outputBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/raise-task-builder.ts b/src/lib/generated/builders/raise-task-builder.ts index f277662c..d250676d 100644 --- a/src/lib/generated/builders/raise-task-builder.ts +++ b/src/lib/generated/builders/raise-task-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RaiseTask} data The underlying object + * @param {Specification.RaiseTask} model The underlying object * @returns {Specification.RaiseTask} The validated underlying object */ -function buildingFn(data: Specification.RaiseTask): Specification.RaiseTask { - const model = new Classes.RaiseTask(data); - - validate('RaiseTask', model); - return model as Specification.RaiseTask; +function buildingFn(model: Specification.RaiseTask): Specification.RaiseTask { + const instance = new Classes.RaiseTask(model); + validate('RaiseTask', instance); + return instance as Specification.RaiseTask; } /** * A factory to create a builder proxy for the type `Specification.RaiseTask` - * @returns {Specification.RaiseTask} A builder for `Specification.RaiseTask` + * @returns {Builder} A builder for `Specification.RaiseTask` */ -export const raiseTaskBuilder = (): Builder => builder(buildingFn); +export const raiseTaskBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/raise-task-raise-builder.ts b/src/lib/generated/builders/raise-task-raise-builder.ts index 68c18660..df801293 100644 --- a/src/lib/generated/builders/raise-task-raise-builder.ts +++ b/src/lib/generated/builders/raise-task-raise-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RaiseTaskRaise} data The underlying object + * @param {Specification.RaiseTaskRaise} model The underlying object * @returns {Specification.RaiseTaskRaise} The validated underlying object */ -function buildingFn(data: Specification.RaiseTaskRaise): Specification.RaiseTaskRaise { - const model = new Classes.RaiseTaskRaise(data); - - validate('RaiseTaskRaise', model); - return model as Specification.RaiseTaskRaise; +function buildingFn(model: Specification.RaiseTaskRaise): Specification.RaiseTaskRaise { + const instance = new Classes.RaiseTaskRaise(model); + validate('RaiseTaskRaise', instance); + return instance as Specification.RaiseTaskRaise; } /** * A factory to create a builder proxy for the type `Specification.RaiseTaskRaise` - * @returns {Specification.RaiseTaskRaise} A builder for `Specification.RaiseTaskRaise` + * @returns {Builder} A builder for `Specification.RaiseTaskRaise` */ -export const raiseTaskRaiseBuilder = (): Builder => - builder(buildingFn); +export const raiseTaskRaiseBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/retry-policy-backoff-builder.ts b/src/lib/generated/builders/retry-policy-backoff-builder.ts index 2f928f16..c029d4ca 100644 --- a/src/lib/generated/builders/retry-policy-backoff-builder.ts +++ b/src/lib/generated/builders/retry-policy-backoff-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RetryPolicyBackoff} data The underlying object + * @param {Specification.RetryPolicyBackoff} model The underlying object * @returns {Specification.RetryPolicyBackoff} The validated underlying object */ -function buildingFn(data: Specification.RetryPolicyBackoff): Specification.RetryPolicyBackoff { - const model = new Classes.RetryPolicyBackoff(data); - - validate('RetryPolicyBackoff', model); - return model as Specification.RetryPolicyBackoff; +function buildingFn(model: Specification.RetryPolicyBackoff): Specification.RetryPolicyBackoff { + const instance = new Classes.RetryPolicyBackoff(model); + validate('RetryPolicyBackoff', instance); + return instance as Specification.RetryPolicyBackoff; } /** * A factory to create a builder proxy for the type `Specification.RetryPolicyBackoff` - * @returns {Specification.RetryPolicyBackoff} A builder for `Specification.RetryPolicyBackoff` + * @returns {Builder} A builder for `Specification.RetryPolicyBackoff` */ -export const retryPolicyBackoffBuilder = (): Builder => - builder(buildingFn); +export const retryPolicyBackoffBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/retry-policy-builder.ts b/src/lib/generated/builders/retry-policy-builder.ts index 3b532c9d..c06b8523 100644 --- a/src/lib/generated/builders/retry-policy-builder.ts +++ b/src/lib/generated/builders/retry-policy-builder.ts @@ -21,19 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RetryPolicy} data The underlying object + * @param {Specification.RetryPolicy} model The underlying object * @returns {Specification.RetryPolicy} The validated underlying object */ -function buildingFn(data: Specification.RetryPolicy): Specification.RetryPolicy { - const model = new Classes.RetryPolicy(data); - - validate('RetryPolicy', model); - return model as Specification.RetryPolicy; +function buildingFn(model: Specification.RetryPolicy): Specification.RetryPolicy { + const instance = new Classes.RetryPolicy(model); + validate('RetryPolicy', instance); + return instance as Specification.RetryPolicy; } /** * A factory to create a builder proxy for the type `Specification.RetryPolicy` - * @returns {Specification.RetryPolicy} A builder for `Specification.RetryPolicy` + * @returns {Builder} A builder for `Specification.RetryPolicy` */ -export const retryPolicyBuilder = (): Builder => - builder(buildingFn); +export const retryPolicyBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/retry-policy-jitter-builder.ts b/src/lib/generated/builders/retry-policy-jitter-builder.ts index 181104b6..cdc565cb 100644 --- a/src/lib/generated/builders/retry-policy-jitter-builder.ts +++ b/src/lib/generated/builders/retry-policy-jitter-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RetryPolicyJitter} data The underlying object + * @param {Specification.RetryPolicyJitter} model The underlying object * @returns {Specification.RetryPolicyJitter} The validated underlying object */ -function buildingFn(data: Specification.RetryPolicyJitter): Specification.RetryPolicyJitter { - const model = new Classes.RetryPolicyJitter(data); - - validate('RetryPolicyJitter', model); - return model as Specification.RetryPolicyJitter; +function buildingFn(model: Specification.RetryPolicyJitter): Specification.RetryPolicyJitter { + const instance = new Classes.RetryPolicyJitter(model); + validate('RetryPolicyJitter', instance); + return instance as Specification.RetryPolicyJitter; } /** * A factory to create a builder proxy for the type `Specification.RetryPolicyJitter` - * @returns {Specification.RetryPolicyJitter} A builder for `Specification.RetryPolicyJitter` + * @returns {Builder} A builder for `Specification.RetryPolicyJitter` */ -export const retryPolicyJitterBuilder = (): Builder => - builder(buildingFn); +export const retryPolicyJitterBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts b/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts index 84767209..faa255f7 100644 --- a/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts +++ b/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RetryPolicyLimitAttempt} data The underlying object + * @param {Specification.RetryPolicyLimitAttempt} model The underlying object * @returns {Specification.RetryPolicyLimitAttempt} The validated underlying object */ -function buildingFn(data: Specification.RetryPolicyLimitAttempt): Specification.RetryPolicyLimitAttempt { - const model = new Classes.RetryPolicyLimitAttempt(data); - - validate('RetryPolicyLimitAttempt', model); - return model as Specification.RetryPolicyLimitAttempt; +function buildingFn(model: Specification.RetryPolicyLimitAttempt): Specification.RetryPolicyLimitAttempt { + const instance = new Classes.RetryPolicyLimitAttempt(model); + validate('RetryPolicyLimitAttempt', instance); + return instance as Specification.RetryPolicyLimitAttempt; } /** * A factory to create a builder proxy for the type `Specification.RetryPolicyLimitAttempt` - * @returns {Specification.RetryPolicyLimitAttempt} A builder for `Specification.RetryPolicyLimitAttempt` + * @returns {Builder} A builder for `Specification.RetryPolicyLimitAttempt` */ -export const retryPolicyLimitAttemptBuilder = (): Builder => - builder(buildingFn); +export const retryPolicyLimitAttemptBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/retry-policy-limit-builder.ts b/src/lib/generated/builders/retry-policy-limit-builder.ts index 84207670..79a8d01a 100644 --- a/src/lib/generated/builders/retry-policy-limit-builder.ts +++ b/src/lib/generated/builders/retry-policy-limit-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RetryPolicyLimit} data The underlying object + * @param {Specification.RetryPolicyLimit} model The underlying object * @returns {Specification.RetryPolicyLimit} The validated underlying object */ -function buildingFn(data: Specification.RetryPolicyLimit): Specification.RetryPolicyLimit { - const model = new Classes.RetryPolicyLimit(data); - - validate('RetryPolicyLimit', model); - return model as Specification.RetryPolicyLimit; +function buildingFn(model: Specification.RetryPolicyLimit): Specification.RetryPolicyLimit { + const instance = new Classes.RetryPolicyLimit(model); + validate('RetryPolicyLimit', instance); + return instance as Specification.RetryPolicyLimit; } /** * A factory to create a builder proxy for the type `Specification.RetryPolicyLimit` - * @returns {Specification.RetryPolicyLimit} A builder for `Specification.RetryPolicyLimit` + * @returns {Builder} A builder for `Specification.RetryPolicyLimit` */ -export const retryPolicyLimitBuilder = (): Builder => - builder(buildingFn); +export const retryPolicyLimitBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-task-builder.ts b/src/lib/generated/builders/run-task-builder.ts index b4b5ae81..06909185 100644 --- a/src/lib/generated/builders/run-task-builder.ts +++ b/src/lib/generated/builders/run-task-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTask} data The underlying object + * @param {Specification.RunTask} model The underlying object * @returns {Specification.RunTask} The validated underlying object */ -function buildingFn(data: Specification.RunTask): Specification.RunTask { - const model = new Classes.RunTask(data); - - validate('RunTask', model); - return model as Specification.RunTask; +function buildingFn(model: Specification.RunTask): Specification.RunTask { + const instance = new Classes.RunTask(model); + validate('RunTask', instance); + return instance as Specification.RunTask; } /** * A factory to create a builder proxy for the type `Specification.RunTask` - * @returns {Specification.RunTask} A builder for `Specification.RunTask` + * @returns {Builder} A builder for `Specification.RunTask` */ -export const runTaskBuilder = (): Builder => builder(buildingFn); +export const runTaskBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-task-run-builder.ts b/src/lib/generated/builders/run-task-run-builder.ts index effecc75..aeac9e56 100644 --- a/src/lib/generated/builders/run-task-run-builder.ts +++ b/src/lib/generated/builders/run-task-run-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRun} data The underlying object + * @param {Specification.RunTaskRun} model The underlying object * @returns {Specification.RunTaskRun} The validated underlying object */ -function buildingFn(data: Specification.RunTaskRun): Specification.RunTaskRun { - const model = new Classes.RunTaskRun(data); - - validate('RunTaskRun', model); - return model as Specification.RunTaskRun; +function buildingFn(model: Specification.RunTaskRun): Specification.RunTaskRun { + const instance = new Classes.RunTaskRun(model); + validate('RunTaskRun', instance); + return instance as Specification.RunTaskRun; } /** * A factory to create a builder proxy for the type `Specification.RunTaskRun` - * @returns {Specification.RunTaskRun} A builder for `Specification.RunTaskRun` + * @returns {Builder} A builder for `Specification.RunTaskRun` */ -export const runTaskRunBuilder = (): Builder => builder(buildingFn); +export const runTaskRunBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-task-run-container-builder.ts b/src/lib/generated/builders/run-task-run-container-builder.ts index 2129e53c..8e44a164 100644 --- a/src/lib/generated/builders/run-task-run-container-builder.ts +++ b/src/lib/generated/builders/run-task-run-container-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunContainer} data The underlying object + * @param {Specification.RunTaskRunContainer} model The underlying object * @returns {Specification.RunTaskRunContainer} The validated underlying object */ -function buildingFn(data: Specification.RunTaskRunContainer): Specification.RunTaskRunContainer { - const model = new Classes.RunTaskRunContainer(data); - - validate('RunTaskRunContainer', model); - return model as Specification.RunTaskRunContainer; +function buildingFn(model: Specification.RunTaskRunContainer): Specification.RunTaskRunContainer { + const instance = new Classes.RunTaskRunContainer(model); + validate('RunTaskRunContainer', instance); + return instance as Specification.RunTaskRunContainer; } /** * A factory to create a builder proxy for the type `Specification.RunTaskRunContainer` - * @returns {Specification.RunTaskRunContainer} A builder for `Specification.RunTaskRunContainer` + * @returns {Builder} A builder for `Specification.RunTaskRunContainer` */ -export const runTaskRunContainerBuilder = (): Builder => - builder(buildingFn); +export const runTaskRunContainerBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-task-run-script-builder.ts b/src/lib/generated/builders/run-task-run-script-builder.ts index e729fd79..1812a2ee 100644 --- a/src/lib/generated/builders/run-task-run-script-builder.ts +++ b/src/lib/generated/builders/run-task-run-script-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunScript} data The underlying object + * @param {Specification.RunTaskRunScript} model The underlying object * @returns {Specification.RunTaskRunScript} The validated underlying object */ -function buildingFn(data: Specification.RunTaskRunScript): Specification.RunTaskRunScript { - const model = new Classes.RunTaskRunScript(data); - - validate('RunTaskRunScript', model); - return model as Specification.RunTaskRunScript; +function buildingFn(model: Specification.RunTaskRunScript): Specification.RunTaskRunScript { + const instance = new Classes.RunTaskRunScript(model); + validate('RunTaskRunScript', instance); + return instance as Specification.RunTaskRunScript; } /** * A factory to create a builder proxy for the type `Specification.RunTaskRunScript` - * @returns {Specification.RunTaskRunScript} A builder for `Specification.RunTaskRunScript` + * @returns {Builder} A builder for `Specification.RunTaskRunScript` */ -export const runTaskRunScriptBuilder = (): Builder => - builder(buildingFn); +export const runTaskRunScriptBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts b/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts index 897c8ab1..c9daea78 100644 --- a/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts +++ b/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts @@ -21,19 +21,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunShellArguments} data The underlying object + * @param {Specification.RunTaskRunShellArguments} model The underlying object * @returns {Specification.RunTaskRunShellArguments} The validated underlying object */ -function buildingFn(data: Specification.RunTaskRunShellArguments): Specification.RunTaskRunShellArguments { - const model = new Classes.RunTaskRunShellArguments(data); - - validate('RunTaskRunShellArguments', model); - return model as Specification.RunTaskRunShellArguments; +function buildingFn(model: Specification.RunTaskRunShellArguments): Specification.RunTaskRunShellArguments { + const instance = new Classes.RunTaskRunShellArguments(model); + validate('RunTaskRunShellArguments', instance); + return instance as Specification.RunTaskRunShellArguments; } /** * A factory to create a builder proxy for the type `Specification.RunTaskRunShellArguments` - * @returns {Specification.RunTaskRunShellArguments} A builder for `Specification.RunTaskRunShellArguments` + * @returns {Builder} A builder for `Specification.RunTaskRunShellArguments` */ -export const runTaskRunShellArgumentsBuilder = (): Builder => - builder(buildingFn); +export const runTaskRunShellArgumentsBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-task-run-shell-builder.ts b/src/lib/generated/builders/run-task-run-shell-builder.ts index e810e5b8..1a9cc709 100644 --- a/src/lib/generated/builders/run-task-run-shell-builder.ts +++ b/src/lib/generated/builders/run-task-run-shell-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunShell} data The underlying object + * @param {Specification.RunTaskRunShell} model The underlying object * @returns {Specification.RunTaskRunShell} The validated underlying object */ -function buildingFn(data: Specification.RunTaskRunShell): Specification.RunTaskRunShell { - const model = new Classes.RunTaskRunShell(data); - - validate('RunTaskRunShell', model); - return model as Specification.RunTaskRunShell; +function buildingFn(model: Specification.RunTaskRunShell): Specification.RunTaskRunShell { + const instance = new Classes.RunTaskRunShell(model); + validate('RunTaskRunShell', instance); + return instance as Specification.RunTaskRunShell; } /** * A factory to create a builder proxy for the type `Specification.RunTaskRunShell` - * @returns {Specification.RunTaskRunShell} A builder for `Specification.RunTaskRunShell` + * @returns {Builder} A builder for `Specification.RunTaskRunShell` */ -export const runTaskRunShellBuilder = (): Builder => - builder(buildingFn); +export const runTaskRunShellBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-task-run-shell-environment-builder.ts b/src/lib/generated/builders/run-task-run-shell-environment-builder.ts index 4456fce5..ee8a305e 100644 --- a/src/lib/generated/builders/run-task-run-shell-environment-builder.ts +++ b/src/lib/generated/builders/run-task-run-shell-environment-builder.ts @@ -21,19 +21,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunShellEnvironment} data The underlying object + * @param {Specification.RunTaskRunShellEnvironment} model The underlying object * @returns {Specification.RunTaskRunShellEnvironment} The validated underlying object */ -function buildingFn(data: Specification.RunTaskRunShellEnvironment): Specification.RunTaskRunShellEnvironment { - const model = new Classes.RunTaskRunShellEnvironment(data); - - validate('RunTaskRunShellEnvironment', model); - return model as Specification.RunTaskRunShellEnvironment; +function buildingFn(model: Specification.RunTaskRunShellEnvironment): Specification.RunTaskRunShellEnvironment { + const instance = new Classes.RunTaskRunShellEnvironment(model); + validate('RunTaskRunShellEnvironment', instance); + return instance as Specification.RunTaskRunShellEnvironment; } /** * A factory to create a builder proxy for the type `Specification.RunTaskRunShellEnvironment` - * @returns {Specification.RunTaskRunShellEnvironment} A builder for `Specification.RunTaskRunShellEnvironment` + * @returns {Builder} A builder for `Specification.RunTaskRunShellEnvironment` */ -export const runTaskRunShellEnvironmentBuilder = (): Builder => - builder(buildingFn); +export const runTaskRunShellEnvironmentBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-task-run-workflow-builder.ts b/src/lib/generated/builders/run-task-run-workflow-builder.ts index bae29cb9..5e3d2601 100644 --- a/src/lib/generated/builders/run-task-run-workflow-builder.ts +++ b/src/lib/generated/builders/run-task-run-workflow-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunWorkflow} data The underlying object + * @param {Specification.RunTaskRunWorkflow} model The underlying object * @returns {Specification.RunTaskRunWorkflow} The validated underlying object */ -function buildingFn(data: Specification.RunTaskRunWorkflow): Specification.RunTaskRunWorkflow { - const model = new Classes.RunTaskRunWorkflow(data); - - validate('RunTaskRunWorkflow', model); - return model as Specification.RunTaskRunWorkflow; +function buildingFn(model: Specification.RunTaskRunWorkflow): Specification.RunTaskRunWorkflow { + const instance = new Classes.RunTaskRunWorkflow(model); + validate('RunTaskRunWorkflow', instance); + return instance as Specification.RunTaskRunWorkflow; } /** * A factory to create a builder proxy for the type `Specification.RunTaskRunWorkflow` - * @returns {Specification.RunTaskRunWorkflow} A builder for `Specification.RunTaskRunWorkflow` + * @returns {Builder} A builder for `Specification.RunTaskRunWorkflow` */ -export const runTaskRunWorkflowBuilder = (): Builder => - builder(buildingFn); +export const runTaskRunWorkflowBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-task-run-workflow-input-builder.ts b/src/lib/generated/builders/run-task-run-workflow-input-builder.ts index 78abefbc..7a89a89a 100644 --- a/src/lib/generated/builders/run-task-run-workflow-input-builder.ts +++ b/src/lib/generated/builders/run-task-run-workflow-input-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunWorkflowInput} data The underlying object + * @param {Specification.RunTaskRunWorkflowInput} model The underlying object * @returns {Specification.RunTaskRunWorkflowInput} The validated underlying object */ -function buildingFn(data: Specification.RunTaskRunWorkflowInput): Specification.RunTaskRunWorkflowInput { - const model = new Classes.RunTaskRunWorkflowInput(data); - - validate('RunTaskRunWorkflowInput', model); - return model as Specification.RunTaskRunWorkflowInput; +function buildingFn(model: Specification.RunTaskRunWorkflowInput): Specification.RunTaskRunWorkflowInput { + const instance = new Classes.RunTaskRunWorkflowInput(model); + validate('RunTaskRunWorkflowInput', instance); + return instance as Specification.RunTaskRunWorkflowInput; } /** * A factory to create a builder proxy for the type `Specification.RunTaskRunWorkflowInput` - * @returns {Specification.RunTaskRunWorkflowInput} A builder for `Specification.RunTaskRunWorkflowInput` + * @returns {Builder} A builder for `Specification.RunTaskRunWorkflowInput` */ -export const runTaskRunWorkflowInputBuilder = (): Builder => - builder(buildingFn); +export const runTaskRunWorkflowInputBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/schedule-builder.ts b/src/lib/generated/builders/schedule-builder.ts index 882c6d47..00643ce5 100644 --- a/src/lib/generated/builders/schedule-builder.ts +++ b/src/lib/generated/builders/schedule-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Schedule} data The underlying object + * @param {Specification.Schedule} model The underlying object * @returns {Specification.Schedule} The validated underlying object */ -function buildingFn(data: Specification.Schedule): Specification.Schedule { - const model = new Classes.Schedule(data); - - validate('Schedule', model); - return model as Specification.Schedule; +function buildingFn(model: Specification.Schedule): Specification.Schedule { + const instance = new Classes.Schedule(model); + validate('Schedule', instance); + return instance as Specification.Schedule; } /** * A factory to create a builder proxy for the type `Specification.Schedule` - * @returns {Specification.Schedule} A builder for `Specification.Schedule` + * @returns {Builder} A builder for `Specification.Schedule` */ -export const scheduleBuilder = (): Builder => builder(buildingFn); +export const scheduleBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/schema-builder.ts b/src/lib/generated/builders/schema-builder.ts index 75d52a4f..d3a15daf 100644 --- a/src/lib/generated/builders/schema-builder.ts +++ b/src/lib/generated/builders/schema-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Schema} data The underlying object + * @param {Specification.Schema} model The underlying object * @returns {Specification.Schema} The validated underlying object */ -function buildingFn(data: Specification.Schema): Specification.Schema { - const model = new Classes.Schema(data); - - validate('Schema', model); - return model as Specification.Schema; +function buildingFn(model: Specification.Schema): Specification.Schema { + const instance = new Classes.Schema(model); + validate('Schema', instance); + return instance as Specification.Schema; } /** * A factory to create a builder proxy for the type `Specification.Schema` - * @returns {Specification.Schema} A builder for `Specification.Schema` + * @returns {Builder} A builder for `Specification.Schema` */ -export const schemaBuilder = (): Builder => builder(buildingFn); +export const schemaBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/set-task-builder.ts b/src/lib/generated/builders/set-task-builder.ts index 75a6cf14..2a33a73d 100644 --- a/src/lib/generated/builders/set-task-builder.ts +++ b/src/lib/generated/builders/set-task-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.SetTask} data The underlying object + * @param {Specification.SetTask} model The underlying object * @returns {Specification.SetTask} The validated underlying object */ -function buildingFn(data: Specification.SetTask): Specification.SetTask { - const model = new Classes.SetTask(data); - - validate('SetTask', model); - return model as Specification.SetTask; +function buildingFn(model: Specification.SetTask): Specification.SetTask { + const instance = new Classes.SetTask(model); + validate('SetTask', instance); + return instance as Specification.SetTask; } /** * A factory to create a builder proxy for the type `Specification.SetTask` - * @returns {Specification.SetTask} A builder for `Specification.SetTask` + * @returns {Builder} A builder for `Specification.SetTask` */ -export const setTaskBuilder = (): Builder => builder(buildingFn); +export const setTaskBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/set-task-set-builder.ts b/src/lib/generated/builders/set-task-set-builder.ts index c6389ae3..b1dfdd68 100644 --- a/src/lib/generated/builders/set-task-set-builder.ts +++ b/src/lib/generated/builders/set-task-set-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.SetTaskSet} data The underlying object + * @param {Specification.SetTaskSet} model The underlying object * @returns {Specification.SetTaskSet} The validated underlying object */ -function buildingFn(data: Specification.SetTaskSet): Specification.SetTaskSet { - const model = new Classes.SetTaskSet(data); - - validate('SetTaskSet', model); - return model as Specification.SetTaskSet; +function buildingFn(model: Specification.SetTaskSet): Specification.SetTaskSet { + const instance = new Classes.SetTaskSet(model); + validate('SetTaskSet', instance); + return instance as Specification.SetTaskSet; } /** * A factory to create a builder proxy for the type `Specification.SetTaskSet` - * @returns {Specification.SetTaskSet} A builder for `Specification.SetTaskSet` + * @returns {Builder} A builder for `Specification.SetTaskSet` */ -export const setTaskSetBuilder = (): Builder => builder(buildingFn); +export const setTaskSetBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/switch-task-builder.ts b/src/lib/generated/builders/switch-task-builder.ts index 83d089bf..a28667ab 100644 --- a/src/lib/generated/builders/switch-task-builder.ts +++ b/src/lib/generated/builders/switch-task-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.SwitchTask} data The underlying object + * @param {Specification.SwitchTask} model The underlying object * @returns {Specification.SwitchTask} The validated underlying object */ -function buildingFn(data: Specification.SwitchTask): Specification.SwitchTask { - const model = new Classes.SwitchTask(data); - - validate('SwitchTask', model); - return model as Specification.SwitchTask; +function buildingFn(model: Specification.SwitchTask): Specification.SwitchTask { + const instance = new Classes.SwitchTask(model); + validate('SwitchTask', instance); + return instance as Specification.SwitchTask; } /** * A factory to create a builder proxy for the type `Specification.SwitchTask` - * @returns {Specification.SwitchTask} A builder for `Specification.SwitchTask` + * @returns {Builder} A builder for `Specification.SwitchTask` */ -export const switchTaskBuilder = (): Builder => builder(buildingFn); +export const switchTaskBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/switch-task-switch-builder.ts b/src/lib/generated/builders/switch-task-switch-builder.ts index 7fcbc930..4b63e4b2 100644 --- a/src/lib/generated/builders/switch-task-switch-builder.ts +++ b/src/lib/generated/builders/switch-task-switch-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.SwitchTaskSwitch} data The underlying object + * @param {Specification.SwitchTaskSwitch} model The underlying object * @returns {Specification.SwitchTaskSwitch} The validated underlying object */ -function buildingFn(data: Specification.SwitchTaskSwitch): Specification.SwitchTaskSwitch { - const model = new Classes.SwitchTaskSwitch(data); - - validate('SwitchTaskSwitch', model); - return model as Specification.SwitchTaskSwitch; +function buildingFn(model: Specification.SwitchTaskSwitch): Specification.SwitchTaskSwitch { + const instance = new Classes.SwitchTaskSwitch(model); + validate('SwitchTaskSwitch', instance); + return instance as Specification.SwitchTaskSwitch; } /** * A factory to create a builder proxy for the type `Specification.SwitchTaskSwitch` - * @returns {Specification.SwitchTaskSwitch} A builder for `Specification.SwitchTaskSwitch` + * @returns {Builder} A builder for `Specification.SwitchTaskSwitch` */ -export const switchTaskSwitchBuilder = (): Builder => - builder(buildingFn); +export const switchTaskSwitchBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/switch-task-switch-case-builder.ts b/src/lib/generated/builders/switch-task-switch-case-builder.ts new file mode 100644 index 00000000..526e7ce7 --- /dev/null +++ b/src/lib/generated/builders/switch-task-switch-case-builder.ts @@ -0,0 +1,39 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { builder, Builder } from '../../builder'; +import { validate } from '../../validation'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.SwitchTaskSwitchCase} model The underlying object + * @returns {Specification.SwitchTaskSwitchCase} The validated underlying object + */ +function buildingFn(model: Specification.SwitchTaskSwitchCase): Specification.SwitchTaskSwitchCase { + const instance = new Classes.SwitchTaskSwitchCase(model); + validate('SwitchTaskSwitchCase', instance); + return instance as Specification.SwitchTaskSwitchCase; +} + +/** + * A factory to create a builder proxy for the type `Specification.SwitchTaskSwitchCase` + * @returns {Builder} A builder for `Specification.SwitchTaskSwitchCase` + */ +export const switchTaskSwitchCaseBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/task-base-builder.ts b/src/lib/generated/builders/task-base-builder.ts index e9fe96a5..fa663d6b 100644 --- a/src/lib/generated/builders/task-base-builder.ts +++ b/src/lib/generated/builders/task-base-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.TaskBase} data The underlying object + * @param {Specification.TaskBase} model The underlying object * @returns {Specification.TaskBase} The validated underlying object */ -function buildingFn(data: Specification.TaskBase): Specification.TaskBase { - const model = new Classes.TaskBase(data); - - validate('TaskBase', model); - return model as Specification.TaskBase; +function buildingFn(model: Specification.TaskBase): Specification.TaskBase { + const instance = new Classes.TaskBase(model); + validate('TaskBase', instance); + return instance as Specification.TaskBase; } /** * A factory to create a builder proxy for the type `Specification.TaskBase` - * @returns {Specification.TaskBase} A builder for `Specification.TaskBase` + * @returns {Builder} A builder for `Specification.TaskBase` */ -export const taskBaseBuilder = (): Builder => builder(buildingFn); +export const taskBaseBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/task-builder.ts b/src/lib/generated/builders/task-builder.ts index ae0f1578..37e223a6 100644 --- a/src/lib/generated/builders/task-builder.ts +++ b/src/lib/generated/builders/task-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Task} data The underlying object + * @param {Specification.Task} model The underlying object * @returns {Specification.Task} The validated underlying object */ -function buildingFn(data: Specification.Task): Specification.Task { - const model = new Classes.Task(data); - - validate('Task', model); - return model as Specification.Task; +function buildingFn(model: Specification.Task): Specification.Task { + const instance = new Classes.Task(model); + validate('Task', instance); + return instance as Specification.Task; } /** * A factory to create a builder proxy for the type `Specification.Task` - * @returns {Specification.Task} A builder for `Specification.Task` + * @returns {Builder} A builder for `Specification.Task` */ -export const taskBuilder = (): Builder => builder(buildingFn); +export const taskBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/task-list-builder.ts b/src/lib/generated/builders/task-list-builder.ts index a5c10089..8145e817 100644 --- a/src/lib/generated/builders/task-list-builder.ts +++ b/src/lib/generated/builders/task-list-builder.ts @@ -14,25 +14,25 @@ * limitations under the License. */ -import { builder, Builder } from '../../builder'; +import { arrayBuilder, ArrayBuilder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.TaskList} data The underlying object - * @returns {Specification.TaskList} The validated underlying object + * The internal function used by the builder proxy to validate and return its underlying array + * @param {Specification.TaskList} model The underlying array + * @returns {Specification.TaskList} The validated underlying array */ -function buildingFn(data: Specification.TaskList): Specification.TaskList { - const model = new Classes.TaskList(data); - - validate('TaskList', model); - return model as Specification.TaskList; +function buildingFn(model: Specification.TaskList): Specification.TaskList { + const instance = new Classes.TaskList(model); + validate('TaskList', instance); + return instance as Specification.TaskList; } /** * A factory to create a builder proxy for the type `Specification.TaskList` - * @returns {Specification.TaskList} A builder for `Specification.TaskList` + * @returns {ArrayBuilder} A builder for `Specification.TaskList` */ -export const taskListBuilder = (): Builder => builder(buildingFn); +export const taskListBuilder = (model?: Specification.TaskList): ArrayBuilder<{ [k: string]: Specification.Task }> => + arrayBuilder<{ [k: string]: Specification.Task }>(model, buildingFn); diff --git a/src/lib/generated/builders/timeout-builder.ts b/src/lib/generated/builders/timeout-builder.ts index d0228135..7f1a13c8 100644 --- a/src/lib/generated/builders/timeout-builder.ts +++ b/src/lib/generated/builders/timeout-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Timeout} data The underlying object + * @param {Specification.Timeout} model The underlying object * @returns {Specification.Timeout} The validated underlying object */ -function buildingFn(data: Specification.Timeout): Specification.Timeout { - const model = new Classes.Timeout(data); - - validate('Timeout', model); - return model as Specification.Timeout; +function buildingFn(model: Specification.Timeout): Specification.Timeout { + const instance = new Classes.Timeout(model); + validate('Timeout', instance); + return instance as Specification.Timeout; } /** * A factory to create a builder proxy for the type `Specification.Timeout` - * @returns {Specification.Timeout} A builder for `Specification.Timeout` + * @returns {Builder} A builder for `Specification.Timeout` */ -export const timeoutBuilder = (): Builder => builder(buildingFn); +export const timeoutBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/try-task-builder.ts b/src/lib/generated/builders/try-task-builder.ts index caf6ff87..f55e5eef 100644 --- a/src/lib/generated/builders/try-task-builder.ts +++ b/src/lib/generated/builders/try-task-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.TryTask} data The underlying object + * @param {Specification.TryTask} model The underlying object * @returns {Specification.TryTask} The validated underlying object */ -function buildingFn(data: Specification.TryTask): Specification.TryTask { - const model = new Classes.TryTask(data); - - validate('TryTask', model); - return model as Specification.TryTask; +function buildingFn(model: Specification.TryTask): Specification.TryTask { + const instance = new Classes.TryTask(model); + validate('TryTask', instance); + return instance as Specification.TryTask; } /** * A factory to create a builder proxy for the type `Specification.TryTask` - * @returns {Specification.TryTask} A builder for `Specification.TryTask` + * @returns {Builder} A builder for `Specification.TryTask` */ -export const tryTaskBuilder = (): Builder => builder(buildingFn); +export const tryTaskBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/try-task-catch-builder.ts b/src/lib/generated/builders/try-task-catch-builder.ts index 6c123940..0aa23b93 100644 --- a/src/lib/generated/builders/try-task-catch-builder.ts +++ b/src/lib/generated/builders/try-task-catch-builder.ts @@ -21,19 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.TryTaskCatch} data The underlying object + * @param {Specification.TryTaskCatch} model The underlying object * @returns {Specification.TryTaskCatch} The validated underlying object */ -function buildingFn(data: Specification.TryTaskCatch): Specification.TryTaskCatch { - const model = new Classes.TryTaskCatch(data); - - validate('TryTaskCatch', model); - return model as Specification.TryTaskCatch; +function buildingFn(model: Specification.TryTaskCatch): Specification.TryTaskCatch { + const instance = new Classes.TryTaskCatch(model); + validate('TryTaskCatch', instance); + return instance as Specification.TryTaskCatch; } /** * A factory to create a builder proxy for the type `Specification.TryTaskCatch` - * @returns {Specification.TryTaskCatch} A builder for `Specification.TryTaskCatch` + * @returns {Builder} A builder for `Specification.TryTaskCatch` */ -export const tryTaskCatchBuilder = (): Builder => - builder(buildingFn); +export const tryTaskCatchBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/use-authentications-builder.ts b/src/lib/generated/builders/use-authentications-builder.ts index 3c52cdc5..23be60d4 100644 --- a/src/lib/generated/builders/use-authentications-builder.ts +++ b/src/lib/generated/builders/use-authentications-builder.ts @@ -21,19 +21,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.UseAuthentications} data The underlying object + * @param {Specification.UseAuthentications} model The underlying object * @returns {Specification.UseAuthentications} The validated underlying object */ -function buildingFn(data: Specification.UseAuthentications): Specification.UseAuthentications { - const model = new Classes.UseAuthentications(data); - - validate('UseAuthentications', model); - return model as Specification.UseAuthentications; +function buildingFn(model: Specification.UseAuthentications): Specification.UseAuthentications { + const instance = new Classes.UseAuthentications(model); + validate('UseAuthentications', instance); + return instance as Specification.UseAuthentications; } /** * A factory to create a builder proxy for the type `Specification.UseAuthentications` - * @returns {Specification.UseAuthentications} A builder for `Specification.UseAuthentications` + * @returns {Builder} A builder for `Specification.UseAuthentications` */ -export const useAuthenticationsBuilder = (): Builder => - builder(buildingFn); +export const useAuthenticationsBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/use-builder.ts b/src/lib/generated/builders/use-builder.ts index 5d580ad7..1996395c 100644 --- a/src/lib/generated/builders/use-builder.ts +++ b/src/lib/generated/builders/use-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Use} data The underlying object + * @param {Specification.Use} model The underlying object * @returns {Specification.Use} The validated underlying object */ -function buildingFn(data: Specification.Use): Specification.Use { - const model = new Classes.Use(data); - - validate('Use', model); - return model as Specification.Use; +function buildingFn(model: Specification.Use): Specification.Use { + const instance = new Classes.Use(model); + validate('Use', instance); + return instance as Specification.Use; } /** * A factory to create a builder proxy for the type `Specification.Use` - * @returns {Specification.Use} A builder for `Specification.Use` + * @returns {Builder} A builder for `Specification.Use` */ -export const useBuilder = (): Builder => builder(buildingFn); +export const useBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/use-errors-builder.ts b/src/lib/generated/builders/use-errors-builder.ts index 7968e50a..c8505bb4 100644 --- a/src/lib/generated/builders/use-errors-builder.ts +++ b/src/lib/generated/builders/use-errors-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.UseErrors} data The underlying object + * @param {Specification.UseErrors} model The underlying object * @returns {Specification.UseErrors} The validated underlying object */ -function buildingFn(data: Specification.UseErrors): Specification.UseErrors { - const model = new Classes.UseErrors(data); - - validate('UseErrors', model); - return model as Specification.UseErrors; +function buildingFn(model: Specification.UseErrors): Specification.UseErrors { + const instance = new Classes.UseErrors(model); + validate('UseErrors', instance); + return instance as Specification.UseErrors; } /** * A factory to create a builder proxy for the type `Specification.UseErrors` - * @returns {Specification.UseErrors} A builder for `Specification.UseErrors` + * @returns {Builder} A builder for `Specification.UseErrors` */ -export const useErrorsBuilder = (): Builder => builder(buildingFn); +export const useErrorsBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/use-extensions-builder.ts b/src/lib/generated/builders/use-extensions-builder.ts index 7aba7300..4539522c 100644 --- a/src/lib/generated/builders/use-extensions-builder.ts +++ b/src/lib/generated/builders/use-extensions-builder.ts @@ -14,26 +14,27 @@ * limitations under the License. */ -import { builder, Builder } from '../../builder'; +import { arrayBuilder, ArrayBuilder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.UseExtensions} data The underlying object - * @returns {Specification.UseExtensions} The validated underlying object + * The internal function used by the builder proxy to validate and return its underlying array + * @param {Specification.UseExtensions} model The underlying array + * @returns {Specification.UseExtensions} The validated underlying array */ -function buildingFn(data: Specification.UseExtensions): Specification.UseExtensions { - const model = new Classes.UseExtensions(data); - - validate('UseExtensions', model); - return model as Specification.UseExtensions; +function buildingFn(model: Specification.UseExtensions): Specification.UseExtensions { + const instance = new Classes.UseExtensions(model); + validate('UseExtensions', instance); + return instance as Specification.UseExtensions; } /** * A factory to create a builder proxy for the type `Specification.UseExtensions` - * @returns {Specification.UseExtensions} A builder for `Specification.UseExtensions` + * @returns {ArrayBuilder} A builder for `Specification.UseExtensions` */ -export const useExtensionsBuilder = (): Builder => - builder(buildingFn); +export const useExtensionsBuilder = ( + model?: Specification.UseExtensions, +): ArrayBuilder<{ [k: string]: Specification.Extension }> => + arrayBuilder<{ [k: string]: Specification.Extension }>(model, buildingFn); diff --git a/src/lib/generated/builders/use-functions-builder.ts b/src/lib/generated/builders/use-functions-builder.ts index c4e9140b..599733cd 100644 --- a/src/lib/generated/builders/use-functions-builder.ts +++ b/src/lib/generated/builders/use-functions-builder.ts @@ -21,19 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.UseFunctions} data The underlying object + * @param {Specification.UseFunctions} model The underlying object * @returns {Specification.UseFunctions} The validated underlying object */ -function buildingFn(data: Specification.UseFunctions): Specification.UseFunctions { - const model = new Classes.UseFunctions(data); - - validate('UseFunctions', model); - return model as Specification.UseFunctions; +function buildingFn(model: Specification.UseFunctions): Specification.UseFunctions { + const instance = new Classes.UseFunctions(model); + validate('UseFunctions', instance); + return instance as Specification.UseFunctions; } /** * A factory to create a builder proxy for the type `Specification.UseFunctions` - * @returns {Specification.UseFunctions} A builder for `Specification.UseFunctions` + * @returns {Builder} A builder for `Specification.UseFunctions` */ -export const useFunctionsBuilder = (): Builder => - builder(buildingFn); +export const useFunctionsBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/use-retries-builder.ts b/src/lib/generated/builders/use-retries-builder.ts index 33bf74e1..dfdb4fd1 100644 --- a/src/lib/generated/builders/use-retries-builder.ts +++ b/src/lib/generated/builders/use-retries-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.UseRetries} data The underlying object + * @param {Specification.UseRetries} model The underlying object * @returns {Specification.UseRetries} The validated underlying object */ -function buildingFn(data: Specification.UseRetries): Specification.UseRetries { - const model = new Classes.UseRetries(data); - - validate('UseRetries', model); - return model as Specification.UseRetries; +function buildingFn(model: Specification.UseRetries): Specification.UseRetries { + const instance = new Classes.UseRetries(model); + validate('UseRetries', instance); + return instance as Specification.UseRetries; } /** * A factory to create a builder proxy for the type `Specification.UseRetries` - * @returns {Specification.UseRetries} A builder for `Specification.UseRetries` + * @returns {Builder} A builder for `Specification.UseRetries` */ -export const useRetriesBuilder = (): Builder => builder(buildingFn); +export const useRetriesBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/wait-task-builder.ts b/src/lib/generated/builders/wait-task-builder.ts index 3e1bde9c..0f12a297 100644 --- a/src/lib/generated/builders/wait-task-builder.ts +++ b/src/lib/generated/builders/wait-task-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.WaitTask} data The underlying object + * @param {Specification.WaitTask} model The underlying object * @returns {Specification.WaitTask} The validated underlying object */ -function buildingFn(data: Specification.WaitTask): Specification.WaitTask { - const model = new Classes.WaitTask(data); - - validate('WaitTask', model); - return model as Specification.WaitTask; +function buildingFn(model: Specification.WaitTask): Specification.WaitTask { + const instance = new Classes.WaitTask(model); + validate('WaitTask', instance); + return instance as Specification.WaitTask; } /** * A factory to create a builder proxy for the type `Specification.WaitTask` - * @returns {Specification.WaitTask} A builder for `Specification.WaitTask` + * @returns {Builder} A builder for `Specification.WaitTask` */ -export const waitTaskBuilder = (): Builder => builder(buildingFn); +export const waitTaskBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/workflow-builder.ts b/src/lib/generated/builders/workflow-builder.ts index 8db32186..97b2e850 100644 --- a/src/lib/generated/builders/workflow-builder.ts +++ b/src/lib/generated/builders/workflow-builder.ts @@ -21,18 +21,18 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Workflow} data The underlying object + * @param {Specification.Workflow} model The underlying object * @returns {Specification.Workflow} The validated underlying object */ -function buildingFn(data: Specification.Workflow): Specification.Workflow { - const model = new Classes.Workflow(data); - - validate('Workflow', model); - return model as Specification.Workflow; +function buildingFn(model: Specification.Workflow): Specification.Workflow { + const instance = new Classes.Workflow(model); + validate('Workflow', instance); + return instance as Specification.Workflow; } /** * A factory to create a builder proxy for the type `Specification.Workflow` - * @returns {Specification.Workflow} A builder for `Specification.Workflow` + * @returns {Builder} A builder for `Specification.Workflow` */ -export const workflowBuilder = (): Builder => builder(buildingFn); +export const workflowBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/classes/authentication-policy-basic.ts b/src/lib/generated/classes/authentication-policy-basic.ts index 52e54643..3e641dbc 100644 --- a/src/lib/generated/classes/authentication-policy-basic.ts +++ b/src/lib/generated/classes/authentication-policy-basic.ts @@ -1,14 +1,36 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _AuthenticationPolicyBasic extends _Reflector { - constructor(data?: Partial) { - super(data); +class _AuthenticationPolicyBasic extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const AuthenticationPolicyBasic = _AuthenticationPolicyBasic as { new ( - data?: Partial, + model?: Partial, ): _AuthenticationPolicyBasic & Specification.AuthenticationPolicyBasic; }; diff --git a/src/lib/generated/classes/authentication-policy-bearer.ts b/src/lib/generated/classes/authentication-policy-bearer.ts index 91d39e62..fc710b61 100644 --- a/src/lib/generated/classes/authentication-policy-bearer.ts +++ b/src/lib/generated/classes/authentication-policy-bearer.ts @@ -1,14 +1,36 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _AuthenticationPolicyBearer extends _Reflector { - constructor(data?: Partial) { - super(data); +class _AuthenticationPolicyBearer extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const AuthenticationPolicyBearer = _AuthenticationPolicyBearer as { new ( - data?: Partial, + model?: Partial, ): _AuthenticationPolicyBearer & Specification.AuthenticationPolicyBearer; }; diff --git a/src/lib/generated/classes/authentication-policy-oauth2-client.ts b/src/lib/generated/classes/authentication-policy-oauth2-client.ts index 5acb50d9..5d65b2d3 100644 --- a/src/lib/generated/classes/authentication-policy-oauth2-client.ts +++ b/src/lib/generated/classes/authentication-policy-oauth2-client.ts @@ -1,14 +1,36 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _AuthenticationPolicyOauth2Client extends _Reflector { - constructor(data?: Partial) { - super(data); +class _AuthenticationPolicyOauth2Client extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const AuthenticationPolicyOauth2Client = _AuthenticationPolicyOauth2Client as { new ( - data?: Partial, + model?: Partial, ): _AuthenticationPolicyOauth2Client & Specification.AuthenticationPolicyOauth2Client; }; diff --git a/src/lib/generated/classes/authentication-policy-oauth2.ts b/src/lib/generated/classes/authentication-policy-oauth2.ts index 5ce389ea..4390d74a 100644 --- a/src/lib/generated/classes/authentication-policy-oauth2.ts +++ b/src/lib/generated/classes/authentication-policy-oauth2.ts @@ -1,14 +1,36 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _AuthenticationPolicyOauth2 extends _Reflector { - constructor(data?: Partial) { - super(data); +class _AuthenticationPolicyOauth2 extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const AuthenticationPolicyOauth2 = _AuthenticationPolicyOauth2 as { new ( - data?: Partial, + model?: Partial, ): _AuthenticationPolicyOauth2 & Specification.AuthenticationPolicyOauth2; }; diff --git a/src/lib/generated/classes/authentication-policy.ts b/src/lib/generated/classes/authentication-policy.ts index 381ca9eb..2deefe97 100644 --- a/src/lib/generated/classes/authentication-policy.ts +++ b/src/lib/generated/classes/authentication-policy.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _AuthenticationPolicy extends _Reflector { - constructor(data?: Partial) { - super(data); +class _AuthenticationPolicy extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const AuthenticationPolicy = _AuthenticationPolicy as { - new (data?: Partial): _AuthenticationPolicy & Specification.AuthenticationPolicy; + new (model?: Partial): _AuthenticationPolicy & Specification.AuthenticationPolicy; }; diff --git a/src/lib/generated/classes/call-async-api-with-authentication.ts b/src/lib/generated/classes/call-async-api-with-authentication.ts index 94f6ad4c..0cb6b16d 100644 --- a/src/lib/generated/classes/call-async-api-with-authentication.ts +++ b/src/lib/generated/classes/call-async-api-with-authentication.ts @@ -1,14 +1,36 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallAsyncAPIWithAuthentication extends _Reflector { - constructor(data?: Partial) { - super(data); +class _CallAsyncAPIWithAuthentication extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const CallAsyncAPIWithAuthentication = _CallAsyncAPIWithAuthentication as { new ( - data?: Partial, + model?: Partial, ): _CallAsyncAPIWithAuthentication & Specification.CallAsyncAPIWithAuthentication; }; diff --git a/src/lib/generated/classes/call-async-api-with.ts b/src/lib/generated/classes/call-async-api-with.ts index 5befdf62..90b38179 100644 --- a/src/lib/generated/classes/call-async-api-with.ts +++ b/src/lib/generated/classes/call-async-api-with.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallAsyncAPIWith extends _Reflector { - constructor(data?: Partial) { - super(data); +class _CallAsyncAPIWith extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const CallAsyncAPIWith = _CallAsyncAPIWith as { - new (data?: Partial): _CallAsyncAPIWith & Specification.CallAsyncAPIWith; + new (model?: Partial): _CallAsyncAPIWith & Specification.CallAsyncAPIWith; }; diff --git a/src/lib/generated/classes/call-async-api.ts b/src/lib/generated/classes/call-async-api.ts index 81bd786c..2a0d57b8 100644 --- a/src/lib/generated/classes/call-async-api.ts +++ b/src/lib/generated/classes/call-async-api.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _CallAsyncAPI extends _Reflector { - constructor(data?: Partial) { - super(data); +class _CallAsyncAPI extends TaskBase { + constructor(model?: Partial) { + super(model); } } export const CallAsyncAPI = _CallAsyncAPI as { - new (data?: Partial): _CallAsyncAPI & Specification.CallAsyncAPI; + new (model?: Partial): _CallAsyncAPI & Specification.CallAsyncAPI; }; diff --git a/src/lib/generated/classes/call-function-with.ts b/src/lib/generated/classes/call-function-with.ts index aa5bd209..0d4c1c97 100644 --- a/src/lib/generated/classes/call-function-with.ts +++ b/src/lib/generated/classes/call-function-with.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallFunctionWith extends _Reflector { - constructor(data?: Partial) { - super(data); +class _CallFunctionWith extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const CallFunctionWith = _CallFunctionWith as { - new (data?: Partial): _CallFunctionWith & Specification.CallFunctionWith; + new (model?: Partial): _CallFunctionWith & Specification.CallFunctionWith; }; diff --git a/src/lib/generated/classes/call-function.ts b/src/lib/generated/classes/call-function.ts index 513c6c38..8073e139 100644 --- a/src/lib/generated/classes/call-function.ts +++ b/src/lib/generated/classes/call-function.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _CallFunction extends _Reflector { - constructor(data?: Partial) { - super(data); +class _CallFunction extends TaskBase { + constructor(model?: Partial) { + super(model); } } export const CallFunction = _CallFunction as { - new (data?: Partial): _CallFunction & Specification.CallFunction; + new (model?: Partial): _CallFunction & Specification.CallFunction; }; diff --git a/src/lib/generated/classes/call-grpc-with-arguments.ts b/src/lib/generated/classes/call-grpc-with-arguments.ts index e6fea56d..30eb4839 100644 --- a/src/lib/generated/classes/call-grpc-with-arguments.ts +++ b/src/lib/generated/classes/call-grpc-with-arguments.ts @@ -1,14 +1,36 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallGRPCWithArguments extends _Reflector { - constructor(data?: Partial) { - super(data); +class _CallGRPCWithArguments extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const CallGRPCWithArguments = _CallGRPCWithArguments as { new ( - data?: Partial, + model?: Partial, ): _CallGRPCWithArguments & Specification.CallGRPCWithArguments; }; diff --git a/src/lib/generated/classes/call-grpc-with-service-authentication.ts b/src/lib/generated/classes/call-grpc-with-service-authentication.ts index 00087a39..4ac98da2 100644 --- a/src/lib/generated/classes/call-grpc-with-service-authentication.ts +++ b/src/lib/generated/classes/call-grpc-with-service-authentication.ts @@ -1,14 +1,36 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallGRPCWithServiceAuthentication extends _Reflector { - constructor(data?: Partial) { - super(data); +class _CallGRPCWithServiceAuthentication extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const CallGRPCWithServiceAuthentication = _CallGRPCWithServiceAuthentication as { new ( - data?: Partial, + model?: Partial, ): _CallGRPCWithServiceAuthentication & Specification.CallGRPCWithServiceAuthentication; }; diff --git a/src/lib/generated/classes/call-grpc-with-service.ts b/src/lib/generated/classes/call-grpc-with-service.ts index 50861cf4..c52bb6d3 100644 --- a/src/lib/generated/classes/call-grpc-with-service.ts +++ b/src/lib/generated/classes/call-grpc-with-service.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallGRPCWithService extends _Reflector { - constructor(data?: Partial) { - super(data); +class _CallGRPCWithService extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const CallGRPCWithService = _CallGRPCWithService as { - new (data?: Partial): _CallGRPCWithService & Specification.CallGRPCWithService; + new (model?: Partial): _CallGRPCWithService & Specification.CallGRPCWithService; }; diff --git a/src/lib/generated/classes/call-grpc-with.ts b/src/lib/generated/classes/call-grpc-with.ts index c4470468..32195e52 100644 --- a/src/lib/generated/classes/call-grpc-with.ts +++ b/src/lib/generated/classes/call-grpc-with.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallGRPCWith extends _Reflector { - constructor(data?: Partial) { - super(data); +class _CallGRPCWith extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const CallGRPCWith = _CallGRPCWith as { - new (data?: Partial): _CallGRPCWith & Specification.CallGRPCWith; + new (model?: Partial): _CallGRPCWith & Specification.CallGRPCWith; }; diff --git a/src/lib/generated/classes/call-grpc.ts b/src/lib/generated/classes/call-grpc.ts index 44a29bae..e70617cf 100644 --- a/src/lib/generated/classes/call-grpc.ts +++ b/src/lib/generated/classes/call-grpc.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _CallGRPC extends _Reflector { - constructor(data?: Partial) { - super(data); +class _CallGRPC extends TaskBase { + constructor(model?: Partial) { + super(model); } } export const CallGRPC = _CallGRPC as { - new (data?: Partial): _CallGRPC & Specification.CallGRPC; + new (model?: Partial): _CallGRPC & Specification.CallGRPC; }; diff --git a/src/lib/generated/classes/call-http-with-endpoint.ts b/src/lib/generated/classes/call-http-with-endpoint.ts index f37a0cbc..6a45751f 100644 --- a/src/lib/generated/classes/call-http-with-endpoint.ts +++ b/src/lib/generated/classes/call-http-with-endpoint.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallHTTPWithEndpoint extends _Reflector { - constructor(data?: Partial) { - super(data); +class _CallHTTPWithEndpoint extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const CallHTTPWithEndpoint = _CallHTTPWithEndpoint as { - new (data?: Partial): _CallHTTPWithEndpoint & Specification.CallHTTPWithEndpoint; + new (model?: Partial): _CallHTTPWithEndpoint & Specification.CallHTTPWithEndpoint; }; diff --git a/src/lib/generated/classes/call-http-with.ts b/src/lib/generated/classes/call-http-with.ts index e3724727..5bf3d478 100644 --- a/src/lib/generated/classes/call-http-with.ts +++ b/src/lib/generated/classes/call-http-with.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallHTTPWith extends _Reflector { - constructor(data?: Partial) { - super(data); +class _CallHTTPWith extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const CallHTTPWith = _CallHTTPWith as { - new (data?: Partial): _CallHTTPWith & Specification.CallHTTPWith; + new (model?: Partial): _CallHTTPWith & Specification.CallHTTPWith; }; diff --git a/src/lib/generated/classes/call-http.ts b/src/lib/generated/classes/call-http.ts index ed070211..8a4b9e23 100644 --- a/src/lib/generated/classes/call-http.ts +++ b/src/lib/generated/classes/call-http.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _CallHTTP extends _Reflector { - constructor(data?: Partial) { - super(data); +class _CallHTTP extends TaskBase { + constructor(model?: Partial) { + super(model); } } export const CallHTTP = _CallHTTP as { - new (data?: Partial): _CallHTTP & Specification.CallHTTP; + new (model?: Partial): _CallHTTP & Specification.CallHTTP; }; diff --git a/src/lib/generated/classes/call-open-api-with-authentication.ts b/src/lib/generated/classes/call-open-api-with-authentication.ts index 8dcc5d4f..01c3a2ef 100644 --- a/src/lib/generated/classes/call-open-api-with-authentication.ts +++ b/src/lib/generated/classes/call-open-api-with-authentication.ts @@ -1,14 +1,36 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallOpenAPIWithAuthentication extends _Reflector { - constructor(data?: Partial) { - super(data); +class _CallOpenAPIWithAuthentication extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const CallOpenAPIWithAuthentication = _CallOpenAPIWithAuthentication as { new ( - data?: Partial, + model?: Partial, ): _CallOpenAPIWithAuthentication & Specification.CallOpenAPIWithAuthentication; }; diff --git a/src/lib/generated/classes/call-open-api-with-parameters.ts b/src/lib/generated/classes/call-open-api-with-parameters.ts index a615d738..bcf4d593 100644 --- a/src/lib/generated/classes/call-open-api-with-parameters.ts +++ b/src/lib/generated/classes/call-open-api-with-parameters.ts @@ -1,14 +1,36 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallOpenAPIWithParameters extends _Reflector { - constructor(data?: Partial) { - super(data); +class _CallOpenAPIWithParameters extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const CallOpenAPIWithParameters = _CallOpenAPIWithParameters as { new ( - data?: Partial, + model?: Partial, ): _CallOpenAPIWithParameters & Specification.CallOpenAPIWithParameters; }; diff --git a/src/lib/generated/classes/call-open-api-with.ts b/src/lib/generated/classes/call-open-api-with.ts index 70488706..2dbc3bcf 100644 --- a/src/lib/generated/classes/call-open-api-with.ts +++ b/src/lib/generated/classes/call-open-api-with.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallOpenAPIWith extends _Reflector { - constructor(data?: Partial) { - super(data); +class _CallOpenAPIWith extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const CallOpenAPIWith = _CallOpenAPIWith as { - new (data?: Partial): _CallOpenAPIWith & Specification.CallOpenAPIWith; + new (model?: Partial): _CallOpenAPIWith & Specification.CallOpenAPIWith; }; diff --git a/src/lib/generated/classes/call-open-api.ts b/src/lib/generated/classes/call-open-api.ts index 14e32575..8b87cd54 100644 --- a/src/lib/generated/classes/call-open-api.ts +++ b/src/lib/generated/classes/call-open-api.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _CallOpenAPI extends _Reflector { - constructor(data?: Partial) { - super(data); +class _CallOpenAPI extends TaskBase { + constructor(model?: Partial) { + super(model); } } export const CallOpenAPI = _CallOpenAPI as { - new (data?: Partial): _CallOpenAPI & Specification.CallOpenAPI; + new (model?: Partial): _CallOpenAPI & Specification.CallOpenAPI; }; diff --git a/src/lib/generated/classes/call-task.ts b/src/lib/generated/classes/call-task.ts index 67f4fdcd..335f5bfc 100644 --- a/src/lib/generated/classes/call-task.ts +++ b/src/lib/generated/classes/call-task.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallTask extends _Reflector { - constructor(data?: Partial) { - super(data); +class _CallTask extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const CallTask = _CallTask as { - new (data?: Partial): _CallTask & Specification.CallTask; + new (model?: Partial): _CallTask & Specification.CallTask; }; diff --git a/src/lib/generated/classes/do-task.ts b/src/lib/generated/classes/do-task.ts index 78df6b17..a5a7aee6 100644 --- a/src/lib/generated/classes/do-task.ts +++ b/src/lib/generated/classes/do-task.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _DoTask extends _Reflector { - constructor(data?: Partial) { - super(data); +class _DoTask extends TaskBase { + constructor(model?: Partial) { + super(model); } } export const DoTask = _DoTask as { - new (data?: Partial): _DoTask & Specification.DoTask; + new (model?: Partial): _DoTask & Specification.DoTask; }; diff --git a/src/lib/generated/classes/document-tags.ts b/src/lib/generated/classes/document-tags.ts index ed8b5cbf..fad8b7d4 100644 --- a/src/lib/generated/classes/document-tags.ts +++ b/src/lib/generated/classes/document-tags.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _DocumentTags extends _Reflector { - constructor(data?: Partial) { - super(data); +class _DocumentTags extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const DocumentTags = _DocumentTags as { - new (data?: Partial): _DocumentTags & Specification.DocumentTags; + new (model?: Partial): _DocumentTags & Specification.DocumentTags; }; diff --git a/src/lib/generated/classes/document.ts b/src/lib/generated/classes/document.ts index 633e6e4f..6d21022f 100644 --- a/src/lib/generated/classes/document.ts +++ b/src/lib/generated/classes/document.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Document extends _Reflector { - constructor(data?: Partial) { - super(data); +class _Document extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const Document = _Document as { - new (data?: Partial): _Document & Specification.Document; + new (model?: Partial): _Document & Specification.Document; }; diff --git a/src/lib/generated/classes/duration.ts b/src/lib/generated/classes/duration.ts index e10aa9d3..4b91a2b9 100644 --- a/src/lib/generated/classes/duration.ts +++ b/src/lib/generated/classes/duration.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Duration extends _Reflector { - constructor(data?: Partial) { - super(data); +class _Duration extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const Duration = _Duration as { - new (data?: Partial): _Duration & Specification.Duration; + new (model?: Partial): _Duration & Specification.Duration; }; diff --git a/src/lib/generated/classes/emit-task-emit-event.ts b/src/lib/generated/classes/emit-task-emit-event.ts index af0de1a1..a925b6de 100644 --- a/src/lib/generated/classes/emit-task-emit-event.ts +++ b/src/lib/generated/classes/emit-task-emit-event.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _EmitTaskEmitEvent extends _Reflector { - constructor(data?: Partial) { - super(data); +class _EmitTaskEmitEvent extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const EmitTaskEmitEvent = _EmitTaskEmitEvent as { - new (data?: Partial): _EmitTaskEmitEvent & Specification.EmitTaskEmitEvent; + new (model?: Partial): _EmitTaskEmitEvent & Specification.EmitTaskEmitEvent; }; diff --git a/src/lib/generated/classes/emit-task-emit.ts b/src/lib/generated/classes/emit-task-emit.ts index c2073093..f4fe09a5 100644 --- a/src/lib/generated/classes/emit-task-emit.ts +++ b/src/lib/generated/classes/emit-task-emit.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _EmitTaskEmit extends _Reflector { - constructor(data?: Partial) { - super(data); +class _EmitTaskEmit extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const EmitTaskEmit = _EmitTaskEmit as { - new (data?: Partial): _EmitTaskEmit & Specification.EmitTaskEmit; + new (model?: Partial): _EmitTaskEmit & Specification.EmitTaskEmit; }; diff --git a/src/lib/generated/classes/emit-task.ts b/src/lib/generated/classes/emit-task.ts index d0b795a7..6deec45a 100644 --- a/src/lib/generated/classes/emit-task.ts +++ b/src/lib/generated/classes/emit-task.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _EmitTask extends _Reflector { - constructor(data?: Partial) { - super(data); +class _EmitTask extends TaskBase { + constructor(model?: Partial) { + super(model); } } export const EmitTask = _EmitTask as { - new (data?: Partial): _EmitTask & Specification.EmitTask; + new (model?: Partial): _EmitTask & Specification.EmitTask; }; diff --git a/src/lib/generated/classes/endpoint-authentication.ts b/src/lib/generated/classes/endpoint-authentication.ts index 1eb3a9c7..a185d241 100644 --- a/src/lib/generated/classes/endpoint-authentication.ts +++ b/src/lib/generated/classes/endpoint-authentication.ts @@ -1,14 +1,36 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _EndpointAuthentication extends _Reflector { - constructor(data?: Partial) { - super(data); +class _EndpointAuthentication extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const EndpointAuthentication = _EndpointAuthentication as { new ( - data?: Partial, + model?: Partial, ): _EndpointAuthentication & Specification.EndpointAuthentication; }; diff --git a/src/lib/generated/classes/endpoint.ts b/src/lib/generated/classes/endpoint.ts index 44975952..6af8edc5 100644 --- a/src/lib/generated/classes/endpoint.ts +++ b/src/lib/generated/classes/endpoint.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Endpoint extends _Reflector { - constructor(data?: Partial) { - super(data); +class _Endpoint extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const Endpoint = _Endpoint as { - new (data?: Partial): _Endpoint & Specification.Endpoint; + new (model?: Partial): _Endpoint & Specification.Endpoint; }; diff --git a/src/lib/generated/classes/error.ts b/src/lib/generated/classes/error.ts index 133b760b..5863807f 100644 --- a/src/lib/generated/classes/error.ts +++ b/src/lib/generated/classes/error.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Error extends _Reflector { - constructor(data?: Partial) { - super(data); +class _Error extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const Error = _Error as { - new (data?: Partial): _Error & Specification.Error; + new (model?: Partial): _Error & Specification.Error; }; diff --git a/src/lib/generated/classes/event-consumption-strategy-all.ts b/src/lib/generated/classes/event-consumption-strategy-all.ts index 1bbe81b5..17583812 100644 --- a/src/lib/generated/classes/event-consumption-strategy-all.ts +++ b/src/lib/generated/classes/event-consumption-strategy-all.ts @@ -1,14 +1,33 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { Specification } from '../definitions'; -class _EventConsumptionStrategyAll extends _Reflector { - constructor(data?: Partial) { - super(data); +export class EventConsumptionStrategyAll extends Array { + constructor(model?: Array) { + super(...(model || [])); + if (model != null && !Array.isArray(model)) { + throw new Error('The provided model should be an array'); + } + Object.setPrototypeOf(this, Object.create(EventConsumptionStrategyAll.prototype)); } } - -export const EventConsumptionStrategyAll = _EventConsumptionStrategyAll as { - new ( - data?: Partial, - ): _EventConsumptionStrategyAll & Specification.EventConsumptionStrategyAll; -}; diff --git a/src/lib/generated/classes/event-consumption-strategy-any.ts b/src/lib/generated/classes/event-consumption-strategy-any.ts index 31d9a78e..d679bf80 100644 --- a/src/lib/generated/classes/event-consumption-strategy-any.ts +++ b/src/lib/generated/classes/event-consumption-strategy-any.ts @@ -1,14 +1,33 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { Specification } from '../definitions'; -class _EventConsumptionStrategyAny extends _Reflector { - constructor(data?: Partial) { - super(data); +export class EventConsumptionStrategyAny extends Array { + constructor(model?: Array) { + super(...(model || [])); + if (model != null && !Array.isArray(model)) { + throw new Error('The provided model should be an array'); + } + Object.setPrototypeOf(this, Object.create(EventConsumptionStrategyAny.prototype)); } } - -export const EventConsumptionStrategyAny = _EventConsumptionStrategyAny as { - new ( - data?: Partial, - ): _EventConsumptionStrategyAny & Specification.EventConsumptionStrategyAny; -}; diff --git a/src/lib/generated/classes/event-consumption-strategy.ts b/src/lib/generated/classes/event-consumption-strategy.ts index 7d55c377..ce4e9996 100644 --- a/src/lib/generated/classes/event-consumption-strategy.ts +++ b/src/lib/generated/classes/event-consumption-strategy.ts @@ -1,14 +1,36 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _EventConsumptionStrategy extends _Reflector { - constructor(data?: Partial) { - super(data); +class _EventConsumptionStrategy extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const EventConsumptionStrategy = _EventConsumptionStrategy as { new ( - data?: Partial, + model?: Partial, ): _EventConsumptionStrategy & Specification.EventConsumptionStrategy; }; diff --git a/src/lib/generated/classes/event-filter-correlate.ts b/src/lib/generated/classes/event-filter-correlate.ts index 16d891b0..d415b786 100644 --- a/src/lib/generated/classes/event-filter-correlate.ts +++ b/src/lib/generated/classes/event-filter-correlate.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _EventFilterCorrelate extends _Reflector { - constructor(data?: Partial) { - super(data); +class _EventFilterCorrelate extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const EventFilterCorrelate = _EventFilterCorrelate as { - new (data?: Partial): _EventFilterCorrelate & Specification.EventFilterCorrelate; + new (model?: Partial): _EventFilterCorrelate & Specification.EventFilterCorrelate; }; diff --git a/src/lib/generated/classes/event-filter-with.ts b/src/lib/generated/classes/event-filter-with.ts index c638f25e..05a60e74 100644 --- a/src/lib/generated/classes/event-filter-with.ts +++ b/src/lib/generated/classes/event-filter-with.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _EventFilterWith extends _Reflector { - constructor(data?: Partial) { - super(data); +class _EventFilterWith extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const EventFilterWith = _EventFilterWith as { - new (data?: Partial): _EventFilterWith & Specification.EventFilterWith; + new (model?: Partial): _EventFilterWith & Specification.EventFilterWith; }; diff --git a/src/lib/generated/classes/event-filter.ts b/src/lib/generated/classes/event-filter.ts index b1415ae4..fa043723 100644 --- a/src/lib/generated/classes/event-filter.ts +++ b/src/lib/generated/classes/event-filter.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _EventFilter extends _Reflector { - constructor(data?: Partial) { - super(data); +class _EventFilter extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const EventFilter = _EventFilter as { - new (data?: Partial): _EventFilter & Specification.EventFilter; + new (model?: Partial): _EventFilter & Specification.EventFilter; }; diff --git a/src/lib/generated/classes/export.ts b/src/lib/generated/classes/export.ts index 1a1ad509..8bdd04df 100644 --- a/src/lib/generated/classes/export.ts +++ b/src/lib/generated/classes/export.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Export extends _Reflector { - constructor(data?: Partial) { - super(data); +class _Export extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const Export = _Export as { - new (data?: Partial): _Export & Specification.Export; + new (model?: Partial): _Export & Specification.Export; }; diff --git a/src/lib/generated/classes/extension.ts b/src/lib/generated/classes/extension.ts index a9821a5c..7a45fadc 100644 --- a/src/lib/generated/classes/extension.ts +++ b/src/lib/generated/classes/extension.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Extension extends _Reflector { - constructor(data?: Partial) { - super(data); +class _Extension extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const Extension = _Extension as { - new (data?: Partial): _Extension & Specification.Extension; + new (model?: Partial): _Extension & Specification.Extension; }; diff --git a/src/lib/generated/classes/external-resource-authentication.ts b/src/lib/generated/classes/external-resource-authentication.ts index 2741f60e..0dacfbd8 100644 --- a/src/lib/generated/classes/external-resource-authentication.ts +++ b/src/lib/generated/classes/external-resource-authentication.ts @@ -1,14 +1,36 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _ExternalResourceAuthentication extends _Reflector { - constructor(data?: Partial) { - super(data); +class _ExternalResourceAuthentication extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const ExternalResourceAuthentication = _ExternalResourceAuthentication as { new ( - data?: Partial, + model?: Partial, ): _ExternalResourceAuthentication & Specification.ExternalResourceAuthentication; }; diff --git a/src/lib/generated/classes/external-resource.ts b/src/lib/generated/classes/external-resource.ts index c948aa1a..926aa155 100644 --- a/src/lib/generated/classes/external-resource.ts +++ b/src/lib/generated/classes/external-resource.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _ExternalResource extends _Reflector { - constructor(data?: Partial) { - super(data); +class _ExternalResource extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const ExternalResource = _ExternalResource as { - new (data?: Partial): _ExternalResource & Specification.ExternalResource; + new (model?: Partial): _ExternalResource & Specification.ExternalResource; }; diff --git a/src/lib/generated/classes/flow-directive.ts b/src/lib/generated/classes/flow-directive.ts index 85f64ca3..e1e38863 100644 --- a/src/lib/generated/classes/flow-directive.ts +++ b/src/lib/generated/classes/flow-directive.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _FlowDirective extends _Reflector { - constructor(data?: Partial) { - super(data); +class _FlowDirective extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const FlowDirective = _FlowDirective as { - new (data?: Partial): _FlowDirective & Specification.FlowDirective; + new (model?: Partial): _FlowDirective & Specification.FlowDirective; }; diff --git a/src/lib/generated/classes/for-task-for.ts b/src/lib/generated/classes/for-task-for.ts index 06c4b4d4..48807dd4 100644 --- a/src/lib/generated/classes/for-task-for.ts +++ b/src/lib/generated/classes/for-task-for.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _ForTaskFor extends _Reflector { - constructor(data?: Partial) { - super(data); +class _ForTaskFor extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const ForTaskFor = _ForTaskFor as { - new (data?: Partial): _ForTaskFor & Specification.ForTaskFor; + new (model?: Partial): _ForTaskFor & Specification.ForTaskFor; }; diff --git a/src/lib/generated/classes/for-task.ts b/src/lib/generated/classes/for-task.ts index 40c82c41..b7023ae9 100644 --- a/src/lib/generated/classes/for-task.ts +++ b/src/lib/generated/classes/for-task.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _ForTask extends _Reflector { - constructor(data?: Partial) { - super(data); +class _ForTask extends TaskBase { + constructor(model?: Partial) { + super(model); } } export const ForTask = _ForTask as { - new (data?: Partial): _ForTask & Specification.ForTask; + new (model?: Partial): _ForTask & Specification.ForTask; }; diff --git a/src/lib/generated/classes/fork-task-fork.ts b/src/lib/generated/classes/fork-task-fork.ts index 0ddd27c9..bd12f53b 100644 --- a/src/lib/generated/classes/fork-task-fork.ts +++ b/src/lib/generated/classes/fork-task-fork.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _ForkTaskFork extends _Reflector { - constructor(data?: Partial) { - super(data); +class _ForkTaskFork extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const ForkTaskFork = _ForkTaskFork as { - new (data?: Partial): _ForkTaskFork & Specification.ForkTaskFork; + new (model?: Partial): _ForkTaskFork & Specification.ForkTaskFork; }; diff --git a/src/lib/generated/classes/fork-task.ts b/src/lib/generated/classes/fork-task.ts index 6979e213..b0cd0a79 100644 --- a/src/lib/generated/classes/fork-task.ts +++ b/src/lib/generated/classes/fork-task.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _ForkTask extends _Reflector { - constructor(data?: Partial) { - super(data); +class _ForkTask extends TaskBase { + constructor(model?: Partial) { + super(model); } } export const ForkTask = _ForkTask as { - new (data?: Partial): _ForkTask & Specification.ForkTask; + new (model?: Partial): _ForkTask & Specification.ForkTask; }; diff --git a/src/lib/generated/classes/index.ts b/src/lib/generated/classes/index.ts index c8ff3f41..3516cc48 100644 --- a/src/lib/generated/classes/index.ts +++ b/src/lib/generated/classes/index.ts @@ -95,6 +95,7 @@ import { RunTaskRunShellEnvironment } from './run-task-run-shell-environment'; import { RunTaskRunWorkflow } from './run-task-run-workflow'; import { RunTaskRunWorkflowInput } from './run-task-run-workflow-input'; import { SetTaskSet } from './set-task-set'; +import { SwitchTaskSwitchCase } from './switch-task-switch-case'; import { TryTaskCatch } from './try-task-catch'; import { RetryPolicy } from './retry-policy'; import { RetryPolicyLimit } from './retry-policy-limit'; @@ -186,6 +187,7 @@ export const Classes = { RunTaskRunWorkflow, RunTaskRunWorkflowInput, SetTaskSet, + SwitchTaskSwitchCase, TryTaskCatch, RetryPolicy, RetryPolicyLimit, diff --git a/src/lib/generated/classes/input.ts b/src/lib/generated/classes/input.ts index e4fa01a5..f84d300e 100644 --- a/src/lib/generated/classes/input.ts +++ b/src/lib/generated/classes/input.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Input extends _Reflector { - constructor(data?: Partial) { - super(data); +class _Input extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const Input = _Input as { - new (data?: Partial): _Input & Specification.Input; + new (model?: Partial): _Input & Specification.Input; }; diff --git a/src/lib/generated/classes/listen-task-listen.ts b/src/lib/generated/classes/listen-task-listen.ts index 2856db0d..8acfcc0c 100644 --- a/src/lib/generated/classes/listen-task-listen.ts +++ b/src/lib/generated/classes/listen-task-listen.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _ListenTaskListen extends _Reflector { - constructor(data?: Partial) { - super(data); +class _ListenTaskListen extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const ListenTaskListen = _ListenTaskListen as { - new (data?: Partial): _ListenTaskListen & Specification.ListenTaskListen; + new (model?: Partial): _ListenTaskListen & Specification.ListenTaskListen; }; diff --git a/src/lib/generated/classes/listen-task.ts b/src/lib/generated/classes/listen-task.ts index 0e0aef72..06a5b5e0 100644 --- a/src/lib/generated/classes/listen-task.ts +++ b/src/lib/generated/classes/listen-task.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _ListenTask extends _Reflector { - constructor(data?: Partial) { - super(data); +class _ListenTask extends TaskBase { + constructor(model?: Partial) { + super(model); } } export const ListenTask = _ListenTask as { - new (data?: Partial): _ListenTask & Specification.ListenTask; + new (model?: Partial): _ListenTask & Specification.ListenTask; }; diff --git a/src/lib/generated/classes/oauth2-token.ts b/src/lib/generated/classes/oauth2-token.ts index 4091cb96..64110cc9 100644 --- a/src/lib/generated/classes/oauth2-token.ts +++ b/src/lib/generated/classes/oauth2-token.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Oauth2Token extends _Reflector { - constructor(data?: Partial) { - super(data); +class _Oauth2Token extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const Oauth2Token = _Oauth2Token as { - new (data?: Partial): _Oauth2Token & Specification.Oauth2Token; + new (model?: Partial): _Oauth2Token & Specification.Oauth2Token; }; diff --git a/src/lib/generated/classes/output.ts b/src/lib/generated/classes/output.ts index c09cb8ac..55409106 100644 --- a/src/lib/generated/classes/output.ts +++ b/src/lib/generated/classes/output.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Output extends _Reflector { - constructor(data?: Partial) { - super(data); +class _Output extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const Output = _Output as { - new (data?: Partial): _Output & Specification.Output; + new (model?: Partial): _Output & Specification.Output; }; diff --git a/src/lib/generated/classes/raise-task-raise.ts b/src/lib/generated/classes/raise-task-raise.ts index 415a6e5f..a06f2040 100644 --- a/src/lib/generated/classes/raise-task-raise.ts +++ b/src/lib/generated/classes/raise-task-raise.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RaiseTaskRaise extends _Reflector { - constructor(data?: Partial) { - super(data); +class _RaiseTaskRaise extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const RaiseTaskRaise = _RaiseTaskRaise as { - new (data?: Partial): _RaiseTaskRaise & Specification.RaiseTaskRaise; + new (model?: Partial): _RaiseTaskRaise & Specification.RaiseTaskRaise; }; diff --git a/src/lib/generated/classes/raise-task.ts b/src/lib/generated/classes/raise-task.ts index 7a54543a..84a8f17d 100644 --- a/src/lib/generated/classes/raise-task.ts +++ b/src/lib/generated/classes/raise-task.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _RaiseTask extends _Reflector { - constructor(data?: Partial) { - super(data); +class _RaiseTask extends TaskBase { + constructor(model?: Partial) { + super(model); } } export const RaiseTask = _RaiseTask as { - new (data?: Partial): _RaiseTask & Specification.RaiseTask; + new (model?: Partial): _RaiseTask & Specification.RaiseTask; }; diff --git a/src/lib/generated/classes/retry-policy-backoff.ts b/src/lib/generated/classes/retry-policy-backoff.ts index a8688d97..cf30c777 100644 --- a/src/lib/generated/classes/retry-policy-backoff.ts +++ b/src/lib/generated/classes/retry-policy-backoff.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RetryPolicyBackoff extends _Reflector { - constructor(data?: Partial) { - super(data); +class _RetryPolicyBackoff extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const RetryPolicyBackoff = _RetryPolicyBackoff as { - new (data?: Partial): _RetryPolicyBackoff & Specification.RetryPolicyBackoff; + new (model?: Partial): _RetryPolicyBackoff & Specification.RetryPolicyBackoff; }; diff --git a/src/lib/generated/classes/retry-policy-jitter.ts b/src/lib/generated/classes/retry-policy-jitter.ts index 0e53f28b..c58e3673 100644 --- a/src/lib/generated/classes/retry-policy-jitter.ts +++ b/src/lib/generated/classes/retry-policy-jitter.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RetryPolicyJitter extends _Reflector { - constructor(data?: Partial) { - super(data); +class _RetryPolicyJitter extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const RetryPolicyJitter = _RetryPolicyJitter as { - new (data?: Partial): _RetryPolicyJitter & Specification.RetryPolicyJitter; + new (model?: Partial): _RetryPolicyJitter & Specification.RetryPolicyJitter; }; diff --git a/src/lib/generated/classes/retry-policy-limit-attempt.ts b/src/lib/generated/classes/retry-policy-limit-attempt.ts index 3be6d726..1cd7b765 100644 --- a/src/lib/generated/classes/retry-policy-limit-attempt.ts +++ b/src/lib/generated/classes/retry-policy-limit-attempt.ts @@ -1,14 +1,36 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RetryPolicyLimitAttempt extends _Reflector { - constructor(data?: Partial) { - super(data); +class _RetryPolicyLimitAttempt extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const RetryPolicyLimitAttempt = _RetryPolicyLimitAttempt as { new ( - data?: Partial, + model?: Partial, ): _RetryPolicyLimitAttempt & Specification.RetryPolicyLimitAttempt; }; diff --git a/src/lib/generated/classes/retry-policy-limit.ts b/src/lib/generated/classes/retry-policy-limit.ts index f84b69e3..79b16aaf 100644 --- a/src/lib/generated/classes/retry-policy-limit.ts +++ b/src/lib/generated/classes/retry-policy-limit.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RetryPolicyLimit extends _Reflector { - constructor(data?: Partial) { - super(data); +class _RetryPolicyLimit extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const RetryPolicyLimit = _RetryPolicyLimit as { - new (data?: Partial): _RetryPolicyLimit & Specification.RetryPolicyLimit; + new (model?: Partial): _RetryPolicyLimit & Specification.RetryPolicyLimit; }; diff --git a/src/lib/generated/classes/retry-policy.ts b/src/lib/generated/classes/retry-policy.ts index baa7c638..0373ccd0 100644 --- a/src/lib/generated/classes/retry-policy.ts +++ b/src/lib/generated/classes/retry-policy.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RetryPolicy extends _Reflector { - constructor(data?: Partial) { - super(data); +class _RetryPolicy extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const RetryPolicy = _RetryPolicy as { - new (data?: Partial): _RetryPolicy & Specification.RetryPolicy; + new (model?: Partial): _RetryPolicy & Specification.RetryPolicy; }; diff --git a/src/lib/generated/classes/run-task-run-container.ts b/src/lib/generated/classes/run-task-run-container.ts index 0fa769fe..6d58e668 100644 --- a/src/lib/generated/classes/run-task-run-container.ts +++ b/src/lib/generated/classes/run-task-run-container.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RunTaskRunContainer extends _Reflector { - constructor(data?: Partial) { - super(data); +class _RunTaskRunContainer extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const RunTaskRunContainer = _RunTaskRunContainer as { - new (data?: Partial): _RunTaskRunContainer & Specification.RunTaskRunContainer; + new (model?: Partial): _RunTaskRunContainer & Specification.RunTaskRunContainer; }; diff --git a/src/lib/generated/classes/run-task-run-script.ts b/src/lib/generated/classes/run-task-run-script.ts index e4158b14..881f9548 100644 --- a/src/lib/generated/classes/run-task-run-script.ts +++ b/src/lib/generated/classes/run-task-run-script.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RunTaskRunScript extends _Reflector { - constructor(data?: Partial) { - super(data); +class _RunTaskRunScript extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const RunTaskRunScript = _RunTaskRunScript as { - new (data?: Partial): _RunTaskRunScript & Specification.RunTaskRunScript; + new (model?: Partial): _RunTaskRunScript & Specification.RunTaskRunScript; }; diff --git a/src/lib/generated/classes/run-task-run-shell-arguments.ts b/src/lib/generated/classes/run-task-run-shell-arguments.ts index 53a807aa..9458a589 100644 --- a/src/lib/generated/classes/run-task-run-shell-arguments.ts +++ b/src/lib/generated/classes/run-task-run-shell-arguments.ts @@ -1,14 +1,36 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RunTaskRunShellArguments extends _Reflector { - constructor(data?: Partial) { - super(data); +class _RunTaskRunShellArguments extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const RunTaskRunShellArguments = _RunTaskRunShellArguments as { new ( - data?: Partial, + model?: Partial, ): _RunTaskRunShellArguments & Specification.RunTaskRunShellArguments; }; diff --git a/src/lib/generated/classes/run-task-run-shell-environment.ts b/src/lib/generated/classes/run-task-run-shell-environment.ts index 97f26019..887f77b8 100644 --- a/src/lib/generated/classes/run-task-run-shell-environment.ts +++ b/src/lib/generated/classes/run-task-run-shell-environment.ts @@ -1,14 +1,36 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RunTaskRunShellEnvironment extends _Reflector { - constructor(data?: Partial) { - super(data); +class _RunTaskRunShellEnvironment extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const RunTaskRunShellEnvironment = _RunTaskRunShellEnvironment as { new ( - data?: Partial, + model?: Partial, ): _RunTaskRunShellEnvironment & Specification.RunTaskRunShellEnvironment; }; diff --git a/src/lib/generated/classes/run-task-run-shell.ts b/src/lib/generated/classes/run-task-run-shell.ts index cba42998..34adc968 100644 --- a/src/lib/generated/classes/run-task-run-shell.ts +++ b/src/lib/generated/classes/run-task-run-shell.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RunTaskRunShell extends _Reflector { - constructor(data?: Partial) { - super(data); +class _RunTaskRunShell extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const RunTaskRunShell = _RunTaskRunShell as { - new (data?: Partial): _RunTaskRunShell & Specification.RunTaskRunShell; + new (model?: Partial): _RunTaskRunShell & Specification.RunTaskRunShell; }; diff --git a/src/lib/generated/classes/run-task-run-workflow-input.ts b/src/lib/generated/classes/run-task-run-workflow-input.ts index b5586feb..5af31aed 100644 --- a/src/lib/generated/classes/run-task-run-workflow-input.ts +++ b/src/lib/generated/classes/run-task-run-workflow-input.ts @@ -1,14 +1,36 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RunTaskRunWorkflowInput extends _Reflector { - constructor(data?: Partial) { - super(data); +class _RunTaskRunWorkflowInput extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const RunTaskRunWorkflowInput = _RunTaskRunWorkflowInput as { new ( - data?: Partial, + model?: Partial, ): _RunTaskRunWorkflowInput & Specification.RunTaskRunWorkflowInput; }; diff --git a/src/lib/generated/classes/run-task-run-workflow.ts b/src/lib/generated/classes/run-task-run-workflow.ts index 07c3ffc9..9e0b9872 100644 --- a/src/lib/generated/classes/run-task-run-workflow.ts +++ b/src/lib/generated/classes/run-task-run-workflow.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RunTaskRunWorkflow extends _Reflector { - constructor(data?: Partial) { - super(data); +class _RunTaskRunWorkflow extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const RunTaskRunWorkflow = _RunTaskRunWorkflow as { - new (data?: Partial): _RunTaskRunWorkflow & Specification.RunTaskRunWorkflow; + new (model?: Partial): _RunTaskRunWorkflow & Specification.RunTaskRunWorkflow; }; diff --git a/src/lib/generated/classes/run-task-run.ts b/src/lib/generated/classes/run-task-run.ts index 9b9745dc..8b1ff7ad 100644 --- a/src/lib/generated/classes/run-task-run.ts +++ b/src/lib/generated/classes/run-task-run.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RunTaskRun extends _Reflector { - constructor(data?: Partial) { - super(data); +class _RunTaskRun extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const RunTaskRun = _RunTaskRun as { - new (data?: Partial): _RunTaskRun & Specification.RunTaskRun; + new (model?: Partial): _RunTaskRun & Specification.RunTaskRun; }; diff --git a/src/lib/generated/classes/run-task.ts b/src/lib/generated/classes/run-task.ts index c5d2a862..eb0e0ef3 100644 --- a/src/lib/generated/classes/run-task.ts +++ b/src/lib/generated/classes/run-task.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _RunTask extends _Reflector { - constructor(data?: Partial) { - super(data); +class _RunTask extends TaskBase { + constructor(model?: Partial) { + super(model); } } export const RunTask = _RunTask as { - new (data?: Partial): _RunTask & Specification.RunTask; + new (model?: Partial): _RunTask & Specification.RunTask; }; diff --git a/src/lib/generated/classes/schedule.ts b/src/lib/generated/classes/schedule.ts index 0396e311..fe40e073 100644 --- a/src/lib/generated/classes/schedule.ts +++ b/src/lib/generated/classes/schedule.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Schedule extends _Reflector { - constructor(data?: Partial) { - super(data); +class _Schedule extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const Schedule = _Schedule as { - new (data?: Partial): _Schedule & Specification.Schedule; + new (model?: Partial): _Schedule & Specification.Schedule; }; diff --git a/src/lib/generated/classes/schema.ts b/src/lib/generated/classes/schema.ts index 7a8579bc..526fddac 100644 --- a/src/lib/generated/classes/schema.ts +++ b/src/lib/generated/classes/schema.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Schema extends _Reflector { - constructor(data?: Partial) { - super(data); +class _Schema extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const Schema = _Schema as { - new (data?: Partial): _Schema & Specification.Schema; + new (model?: Partial): _Schema & Specification.Schema; }; diff --git a/src/lib/generated/classes/set-task-set.ts b/src/lib/generated/classes/set-task-set.ts index 6e6b2e37..f5571c8b 100644 --- a/src/lib/generated/classes/set-task-set.ts +++ b/src/lib/generated/classes/set-task-set.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _SetTaskSet extends _Reflector { - constructor(data?: Partial) { - super(data); +class _SetTaskSet extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const SetTaskSet = _SetTaskSet as { - new (data?: Partial): _SetTaskSet & Specification.SetTaskSet; + new (model?: Partial): _SetTaskSet & Specification.SetTaskSet; }; diff --git a/src/lib/generated/classes/set-task.ts b/src/lib/generated/classes/set-task.ts index 6d720a3e..f99350a4 100644 --- a/src/lib/generated/classes/set-task.ts +++ b/src/lib/generated/classes/set-task.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _SetTask extends _Reflector { - constructor(data?: Partial) { - super(data); +class _SetTask extends TaskBase { + constructor(model?: Partial) { + super(model); } } export const SetTask = _SetTask as { - new (data?: Partial): _SetTask & Specification.SetTask; + new (model?: Partial): _SetTask & Specification.SetTask; }; diff --git a/src/lib/generated/classes/switch-task-switch-case.ts b/src/lib/generated/classes/switch-task-switch-case.ts new file mode 100644 index 00000000..6392a21b --- /dev/null +++ b/src/lib/generated/classes/switch-task-switch-case.ts @@ -0,0 +1,34 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; +import { Specification } from '../definitions'; + +class _SwitchTaskSwitchCase extends Hydrator { + constructor(model?: Partial) { + super(model); + } +} + +export const SwitchTaskSwitchCase = _SwitchTaskSwitchCase as { + new (model?: Partial): _SwitchTaskSwitchCase & Specification.SwitchTaskSwitchCase; +}; diff --git a/src/lib/generated/classes/switch-task-switch.ts b/src/lib/generated/classes/switch-task-switch.ts index a5b075d2..3aa5b6a2 100644 --- a/src/lib/generated/classes/switch-task-switch.ts +++ b/src/lib/generated/classes/switch-task-switch.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _SwitchTaskSwitch extends _Reflector { - constructor(data?: Partial) { - super(data); +class _SwitchTaskSwitch extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const SwitchTaskSwitch = _SwitchTaskSwitch as { - new (data?: Partial): _SwitchTaskSwitch & Specification.SwitchTaskSwitch; + new (model?: Partial): _SwitchTaskSwitch & Specification.SwitchTaskSwitch; }; diff --git a/src/lib/generated/classes/switch-task.ts b/src/lib/generated/classes/switch-task.ts index 4dd8bdc1..07da04e3 100644 --- a/src/lib/generated/classes/switch-task.ts +++ b/src/lib/generated/classes/switch-task.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _SwitchTask extends _Reflector { - constructor(data?: Partial) { - super(data); +class _SwitchTask extends TaskBase { + constructor(model?: Partial) { + super(model); } } export const SwitchTask = _SwitchTask as { - new (data?: Partial): _SwitchTask & Specification.SwitchTask; + new (model?: Partial): _SwitchTask & Specification.SwitchTask; }; diff --git a/src/lib/generated/classes/task-base.ts b/src/lib/generated/classes/task-base.ts index f3a94a89..23c7d90b 100644 --- a/src/lib/generated/classes/task-base.ts +++ b/src/lib/generated/classes/task-base.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _TaskBase extends _Reflector { - constructor(data?: Partial) { - super(data); +class _TaskBase extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const TaskBase = _TaskBase as { - new (data?: Partial): _TaskBase & Specification.TaskBase; + new (model?: Partial): _TaskBase & Specification.TaskBase; }; diff --git a/src/lib/generated/classes/task-list.ts b/src/lib/generated/classes/task-list.ts index 944908b9..509a5a14 100644 --- a/src/lib/generated/classes/task-list.ts +++ b/src/lib/generated/classes/task-list.ts @@ -1,12 +1,33 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { Specification } from '../definitions'; -class _TaskList extends _Reflector { - constructor(data?: Partial) { - super(data); +export class TaskList extends Array<{ [k: string]: Specification.Task }> { + constructor(model?: Array<{ [k: string]: Specification.Task }>) { + super(...(model || [])); + if (model != null && !Array.isArray(model)) { + throw new Error('The provided model should be an array'); + } + Object.setPrototypeOf(this, Object.create(TaskList.prototype)); } } - -export const TaskList = _TaskList as { - new (data?: Partial): _TaskList & Specification.TaskList; -}; diff --git a/src/lib/generated/classes/task.ts b/src/lib/generated/classes/task.ts index 0ae61bd9..8ddf8854 100644 --- a/src/lib/generated/classes/task.ts +++ b/src/lib/generated/classes/task.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Task extends _Reflector { - constructor(data?: Partial) { - super(data); +class _Task extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const Task = _Task as { - new (data?: Partial): _Task & Specification.Task; + new (model?: Partial): _Task & Specification.Task; }; diff --git a/src/lib/generated/classes/timeout.ts b/src/lib/generated/classes/timeout.ts index 722d4c20..e221cf8d 100644 --- a/src/lib/generated/classes/timeout.ts +++ b/src/lib/generated/classes/timeout.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Timeout extends _Reflector { - constructor(data?: Partial) { - super(data); +class _Timeout extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const Timeout = _Timeout as { - new (data?: Partial): _Timeout & Specification.Timeout; + new (model?: Partial): _Timeout & Specification.Timeout; }; diff --git a/src/lib/generated/classes/try-task-catch.ts b/src/lib/generated/classes/try-task-catch.ts index 97088428..9b2fe811 100644 --- a/src/lib/generated/classes/try-task-catch.ts +++ b/src/lib/generated/classes/try-task-catch.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _TryTaskCatch extends _Reflector { - constructor(data?: Partial) { - super(data); +class _TryTaskCatch extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const TryTaskCatch = _TryTaskCatch as { - new (data?: Partial): _TryTaskCatch & Specification.TryTaskCatch; + new (model?: Partial): _TryTaskCatch & Specification.TryTaskCatch; }; diff --git a/src/lib/generated/classes/try-task.ts b/src/lib/generated/classes/try-task.ts index c30bde0f..7d89658b 100644 --- a/src/lib/generated/classes/try-task.ts +++ b/src/lib/generated/classes/try-task.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _TryTask extends _Reflector { - constructor(data?: Partial) { - super(data); +class _TryTask extends TaskBase { + constructor(model?: Partial) { + super(model); } } export const TryTask = _TryTask as { - new (data?: Partial): _TryTask & Specification.TryTask; + new (model?: Partial): _TryTask & Specification.TryTask; }; diff --git a/src/lib/generated/classes/use-authentications.ts b/src/lib/generated/classes/use-authentications.ts index 2b2f3029..a7f7a81b 100644 --- a/src/lib/generated/classes/use-authentications.ts +++ b/src/lib/generated/classes/use-authentications.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _UseAuthentications extends _Reflector { - constructor(data?: Partial) { - super(data); +class _UseAuthentications extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const UseAuthentications = _UseAuthentications as { - new (data?: Partial): _UseAuthentications & Specification.UseAuthentications; + new (model?: Partial): _UseAuthentications & Specification.UseAuthentications; }; diff --git a/src/lib/generated/classes/use-errors.ts b/src/lib/generated/classes/use-errors.ts index 3f9d1fcc..c68c0556 100644 --- a/src/lib/generated/classes/use-errors.ts +++ b/src/lib/generated/classes/use-errors.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _UseErrors extends _Reflector { - constructor(data?: Partial) { - super(data); +class _UseErrors extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const UseErrors = _UseErrors as { - new (data?: Partial): _UseErrors & Specification.UseErrors; + new (model?: Partial): _UseErrors & Specification.UseErrors; }; diff --git a/src/lib/generated/classes/use-extensions.ts b/src/lib/generated/classes/use-extensions.ts index d13618ff..03653612 100644 --- a/src/lib/generated/classes/use-extensions.ts +++ b/src/lib/generated/classes/use-extensions.ts @@ -1,12 +1,33 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { Specification } from '../definitions'; -class _UseExtensions extends _Reflector { - constructor(data?: Partial) { - super(data); +export class UseExtensions extends Array<{ [k: string]: Specification.Extension }> { + constructor(model?: Array<{ [k: string]: Specification.Extension }>) { + super(...(model || [])); + if (model != null && !Array.isArray(model)) { + throw new Error('The provided model should be an array'); + } + Object.setPrototypeOf(this, Object.create(UseExtensions.prototype)); } } - -export const UseExtensions = _UseExtensions as { - new (data?: Partial): _UseExtensions & Specification.UseExtensions; -}; diff --git a/src/lib/generated/classes/use-functions.ts b/src/lib/generated/classes/use-functions.ts index 14279f81..15377f27 100644 --- a/src/lib/generated/classes/use-functions.ts +++ b/src/lib/generated/classes/use-functions.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _UseFunctions extends _Reflector { - constructor(data?: Partial) { - super(data); +class _UseFunctions extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const UseFunctions = _UseFunctions as { - new (data?: Partial): _UseFunctions & Specification.UseFunctions; + new (model?: Partial): _UseFunctions & Specification.UseFunctions; }; diff --git a/src/lib/generated/classes/use-retries.ts b/src/lib/generated/classes/use-retries.ts index 02a94d49..c01efc86 100644 --- a/src/lib/generated/classes/use-retries.ts +++ b/src/lib/generated/classes/use-retries.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _UseRetries extends _Reflector { - constructor(data?: Partial) { - super(data); +class _UseRetries extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const UseRetries = _UseRetries as { - new (data?: Partial): _UseRetries & Specification.UseRetries; + new (model?: Partial): _UseRetries & Specification.UseRetries; }; diff --git a/src/lib/generated/classes/use.ts b/src/lib/generated/classes/use.ts index 3e46dc1b..2ad2dea9 100644 --- a/src/lib/generated/classes/use.ts +++ b/src/lib/generated/classes/use.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Use extends _Reflector { - constructor(data?: Partial) { - super(data); +class _Use extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const Use = _Use as { - new (data?: Partial): _Use & Specification.Use; + new (model?: Partial): _Use & Specification.Use; }; diff --git a/src/lib/generated/classes/wait-task.ts b/src/lib/generated/classes/wait-task.ts index eaa7e6f1..cacee4d0 100644 --- a/src/lib/generated/classes/wait-task.ts +++ b/src/lib/generated/classes/wait-task.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _WaitTask extends _Reflector { - constructor(data?: Partial) { - super(data); +class _WaitTask extends TaskBase { + constructor(model?: Partial) { + super(model); } } export const WaitTask = _WaitTask as { - new (data?: Partial): _WaitTask & Specification.WaitTask; + new (model?: Partial): _WaitTask & Specification.WaitTask; }; diff --git a/src/lib/generated/classes/workflow.ts b/src/lib/generated/classes/workflow.ts index d3b8c39c..3bbe7e38 100644 --- a/src/lib/generated/classes/workflow.ts +++ b/src/lib/generated/classes/workflow.ts @@ -1,12 +1,34 @@ -import { _Reflector } from '../../reflector'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Workflow extends _Reflector { - constructor(data?: Partial) { - super(data); +class _Workflow extends Hydrator { + constructor(model?: Partial) { + super(model); } } export const Workflow = _Workflow as { - new (data?: Partial): _Workflow & Specification.Workflow; + new (model?: Partial): _Workflow & Specification.Workflow; }; diff --git a/src/lib/generated/definitions/specification.ts b/src/lib/generated/definitions/specification.ts index 29604730..63724ccb 100644 --- a/src/lib/generated/definitions/specification.ts +++ b/src/lib/generated/definitions/specification.ts @@ -254,32 +254,10 @@ export type SwitchTask = TaskBase & { */ export type SwitchTaskSwitch = [ { - [k: string]: { - /** - * The case's name. - */ - name?: string; - /** - * A runtime expression used to determine whether or not the case matches. - */ - when?: string; - then?: FlowDirective; - [k: string]: unknown; - }; + [k: string]: SwitchTaskSwitchCase; }, ...{ - [k: string]: { - /** - * The case's name. - */ - name?: string; - /** - * A runtime expression used to determine whether or not the case matches. - */ - when?: string; - then?: FlowDirective; - [k: string]: unknown; - }; + [k: string]: SwitchTaskSwitchCase; }[], ]; /** @@ -923,6 +901,18 @@ export interface RunTaskRunWorkflowInput { export interface SetTaskSet { [k: string]: unknown; } +export interface SwitchTaskSwitchCase { + /** + * The case's name. + */ + name?: string; + /** + * A runtime expression used to determine whether or not the case matches. + */ + when?: string; + then?: FlowDirective; + [k: string]: unknown; +} export interface TryTaskCatch { errors?: { [k: string]: unknown; diff --git a/src/lib/generated/schema/__internal_workflow.json b/src/lib/generated/schema/__internal_workflow.json index 2dc8debc..b6179138 100644 --- a/src/lib/generated/schema/__internal_workflow.json +++ b/src/lib/generated/schema/__internal_workflow.json @@ -1026,9 +1026,10 @@ "$ref": "#/$defs/flowDirective", "description": "The flow directive to execute when the case matches.", "type": "object", - "title": "SwitchTaskSwitchThen" + "title": "SwitchTaskSwitchCaseThen" } - } + }, + "title": "SwitchTaskSwitchCase" } }, "title": "SwitchTaskSwitch" diff --git a/src/lib/hydrator.ts b/src/lib/hydrator.ts new file mode 100644 index 00000000..00ed91f5 --- /dev/null +++ b/src/lib/hydrator.ts @@ -0,0 +1,12 @@ +import { isObject } from './utils'; + +/** + * A base class used for hydration + */ +export class Hydrator { + constructor(model?: Partial) { + if (isObject(model)) { + Object.assign(this, model); + } + } +} diff --git a/src/lib/reflector.ts b/src/lib/reflector.ts deleted file mode 100644 index 5337e8ee..00000000 --- a/src/lib/reflector.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { isObject } from './utils'; - -/** - * A class used to reflect the parameter type - * see https://stackoverflow.com/questions/54207173/classes-keyof-in-typescript/54207465#54207465 - */ -export class _Reflector { - constructor(model?: Partial) { - if (isObject(model)) { - Object.assign(this, model); - } - } -} diff --git a/src/lib/validation.ts b/src/lib/validation.ts index 53c50a78..df4b7dfd 100644 --- a/src/lib/validation.ts +++ b/src/lib/validation.ts @@ -1,28 +1,14 @@ -import Ajv, { Options, ValidateFunction } from 'ajv/dist/2020'; +import Ajv, { ValidateFunction } from 'ajv/dist/2020'; import addFormats from 'ajv-formats'; import workflowSchema from './generated/schema/workflow.json'; -//import internalWorkflowSchema from './generated/schema/__internal_workflow.json'; import { validationPointers } from './generated/validation'; -const options: Options = { - strict: false, - // removeAdditional: true, // if enabled, validateFn(JSON.parse(JSON.stringify(data))) should be replaced - // useDefaults: true, -}; -// uses the original schema, might be missing some "titles" const ajv = new Ajv({ schemas: [workflowSchema], - ...options, + strict: false, }); addFormats(ajv); -// // uses an altered version of the JSON Schema, might introduce unwanted results -// const __internal_ajv = new Ajv({ -// schemas: [internalWorkflowSchema], -// ...options -// }); -// addFormats(__internal_ajv); - /** * A Map of validation functions, where the key is the name of the schema to validate with */ @@ -30,7 +16,6 @@ export const validators: Map = new Map { if (!jsonPointer) throw `No JSON pointer provided for type '${typeName}'`; const validate = ajv.getSchema(jsonPointer); - // if (!validate) validate = __internal_ajv.getSchema(jsonPointer); if (!validate) throw `Unable to find schema '${jsonPointer}' for type '${typeName}'`; return [typeName, validate as ValidateFunction]; }), diff --git a/tests/builders/builder.spec.ts b/tests/builders/builder.spec.ts index 571d8f65..28c79ccf 100644 --- a/tests/builders/builder.spec.ts +++ b/tests/builders/builder.spec.ts @@ -26,17 +26,17 @@ type Person = { }; const darknessMyOldFriend = { name: 'Darkness', age: 999 }; -const isPerson = (data: Partial): data is Person => !!data.name && !!data.age; -function personBuildingFn(data: Partial): Person { - if (!isPerson(data)) { +const isPerson = (model: Partial): model is Person => !!model.name && !!model.age; +function personBuildingFn(model: Partial): Person { + if (!isPerson(model)) { throw new Error('The provided object is not a person'); } return { - ...data, - friends: [...(data.friends || []), darknessMyOldFriend], + ...model, + friends: [...(model.friends || []), darknessMyOldFriend], }; } -const personBuilder = (): Builder => builder(personBuildingFn); +const personBuilder = (model?: Partial): Builder => builder(model, personBuildingFn); describe('builder proxy', () => { it('should infer property types', () => { diff --git a/tests/builders/call-http-builder.spec.ts b/tests/builders/call-http-builder.spec.ts index bd7d74fd..19a0b68d 100644 --- a/tests/builders/call-http-builder.spec.ts +++ b/tests/builders/call-http-builder.spec.ts @@ -1,8 +1,8 @@ -import { callHTTPBuilder } from '../../src/lib/generated/builders/call-http-builder'; +import { callHTTPBuilder } from '../../src/lib/generated/builders'; import { Classes } from '../../src/lib/generated/classes'; describe('CallHTTP builder', () => { - it('should build', () => { + it('should build with fluent api', () => { const endpoint = 'https://serverlessworkflow.io'; const method = 'get'; const callHttp = callHTTPBuilder() @@ -13,11 +13,30 @@ describe('CallHTTP builder', () => { }) .build(); expect(callHttp).toBeDefined(); + expect(callHttp).toBeInstanceOf(Classes.CallHTTP); expect(callHttp.call).toBe('http'); expect(callHttp.with).toBeDefined(); expect(callHttp.with!.endpoint).toBe(endpoint); expect(callHttp.with!.method).toBe(method); + }); + + it('should build with input', () => { + const endpoint = 'https://serverlessworkflow.io'; + const method = 'get'; + const data = { + call: 'http' as 'http', + with: { + endpoint, + method, + }, + }; + const callHttp = callHTTPBuilder(data).build(); + expect(callHttp).toBeDefined(); expect(callHttp).toBeInstanceOf(Classes.CallHTTP); + expect(callHttp.call).toBe('http'); + expect(callHttp.with).toBeDefined(); + expect(callHttp.with!.endpoint).toBe(endpoint); + expect(callHttp.with!.method).toBe(method); }); it('should validate', () => { diff --git a/tests/builders/use-extensions-builder.spec.ts b/tests/builders/use-extensions-builder.spec.ts new file mode 100644 index 00000000..127f98c5 --- /dev/null +++ b/tests/builders/use-extensions-builder.spec.ts @@ -0,0 +1,38 @@ +import { useExtensionsBuilder } from '../../src/lib/generated/builders'; +import { Classes } from '../../src/lib/generated/classes'; + +describe('UseExtensions builder', () => { + it('should build with fluent api', () => { + const extension = { + myExtension: { + extend: 'call' as 'call', + }, + }; + const useExtensions = useExtensionsBuilder().push(extension).build(); + expect(useExtensions).toBeDefined(); + expect(useExtensions).toBeInstanceOf(Classes.UseExtensions); + expect(useExtensions.length).toBe(1); + expect(useExtensions[0].myExtension).toEqual(extension.myExtension); + }); + + it('should build with input', () => { + const extension = { + myExtension: { + extend: 'call' as 'call', + }, + }; + const useExtensions = useExtensionsBuilder([extension]).build(); + expect(useExtensions).toBeDefined(); + expect(useExtensions).toBeInstanceOf(Classes.UseExtensions); + expect(useExtensions.length).toBe(1); + expect(useExtensions[0].myExtension).toEqual(extension.myExtension); + }); + + it('should throw with non-array', () => { + const test = () => { + useExtensionsBuilder({ foo: 'bar' } as any).build(); + }; + expect(test).toThrow(Error); + expect(test).toThrow('The provided model should be an array'); + }); +}); diff --git a/tests/classes/use-extensions.spec.ts b/tests/classes/use-extensions.spec.ts new file mode 100644 index 00000000..fba10387 --- /dev/null +++ b/tests/classes/use-extensions.spec.ts @@ -0,0 +1,14 @@ +import { type } from 'ts-inference-check'; +import { Classes } from '../../src/lib/generated/classes'; +import { Specification } from '../../src/lib/generated/definitions'; + +describe('UseExtensions class', () => { + it('should be an instance of UseExtensions', () => { + const useExtensions = new Classes.UseExtensions(); + expect(useExtensions).toBeInstanceOf(Classes.UseExtensions); + expect(useExtensions.length).toBe(0); + expect(type(useExtensions.push).is<(...items: { [k: string]: Specification.Extension }[]) => number>(true)).toBe( + true, + ); + }); +}); diff --git a/tools/2_generate-definitions.ts b/tools/2_generate-definitions.ts index 7e38ce7b..f51cabdf 100644 --- a/tools/2_generate-definitions.ts +++ b/tools/2_generate-definitions.ts @@ -17,7 +17,7 @@ import { compile, JSONSchema, Options } from 'json-schema-to-typescript'; import { promises as fsPromises } from 'fs'; import * as path from 'path'; -import { fileHeader } from './consts'; +import { fileHeader, inFileDisclaimer } from './consts'; import { definitionsDir, isObject, reset, schemaDir, toPascalCase } from './utils'; const { writeFile, readFile } = fsPromises; @@ -75,7 +75,9 @@ function prepareSchema(schema: any, path: string[] = ['#'], parentTitle: string const newSchema = JSON.parse(JSON.stringify(schema)); const parent = path.slice(-1)[0]; const schemaKeys = Object.keys(newSchema); - if (!structuralObjectProperties.includes(parent)) { + const isItemWithAdditionalProperties = + parent === 'additionalProperties' && path.slice(-2)[0] === 'items' && newSchema.properties; // only "useful" for SwitchTask.Switch.Cases + if (!structuralObjectProperties.includes(parent) || isItemWithAdditionalProperties) { if (!newSchema.type && !newSchema.oneOf && !newSchema.anyOf && !newSchema.allOf) { // not necessary ? newSchema.type = 'object'; @@ -93,7 +95,8 @@ function prepareSchema(schema: any, path: string[] = ['#'], parentTitle: string schemaKeys.filter((key) => !metadataProperties.includes(key)).length // if it's just a plain object, with nothing but a type an some description ) { if (parentTitle.trim()) { - newSchema.title = toPascalCase(`${parentTitle} ${parent}`); + let title = !isItemWithAdditionalProperties ? parent : path.includes('switch') ? 'case' : 'item'; + newSchema.title = toPascalCase(`${parentTitle} ${title}`); } else { newSchema.title = toPascalCase( path @@ -169,12 +172,7 @@ async function generate(srcFile: string, destFile: string): Promise { customName: (schema: JSONSchema, keyNameFromDefinition: string | undefined) => schema.$id?.includes('serverlessworkflow.io') ? 'Workflow' : keyNameFromDefinition, bannerComment: `${fileHeader} - - /***************************************************************************************** - * - * /!\\ This file is computer generated. Any manual modification can and will be lost. /!\\ - * - *****************************************************************************************/ +${inFileDisclaimer} `, style: { diff --git a/tools/3_generate-validation-pointers.ts b/tools/3_generate-validation-pointers.ts index d60cd0f8..3974c420 100644 --- a/tools/3_generate-validation-pointers.ts +++ b/tools/3_generate-validation-pointers.ts @@ -16,7 +16,7 @@ import { promises as fsPromises } from 'fs'; import * as path from 'path'; -import { fileHeader } from './consts'; +import { fileHeader, inFileDisclaimer } from './consts'; import { definitionsDir, getExportedDeclarations, isObject, reset, schemaDir, vallidationDir } from './utils'; import { JSONSchema } from 'json-schema-to-typescript'; @@ -62,7 +62,7 @@ function getJsonPointer(schema: JSONSchema, title: string, parentPointer: string async function generate(schemaFile: string, definitionFile: string, destFile: string): Promise { const definitions = await readFile(definitionFile, { encoding: 'utf-8' }); const schemaTxt = await readFile(schemaFile, { encoding: 'utf-8' }); - const declarations = getExportedDeclarations(definitions) + const declarations = Array.from(getExportedDeclarations(definitions).keys()) .filter((name) => name !== 'Workflow') .sort((a, b) => a.localeCompare(b)); const schema = JSON.parse(schemaTxt) as JSONSchema; @@ -72,6 +72,8 @@ async function generate(schemaFile: string, definitionFile: string, destFile: st ...declarations.map((name) => [name, getJsonPointer(schema, name, baseUri)]), ]; const validationPointersSrc = `${fileHeader} +${inFileDisclaimer} + /** * A map of type names and their corresponding schema */ diff --git a/tools/4_generate-classes.ts b/tools/4_generate-classes.ts index 6a8359ae..68844b58 100644 --- a/tools/4_generate-classes.ts +++ b/tools/4_generate-classes.ts @@ -16,7 +16,7 @@ import { promises as fsPromises } from 'fs'; import * as path from 'path'; -import { fileHeader } from './consts'; +import { fileHeader, inFileDisclaimer } from './consts'; import { classesDir, definitionsDir, @@ -28,37 +28,82 @@ import { const { writeFile, readFile } = fsPromises; -const getClassDeclaration = (className: string): string => `import { _Reflector } from "../../reflector"; +/** + * Returns the declaration for a class + * @param name The name of the class + * @param baseClass The inherited class, if any + * @returns The declaration of the class + */ +const getObjectClassDeclaration = (name: string, baseClass?: string): string => + `${fileHeader} +${inFileDisclaimer} + +${baseClass ? `import { ${baseClass} } from './${toKebabCase(normalizeKnownAllCaps(baseClass))}';` : 'import { Hydrator } from "../../hydrator";'} import { Specification } from "../definitions"; -class _${className} extends _Reflector { - constructor(data?: Partial) { - super(data); +class _${name} extends ${baseClass ? baseClass : `Hydrator`} { + constructor(model?: Partial) { + super(model); } } -export const ${className} = _${className} as ({ - new (data?: Partial): _${className} & Specification.${className} +export const ${name} = _${name} as ({ + new (model?: Partial): _${name} & Specification.${name} });`; /** - * Generates empty classes. Used - * @param definitionFile - * @param destDir + * Returns the declaration for a class that behaves like an array + * @param name The name of the class + * @param arrayType The type parameter of the underlying array + * @returns The declaration of the array-like class + */ +const getArrayLikeClassDeclaration = (name: string, arrayType: string): string => + `${fileHeader} +${inFileDisclaimer} + +import { Specification } from "../definitions"; + +export class ${name} extends Array<${arrayType}> { + constructor(model?: Array<${arrayType}>) { + super(...(model||[])); + if (model != null && !Array.isArray(model)) { + throw new Error('The provided model should be an array'); + } + Object.setPrototypeOf(this, Object.create(${name}.prototype)); + } +} +`; + +/** + * Generates classes + * @param definitionFile The declaration file to generate the classes from + * @param destDir The directory to save the declaration at */ async function generate(definitionFile: string, destDir: string): Promise { const definitions = await readFile(definitionFile, { encoding: 'utf-8' }); - const declarations = getExportedDeclarations(definitions); + const exportedDeclarations = getExportedDeclarations(definitions); + const aliases = Array.from(exportedDeclarations.keys()); await reset(destDir); - for (const declaration of declarations) { - const classSrc = getClassDeclaration(declaration); - const destFile = path.resolve(destDir, toKebabCase(normalizeKnownAllCaps(declaration)) + '.ts'); - await writeFile(destFile, classSrc); + for (const [alias, exported] of exportedDeclarations) { + const exportedType = exported![0].getType(); + let classDeclaration: string = ''; + if (!exportedType.isArray()) { + const baseClass = exportedType.getIntersectionTypes()?.[0]?.getText().replace('import("/declarations").', ''); + classDeclaration = getObjectClassDeclaration(alias, baseClass); + } else { + const arrayType = exportedType + .getArrayElementTypeOrThrow() + .getText() + .replace('import("/declarations")', 'Specification'); + classDeclaration = getArrayLikeClassDeclaration(alias, arrayType); + } + const destFile = path.resolve(destDir, toKebabCase(normalizeKnownAllCaps(alias)) + '.ts'); + await writeFile(destFile, classDeclaration); } const indexSrc = `${fileHeader} -${declarations.reduce((imports, declaration) => `${imports}import { ${declaration} } from './${toKebabCase(normalizeKnownAllCaps(declaration))}';\n`, '')} +${aliases.reduce((imports, alias) => `${imports}import { ${alias} } from './${toKebabCase(normalizeKnownAllCaps(alias))}';\n`, '')} export const Classes = { - ${declarations.reduce((exports, declaration) => `${exports} ${declaration},\n`, '')} + ${aliases.reduce((exports, alias) => `${exports} ${alias},\n`, '')} };`; const destFile = path.resolve(destDir, 'index.ts'); await writeFile(destFile, indexSrc); diff --git a/tools/5_generate-builders.ts b/tools/5_generate-builders.ts index 5d64535f..f4011287 100644 --- a/tools/5_generate-builders.ts +++ b/tools/5_generate-builders.ts @@ -16,7 +16,7 @@ import { promises as fsPromises } from 'fs'; import * as path from 'path'; -import { fileHeader } from './consts'; +import { fileHeader, inFileDisclaimer } from './consts'; import { buildersDir, definitionsDir, @@ -28,23 +28,9 @@ import { const { readFile, writeFile } = fsPromises; -interface BuilderExtension { - import?: string; - preValidate: string; -} - -/** Stores additional code that needs to be added to builders depending on their type */ -const buildersExtensions: { [key: string]: BuilderExtension } = { - Dummy: { - // example - import: `import { dummyFunction } from '../definitions/utils';`, - preValidate: `\r\n dummyFunction(model);`, - }, -}; - /** * Transforms PascalCase into camelCase - * @param {string} value A PascalCase string + * @para value A PascalCase string * @returns A camelCase string */ function toCamelCase(value: string): string { @@ -54,42 +40,66 @@ function toCamelCase(value: string): string { } /** - * Creates a builder for the provided type - * @param {string} destDir The builders directory - * @param {string} declaration The type to create the builder for - * @returns {void} + * Creates an object builder for the provided type + * @param name The name type to create the builder for */ -async function createBuilder(destDir: string, declaration: string): Promise { - const camelType = toCamelCase(declaration); - const extension = buildersExtensions[declaration]; - const builderCode = - fileHeader + - `import { builder, Builder } from "../../builder"; +const getObjectBuilderDeclaration = (name: string): string => + `${fileHeader} +${inFileDisclaimer} + +import { builder, Builder } from "../../builder"; import { validate } from "../../validation"; import { Classes } from "../classes"; import { Specification } from "../definitions"; -${extension?.import ? extension.import + '\n' : ''} + /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.${declaration}} data The underlying object - * @returns {Specification.${declaration}} The validated underlying object + * @param {Specification.${name}} model The underlying object + * @returns {Specification.${name}} The validated underlying object */ -function buildingFn(data: Specification.${declaration}): Specification.${declaration} { - const model = new Classes.${declaration}(data); - ${extension?.preValidate || ''} - validate('${declaration}', model); - return model as Specification.${declaration}; +function buildingFn(model: Specification.${name}): Specification.${name} { + const instance = new Classes.${name}(model); + validate('${name}', instance); + return instance as Specification.${name}; } /** - * A factory to create a builder proxy for the type \`Specification.${declaration}\` - * @returns {Specification.${declaration}} A builder for \`Specification.${declaration}\` + * A factory to create a builder proxy for the type \`Specification.${name}\` + * @returns {Builder} A builder for \`Specification.${name}\` + */ +export const ${toCamelCase(name)}Builder = (model?: Partial): Builder => builder(model, buildingFn);`; + +/** + * Creates an array builder for the provided type + * @param name The name type to create the builder for + * @param arrayType The type parameter of the underlying array + */ +const getArrayBuilderDeclaration = (name: string, arrayType: string): string => + `${fileHeader} +${inFileDisclaimer} + +import { arrayBuilder, ArrayBuilder } from "../../builder"; +import { validate } from "../../validation"; +import { Classes } from "../classes"; +import { Specification } from "../definitions"; + +/** + * The internal function used by the builder proxy to validate and return its underlying array + * @param {Specification.${name}} model The underlying array + * @returns {Specification.${name}} The validated underlying array */ -export const ${camelType}Builder = (): Builder => builder(buildingFn);`; - const destFile = path.resolve(destDir, toKebabCase(normalizeKnownAllCaps(declaration)) + '-builder.ts'); - await writeFile(destFile, builderCode); +function buildingFn(model: Specification.${name}): Specification.${name} { + const instance = new Classes.${name}(model); + validate('${name}', instance); + return instance as Specification.${name}; } +/** + * A factory to create a builder proxy for the type \`Specification.${name}\` + * @returns {ArrayBuilder} A builder for \`Specification.${name}\` + */ +export const ${toCamelCase(name)}Builder = (model?: Specification.${name}): ArrayBuilder<${arrayType}> => arrayBuilder<${arrayType}>(model, buildingFn);`; + /** * Creates the builders index file * @param destDir The builders directory @@ -123,9 +133,24 @@ async function generate(definitionFile: string, destDir: string): Promise try { await reset(destDir); const definitions = await readFile(definitionFile, { encoding: 'utf-8' }); - const declarations = getExportedDeclarations(definitions); - await Promise.all(declarations.map(createBuilder.bind(null, destDir))); - createIndex(destDir, declarations); + const exportedDeclarations = getExportedDeclarations(definitions); + const aliases = Array.from(exportedDeclarations.keys()); + for (const [alias, exported] of exportedDeclarations) { + const exportedType = exported![0].getType(); + let builderDeclaration: string = ''; + if (!exportedType.isArray()) { + builderDeclaration = getObjectBuilderDeclaration(alias); + } else { + const arrayType = exportedType + .getArrayElementTypeOrThrow() + .getText() + .replace('import("/declarations")', 'Specification'); + builderDeclaration = getArrayBuilderDeclaration(alias, arrayType); + } + const destFile = path.resolve(destDir, toKebabCase(normalizeKnownAllCaps(alias)) + '-builder.ts'); + await writeFile(destFile, builderDeclaration); + } + createIndex(destDir, aliases); return Promise.resolve(); } catch (ex) { return Promise.reject(ex); diff --git a/tools/README.md b/tools/README.md index ab9e4492..715af84d 100644 --- a/tools/README.md +++ b/tools/README.md @@ -48,7 +48,7 @@ After phases 1 & 2, the mutated schema is passed to `json-schema-to-typescript` > *(i) The declarations are saved in `src/lib/generated/definitions/specification.ts`.* ## 3. Generating Validators -To validate an object of type `T`, where `T` is not the root object described by the JSON Schema, we need to know the subschema's JSON pointer corresponding to `T`. The exported declarations of the TypeScript file produced in [step 2](#2-generating-types) are extracted using `ts-morph`. *(This is probably overkill; a regex could probably do the trick, but this library might be useful later on.)* For each declaration, the internal JSON Schema produced in [step 2 - Phase 1](#phase-1-embellishing-the-json-schema) is crawled to find the object with the matching title. Then, an object where the keys are the names of the types and the values are their JSON pointers is saved as `validation-pointers.ts`. +To validate an object of type `T`, where `T` is not the root object described by the JSON Schema, we need to know the subschema's JSON pointer corresponding to `T`. The exported declarations of the TypeScript file produced in [step 2](#2-generating-types) are extracted using `ts-morph`. *(At this point, it is probably overkill; a regex could probably do the trick, but this library will be useful later on.)* For each declaration, the internal JSON Schema produced in [step 2 - Phase 1](#phase-1-embellishing-the-json-schema) is crawled to find the object with the matching title. Then, an object where the keys are the names of the types and the values are their JSON pointers is saved as `validation-pointers.ts`. > *(i) The validation pointers are saved in `src/lib/generated/validation/validation-pointers.ts`.* @@ -80,6 +80,16 @@ const fooInstance = new FooClass(); console.log(fooInstance instanceof FooClass); // true ``` +For array types, it's a bit different. Here the challenge is to extend `Array` but enforce our prototype: +```typescript +export class Foo extends Array { + constructor(model?: Array) { + super(...(model||[])); + Object.setPrototypeOf(this, Object.create(Foo.prototype)); + } +} +``` + At the moment, classes don't do anything else. Validation, for instance, is called by the builders (next step). In the future, validation will be migrated to the classes, along with recursive hydration and default values handling. > *(i) The classes are saved in `src/lib/generated/classes/`.* diff --git a/tools/consts.ts b/tools/consts.ts index 0b94bee5..5c9ae18d 100644 --- a/tools/consts.ts +++ b/tools/consts.ts @@ -31,5 +31,13 @@ export const fileHeader = `/* `; +export const inFileDisclaimer = ` + /***************************************************************************************** + * + * /!\\ This file is computer generated. Any manual modification can and will be lost. /!\\ + * + *****************************************************************************************/ + `; + export const readMeDisclaimer = `# Auto generated notice This directory and its content has been generated automatically. Do not modify its content, it WILL be lost.`; diff --git a/tools/utils.ts b/tools/utils.ts index 8941e114..6aa46a7d 100644 --- a/tools/utils.ts +++ b/tools/utils.ts @@ -21,7 +21,7 @@ import { readMeDisclaimer } from './consts'; import { URL } from 'url'; import yargs from 'yargs'; import { schemaVersion } from '../package.json'; -import { Project, QuoteKind } from 'ts-morph'; +import { ExportedDeclarations, Project, QuoteKind } from 'ts-morph'; const { writeFile, mkdir } = fsPromises; @@ -84,7 +84,7 @@ export const normalizeKnownAllCaps = (source: string): string => * @param tsSource The TypeScript code to parse * @returns An array containing the name of the exported declarations */ -export const getExportedDeclarations = (tsSource: string): Array => { +export const getExportedDeclarations = (tsSource: string): ReadonlyMap => { const project = new Project({ useInMemoryFileSystem: true, manipulationSettings: { @@ -92,7 +92,7 @@ export const getExportedDeclarations = (tsSource: string): Array => { }, }); const sourceFile = project.createSourceFile('declarations.ts', tsSource); - return Array.from(sourceFile.getExportedDeclarations()).map(([name]) => name); + return sourceFile.getExportedDeclarations(); }; /** Schemas directory */ From 4523ef9a60ead402f6ea2aca8870420eabe97c13 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Sun, 28 Jul 2024 19:16:30 +0200 Subject: [PATCH 08/24] Changed class name approach Signed-off-by: Jean-Baptiste Bianchi --- .github/workflows/node-ci.yml | 2 +- .github/workflows/npmjs-release.yml | 2 +- .../classes/authentication-policy-basic.ts | 6 +- .../classes/authentication-policy-bearer.ts | 6 +- .../authentication-policy-oauth2-client.ts | 6 +- .../classes/authentication-policy-oauth2.ts | 6 +- .../classes/authentication-policy.ts | 6 +- .../call-async-api-with-authentication.ts | 6 +- .../generated/classes/call-async-api-with.ts | 6 +- src/lib/generated/classes/call-async-api.ts | 8 +- .../generated/classes/call-function-with.ts | 6 +- src/lib/generated/classes/call-function.ts | 8 +- .../classes/call-grpc-with-arguments.ts | 6 +- .../call-grpc-with-service-authentication.ts | 6 +- .../classes/call-grpc-with-service.ts | 6 +- src/lib/generated/classes/call-grpc-with.ts | 6 +- src/lib/generated/classes/call-grpc.ts | 8 +- .../classes/call-http-with-endpoint.ts | 6 +- src/lib/generated/classes/call-http-with.ts | 6 +- src/lib/generated/classes/call-http.ts | 8 +- .../call-open-api-with-authentication.ts | 6 +- .../classes/call-open-api-with-parameters.ts | 6 +- .../generated/classes/call-open-api-with.ts | 6 +- src/lib/generated/classes/call-open-api.ts | 8 +- src/lib/generated/classes/call-task.ts | 6 +- src/lib/generated/classes/do-task.ts | 8 +- src/lib/generated/classes/document-tags.ts | 6 +- src/lib/generated/classes/document.ts | 6 +- src/lib/generated/classes/duration.ts | 6 +- .../generated/classes/emit-task-emit-event.ts | 6 +- src/lib/generated/classes/emit-task-emit.ts | 6 +- src/lib/generated/classes/emit-task.ts | 8 +- .../classes/endpoint-authentication.ts | 6 +- src/lib/generated/classes/endpoint.ts | 6 +- src/lib/generated/classes/error.ts | 6 +- .../classes/event-consumption-strategy-all.ts | 4 +- .../classes/event-consumption-strategy-any.ts | 4 +- .../classes/event-consumption-strategy.ts | 6 +- .../classes/event-filter-correlate.ts | 6 +- .../generated/classes/event-filter-with.ts | 6 +- src/lib/generated/classes/event-filter.ts | 6 +- src/lib/generated/classes/export.ts | 6 +- src/lib/generated/classes/extension.ts | 6 +- .../external-resource-authentication.ts | 6 +- .../generated/classes/external-resource.ts | 6 +- src/lib/generated/classes/flow-directive.ts | 6 +- src/lib/generated/classes/for-task-for.ts | 6 +- src/lib/generated/classes/for-task.ts | 8 +- src/lib/generated/classes/fork-task-fork.ts | 6 +- src/lib/generated/classes/fork-task.ts | 8 +- src/lib/generated/classes/index.ts | 360 +++++++++--------- src/lib/generated/classes/input.ts | 6 +- .../generated/classes/listen-task-listen.ts | 6 +- src/lib/generated/classes/listen-task.ts | 8 +- src/lib/generated/classes/oauth2-token.ts | 6 +- src/lib/generated/classes/output.ts | 6 +- src/lib/generated/classes/raise-task-raise.ts | 6 +- src/lib/generated/classes/raise-task.ts | 8 +- .../generated/classes/retry-policy-backoff.ts | 6 +- .../generated/classes/retry-policy-jitter.ts | 6 +- .../classes/retry-policy-limit-attempt.ts | 6 +- .../generated/classes/retry-policy-limit.ts | 6 +- src/lib/generated/classes/retry-policy.ts | 6 +- .../classes/run-task-run-container.ts | 6 +- .../generated/classes/run-task-run-script.ts | 6 +- .../classes/run-task-run-shell-arguments.ts | 6 +- .../classes/run-task-run-shell-environment.ts | 6 +- .../generated/classes/run-task-run-shell.ts | 6 +- .../classes/run-task-run-workflow-input.ts | 6 +- .../classes/run-task-run-workflow.ts | 6 +- src/lib/generated/classes/run-task-run.ts | 6 +- src/lib/generated/classes/run-task.ts | 8 +- src/lib/generated/classes/schedule.ts | 6 +- src/lib/generated/classes/schema.ts | 6 +- src/lib/generated/classes/set-task-set.ts | 6 +- src/lib/generated/classes/set-task.ts | 8 +- .../classes/switch-task-switch-case.ts | 6 +- .../generated/classes/switch-task-switch.ts | 6 +- src/lib/generated/classes/switch-task.ts | 8 +- src/lib/generated/classes/task-base.ts | 6 +- src/lib/generated/classes/task-list.ts | 4 +- src/lib/generated/classes/task.ts | 6 +- src/lib/generated/classes/timeout.ts | 6 +- src/lib/generated/classes/try-task-catch.ts | 6 +- src/lib/generated/classes/try-task.ts | 8 +- .../generated/classes/use-authentications.ts | 6 +- src/lib/generated/classes/use-errors.ts | 6 +- src/lib/generated/classes/use-extensions.ts | 4 +- src/lib/generated/classes/use-functions.ts | 6 +- src/lib/generated/classes/use-retries.ts | 6 +- src/lib/generated/classes/use.ts | 6 +- src/lib/generated/classes/wait-task.ts | 8 +- src/lib/generated/classes/workflow.ts | 6 +- tests/builders/call-http-builder.spec.ts | 2 +- tests/builders/use-extensions-builder.spec.ts | 19 +- tools/2_generate-definitions.ts | 2 +- tools/4_generate-classes.ts | 20 +- tools/5_generate-builders.ts | 4 +- tools/tmp.ts | 207 ++++++++++ 99 files changed, 707 insertions(+), 475 deletions(-) create mode 100644 tools/tmp.ts diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 7fe57b39..214ccbef 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - node-version: [10.x, 12.x, 14.x, 15.x] + node-version: [20.x, 21.x, 22.x] steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/npmjs-release.yml b/.github/workflows/npmjs-release.yml index 2adee8a9..6fbf07c7 100644 --- a/.github/workflows/npmjs-release.yml +++ b/.github/workflows/npmjs-release.yml @@ -11,7 +11,7 @@ jobs: # Setup .npmrc file to publish to npm - uses: actions/setup-node@v2 with: - node-version: '15.x' + node-version: '20.x' registry-url: 'https://registry.npmjs.org' - run: npm ci - run: npm test diff --git a/src/lib/generated/classes/authentication-policy-basic.ts b/src/lib/generated/classes/authentication-policy-basic.ts index 3e641dbc..748dd1b8 100644 --- a/src/lib/generated/classes/authentication-policy-basic.ts +++ b/src/lib/generated/classes/authentication-policy-basic.ts @@ -23,14 +23,14 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _AuthenticationPolicyBasic extends Hydrator { +class AuthenticationPolicyBasic extends Hydrator { constructor(model?: Partial) { super(model); } } -export const AuthenticationPolicyBasic = _AuthenticationPolicyBasic as { +export const _AuthenticationPolicyBasic = AuthenticationPolicyBasic as { new ( model?: Partial, - ): _AuthenticationPolicyBasic & Specification.AuthenticationPolicyBasic; + ): AuthenticationPolicyBasic & Specification.AuthenticationPolicyBasic; }; diff --git a/src/lib/generated/classes/authentication-policy-bearer.ts b/src/lib/generated/classes/authentication-policy-bearer.ts index fc710b61..720c8067 100644 --- a/src/lib/generated/classes/authentication-policy-bearer.ts +++ b/src/lib/generated/classes/authentication-policy-bearer.ts @@ -23,14 +23,14 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _AuthenticationPolicyBearer extends Hydrator { +class AuthenticationPolicyBearer extends Hydrator { constructor(model?: Partial) { super(model); } } -export const AuthenticationPolicyBearer = _AuthenticationPolicyBearer as { +export const _AuthenticationPolicyBearer = AuthenticationPolicyBearer as { new ( model?: Partial, - ): _AuthenticationPolicyBearer & Specification.AuthenticationPolicyBearer; + ): AuthenticationPolicyBearer & Specification.AuthenticationPolicyBearer; }; diff --git a/src/lib/generated/classes/authentication-policy-oauth2-client.ts b/src/lib/generated/classes/authentication-policy-oauth2-client.ts index 5d65b2d3..50209402 100644 --- a/src/lib/generated/classes/authentication-policy-oauth2-client.ts +++ b/src/lib/generated/classes/authentication-policy-oauth2-client.ts @@ -23,14 +23,14 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _AuthenticationPolicyOauth2Client extends Hydrator { +class AuthenticationPolicyOauth2Client extends Hydrator { constructor(model?: Partial) { super(model); } } -export const AuthenticationPolicyOauth2Client = _AuthenticationPolicyOauth2Client as { +export const _AuthenticationPolicyOauth2Client = AuthenticationPolicyOauth2Client as { new ( model?: Partial, - ): _AuthenticationPolicyOauth2Client & Specification.AuthenticationPolicyOauth2Client; + ): AuthenticationPolicyOauth2Client & Specification.AuthenticationPolicyOauth2Client; }; diff --git a/src/lib/generated/classes/authentication-policy-oauth2.ts b/src/lib/generated/classes/authentication-policy-oauth2.ts index 4390d74a..430db7f1 100644 --- a/src/lib/generated/classes/authentication-policy-oauth2.ts +++ b/src/lib/generated/classes/authentication-policy-oauth2.ts @@ -23,14 +23,14 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _AuthenticationPolicyOauth2 extends Hydrator { +class AuthenticationPolicyOauth2 extends Hydrator { constructor(model?: Partial) { super(model); } } -export const AuthenticationPolicyOauth2 = _AuthenticationPolicyOauth2 as { +export const _AuthenticationPolicyOauth2 = AuthenticationPolicyOauth2 as { new ( model?: Partial, - ): _AuthenticationPolicyOauth2 & Specification.AuthenticationPolicyOauth2; + ): AuthenticationPolicyOauth2 & Specification.AuthenticationPolicyOauth2; }; diff --git a/src/lib/generated/classes/authentication-policy.ts b/src/lib/generated/classes/authentication-policy.ts index 2deefe97..05dbc2a1 100644 --- a/src/lib/generated/classes/authentication-policy.ts +++ b/src/lib/generated/classes/authentication-policy.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _AuthenticationPolicy extends Hydrator { +class AuthenticationPolicy extends Hydrator { constructor(model?: Partial) { super(model); } } -export const AuthenticationPolicy = _AuthenticationPolicy as { - new (model?: Partial): _AuthenticationPolicy & Specification.AuthenticationPolicy; +export const _AuthenticationPolicy = AuthenticationPolicy as { + new (model?: Partial): AuthenticationPolicy & Specification.AuthenticationPolicy; }; diff --git a/src/lib/generated/classes/call-async-api-with-authentication.ts b/src/lib/generated/classes/call-async-api-with-authentication.ts index 0cb6b16d..33fa6bab 100644 --- a/src/lib/generated/classes/call-async-api-with-authentication.ts +++ b/src/lib/generated/classes/call-async-api-with-authentication.ts @@ -23,14 +23,14 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallAsyncAPIWithAuthentication extends Hydrator { +class CallAsyncAPIWithAuthentication extends Hydrator { constructor(model?: Partial) { super(model); } } -export const CallAsyncAPIWithAuthentication = _CallAsyncAPIWithAuthentication as { +export const _CallAsyncAPIWithAuthentication = CallAsyncAPIWithAuthentication as { new ( model?: Partial, - ): _CallAsyncAPIWithAuthentication & Specification.CallAsyncAPIWithAuthentication; + ): CallAsyncAPIWithAuthentication & Specification.CallAsyncAPIWithAuthentication; }; diff --git a/src/lib/generated/classes/call-async-api-with.ts b/src/lib/generated/classes/call-async-api-with.ts index 90b38179..f8b79963 100644 --- a/src/lib/generated/classes/call-async-api-with.ts +++ b/src/lib/generated/classes/call-async-api-with.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallAsyncAPIWith extends Hydrator { +class CallAsyncAPIWith extends Hydrator { constructor(model?: Partial) { super(model); } } -export const CallAsyncAPIWith = _CallAsyncAPIWith as { - new (model?: Partial): _CallAsyncAPIWith & Specification.CallAsyncAPIWith; +export const _CallAsyncAPIWith = CallAsyncAPIWith as { + new (model?: Partial): CallAsyncAPIWith & Specification.CallAsyncAPIWith; }; diff --git a/src/lib/generated/classes/call-async-api.ts b/src/lib/generated/classes/call-async-api.ts index 2a0d57b8..d4343984 100644 --- a/src/lib/generated/classes/call-async-api.ts +++ b/src/lib/generated/classes/call-async-api.ts @@ -20,15 +20,15 @@ * *****************************************************************************************/ -import { TaskBase } from './task-base'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _CallAsyncAPI extends TaskBase { +class CallAsyncAPI extends _TaskBase { constructor(model?: Partial) { super(model); } } -export const CallAsyncAPI = _CallAsyncAPI as { - new (model?: Partial): _CallAsyncAPI & Specification.CallAsyncAPI; +export const _CallAsyncAPI = CallAsyncAPI as { + new (model?: Partial): CallAsyncAPI & Specification.CallAsyncAPI; }; diff --git a/src/lib/generated/classes/call-function-with.ts b/src/lib/generated/classes/call-function-with.ts index 0d4c1c97..375de9f2 100644 --- a/src/lib/generated/classes/call-function-with.ts +++ b/src/lib/generated/classes/call-function-with.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallFunctionWith extends Hydrator { +class CallFunctionWith extends Hydrator { constructor(model?: Partial) { super(model); } } -export const CallFunctionWith = _CallFunctionWith as { - new (model?: Partial): _CallFunctionWith & Specification.CallFunctionWith; +export const _CallFunctionWith = CallFunctionWith as { + new (model?: Partial): CallFunctionWith & Specification.CallFunctionWith; }; diff --git a/src/lib/generated/classes/call-function.ts b/src/lib/generated/classes/call-function.ts index 8073e139..2c64c46e 100644 --- a/src/lib/generated/classes/call-function.ts +++ b/src/lib/generated/classes/call-function.ts @@ -20,15 +20,15 @@ * *****************************************************************************************/ -import { TaskBase } from './task-base'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _CallFunction extends TaskBase { +class CallFunction extends _TaskBase { constructor(model?: Partial) { super(model); } } -export const CallFunction = _CallFunction as { - new (model?: Partial): _CallFunction & Specification.CallFunction; +export const _CallFunction = CallFunction as { + new (model?: Partial): CallFunction & Specification.CallFunction; }; diff --git a/src/lib/generated/classes/call-grpc-with-arguments.ts b/src/lib/generated/classes/call-grpc-with-arguments.ts index 30eb4839..ef21f428 100644 --- a/src/lib/generated/classes/call-grpc-with-arguments.ts +++ b/src/lib/generated/classes/call-grpc-with-arguments.ts @@ -23,14 +23,14 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallGRPCWithArguments extends Hydrator { +class CallGRPCWithArguments extends Hydrator { constructor(model?: Partial) { super(model); } } -export const CallGRPCWithArguments = _CallGRPCWithArguments as { +export const _CallGRPCWithArguments = CallGRPCWithArguments as { new ( model?: Partial, - ): _CallGRPCWithArguments & Specification.CallGRPCWithArguments; + ): CallGRPCWithArguments & Specification.CallGRPCWithArguments; }; diff --git a/src/lib/generated/classes/call-grpc-with-service-authentication.ts b/src/lib/generated/classes/call-grpc-with-service-authentication.ts index 4ac98da2..aa8c78a5 100644 --- a/src/lib/generated/classes/call-grpc-with-service-authentication.ts +++ b/src/lib/generated/classes/call-grpc-with-service-authentication.ts @@ -23,14 +23,14 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallGRPCWithServiceAuthentication extends Hydrator { +class CallGRPCWithServiceAuthentication extends Hydrator { constructor(model?: Partial) { super(model); } } -export const CallGRPCWithServiceAuthentication = _CallGRPCWithServiceAuthentication as { +export const _CallGRPCWithServiceAuthentication = CallGRPCWithServiceAuthentication as { new ( model?: Partial, - ): _CallGRPCWithServiceAuthentication & Specification.CallGRPCWithServiceAuthentication; + ): CallGRPCWithServiceAuthentication & Specification.CallGRPCWithServiceAuthentication; }; diff --git a/src/lib/generated/classes/call-grpc-with-service.ts b/src/lib/generated/classes/call-grpc-with-service.ts index c52bb6d3..23b7aedd 100644 --- a/src/lib/generated/classes/call-grpc-with-service.ts +++ b/src/lib/generated/classes/call-grpc-with-service.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallGRPCWithService extends Hydrator { +class CallGRPCWithService extends Hydrator { constructor(model?: Partial) { super(model); } } -export const CallGRPCWithService = _CallGRPCWithService as { - new (model?: Partial): _CallGRPCWithService & Specification.CallGRPCWithService; +export const _CallGRPCWithService = CallGRPCWithService as { + new (model?: Partial): CallGRPCWithService & Specification.CallGRPCWithService; }; diff --git a/src/lib/generated/classes/call-grpc-with.ts b/src/lib/generated/classes/call-grpc-with.ts index 32195e52..0e72dacd 100644 --- a/src/lib/generated/classes/call-grpc-with.ts +++ b/src/lib/generated/classes/call-grpc-with.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallGRPCWith extends Hydrator { +class CallGRPCWith extends Hydrator { constructor(model?: Partial) { super(model); } } -export const CallGRPCWith = _CallGRPCWith as { - new (model?: Partial): _CallGRPCWith & Specification.CallGRPCWith; +export const _CallGRPCWith = CallGRPCWith as { + new (model?: Partial): CallGRPCWith & Specification.CallGRPCWith; }; diff --git a/src/lib/generated/classes/call-grpc.ts b/src/lib/generated/classes/call-grpc.ts index e70617cf..294a42b4 100644 --- a/src/lib/generated/classes/call-grpc.ts +++ b/src/lib/generated/classes/call-grpc.ts @@ -20,15 +20,15 @@ * *****************************************************************************************/ -import { TaskBase } from './task-base'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _CallGRPC extends TaskBase { +class CallGRPC extends _TaskBase { constructor(model?: Partial) { super(model); } } -export const CallGRPC = _CallGRPC as { - new (model?: Partial): _CallGRPC & Specification.CallGRPC; +export const _CallGRPC = CallGRPC as { + new (model?: Partial): CallGRPC & Specification.CallGRPC; }; diff --git a/src/lib/generated/classes/call-http-with-endpoint.ts b/src/lib/generated/classes/call-http-with-endpoint.ts index 6a45751f..571e7967 100644 --- a/src/lib/generated/classes/call-http-with-endpoint.ts +++ b/src/lib/generated/classes/call-http-with-endpoint.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallHTTPWithEndpoint extends Hydrator { +class CallHTTPWithEndpoint extends Hydrator { constructor(model?: Partial) { super(model); } } -export const CallHTTPWithEndpoint = _CallHTTPWithEndpoint as { - new (model?: Partial): _CallHTTPWithEndpoint & Specification.CallHTTPWithEndpoint; +export const _CallHTTPWithEndpoint = CallHTTPWithEndpoint as { + new (model?: Partial): CallHTTPWithEndpoint & Specification.CallHTTPWithEndpoint; }; diff --git a/src/lib/generated/classes/call-http-with.ts b/src/lib/generated/classes/call-http-with.ts index 5bf3d478..9eb307b8 100644 --- a/src/lib/generated/classes/call-http-with.ts +++ b/src/lib/generated/classes/call-http-with.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallHTTPWith extends Hydrator { +class CallHTTPWith extends Hydrator { constructor(model?: Partial) { super(model); } } -export const CallHTTPWith = _CallHTTPWith as { - new (model?: Partial): _CallHTTPWith & Specification.CallHTTPWith; +export const _CallHTTPWith = CallHTTPWith as { + new (model?: Partial): CallHTTPWith & Specification.CallHTTPWith; }; diff --git a/src/lib/generated/classes/call-http.ts b/src/lib/generated/classes/call-http.ts index 8a4b9e23..38d93591 100644 --- a/src/lib/generated/classes/call-http.ts +++ b/src/lib/generated/classes/call-http.ts @@ -20,15 +20,15 @@ * *****************************************************************************************/ -import { TaskBase } from './task-base'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _CallHTTP extends TaskBase { +class CallHTTP extends _TaskBase { constructor(model?: Partial) { super(model); } } -export const CallHTTP = _CallHTTP as { - new (model?: Partial): _CallHTTP & Specification.CallHTTP; +export const _CallHTTP = CallHTTP as { + new (model?: Partial): CallHTTP & Specification.CallHTTP; }; diff --git a/src/lib/generated/classes/call-open-api-with-authentication.ts b/src/lib/generated/classes/call-open-api-with-authentication.ts index 01c3a2ef..bf7d2d61 100644 --- a/src/lib/generated/classes/call-open-api-with-authentication.ts +++ b/src/lib/generated/classes/call-open-api-with-authentication.ts @@ -23,14 +23,14 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallOpenAPIWithAuthentication extends Hydrator { +class CallOpenAPIWithAuthentication extends Hydrator { constructor(model?: Partial) { super(model); } } -export const CallOpenAPIWithAuthentication = _CallOpenAPIWithAuthentication as { +export const _CallOpenAPIWithAuthentication = CallOpenAPIWithAuthentication as { new ( model?: Partial, - ): _CallOpenAPIWithAuthentication & Specification.CallOpenAPIWithAuthentication; + ): CallOpenAPIWithAuthentication & Specification.CallOpenAPIWithAuthentication; }; diff --git a/src/lib/generated/classes/call-open-api-with-parameters.ts b/src/lib/generated/classes/call-open-api-with-parameters.ts index bcf4d593..c28a8b33 100644 --- a/src/lib/generated/classes/call-open-api-with-parameters.ts +++ b/src/lib/generated/classes/call-open-api-with-parameters.ts @@ -23,14 +23,14 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallOpenAPIWithParameters extends Hydrator { +class CallOpenAPIWithParameters extends Hydrator { constructor(model?: Partial) { super(model); } } -export const CallOpenAPIWithParameters = _CallOpenAPIWithParameters as { +export const _CallOpenAPIWithParameters = CallOpenAPIWithParameters as { new ( model?: Partial, - ): _CallOpenAPIWithParameters & Specification.CallOpenAPIWithParameters; + ): CallOpenAPIWithParameters & Specification.CallOpenAPIWithParameters; }; diff --git a/src/lib/generated/classes/call-open-api-with.ts b/src/lib/generated/classes/call-open-api-with.ts index 2dbc3bcf..890cbd5c 100644 --- a/src/lib/generated/classes/call-open-api-with.ts +++ b/src/lib/generated/classes/call-open-api-with.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallOpenAPIWith extends Hydrator { +class CallOpenAPIWith extends Hydrator { constructor(model?: Partial) { super(model); } } -export const CallOpenAPIWith = _CallOpenAPIWith as { - new (model?: Partial): _CallOpenAPIWith & Specification.CallOpenAPIWith; +export const _CallOpenAPIWith = CallOpenAPIWith as { + new (model?: Partial): CallOpenAPIWith & Specification.CallOpenAPIWith; }; diff --git a/src/lib/generated/classes/call-open-api.ts b/src/lib/generated/classes/call-open-api.ts index 8b87cd54..9adf5bef 100644 --- a/src/lib/generated/classes/call-open-api.ts +++ b/src/lib/generated/classes/call-open-api.ts @@ -20,15 +20,15 @@ * *****************************************************************************************/ -import { TaskBase } from './task-base'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _CallOpenAPI extends TaskBase { +class CallOpenAPI extends _TaskBase { constructor(model?: Partial) { super(model); } } -export const CallOpenAPI = _CallOpenAPI as { - new (model?: Partial): _CallOpenAPI & Specification.CallOpenAPI; +export const _CallOpenAPI = CallOpenAPI as { + new (model?: Partial): CallOpenAPI & Specification.CallOpenAPI; }; diff --git a/src/lib/generated/classes/call-task.ts b/src/lib/generated/classes/call-task.ts index 335f5bfc..fbe39f43 100644 --- a/src/lib/generated/classes/call-task.ts +++ b/src/lib/generated/classes/call-task.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _CallTask extends Hydrator { +class CallTask extends Hydrator { constructor(model?: Partial) { super(model); } } -export const CallTask = _CallTask as { - new (model?: Partial): _CallTask & Specification.CallTask; +export const _CallTask = CallTask as { + new (model?: Partial): CallTask & Specification.CallTask; }; diff --git a/src/lib/generated/classes/do-task.ts b/src/lib/generated/classes/do-task.ts index a5a7aee6..dd5406f9 100644 --- a/src/lib/generated/classes/do-task.ts +++ b/src/lib/generated/classes/do-task.ts @@ -20,15 +20,15 @@ * *****************************************************************************************/ -import { TaskBase } from './task-base'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _DoTask extends TaskBase { +class DoTask extends _TaskBase { constructor(model?: Partial) { super(model); } } -export const DoTask = _DoTask as { - new (model?: Partial): _DoTask & Specification.DoTask; +export const _DoTask = DoTask as { + new (model?: Partial): DoTask & Specification.DoTask; }; diff --git a/src/lib/generated/classes/document-tags.ts b/src/lib/generated/classes/document-tags.ts index fad8b7d4..323a1dfa 100644 --- a/src/lib/generated/classes/document-tags.ts +++ b/src/lib/generated/classes/document-tags.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _DocumentTags extends Hydrator { +class DocumentTags extends Hydrator { constructor(model?: Partial) { super(model); } } -export const DocumentTags = _DocumentTags as { - new (model?: Partial): _DocumentTags & Specification.DocumentTags; +export const _DocumentTags = DocumentTags as { + new (model?: Partial): DocumentTags & Specification.DocumentTags; }; diff --git a/src/lib/generated/classes/document.ts b/src/lib/generated/classes/document.ts index 6d21022f..189f9e7d 100644 --- a/src/lib/generated/classes/document.ts +++ b/src/lib/generated/classes/document.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Document extends Hydrator { +class Document extends Hydrator { constructor(model?: Partial) { super(model); } } -export const Document = _Document as { - new (model?: Partial): _Document & Specification.Document; +export const _Document = Document as { + new (model?: Partial): Document & Specification.Document; }; diff --git a/src/lib/generated/classes/duration.ts b/src/lib/generated/classes/duration.ts index 4b91a2b9..a8aef959 100644 --- a/src/lib/generated/classes/duration.ts +++ b/src/lib/generated/classes/duration.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Duration extends Hydrator { +class Duration extends Hydrator { constructor(model?: Partial) { super(model); } } -export const Duration = _Duration as { - new (model?: Partial): _Duration & Specification.Duration; +export const _Duration = Duration as { + new (model?: Partial): Duration & Specification.Duration; }; diff --git a/src/lib/generated/classes/emit-task-emit-event.ts b/src/lib/generated/classes/emit-task-emit-event.ts index a925b6de..c39489c7 100644 --- a/src/lib/generated/classes/emit-task-emit-event.ts +++ b/src/lib/generated/classes/emit-task-emit-event.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _EmitTaskEmitEvent extends Hydrator { +class EmitTaskEmitEvent extends Hydrator { constructor(model?: Partial) { super(model); } } -export const EmitTaskEmitEvent = _EmitTaskEmitEvent as { - new (model?: Partial): _EmitTaskEmitEvent & Specification.EmitTaskEmitEvent; +export const _EmitTaskEmitEvent = EmitTaskEmitEvent as { + new (model?: Partial): EmitTaskEmitEvent & Specification.EmitTaskEmitEvent; }; diff --git a/src/lib/generated/classes/emit-task-emit.ts b/src/lib/generated/classes/emit-task-emit.ts index f4fe09a5..894ceab9 100644 --- a/src/lib/generated/classes/emit-task-emit.ts +++ b/src/lib/generated/classes/emit-task-emit.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _EmitTaskEmit extends Hydrator { +class EmitTaskEmit extends Hydrator { constructor(model?: Partial) { super(model); } } -export const EmitTaskEmit = _EmitTaskEmit as { - new (model?: Partial): _EmitTaskEmit & Specification.EmitTaskEmit; +export const _EmitTaskEmit = EmitTaskEmit as { + new (model?: Partial): EmitTaskEmit & Specification.EmitTaskEmit; }; diff --git a/src/lib/generated/classes/emit-task.ts b/src/lib/generated/classes/emit-task.ts index 6deec45a..36c50781 100644 --- a/src/lib/generated/classes/emit-task.ts +++ b/src/lib/generated/classes/emit-task.ts @@ -20,15 +20,15 @@ * *****************************************************************************************/ -import { TaskBase } from './task-base'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _EmitTask extends TaskBase { +class EmitTask extends _TaskBase { constructor(model?: Partial) { super(model); } } -export const EmitTask = _EmitTask as { - new (model?: Partial): _EmitTask & Specification.EmitTask; +export const _EmitTask = EmitTask as { + new (model?: Partial): EmitTask & Specification.EmitTask; }; diff --git a/src/lib/generated/classes/endpoint-authentication.ts b/src/lib/generated/classes/endpoint-authentication.ts index a185d241..44b53eca 100644 --- a/src/lib/generated/classes/endpoint-authentication.ts +++ b/src/lib/generated/classes/endpoint-authentication.ts @@ -23,14 +23,14 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _EndpointAuthentication extends Hydrator { +class EndpointAuthentication extends Hydrator { constructor(model?: Partial) { super(model); } } -export const EndpointAuthentication = _EndpointAuthentication as { +export const _EndpointAuthentication = EndpointAuthentication as { new ( model?: Partial, - ): _EndpointAuthentication & Specification.EndpointAuthentication; + ): EndpointAuthentication & Specification.EndpointAuthentication; }; diff --git a/src/lib/generated/classes/endpoint.ts b/src/lib/generated/classes/endpoint.ts index 6af8edc5..1d8a7386 100644 --- a/src/lib/generated/classes/endpoint.ts +++ b/src/lib/generated/classes/endpoint.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Endpoint extends Hydrator { +class Endpoint extends Hydrator { constructor(model?: Partial) { super(model); } } -export const Endpoint = _Endpoint as { - new (model?: Partial): _Endpoint & Specification.Endpoint; +export const _Endpoint = Endpoint as { + new (model?: Partial): Endpoint & Specification.Endpoint; }; diff --git a/src/lib/generated/classes/error.ts b/src/lib/generated/classes/error.ts index 5863807f..fa467592 100644 --- a/src/lib/generated/classes/error.ts +++ b/src/lib/generated/classes/error.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Error extends Hydrator { +class Error extends Hydrator { constructor(model?: Partial) { super(model); } } -export const Error = _Error as { - new (model?: Partial): _Error & Specification.Error; +export const _Error = Error as { + new (model?: Partial): Error & Specification.Error; }; diff --git a/src/lib/generated/classes/event-consumption-strategy-all.ts b/src/lib/generated/classes/event-consumption-strategy-all.ts index 17583812..bd56a74d 100644 --- a/src/lib/generated/classes/event-consumption-strategy-all.ts +++ b/src/lib/generated/classes/event-consumption-strategy-all.ts @@ -22,7 +22,7 @@ import { Specification } from '../definitions'; -export class EventConsumptionStrategyAll extends Array { +class EventConsumptionStrategyAll extends Array { constructor(model?: Array) { super(...(model || [])); if (model != null && !Array.isArray(model)) { @@ -31,3 +31,5 @@ export class EventConsumptionStrategyAll extends Array { +class EventConsumptionStrategyAny extends Array { constructor(model?: Array) { super(...(model || [])); if (model != null && !Array.isArray(model)) { @@ -31,3 +31,5 @@ export class EventConsumptionStrategyAny extends Array { +class EventConsumptionStrategy extends Hydrator { constructor(model?: Partial) { super(model); } } -export const EventConsumptionStrategy = _EventConsumptionStrategy as { +export const _EventConsumptionStrategy = EventConsumptionStrategy as { new ( model?: Partial, - ): _EventConsumptionStrategy & Specification.EventConsumptionStrategy; + ): EventConsumptionStrategy & Specification.EventConsumptionStrategy; }; diff --git a/src/lib/generated/classes/event-filter-correlate.ts b/src/lib/generated/classes/event-filter-correlate.ts index d415b786..b12dc9ac 100644 --- a/src/lib/generated/classes/event-filter-correlate.ts +++ b/src/lib/generated/classes/event-filter-correlate.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _EventFilterCorrelate extends Hydrator { +class EventFilterCorrelate extends Hydrator { constructor(model?: Partial) { super(model); } } -export const EventFilterCorrelate = _EventFilterCorrelate as { - new (model?: Partial): _EventFilterCorrelate & Specification.EventFilterCorrelate; +export const _EventFilterCorrelate = EventFilterCorrelate as { + new (model?: Partial): EventFilterCorrelate & Specification.EventFilterCorrelate; }; diff --git a/src/lib/generated/classes/event-filter-with.ts b/src/lib/generated/classes/event-filter-with.ts index 05a60e74..be045068 100644 --- a/src/lib/generated/classes/event-filter-with.ts +++ b/src/lib/generated/classes/event-filter-with.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _EventFilterWith extends Hydrator { +class EventFilterWith extends Hydrator { constructor(model?: Partial) { super(model); } } -export const EventFilterWith = _EventFilterWith as { - new (model?: Partial): _EventFilterWith & Specification.EventFilterWith; +export const _EventFilterWith = EventFilterWith as { + new (model?: Partial): EventFilterWith & Specification.EventFilterWith; }; diff --git a/src/lib/generated/classes/event-filter.ts b/src/lib/generated/classes/event-filter.ts index fa043723..47b1795d 100644 --- a/src/lib/generated/classes/event-filter.ts +++ b/src/lib/generated/classes/event-filter.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _EventFilter extends Hydrator { +class EventFilter extends Hydrator { constructor(model?: Partial) { super(model); } } -export const EventFilter = _EventFilter as { - new (model?: Partial): _EventFilter & Specification.EventFilter; +export const _EventFilter = EventFilter as { + new (model?: Partial): EventFilter & Specification.EventFilter; }; diff --git a/src/lib/generated/classes/export.ts b/src/lib/generated/classes/export.ts index 8bdd04df..86d7659a 100644 --- a/src/lib/generated/classes/export.ts +++ b/src/lib/generated/classes/export.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Export extends Hydrator { +class Export extends Hydrator { constructor(model?: Partial) { super(model); } } -export const Export = _Export as { - new (model?: Partial): _Export & Specification.Export; +export const _Export = Export as { + new (model?: Partial): Export & Specification.Export; }; diff --git a/src/lib/generated/classes/extension.ts b/src/lib/generated/classes/extension.ts index 7a45fadc..1d0d89ce 100644 --- a/src/lib/generated/classes/extension.ts +++ b/src/lib/generated/classes/extension.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Extension extends Hydrator { +class Extension extends Hydrator { constructor(model?: Partial) { super(model); } } -export const Extension = _Extension as { - new (model?: Partial): _Extension & Specification.Extension; +export const _Extension = Extension as { + new (model?: Partial): Extension & Specification.Extension; }; diff --git a/src/lib/generated/classes/external-resource-authentication.ts b/src/lib/generated/classes/external-resource-authentication.ts index 0dacfbd8..0268e147 100644 --- a/src/lib/generated/classes/external-resource-authentication.ts +++ b/src/lib/generated/classes/external-resource-authentication.ts @@ -23,14 +23,14 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _ExternalResourceAuthentication extends Hydrator { +class ExternalResourceAuthentication extends Hydrator { constructor(model?: Partial) { super(model); } } -export const ExternalResourceAuthentication = _ExternalResourceAuthentication as { +export const _ExternalResourceAuthentication = ExternalResourceAuthentication as { new ( model?: Partial, - ): _ExternalResourceAuthentication & Specification.ExternalResourceAuthentication; + ): ExternalResourceAuthentication & Specification.ExternalResourceAuthentication; }; diff --git a/src/lib/generated/classes/external-resource.ts b/src/lib/generated/classes/external-resource.ts index 926aa155..a4fc64d2 100644 --- a/src/lib/generated/classes/external-resource.ts +++ b/src/lib/generated/classes/external-resource.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _ExternalResource extends Hydrator { +class ExternalResource extends Hydrator { constructor(model?: Partial) { super(model); } } -export const ExternalResource = _ExternalResource as { - new (model?: Partial): _ExternalResource & Specification.ExternalResource; +export const _ExternalResource = ExternalResource as { + new (model?: Partial): ExternalResource & Specification.ExternalResource; }; diff --git a/src/lib/generated/classes/flow-directive.ts b/src/lib/generated/classes/flow-directive.ts index e1e38863..f56c63a9 100644 --- a/src/lib/generated/classes/flow-directive.ts +++ b/src/lib/generated/classes/flow-directive.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _FlowDirective extends Hydrator { +class FlowDirective extends Hydrator { constructor(model?: Partial) { super(model); } } -export const FlowDirective = _FlowDirective as { - new (model?: Partial): _FlowDirective & Specification.FlowDirective; +export const _FlowDirective = FlowDirective as { + new (model?: Partial): FlowDirective & Specification.FlowDirective; }; diff --git a/src/lib/generated/classes/for-task-for.ts b/src/lib/generated/classes/for-task-for.ts index 48807dd4..0fa58d4a 100644 --- a/src/lib/generated/classes/for-task-for.ts +++ b/src/lib/generated/classes/for-task-for.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _ForTaskFor extends Hydrator { +class ForTaskFor extends Hydrator { constructor(model?: Partial) { super(model); } } -export const ForTaskFor = _ForTaskFor as { - new (model?: Partial): _ForTaskFor & Specification.ForTaskFor; +export const _ForTaskFor = ForTaskFor as { + new (model?: Partial): ForTaskFor & Specification.ForTaskFor; }; diff --git a/src/lib/generated/classes/for-task.ts b/src/lib/generated/classes/for-task.ts index b7023ae9..625f728d 100644 --- a/src/lib/generated/classes/for-task.ts +++ b/src/lib/generated/classes/for-task.ts @@ -20,15 +20,15 @@ * *****************************************************************************************/ -import { TaskBase } from './task-base'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _ForTask extends TaskBase { +class ForTask extends _TaskBase { constructor(model?: Partial) { super(model); } } -export const ForTask = _ForTask as { - new (model?: Partial): _ForTask & Specification.ForTask; +export const _ForTask = ForTask as { + new (model?: Partial): ForTask & Specification.ForTask; }; diff --git a/src/lib/generated/classes/fork-task-fork.ts b/src/lib/generated/classes/fork-task-fork.ts index bd12f53b..c28a05d6 100644 --- a/src/lib/generated/classes/fork-task-fork.ts +++ b/src/lib/generated/classes/fork-task-fork.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _ForkTaskFork extends Hydrator { +class ForkTaskFork extends Hydrator { constructor(model?: Partial) { super(model); } } -export const ForkTaskFork = _ForkTaskFork as { - new (model?: Partial): _ForkTaskFork & Specification.ForkTaskFork; +export const _ForkTaskFork = ForkTaskFork as { + new (model?: Partial): ForkTaskFork & Specification.ForkTaskFork; }; diff --git a/src/lib/generated/classes/fork-task.ts b/src/lib/generated/classes/fork-task.ts index b0cd0a79..89d3ff1c 100644 --- a/src/lib/generated/classes/fork-task.ts +++ b/src/lib/generated/classes/fork-task.ts @@ -20,15 +20,15 @@ * *****************************************************************************************/ -import { TaskBase } from './task-base'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _ForkTask extends TaskBase { +class ForkTask extends _TaskBase { constructor(model?: Partial) { super(model); } } -export const ForkTask = _ForkTask as { - new (model?: Partial): _ForkTask & Specification.ForkTask; +export const _ForkTask = ForkTask as { + new (model?: Partial): ForkTask & Specification.ForkTask; }; diff --git a/src/lib/generated/classes/index.ts b/src/lib/generated/classes/index.ts index 3516cc48..a2e79eac 100644 --- a/src/lib/generated/classes/index.ts +++ b/src/lib/generated/classes/index.ts @@ -14,186 +14,186 @@ * limitations under the License. */ -import { Schema } from './schema'; -import { ExternalResource } from './external-resource'; -import { ExternalResourceAuthentication } from './external-resource-authentication'; -import { AuthenticationPolicy } from './authentication-policy'; -import { Task } from './task'; -import { CallTask } from './call-task'; -import { CallAsyncAPI } from './call-async-api'; -import { FlowDirective } from './flow-directive'; -import { CallAsyncAPIWithAuthentication } from './call-async-api-with-authentication'; -import { CallGRPC } from './call-grpc'; -import { CallGRPCWithServiceAuthentication } from './call-grpc-with-service-authentication'; -import { CallHTTP } from './call-http'; -import { CallHTTPWithEndpoint } from './call-http-with-endpoint'; -import { EndpointAuthentication } from './endpoint-authentication'; -import { CallOpenAPI } from './call-open-api'; -import { CallOpenAPIWithAuthentication } from './call-open-api-with-authentication'; -import { CallFunction } from './call-function'; -import { DoTask } from './do-task'; -import { ForkTask } from './fork-task'; -import { EmitTask } from './emit-task'; -import { ForTask } from './for-task'; -import { ListenTask } from './listen-task'; -import { EventConsumptionStrategy } from './event-consumption-strategy'; -import { EventConsumptionStrategyAll } from './event-consumption-strategy-all'; -import { EventConsumptionStrategyAny } from './event-consumption-strategy-any'; -import { RaiseTask } from './raise-task'; -import { RunTask } from './run-task'; -import { RunTaskRun } from './run-task-run'; -import { RunTaskRunScript } from './run-task-run-script'; -import { SetTask } from './set-task'; -import { SwitchTask } from './switch-task'; -import { SwitchTaskSwitch } from './switch-task-switch'; -import { TryTask } from './try-task'; -import { RetryPolicyBackoff } from './retry-policy-backoff'; -import { WaitTask } from './wait-task'; -import { TaskList } from './task-list'; -import { UseExtensions } from './use-extensions'; -import { Workflow } from './workflow'; -import { Document } from './document'; -import { DocumentTags } from './document-tags'; -import { Input } from './input'; -import { AuthenticationPolicyBasic } from './authentication-policy-basic'; -import { AuthenticationPolicyBearer } from './authentication-policy-bearer'; -import { AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; -import { AuthenticationPolicyOauth2Client } from './authentication-policy-oauth2-client'; -import { Oauth2Token } from './oauth2-token'; -import { Use } from './use'; -import { UseAuthentications } from './use-authentications'; -import { UseErrors } from './use-errors'; -import { Error } from './error'; -import { Extension } from './extension'; -import { TaskBase } from './task-base'; -import { Output } from './output'; -import { Export } from './export'; -import { Timeout } from './timeout'; -import { Duration } from './duration'; -import { CallAsyncAPIWith } from './call-async-api-with'; -import { CallGRPCWith } from './call-grpc-with'; -import { CallGRPCWithService } from './call-grpc-with-service'; -import { CallGRPCWithArguments } from './call-grpc-with-arguments'; -import { CallHTTPWith } from './call-http-with'; -import { Endpoint } from './endpoint'; -import { CallOpenAPIWith } from './call-open-api-with'; -import { CallOpenAPIWithParameters } from './call-open-api-with-parameters'; -import { CallFunctionWith } from './call-function-with'; -import { ForkTaskFork } from './fork-task-fork'; -import { EmitTaskEmit } from './emit-task-emit'; -import { EmitTaskEmitEvent } from './emit-task-emit-event'; -import { ForTaskFor } from './for-task-for'; -import { ListenTaskListen } from './listen-task-listen'; -import { EventFilter } from './event-filter'; -import { EventFilterWith } from './event-filter-with'; -import { EventFilterCorrelate } from './event-filter-correlate'; -import { RaiseTaskRaise } from './raise-task-raise'; -import { RunTaskRunContainer } from './run-task-run-container'; -import { RunTaskRunShell } from './run-task-run-shell'; -import { RunTaskRunShellArguments } from './run-task-run-shell-arguments'; -import { RunTaskRunShellEnvironment } from './run-task-run-shell-environment'; -import { RunTaskRunWorkflow } from './run-task-run-workflow'; -import { RunTaskRunWorkflowInput } from './run-task-run-workflow-input'; -import { SetTaskSet } from './set-task-set'; -import { SwitchTaskSwitchCase } from './switch-task-switch-case'; -import { TryTaskCatch } from './try-task-catch'; -import { RetryPolicy } from './retry-policy'; -import { RetryPolicyLimit } from './retry-policy-limit'; -import { RetryPolicyLimitAttempt } from './retry-policy-limit-attempt'; -import { RetryPolicyJitter } from './retry-policy-jitter'; -import { UseFunctions } from './use-functions'; -import { UseRetries } from './use-retries'; -import { Schedule } from './schedule'; +import { _Schema } from './schema'; +import { _ExternalResource } from './external-resource'; +import { _ExternalResourceAuthentication } from './external-resource-authentication'; +import { _AuthenticationPolicy } from './authentication-policy'; +import { _Task } from './task'; +import { _CallTask } from './call-task'; +import { _CallAsyncAPI } from './call-async-api'; +import { _FlowDirective } from './flow-directive'; +import { _CallAsyncAPIWithAuthentication } from './call-async-api-with-authentication'; +import { _CallGRPC } from './call-grpc'; +import { _CallGRPCWithServiceAuthentication } from './call-grpc-with-service-authentication'; +import { _CallHTTP } from './call-http'; +import { _CallHTTPWithEndpoint } from './call-http-with-endpoint'; +import { _EndpointAuthentication } from './endpoint-authentication'; +import { _CallOpenAPI } from './call-open-api'; +import { _CallOpenAPIWithAuthentication } from './call-open-api-with-authentication'; +import { _CallFunction } from './call-function'; +import { _DoTask } from './do-task'; +import { _ForkTask } from './fork-task'; +import { _EmitTask } from './emit-task'; +import { _ForTask } from './for-task'; +import { _ListenTask } from './listen-task'; +import { _EventConsumptionStrategy } from './event-consumption-strategy'; +import { _EventConsumptionStrategyAll } from './event-consumption-strategy-all'; +import { _EventConsumptionStrategyAny } from './event-consumption-strategy-any'; +import { _RaiseTask } from './raise-task'; +import { _RunTask } from './run-task'; +import { _RunTaskRun } from './run-task-run'; +import { _RunTaskRunScript } from './run-task-run-script'; +import { _SetTask } from './set-task'; +import { _SwitchTask } from './switch-task'; +import { _SwitchTaskSwitch } from './switch-task-switch'; +import { _TryTask } from './try-task'; +import { _RetryPolicyBackoff } from './retry-policy-backoff'; +import { _WaitTask } from './wait-task'; +import { _TaskList } from './task-list'; +import { _UseExtensions } from './use-extensions'; +import { _Workflow } from './workflow'; +import { _Document } from './document'; +import { _DocumentTags } from './document-tags'; +import { _Input } from './input'; +import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; +import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; +import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; +import { _AuthenticationPolicyOauth2Client } from './authentication-policy-oauth2-client'; +import { _Oauth2Token } from './oauth2-token'; +import { _Use } from './use'; +import { _UseAuthentications } from './use-authentications'; +import { _UseErrors } from './use-errors'; +import { _Error } from './error'; +import { _Extension } from './extension'; +import { _TaskBase } from './task-base'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; +import { _Duration } from './duration'; +import { _CallAsyncAPIWith } from './call-async-api-with'; +import { _CallGRPCWith } from './call-grpc-with'; +import { _CallGRPCWithService } from './call-grpc-with-service'; +import { _CallGRPCWithArguments } from './call-grpc-with-arguments'; +import { _CallHTTPWith } from './call-http-with'; +import { _Endpoint } from './endpoint'; +import { _CallOpenAPIWith } from './call-open-api-with'; +import { _CallOpenAPIWithParameters } from './call-open-api-with-parameters'; +import { _CallFunctionWith } from './call-function-with'; +import { _ForkTaskFork } from './fork-task-fork'; +import { _EmitTaskEmit } from './emit-task-emit'; +import { _EmitTaskEmitEvent } from './emit-task-emit-event'; +import { _ForTaskFor } from './for-task-for'; +import { _ListenTaskListen } from './listen-task-listen'; +import { _EventFilter } from './event-filter'; +import { _EventFilterWith } from './event-filter-with'; +import { _EventFilterCorrelate } from './event-filter-correlate'; +import { _RaiseTaskRaise } from './raise-task-raise'; +import { _RunTaskRunContainer } from './run-task-run-container'; +import { _RunTaskRunShell } from './run-task-run-shell'; +import { _RunTaskRunShellArguments } from './run-task-run-shell-arguments'; +import { _RunTaskRunShellEnvironment } from './run-task-run-shell-environment'; +import { _RunTaskRunWorkflow } from './run-task-run-workflow'; +import { _RunTaskRunWorkflowInput } from './run-task-run-workflow-input'; +import { _SetTaskSet } from './set-task-set'; +import { _SwitchTaskSwitchCase } from './switch-task-switch-case'; +import { _TryTaskCatch } from './try-task-catch'; +import { _RetryPolicy } from './retry-policy'; +import { _RetryPolicyLimit } from './retry-policy-limit'; +import { _RetryPolicyLimitAttempt } from './retry-policy-limit-attempt'; +import { _RetryPolicyJitter } from './retry-policy-jitter'; +import { _UseFunctions } from './use-functions'; +import { _UseRetries } from './use-retries'; +import { _Schedule } from './schedule'; export const Classes = { - Schema, - ExternalResource, - ExternalResourceAuthentication, - AuthenticationPolicy, - Task, - CallTask, - CallAsyncAPI, - FlowDirective, - CallAsyncAPIWithAuthentication, - CallGRPC, - CallGRPCWithServiceAuthentication, - CallHTTP, - CallHTTPWithEndpoint, - EndpointAuthentication, - CallOpenAPI, - CallOpenAPIWithAuthentication, - CallFunction, - DoTask, - ForkTask, - EmitTask, - ForTask, - ListenTask, - EventConsumptionStrategy, - EventConsumptionStrategyAll, - EventConsumptionStrategyAny, - RaiseTask, - RunTask, - RunTaskRun, - RunTaskRunScript, - SetTask, - SwitchTask, - SwitchTaskSwitch, - TryTask, - RetryPolicyBackoff, - WaitTask, - TaskList, - UseExtensions, - Workflow, - Document, - DocumentTags, - Input, - AuthenticationPolicyBasic, - AuthenticationPolicyBearer, - AuthenticationPolicyOauth2, - AuthenticationPolicyOauth2Client, - Oauth2Token, - Use, - UseAuthentications, - UseErrors, - Error, - Extension, - TaskBase, - Output, - Export, - Timeout, - Duration, - CallAsyncAPIWith, - CallGRPCWith, - CallGRPCWithService, - CallGRPCWithArguments, - CallHTTPWith, - Endpoint, - CallOpenAPIWith, - CallOpenAPIWithParameters, - CallFunctionWith, - ForkTaskFork, - EmitTaskEmit, - EmitTaskEmitEvent, - ForTaskFor, - ListenTaskListen, - EventFilter, - EventFilterWith, - EventFilterCorrelate, - RaiseTaskRaise, - RunTaskRunContainer, - RunTaskRunShell, - RunTaskRunShellArguments, - RunTaskRunShellEnvironment, - RunTaskRunWorkflow, - RunTaskRunWorkflowInput, - SetTaskSet, - SwitchTaskSwitchCase, - TryTaskCatch, - RetryPolicy, - RetryPolicyLimit, - RetryPolicyLimitAttempt, - RetryPolicyJitter, - UseFunctions, - UseRetries, - Schedule, + Schema: _Schema, + ExternalResource: _ExternalResource, + ExternalResourceAuthentication: _ExternalResourceAuthentication, + AuthenticationPolicy: _AuthenticationPolicy, + Task: _Task, + CallTask: _CallTask, + CallAsyncAPI: _CallAsyncAPI, + FlowDirective: _FlowDirective, + CallAsyncAPIWithAuthentication: _CallAsyncAPIWithAuthentication, + CallGRPC: _CallGRPC, + CallGRPCWithServiceAuthentication: _CallGRPCWithServiceAuthentication, + CallHTTP: _CallHTTP, + CallHTTPWithEndpoint: _CallHTTPWithEndpoint, + EndpointAuthentication: _EndpointAuthentication, + CallOpenAPI: _CallOpenAPI, + CallOpenAPIWithAuthentication: _CallOpenAPIWithAuthentication, + CallFunction: _CallFunction, + DoTask: _DoTask, + ForkTask: _ForkTask, + EmitTask: _EmitTask, + ForTask: _ForTask, + ListenTask: _ListenTask, + EventConsumptionStrategy: _EventConsumptionStrategy, + EventConsumptionStrategyAll: _EventConsumptionStrategyAll, + EventConsumptionStrategyAny: _EventConsumptionStrategyAny, + RaiseTask: _RaiseTask, + RunTask: _RunTask, + RunTaskRun: _RunTaskRun, + RunTaskRunScript: _RunTaskRunScript, + SetTask: _SetTask, + SwitchTask: _SwitchTask, + SwitchTaskSwitch: _SwitchTaskSwitch, + TryTask: _TryTask, + RetryPolicyBackoff: _RetryPolicyBackoff, + WaitTask: _WaitTask, + TaskList: _TaskList, + UseExtensions: _UseExtensions, + Workflow: _Workflow, + Document: _Document, + DocumentTags: _DocumentTags, + Input: _Input, + AuthenticationPolicyBasic: _AuthenticationPolicyBasic, + AuthenticationPolicyBearer: _AuthenticationPolicyBearer, + AuthenticationPolicyOauth2: _AuthenticationPolicyOauth2, + AuthenticationPolicyOauth2Client: _AuthenticationPolicyOauth2Client, + Oauth2Token: _Oauth2Token, + Use: _Use, + UseAuthentications: _UseAuthentications, + UseErrors: _UseErrors, + Error: _Error, + Extension: _Extension, + TaskBase: _TaskBase, + Output: _Output, + Export: _Export, + Timeout: _Timeout, + Duration: _Duration, + CallAsyncAPIWith: _CallAsyncAPIWith, + CallGRPCWith: _CallGRPCWith, + CallGRPCWithService: _CallGRPCWithService, + CallGRPCWithArguments: _CallGRPCWithArguments, + CallHTTPWith: _CallHTTPWith, + Endpoint: _Endpoint, + CallOpenAPIWith: _CallOpenAPIWith, + CallOpenAPIWithParameters: _CallOpenAPIWithParameters, + CallFunctionWith: _CallFunctionWith, + ForkTaskFork: _ForkTaskFork, + EmitTaskEmit: _EmitTaskEmit, + EmitTaskEmitEvent: _EmitTaskEmitEvent, + ForTaskFor: _ForTaskFor, + ListenTaskListen: _ListenTaskListen, + EventFilter: _EventFilter, + EventFilterWith: _EventFilterWith, + EventFilterCorrelate: _EventFilterCorrelate, + RaiseTaskRaise: _RaiseTaskRaise, + RunTaskRunContainer: _RunTaskRunContainer, + RunTaskRunShell: _RunTaskRunShell, + RunTaskRunShellArguments: _RunTaskRunShellArguments, + RunTaskRunShellEnvironment: _RunTaskRunShellEnvironment, + RunTaskRunWorkflow: _RunTaskRunWorkflow, + RunTaskRunWorkflowInput: _RunTaskRunWorkflowInput, + SetTaskSet: _SetTaskSet, + SwitchTaskSwitchCase: _SwitchTaskSwitchCase, + TryTaskCatch: _TryTaskCatch, + RetryPolicy: _RetryPolicy, + RetryPolicyLimit: _RetryPolicyLimit, + RetryPolicyLimitAttempt: _RetryPolicyLimitAttempt, + RetryPolicyJitter: _RetryPolicyJitter, + UseFunctions: _UseFunctions, + UseRetries: _UseRetries, + Schedule: _Schedule, }; diff --git a/src/lib/generated/classes/input.ts b/src/lib/generated/classes/input.ts index f84d300e..21ad9b2b 100644 --- a/src/lib/generated/classes/input.ts +++ b/src/lib/generated/classes/input.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Input extends Hydrator { +class Input extends Hydrator { constructor(model?: Partial) { super(model); } } -export const Input = _Input as { - new (model?: Partial): _Input & Specification.Input; +export const _Input = Input as { + new (model?: Partial): Input & Specification.Input; }; diff --git a/src/lib/generated/classes/listen-task-listen.ts b/src/lib/generated/classes/listen-task-listen.ts index 8acfcc0c..ab71ad3e 100644 --- a/src/lib/generated/classes/listen-task-listen.ts +++ b/src/lib/generated/classes/listen-task-listen.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _ListenTaskListen extends Hydrator { +class ListenTaskListen extends Hydrator { constructor(model?: Partial) { super(model); } } -export const ListenTaskListen = _ListenTaskListen as { - new (model?: Partial): _ListenTaskListen & Specification.ListenTaskListen; +export const _ListenTaskListen = ListenTaskListen as { + new (model?: Partial): ListenTaskListen & Specification.ListenTaskListen; }; diff --git a/src/lib/generated/classes/listen-task.ts b/src/lib/generated/classes/listen-task.ts index 06a5b5e0..59ff1f9f 100644 --- a/src/lib/generated/classes/listen-task.ts +++ b/src/lib/generated/classes/listen-task.ts @@ -20,15 +20,15 @@ * *****************************************************************************************/ -import { TaskBase } from './task-base'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _ListenTask extends TaskBase { +class ListenTask extends _TaskBase { constructor(model?: Partial) { super(model); } } -export const ListenTask = _ListenTask as { - new (model?: Partial): _ListenTask & Specification.ListenTask; +export const _ListenTask = ListenTask as { + new (model?: Partial): ListenTask & Specification.ListenTask; }; diff --git a/src/lib/generated/classes/oauth2-token.ts b/src/lib/generated/classes/oauth2-token.ts index 64110cc9..7044e54b 100644 --- a/src/lib/generated/classes/oauth2-token.ts +++ b/src/lib/generated/classes/oauth2-token.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Oauth2Token extends Hydrator { +class Oauth2Token extends Hydrator { constructor(model?: Partial) { super(model); } } -export const Oauth2Token = _Oauth2Token as { - new (model?: Partial): _Oauth2Token & Specification.Oauth2Token; +export const _Oauth2Token = Oauth2Token as { + new (model?: Partial): Oauth2Token & Specification.Oauth2Token; }; diff --git a/src/lib/generated/classes/output.ts b/src/lib/generated/classes/output.ts index 55409106..ac72b76d 100644 --- a/src/lib/generated/classes/output.ts +++ b/src/lib/generated/classes/output.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Output extends Hydrator { +class Output extends Hydrator { constructor(model?: Partial) { super(model); } } -export const Output = _Output as { - new (model?: Partial): _Output & Specification.Output; +export const _Output = Output as { + new (model?: Partial): Output & Specification.Output; }; diff --git a/src/lib/generated/classes/raise-task-raise.ts b/src/lib/generated/classes/raise-task-raise.ts index a06f2040..4d1e62c8 100644 --- a/src/lib/generated/classes/raise-task-raise.ts +++ b/src/lib/generated/classes/raise-task-raise.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RaiseTaskRaise extends Hydrator { +class RaiseTaskRaise extends Hydrator { constructor(model?: Partial) { super(model); } } -export const RaiseTaskRaise = _RaiseTaskRaise as { - new (model?: Partial): _RaiseTaskRaise & Specification.RaiseTaskRaise; +export const _RaiseTaskRaise = RaiseTaskRaise as { + new (model?: Partial): RaiseTaskRaise & Specification.RaiseTaskRaise; }; diff --git a/src/lib/generated/classes/raise-task.ts b/src/lib/generated/classes/raise-task.ts index 84a8f17d..46fa3e28 100644 --- a/src/lib/generated/classes/raise-task.ts +++ b/src/lib/generated/classes/raise-task.ts @@ -20,15 +20,15 @@ * *****************************************************************************************/ -import { TaskBase } from './task-base'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _RaiseTask extends TaskBase { +class RaiseTask extends _TaskBase { constructor(model?: Partial) { super(model); } } -export const RaiseTask = _RaiseTask as { - new (model?: Partial): _RaiseTask & Specification.RaiseTask; +export const _RaiseTask = RaiseTask as { + new (model?: Partial): RaiseTask & Specification.RaiseTask; }; diff --git a/src/lib/generated/classes/retry-policy-backoff.ts b/src/lib/generated/classes/retry-policy-backoff.ts index cf30c777..961e3df3 100644 --- a/src/lib/generated/classes/retry-policy-backoff.ts +++ b/src/lib/generated/classes/retry-policy-backoff.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RetryPolicyBackoff extends Hydrator { +class RetryPolicyBackoff extends Hydrator { constructor(model?: Partial) { super(model); } } -export const RetryPolicyBackoff = _RetryPolicyBackoff as { - new (model?: Partial): _RetryPolicyBackoff & Specification.RetryPolicyBackoff; +export const _RetryPolicyBackoff = RetryPolicyBackoff as { + new (model?: Partial): RetryPolicyBackoff & Specification.RetryPolicyBackoff; }; diff --git a/src/lib/generated/classes/retry-policy-jitter.ts b/src/lib/generated/classes/retry-policy-jitter.ts index c58e3673..0ad86265 100644 --- a/src/lib/generated/classes/retry-policy-jitter.ts +++ b/src/lib/generated/classes/retry-policy-jitter.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RetryPolicyJitter extends Hydrator { +class RetryPolicyJitter extends Hydrator { constructor(model?: Partial) { super(model); } } -export const RetryPolicyJitter = _RetryPolicyJitter as { - new (model?: Partial): _RetryPolicyJitter & Specification.RetryPolicyJitter; +export const _RetryPolicyJitter = RetryPolicyJitter as { + new (model?: Partial): RetryPolicyJitter & Specification.RetryPolicyJitter; }; diff --git a/src/lib/generated/classes/retry-policy-limit-attempt.ts b/src/lib/generated/classes/retry-policy-limit-attempt.ts index 1cd7b765..2384e473 100644 --- a/src/lib/generated/classes/retry-policy-limit-attempt.ts +++ b/src/lib/generated/classes/retry-policy-limit-attempt.ts @@ -23,14 +23,14 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RetryPolicyLimitAttempt extends Hydrator { +class RetryPolicyLimitAttempt extends Hydrator { constructor(model?: Partial) { super(model); } } -export const RetryPolicyLimitAttempt = _RetryPolicyLimitAttempt as { +export const _RetryPolicyLimitAttempt = RetryPolicyLimitAttempt as { new ( model?: Partial, - ): _RetryPolicyLimitAttempt & Specification.RetryPolicyLimitAttempt; + ): RetryPolicyLimitAttempt & Specification.RetryPolicyLimitAttempt; }; diff --git a/src/lib/generated/classes/retry-policy-limit.ts b/src/lib/generated/classes/retry-policy-limit.ts index 79b16aaf..a24dea63 100644 --- a/src/lib/generated/classes/retry-policy-limit.ts +++ b/src/lib/generated/classes/retry-policy-limit.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RetryPolicyLimit extends Hydrator { +class RetryPolicyLimit extends Hydrator { constructor(model?: Partial) { super(model); } } -export const RetryPolicyLimit = _RetryPolicyLimit as { - new (model?: Partial): _RetryPolicyLimit & Specification.RetryPolicyLimit; +export const _RetryPolicyLimit = RetryPolicyLimit as { + new (model?: Partial): RetryPolicyLimit & Specification.RetryPolicyLimit; }; diff --git a/src/lib/generated/classes/retry-policy.ts b/src/lib/generated/classes/retry-policy.ts index 0373ccd0..5cd5e817 100644 --- a/src/lib/generated/classes/retry-policy.ts +++ b/src/lib/generated/classes/retry-policy.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RetryPolicy extends Hydrator { +class RetryPolicy extends Hydrator { constructor(model?: Partial) { super(model); } } -export const RetryPolicy = _RetryPolicy as { - new (model?: Partial): _RetryPolicy & Specification.RetryPolicy; +export const _RetryPolicy = RetryPolicy as { + new (model?: Partial): RetryPolicy & Specification.RetryPolicy; }; diff --git a/src/lib/generated/classes/run-task-run-container.ts b/src/lib/generated/classes/run-task-run-container.ts index 6d58e668..12853268 100644 --- a/src/lib/generated/classes/run-task-run-container.ts +++ b/src/lib/generated/classes/run-task-run-container.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RunTaskRunContainer extends Hydrator { +class RunTaskRunContainer extends Hydrator { constructor(model?: Partial) { super(model); } } -export const RunTaskRunContainer = _RunTaskRunContainer as { - new (model?: Partial): _RunTaskRunContainer & Specification.RunTaskRunContainer; +export const _RunTaskRunContainer = RunTaskRunContainer as { + new (model?: Partial): RunTaskRunContainer & Specification.RunTaskRunContainer; }; diff --git a/src/lib/generated/classes/run-task-run-script.ts b/src/lib/generated/classes/run-task-run-script.ts index 881f9548..154352ca 100644 --- a/src/lib/generated/classes/run-task-run-script.ts +++ b/src/lib/generated/classes/run-task-run-script.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RunTaskRunScript extends Hydrator { +class RunTaskRunScript extends Hydrator { constructor(model?: Partial) { super(model); } } -export const RunTaskRunScript = _RunTaskRunScript as { - new (model?: Partial): _RunTaskRunScript & Specification.RunTaskRunScript; +export const _RunTaskRunScript = RunTaskRunScript as { + new (model?: Partial): RunTaskRunScript & Specification.RunTaskRunScript; }; diff --git a/src/lib/generated/classes/run-task-run-shell-arguments.ts b/src/lib/generated/classes/run-task-run-shell-arguments.ts index 9458a589..6c76e7ed 100644 --- a/src/lib/generated/classes/run-task-run-shell-arguments.ts +++ b/src/lib/generated/classes/run-task-run-shell-arguments.ts @@ -23,14 +23,14 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RunTaskRunShellArguments extends Hydrator { +class RunTaskRunShellArguments extends Hydrator { constructor(model?: Partial) { super(model); } } -export const RunTaskRunShellArguments = _RunTaskRunShellArguments as { +export const _RunTaskRunShellArguments = RunTaskRunShellArguments as { new ( model?: Partial, - ): _RunTaskRunShellArguments & Specification.RunTaskRunShellArguments; + ): RunTaskRunShellArguments & Specification.RunTaskRunShellArguments; }; diff --git a/src/lib/generated/classes/run-task-run-shell-environment.ts b/src/lib/generated/classes/run-task-run-shell-environment.ts index 887f77b8..fb215c52 100644 --- a/src/lib/generated/classes/run-task-run-shell-environment.ts +++ b/src/lib/generated/classes/run-task-run-shell-environment.ts @@ -23,14 +23,14 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RunTaskRunShellEnvironment extends Hydrator { +class RunTaskRunShellEnvironment extends Hydrator { constructor(model?: Partial) { super(model); } } -export const RunTaskRunShellEnvironment = _RunTaskRunShellEnvironment as { +export const _RunTaskRunShellEnvironment = RunTaskRunShellEnvironment as { new ( model?: Partial, - ): _RunTaskRunShellEnvironment & Specification.RunTaskRunShellEnvironment; + ): RunTaskRunShellEnvironment & Specification.RunTaskRunShellEnvironment; }; diff --git a/src/lib/generated/classes/run-task-run-shell.ts b/src/lib/generated/classes/run-task-run-shell.ts index 34adc968..f4780c26 100644 --- a/src/lib/generated/classes/run-task-run-shell.ts +++ b/src/lib/generated/classes/run-task-run-shell.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RunTaskRunShell extends Hydrator { +class RunTaskRunShell extends Hydrator { constructor(model?: Partial) { super(model); } } -export const RunTaskRunShell = _RunTaskRunShell as { - new (model?: Partial): _RunTaskRunShell & Specification.RunTaskRunShell; +export const _RunTaskRunShell = RunTaskRunShell as { + new (model?: Partial): RunTaskRunShell & Specification.RunTaskRunShell; }; diff --git a/src/lib/generated/classes/run-task-run-workflow-input.ts b/src/lib/generated/classes/run-task-run-workflow-input.ts index 5af31aed..7dec4ec6 100644 --- a/src/lib/generated/classes/run-task-run-workflow-input.ts +++ b/src/lib/generated/classes/run-task-run-workflow-input.ts @@ -23,14 +23,14 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RunTaskRunWorkflowInput extends Hydrator { +class RunTaskRunWorkflowInput extends Hydrator { constructor(model?: Partial) { super(model); } } -export const RunTaskRunWorkflowInput = _RunTaskRunWorkflowInput as { +export const _RunTaskRunWorkflowInput = RunTaskRunWorkflowInput as { new ( model?: Partial, - ): _RunTaskRunWorkflowInput & Specification.RunTaskRunWorkflowInput; + ): RunTaskRunWorkflowInput & Specification.RunTaskRunWorkflowInput; }; diff --git a/src/lib/generated/classes/run-task-run-workflow.ts b/src/lib/generated/classes/run-task-run-workflow.ts index 9e0b9872..e844b9f0 100644 --- a/src/lib/generated/classes/run-task-run-workflow.ts +++ b/src/lib/generated/classes/run-task-run-workflow.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RunTaskRunWorkflow extends Hydrator { +class RunTaskRunWorkflow extends Hydrator { constructor(model?: Partial) { super(model); } } -export const RunTaskRunWorkflow = _RunTaskRunWorkflow as { - new (model?: Partial): _RunTaskRunWorkflow & Specification.RunTaskRunWorkflow; +export const _RunTaskRunWorkflow = RunTaskRunWorkflow as { + new (model?: Partial): RunTaskRunWorkflow & Specification.RunTaskRunWorkflow; }; diff --git a/src/lib/generated/classes/run-task-run.ts b/src/lib/generated/classes/run-task-run.ts index 8b1ff7ad..8c407b54 100644 --- a/src/lib/generated/classes/run-task-run.ts +++ b/src/lib/generated/classes/run-task-run.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _RunTaskRun extends Hydrator { +class RunTaskRun extends Hydrator { constructor(model?: Partial) { super(model); } } -export const RunTaskRun = _RunTaskRun as { - new (model?: Partial): _RunTaskRun & Specification.RunTaskRun; +export const _RunTaskRun = RunTaskRun as { + new (model?: Partial): RunTaskRun & Specification.RunTaskRun; }; diff --git a/src/lib/generated/classes/run-task.ts b/src/lib/generated/classes/run-task.ts index eb0e0ef3..3f80b431 100644 --- a/src/lib/generated/classes/run-task.ts +++ b/src/lib/generated/classes/run-task.ts @@ -20,15 +20,15 @@ * *****************************************************************************************/ -import { TaskBase } from './task-base'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _RunTask extends TaskBase { +class RunTask extends _TaskBase { constructor(model?: Partial) { super(model); } } -export const RunTask = _RunTask as { - new (model?: Partial): _RunTask & Specification.RunTask; +export const _RunTask = RunTask as { + new (model?: Partial): RunTask & Specification.RunTask; }; diff --git a/src/lib/generated/classes/schedule.ts b/src/lib/generated/classes/schedule.ts index fe40e073..924257e5 100644 --- a/src/lib/generated/classes/schedule.ts +++ b/src/lib/generated/classes/schedule.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Schedule extends Hydrator { +class Schedule extends Hydrator { constructor(model?: Partial) { super(model); } } -export const Schedule = _Schedule as { - new (model?: Partial): _Schedule & Specification.Schedule; +export const _Schedule = Schedule as { + new (model?: Partial): Schedule & Specification.Schedule; }; diff --git a/src/lib/generated/classes/schema.ts b/src/lib/generated/classes/schema.ts index 526fddac..a7f48371 100644 --- a/src/lib/generated/classes/schema.ts +++ b/src/lib/generated/classes/schema.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Schema extends Hydrator { +class Schema extends Hydrator { constructor(model?: Partial) { super(model); } } -export const Schema = _Schema as { - new (model?: Partial): _Schema & Specification.Schema; +export const _Schema = Schema as { + new (model?: Partial): Schema & Specification.Schema; }; diff --git a/src/lib/generated/classes/set-task-set.ts b/src/lib/generated/classes/set-task-set.ts index f5571c8b..b5ad234b 100644 --- a/src/lib/generated/classes/set-task-set.ts +++ b/src/lib/generated/classes/set-task-set.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _SetTaskSet extends Hydrator { +class SetTaskSet extends Hydrator { constructor(model?: Partial) { super(model); } } -export const SetTaskSet = _SetTaskSet as { - new (model?: Partial): _SetTaskSet & Specification.SetTaskSet; +export const _SetTaskSet = SetTaskSet as { + new (model?: Partial): SetTaskSet & Specification.SetTaskSet; }; diff --git a/src/lib/generated/classes/set-task.ts b/src/lib/generated/classes/set-task.ts index f99350a4..fa60e491 100644 --- a/src/lib/generated/classes/set-task.ts +++ b/src/lib/generated/classes/set-task.ts @@ -20,15 +20,15 @@ * *****************************************************************************************/ -import { TaskBase } from './task-base'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _SetTask extends TaskBase { +class SetTask extends _TaskBase { constructor(model?: Partial) { super(model); } } -export const SetTask = _SetTask as { - new (model?: Partial): _SetTask & Specification.SetTask; +export const _SetTask = SetTask as { + new (model?: Partial): SetTask & Specification.SetTask; }; diff --git a/src/lib/generated/classes/switch-task-switch-case.ts b/src/lib/generated/classes/switch-task-switch-case.ts index 6392a21b..4c40fa45 100644 --- a/src/lib/generated/classes/switch-task-switch-case.ts +++ b/src/lib/generated/classes/switch-task-switch-case.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _SwitchTaskSwitchCase extends Hydrator { +class SwitchTaskSwitchCase extends Hydrator { constructor(model?: Partial) { super(model); } } -export const SwitchTaskSwitchCase = _SwitchTaskSwitchCase as { - new (model?: Partial): _SwitchTaskSwitchCase & Specification.SwitchTaskSwitchCase; +export const _SwitchTaskSwitchCase = SwitchTaskSwitchCase as { + new (model?: Partial): SwitchTaskSwitchCase & Specification.SwitchTaskSwitchCase; }; diff --git a/src/lib/generated/classes/switch-task-switch.ts b/src/lib/generated/classes/switch-task-switch.ts index 3aa5b6a2..29645a54 100644 --- a/src/lib/generated/classes/switch-task-switch.ts +++ b/src/lib/generated/classes/switch-task-switch.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _SwitchTaskSwitch extends Hydrator { +class SwitchTaskSwitch extends Hydrator { constructor(model?: Partial) { super(model); } } -export const SwitchTaskSwitch = _SwitchTaskSwitch as { - new (model?: Partial): _SwitchTaskSwitch & Specification.SwitchTaskSwitch; +export const _SwitchTaskSwitch = SwitchTaskSwitch as { + new (model?: Partial): SwitchTaskSwitch & Specification.SwitchTaskSwitch; }; diff --git a/src/lib/generated/classes/switch-task.ts b/src/lib/generated/classes/switch-task.ts index 07da04e3..0a576fac 100644 --- a/src/lib/generated/classes/switch-task.ts +++ b/src/lib/generated/classes/switch-task.ts @@ -20,15 +20,15 @@ * *****************************************************************************************/ -import { TaskBase } from './task-base'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _SwitchTask extends TaskBase { +class SwitchTask extends _TaskBase { constructor(model?: Partial) { super(model); } } -export const SwitchTask = _SwitchTask as { - new (model?: Partial): _SwitchTask & Specification.SwitchTask; +export const _SwitchTask = SwitchTask as { + new (model?: Partial): SwitchTask & Specification.SwitchTask; }; diff --git a/src/lib/generated/classes/task-base.ts b/src/lib/generated/classes/task-base.ts index 23c7d90b..4a08b786 100644 --- a/src/lib/generated/classes/task-base.ts +++ b/src/lib/generated/classes/task-base.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _TaskBase extends Hydrator { +class TaskBase extends Hydrator { constructor(model?: Partial) { super(model); } } -export const TaskBase = _TaskBase as { - new (model?: Partial): _TaskBase & Specification.TaskBase; +export const _TaskBase = TaskBase as { + new (model?: Partial): TaskBase & Specification.TaskBase; }; diff --git a/src/lib/generated/classes/task-list.ts b/src/lib/generated/classes/task-list.ts index 509a5a14..b02d39d2 100644 --- a/src/lib/generated/classes/task-list.ts +++ b/src/lib/generated/classes/task-list.ts @@ -22,7 +22,7 @@ import { Specification } from '../definitions'; -export class TaskList extends Array<{ [k: string]: Specification.Task }> { +class TaskList extends Array<{ [k: string]: Specification.Task }> { constructor(model?: Array<{ [k: string]: Specification.Task }>) { super(...(model || [])); if (model != null && !Array.isArray(model)) { @@ -31,3 +31,5 @@ export class TaskList extends Array<{ [k: string]: Specification.Task }> { Object.setPrototypeOf(this, Object.create(TaskList.prototype)); } } + +export const _TaskList = TaskList; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes diff --git a/src/lib/generated/classes/task.ts b/src/lib/generated/classes/task.ts index 8ddf8854..0c0383a2 100644 --- a/src/lib/generated/classes/task.ts +++ b/src/lib/generated/classes/task.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Task extends Hydrator { +class Task extends Hydrator { constructor(model?: Partial) { super(model); } } -export const Task = _Task as { - new (model?: Partial): _Task & Specification.Task; +export const _Task = Task as { + new (model?: Partial): Task & Specification.Task; }; diff --git a/src/lib/generated/classes/timeout.ts b/src/lib/generated/classes/timeout.ts index e221cf8d..bdbe4ed1 100644 --- a/src/lib/generated/classes/timeout.ts +++ b/src/lib/generated/classes/timeout.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Timeout extends Hydrator { +class Timeout extends Hydrator { constructor(model?: Partial) { super(model); } } -export const Timeout = _Timeout as { - new (model?: Partial): _Timeout & Specification.Timeout; +export const _Timeout = Timeout as { + new (model?: Partial): Timeout & Specification.Timeout; }; diff --git a/src/lib/generated/classes/try-task-catch.ts b/src/lib/generated/classes/try-task-catch.ts index 9b2fe811..6a74eb75 100644 --- a/src/lib/generated/classes/try-task-catch.ts +++ b/src/lib/generated/classes/try-task-catch.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _TryTaskCatch extends Hydrator { +class TryTaskCatch extends Hydrator { constructor(model?: Partial) { super(model); } } -export const TryTaskCatch = _TryTaskCatch as { - new (model?: Partial): _TryTaskCatch & Specification.TryTaskCatch; +export const _TryTaskCatch = TryTaskCatch as { + new (model?: Partial): TryTaskCatch & Specification.TryTaskCatch; }; diff --git a/src/lib/generated/classes/try-task.ts b/src/lib/generated/classes/try-task.ts index 7d89658b..968cb7ac 100644 --- a/src/lib/generated/classes/try-task.ts +++ b/src/lib/generated/classes/try-task.ts @@ -20,15 +20,15 @@ * *****************************************************************************************/ -import { TaskBase } from './task-base'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _TryTask extends TaskBase { +class TryTask extends _TaskBase { constructor(model?: Partial) { super(model); } } -export const TryTask = _TryTask as { - new (model?: Partial): _TryTask & Specification.TryTask; +export const _TryTask = TryTask as { + new (model?: Partial): TryTask & Specification.TryTask; }; diff --git a/src/lib/generated/classes/use-authentications.ts b/src/lib/generated/classes/use-authentications.ts index a7f7a81b..7e7bc616 100644 --- a/src/lib/generated/classes/use-authentications.ts +++ b/src/lib/generated/classes/use-authentications.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _UseAuthentications extends Hydrator { +class UseAuthentications extends Hydrator { constructor(model?: Partial) { super(model); } } -export const UseAuthentications = _UseAuthentications as { - new (model?: Partial): _UseAuthentications & Specification.UseAuthentications; +export const _UseAuthentications = UseAuthentications as { + new (model?: Partial): UseAuthentications & Specification.UseAuthentications; }; diff --git a/src/lib/generated/classes/use-errors.ts b/src/lib/generated/classes/use-errors.ts index c68c0556..28b6b0c5 100644 --- a/src/lib/generated/classes/use-errors.ts +++ b/src/lib/generated/classes/use-errors.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _UseErrors extends Hydrator { +class UseErrors extends Hydrator { constructor(model?: Partial) { super(model); } } -export const UseErrors = _UseErrors as { - new (model?: Partial): _UseErrors & Specification.UseErrors; +export const _UseErrors = UseErrors as { + new (model?: Partial): UseErrors & Specification.UseErrors; }; diff --git a/src/lib/generated/classes/use-extensions.ts b/src/lib/generated/classes/use-extensions.ts index 03653612..6e7f021e 100644 --- a/src/lib/generated/classes/use-extensions.ts +++ b/src/lib/generated/classes/use-extensions.ts @@ -22,7 +22,7 @@ import { Specification } from '../definitions'; -export class UseExtensions extends Array<{ [k: string]: Specification.Extension }> { +class UseExtensions extends Array<{ [k: string]: Specification.Extension }> { constructor(model?: Array<{ [k: string]: Specification.Extension }>) { super(...(model || [])); if (model != null && !Array.isArray(model)) { @@ -31,3 +31,5 @@ export class UseExtensions extends Array<{ [k: string]: Specification.Extension Object.setPrototypeOf(this, Object.create(UseExtensions.prototype)); } } + +export const _UseExtensions = UseExtensions; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes diff --git a/src/lib/generated/classes/use-functions.ts b/src/lib/generated/classes/use-functions.ts index 15377f27..e8ec8234 100644 --- a/src/lib/generated/classes/use-functions.ts +++ b/src/lib/generated/classes/use-functions.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _UseFunctions extends Hydrator { +class UseFunctions extends Hydrator { constructor(model?: Partial) { super(model); } } -export const UseFunctions = _UseFunctions as { - new (model?: Partial): _UseFunctions & Specification.UseFunctions; +export const _UseFunctions = UseFunctions as { + new (model?: Partial): UseFunctions & Specification.UseFunctions; }; diff --git a/src/lib/generated/classes/use-retries.ts b/src/lib/generated/classes/use-retries.ts index c01efc86..2c8773a0 100644 --- a/src/lib/generated/classes/use-retries.ts +++ b/src/lib/generated/classes/use-retries.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _UseRetries extends Hydrator { +class UseRetries extends Hydrator { constructor(model?: Partial) { super(model); } } -export const UseRetries = _UseRetries as { - new (model?: Partial): _UseRetries & Specification.UseRetries; +export const _UseRetries = UseRetries as { + new (model?: Partial): UseRetries & Specification.UseRetries; }; diff --git a/src/lib/generated/classes/use.ts b/src/lib/generated/classes/use.ts index 2ad2dea9..532649aa 100644 --- a/src/lib/generated/classes/use.ts +++ b/src/lib/generated/classes/use.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Use extends Hydrator { +class Use extends Hydrator { constructor(model?: Partial) { super(model); } } -export const Use = _Use as { - new (model?: Partial): _Use & Specification.Use; +export const _Use = Use as { + new (model?: Partial): Use & Specification.Use; }; diff --git a/src/lib/generated/classes/wait-task.ts b/src/lib/generated/classes/wait-task.ts index cacee4d0..2644f07f 100644 --- a/src/lib/generated/classes/wait-task.ts +++ b/src/lib/generated/classes/wait-task.ts @@ -20,15 +20,15 @@ * *****************************************************************************************/ -import { TaskBase } from './task-base'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -class _WaitTask extends TaskBase { +class WaitTask extends _TaskBase { constructor(model?: Partial) { super(model); } } -export const WaitTask = _WaitTask as { - new (model?: Partial): _WaitTask & Specification.WaitTask; +export const _WaitTask = WaitTask as { + new (model?: Partial): WaitTask & Specification.WaitTask; }; diff --git a/src/lib/generated/classes/workflow.ts b/src/lib/generated/classes/workflow.ts index 3bbe7e38..6b912bea 100644 --- a/src/lib/generated/classes/workflow.ts +++ b/src/lib/generated/classes/workflow.ts @@ -23,12 +23,12 @@ import { Hydrator } from '../../hydrator'; import { Specification } from '../definitions'; -class _Workflow extends Hydrator { +class Workflow extends Hydrator { constructor(model?: Partial) { super(model); } } -export const Workflow = _Workflow as { - new (model?: Partial): _Workflow & Specification.Workflow; +export const _Workflow = Workflow as { + new (model?: Partial): Workflow & Specification.Workflow; }; diff --git a/tests/builders/call-http-builder.spec.ts b/tests/builders/call-http-builder.spec.ts index 19a0b68d..a1bbb3ea 100644 --- a/tests/builders/call-http-builder.spec.ts +++ b/tests/builders/call-http-builder.spec.ts @@ -24,7 +24,7 @@ describe('CallHTTP builder', () => { const endpoint = 'https://serverlessworkflow.io'; const method = 'get'; const data = { - call: 'http' as 'http', + call: 'http' as const, with: { endpoint, method, diff --git a/tests/builders/use-extensions-builder.spec.ts b/tests/builders/use-extensions-builder.spec.ts index 127f98c5..7065b66a 100644 --- a/tests/builders/use-extensions-builder.spec.ts +++ b/tests/builders/use-extensions-builder.spec.ts @@ -5,7 +5,7 @@ describe('UseExtensions builder', () => { it('should build with fluent api', () => { const extension = { myExtension: { - extend: 'call' as 'call', + extend: 'call' as const, }, }; const useExtensions = useExtensionsBuilder().push(extension).build(); @@ -18,7 +18,7 @@ describe('UseExtensions builder', () => { it('should build with input', () => { const extension = { myExtension: { - extend: 'call' as 'call', + extend: 'call' as const, }, }; const useExtensions = useExtensionsBuilder([extension]).build(); @@ -35,4 +35,19 @@ describe('UseExtensions builder', () => { expect(test).toThrow(Error); expect(test).toThrow('The provided model should be an array'); }); + + it('should validate', () => { + const test = () => { + useExtensionsBuilder([1, 2, 3] as any).build(); + }; + expect(test).toThrow(Error); + expect(test).toThrow(/'UseExtensions' is invalid/); + }); + + it('should not validate', () => { + const test = () => { + useExtensionsBuilder([1, 2, 3] as any).build(false); + }; + expect(test).not.toThrow(); + }); }); diff --git a/tools/2_generate-definitions.ts b/tools/2_generate-definitions.ts index f51cabdf..0bdc8d63 100644 --- a/tools/2_generate-definitions.ts +++ b/tools/2_generate-definitions.ts @@ -95,7 +95,7 @@ function prepareSchema(schema: any, path: string[] = ['#'], parentTitle: string schemaKeys.filter((key) => !metadataProperties.includes(key)).length // if it's just a plain object, with nothing but a type an some description ) { if (parentTitle.trim()) { - let title = !isItemWithAdditionalProperties ? parent : path.includes('switch') ? 'case' : 'item'; + const title = !isItemWithAdditionalProperties ? parent : path.includes('switch') ? 'case' : 'item'; newSchema.title = toPascalCase(`${parentTitle} ${title}`); } else { newSchema.title = toPascalCase( diff --git a/tools/4_generate-classes.ts b/tools/4_generate-classes.ts index 68844b58..079ab783 100644 --- a/tools/4_generate-classes.ts +++ b/tools/4_generate-classes.ts @@ -38,17 +38,17 @@ const getObjectClassDeclaration = (name: string, baseClass?: string): string => `${fileHeader} ${inFileDisclaimer} -${baseClass ? `import { ${baseClass} } from './${toKebabCase(normalizeKnownAllCaps(baseClass))}';` : 'import { Hydrator } from "../../hydrator";'} +${baseClass ? `import { _${baseClass} } from './${toKebabCase(normalizeKnownAllCaps(baseClass))}';` : 'import { Hydrator } from "../../hydrator";'} import { Specification } from "../definitions"; -class _${name} extends ${baseClass ? baseClass : `Hydrator`} { +class ${name} extends ${baseClass ? '_' + baseClass : `Hydrator`} { constructor(model?: Partial) { super(model); } } -export const ${name} = _${name} as ({ - new (model?: Partial): _${name} & Specification.${name} +export const _${name} = ${name} as ({ + new (model?: Partial): ${name} & Specification.${name} });`; /** @@ -63,7 +63,7 @@ ${inFileDisclaimer} import { Specification } from "../definitions"; -export class ${name} extends Array<${arrayType}> { +class ${name} extends Array<${arrayType}> { constructor(model?: Array<${arrayType}>) { super(...(model||[])); if (model != null && !Array.isArray(model)) { @@ -72,6 +72,8 @@ export class ${name} extends Array<${arrayType}> { Object.setPrototypeOf(this, Object.create(${name}.prototype)); } } + +export const _${name} = ${name}; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes `; /** @@ -84,8 +86,8 @@ async function generate(definitionFile: string, destDir: string): Promise const exportedDeclarations = getExportedDeclarations(definitions); const aliases = Array.from(exportedDeclarations.keys()); await reset(destDir); - for (const [alias, exported] of exportedDeclarations) { - const exportedType = exported![0].getType(); + for (const [alias, node] of exportedDeclarations) { + const exportedType = node![0].getType(); let classDeclaration: string = ''; if (!exportedType.isArray()) { const baseClass = exportedType.getIntersectionTypes()?.[0]?.getText().replace('import("/declarations").', ''); @@ -101,9 +103,9 @@ async function generate(definitionFile: string, destDir: string): Promise await writeFile(destFile, classDeclaration); } const indexSrc = `${fileHeader} -${aliases.reduce((imports, alias) => `${imports}import { ${alias} } from './${toKebabCase(normalizeKnownAllCaps(alias))}';\n`, '')} +${aliases.reduce((imports, alias) => `${imports}import { _${alias} } from './${toKebabCase(normalizeKnownAllCaps(alias))}';\n`, '')} export const Classes = { - ${aliases.reduce((exports, alias) => `${exports} ${alias},\n`, '')} +${aliases.reduce((exports, alias) => `${exports} ${alias}: _${alias},\n`, '')} };`; const destFile = path.resolve(destDir, 'index.ts'); await writeFile(destFile, indexSrc); diff --git a/tools/5_generate-builders.ts b/tools/5_generate-builders.ts index f4011287..c5fe62d0 100644 --- a/tools/5_generate-builders.ts +++ b/tools/5_generate-builders.ts @@ -135,8 +135,8 @@ async function generate(definitionFile: string, destDir: string): Promise const definitions = await readFile(definitionFile, { encoding: 'utf-8' }); const exportedDeclarations = getExportedDeclarations(definitions); const aliases = Array.from(exportedDeclarations.keys()); - for (const [alias, exported] of exportedDeclarations) { - const exportedType = exported![0].getType(); + for (const [alias, node] of exportedDeclarations) { + const exportedType = node![0].getType(); let builderDeclaration: string = ''; if (!exportedType.isArray()) { builderDeclaration = getObjectBuilderDeclaration(alias); diff --git a/tools/tmp.ts b/tools/tmp.ts new file mode 100644 index 00000000..aa5bc127 --- /dev/null +++ b/tools/tmp.ts @@ -0,0 +1,207 @@ +/* eslint-disable */ +import { definitionsDir } from './utils'; +import * as path from 'path'; +import { promises as fsPromises } from 'fs'; +import { Project, QuoteKind, Type, Node, TypeNode } from 'ts-morph'; + +const { readFile, writeFile } = fsPromises; + +const definitionFile = path.resolve(definitionsDir, 'specification.ts'); + +const getUnderlyingTypes = (type: Type): Type[] => [ + type, + ...type.getUnionTypes().flatMap((t) => getUnderlyingTypes(t)), + ...type.getIntersectionTypes().flatMap((t) => getUnderlyingTypes(t)), +]; //.filter(t => !t.isArray()); + +type PropertyInfo = { + name: string; + type: string; + originalType: Type; + originalDeclaration: string; + isArray: boolean; + isAnonymous: boolean; + isLiteral: boolean; + hasIndexedSignature: boolean; +}; + +const hasStringIndexedSignature = (type: Type): boolean => !!type.getStringIndexType(); + +const getProperties = (node: any, type: Type): PropertyInfo[] => + getUnderlyingTypes(type) + .filter((t) => t.isObject()) + .flatMap((t) => t.getProperties()) + .filter((p, i, arr) => { + const originalType = p.getTypeAtLocation(node).getNonNullableType(); + // originalType.isObject() doesn't return the expected result + const isObject = !( + ( + originalType.isString() || + originalType.isNumber() || + originalType.isBoolean() || + originalType.isBigInt() || + originalType.isEnum() || + originalType.isAny() || + originalType.isUnknown() + ) + //|| originalType.isLiteral() + ); + const isAnonymous = originalType.isAnonymous(); + const isAny = originalType.isAny(); + const isArray = originalType.isArray(); + const isBoolean = originalType.isBoolean(); + const isBooleanLiteral = originalType.isBooleanLiteral(); + const isClass = originalType.isClass(); + const isClassOrInterface = originalType.isClassOrInterface(); + const isEnum = originalType.isEnum(); + const isEnumLiteral = originalType.isEnumLiteral(); + const isInterface = originalType.isInterface(); + const isIntersection = originalType.isIntersection(); + const isLiteral = originalType.isLiteral(); + const isNull = originalType.isNull(); + const isNumber = originalType.isNumber(); + const isNumberLiteral = originalType.isNumberLiteral(); + //const isObject = originalType.isObject(); + const isString = originalType.isString(); + const isStringLiteral = originalType.isStringLiteral(); + const isTemplateLiteral = originalType.isTemplateLiteral(); + const isTuple = originalType.isTuple(); + const isUndefined = originalType.isUndefined(); + const isUnion = originalType.isUnion(); + const isUnionOrIntersection = originalType.isUnionOrIntersection(); + const isUnknown = originalType.isUnknown(); + return arr.indexOf(p) === i && isObject; + //arr.findIndex(pp => pp.getName() === p.getName()) === i // removes duplicates based on names, but creates unwanted behavior + // e.g. with Task, `with` can be of type `CallAsyncAPIWith`,`CallGRPCWith`... + }) + .map((p) => { + const name = p.getName(); + const originalType = p.getTypeAtLocation(node).getNonNullableType(); + const originalDeclaration = originalType.getText(); + const isArray = originalType.isArray(); + const isAnonymous = originalType.isAnonymous(); + const isLiteral = originalType.isLiteral(); + const hasIndexedSignature = hasStringIndexedSignature(originalType); + let typeTxt = ''; + if (/*!isArray && */ !isAnonymous || !hasIndexedSignature) { + typeTxt = originalType.getText(); + } else if (hasIndexedSignature) { + typeTxt = originalType.getStringIndexType()!.getText(); + } + /*else { + const arrayType = originalType.getArrayElementType()!; + if (!hasStringIndexedSignature(arrayType)) { + typeTxt = arrayType.getText(); + } + else { + typeTxt = arrayType.getStringIndexType()!.getText(); + } + }*/ + typeTxt = typeTxt.replace('import("/declarations").', ''); + return { + name, + originalType, + originalDeclaration, + isArray, + isAnonymous, + isLiteral, + hasIndexedSignature, + type: typeTxt, + }; + }) + .concat( + hasStringIndexedSignature(type) + ? [ + { + name: '', + originalType: type.getStringIndexType()!, + originalDeclaration: type.getStringIndexType()!.getText(), + isArray: type.getStringIndexType()!.isArray(), + isAnonymous: type.getStringIndexType()!.isAnonymous(), + isLiteral: type.getStringIndexType()!.isLiteral(), + hasIndexedSignature: true, + type: type.getStringIndexType()!.getText(), + }, + ] + : [], + ); + +async function test() { + const source = await readFile(definitionFile, { encoding: 'utf-8' }); + const project = new Project({ + useInMemoryFileSystem: true, + manipulationSettings: { + quoteKind: QuoteKind.Single, + }, + compilerOptions: { + strictNullChecks: true, + }, + }); + const sourceFile = project.createSourceFile('declarations.ts', source); + const exportedDeclarations = sourceFile.getExportedDeclarations(); + // var node = exportedDeclarations.get('ExternalResource')![0]; + // var target = node.getType(); + // var props = getProperties(node, target); + var node = exportedDeclarations.get('SwitchTaskSwitch')![0]; + var target = node.getType(); + var it = target.getIntersectionTypes(); + var props = getProperties(node, target); + var declarations = !target.isArray() ? getObjectHydration(node, target) : 'IS ARRAY'; + /* + Strange union + - SwitchTaskSwitch + + Strange union (literal?) + - CallHTTPWith / CallOpenAPIWith . output + + Array with object key-type + - TaskList + - UseExtensions + */ + console.log(declarations); +} + +function getObjectHydration(node: Node, type: Type): string { + const properties = getProperties(node, type); + const namedProperties = properties.filter((p, i, arr) => p.name && arr.findIndex((pp) => pp.name === p.name) === i); + const lines: string[] = namedProperties + .filter((p) => p.type !== 'unknown') + .map((prop) => { + if (prop.isLiteral) { + return `self.${prop.name} = ${prop.type};`; + } else if (/*!prop.isArray && */ !prop.isAnonymous) { + return `if (model.${prop.name}) self.${prop.name} = new ${prop.type}(model.${prop.name});`; + } /*if (prop.isAnonymous)*/ else { + return `if (model.${prop.name}) self.${prop.name} = Object.fromEntries( + Object.entries(model.${prop.name}).map(([key, value]) => [key, new ${prop.type}(value)] ) + );`; + } + /* Array should support their own constructor, like any object + else { + if (!prop.isAnonymous) { + return `if (model.${prop.name}?.length) self.${prop.name} = model.${prop.name}.map(value => new ${prop.type}(value));`; + } + else { // assumes an array of { id: Type } + return `if (model.${prop.name}?.length) self.${prop.name} = model.${prop.name}.map(obj => + Object.fromEntries( + Object.entries(obj).map(([key, value]) => [key, new ${prop.type}(value)]) + ) + );`; + } + } + */ + }); + const indexedProperty = properties.find((p) => !p.name); + if (indexedProperty && indexedProperty.type !== 'unknown' && !indexedProperty.isAnonymous) { + lines.push(`const knownProperties = [${namedProperties.map((p) => `'${p.name}'`).join(',')}];`); + lines.push(`Object.entries(model).filter(([key]) => !knownProperties.includes(key)).forEach(([key, value]) => { + self[key] = new ${indexedProperty.type}(value); + });`); + } + return lines.join('\n'); +} + +test() + .then(() => console.log('done')) + .catch((err) => console.error(err)); +/* eslint-enable */ From 51a25ed0e707f3f15c47c1f2df7dcf014bed6eaa Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Tue, 30 Jul 2024 10:55:24 +0200 Subject: [PATCH 09/24] Recursive hydration when creating an instance Signed-off-by: Jean-Baptiste Bianchi --- .../authentication-policy-basic-builder.ts | 6 + .../authentication-policy-bearer-builder.ts | 6 + .../builders/authentication-policy-builder.ts | 6 + .../authentication-policy-oauth2-builder.ts | 6 + ...entication-policy-oauth2-client-builder.ts | 6 + .../builders/call-async-api-builder.ts | 6 + ...l-async-api-with-authentication-builder.ts | 6 + .../builders/call-async-api-with-builder.ts | 6 + .../builders/call-function-builder.ts | 6 + .../builders/call-function-with-builder.ts | 6 + .../generated/builders/call-grpc-builder.ts | 6 + .../call-grpc-with-arguments-builder.ts | 6 + .../builders/call-grpc-with-builder.ts | 6 + ...rpc-with-service-authentication-builder.ts | 6 + .../call-grpc-with-service-builder.ts | 6 + .../generated/builders/call-http-builder.ts | 6 + .../builders/call-http-with-builder.ts | 6 + .../call-http-with-endpoint-builder.ts | 6 + .../builders/call-open-api-builder.ts | 6 + ...ll-open-api-with-authentication-builder.ts | 6 + .../builders/call-open-api-with-builder.ts | 6 + .../call-open-api-with-parameters-builder.ts | 6 + .../generated/builders/call-task-builder.ts | 6 + src/lib/generated/builders/do-task-builder.ts | 6 + .../generated/builders/document-builder.ts | 6 + .../builders/document-tags-builder.ts | 6 + .../generated/builders/duration-builder.ts | 6 + .../generated/builders/emit-task-builder.ts | 6 + .../builders/emit-task-emit-builder.ts | 6 + .../builders/emit-task-emit-event-builder.ts | 6 + .../endpoint-authentication-builder.ts | 6 + .../generated/builders/endpoint-builder.ts | 6 + src/lib/generated/builders/error-builder.ts | 6 + .../event-consumption-strategy-all-builder.ts | 6 + .../event-consumption-strategy-any-builder.ts | 6 + .../event-consumption-strategy-builder.ts | 6 + .../builders/event-filter-builder.ts | 6 + .../event-filter-correlate-builder.ts | 6 + .../builders/event-filter-with-builder.ts | 6 + src/lib/generated/builders/export-builder.ts | 6 + .../generated/builders/extension-builder.ts | 6 + ...xternal-resource-authentication-builder.ts | 6 + .../builders/external-resource-builder.ts | 6 + .../builders/flow-directive-builder.ts | 6 + .../generated/builders/for-task-builder.ts | 6 + .../builders/for-task-for-builder.ts | 6 + .../generated/builders/fork-task-builder.ts | 6 + .../builders/fork-task-fork-builder.ts | 6 + src/lib/generated/builders/input-builder.ts | 6 + .../generated/builders/listen-task-builder.ts | 6 + .../builders/listen-task-listen-builder.ts | 6 + .../builders/oauth2-token-builder.ts | 6 + src/lib/generated/builders/output-builder.ts | 6 + .../generated/builders/raise-task-builder.ts | 6 + .../builders/raise-task-raise-builder.ts | 6 + .../builders/retry-policy-backoff-builder.ts | 6 + .../builders/retry-policy-builder.ts | 6 + .../builders/retry-policy-jitter-builder.ts | 6 + .../retry-policy-limit-attempt-builder.ts | 6 + .../builders/retry-policy-limit-builder.ts | 6 + .../generated/builders/run-task-builder.ts | 6 + .../builders/run-task-run-builder.ts | 6 + .../run-task-run-container-builder.ts | 6 + .../builders/run-task-run-script-builder.ts | 6 + .../run-task-run-shell-arguments-builder.ts | 6 + .../builders/run-task-run-shell-builder.ts | 6 + .../run-task-run-shell-environment-builder.ts | 6 + .../builders/run-task-run-workflow-builder.ts | 6 + .../run-task-run-workflow-input-builder.ts | 6 + .../generated/builders/schedule-builder.ts | 6 + src/lib/generated/builders/schema-builder.ts | 6 + .../generated/builders/set-task-builder.ts | 6 + .../builders/set-task-set-builder.ts | 6 + .../generated/builders/switch-task-builder.ts | 6 + .../builders/switch-task-switch-builder.ts | 6 + .../switch-task-switch-case-builder.ts | 6 + .../generated/builders/task-base-builder.ts | 6 + src/lib/generated/builders/task-builder.ts | 6 + .../generated/builders/task-list-builder.ts | 6 + src/lib/generated/builders/timeout-builder.ts | 6 + .../generated/builders/try-task-builder.ts | 6 + .../builders/try-task-catch-builder.ts | 6 + .../builders/use-authentications-builder.ts | 6 + src/lib/generated/builders/use-builder.ts | 6 + .../generated/builders/use-errors-builder.ts | 6 + .../builders/use-extensions-builder.ts | 6 + .../builders/use-functions-builder.ts | 6 + .../generated/builders/use-retries-builder.ts | 6 + .../generated/builders/wait-task-builder.ts | 6 + .../generated/builders/workflow-builder.ts | 6 + .../classes/authentication-policy-basic.ts | 5 +- .../classes/authentication-policy-bearer.ts | 5 +- .../authentication-policy-oauth2-client.ts | 5 +- .../classes/authentication-policy-oauth2.ts | 13 +- .../classes/authentication-policy.ts | 17 +- .../call-async-api-with-authentication.ts | 17 +- .../generated/classes/call-async-api-with.ts | 5 +- src/lib/generated/classes/call-async-api.ts | 15 + .../generated/classes/call-function-with.ts | 5 +- src/lib/generated/classes/call-function.ts | 14 + .../classes/call-grpc-with-arguments.ts | 5 +- .../call-grpc-with-service-authentication.ts | 17 +- .../classes/call-grpc-with-service.ts | 5 +- src/lib/generated/classes/call-grpc-with.ts | 12 +- src/lib/generated/classes/call-grpc.ts | 15 + .../classes/call-http-with-endpoint.ts | 5 +- src/lib/generated/classes/call-http-with.ts | 10 +- src/lib/generated/classes/call-http.ts | 15 + .../call-open-api-with-authentication.ts | 17 +- .../classes/call-open-api-with-parameters.ts | 5 +- .../generated/classes/call-open-api-with.ts | 10 +- src/lib/generated/classes/call-open-api.ts | 15 + src/lib/generated/classes/call-task.ts | 16 +- src/lib/generated/classes/do-task.ts | 14 + src/lib/generated/classes/document-tags.ts | 5 +- src/lib/generated/classes/document.ts | 10 +- src/lib/generated/classes/duration.ts | 5 +- .../generated/classes/emit-task-emit-event.ts | 5 +- src/lib/generated/classes/emit-task-emit.ts | 10 +- src/lib/generated/classes/emit-task.ts | 14 + .../classes/endpoint-authentication.ts | 17 +- src/lib/generated/classes/endpoint.ts | 5 +- src/lib/generated/classes/error.ts | 5 +- .../classes/event-consumption-strategy-all.ts | 15 +- .../classes/event-consumption-strategy-any.ts | 15 +- .../classes/event-consumption-strategy.ts | 16 +- .../classes/event-filter-correlate.ts | 5 +- .../generated/classes/event-filter-with.ts | 5 +- src/lib/generated/classes/event-filter.ts | 12 +- src/lib/generated/classes/export.ts | 5 +- src/lib/generated/classes/extension.ts | 11 +- .../external-resource-authentication.ts | 17 +- .../generated/classes/external-resource.ts | 5 +- src/lib/generated/classes/flow-directive.ts | 5 +- src/lib/generated/classes/for-task-for.ts | 5 +- src/lib/generated/classes/for-task.ts | 16 + src/lib/generated/classes/fork-task-fork.ts | 10 +- src/lib/generated/classes/fork-task.ts | 14 + src/lib/generated/classes/input.ts | 5 +- .../generated/classes/listen-task-listen.ts | 5 +- src/lib/generated/classes/listen-task.ts | 14 + src/lib/generated/classes/oauth2-token.ts | 5 +- src/lib/generated/classes/output.ts | 5 +- src/lib/generated/classes/raise-task-raise.ts | 10 +- src/lib/generated/classes/raise-task.ts | 14 + .../generated/classes/retry-policy-backoff.ts | 5 +- .../generated/classes/retry-policy-jitter.ts | 11 +- .../classes/retry-policy-limit-attempt.ts | 10 +- .../generated/classes/retry-policy-limit.ts | 12 +- src/lib/generated/classes/retry-policy.ts | 14 +- .../classes/run-task-run-container.ts | 5 +- .../generated/classes/run-task-run-script.ts | 5 +- .../classes/run-task-run-shell-arguments.ts | 5 +- .../classes/run-task-run-shell-environment.ts | 5 +- .../generated/classes/run-task-run-shell.ts | 12 +- .../classes/run-task-run-workflow-input.ts | 5 +- .../classes/run-task-run-workflow.ts | 10 +- src/lib/generated/classes/run-task-run.ts | 17 +- src/lib/generated/classes/run-task.ts | 12 + src/lib/generated/classes/schedule.ts | 11 +- src/lib/generated/classes/schema.ts | 5 +- src/lib/generated/classes/set-task-set.ts | 5 +- src/lib/generated/classes/set-task.ts | 14 + .../classes/switch-task-switch-case.ts | 5 +- .../generated/classes/switch-task-switch.ts | 22 +- src/lib/generated/classes/switch-task.ts | 15 + src/lib/generated/classes/task-base.ts | 16 +- src/lib/generated/classes/task-list.ts | 17 +- src/lib/generated/classes/task.ts | 41 ++- src/lib/generated/classes/timeout.ts | 10 +- src/lib/generated/classes/try-task-catch.ts | 12 +- src/lib/generated/classes/try-task.ts | 16 + .../generated/classes/use-authentications.ts | 5 +- src/lib/generated/classes/use-errors.ts | 15 +- src/lib/generated/classes/use-extensions.ts | 17 +- src/lib/generated/classes/use-functions.ts | 15 +- src/lib/generated/classes/use-retries.ts | 15 +- src/lib/generated/classes/use.ts | 19 +- src/lib/generated/classes/wait-task.ts | 14 + src/lib/generated/classes/workflow.ts | 22 +- .../validation/validation-pointers.ts | 8 + src/lib/hydrator.ts | 23 +- src/lib/utils.ts | 16 +- src/lib/validation.ts | 3 +- tests/builders/call-http-builder.spec.ts | 1 - tools/3_generate-validation-pointers.ts | 3 +- tools/4_generate-classes.ts | 75 +++-- tools/5_generate-builders.ts | 10 +- tools/consts.ts | 12 +- tools/reflection.ts | 283 ++++++++++++++++++ tools/tmp.ts | 182 +---------- tools/utils.ts | 17 -- 192 files changed, 1760 insertions(+), 404 deletions(-) create mode 100644 tools/reflection.ts diff --git a/src/lib/generated/builders/authentication-policy-basic-builder.ts b/src/lib/generated/builders/authentication-policy-basic-builder.ts index d7288a3d..644f1650 100644 --- a/src/lib/generated/builders/authentication-policy-basic-builder.ts +++ b/src/lib/generated/builders/authentication-policy-basic-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/authentication-policy-bearer-builder.ts b/src/lib/generated/builders/authentication-policy-bearer-builder.ts index 5ac82599..25b9850a 100644 --- a/src/lib/generated/builders/authentication-policy-bearer-builder.ts +++ b/src/lib/generated/builders/authentication-policy-bearer-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/authentication-policy-builder.ts b/src/lib/generated/builders/authentication-policy-builder.ts index 461c053a..894d0e6f 100644 --- a/src/lib/generated/builders/authentication-policy-builder.ts +++ b/src/lib/generated/builders/authentication-policy-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/authentication-policy-oauth2-builder.ts b/src/lib/generated/builders/authentication-policy-oauth2-builder.ts index b9097dbb..f1e038e9 100644 --- a/src/lib/generated/builders/authentication-policy-oauth2-builder.ts +++ b/src/lib/generated/builders/authentication-policy-oauth2-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts b/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts index 9702d6fd..e471dd8e 100644 --- a/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts +++ b/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/call-async-api-builder.ts b/src/lib/generated/builders/call-async-api-builder.ts index 355bc5bc..afb55703 100644 --- a/src/lib/generated/builders/call-async-api-builder.ts +++ b/src/lib/generated/builders/call-async-api-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/call-async-api-with-authentication-builder.ts b/src/lib/generated/builders/call-async-api-with-authentication-builder.ts index 2e7c3f85..18b520ea 100644 --- a/src/lib/generated/builders/call-async-api-with-authentication-builder.ts +++ b/src/lib/generated/builders/call-async-api-with-authentication-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/call-async-api-with-builder.ts b/src/lib/generated/builders/call-async-api-with-builder.ts index bb97f837..41a52f50 100644 --- a/src/lib/generated/builders/call-async-api-with-builder.ts +++ b/src/lib/generated/builders/call-async-api-with-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/call-function-builder.ts b/src/lib/generated/builders/call-function-builder.ts index f66a7147..f0f21caf 100644 --- a/src/lib/generated/builders/call-function-builder.ts +++ b/src/lib/generated/builders/call-function-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/call-function-with-builder.ts b/src/lib/generated/builders/call-function-with-builder.ts index 6a27d63d..002e021a 100644 --- a/src/lib/generated/builders/call-function-with-builder.ts +++ b/src/lib/generated/builders/call-function-with-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/call-grpc-builder.ts b/src/lib/generated/builders/call-grpc-builder.ts index 79e79bf1..2748e628 100644 --- a/src/lib/generated/builders/call-grpc-builder.ts +++ b/src/lib/generated/builders/call-grpc-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/call-grpc-with-arguments-builder.ts b/src/lib/generated/builders/call-grpc-with-arguments-builder.ts index 482841e2..4c1f02f7 100644 --- a/src/lib/generated/builders/call-grpc-with-arguments-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-arguments-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/call-grpc-with-builder.ts b/src/lib/generated/builders/call-grpc-with-builder.ts index 73ffedcc..8a9506ce 100644 --- a/src/lib/generated/builders/call-grpc-with-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts b/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts index f6b4b156..b99e3e13 100644 --- a/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/call-grpc-with-service-builder.ts b/src/lib/generated/builders/call-grpc-with-service-builder.ts index be2e48de..c5fd4a24 100644 --- a/src/lib/generated/builders/call-grpc-with-service-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-service-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/call-http-builder.ts b/src/lib/generated/builders/call-http-builder.ts index 22c1f5af..0c93e5b6 100644 --- a/src/lib/generated/builders/call-http-builder.ts +++ b/src/lib/generated/builders/call-http-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/call-http-with-builder.ts b/src/lib/generated/builders/call-http-with-builder.ts index cb6fdef1..3b7e616c 100644 --- a/src/lib/generated/builders/call-http-with-builder.ts +++ b/src/lib/generated/builders/call-http-with-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/call-http-with-endpoint-builder.ts b/src/lib/generated/builders/call-http-with-endpoint-builder.ts index e88921fa..88690140 100644 --- a/src/lib/generated/builders/call-http-with-endpoint-builder.ts +++ b/src/lib/generated/builders/call-http-with-endpoint-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/call-open-api-builder.ts b/src/lib/generated/builders/call-open-api-builder.ts index 8e7db01c..0a216404 100644 --- a/src/lib/generated/builders/call-open-api-builder.ts +++ b/src/lib/generated/builders/call-open-api-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/call-open-api-with-authentication-builder.ts b/src/lib/generated/builders/call-open-api-with-authentication-builder.ts index 795137c5..de8c7adf 100644 --- a/src/lib/generated/builders/call-open-api-with-authentication-builder.ts +++ b/src/lib/generated/builders/call-open-api-with-authentication-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/call-open-api-with-builder.ts b/src/lib/generated/builders/call-open-api-with-builder.ts index 83b369ed..d198299a 100644 --- a/src/lib/generated/builders/call-open-api-with-builder.ts +++ b/src/lib/generated/builders/call-open-api-with-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/call-open-api-with-parameters-builder.ts b/src/lib/generated/builders/call-open-api-with-parameters-builder.ts index ae98a28b..909e50e9 100644 --- a/src/lib/generated/builders/call-open-api-with-parameters-builder.ts +++ b/src/lib/generated/builders/call-open-api-with-parameters-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/call-task-builder.ts b/src/lib/generated/builders/call-task-builder.ts index 4f8a7ef9..1a4ae758 100644 --- a/src/lib/generated/builders/call-task-builder.ts +++ b/src/lib/generated/builders/call-task-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/do-task-builder.ts b/src/lib/generated/builders/do-task-builder.ts index 0a9d1f58..0cfa0add 100644 --- a/src/lib/generated/builders/do-task-builder.ts +++ b/src/lib/generated/builders/do-task-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/document-builder.ts b/src/lib/generated/builders/document-builder.ts index ca3d7d4e..22afba97 100644 --- a/src/lib/generated/builders/document-builder.ts +++ b/src/lib/generated/builders/document-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/document-tags-builder.ts b/src/lib/generated/builders/document-tags-builder.ts index b5d37541..415ba651 100644 --- a/src/lib/generated/builders/document-tags-builder.ts +++ b/src/lib/generated/builders/document-tags-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/duration-builder.ts b/src/lib/generated/builders/duration-builder.ts index bf080b99..e9433820 100644 --- a/src/lib/generated/builders/duration-builder.ts +++ b/src/lib/generated/builders/duration-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/emit-task-builder.ts b/src/lib/generated/builders/emit-task-builder.ts index a1f83061..aeeb0e9f 100644 --- a/src/lib/generated/builders/emit-task-builder.ts +++ b/src/lib/generated/builders/emit-task-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/emit-task-emit-builder.ts b/src/lib/generated/builders/emit-task-emit-builder.ts index afcc82ad..fd656879 100644 --- a/src/lib/generated/builders/emit-task-emit-builder.ts +++ b/src/lib/generated/builders/emit-task-emit-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/emit-task-emit-event-builder.ts b/src/lib/generated/builders/emit-task-emit-event-builder.ts index 42362330..63240795 100644 --- a/src/lib/generated/builders/emit-task-emit-event-builder.ts +++ b/src/lib/generated/builders/emit-task-emit-event-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/endpoint-authentication-builder.ts b/src/lib/generated/builders/endpoint-authentication-builder.ts index cf9a29cb..5d88de72 100644 --- a/src/lib/generated/builders/endpoint-authentication-builder.ts +++ b/src/lib/generated/builders/endpoint-authentication-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/endpoint-builder.ts b/src/lib/generated/builders/endpoint-builder.ts index 687142eb..2923b24b 100644 --- a/src/lib/generated/builders/endpoint-builder.ts +++ b/src/lib/generated/builders/endpoint-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/error-builder.ts b/src/lib/generated/builders/error-builder.ts index 642678f4..761dc2ca 100644 --- a/src/lib/generated/builders/error-builder.ts +++ b/src/lib/generated/builders/error-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/event-consumption-strategy-all-builder.ts b/src/lib/generated/builders/event-consumption-strategy-all-builder.ts index ecec3dc1..43de52ae 100644 --- a/src/lib/generated/builders/event-consumption-strategy-all-builder.ts +++ b/src/lib/generated/builders/event-consumption-strategy-all-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { arrayBuilder, ArrayBuilder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/event-consumption-strategy-any-builder.ts b/src/lib/generated/builders/event-consumption-strategy-any-builder.ts index 4b42163d..78f52674 100644 --- a/src/lib/generated/builders/event-consumption-strategy-any-builder.ts +++ b/src/lib/generated/builders/event-consumption-strategy-any-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { arrayBuilder, ArrayBuilder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/event-consumption-strategy-builder.ts b/src/lib/generated/builders/event-consumption-strategy-builder.ts index 410bc6e4..68a69b2a 100644 --- a/src/lib/generated/builders/event-consumption-strategy-builder.ts +++ b/src/lib/generated/builders/event-consumption-strategy-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/event-filter-builder.ts b/src/lib/generated/builders/event-filter-builder.ts index 2a3cdc82..592d8f86 100644 --- a/src/lib/generated/builders/event-filter-builder.ts +++ b/src/lib/generated/builders/event-filter-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/event-filter-correlate-builder.ts b/src/lib/generated/builders/event-filter-correlate-builder.ts index d243aa67..41cdb2e6 100644 --- a/src/lib/generated/builders/event-filter-correlate-builder.ts +++ b/src/lib/generated/builders/event-filter-correlate-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/event-filter-with-builder.ts b/src/lib/generated/builders/event-filter-with-builder.ts index f99c0203..bf9b18a0 100644 --- a/src/lib/generated/builders/event-filter-with-builder.ts +++ b/src/lib/generated/builders/event-filter-with-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/export-builder.ts b/src/lib/generated/builders/export-builder.ts index 15c9c0d9..c7af3d03 100644 --- a/src/lib/generated/builders/export-builder.ts +++ b/src/lib/generated/builders/export-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/extension-builder.ts b/src/lib/generated/builders/extension-builder.ts index 7823ce31..b4c2c86b 100644 --- a/src/lib/generated/builders/extension-builder.ts +++ b/src/lib/generated/builders/extension-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/external-resource-authentication-builder.ts b/src/lib/generated/builders/external-resource-authentication-builder.ts index 5e0ea1a5..b2064bf9 100644 --- a/src/lib/generated/builders/external-resource-authentication-builder.ts +++ b/src/lib/generated/builders/external-resource-authentication-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/external-resource-builder.ts b/src/lib/generated/builders/external-resource-builder.ts index 706f03b8..54e71a23 100644 --- a/src/lib/generated/builders/external-resource-builder.ts +++ b/src/lib/generated/builders/external-resource-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/flow-directive-builder.ts b/src/lib/generated/builders/flow-directive-builder.ts index dd921799..2551f570 100644 --- a/src/lib/generated/builders/flow-directive-builder.ts +++ b/src/lib/generated/builders/flow-directive-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/for-task-builder.ts b/src/lib/generated/builders/for-task-builder.ts index 8787045d..27d083dc 100644 --- a/src/lib/generated/builders/for-task-builder.ts +++ b/src/lib/generated/builders/for-task-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/for-task-for-builder.ts b/src/lib/generated/builders/for-task-for-builder.ts index 7764fd46..f78a94f2 100644 --- a/src/lib/generated/builders/for-task-for-builder.ts +++ b/src/lib/generated/builders/for-task-for-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/fork-task-builder.ts b/src/lib/generated/builders/fork-task-builder.ts index d20ebe53..d9365f73 100644 --- a/src/lib/generated/builders/fork-task-builder.ts +++ b/src/lib/generated/builders/fork-task-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/fork-task-fork-builder.ts b/src/lib/generated/builders/fork-task-fork-builder.ts index 557142d8..7412e178 100644 --- a/src/lib/generated/builders/fork-task-fork-builder.ts +++ b/src/lib/generated/builders/fork-task-fork-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/input-builder.ts b/src/lib/generated/builders/input-builder.ts index 88461451..343c8aed 100644 --- a/src/lib/generated/builders/input-builder.ts +++ b/src/lib/generated/builders/input-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/listen-task-builder.ts b/src/lib/generated/builders/listen-task-builder.ts index d4f6e513..6f98fba3 100644 --- a/src/lib/generated/builders/listen-task-builder.ts +++ b/src/lib/generated/builders/listen-task-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/listen-task-listen-builder.ts b/src/lib/generated/builders/listen-task-listen-builder.ts index 7bc6cf7c..697cde15 100644 --- a/src/lib/generated/builders/listen-task-listen-builder.ts +++ b/src/lib/generated/builders/listen-task-listen-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/oauth2-token-builder.ts b/src/lib/generated/builders/oauth2-token-builder.ts index 65d6babc..4cf90d3a 100644 --- a/src/lib/generated/builders/oauth2-token-builder.ts +++ b/src/lib/generated/builders/oauth2-token-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/output-builder.ts b/src/lib/generated/builders/output-builder.ts index 5e166e82..f97ee3f1 100644 --- a/src/lib/generated/builders/output-builder.ts +++ b/src/lib/generated/builders/output-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/raise-task-builder.ts b/src/lib/generated/builders/raise-task-builder.ts index d250676d..e05198e3 100644 --- a/src/lib/generated/builders/raise-task-builder.ts +++ b/src/lib/generated/builders/raise-task-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/raise-task-raise-builder.ts b/src/lib/generated/builders/raise-task-raise-builder.ts index df801293..ed599aaf 100644 --- a/src/lib/generated/builders/raise-task-raise-builder.ts +++ b/src/lib/generated/builders/raise-task-raise-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/retry-policy-backoff-builder.ts b/src/lib/generated/builders/retry-policy-backoff-builder.ts index c029d4ca..9755972d 100644 --- a/src/lib/generated/builders/retry-policy-backoff-builder.ts +++ b/src/lib/generated/builders/retry-policy-backoff-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/retry-policy-builder.ts b/src/lib/generated/builders/retry-policy-builder.ts index c06b8523..f4af70e7 100644 --- a/src/lib/generated/builders/retry-policy-builder.ts +++ b/src/lib/generated/builders/retry-policy-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/retry-policy-jitter-builder.ts b/src/lib/generated/builders/retry-policy-jitter-builder.ts index cdc565cb..0ef0ca4d 100644 --- a/src/lib/generated/builders/retry-policy-jitter-builder.ts +++ b/src/lib/generated/builders/retry-policy-jitter-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts b/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts index faa255f7..5e00d825 100644 --- a/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts +++ b/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/retry-policy-limit-builder.ts b/src/lib/generated/builders/retry-policy-limit-builder.ts index 79a8d01a..fecc6824 100644 --- a/src/lib/generated/builders/retry-policy-limit-builder.ts +++ b/src/lib/generated/builders/retry-policy-limit-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/run-task-builder.ts b/src/lib/generated/builders/run-task-builder.ts index 06909185..18b84c0b 100644 --- a/src/lib/generated/builders/run-task-builder.ts +++ b/src/lib/generated/builders/run-task-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/run-task-run-builder.ts b/src/lib/generated/builders/run-task-run-builder.ts index aeac9e56..28ca4b6f 100644 --- a/src/lib/generated/builders/run-task-run-builder.ts +++ b/src/lib/generated/builders/run-task-run-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/run-task-run-container-builder.ts b/src/lib/generated/builders/run-task-run-container-builder.ts index 8e44a164..771e447f 100644 --- a/src/lib/generated/builders/run-task-run-container-builder.ts +++ b/src/lib/generated/builders/run-task-run-container-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/run-task-run-script-builder.ts b/src/lib/generated/builders/run-task-run-script-builder.ts index 1812a2ee..c31b973a 100644 --- a/src/lib/generated/builders/run-task-run-script-builder.ts +++ b/src/lib/generated/builders/run-task-run-script-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts b/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts index c9daea78..897fab7a 100644 --- a/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts +++ b/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/run-task-run-shell-builder.ts b/src/lib/generated/builders/run-task-run-shell-builder.ts index 1a9cc709..da1c4a71 100644 --- a/src/lib/generated/builders/run-task-run-shell-builder.ts +++ b/src/lib/generated/builders/run-task-run-shell-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/run-task-run-shell-environment-builder.ts b/src/lib/generated/builders/run-task-run-shell-environment-builder.ts index ee8a305e..aa82b55a 100644 --- a/src/lib/generated/builders/run-task-run-shell-environment-builder.ts +++ b/src/lib/generated/builders/run-task-run-shell-environment-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/run-task-run-workflow-builder.ts b/src/lib/generated/builders/run-task-run-workflow-builder.ts index 5e3d2601..edb0689f 100644 --- a/src/lib/generated/builders/run-task-run-workflow-builder.ts +++ b/src/lib/generated/builders/run-task-run-workflow-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/run-task-run-workflow-input-builder.ts b/src/lib/generated/builders/run-task-run-workflow-input-builder.ts index 7a89a89a..95202f12 100644 --- a/src/lib/generated/builders/run-task-run-workflow-input-builder.ts +++ b/src/lib/generated/builders/run-task-run-workflow-input-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/schedule-builder.ts b/src/lib/generated/builders/schedule-builder.ts index 00643ce5..292c384b 100644 --- a/src/lib/generated/builders/schedule-builder.ts +++ b/src/lib/generated/builders/schedule-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/schema-builder.ts b/src/lib/generated/builders/schema-builder.ts index d3a15daf..42298df7 100644 --- a/src/lib/generated/builders/schema-builder.ts +++ b/src/lib/generated/builders/schema-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/set-task-builder.ts b/src/lib/generated/builders/set-task-builder.ts index 2a33a73d..295b2ebd 100644 --- a/src/lib/generated/builders/set-task-builder.ts +++ b/src/lib/generated/builders/set-task-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/set-task-set-builder.ts b/src/lib/generated/builders/set-task-set-builder.ts index b1dfdd68..d44d87ef 100644 --- a/src/lib/generated/builders/set-task-set-builder.ts +++ b/src/lib/generated/builders/set-task-set-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/switch-task-builder.ts b/src/lib/generated/builders/switch-task-builder.ts index a28667ab..2c931b4c 100644 --- a/src/lib/generated/builders/switch-task-builder.ts +++ b/src/lib/generated/builders/switch-task-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/switch-task-switch-builder.ts b/src/lib/generated/builders/switch-task-switch-builder.ts index 4b63e4b2..a91188da 100644 --- a/src/lib/generated/builders/switch-task-switch-builder.ts +++ b/src/lib/generated/builders/switch-task-switch-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/switch-task-switch-case-builder.ts b/src/lib/generated/builders/switch-task-switch-case-builder.ts index 526e7ce7..91b18a9f 100644 --- a/src/lib/generated/builders/switch-task-switch-case-builder.ts +++ b/src/lib/generated/builders/switch-task-switch-case-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/task-base-builder.ts b/src/lib/generated/builders/task-base-builder.ts index fa663d6b..5028ba8a 100644 --- a/src/lib/generated/builders/task-base-builder.ts +++ b/src/lib/generated/builders/task-base-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/task-builder.ts b/src/lib/generated/builders/task-builder.ts index 37e223a6..2dcc9ff0 100644 --- a/src/lib/generated/builders/task-builder.ts +++ b/src/lib/generated/builders/task-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/task-list-builder.ts b/src/lib/generated/builders/task-list-builder.ts index 8145e817..9f2ebf77 100644 --- a/src/lib/generated/builders/task-list-builder.ts +++ b/src/lib/generated/builders/task-list-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { arrayBuilder, ArrayBuilder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/timeout-builder.ts b/src/lib/generated/builders/timeout-builder.ts index 7f1a13c8..32b8122c 100644 --- a/src/lib/generated/builders/timeout-builder.ts +++ b/src/lib/generated/builders/timeout-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/try-task-builder.ts b/src/lib/generated/builders/try-task-builder.ts index f55e5eef..cfc1d0ad 100644 --- a/src/lib/generated/builders/try-task-builder.ts +++ b/src/lib/generated/builders/try-task-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/try-task-catch-builder.ts b/src/lib/generated/builders/try-task-catch-builder.ts index 0aa23b93..564c0a8a 100644 --- a/src/lib/generated/builders/try-task-catch-builder.ts +++ b/src/lib/generated/builders/try-task-catch-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/use-authentications-builder.ts b/src/lib/generated/builders/use-authentications-builder.ts index 23be60d4..80ef91f7 100644 --- a/src/lib/generated/builders/use-authentications-builder.ts +++ b/src/lib/generated/builders/use-authentications-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/use-builder.ts b/src/lib/generated/builders/use-builder.ts index 1996395c..c06be335 100644 --- a/src/lib/generated/builders/use-builder.ts +++ b/src/lib/generated/builders/use-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/use-errors-builder.ts b/src/lib/generated/builders/use-errors-builder.ts index c8505bb4..e61ee852 100644 --- a/src/lib/generated/builders/use-errors-builder.ts +++ b/src/lib/generated/builders/use-errors-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/use-extensions-builder.ts b/src/lib/generated/builders/use-extensions-builder.ts index 4539522c..afaa86f0 100644 --- a/src/lib/generated/builders/use-extensions-builder.ts +++ b/src/lib/generated/builders/use-extensions-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { arrayBuilder, ArrayBuilder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/use-functions-builder.ts b/src/lib/generated/builders/use-functions-builder.ts index 599733cd..b6f72db3 100644 --- a/src/lib/generated/builders/use-functions-builder.ts +++ b/src/lib/generated/builders/use-functions-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/use-retries-builder.ts b/src/lib/generated/builders/use-retries-builder.ts index dfdb4fd1..c937b10c 100644 --- a/src/lib/generated/builders/use-retries-builder.ts +++ b/src/lib/generated/builders/use-retries-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/wait-task-builder.ts b/src/lib/generated/builders/wait-task-builder.ts index 0f12a297..3a88a25b 100644 --- a/src/lib/generated/builders/wait-task-builder.ts +++ b/src/lib/generated/builders/wait-task-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/builders/workflow-builder.ts b/src/lib/generated/builders/workflow-builder.ts index 97b2e850..97822ce5 100644 --- a/src/lib/generated/builders/workflow-builder.ts +++ b/src/lib/generated/builders/workflow-builder.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + import { builder, Builder } from '../../builder'; import { validate } from '../../validation'; import { Classes } from '../classes'; diff --git a/src/lib/generated/classes/authentication-policy-basic.ts b/src/lib/generated/classes/authentication-policy-basic.ts index 748dd1b8..af50feba 100644 --- a/src/lib/generated/classes/authentication-policy-basic.ts +++ b/src/lib/generated/classes/authentication-policy-basic.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class AuthenticationPolicyBasic extends Hydrator { +class AuthenticationPolicyBasic extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/authentication-policy-bearer.ts b/src/lib/generated/classes/authentication-policy-bearer.ts index 720c8067..609fd7d6 100644 --- a/src/lib/generated/classes/authentication-policy-bearer.ts +++ b/src/lib/generated/classes/authentication-policy-bearer.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class AuthenticationPolicyBearer extends Hydrator { +class AuthenticationPolicyBearer extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/authentication-policy-oauth2-client.ts b/src/lib/generated/classes/authentication-policy-oauth2-client.ts index 50209402..76d21936 100644 --- a/src/lib/generated/classes/authentication-policy-oauth2-client.ts +++ b/src/lib/generated/classes/authentication-policy-oauth2-client.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class AuthenticationPolicyOauth2Client extends Hydrator { +class AuthenticationPolicyOauth2Client extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/authentication-policy-oauth2.ts b/src/lib/generated/classes/authentication-policy-oauth2.ts index 430db7f1..03187608 100644 --- a/src/lib/generated/classes/authentication-policy-oauth2.ts +++ b/src/lib/generated/classes/authentication-policy-oauth2.ts @@ -20,12 +20,21 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _AuthenticationPolicyOauth2Client } from './authentication-policy-oauth2-client'; +import { _Oauth2Token } from './oauth2-token'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class AuthenticationPolicyOauth2 extends Hydrator { +class AuthenticationPolicyOauth2 extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.AuthenticationPolicyOauth2 & object; + if (isObject(model)) { + if (typeof model.client === 'object') self.client = new _AuthenticationPolicyOauth2Client(model.client); + if (typeof model.subject === 'object') self.subject = new _Oauth2Token(model.subject); + if (typeof model.actor === 'object') self.actor = new _Oauth2Token(model.actor); + } } } diff --git a/src/lib/generated/classes/authentication-policy.ts b/src/lib/generated/classes/authentication-policy.ts index 05dbc2a1..d9d1229c 100644 --- a/src/lib/generated/classes/authentication-policy.ts +++ b/src/lib/generated/classes/authentication-policy.ts @@ -20,12 +20,25 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; +import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; +import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class AuthenticationPolicy extends Hydrator { +class AuthenticationPolicy extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.AuthenticationPolicy & object; + if (isObject(model)) { + if (typeof model.basic === 'object') + self.basic = new _AuthenticationPolicyBasic(model.basic as Specification.AuthenticationPolicyBasic); + if (typeof model.bearer === 'object') + self.bearer = new _AuthenticationPolicyBearer(model.bearer as Specification.AuthenticationPolicyBearer); + if (typeof model.oauth2 === 'object') + self.oauth2 = new _AuthenticationPolicyOauth2(model.oauth2 as Specification.AuthenticationPolicyOauth2); + } } } diff --git a/src/lib/generated/classes/call-async-api-with-authentication.ts b/src/lib/generated/classes/call-async-api-with-authentication.ts index 33fa6bab..ab1d53a4 100644 --- a/src/lib/generated/classes/call-async-api-with-authentication.ts +++ b/src/lib/generated/classes/call-async-api-with-authentication.ts @@ -20,12 +20,25 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; +import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; +import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class CallAsyncAPIWithAuthentication extends Hydrator { +class CallAsyncAPIWithAuthentication extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.CallAsyncAPIWithAuthentication & object; + if (isObject(model)) { + if (typeof model.basic === 'object') + self.basic = new _AuthenticationPolicyBasic(model.basic as Specification.AuthenticationPolicyBasic); + if (typeof model.bearer === 'object') + self.bearer = new _AuthenticationPolicyBearer(model.bearer as Specification.AuthenticationPolicyBearer); + if (typeof model.oauth2 === 'object') + self.oauth2 = new _AuthenticationPolicyOauth2(model.oauth2 as Specification.AuthenticationPolicyOauth2); + } } } diff --git a/src/lib/generated/classes/call-async-api-with.ts b/src/lib/generated/classes/call-async-api-with.ts index f8b79963..360401fd 100644 --- a/src/lib/generated/classes/call-async-api-with.ts +++ b/src/lib/generated/classes/call-async-api-with.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class CallAsyncAPIWith extends Hydrator { +class CallAsyncAPIWith extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/call-async-api.ts b/src/lib/generated/classes/call-async-api.ts index d4343984..8d03a30d 100644 --- a/src/lib/generated/classes/call-async-api.ts +++ b/src/lib/generated/classes/call-async-api.ts @@ -21,11 +21,26 @@ *****************************************************************************************/ import { _TaskBase } from './task-base'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; +import { _CallAsyncAPIWith } from './call-async-api-with'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; class CallAsyncAPI extends _TaskBase { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.CallAsyncAPI & object; + if (isObject(model)) { + self.call = 'asyncapi' as const; + if (typeof model.input === 'object') self.input = new _Input(model.input); + if (typeof model.output === 'object') self.output = new _Output(model.output); + if (typeof model.export === 'object') self.export = new _Export(model.export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.with === 'object') self.with = new _CallAsyncAPIWith(model.with); + } } } diff --git a/src/lib/generated/classes/call-function-with.ts b/src/lib/generated/classes/call-function-with.ts index 375de9f2..b42fbddb 100644 --- a/src/lib/generated/classes/call-function-with.ts +++ b/src/lib/generated/classes/call-function-with.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class CallFunctionWith extends Hydrator { +class CallFunctionWith extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/call-function.ts b/src/lib/generated/classes/call-function.ts index 2c64c46e..c9285297 100644 --- a/src/lib/generated/classes/call-function.ts +++ b/src/lib/generated/classes/call-function.ts @@ -21,11 +21,25 @@ *****************************************************************************************/ import { _TaskBase } from './task-base'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; +import { _CallFunctionWith } from './call-function-with'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; class CallFunction extends _TaskBase { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.CallFunction & object; + if (isObject(model)) { + if (typeof model.input === 'object') self.input = new _Input(model.input); + if (typeof model.output === 'object') self.output = new _Output(model.output); + if (typeof model.export === 'object') self.export = new _Export(model.export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.with === 'object') self.with = new _CallFunctionWith(model.with); + } } } diff --git a/src/lib/generated/classes/call-grpc-with-arguments.ts b/src/lib/generated/classes/call-grpc-with-arguments.ts index ef21f428..d891588e 100644 --- a/src/lib/generated/classes/call-grpc-with-arguments.ts +++ b/src/lib/generated/classes/call-grpc-with-arguments.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class CallGRPCWithArguments extends Hydrator { +class CallGRPCWithArguments extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/call-grpc-with-service-authentication.ts b/src/lib/generated/classes/call-grpc-with-service-authentication.ts index aa8c78a5..2407e8da 100644 --- a/src/lib/generated/classes/call-grpc-with-service-authentication.ts +++ b/src/lib/generated/classes/call-grpc-with-service-authentication.ts @@ -20,12 +20,25 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; +import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; +import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class CallGRPCWithServiceAuthentication extends Hydrator { +class CallGRPCWithServiceAuthentication extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.CallGRPCWithServiceAuthentication & object; + if (isObject(model)) { + if (typeof model.basic === 'object') + self.basic = new _AuthenticationPolicyBasic(model.basic as Specification.AuthenticationPolicyBasic); + if (typeof model.bearer === 'object') + self.bearer = new _AuthenticationPolicyBearer(model.bearer as Specification.AuthenticationPolicyBearer); + if (typeof model.oauth2 === 'object') + self.oauth2 = new _AuthenticationPolicyOauth2(model.oauth2 as Specification.AuthenticationPolicyOauth2); + } } } diff --git a/src/lib/generated/classes/call-grpc-with-service.ts b/src/lib/generated/classes/call-grpc-with-service.ts index 23b7aedd..d8bbdead 100644 --- a/src/lib/generated/classes/call-grpc-with-service.ts +++ b/src/lib/generated/classes/call-grpc-with-service.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class CallGRPCWithService extends Hydrator { +class CallGRPCWithService extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/call-grpc-with.ts b/src/lib/generated/classes/call-grpc-with.ts index 0e72dacd..0d4f5903 100644 --- a/src/lib/generated/classes/call-grpc-with.ts +++ b/src/lib/generated/classes/call-grpc-with.ts @@ -20,12 +20,20 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _CallGRPCWithService } from './call-grpc-with-service'; +import { _CallGRPCWithArguments } from './call-grpc-with-arguments'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class CallGRPCWith extends Hydrator { +class CallGRPCWith extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.CallGRPCWith & object; + if (isObject(model)) { + if (typeof model.service === 'object') self.service = new _CallGRPCWithService(model.service); + if (typeof model.arguments === 'object') self.arguments = new _CallGRPCWithArguments(model.arguments); + } } } diff --git a/src/lib/generated/classes/call-grpc.ts b/src/lib/generated/classes/call-grpc.ts index 294a42b4..ad59e779 100644 --- a/src/lib/generated/classes/call-grpc.ts +++ b/src/lib/generated/classes/call-grpc.ts @@ -21,11 +21,26 @@ *****************************************************************************************/ import { _TaskBase } from './task-base'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; +import { _CallGRPCWith } from './call-grpc-with'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; class CallGRPC extends _TaskBase { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.CallGRPC & object; + if (isObject(model)) { + self.call = 'grpc' as const; + if (typeof model.input === 'object') self.input = new _Input(model.input); + if (typeof model.output === 'object') self.output = new _Output(model.output); + if (typeof model.export === 'object') self.export = new _Export(model.export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.with === 'object') self.with = new _CallGRPCWith(model.with); + } } } diff --git a/src/lib/generated/classes/call-http-with-endpoint.ts b/src/lib/generated/classes/call-http-with-endpoint.ts index 571e7967..9e6f488a 100644 --- a/src/lib/generated/classes/call-http-with-endpoint.ts +++ b/src/lib/generated/classes/call-http-with-endpoint.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class CallHTTPWithEndpoint extends Hydrator { +class CallHTTPWithEndpoint extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/call-http-with.ts b/src/lib/generated/classes/call-http-with.ts index 9eb307b8..cbac01ae 100644 --- a/src/lib/generated/classes/call-http-with.ts +++ b/src/lib/generated/classes/call-http-with.ts @@ -20,12 +20,18 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _CallHTTPWithEndpoint } from './call-http-with-endpoint'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class CallHTTPWith extends Hydrator { +class CallHTTPWith extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.CallHTTPWith & object; + if (isObject(model)) { + if (typeof model.endpoint === 'object') self.endpoint = new _CallHTTPWithEndpoint(model.endpoint); + } } } diff --git a/src/lib/generated/classes/call-http.ts b/src/lib/generated/classes/call-http.ts index 38d93591..01494bf1 100644 --- a/src/lib/generated/classes/call-http.ts +++ b/src/lib/generated/classes/call-http.ts @@ -21,11 +21,26 @@ *****************************************************************************************/ import { _TaskBase } from './task-base'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; +import { _CallHTTPWith } from './call-http-with'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; class CallHTTP extends _TaskBase { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.CallHTTP & object; + if (isObject(model)) { + self.call = 'http' as const; + if (typeof model.input === 'object') self.input = new _Input(model.input); + if (typeof model.output === 'object') self.output = new _Output(model.output); + if (typeof model.export === 'object') self.export = new _Export(model.export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.with === 'object') self.with = new _CallHTTPWith(model.with); + } } } diff --git a/src/lib/generated/classes/call-open-api-with-authentication.ts b/src/lib/generated/classes/call-open-api-with-authentication.ts index bf7d2d61..c0be53e3 100644 --- a/src/lib/generated/classes/call-open-api-with-authentication.ts +++ b/src/lib/generated/classes/call-open-api-with-authentication.ts @@ -20,12 +20,25 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; +import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; +import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class CallOpenAPIWithAuthentication extends Hydrator { +class CallOpenAPIWithAuthentication extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.CallOpenAPIWithAuthentication & object; + if (isObject(model)) { + if (typeof model.basic === 'object') + self.basic = new _AuthenticationPolicyBasic(model.basic as Specification.AuthenticationPolicyBasic); + if (typeof model.bearer === 'object') + self.bearer = new _AuthenticationPolicyBearer(model.bearer as Specification.AuthenticationPolicyBearer); + if (typeof model.oauth2 === 'object') + self.oauth2 = new _AuthenticationPolicyOauth2(model.oauth2 as Specification.AuthenticationPolicyOauth2); + } } } diff --git a/src/lib/generated/classes/call-open-api-with-parameters.ts b/src/lib/generated/classes/call-open-api-with-parameters.ts index c28a8b33..478435c7 100644 --- a/src/lib/generated/classes/call-open-api-with-parameters.ts +++ b/src/lib/generated/classes/call-open-api-with-parameters.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class CallOpenAPIWithParameters extends Hydrator { +class CallOpenAPIWithParameters extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/call-open-api-with.ts b/src/lib/generated/classes/call-open-api-with.ts index 890cbd5c..b96c3a14 100644 --- a/src/lib/generated/classes/call-open-api-with.ts +++ b/src/lib/generated/classes/call-open-api-with.ts @@ -20,12 +20,18 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _CallOpenAPIWithParameters } from './call-open-api-with-parameters'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class CallOpenAPIWith extends Hydrator { +class CallOpenAPIWith extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.CallOpenAPIWith & object; + if (isObject(model)) { + if (typeof model.parameters === 'object') self.parameters = new _CallOpenAPIWithParameters(model.parameters); + } } } diff --git a/src/lib/generated/classes/call-open-api.ts b/src/lib/generated/classes/call-open-api.ts index 9adf5bef..7671e301 100644 --- a/src/lib/generated/classes/call-open-api.ts +++ b/src/lib/generated/classes/call-open-api.ts @@ -21,11 +21,26 @@ *****************************************************************************************/ import { _TaskBase } from './task-base'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; +import { _CallOpenAPIWith } from './call-open-api-with'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; class CallOpenAPI extends _TaskBase { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.CallOpenAPI & object; + if (isObject(model)) { + self.call = 'openapi' as const; + if (typeof model.input === 'object') self.input = new _Input(model.input); + if (typeof model.output === 'object') self.output = new _Output(model.output); + if (typeof model.export === 'object') self.export = new _Export(model.export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.with === 'object') self.with = new _CallOpenAPIWith(model.with); + } } } diff --git a/src/lib/generated/classes/call-task.ts b/src/lib/generated/classes/call-task.ts index fbe39f43..b01c44db 100644 --- a/src/lib/generated/classes/call-task.ts +++ b/src/lib/generated/classes/call-task.ts @@ -20,12 +20,24 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class CallTask extends Hydrator { +class CallTask extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.CallTask & object; + if (isObject(model)) { + if (typeof model.input === 'object') self.input = new _Input(model.input as Specification.Input); + if (typeof model.output === 'object') self.output = new _Output(model.output as Specification.Output); + if (typeof model.export === 'object') self.export = new _Export(model.export as Specification.Export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout as Specification.Timeout); + } } } diff --git a/src/lib/generated/classes/do-task.ts b/src/lib/generated/classes/do-task.ts index dd5406f9..9043b25f 100644 --- a/src/lib/generated/classes/do-task.ts +++ b/src/lib/generated/classes/do-task.ts @@ -21,11 +21,25 @@ *****************************************************************************************/ import { _TaskBase } from './task-base'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; +import { _TaskList } from './task-list'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; class DoTask extends _TaskBase { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.DoTask & object; + if (isObject(model)) { + if (typeof model.input === 'object') self.input = new _Input(model.input); + if (typeof model.output === 'object') self.output = new _Output(model.output); + if (typeof model.export === 'object') self.export = new _Export(model.export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.do === 'object') self.do = new _TaskList(model.do); + } } } diff --git a/src/lib/generated/classes/document-tags.ts b/src/lib/generated/classes/document-tags.ts index 323a1dfa..b63b87a5 100644 --- a/src/lib/generated/classes/document-tags.ts +++ b/src/lib/generated/classes/document-tags.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class DocumentTags extends Hydrator { +class DocumentTags extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/document.ts b/src/lib/generated/classes/document.ts index 189f9e7d..42939f52 100644 --- a/src/lib/generated/classes/document.ts +++ b/src/lib/generated/classes/document.ts @@ -20,12 +20,18 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _DocumentTags } from './document-tags'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class Document extends Hydrator { +class Document extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.Document & object; + if (isObject(model)) { + if (typeof model.tags === 'object') self.tags = new _DocumentTags(model.tags); + } } } diff --git a/src/lib/generated/classes/duration.ts b/src/lib/generated/classes/duration.ts index a8aef959..460bcb20 100644 --- a/src/lib/generated/classes/duration.ts +++ b/src/lib/generated/classes/duration.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class Duration extends Hydrator { +class Duration extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/emit-task-emit-event.ts b/src/lib/generated/classes/emit-task-emit-event.ts index c39489c7..e6a6b4f7 100644 --- a/src/lib/generated/classes/emit-task-emit-event.ts +++ b/src/lib/generated/classes/emit-task-emit-event.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class EmitTaskEmitEvent extends Hydrator { +class EmitTaskEmitEvent extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/emit-task-emit.ts b/src/lib/generated/classes/emit-task-emit.ts index 894ceab9..1c1336e2 100644 --- a/src/lib/generated/classes/emit-task-emit.ts +++ b/src/lib/generated/classes/emit-task-emit.ts @@ -20,12 +20,18 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _EmitTaskEmitEvent } from './emit-task-emit-event'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class EmitTaskEmit extends Hydrator { +class EmitTaskEmit extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.EmitTaskEmit & object; + if (isObject(model)) { + if (typeof model.event === 'object') self.event = new _EmitTaskEmitEvent(model.event); + } } } diff --git a/src/lib/generated/classes/emit-task.ts b/src/lib/generated/classes/emit-task.ts index 36c50781..2836795a 100644 --- a/src/lib/generated/classes/emit-task.ts +++ b/src/lib/generated/classes/emit-task.ts @@ -21,11 +21,25 @@ *****************************************************************************************/ import { _TaskBase } from './task-base'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; +import { _EmitTaskEmit } from './emit-task-emit'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; class EmitTask extends _TaskBase { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.EmitTask & object; + if (isObject(model)) { + if (typeof model.input === 'object') self.input = new _Input(model.input); + if (typeof model.output === 'object') self.output = new _Output(model.output); + if (typeof model.export === 'object') self.export = new _Export(model.export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.emit === 'object') self.emit = new _EmitTaskEmit(model.emit); + } } } diff --git a/src/lib/generated/classes/endpoint-authentication.ts b/src/lib/generated/classes/endpoint-authentication.ts index 44b53eca..f270c610 100644 --- a/src/lib/generated/classes/endpoint-authentication.ts +++ b/src/lib/generated/classes/endpoint-authentication.ts @@ -20,12 +20,25 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; +import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; +import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class EndpointAuthentication extends Hydrator { +class EndpointAuthentication extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.EndpointAuthentication & object; + if (isObject(model)) { + if (typeof model.basic === 'object') + self.basic = new _AuthenticationPolicyBasic(model.basic as Specification.AuthenticationPolicyBasic); + if (typeof model.bearer === 'object') + self.bearer = new _AuthenticationPolicyBearer(model.bearer as Specification.AuthenticationPolicyBearer); + if (typeof model.oauth2 === 'object') + self.oauth2 = new _AuthenticationPolicyOauth2(model.oauth2 as Specification.AuthenticationPolicyOauth2); + } } } diff --git a/src/lib/generated/classes/endpoint.ts b/src/lib/generated/classes/endpoint.ts index 1d8a7386..a2b6183b 100644 --- a/src/lib/generated/classes/endpoint.ts +++ b/src/lib/generated/classes/endpoint.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class Endpoint extends Hydrator { +class Endpoint extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/error.ts b/src/lib/generated/classes/error.ts index fa467592..8f9ebe9f 100644 --- a/src/lib/generated/classes/error.ts +++ b/src/lib/generated/classes/error.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class Error extends Hydrator { +class Error extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/event-consumption-strategy-all.ts b/src/lib/generated/classes/event-consumption-strategy-all.ts index bd56a74d..ef5fc9f3 100644 --- a/src/lib/generated/classes/event-consumption-strategy-all.ts +++ b/src/lib/generated/classes/event-consumption-strategy-all.ts @@ -20,13 +20,18 @@ * *****************************************************************************************/ +import { _EventFilter } from './event-filter'; import { Specification } from '../definitions'; +import { ArrayHydrator } from '../../hydrator'; -class EventConsumptionStrategyAll extends Array { - constructor(model?: Array) { - super(...(model || [])); - if (model != null && !Array.isArray(model)) { - throw new Error('The provided model should be an array'); +class EventConsumptionStrategyAll extends ArrayHydrator { + constructor(model?: Array | number) { + super(model); + if (Array.isArray(model)) { + if (model?.length) { + this.splice(0, this.length); + model.forEach((item) => this.push(new _EventFilter(item))); + } } Object.setPrototypeOf(this, Object.create(EventConsumptionStrategyAll.prototype)); } diff --git a/src/lib/generated/classes/event-consumption-strategy-any.ts b/src/lib/generated/classes/event-consumption-strategy-any.ts index 801cde46..e2c2e3b5 100644 --- a/src/lib/generated/classes/event-consumption-strategy-any.ts +++ b/src/lib/generated/classes/event-consumption-strategy-any.ts @@ -20,13 +20,18 @@ * *****************************************************************************************/ +import { _EventFilter } from './event-filter'; import { Specification } from '../definitions'; +import { ArrayHydrator } from '../../hydrator'; -class EventConsumptionStrategyAny extends Array { - constructor(model?: Array) { - super(...(model || [])); - if (model != null && !Array.isArray(model)) { - throw new Error('The provided model should be an array'); +class EventConsumptionStrategyAny extends ArrayHydrator { + constructor(model?: Array | number) { + super(model); + if (Array.isArray(model)) { + if (model?.length) { + this.splice(0, this.length); + model.forEach((item) => this.push(new _EventFilter(item))); + } } Object.setPrototypeOf(this, Object.create(EventConsumptionStrategyAny.prototype)); } diff --git a/src/lib/generated/classes/event-consumption-strategy.ts b/src/lib/generated/classes/event-consumption-strategy.ts index 04ee5518..4bb5bd8f 100644 --- a/src/lib/generated/classes/event-consumption-strategy.ts +++ b/src/lib/generated/classes/event-consumption-strategy.ts @@ -20,12 +20,24 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _EventConsumptionStrategyAll } from './event-consumption-strategy-all'; +import { _EventConsumptionStrategyAny } from './event-consumption-strategy-any'; +import { _EventFilter } from './event-filter'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class EventConsumptionStrategy extends Hydrator { +class EventConsumptionStrategy extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.EventConsumptionStrategy & object; + if (isObject(model)) { + if (typeof model.all === 'object') + self.all = new _EventConsumptionStrategyAll(model.all as Specification.EventConsumptionStrategyAll); + if (typeof model.any === 'object') + self.any = new _EventConsumptionStrategyAny(model.any as Specification.EventConsumptionStrategyAny); + if (typeof model.one === 'object') self.one = new _EventFilter(model.one as Specification.EventFilter); + } } } diff --git a/src/lib/generated/classes/event-filter-correlate.ts b/src/lib/generated/classes/event-filter-correlate.ts index b12dc9ac..3c73ae8f 100644 --- a/src/lib/generated/classes/event-filter-correlate.ts +++ b/src/lib/generated/classes/event-filter-correlate.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class EventFilterCorrelate extends Hydrator { +class EventFilterCorrelate extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/event-filter-with.ts b/src/lib/generated/classes/event-filter-with.ts index be045068..e891216e 100644 --- a/src/lib/generated/classes/event-filter-with.ts +++ b/src/lib/generated/classes/event-filter-with.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class EventFilterWith extends Hydrator { +class EventFilterWith extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/event-filter.ts b/src/lib/generated/classes/event-filter.ts index 47b1795d..328e050a 100644 --- a/src/lib/generated/classes/event-filter.ts +++ b/src/lib/generated/classes/event-filter.ts @@ -20,12 +20,20 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _EventFilterWith } from './event-filter-with'; +import { _EventFilterCorrelate } from './event-filter-correlate'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class EventFilter extends Hydrator { +class EventFilter extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.EventFilter & object; + if (isObject(model)) { + if (typeof model.with === 'object') self.with = new _EventFilterWith(model.with); + if (typeof model.correlate === 'object') self.correlate = new _EventFilterCorrelate(model.correlate); + } } } diff --git a/src/lib/generated/classes/export.ts b/src/lib/generated/classes/export.ts index 86d7659a..5fe3b2b4 100644 --- a/src/lib/generated/classes/export.ts +++ b/src/lib/generated/classes/export.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class Export extends Hydrator { +class Export extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/extension.ts b/src/lib/generated/classes/extension.ts index 1d0d89ce..0cb3d007 100644 --- a/src/lib/generated/classes/extension.ts +++ b/src/lib/generated/classes/extension.ts @@ -20,12 +20,19 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _TaskList } from './task-list'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class Extension extends Hydrator { +class Extension extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.Extension & object; + if (isObject(model)) { + if (typeof model.before === 'object') self.before = new _TaskList(model.before); + if (typeof model.after === 'object') self.after = new _TaskList(model.after); + } } } diff --git a/src/lib/generated/classes/external-resource-authentication.ts b/src/lib/generated/classes/external-resource-authentication.ts index 0268e147..e664dc4c 100644 --- a/src/lib/generated/classes/external-resource-authentication.ts +++ b/src/lib/generated/classes/external-resource-authentication.ts @@ -20,12 +20,25 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; +import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; +import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class ExternalResourceAuthentication extends Hydrator { +class ExternalResourceAuthentication extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.ExternalResourceAuthentication & object; + if (isObject(model)) { + if (typeof model.basic === 'object') + self.basic = new _AuthenticationPolicyBasic(model.basic as Specification.AuthenticationPolicyBasic); + if (typeof model.bearer === 'object') + self.bearer = new _AuthenticationPolicyBearer(model.bearer as Specification.AuthenticationPolicyBearer); + if (typeof model.oauth2 === 'object') + self.oauth2 = new _AuthenticationPolicyOauth2(model.oauth2 as Specification.AuthenticationPolicyOauth2); + } } } diff --git a/src/lib/generated/classes/external-resource.ts b/src/lib/generated/classes/external-resource.ts index a4fc64d2..33c4dd5c 100644 --- a/src/lib/generated/classes/external-resource.ts +++ b/src/lib/generated/classes/external-resource.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class ExternalResource extends Hydrator { +class ExternalResource extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/flow-directive.ts b/src/lib/generated/classes/flow-directive.ts index f56c63a9..71bcda94 100644 --- a/src/lib/generated/classes/flow-directive.ts +++ b/src/lib/generated/classes/flow-directive.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class FlowDirective extends Hydrator { +class FlowDirective extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/for-task-for.ts b/src/lib/generated/classes/for-task-for.ts index 0fa58d4a..6df46a44 100644 --- a/src/lib/generated/classes/for-task-for.ts +++ b/src/lib/generated/classes/for-task-for.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class ForTaskFor extends Hydrator { +class ForTaskFor extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/for-task.ts b/src/lib/generated/classes/for-task.ts index 625f728d..62f5eb21 100644 --- a/src/lib/generated/classes/for-task.ts +++ b/src/lib/generated/classes/for-task.ts @@ -21,11 +21,27 @@ *****************************************************************************************/ import { _TaskBase } from './task-base'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; +import { _ForTaskFor } from './for-task-for'; +import { _TaskList } from './task-list'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; class ForTask extends _TaskBase { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.ForTask & object; + if (isObject(model)) { + if (typeof model.input === 'object') self.input = new _Input(model.input); + if (typeof model.output === 'object') self.output = new _Output(model.output); + if (typeof model.export === 'object') self.export = new _Export(model.export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.for === 'object') self.for = new _ForTaskFor(model.for); + if (typeof model.do === 'object') self.do = new _TaskList(model.do); + } } } diff --git a/src/lib/generated/classes/fork-task-fork.ts b/src/lib/generated/classes/fork-task-fork.ts index c28a05d6..03c302d4 100644 --- a/src/lib/generated/classes/fork-task-fork.ts +++ b/src/lib/generated/classes/fork-task-fork.ts @@ -20,12 +20,18 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _TaskList } from './task-list'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class ForkTaskFork extends Hydrator { +class ForkTaskFork extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.ForkTaskFork & object; + if (isObject(model)) { + if (typeof model.branches === 'object') self.branches = new _TaskList(model.branches); + } } } diff --git a/src/lib/generated/classes/fork-task.ts b/src/lib/generated/classes/fork-task.ts index 89d3ff1c..f6db2fea 100644 --- a/src/lib/generated/classes/fork-task.ts +++ b/src/lib/generated/classes/fork-task.ts @@ -21,11 +21,25 @@ *****************************************************************************************/ import { _TaskBase } from './task-base'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; +import { _ForkTaskFork } from './fork-task-fork'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; class ForkTask extends _TaskBase { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.ForkTask & object; + if (isObject(model)) { + if (typeof model.input === 'object') self.input = new _Input(model.input); + if (typeof model.output === 'object') self.output = new _Output(model.output); + if (typeof model.export === 'object') self.export = new _Export(model.export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.fork === 'object') self.fork = new _ForkTaskFork(model.fork); + } } } diff --git a/src/lib/generated/classes/input.ts b/src/lib/generated/classes/input.ts index 21ad9b2b..e1610703 100644 --- a/src/lib/generated/classes/input.ts +++ b/src/lib/generated/classes/input.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class Input extends Hydrator { +class Input extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/listen-task-listen.ts b/src/lib/generated/classes/listen-task-listen.ts index ab71ad3e..fc3e5ee5 100644 --- a/src/lib/generated/classes/listen-task-listen.ts +++ b/src/lib/generated/classes/listen-task-listen.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class ListenTaskListen extends Hydrator { +class ListenTaskListen extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/listen-task.ts b/src/lib/generated/classes/listen-task.ts index 59ff1f9f..0da18b5a 100644 --- a/src/lib/generated/classes/listen-task.ts +++ b/src/lib/generated/classes/listen-task.ts @@ -21,11 +21,25 @@ *****************************************************************************************/ import { _TaskBase } from './task-base'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; +import { _ListenTaskListen } from './listen-task-listen'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; class ListenTask extends _TaskBase { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.ListenTask & object; + if (isObject(model)) { + if (typeof model.input === 'object') self.input = new _Input(model.input); + if (typeof model.output === 'object') self.output = new _Output(model.output); + if (typeof model.export === 'object') self.export = new _Export(model.export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.listen === 'object') self.listen = new _ListenTaskListen(model.listen); + } } } diff --git a/src/lib/generated/classes/oauth2-token.ts b/src/lib/generated/classes/oauth2-token.ts index 7044e54b..d5676dc5 100644 --- a/src/lib/generated/classes/oauth2-token.ts +++ b/src/lib/generated/classes/oauth2-token.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class Oauth2Token extends Hydrator { +class Oauth2Token extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/output.ts b/src/lib/generated/classes/output.ts index ac72b76d..ce6a3ad1 100644 --- a/src/lib/generated/classes/output.ts +++ b/src/lib/generated/classes/output.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class Output extends Hydrator { +class Output extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/raise-task-raise.ts b/src/lib/generated/classes/raise-task-raise.ts index 4d1e62c8..8592c001 100644 --- a/src/lib/generated/classes/raise-task-raise.ts +++ b/src/lib/generated/classes/raise-task-raise.ts @@ -20,12 +20,18 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _Error } from './error'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class RaiseTaskRaise extends Hydrator { +class RaiseTaskRaise extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.RaiseTaskRaise & object; + if (isObject(model)) { + if (typeof model.error === 'object') self.error = new _Error(model.error); + } } } diff --git a/src/lib/generated/classes/raise-task.ts b/src/lib/generated/classes/raise-task.ts index 46fa3e28..e8d7f484 100644 --- a/src/lib/generated/classes/raise-task.ts +++ b/src/lib/generated/classes/raise-task.ts @@ -21,11 +21,25 @@ *****************************************************************************************/ import { _TaskBase } from './task-base'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; +import { _RaiseTaskRaise } from './raise-task-raise'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; class RaiseTask extends _TaskBase { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.RaiseTask & object; + if (isObject(model)) { + if (typeof model.input === 'object') self.input = new _Input(model.input); + if (typeof model.output === 'object') self.output = new _Output(model.output); + if (typeof model.export === 'object') self.export = new _Export(model.export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.raise === 'object') self.raise = new _RaiseTaskRaise(model.raise); + } } } diff --git a/src/lib/generated/classes/retry-policy-backoff.ts b/src/lib/generated/classes/retry-policy-backoff.ts index 961e3df3..5a08321f 100644 --- a/src/lib/generated/classes/retry-policy-backoff.ts +++ b/src/lib/generated/classes/retry-policy-backoff.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class RetryPolicyBackoff extends Hydrator { +class RetryPolicyBackoff extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/retry-policy-jitter.ts b/src/lib/generated/classes/retry-policy-jitter.ts index 0ad86265..7a6927d0 100644 --- a/src/lib/generated/classes/retry-policy-jitter.ts +++ b/src/lib/generated/classes/retry-policy-jitter.ts @@ -20,12 +20,19 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _Duration } from './duration'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class RetryPolicyJitter extends Hydrator { +class RetryPolicyJitter extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.RetryPolicyJitter & object; + if (isObject(model)) { + if (typeof model.from === 'object') self.from = new _Duration(model.from); + if (typeof model.to === 'object') self.to = new _Duration(model.to); + } } } diff --git a/src/lib/generated/classes/retry-policy-limit-attempt.ts b/src/lib/generated/classes/retry-policy-limit-attempt.ts index 2384e473..39c2b584 100644 --- a/src/lib/generated/classes/retry-policy-limit-attempt.ts +++ b/src/lib/generated/classes/retry-policy-limit-attempt.ts @@ -20,12 +20,18 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _Duration } from './duration'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class RetryPolicyLimitAttempt extends Hydrator { +class RetryPolicyLimitAttempt extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.RetryPolicyLimitAttempt & object; + if (isObject(model)) { + if (typeof model.duration === 'object') self.duration = new _Duration(model.duration); + } } } diff --git a/src/lib/generated/classes/retry-policy-limit.ts b/src/lib/generated/classes/retry-policy-limit.ts index a24dea63..0ca4e13d 100644 --- a/src/lib/generated/classes/retry-policy-limit.ts +++ b/src/lib/generated/classes/retry-policy-limit.ts @@ -20,12 +20,20 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _RetryPolicyLimitAttempt } from './retry-policy-limit-attempt'; +import { _Duration } from './duration'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class RetryPolicyLimit extends Hydrator { +class RetryPolicyLimit extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.RetryPolicyLimit & object; + if (isObject(model)) { + if (typeof model.attempt === 'object') self.attempt = new _RetryPolicyLimitAttempt(model.attempt); + if (typeof model.duration === 'object') self.duration = new _Duration(model.duration); + } } } diff --git a/src/lib/generated/classes/retry-policy.ts b/src/lib/generated/classes/retry-policy.ts index 5cd5e817..77978bf5 100644 --- a/src/lib/generated/classes/retry-policy.ts +++ b/src/lib/generated/classes/retry-policy.ts @@ -20,12 +20,22 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _Duration } from './duration'; +import { _RetryPolicyLimit } from './retry-policy-limit'; +import { _RetryPolicyJitter } from './retry-policy-jitter'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class RetryPolicy extends Hydrator { +class RetryPolicy extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.RetryPolicy & object; + if (isObject(model)) { + if (typeof model.delay === 'object') self.delay = new _Duration(model.delay); + if (typeof model.limit === 'object') self.limit = new _RetryPolicyLimit(model.limit); + if (typeof model.jitter === 'object') self.jitter = new _RetryPolicyJitter(model.jitter); + } } } diff --git a/src/lib/generated/classes/run-task-run-container.ts b/src/lib/generated/classes/run-task-run-container.ts index 12853268..8046e40f 100644 --- a/src/lib/generated/classes/run-task-run-container.ts +++ b/src/lib/generated/classes/run-task-run-container.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class RunTaskRunContainer extends Hydrator { +class RunTaskRunContainer extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/run-task-run-script.ts b/src/lib/generated/classes/run-task-run-script.ts index 154352ca..b53cea07 100644 --- a/src/lib/generated/classes/run-task-run-script.ts +++ b/src/lib/generated/classes/run-task-run-script.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class RunTaskRunScript extends Hydrator { +class RunTaskRunScript extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/run-task-run-shell-arguments.ts b/src/lib/generated/classes/run-task-run-shell-arguments.ts index 6c76e7ed..3c1d3c29 100644 --- a/src/lib/generated/classes/run-task-run-shell-arguments.ts +++ b/src/lib/generated/classes/run-task-run-shell-arguments.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class RunTaskRunShellArguments extends Hydrator { +class RunTaskRunShellArguments extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/run-task-run-shell-environment.ts b/src/lib/generated/classes/run-task-run-shell-environment.ts index fb215c52..b4439a3a 100644 --- a/src/lib/generated/classes/run-task-run-shell-environment.ts +++ b/src/lib/generated/classes/run-task-run-shell-environment.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class RunTaskRunShellEnvironment extends Hydrator { +class RunTaskRunShellEnvironment extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/run-task-run-shell.ts b/src/lib/generated/classes/run-task-run-shell.ts index f4780c26..3a2603b0 100644 --- a/src/lib/generated/classes/run-task-run-shell.ts +++ b/src/lib/generated/classes/run-task-run-shell.ts @@ -20,12 +20,20 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _RunTaskRunShellArguments } from './run-task-run-shell-arguments'; +import { _RunTaskRunShellEnvironment } from './run-task-run-shell-environment'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class RunTaskRunShell extends Hydrator { +class RunTaskRunShell extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.RunTaskRunShell & object; + if (isObject(model)) { + if (typeof model.arguments === 'object') self.arguments = new _RunTaskRunShellArguments(model.arguments); + if (typeof model.environment === 'object') self.environment = new _RunTaskRunShellEnvironment(model.environment); + } } } diff --git a/src/lib/generated/classes/run-task-run-workflow-input.ts b/src/lib/generated/classes/run-task-run-workflow-input.ts index 7dec4ec6..5b26157b 100644 --- a/src/lib/generated/classes/run-task-run-workflow-input.ts +++ b/src/lib/generated/classes/run-task-run-workflow-input.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class RunTaskRunWorkflowInput extends Hydrator { +class RunTaskRunWorkflowInput extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/run-task-run-workflow.ts b/src/lib/generated/classes/run-task-run-workflow.ts index e844b9f0..de11e52e 100644 --- a/src/lib/generated/classes/run-task-run-workflow.ts +++ b/src/lib/generated/classes/run-task-run-workflow.ts @@ -20,12 +20,18 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _RunTaskRunWorkflowInput } from './run-task-run-workflow-input'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class RunTaskRunWorkflow extends Hydrator { +class RunTaskRunWorkflow extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.RunTaskRunWorkflow & object; + if (isObject(model)) { + if (typeof model.input === 'object') self.input = new _RunTaskRunWorkflowInput(model.input); + } } } diff --git a/src/lib/generated/classes/run-task-run.ts b/src/lib/generated/classes/run-task-run.ts index 8c407b54..1bbcfc97 100644 --- a/src/lib/generated/classes/run-task-run.ts +++ b/src/lib/generated/classes/run-task-run.ts @@ -20,12 +20,25 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _RunTaskRunContainer } from './run-task-run-container'; +import { _RunTaskRunShell } from './run-task-run-shell'; +import { _RunTaskRunWorkflow } from './run-task-run-workflow'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class RunTaskRun extends Hydrator { +class RunTaskRun extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.RunTaskRun & object; + if (isObject(model)) { + if (typeof model.container === 'object') + self.container = new _RunTaskRunContainer(model.container as Specification.RunTaskRunContainer); + if (typeof model.shell === 'object') + self.shell = new _RunTaskRunShell(model.shell as Specification.RunTaskRunShell); + if (typeof model.workflow === 'object') + self.workflow = new _RunTaskRunWorkflow(model.workflow as Specification.RunTaskRunWorkflow); + } } } diff --git a/src/lib/generated/classes/run-task.ts b/src/lib/generated/classes/run-task.ts index 3f80b431..cc17c05a 100644 --- a/src/lib/generated/classes/run-task.ts +++ b/src/lib/generated/classes/run-task.ts @@ -21,11 +21,23 @@ *****************************************************************************************/ import { _TaskBase } from './task-base'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; class RunTask extends _TaskBase { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.RunTask & object; + if (isObject(model)) { + if (typeof model.input === 'object') self.input = new _Input(model.input); + if (typeof model.output === 'object') self.output = new _Output(model.output); + if (typeof model.export === 'object') self.export = new _Export(model.export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + } } } diff --git a/src/lib/generated/classes/schedule.ts b/src/lib/generated/classes/schedule.ts index 924257e5..35c28334 100644 --- a/src/lib/generated/classes/schedule.ts +++ b/src/lib/generated/classes/schedule.ts @@ -20,12 +20,19 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _Duration } from './duration'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class Schedule extends Hydrator { +class Schedule extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.Schedule & object; + if (isObject(model)) { + if (typeof model.every === 'object') self.every = new _Duration(model.every); + if (typeof model.after === 'object') self.after = new _Duration(model.after); + } } } diff --git a/src/lib/generated/classes/schema.ts b/src/lib/generated/classes/schema.ts index a7f48371..4c11a4ac 100644 --- a/src/lib/generated/classes/schema.ts +++ b/src/lib/generated/classes/schema.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class Schema extends Hydrator { +class Schema extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/set-task-set.ts b/src/lib/generated/classes/set-task-set.ts index b5ad234b..7bf199b5 100644 --- a/src/lib/generated/classes/set-task-set.ts +++ b/src/lib/generated/classes/set-task-set.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class SetTaskSet extends Hydrator { +class SetTaskSet extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/set-task.ts b/src/lib/generated/classes/set-task.ts index fa60e491..87b54b1d 100644 --- a/src/lib/generated/classes/set-task.ts +++ b/src/lib/generated/classes/set-task.ts @@ -21,11 +21,25 @@ *****************************************************************************************/ import { _TaskBase } from './task-base'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; +import { _SetTaskSet } from './set-task-set'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; class SetTask extends _TaskBase { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.SetTask & object; + if (isObject(model)) { + if (typeof model.input === 'object') self.input = new _Input(model.input); + if (typeof model.output === 'object') self.output = new _Output(model.output); + if (typeof model.export === 'object') self.export = new _Export(model.export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.set === 'object') self.set = new _SetTaskSet(model.set); + } } } diff --git a/src/lib/generated/classes/switch-task-switch-case.ts b/src/lib/generated/classes/switch-task-switch-case.ts index 4c40fa45..c1e1c47c 100644 --- a/src/lib/generated/classes/switch-task-switch-case.ts +++ b/src/lib/generated/classes/switch-task-switch-case.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class SwitchTaskSwitchCase extends Hydrator { +class SwitchTaskSwitchCase extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/switch-task-switch.ts b/src/lib/generated/classes/switch-task-switch.ts index 29645a54..af2efcac 100644 --- a/src/lib/generated/classes/switch-task-switch.ts +++ b/src/lib/generated/classes/switch-task-switch.ts @@ -20,15 +20,25 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { _SwitchTaskSwitchCase } from './switch-task-switch-case'; import { Specification } from '../definitions'; +import { ArrayHydrator } from '../../hydrator'; -class SwitchTaskSwitch extends Hydrator { - constructor(model?: Partial) { +class SwitchTaskSwitch extends ArrayHydrator<{ [k: string]: Specification.SwitchTaskSwitchCase }> { + constructor(model?: Array<{ [k: string]: Specification.SwitchTaskSwitchCase }> | number) { super(model); + if (Array.isArray(model)) { + if (model?.length) { + this.splice(0, this.length); + model.forEach((item) => + this.push( + Object.fromEntries(Object.entries(item).map(([key, value]) => [key, new _SwitchTaskSwitchCase(value)])), + ), + ); + } + } + Object.setPrototypeOf(this, Object.create(SwitchTaskSwitch.prototype)); } } -export const _SwitchTaskSwitch = SwitchTaskSwitch as { - new (model?: Partial): SwitchTaskSwitch & Specification.SwitchTaskSwitch; -}; +export const _SwitchTaskSwitch = SwitchTaskSwitch; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes diff --git a/src/lib/generated/classes/switch-task.ts b/src/lib/generated/classes/switch-task.ts index 0a576fac..4b36f36b 100644 --- a/src/lib/generated/classes/switch-task.ts +++ b/src/lib/generated/classes/switch-task.ts @@ -21,11 +21,26 @@ *****************************************************************************************/ import { _TaskBase } from './task-base'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; +import { _SwitchTaskSwitch } from './switch-task-switch'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; class SwitchTask extends _TaskBase { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.SwitchTask & object; + if (isObject(model)) { + if (typeof model.input === 'object') self.input = new _Input(model.input); + if (typeof model.output === 'object') self.output = new _Output(model.output); + if (typeof model.export === 'object') self.export = new _Export(model.export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.switch === 'object') + self.switch = new _SwitchTaskSwitch(model.switch) as Specification.SwitchTaskSwitch; + } } } diff --git a/src/lib/generated/classes/task-base.ts b/src/lib/generated/classes/task-base.ts index 4a08b786..90798871 100644 --- a/src/lib/generated/classes/task-base.ts +++ b/src/lib/generated/classes/task-base.ts @@ -20,12 +20,24 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class TaskBase extends Hydrator { +class TaskBase extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.TaskBase & object; + if (isObject(model)) { + if (typeof model.input === 'object') self.input = new _Input(model.input); + if (typeof model.output === 'object') self.output = new _Output(model.output); + if (typeof model.export === 'object') self.export = new _Export(model.export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + } } } diff --git a/src/lib/generated/classes/task-list.ts b/src/lib/generated/classes/task-list.ts index b02d39d2..e29ecfc0 100644 --- a/src/lib/generated/classes/task-list.ts +++ b/src/lib/generated/classes/task-list.ts @@ -20,13 +20,20 @@ * *****************************************************************************************/ +import { _Task } from './task'; import { Specification } from '../definitions'; +import { ArrayHydrator } from '../../hydrator'; -class TaskList extends Array<{ [k: string]: Specification.Task }> { - constructor(model?: Array<{ [k: string]: Specification.Task }>) { - super(...(model || [])); - if (model != null && !Array.isArray(model)) { - throw new Error('The provided model should be an array'); +class TaskList extends ArrayHydrator<{ [k: string]: Specification.Task }> { + constructor(model?: Array<{ [k: string]: Specification.Task }> | number) { + super(model); + if (Array.isArray(model)) { + if (model?.length) { + this.splice(0, this.length); + model.forEach((item) => + this.push(Object.fromEntries(Object.entries(item).map(([key, value]) => [key, new _Task(value)]))), + ); + } } Object.setPrototypeOf(this, Object.create(TaskList.prototype)); } diff --git a/src/lib/generated/classes/task.ts b/src/lib/generated/classes/task.ts index 0c0383a2..66262cc5 100644 --- a/src/lib/generated/classes/task.ts +++ b/src/lib/generated/classes/task.ts @@ -20,12 +20,49 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; +import { _ForkTaskFork } from './fork-task-fork'; +import { _EmitTaskEmit } from './emit-task-emit'; +import { _ForTaskFor } from './for-task-for'; +import { _ListenTaskListen } from './listen-task-listen'; +import { _RaiseTaskRaise } from './raise-task-raise'; +import { _SetTaskSet } from './set-task-set'; +import { _SwitchTaskSwitch } from './switch-task-switch'; +import { _TaskList } from './task-list'; +import { _TryTaskCatch } from './try-task-catch'; +import { _Duration } from './duration'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class Task extends Hydrator { +class Task extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.Task & object; + if (isObject(model)) { + if (typeof model.input === 'object') self.input = new _Input(model.input as Specification.Input); + if (typeof model.output === 'object') self.output = new _Output(model.output as Specification.Output); + if (typeof model.export === 'object') self.export = new _Export(model.export as Specification.Export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout as Specification.Timeout); + if (typeof model.fork === 'object') self.fork = new _ForkTaskFork(model.fork as Specification.ForkTaskFork); + if (typeof model.emit === 'object') self.emit = new _EmitTaskEmit(model.emit as Specification.EmitTaskEmit); + if (typeof model.for === 'object') self.for = new _ForTaskFor(model.for as Specification.ForTaskFor); + if (typeof model.listen === 'object') + self.listen = new _ListenTaskListen(model.listen as Specification.ListenTaskListen); + if (typeof model.raise === 'object') + self.raise = new _RaiseTaskRaise(model.raise as Specification.RaiseTaskRaise); + if (typeof model.set === 'object') self.set = new _SetTaskSet(model.set as Specification.SetTaskSet); + if (typeof model.switch === 'object') + self.switch = new _SwitchTaskSwitch( + model.switch as Specification.SwitchTaskSwitch, + ) as Specification.SwitchTaskSwitch; + if (typeof model.try === 'object') self.try = new _TaskList(model.try as Specification.TaskList); + if (typeof model.catch === 'object') self.catch = new _TryTaskCatch(model.catch as Specification.TryTaskCatch); + if (typeof model.wait === 'object') self.wait = new _Duration(model.wait as Specification.Duration); + } } } diff --git a/src/lib/generated/classes/timeout.ts b/src/lib/generated/classes/timeout.ts index bdbe4ed1..8adae282 100644 --- a/src/lib/generated/classes/timeout.ts +++ b/src/lib/generated/classes/timeout.ts @@ -20,12 +20,18 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _Duration } from './duration'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class Timeout extends Hydrator { +class Timeout extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.Timeout & object; + if (isObject(model)) { + if (typeof model.after === 'object') self.after = new _Duration(model.after); + } } } diff --git a/src/lib/generated/classes/try-task-catch.ts b/src/lib/generated/classes/try-task-catch.ts index 6a74eb75..9f5124de 100644 --- a/src/lib/generated/classes/try-task-catch.ts +++ b/src/lib/generated/classes/try-task-catch.ts @@ -20,12 +20,20 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _RetryPolicy } from './retry-policy'; +import { _TaskList } from './task-list'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class TryTaskCatch extends Hydrator { +class TryTaskCatch extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.TryTaskCatch & object; + if (isObject(model)) { + if (typeof model.retry === 'object') self.retry = new _RetryPolicy(model.retry); + if (typeof model.do === 'object') self.do = new _TaskList(model.do); + } } } diff --git a/src/lib/generated/classes/try-task.ts b/src/lib/generated/classes/try-task.ts index 968cb7ac..6997efba 100644 --- a/src/lib/generated/classes/try-task.ts +++ b/src/lib/generated/classes/try-task.ts @@ -21,11 +21,27 @@ *****************************************************************************************/ import { _TaskBase } from './task-base'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; +import { _TaskList } from './task-list'; +import { _TryTaskCatch } from './try-task-catch'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; class TryTask extends _TaskBase { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.TryTask & object; + if (isObject(model)) { + if (typeof model.input === 'object') self.input = new _Input(model.input); + if (typeof model.output === 'object') self.output = new _Output(model.output); + if (typeof model.export === 'object') self.export = new _Export(model.export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.try === 'object') self.try = new _TaskList(model.try); + if (typeof model.catch === 'object') self.catch = new _TryTaskCatch(model.catch); + } } } diff --git a/src/lib/generated/classes/use-authentications.ts b/src/lib/generated/classes/use-authentications.ts index 7e7bc616..0eaede4f 100644 --- a/src/lib/generated/classes/use-authentications.ts +++ b/src/lib/generated/classes/use-authentications.ts @@ -20,10 +20,11 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; + import { Specification } from '../definitions'; -class UseAuthentications extends Hydrator { +class UseAuthentications extends ObjectHydrator { constructor(model?: Partial) { super(model); } diff --git a/src/lib/generated/classes/use-errors.ts b/src/lib/generated/classes/use-errors.ts index 28b6b0c5..5dc49779 100644 --- a/src/lib/generated/classes/use-errors.ts +++ b/src/lib/generated/classes/use-errors.ts @@ -20,12 +20,23 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _Error } from './error'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class UseErrors extends Hydrator { +class UseErrors extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.UseErrors & object; + if (isObject(model)) { + const knownProperties: string[] = []; + Object.entries(model) + .filter(([key]) => !knownProperties.includes(key)) + .forEach(([key, value]) => { + self[key] = new _Error(value); + }); + } } } diff --git a/src/lib/generated/classes/use-extensions.ts b/src/lib/generated/classes/use-extensions.ts index 6e7f021e..dcc1c986 100644 --- a/src/lib/generated/classes/use-extensions.ts +++ b/src/lib/generated/classes/use-extensions.ts @@ -20,13 +20,20 @@ * *****************************************************************************************/ +import { _Extension } from './extension'; import { Specification } from '../definitions'; +import { ArrayHydrator } from '../../hydrator'; -class UseExtensions extends Array<{ [k: string]: Specification.Extension }> { - constructor(model?: Array<{ [k: string]: Specification.Extension }>) { - super(...(model || [])); - if (model != null && !Array.isArray(model)) { - throw new Error('The provided model should be an array'); +class UseExtensions extends ArrayHydrator<{ [k: string]: Specification.Extension }> { + constructor(model?: Array<{ [k: string]: Specification.Extension }> | number) { + super(model); + if (Array.isArray(model)) { + if (model?.length) { + this.splice(0, this.length); + model.forEach((item) => + this.push(Object.fromEntries(Object.entries(item).map(([key, value]) => [key, new _Extension(value)]))), + ); + } } Object.setPrototypeOf(this, Object.create(UseExtensions.prototype)); } diff --git a/src/lib/generated/classes/use-functions.ts b/src/lib/generated/classes/use-functions.ts index e8ec8234..774277f2 100644 --- a/src/lib/generated/classes/use-functions.ts +++ b/src/lib/generated/classes/use-functions.ts @@ -20,12 +20,23 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _Task } from './task'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class UseFunctions extends Hydrator { +class UseFunctions extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.UseFunctions & object; + if (isObject(model)) { + const knownProperties: string[] = []; + Object.entries(model) + .filter(([key]) => !knownProperties.includes(key)) + .forEach(([key, value]) => { + self[key] = new _Task(value); + }); + } } } diff --git a/src/lib/generated/classes/use-retries.ts b/src/lib/generated/classes/use-retries.ts index 2c8773a0..03eb1c2b 100644 --- a/src/lib/generated/classes/use-retries.ts +++ b/src/lib/generated/classes/use-retries.ts @@ -20,12 +20,23 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _RetryPolicy } from './retry-policy'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class UseRetries extends Hydrator { +class UseRetries extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.UseRetries & object; + if (isObject(model)) { + const knownProperties: string[] = []; + Object.entries(model) + .filter(([key]) => !knownProperties.includes(key)) + .forEach(([key, value]) => { + self[key] = new _RetryPolicy(value); + }); + } } } diff --git a/src/lib/generated/classes/use.ts b/src/lib/generated/classes/use.ts index 532649aa..e112a025 100644 --- a/src/lib/generated/classes/use.ts +++ b/src/lib/generated/classes/use.ts @@ -20,12 +20,27 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _UseAuthentications } from './use-authentications'; +import { _UseErrors } from './use-errors'; +import { _UseExtensions } from './use-extensions'; +import { _UseFunctions } from './use-functions'; +import { _UseRetries } from './use-retries'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class Use extends Hydrator { +class Use extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.Use & object; + if (isObject(model)) { + if (typeof model.authentications === 'object') + self.authentications = new _UseAuthentications(model.authentications); + if (typeof model.errors === 'object') self.errors = new _UseErrors(model.errors); + if (typeof model.extensions === 'object') self.extensions = new _UseExtensions(model.extensions); + if (typeof model.functions === 'object') self.functions = new _UseFunctions(model.functions); + if (typeof model.retries === 'object') self.retries = new _UseRetries(model.retries); + } } } diff --git a/src/lib/generated/classes/wait-task.ts b/src/lib/generated/classes/wait-task.ts index 2644f07f..002ec5ad 100644 --- a/src/lib/generated/classes/wait-task.ts +++ b/src/lib/generated/classes/wait-task.ts @@ -21,11 +21,25 @@ *****************************************************************************************/ import { _TaskBase } from './task-base'; +import { _Input } from './input'; +import { _Output } from './output'; +import { _Export } from './export'; +import { _Timeout } from './timeout'; +import { _Duration } from './duration'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; class WaitTask extends _TaskBase { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.WaitTask & object; + if (isObject(model)) { + if (typeof model.input === 'object') self.input = new _Input(model.input); + if (typeof model.output === 'object') self.output = new _Output(model.output); + if (typeof model.export === 'object') self.export = new _Export(model.export); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.wait === 'object') self.wait = new _Duration(model.wait); + } } } diff --git a/src/lib/generated/classes/workflow.ts b/src/lib/generated/classes/workflow.ts index 6b912bea..65612e55 100644 --- a/src/lib/generated/classes/workflow.ts +++ b/src/lib/generated/classes/workflow.ts @@ -20,12 +20,30 @@ * *****************************************************************************************/ -import { Hydrator } from '../../hydrator'; +import { ObjectHydrator } from '../../hydrator'; +import { _Document } from './document'; +import { _Input } from './input'; +import { _Use } from './use'; +import { _TaskList } from './task-list'; +import { _Timeout } from './timeout'; +import { _Output } from './output'; +import { _Schedule } from './schedule'; import { Specification } from '../definitions'; +import { isObject } from '../../utils'; -class Workflow extends Hydrator { +class Workflow extends ObjectHydrator { constructor(model?: Partial) { super(model); + const self = this as unknown as Specification.Workflow & object; + if (isObject(model)) { + if (typeof model.document === 'object') self.document = new _Document(model.document); + if (typeof model.input === 'object') self.input = new _Input(model.input); + if (typeof model.use === 'object') self.use = new _Use(model.use); + if (typeof model.do === 'object') self.do = new _TaskList(model.do); + if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.output === 'object') self.output = new _Output(model.output); + if (typeof model.schedule === 'object') self.schedule = new _Schedule(model.schedule); + } } } diff --git a/src/lib/generated/validation/validation-pointers.ts b/src/lib/generated/validation/validation-pointers.ts index 5c9e6f98..867ad5e6 100644 --- a/src/lib/generated/validation/validation-pointers.ts +++ b/src/lib/generated/validation/validation-pointers.ts @@ -14,6 +14,12 @@ * limitations under the License. */ +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + /** * A map of type names and their corresponding schema */ @@ -131,6 +137,8 @@ export const validationPointers = { SwitchTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/switchTask', SwitchTaskSwitch: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/switchTask/properties/switch', + SwitchTaskSwitchCase: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/switchTask/properties/switch/items/additionalProperties', Task: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/task', TaskBase: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/taskBase', TaskList: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/taskList', diff --git a/src/lib/hydrator.ts b/src/lib/hydrator.ts index 00ed91f5..375af3d4 100644 --- a/src/lib/hydrator.ts +++ b/src/lib/hydrator.ts @@ -1,12 +1,31 @@ import { isObject } from './utils'; /** - * A base class used for hydration + * A base class used for object hydration */ -export class Hydrator { +export class ObjectHydrator { constructor(model?: Partial) { if (isObject(model)) { Object.assign(this, model); } } } + +/** + * A base class used for array hydration + */ +export class ArrayHydrator extends Array { + constructor(model?: Array | number) { + if (!isNaN(model as number)) { + super(model as number); + } else { + super(...((model as Array) || [])); + if (!model) { + model = []; + } + if (!Array.isArray(model)) { + throw new Error('The provided model should be an array'); + } + } + } +} diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 55ea5d4f..6dbe2d99 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -3,7 +3,21 @@ * @param value The value to check * @returns True if the value is an object */ -export const isObject = (value: unknown): boolean => { +export const isObject = (value: T): value is T & object => { if (!value) return false; return typeof value === 'object' && !Array.isArray(value); }; + +/** + * Makes a deep copy of the provided object + * @param obj + * @returns + */ +export const deepCopy = (obj: T): T => JSON.parse(JSON.stringify(obj)); + +/** + * Checks the provided array is an array + * @param arr + * @returns + */ +export const isArray = (arr: Array | number | undefined): arr is Array => !!arr && isNaN(arr as number); diff --git a/src/lib/validation.ts b/src/lib/validation.ts index df4b7dfd..8229467f 100644 --- a/src/lib/validation.ts +++ b/src/lib/validation.ts @@ -2,6 +2,7 @@ import Ajv, { ValidateFunction } from 'ajv/dist/2020'; import addFormats from 'ajv-formats'; import workflowSchema from './generated/schema/workflow.json'; import { validationPointers } from './generated/validation'; +import { deepCopy } from './utils'; const ajv = new Ajv({ schemas: [workflowSchema], @@ -32,7 +33,7 @@ export const validate = (typeName: string, data: T): boolean => { if (!validateFn) { throw Error(`Unable to find a validation function for '${typeName}'`); } - if (!validateFn(JSON.parse(JSON.stringify(data)))) { + if (!validateFn(deepCopy(data))) { throw new Error( `'${typeName}' is invalid: ${validateFn.errors?.reduce((acc, error) => acc + `- ${error.instancePath} | ${error.schemaPath} | ${error.message} | ${JSON.stringify(error.params)}\n`, '') ?? ''} diff --git a/tests/builders/call-http-builder.spec.ts b/tests/builders/call-http-builder.spec.ts index a1bbb3ea..2fffb158 100644 --- a/tests/builders/call-http-builder.spec.ts +++ b/tests/builders/call-http-builder.spec.ts @@ -45,7 +45,6 @@ describe('CallHTTP builder', () => { }; expect(test).toThrow(Error); expect(test).toThrow(/'CallHTTP' is invalid/); - expect(test).toThrow(/must have required property 'call'/); }); it('should not validate', () => { diff --git a/tools/3_generate-validation-pointers.ts b/tools/3_generate-validation-pointers.ts index 3974c420..978f53c5 100644 --- a/tools/3_generate-validation-pointers.ts +++ b/tools/3_generate-validation-pointers.ts @@ -17,8 +17,9 @@ import { promises as fsPromises } from 'fs'; import * as path from 'path'; import { fileHeader, inFileDisclaimer } from './consts'; -import { definitionsDir, getExportedDeclarations, isObject, reset, schemaDir, vallidationDir } from './utils'; +import { definitionsDir, isObject, reset, schemaDir, vallidationDir } from './utils'; import { JSONSchema } from 'json-schema-to-typescript'; +import { getExportedDeclarations } from './reflection'; const { writeFile, readFile } = fsPromises; diff --git a/tools/4_generate-classes.ts b/tools/4_generate-classes.ts index 079ab783..7acadf98 100644 --- a/tools/4_generate-classes.ts +++ b/tools/4_generate-classes.ts @@ -17,14 +17,15 @@ import { promises as fsPromises } from 'fs'; import * as path from 'path'; import { fileHeader, inFileDisclaimer } from './consts'; +import { classesDir, definitionsDir, normalizeKnownAllCaps, reset, toKebabCase } from './utils'; import { - classesDir, - definitionsDir, + getArrayHydration, getExportedDeclarations, - normalizeKnownAllCaps, - reset, - toKebabCase, -} from './utils'; + getObjectHydration, + getTypeName, + getUnderlyingTypes, +} from './reflection'; +import { Node, Type } from 'ts-morph'; const { writeFile, readFile } = fsPromises; @@ -34,40 +35,56 @@ const { writeFile, readFile } = fsPromises; * @param baseClass The inherited class, if any * @returns The declaration of the class */ -const getObjectClassDeclaration = (name: string, baseClass?: string): string => - `${fileHeader} +function getObjectClassDeclaration(name: string, node: Node, type: Type, baseClass?: string): string { + const hydrationResult = getObjectHydration(node, type); + return `${fileHeader} ${inFileDisclaimer} -${baseClass ? `import { _${baseClass} } from './${toKebabCase(normalizeKnownAllCaps(baseClass))}';` : 'import { Hydrator } from "../../hydrator";'} -import { Specification } from "../definitions"; +${baseClass ? `import { _${baseClass} } from './${toKebabCase(normalizeKnownAllCaps(baseClass))}';` : "import { ObjectHydrator } from '../../hydrator';"} +${hydrationResult.imports.map((type) => `import { _${type} } from './${toKebabCase(normalizeKnownAllCaps(type))}';`).join('\n')} +import { Specification } from '../definitions'; +${hydrationResult.code ? "import { isObject } from '../../utils';" : ''} -class ${name} extends ${baseClass ? '_' + baseClass : `Hydrator`} { +class ${name} extends ${baseClass ? '_' + baseClass : `ObjectHydrator`} { constructor(model?: Partial) { super(model); + ${ + hydrationResult.code + ? `const self = (this as unknown) as Specification.${name} & object; + if (isObject(model)) { + ${hydrationResult.code} + }` + : '' + } + } } export const _${name} = ${name} as ({ new (model?: Partial): ${name} & Specification.${name} });`; +} /** * Returns the declaration for a class that behaves like an array * @param name The name of the class - * @param arrayType The type parameter of the underlying array + * @param arrayTypeName The type parameter of the underlying array * @returns The declaration of the array-like class */ -const getArrayLikeClassDeclaration = (name: string, arrayType: string): string => - `${fileHeader} +function getArrayLikeClassDeclaration(name: string, arrayTypeName: string, type: Type): string { + const hydrationResult = getArrayHydration(type); + return `${fileHeader} ${inFileDisclaimer} -import { Specification } from "../definitions"; +${hydrationResult.imports.map((type) => `import { _${type} } from './${toKebabCase(normalizeKnownAllCaps(type))}';`)} +import { Specification } from '../definitions'; +import { ArrayHydrator } from '../../hydrator'; -class ${name} extends Array<${arrayType}> { - constructor(model?: Array<${arrayType}>) { - super(...(model||[])); - if (model != null && !Array.isArray(model)) { - throw new Error('The provided model should be an array'); +class ${name} extends ArrayHydrator<${arrayTypeName}> { + constructor(model?: Array<${arrayTypeName}> | number) { + super(model); + if (Array.isArray(model)) { + ${hydrationResult.code} } Object.setPrototypeOf(this, Object.create(${name}.prototype)); } @@ -75,6 +92,7 @@ class ${name} extends Array<${arrayType}> { export const _${name} = ${name}; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes `; +} /** * Generates classes @@ -89,15 +107,16 @@ async function generate(definitionFile: string, destDir: string): Promise for (const [alias, node] of exportedDeclarations) { const exportedType = node![0].getType(); let classDeclaration: string = ''; - if (!exportedType.isArray()) { - const baseClass = exportedType.getIntersectionTypes()?.[0]?.getText().replace('import("/declarations").', ''); - classDeclaration = getObjectClassDeclaration(alias, baseClass); + if (!exportedType.isArray() && !exportedType.isTuple()) { + const baseClass = exportedType.getIntersectionTypes()?.[0]; + const baseClassName = baseClass ? getTypeName(baseClass) : undefined; + classDeclaration = getObjectClassDeclaration(alias, node![0], exportedType, baseClassName); } else { - const arrayType = exportedType - .getArrayElementTypeOrThrow() - .getText() - .replace('import("/declarations")', 'Specification'); - classDeclaration = getArrayLikeClassDeclaration(alias, arrayType); + const arrayType = getTypeName( + exportedType.getArrayElementType() || getUnderlyingTypes(exportedType)[0], + 'Specification.', + ); + classDeclaration = getArrayLikeClassDeclaration(alias, arrayType, exportedType); } const destFile = path.resolve(destDir, toKebabCase(normalizeKnownAllCaps(alias)) + '.ts'); await writeFile(destFile, classDeclaration); diff --git a/tools/5_generate-builders.ts b/tools/5_generate-builders.ts index c5fe62d0..585457d5 100644 --- a/tools/5_generate-builders.ts +++ b/tools/5_generate-builders.ts @@ -17,14 +17,8 @@ import { promises as fsPromises } from 'fs'; import * as path from 'path'; import { fileHeader, inFileDisclaimer } from './consts'; -import { - buildersDir, - definitionsDir, - getExportedDeclarations, - normalizeKnownAllCaps, - reset, - toKebabCase, -} from './utils'; +import { buildersDir, definitionsDir, normalizeKnownAllCaps, reset, toKebabCase } from './utils'; +import { getExportedDeclarations } from './reflection'; const { readFile, writeFile } = fsPromises; diff --git a/tools/consts.ts b/tools/consts.ts index 5c9ae18d..051996f8 100644 --- a/tools/consts.ts +++ b/tools/consts.ts @@ -32,12 +32,12 @@ export const fileHeader = `/* `; export const inFileDisclaimer = ` - /***************************************************************************************** - * - * /!\\ This file is computer generated. Any manual modification can and will be lost. /!\\ - * - *****************************************************************************************/ - `; +/***************************************************************************************** + * + * /!\\ This file is computer generated. Any manual modification can and will be lost. /!\\ + * + *****************************************************************************************/ +`; export const readMeDisclaimer = `# Auto generated notice This directory and its content has been generated automatically. Do not modify its content, it WILL be lost.`; diff --git a/tools/reflection.ts b/tools/reflection.ts new file mode 100644 index 00000000..23119456 --- /dev/null +++ b/tools/reflection.ts @@ -0,0 +1,283 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { ExportedDeclarations, Project, QuoteKind, Type, Symbol as TsMorphSymbol, Node } from 'ts-morph'; + +/** + * Describes an object property + */ +type PropertyInfo = { + /** The property name */ + name: string; + /** The property type name */ + type: string; + /** The original ts-morph type */ + originalType: Type; + /** The original declaration */ + originalDeclaration: string; + /** True if the property type is anonymous */ + isAnonymous: boolean; + /** True if the property type has an indexed signature */ + hasIndexedSignature: boolean; +}; + +/** The result of an hydration call */ +type HydrationResult = { + /** The list of types to import */ + imports: string[]; + /** The hydration code */ + code: string; +}; + +/** + * Get the exported declarations of the provided TypeScript code + * @param tsSource The TypeScript code to parse + * @returns An array containing the name of the exported declarations + */ +export const getExportedDeclarations = (tsSource: string): ReadonlyMap => { + const project = new Project({ + useInMemoryFileSystem: true, + manipulationSettings: { + quoteKind: QuoteKind.Single, + }, + }); + const sourceFile = project.createSourceFile('declarations.ts', tsSource); + return sourceFile.getExportedDeclarations(); +}; + +/** + * Gets a type, its union, intersection and tuple subtypes + * @param type The source type + * @returns An array containing the type and its subtypes + */ +export const getUnderlyingTypes = (type: Type): Type[] => + [ + type, + ...type.getUnionTypes().flatMap((t) => getUnderlyingTypes(t)), + ...type.getIntersectionTypes().flatMap((t) => getUnderlyingTypes(t)), + ...type.getTupleElements().flatMap((t) => getUnderlyingTypes(t)), + ].filter( + (t, idx, arr) => arr.findIndex((tt) => tt.getText() === t.getText()) === idx && !t.isArray() && !t.isTuple(), + ); + +/** + * Checks if the provided type has an indexed signature + * @param type The type to check + * @returns True if the type has an indexed signature + */ +const hasStringIndexedSignature = (type: Type): boolean => !!type.getStringIndexType(); + +/** + * Checks if the provided type is a value type or a union/intersection/tuple of value types + * @param type The type to check + * @returns True if the type, or its subtypes, is a value type + */ +const isValueType = (type: Type): boolean => + type.isString() || + type.isNumber() || + type.isBoolean() || + type.isBigInt() || + type.isEnum() || + type.isAny() || + type.isUnknown() || + type.isLiteral() || + (type.isUnion() && type.getUnionTypes().every((t) => isValueType(t))) || + (type.isIntersection() && type.getIntersectionTypes().every((t) => isValueType(t))) || + (type.isTuple() && type.getTupleElements().every((t) => isValueType(t))) || + (type.isArray() && isValueType(type.getArrayElementTypeOrThrow())) || + (type.isAnonymous() && hasStringIndexedSignature(type) && isValueType(type.getStringIndexType()!)); +/** + * Cleans the type name + * @param type The type to get the name from + * @param replacement The replacement text + * @returns The type name + */ +export const getTypeName = (type: Type, replacement: string = '') => + type.getText().replace('import("/declarations").', replacement); + +/** + * Returns the properties of the give type + * @param node The node containing the type + * @param type The type to get the properties from + * @returns An array of Symbol for the type's properties + */ +const getProperties = (node: Node, type: Type): TsMorphSymbol[] => + getUnderlyingTypes(type) + .filter((t) => t.isObject()) + .flatMap((t) => t.getProperties()); +/** + * Transforms the provided property Symbol to a PropertyInfo + * @param property The property to transform + * @param node The node the property belongs to + * @returns The PropertyInfo for the provided property + */ +function asPropertyInfo(property: TsMorphSymbol, node: Node): PropertyInfo { + const name = property.getName(); + const originalType = property.getTypeAtLocation(node).getNonNullableType(); + const originalDeclaration = originalType.getText(); + const isAnonymous = originalType.isAnonymous(); + const hasIndexedSignature = hasStringIndexedSignature(originalType); + let typeTxt = ''; + if (!isAnonymous || !hasIndexedSignature) { + typeTxt = getTypeName(originalType); + } else if (hasIndexedSignature) { + typeTxt = getTypeName(originalType.getStringIndexType()!); + } + return { + name, + originalType, + originalDeclaration, + isAnonymous, + hasIndexedSignature, + type: typeTxt, + }; +} + +/** + * Gets a list of properties that could be hydrated + * @param node The node containing the type + * @param type The type to get the properties from + * @param properties The type properties + * @returns An array of hydratable PropertyInfo + */ +const getHydratableProperties = (node: Node, type: Type, properties: TsMorphSymbol[]): PropertyInfo[] => + properties + .filter((p) => { + const originalType = p.getTypeAtLocation(node).getNonNullableType(); + //debugType(originalType); + return !isValueType(originalType); + }) + .map((p) => asPropertyInfo(p, node)) + .concat( + ...getUnderlyingTypes(type) + .map((t) => t.getStringIndexType()) + .filter((t) => !!t && !isValueType(t)) + .reduce((props, t: Type) => { + props.push({ + name: '', + originalType: t, + originalDeclaration: t.getText(), + isAnonymous: t.isAnonymous(), + hasIndexedSignature: true, + type: getTypeName(t), + }); + return props; + }, [] as PropertyInfo[]), + ); + +/** + * Gets a list of literal properties + * @param node The node containing the type + * @param properties The type properties + * @returns An array of literal PropertyInfo + */ +const getConstantProperties = (node: Node, properties: TsMorphSymbol[]): PropertyInfo[] => + properties + .filter((p) => { + const originalType = p.getTypeAtLocation(node).getNonNullableType(); + //debugType(originalType); + return originalType.isLiteral() && (!originalType.isUnion() || !originalType.isIntersection()); + }) + .map((p) => asPropertyInfo(p, node)); + +/** + * Gets duplicate values from an array + * @param input An array of values + * @returns An array of values that are duplicate in the input array + */ +const getDuplicateValues = (input: Array): Array => + input.filter((item, idx) => input.indexOf(item) === idx && input.lastIndexOf(item) !== idx); + +/** + * Produces the code to hydrate an object of the provided type + * @param node The node containing the type + * @param type The type to get the properties from + * @returns The code to hydrate the provided type + */ +export function getObjectHydration(node: Node, type: Type): HydrationResult { + const properties = getProperties(node, type); + const hydratableProperties = getHydratableProperties(node, type, properties); + let constantProperties = getConstantProperties(node, properties); + const duplicateConstantProperties = getDuplicateValues(constantProperties.map((p) => p.name)); + duplicateConstantProperties.forEach((name) => { + console.warn(`Found duplicate property '${name}' in '${type.getAliasSymbol()?.getName()}', ignored.`); + }); + constantProperties = constantProperties.filter((prop) => !duplicateConstantProperties.includes(prop.name)); + let namedProperties = hydratableProperties.filter((prop) => !!prop.name); + const duplicateNamedProperties = getDuplicateValues(namedProperties.map((p) => p.name)); + duplicateNamedProperties.forEach((name) => { + console.warn(`Found duplicate property '${name}' in '${type.getAliasSymbol()?.getName()}', ignored.`); + }); + namedProperties = namedProperties.filter((prop) => !duplicateNamedProperties.includes(prop.name)); + const imports: string[] = [...namedProperties.map((p) => p.type)].filter((type, i, arr) => arr.indexOf(type) === i); + const lines: string[] = [ + ...constantProperties.map((prop) => `self.${prop.name} = ${prop.type} as const;`), + ...namedProperties.map((prop) => { + const propName = !type.isUnion() ? prop.name : `${prop.name} as Specification.${prop.type}`; + if (!prop.isAnonymous) { + return `if (typeof model.${prop.name} === 'object') self.${prop.name} = new _${prop.type}(model.${propName}) ${prop.originalType.isTuple() ? `as Specification.${prop.type}` : ''};`; + } + if (prop.isAnonymous) { + return `if (typeof model.${prop.name} === 'object') self.${prop.name} = Object.fromEntries( + Object.entries(model.${propName}).map(([key, value]) => [key, new _${prop.type}(value)] ) + );`; + } + }), + ].filter((line): line is string => !!line?.trim()); + const indexedProperty = hydratableProperties.find((p) => !p.name); + if (indexedProperty && !indexedProperty.isAnonymous) { + imports.push(indexedProperty.type); + lines.push( + `const knownProperties: string[] = [${[...constantProperties, ...namedProperties].map((p) => `'${p.name}'`).join(',')}];`, + ); + lines.push(`Object.entries(model).filter(([key]) => !knownProperties.includes(key)).forEach(([key, value]) => { + self[key] = new _${indexedProperty.type}(value); + });`); + } + const code = lines.join('\n'); + return { + imports, + code, + }; +} + +/** + * Produces the code to hydrate an array of the provided type + * @param type The array type to hydrate + * @returns The code to hydrate the provided array + */ +export function getArrayHydration(type: Type): HydrationResult { + const arrayType = type.getArrayElementType() || getUnderlyingTypes(type)[0]; + const lines: string[] = ['if (model?.length) {', 'this.splice(0, this.length);']; + const imports: string[] = []; + if (!arrayType.isAnonymous()) { + const typeName = getTypeName(arrayType); + imports.push(typeName); + lines.push(`model.forEach(item => this.push(new _${typeName}(item)));`); + } else { + const typeName = getTypeName(arrayType.getStringIndexType()!); + imports.push(typeName); + lines.push( + `model.forEach(item => this.push(Object.fromEntries(Object.entries(item).map(([key, value]) => [key, new _${typeName}(value)]))));`, + ); + } + lines.push('}'); + const code = lines.join('\n'); + return { + imports, + code, + }; +} diff --git a/tools/tmp.ts b/tools/tmp.ts index aa5bc127..9909d1c3 100644 --- a/tools/tmp.ts +++ b/tools/tmp.ts @@ -2,130 +2,13 @@ import { definitionsDir } from './utils'; import * as path from 'path'; import { promises as fsPromises } from 'fs'; -import { Project, QuoteKind, Type, Node, TypeNode } from 'ts-morph'; +import { Project, QuoteKind, Type, Node, Symbol, printNode } from 'ts-morph'; +import { getArrayHydration, getObjectHydration } from './reflection'; const { readFile, writeFile } = fsPromises; const definitionFile = path.resolve(definitionsDir, 'specification.ts'); -const getUnderlyingTypes = (type: Type): Type[] => [ - type, - ...type.getUnionTypes().flatMap((t) => getUnderlyingTypes(t)), - ...type.getIntersectionTypes().flatMap((t) => getUnderlyingTypes(t)), -]; //.filter(t => !t.isArray()); - -type PropertyInfo = { - name: string; - type: string; - originalType: Type; - originalDeclaration: string; - isArray: boolean; - isAnonymous: boolean; - isLiteral: boolean; - hasIndexedSignature: boolean; -}; - -const hasStringIndexedSignature = (type: Type): boolean => !!type.getStringIndexType(); - -const getProperties = (node: any, type: Type): PropertyInfo[] => - getUnderlyingTypes(type) - .filter((t) => t.isObject()) - .flatMap((t) => t.getProperties()) - .filter((p, i, arr) => { - const originalType = p.getTypeAtLocation(node).getNonNullableType(); - // originalType.isObject() doesn't return the expected result - const isObject = !( - ( - originalType.isString() || - originalType.isNumber() || - originalType.isBoolean() || - originalType.isBigInt() || - originalType.isEnum() || - originalType.isAny() || - originalType.isUnknown() - ) - //|| originalType.isLiteral() - ); - const isAnonymous = originalType.isAnonymous(); - const isAny = originalType.isAny(); - const isArray = originalType.isArray(); - const isBoolean = originalType.isBoolean(); - const isBooleanLiteral = originalType.isBooleanLiteral(); - const isClass = originalType.isClass(); - const isClassOrInterface = originalType.isClassOrInterface(); - const isEnum = originalType.isEnum(); - const isEnumLiteral = originalType.isEnumLiteral(); - const isInterface = originalType.isInterface(); - const isIntersection = originalType.isIntersection(); - const isLiteral = originalType.isLiteral(); - const isNull = originalType.isNull(); - const isNumber = originalType.isNumber(); - const isNumberLiteral = originalType.isNumberLiteral(); - //const isObject = originalType.isObject(); - const isString = originalType.isString(); - const isStringLiteral = originalType.isStringLiteral(); - const isTemplateLiteral = originalType.isTemplateLiteral(); - const isTuple = originalType.isTuple(); - const isUndefined = originalType.isUndefined(); - const isUnion = originalType.isUnion(); - const isUnionOrIntersection = originalType.isUnionOrIntersection(); - const isUnknown = originalType.isUnknown(); - return arr.indexOf(p) === i && isObject; - //arr.findIndex(pp => pp.getName() === p.getName()) === i // removes duplicates based on names, but creates unwanted behavior - // e.g. with Task, `with` can be of type `CallAsyncAPIWith`,`CallGRPCWith`... - }) - .map((p) => { - const name = p.getName(); - const originalType = p.getTypeAtLocation(node).getNonNullableType(); - const originalDeclaration = originalType.getText(); - const isArray = originalType.isArray(); - const isAnonymous = originalType.isAnonymous(); - const isLiteral = originalType.isLiteral(); - const hasIndexedSignature = hasStringIndexedSignature(originalType); - let typeTxt = ''; - if (/*!isArray && */ !isAnonymous || !hasIndexedSignature) { - typeTxt = originalType.getText(); - } else if (hasIndexedSignature) { - typeTxt = originalType.getStringIndexType()!.getText(); - } - /*else { - const arrayType = originalType.getArrayElementType()!; - if (!hasStringIndexedSignature(arrayType)) { - typeTxt = arrayType.getText(); - } - else { - typeTxt = arrayType.getStringIndexType()!.getText(); - } - }*/ - typeTxt = typeTxt.replace('import("/declarations").', ''); - return { - name, - originalType, - originalDeclaration, - isArray, - isAnonymous, - isLiteral, - hasIndexedSignature, - type: typeTxt, - }; - }) - .concat( - hasStringIndexedSignature(type) - ? [ - { - name: '', - originalType: type.getStringIndexType()!, - originalDeclaration: type.getStringIndexType()!.getText(), - isArray: type.getStringIndexType()!.isArray(), - isAnonymous: type.getStringIndexType()!.isAnonymous(), - isLiteral: type.getStringIndexType()!.isLiteral(), - hasIndexedSignature: true, - type: type.getStringIndexType()!.getText(), - }, - ] - : [], - ); - async function test() { const source = await readFile(definitionFile, { encoding: 'utf-8' }); const project = new Project({ @@ -139,66 +22,15 @@ async function test() { }); const sourceFile = project.createSourceFile('declarations.ts', source); const exportedDeclarations = sourceFile.getExportedDeclarations(); + //var tuples = Array.from(exportedDeclarations).filter(([k, v]) => v[0]!.getType().isTuple()); + //var arrays = Array.from(exportedDeclarations).filter(([k, v]) => v[0]!.getType().isArray()); // var node = exportedDeclarations.get('ExternalResource')![0]; // var target = node.getType(); // var props = getProperties(node, target); - var node = exportedDeclarations.get('SwitchTaskSwitch')![0]; + var node = exportedDeclarations.get('AuthenticationPolicyOauth2')![0]; var target = node.getType(); - var it = target.getIntersectionTypes(); - var props = getProperties(node, target); - var declarations = !target.isArray() ? getObjectHydration(node, target) : 'IS ARRAY'; - /* - Strange union - - SwitchTaskSwitch - - Strange union (literal?) - - CallHTTPWith / CallOpenAPIWith . output - - Array with object key-type - - TaskList - - UseExtensions - */ - console.log(declarations); -} - -function getObjectHydration(node: Node, type: Type): string { - const properties = getProperties(node, type); - const namedProperties = properties.filter((p, i, arr) => p.name && arr.findIndex((pp) => pp.name === p.name) === i); - const lines: string[] = namedProperties - .filter((p) => p.type !== 'unknown') - .map((prop) => { - if (prop.isLiteral) { - return `self.${prop.name} = ${prop.type};`; - } else if (/*!prop.isArray && */ !prop.isAnonymous) { - return `if (model.${prop.name}) self.${prop.name} = new ${prop.type}(model.${prop.name});`; - } /*if (prop.isAnonymous)*/ else { - return `if (model.${prop.name}) self.${prop.name} = Object.fromEntries( - Object.entries(model.${prop.name}).map(([key, value]) => [key, new ${prop.type}(value)] ) - );`; - } - /* Array should support their own constructor, like any object - else { - if (!prop.isAnonymous) { - return `if (model.${prop.name}?.length) self.${prop.name} = model.${prop.name}.map(value => new ${prop.type}(value));`; - } - else { // assumes an array of { id: Type } - return `if (model.${prop.name}?.length) self.${prop.name} = model.${prop.name}.map(obj => - Object.fromEntries( - Object.entries(obj).map(([key, value]) => [key, new ${prop.type}(value)]) - ) - );`; - } - } - */ - }); - const indexedProperty = properties.find((p) => !p.name); - if (indexedProperty && indexedProperty.type !== 'unknown' && !indexedProperty.isAnonymous) { - lines.push(`const knownProperties = [${namedProperties.map((p) => `'${p.name}'`).join(',')}];`); - lines.push(`Object.entries(model).filter(([key]) => !knownProperties.includes(key)).forEach(([key, value]) => { - self[key] = new ${indexedProperty.type}(value); - });`); - } - return lines.join('\n'); + var declarations = !target.isArray() ? getObjectHydration(node, target) : getArrayHydration(target); + console.log(declarations.code); } test() diff --git a/tools/utils.ts b/tools/utils.ts index 6aa46a7d..2193364a 100644 --- a/tools/utils.ts +++ b/tools/utils.ts @@ -21,7 +21,6 @@ import { readMeDisclaimer } from './consts'; import { URL } from 'url'; import yargs from 'yargs'; import { schemaVersion } from '../package.json'; -import { ExportedDeclarations, Project, QuoteKind } from 'ts-morph'; const { writeFile, mkdir } = fsPromises; @@ -79,22 +78,6 @@ export const toPascalCase = (source: string): string => { export const normalizeKnownAllCaps = (source: string): string => source.replace('API', 'Api').replace('GRPC', 'Grpc').replace('HTTP', 'Http').replace('OAuth2', 'Oauth2'); -/** - * Get the exported declarations of the provided TypeScript code - * @param tsSource The TypeScript code to parse - * @returns An array containing the name of the exported declarations - */ -export const getExportedDeclarations = (tsSource: string): ReadonlyMap => { - const project = new Project({ - useInMemoryFileSystem: true, - manipulationSettings: { - quoteKind: QuoteKind.Single, - }, - }); - const sourceFile = project.createSourceFile('declarations.ts', tsSource); - return sourceFile.getExportedDeclarations(); -}; - /** Schemas directory */ export const schemaDir = path.resolve(process.cwd(), 'src/lib/generated/schema'); /** Definitions directory */ From 84901efa0b797c695bc0d370312de024e3e7a6ca Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Tue, 30 Jul 2024 13:34:47 +0200 Subject: [PATCH 10/24] Introduced lifecycle hooks Signed-off-by: Jean-Baptiste Bianchi --- src/lib/builder.ts | 67 ++++++++++++++++--- .../authentication-policy-basic-builder.ts | 17 +++-- .../authentication-policy-bearer-builder.ts | 17 +++-- .../builders/authentication-policy-builder.ts | 17 +++-- .../authentication-policy-oauth2-builder.ts | 17 +++-- ...entication-policy-oauth2-client-builder.ts | 13 ++-- .../builders/call-async-api-builder.ts | 14 ++-- ...l-async-api-with-authentication-builder.ts | 17 +++-- .../builders/call-async-api-with-builder.ts | 14 ++-- .../builders/call-function-builder.ts | 14 ++-- .../builders/call-function-with-builder.ts | 14 ++-- .../generated/builders/call-grpc-builder.ts | 14 ++-- .../call-grpc-with-arguments-builder.ts | 17 +++-- .../builders/call-grpc-with-builder.ts | 14 ++-- ...rpc-with-service-authentication-builder.ts | 13 ++-- .../call-grpc-with-service-builder.ts | 17 +++-- .../generated/builders/call-http-builder.ts | 14 ++-- .../builders/call-http-with-builder.ts | 14 ++-- .../call-http-with-endpoint-builder.ts | 17 +++-- .../builders/call-open-api-builder.ts | 14 ++-- ...ll-open-api-with-authentication-builder.ts | 17 +++-- .../builders/call-open-api-with-builder.ts | 14 ++-- .../call-open-api-with-parameters-builder.ts | 17 +++-- .../generated/builders/call-task-builder.ts | 14 ++-- src/lib/generated/builders/do-task-builder.ts | 14 ++-- .../generated/builders/document-builder.ts | 14 ++-- .../builders/document-tags-builder.ts | 14 ++-- .../generated/builders/duration-builder.ts | 14 ++-- .../generated/builders/emit-task-builder.ts | 14 ++-- .../builders/emit-task-emit-builder.ts | 14 ++-- .../builders/emit-task-emit-event-builder.ts | 14 ++-- .../endpoint-authentication-builder.ts | 17 +++-- .../generated/builders/endpoint-builder.ts | 14 ++-- src/lib/generated/builders/error-builder.ts | 14 ++-- .../event-consumption-strategy-all-builder.ts | 17 +++-- .../event-consumption-strategy-any-builder.ts | 17 +++-- .../event-consumption-strategy-builder.ts | 17 +++-- .../builders/event-filter-builder.ts | 14 ++-- .../event-filter-correlate-builder.ts | 17 +++-- .../builders/event-filter-with-builder.ts | 14 ++-- src/lib/generated/builders/export-builder.ts | 14 ++-- .../generated/builders/extension-builder.ts | 14 ++-- ...xternal-resource-authentication-builder.ts | 17 +++-- .../builders/external-resource-builder.ts | 14 ++-- .../builders/flow-directive-builder.ts | 14 ++-- .../generated/builders/for-task-builder.ts | 14 ++-- .../builders/for-task-for-builder.ts | 14 ++-- .../generated/builders/fork-task-builder.ts | 14 ++-- .../builders/fork-task-fork-builder.ts | 14 ++-- src/lib/generated/builders/input-builder.ts | 14 ++-- .../generated/builders/listen-task-builder.ts | 14 ++-- .../builders/listen-task-listen-builder.ts | 14 ++-- .../builders/oauth2-token-builder.ts | 14 ++-- src/lib/generated/builders/output-builder.ts | 14 ++-- .../generated/builders/raise-task-builder.ts | 14 ++-- .../builders/raise-task-raise-builder.ts | 14 ++-- .../builders/retry-policy-backoff-builder.ts | 14 ++-- .../builders/retry-policy-builder.ts | 14 ++-- .../builders/retry-policy-jitter-builder.ts | 14 ++-- .../retry-policy-limit-attempt-builder.ts | 17 +++-- .../builders/retry-policy-limit-builder.ts | 14 ++-- .../generated/builders/run-task-builder.ts | 14 ++-- .../builders/run-task-run-builder.ts | 14 ++-- .../run-task-run-container-builder.ts | 17 +++-- .../builders/run-task-run-script-builder.ts | 14 ++-- .../run-task-run-shell-arguments-builder.ts | 17 +++-- .../builders/run-task-run-shell-builder.ts | 14 ++-- .../run-task-run-shell-environment-builder.ts | 17 +++-- .../builders/run-task-run-workflow-builder.ts | 14 ++-- .../run-task-run-workflow-input-builder.ts | 17 +++-- .../generated/builders/schedule-builder.ts | 14 ++-- src/lib/generated/builders/schema-builder.ts | 14 ++-- .../generated/builders/set-task-builder.ts | 14 ++-- .../builders/set-task-set-builder.ts | 14 ++-- .../generated/builders/switch-task-builder.ts | 14 ++-- .../builders/switch-task-switch-builder.ts | 14 ++-- .../switch-task-switch-case-builder.ts | 17 +++-- .../generated/builders/task-base-builder.ts | 14 ++-- src/lib/generated/builders/task-builder.ts | 14 ++-- .../generated/builders/task-list-builder.ts | 14 ++-- src/lib/generated/builders/timeout-builder.ts | 14 ++-- .../generated/builders/try-task-builder.ts | 14 ++-- .../builders/try-task-catch-builder.ts | 14 ++-- .../builders/use-authentications-builder.ts | 14 ++-- src/lib/generated/builders/use-builder.ts | 14 ++-- .../generated/builders/use-errors-builder.ts | 14 ++-- .../builders/use-extensions-builder.ts | 14 ++-- .../builders/use-functions-builder.ts | 14 ++-- .../generated/builders/use-retries-builder.ts | 14 ++-- .../generated/builders/wait-task-builder.ts | 14 ++-- .../generated/builders/workflow-builder.ts | 14 ++-- .../classes/authentication-policy-basic.ts | 20 +++++- .../classes/authentication-policy-bearer.ts | 20 +++++- .../authentication-policy-oauth2-client.ts | 20 +++++- .../classes/authentication-policy-oauth2.ts | 21 +++++- .../classes/authentication-policy.ts | 19 +++++- .../call-async-api-with-authentication.ts | 21 +++++- .../generated/classes/call-async-api-with.ts | 18 ++++- src/lib/generated/classes/call-async-api.ts | 19 +++++- .../generated/classes/call-function-with.ts | 18 ++++- src/lib/generated/classes/call-function.ts | 19 +++++- .../classes/call-grpc-with-arguments.ts | 18 ++++- .../call-grpc-with-service-authentication.ts | 21 +++++- .../classes/call-grpc-with-service.ts | 18 ++++- src/lib/generated/classes/call-grpc-with.ts | 19 +++++- src/lib/generated/classes/call-grpc.ts | 19 +++++- .../classes/call-http-with-endpoint.ts | 18 ++++- src/lib/generated/classes/call-http-with.ts | 19 +++++- src/lib/generated/classes/call-http.ts | 19 +++++- .../call-open-api-with-authentication.ts | 21 +++++- .../classes/call-open-api-with-parameters.ts | 20 +++++- .../generated/classes/call-open-api-with.ts | 19 +++++- src/lib/generated/classes/call-open-api.ts | 19 +++++- src/lib/generated/classes/call-task.ts | 19 +++++- src/lib/generated/classes/do-task.ts | 19 +++++- src/lib/generated/classes/document-tags.ts | 18 ++++- src/lib/generated/classes/document.ts | 19 +++++- src/lib/generated/classes/duration.ts | 18 ++++- .../generated/classes/emit-task-emit-event.ts | 18 ++++- src/lib/generated/classes/emit-task-emit.ts | 19 +++++- src/lib/generated/classes/emit-task.ts | 19 +++++- .../classes/endpoint-authentication.ts | 21 +++++- src/lib/generated/classes/endpoint.ts | 18 ++++- src/lib/generated/classes/error.ts | 18 ++++- .../classes/event-consumption-strategy-all.ts | 16 +++++ .../classes/event-consumption-strategy-any.ts | 16 +++++ .../classes/event-consumption-strategy.ts | 21 +++++- .../classes/event-filter-correlate.ts | 18 ++++- .../generated/classes/event-filter-with.ts | 18 ++++- src/lib/generated/classes/event-filter.ts | 19 +++++- src/lib/generated/classes/export.ts | 18 ++++- src/lib/generated/classes/extension.ts | 19 +++++- .../external-resource-authentication.ts | 21 +++++- .../generated/classes/external-resource.ts | 18 ++++- src/lib/generated/classes/flow-directive.ts | 18 ++++- src/lib/generated/classes/for-task-for.ts | 18 ++++- src/lib/generated/classes/for-task.ts | 19 +++++- src/lib/generated/classes/fork-task-fork.ts | 19 +++++- src/lib/generated/classes/fork-task.ts | 19 +++++- src/lib/generated/classes/input.ts | 18 ++++- .../generated/classes/listen-task-listen.ts | 18 ++++- src/lib/generated/classes/listen-task.ts | 19 +++++- src/lib/generated/classes/oauth2-token.ts | 18 ++++- src/lib/generated/classes/output.ts | 18 ++++- src/lib/generated/classes/raise-task-raise.ts | 19 +++++- src/lib/generated/classes/raise-task.ts | 19 +++++- .../generated/classes/retry-policy-backoff.ts | 18 ++++- .../generated/classes/retry-policy-jitter.ts | 19 +++++- .../classes/retry-policy-limit-attempt.ts | 21 +++++- .../generated/classes/retry-policy-limit.ts | 19 +++++- src/lib/generated/classes/retry-policy.ts | 19 +++++- .../classes/run-task-run-container.ts | 18 ++++- .../generated/classes/run-task-run-script.ts | 18 ++++- .../classes/run-task-run-shell-arguments.ts | 20 +++++- .../classes/run-task-run-shell-environment.ts | 20 +++++- .../generated/classes/run-task-run-shell.ts | 19 +++++- .../classes/run-task-run-workflow-input.ts | 20 +++++- .../classes/run-task-run-workflow.ts | 19 +++++- src/lib/generated/classes/run-task-run.ts | 19 +++++- src/lib/generated/classes/run-task.ts | 19 +++++- src/lib/generated/classes/schedule.ts | 19 +++++- src/lib/generated/classes/schema.ts | 18 ++++- src/lib/generated/classes/set-task-set.ts | 18 ++++- src/lib/generated/classes/set-task.ts | 19 +++++- .../classes/switch-task-switch-case.ts | 18 ++++- .../generated/classes/switch-task-switch.ts | 16 +++++ src/lib/generated/classes/switch-task.ts | 21 +++++- src/lib/generated/classes/task-base.ts | 19 +++++- src/lib/generated/classes/task-list.ts | 16 +++++ src/lib/generated/classes/task.ts | 21 +++++- src/lib/generated/classes/timeout.ts | 19 +++++- src/lib/generated/classes/try-task-catch.ts | 19 +++++- src/lib/generated/classes/try-task.ts | 19 +++++- .../generated/classes/use-authentications.ts | 18 ++++- src/lib/generated/classes/use-errors.ts | 19 +++++- src/lib/generated/classes/use-extensions.ts | 16 +++++ src/lib/generated/classes/use-functions.ts | 19 +++++- src/lib/generated/classes/use-retries.ts | 19 +++++- src/lib/generated/classes/use.ts | 19 +++++- src/lib/generated/classes/wait-task.ts | 19 +++++- src/lib/generated/classes/workflow.ts | 19 +++++- src/lib/hydrator.ts | 21 +++++- src/lib/lifecycle-hooks.ts | 57 ++++++++++++++++ src/lib/utils.ts | 17 +++++ src/lib/validation.ts | 23 ++++++- tests/builders/call-http-builder.spec.ts | 18 ++++- tests/builders/use-extensions-builder.spec.ts | 18 ++++- tests/classes/use-extensions.spec.ts | 16 +++++ tests/classes/workflow.spec.ts | 16 +++++ tests/validation/workflow-validation.spec.ts | 16 +++++ tools/4_generate-classes.ts | 56 ++++++++++++---- tools/5_generate-builders.ts | 39 +++++------ tools/README.md | 67 ++++++++++++++----- tools/reflection.ts | 2 +- 194 files changed, 2619 insertions(+), 833 deletions(-) create mode 100644 src/lib/lifecycle-hooks.ts diff --git a/src/lib/builder.ts b/src/lib/builder.ts index e0da7102..6f76c2e5 100644 --- a/src/lib/builder.ts +++ b/src/lib/builder.ts @@ -15,11 +15,35 @@ * */ +/** + * Represents the options passed to the `build()` method + */ +export type BuildOptions = { + /** + * Default true + */ + validate?: boolean; + /** + * Default true + */ + normalize?: boolean; +}; + +/** + * The type of the underlying function called on `build()` for objects + */ +export type BuildingFunction = (model: Partial, options: BuildOptions) => T; + +/** + * The type of the underlying function called on `build()` for arrays + */ +export type ArrayBuildingFunction = (model: Array, options: BuildOptions) => Array; + /** * Represents a fluent builder proxy for an object */ export type Builder = { - build: (validate?: boolean) => T; + build: (option?: BuildOptions) => T; } & { [K in keyof T]-?: (arg: T[K]) => Builder; }; @@ -29,15 +53,23 @@ export type Builder = { */ export type ArrayBuilder = { push: (item: T) => ArrayBuilder; - build: (validate?: boolean) => Array; + build: (option?: BuildOptions) => Array; }; /** * The default function used to build an object, basically just return the provided object * @param model The object to "build" + * @param options The build options * @returns */ -function defaultBuildingFn(model: Partial): T { +function defaultBuildingFn(model: Partial, options: BuildOptions): T { + // prevents @typescript-eslint/no-unused-vars ... + if (options.validate == null) { + options.validate = true; + } + if (options.normalize == null) { + options.normalize = true; + } return model as T; } @@ -46,14 +78,20 @@ function defaultBuildingFn(model: Partial): T { * @param buildingFn The function used to validate and produce the object on build() * @returns A fluent builder */ -export function builder( - model: Partial = {}, - buildingFn: (data: Partial) => T = defaultBuildingFn, -): Builder { +export function builder(model: Partial = {}, buildingFn: BuildingFunction = defaultBuildingFn): Builder { const proxy = new Proxy({} as Builder, { get: (_, prop) => { if (prop === 'build') { - return (validate: boolean = true) => (validate ? buildingFn(model) : model); + return (options?: BuildOptions) => { + options = options || ({} as BuildOptions); + if (options.validate == null) { + options.validate = true; + } + if (options.normalize == null) { + options.normalize = true; + } + return buildingFn(model, options); + }; } return (value: unknown): Builder => { (model as any)[prop.toString()] = value; @@ -74,7 +112,7 @@ export function builder( */ export function arrayBuilder( model: Array = [], - buildingFn: (data: Array) => Array = defaultBuildingFn, + buildingFn: ArrayBuildingFunction = defaultBuildingFn, ): ArrayBuilder { if (model != null && !Array.isArray(model)) { throw new Error(`The provided model should be an array`); @@ -82,7 +120,16 @@ export function arrayBuilder( const proxy = new Proxy({} as ArrayBuilder, { get: (_, prop) => { if (prop === 'build') { - return (validate: boolean = true) => (validate ? buildingFn(model) : model); + return (options?: BuildOptions) => { + options = options || ({} as BuildOptions); + if (options.validate == null) { + options.validate = true; + } + if (options.normalize == null) { + options.normalize = true; + } + return buildingFn(model, options); + }; } if (prop === 'push') { return (value: T): ArrayBuilder => { diff --git a/src/lib/generated/builders/authentication-policy-basic-builder.ts b/src/lib/generated/builders/authentication-policy-basic-builder.ts index 644f1650..ddcfa8ca 100644 --- a/src/lib/generated/builders/authentication-policy-basic-builder.ts +++ b/src/lib/generated/builders/authentication-policy-basic-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.AuthenticationPolicyBasic} model The underlying object - * @returns {Specification.AuthenticationPolicyBasic} The validated underlying object + * @param {Specification.AuthenticationPolicyBasic} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.AuthenticationPolicyBasic} The built object */ -function buildingFn(model: Specification.AuthenticationPolicyBasic): Specification.AuthenticationPolicyBasic { +function buildingFn( + model: Specification.AuthenticationPolicyBasic, + options: BuildOptions, +): Specification.AuthenticationPolicyBasic { const instance = new Classes.AuthenticationPolicyBasic(model); - validate('AuthenticationPolicyBasic', instance); - return instance as Specification.AuthenticationPolicyBasic; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.AuthenticationPolicyBasic; } /** diff --git a/src/lib/generated/builders/authentication-policy-bearer-builder.ts b/src/lib/generated/builders/authentication-policy-bearer-builder.ts index 25b9850a..dc70fef4 100644 --- a/src/lib/generated/builders/authentication-policy-bearer-builder.ts +++ b/src/lib/generated/builders/authentication-policy-bearer-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.AuthenticationPolicyBearer} model The underlying object - * @returns {Specification.AuthenticationPolicyBearer} The validated underlying object + * @param {Specification.AuthenticationPolicyBearer} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.AuthenticationPolicyBearer} The built object */ -function buildingFn(model: Specification.AuthenticationPolicyBearer): Specification.AuthenticationPolicyBearer { +function buildingFn( + model: Specification.AuthenticationPolicyBearer, + options: BuildOptions, +): Specification.AuthenticationPolicyBearer { const instance = new Classes.AuthenticationPolicyBearer(model); - validate('AuthenticationPolicyBearer', instance); - return instance as Specification.AuthenticationPolicyBearer; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.AuthenticationPolicyBearer; } /** diff --git a/src/lib/generated/builders/authentication-policy-builder.ts b/src/lib/generated/builders/authentication-policy-builder.ts index 894d0e6f..05f39211 100644 --- a/src/lib/generated/builders/authentication-policy-builder.ts +++ b/src/lib/generated/builders/authentication-policy-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.AuthenticationPolicy} model The underlying object - * @returns {Specification.AuthenticationPolicy} The validated underlying object + * @param {Specification.AuthenticationPolicy} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.AuthenticationPolicy} The built object */ -function buildingFn(model: Specification.AuthenticationPolicy): Specification.AuthenticationPolicy { +function buildingFn( + model: Specification.AuthenticationPolicy, + options: BuildOptions, +): Specification.AuthenticationPolicy { const instance = new Classes.AuthenticationPolicy(model); - validate('AuthenticationPolicy', instance); - return instance as Specification.AuthenticationPolicy; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.AuthenticationPolicy; } /** diff --git a/src/lib/generated/builders/authentication-policy-oauth2-builder.ts b/src/lib/generated/builders/authentication-policy-oauth2-builder.ts index f1e038e9..54141c9a 100644 --- a/src/lib/generated/builders/authentication-policy-oauth2-builder.ts +++ b/src/lib/generated/builders/authentication-policy-oauth2-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.AuthenticationPolicyOauth2} model The underlying object - * @returns {Specification.AuthenticationPolicyOauth2} The validated underlying object + * @param {Specification.AuthenticationPolicyOauth2} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.AuthenticationPolicyOauth2} The built object */ -function buildingFn(model: Specification.AuthenticationPolicyOauth2): Specification.AuthenticationPolicyOauth2 { +function buildingFn( + model: Specification.AuthenticationPolicyOauth2, + options: BuildOptions, +): Specification.AuthenticationPolicyOauth2 { const instance = new Classes.AuthenticationPolicyOauth2(model); - validate('AuthenticationPolicyOauth2', instance); - return instance as Specification.AuthenticationPolicyOauth2; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.AuthenticationPolicyOauth2; } /** diff --git a/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts b/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts index e471dd8e..e1ae989b 100644 --- a/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts +++ b/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts @@ -20,22 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.AuthenticationPolicyOauth2Client} model The underlying object - * @returns {Specification.AuthenticationPolicyOauth2Client} The validated underlying object + * @param {Specification.AuthenticationPolicyOauth2Client} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.AuthenticationPolicyOauth2Client} The built object */ function buildingFn( model: Specification.AuthenticationPolicyOauth2Client, + options: BuildOptions, ): Specification.AuthenticationPolicyOauth2Client { const instance = new Classes.AuthenticationPolicyOauth2Client(model); - validate('AuthenticationPolicyOauth2Client', instance); - return instance as Specification.AuthenticationPolicyOauth2Client; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.AuthenticationPolicyOauth2Client; } /** diff --git a/src/lib/generated/builders/call-async-api-builder.ts b/src/lib/generated/builders/call-async-api-builder.ts index afb55703..dc2ff206 100644 --- a/src/lib/generated/builders/call-async-api-builder.ts +++ b/src/lib/generated/builders/call-async-api-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallAsyncAPI} model The underlying object - * @returns {Specification.CallAsyncAPI} The validated underlying object + * @param {Specification.CallAsyncAPI} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CallAsyncAPI} The built object */ -function buildingFn(model: Specification.CallAsyncAPI): Specification.CallAsyncAPI { +function buildingFn(model: Specification.CallAsyncAPI, options: BuildOptions): Specification.CallAsyncAPI { const instance = new Classes.CallAsyncAPI(model); - validate('CallAsyncAPI', instance); - return instance as Specification.CallAsyncAPI; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CallAsyncAPI; } /** diff --git a/src/lib/generated/builders/call-async-api-with-authentication-builder.ts b/src/lib/generated/builders/call-async-api-with-authentication-builder.ts index 18b520ea..81ddc798 100644 --- a/src/lib/generated/builders/call-async-api-with-authentication-builder.ts +++ b/src/lib/generated/builders/call-async-api-with-authentication-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallAsyncAPIWithAuthentication} model The underlying object - * @returns {Specification.CallAsyncAPIWithAuthentication} The validated underlying object + * @param {Specification.CallAsyncAPIWithAuthentication} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CallAsyncAPIWithAuthentication} The built object */ -function buildingFn(model: Specification.CallAsyncAPIWithAuthentication): Specification.CallAsyncAPIWithAuthentication { +function buildingFn( + model: Specification.CallAsyncAPIWithAuthentication, + options: BuildOptions, +): Specification.CallAsyncAPIWithAuthentication { const instance = new Classes.CallAsyncAPIWithAuthentication(model); - validate('CallAsyncAPIWithAuthentication', instance); - return instance as Specification.CallAsyncAPIWithAuthentication; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CallAsyncAPIWithAuthentication; } /** diff --git a/src/lib/generated/builders/call-async-api-with-builder.ts b/src/lib/generated/builders/call-async-api-with-builder.ts index 41a52f50..569333b4 100644 --- a/src/lib/generated/builders/call-async-api-with-builder.ts +++ b/src/lib/generated/builders/call-async-api-with-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallAsyncAPIWith} model The underlying object - * @returns {Specification.CallAsyncAPIWith} The validated underlying object + * @param {Specification.CallAsyncAPIWith} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CallAsyncAPIWith} The built object */ -function buildingFn(model: Specification.CallAsyncAPIWith): Specification.CallAsyncAPIWith { +function buildingFn(model: Specification.CallAsyncAPIWith, options: BuildOptions): Specification.CallAsyncAPIWith { const instance = new Classes.CallAsyncAPIWith(model); - validate('CallAsyncAPIWith', instance); - return instance as Specification.CallAsyncAPIWith; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CallAsyncAPIWith; } /** diff --git a/src/lib/generated/builders/call-function-builder.ts b/src/lib/generated/builders/call-function-builder.ts index f0f21caf..bb0ad100 100644 --- a/src/lib/generated/builders/call-function-builder.ts +++ b/src/lib/generated/builders/call-function-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallFunction} model The underlying object - * @returns {Specification.CallFunction} The validated underlying object + * @param {Specification.CallFunction} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CallFunction} The built object */ -function buildingFn(model: Specification.CallFunction): Specification.CallFunction { +function buildingFn(model: Specification.CallFunction, options: BuildOptions): Specification.CallFunction { const instance = new Classes.CallFunction(model); - validate('CallFunction', instance); - return instance as Specification.CallFunction; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CallFunction; } /** diff --git a/src/lib/generated/builders/call-function-with-builder.ts b/src/lib/generated/builders/call-function-with-builder.ts index 002e021a..ea39a9cd 100644 --- a/src/lib/generated/builders/call-function-with-builder.ts +++ b/src/lib/generated/builders/call-function-with-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallFunctionWith} model The underlying object - * @returns {Specification.CallFunctionWith} The validated underlying object + * @param {Specification.CallFunctionWith} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CallFunctionWith} The built object */ -function buildingFn(model: Specification.CallFunctionWith): Specification.CallFunctionWith { +function buildingFn(model: Specification.CallFunctionWith, options: BuildOptions): Specification.CallFunctionWith { const instance = new Classes.CallFunctionWith(model); - validate('CallFunctionWith', instance); - return instance as Specification.CallFunctionWith; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CallFunctionWith; } /** diff --git a/src/lib/generated/builders/call-grpc-builder.ts b/src/lib/generated/builders/call-grpc-builder.ts index 2748e628..adb6429e 100644 --- a/src/lib/generated/builders/call-grpc-builder.ts +++ b/src/lib/generated/builders/call-grpc-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallGRPC} model The underlying object - * @returns {Specification.CallGRPC} The validated underlying object + * @param {Specification.CallGRPC} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CallGRPC} The built object */ -function buildingFn(model: Specification.CallGRPC): Specification.CallGRPC { +function buildingFn(model: Specification.CallGRPC, options: BuildOptions): Specification.CallGRPC { const instance = new Classes.CallGRPC(model); - validate('CallGRPC', instance); - return instance as Specification.CallGRPC; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CallGRPC; } /** diff --git a/src/lib/generated/builders/call-grpc-with-arguments-builder.ts b/src/lib/generated/builders/call-grpc-with-arguments-builder.ts index 4c1f02f7..563ceef4 100644 --- a/src/lib/generated/builders/call-grpc-with-arguments-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-arguments-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallGRPCWithArguments} model The underlying object - * @returns {Specification.CallGRPCWithArguments} The validated underlying object + * @param {Specification.CallGRPCWithArguments} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CallGRPCWithArguments} The built object */ -function buildingFn(model: Specification.CallGRPCWithArguments): Specification.CallGRPCWithArguments { +function buildingFn( + model: Specification.CallGRPCWithArguments, + options: BuildOptions, +): Specification.CallGRPCWithArguments { const instance = new Classes.CallGRPCWithArguments(model); - validate('CallGRPCWithArguments', instance); - return instance as Specification.CallGRPCWithArguments; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CallGRPCWithArguments; } /** diff --git a/src/lib/generated/builders/call-grpc-with-builder.ts b/src/lib/generated/builders/call-grpc-with-builder.ts index 8a9506ce..001b91e2 100644 --- a/src/lib/generated/builders/call-grpc-with-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallGRPCWith} model The underlying object - * @returns {Specification.CallGRPCWith} The validated underlying object + * @param {Specification.CallGRPCWith} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CallGRPCWith} The built object */ -function buildingFn(model: Specification.CallGRPCWith): Specification.CallGRPCWith { +function buildingFn(model: Specification.CallGRPCWith, options: BuildOptions): Specification.CallGRPCWith { const instance = new Classes.CallGRPCWith(model); - validate('CallGRPCWith', instance); - return instance as Specification.CallGRPCWith; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CallGRPCWith; } /** diff --git a/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts b/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts index b99e3e13..d69b90a2 100644 --- a/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts @@ -20,22 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallGRPCWithServiceAuthentication} model The underlying object - * @returns {Specification.CallGRPCWithServiceAuthentication} The validated underlying object + * @param {Specification.CallGRPCWithServiceAuthentication} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CallGRPCWithServiceAuthentication} The built object */ function buildingFn( model: Specification.CallGRPCWithServiceAuthentication, + options: BuildOptions, ): Specification.CallGRPCWithServiceAuthentication { const instance = new Classes.CallGRPCWithServiceAuthentication(model); - validate('CallGRPCWithServiceAuthentication', instance); - return instance as Specification.CallGRPCWithServiceAuthentication; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CallGRPCWithServiceAuthentication; } /** diff --git a/src/lib/generated/builders/call-grpc-with-service-builder.ts b/src/lib/generated/builders/call-grpc-with-service-builder.ts index c5fd4a24..80b02313 100644 --- a/src/lib/generated/builders/call-grpc-with-service-builder.ts +++ b/src/lib/generated/builders/call-grpc-with-service-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallGRPCWithService} model The underlying object - * @returns {Specification.CallGRPCWithService} The validated underlying object + * @param {Specification.CallGRPCWithService} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CallGRPCWithService} The built object */ -function buildingFn(model: Specification.CallGRPCWithService): Specification.CallGRPCWithService { +function buildingFn( + model: Specification.CallGRPCWithService, + options: BuildOptions, +): Specification.CallGRPCWithService { const instance = new Classes.CallGRPCWithService(model); - validate('CallGRPCWithService', instance); - return instance as Specification.CallGRPCWithService; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CallGRPCWithService; } /** diff --git a/src/lib/generated/builders/call-http-builder.ts b/src/lib/generated/builders/call-http-builder.ts index 0c93e5b6..c58200b9 100644 --- a/src/lib/generated/builders/call-http-builder.ts +++ b/src/lib/generated/builders/call-http-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallHTTP} model The underlying object - * @returns {Specification.CallHTTP} The validated underlying object + * @param {Specification.CallHTTP} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CallHTTP} The built object */ -function buildingFn(model: Specification.CallHTTP): Specification.CallHTTP { +function buildingFn(model: Specification.CallHTTP, options: BuildOptions): Specification.CallHTTP { const instance = new Classes.CallHTTP(model); - validate('CallHTTP', instance); - return instance as Specification.CallHTTP; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CallHTTP; } /** diff --git a/src/lib/generated/builders/call-http-with-builder.ts b/src/lib/generated/builders/call-http-with-builder.ts index 3b7e616c..9a6889e9 100644 --- a/src/lib/generated/builders/call-http-with-builder.ts +++ b/src/lib/generated/builders/call-http-with-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallHTTPWith} model The underlying object - * @returns {Specification.CallHTTPWith} The validated underlying object + * @param {Specification.CallHTTPWith} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CallHTTPWith} The built object */ -function buildingFn(model: Specification.CallHTTPWith): Specification.CallHTTPWith { +function buildingFn(model: Specification.CallHTTPWith, options: BuildOptions): Specification.CallHTTPWith { const instance = new Classes.CallHTTPWith(model); - validate('CallHTTPWith', instance); - return instance as Specification.CallHTTPWith; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CallHTTPWith; } /** diff --git a/src/lib/generated/builders/call-http-with-endpoint-builder.ts b/src/lib/generated/builders/call-http-with-endpoint-builder.ts index 88690140..bb0433f5 100644 --- a/src/lib/generated/builders/call-http-with-endpoint-builder.ts +++ b/src/lib/generated/builders/call-http-with-endpoint-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallHTTPWithEndpoint} model The underlying object - * @returns {Specification.CallHTTPWithEndpoint} The validated underlying object + * @param {Specification.CallHTTPWithEndpoint} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CallHTTPWithEndpoint} The built object */ -function buildingFn(model: Specification.CallHTTPWithEndpoint): Specification.CallHTTPWithEndpoint { +function buildingFn( + model: Specification.CallHTTPWithEndpoint, + options: BuildOptions, +): Specification.CallHTTPWithEndpoint { const instance = new Classes.CallHTTPWithEndpoint(model); - validate('CallHTTPWithEndpoint', instance); - return instance as Specification.CallHTTPWithEndpoint; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CallHTTPWithEndpoint; } /** diff --git a/src/lib/generated/builders/call-open-api-builder.ts b/src/lib/generated/builders/call-open-api-builder.ts index 0a216404..79aca1fb 100644 --- a/src/lib/generated/builders/call-open-api-builder.ts +++ b/src/lib/generated/builders/call-open-api-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallOpenAPI} model The underlying object - * @returns {Specification.CallOpenAPI} The validated underlying object + * @param {Specification.CallOpenAPI} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CallOpenAPI} The built object */ -function buildingFn(model: Specification.CallOpenAPI): Specification.CallOpenAPI { +function buildingFn(model: Specification.CallOpenAPI, options: BuildOptions): Specification.CallOpenAPI { const instance = new Classes.CallOpenAPI(model); - validate('CallOpenAPI', instance); - return instance as Specification.CallOpenAPI; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CallOpenAPI; } /** diff --git a/src/lib/generated/builders/call-open-api-with-authentication-builder.ts b/src/lib/generated/builders/call-open-api-with-authentication-builder.ts index de8c7adf..fe65a990 100644 --- a/src/lib/generated/builders/call-open-api-with-authentication-builder.ts +++ b/src/lib/generated/builders/call-open-api-with-authentication-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallOpenAPIWithAuthentication} model The underlying object - * @returns {Specification.CallOpenAPIWithAuthentication} The validated underlying object + * @param {Specification.CallOpenAPIWithAuthentication} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CallOpenAPIWithAuthentication} The built object */ -function buildingFn(model: Specification.CallOpenAPIWithAuthentication): Specification.CallOpenAPIWithAuthentication { +function buildingFn( + model: Specification.CallOpenAPIWithAuthentication, + options: BuildOptions, +): Specification.CallOpenAPIWithAuthentication { const instance = new Classes.CallOpenAPIWithAuthentication(model); - validate('CallOpenAPIWithAuthentication', instance); - return instance as Specification.CallOpenAPIWithAuthentication; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CallOpenAPIWithAuthentication; } /** diff --git a/src/lib/generated/builders/call-open-api-with-builder.ts b/src/lib/generated/builders/call-open-api-with-builder.ts index d198299a..7d2262fd 100644 --- a/src/lib/generated/builders/call-open-api-with-builder.ts +++ b/src/lib/generated/builders/call-open-api-with-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallOpenAPIWith} model The underlying object - * @returns {Specification.CallOpenAPIWith} The validated underlying object + * @param {Specification.CallOpenAPIWith} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CallOpenAPIWith} The built object */ -function buildingFn(model: Specification.CallOpenAPIWith): Specification.CallOpenAPIWith { +function buildingFn(model: Specification.CallOpenAPIWith, options: BuildOptions): Specification.CallOpenAPIWith { const instance = new Classes.CallOpenAPIWith(model); - validate('CallOpenAPIWith', instance); - return instance as Specification.CallOpenAPIWith; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CallOpenAPIWith; } /** diff --git a/src/lib/generated/builders/call-open-api-with-parameters-builder.ts b/src/lib/generated/builders/call-open-api-with-parameters-builder.ts index 909e50e9..099032db 100644 --- a/src/lib/generated/builders/call-open-api-with-parameters-builder.ts +++ b/src/lib/generated/builders/call-open-api-with-parameters-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallOpenAPIWithParameters} model The underlying object - * @returns {Specification.CallOpenAPIWithParameters} The validated underlying object + * @param {Specification.CallOpenAPIWithParameters} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CallOpenAPIWithParameters} The built object */ -function buildingFn(model: Specification.CallOpenAPIWithParameters): Specification.CallOpenAPIWithParameters { +function buildingFn( + model: Specification.CallOpenAPIWithParameters, + options: BuildOptions, +): Specification.CallOpenAPIWithParameters { const instance = new Classes.CallOpenAPIWithParameters(model); - validate('CallOpenAPIWithParameters', instance); - return instance as Specification.CallOpenAPIWithParameters; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CallOpenAPIWithParameters; } /** diff --git a/src/lib/generated/builders/call-task-builder.ts b/src/lib/generated/builders/call-task-builder.ts index 1a4ae758..675449cc 100644 --- a/src/lib/generated/builders/call-task-builder.ts +++ b/src/lib/generated/builders/call-task-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallTask} model The underlying object - * @returns {Specification.CallTask} The validated underlying object + * @param {Specification.CallTask} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CallTask} The built object */ -function buildingFn(model: Specification.CallTask): Specification.CallTask { +function buildingFn(model: Specification.CallTask, options: BuildOptions): Specification.CallTask { const instance = new Classes.CallTask(model); - validate('CallTask', instance); - return instance as Specification.CallTask; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CallTask; } /** diff --git a/src/lib/generated/builders/do-task-builder.ts b/src/lib/generated/builders/do-task-builder.ts index 0cfa0add..ad78338d 100644 --- a/src/lib/generated/builders/do-task-builder.ts +++ b/src/lib/generated/builders/do-task-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.DoTask} model The underlying object - * @returns {Specification.DoTask} The validated underlying object + * @param {Specification.DoTask} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.DoTask} The built object */ -function buildingFn(model: Specification.DoTask): Specification.DoTask { +function buildingFn(model: Specification.DoTask, options: BuildOptions): Specification.DoTask { const instance = new Classes.DoTask(model); - validate('DoTask', instance); - return instance as Specification.DoTask; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.DoTask; } /** diff --git a/src/lib/generated/builders/document-builder.ts b/src/lib/generated/builders/document-builder.ts index 22afba97..fc7119a6 100644 --- a/src/lib/generated/builders/document-builder.ts +++ b/src/lib/generated/builders/document-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Document} model The underlying object - * @returns {Specification.Document} The validated underlying object + * @param {Specification.Document} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.Document} The built object */ -function buildingFn(model: Specification.Document): Specification.Document { +function buildingFn(model: Specification.Document, options: BuildOptions): Specification.Document { const instance = new Classes.Document(model); - validate('Document', instance); - return instance as Specification.Document; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.Document; } /** diff --git a/src/lib/generated/builders/document-tags-builder.ts b/src/lib/generated/builders/document-tags-builder.ts index 415ba651..abbb8534 100644 --- a/src/lib/generated/builders/document-tags-builder.ts +++ b/src/lib/generated/builders/document-tags-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.DocumentTags} model The underlying object - * @returns {Specification.DocumentTags} The validated underlying object + * @param {Specification.DocumentTags} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.DocumentTags} The built object */ -function buildingFn(model: Specification.DocumentTags): Specification.DocumentTags { +function buildingFn(model: Specification.DocumentTags, options: BuildOptions): Specification.DocumentTags { const instance = new Classes.DocumentTags(model); - validate('DocumentTags', instance); - return instance as Specification.DocumentTags; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.DocumentTags; } /** diff --git a/src/lib/generated/builders/duration-builder.ts b/src/lib/generated/builders/duration-builder.ts index e9433820..a40a9483 100644 --- a/src/lib/generated/builders/duration-builder.ts +++ b/src/lib/generated/builders/duration-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Duration} model The underlying object - * @returns {Specification.Duration} The validated underlying object + * @param {Specification.Duration} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.Duration} The built object */ -function buildingFn(model: Specification.Duration): Specification.Duration { +function buildingFn(model: Specification.Duration, options: BuildOptions): Specification.Duration { const instance = new Classes.Duration(model); - validate('Duration', instance); - return instance as Specification.Duration; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.Duration; } /** diff --git a/src/lib/generated/builders/emit-task-builder.ts b/src/lib/generated/builders/emit-task-builder.ts index aeeb0e9f..4c2739b0 100644 --- a/src/lib/generated/builders/emit-task-builder.ts +++ b/src/lib/generated/builders/emit-task-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EmitTask} model The underlying object - * @returns {Specification.EmitTask} The validated underlying object + * @param {Specification.EmitTask} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.EmitTask} The built object */ -function buildingFn(model: Specification.EmitTask): Specification.EmitTask { +function buildingFn(model: Specification.EmitTask, options: BuildOptions): Specification.EmitTask { const instance = new Classes.EmitTask(model); - validate('EmitTask', instance); - return instance as Specification.EmitTask; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.EmitTask; } /** diff --git a/src/lib/generated/builders/emit-task-emit-builder.ts b/src/lib/generated/builders/emit-task-emit-builder.ts index fd656879..2217eab7 100644 --- a/src/lib/generated/builders/emit-task-emit-builder.ts +++ b/src/lib/generated/builders/emit-task-emit-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EmitTaskEmit} model The underlying object - * @returns {Specification.EmitTaskEmit} The validated underlying object + * @param {Specification.EmitTaskEmit} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.EmitTaskEmit} The built object */ -function buildingFn(model: Specification.EmitTaskEmit): Specification.EmitTaskEmit { +function buildingFn(model: Specification.EmitTaskEmit, options: BuildOptions): Specification.EmitTaskEmit { const instance = new Classes.EmitTaskEmit(model); - validate('EmitTaskEmit', instance); - return instance as Specification.EmitTaskEmit; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.EmitTaskEmit; } /** diff --git a/src/lib/generated/builders/emit-task-emit-event-builder.ts b/src/lib/generated/builders/emit-task-emit-event-builder.ts index 63240795..c5b21691 100644 --- a/src/lib/generated/builders/emit-task-emit-event-builder.ts +++ b/src/lib/generated/builders/emit-task-emit-event-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EmitTaskEmitEvent} model The underlying object - * @returns {Specification.EmitTaskEmitEvent} The validated underlying object + * @param {Specification.EmitTaskEmitEvent} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.EmitTaskEmitEvent} The built object */ -function buildingFn(model: Specification.EmitTaskEmitEvent): Specification.EmitTaskEmitEvent { +function buildingFn(model: Specification.EmitTaskEmitEvent, options: BuildOptions): Specification.EmitTaskEmitEvent { const instance = new Classes.EmitTaskEmitEvent(model); - validate('EmitTaskEmitEvent', instance); - return instance as Specification.EmitTaskEmitEvent; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.EmitTaskEmitEvent; } /** diff --git a/src/lib/generated/builders/endpoint-authentication-builder.ts b/src/lib/generated/builders/endpoint-authentication-builder.ts index 5d88de72..a356afbd 100644 --- a/src/lib/generated/builders/endpoint-authentication-builder.ts +++ b/src/lib/generated/builders/endpoint-authentication-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EndpointAuthentication} model The underlying object - * @returns {Specification.EndpointAuthentication} The validated underlying object + * @param {Specification.EndpointAuthentication} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.EndpointAuthentication} The built object */ -function buildingFn(model: Specification.EndpointAuthentication): Specification.EndpointAuthentication { +function buildingFn( + model: Specification.EndpointAuthentication, + options: BuildOptions, +): Specification.EndpointAuthentication { const instance = new Classes.EndpointAuthentication(model); - validate('EndpointAuthentication', instance); - return instance as Specification.EndpointAuthentication; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.EndpointAuthentication; } /** diff --git a/src/lib/generated/builders/endpoint-builder.ts b/src/lib/generated/builders/endpoint-builder.ts index 2923b24b..4fa97076 100644 --- a/src/lib/generated/builders/endpoint-builder.ts +++ b/src/lib/generated/builders/endpoint-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Endpoint} model The underlying object - * @returns {Specification.Endpoint} The validated underlying object + * @param {Specification.Endpoint} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.Endpoint} The built object */ -function buildingFn(model: Specification.Endpoint): Specification.Endpoint { +function buildingFn(model: Specification.Endpoint, options: BuildOptions): Specification.Endpoint { const instance = new Classes.Endpoint(model); - validate('Endpoint', instance); - return instance as Specification.Endpoint; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.Endpoint; } /** diff --git a/src/lib/generated/builders/error-builder.ts b/src/lib/generated/builders/error-builder.ts index 761dc2ca..f203b6c3 100644 --- a/src/lib/generated/builders/error-builder.ts +++ b/src/lib/generated/builders/error-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Error} model The underlying object - * @returns {Specification.Error} The validated underlying object + * @param {Specification.Error} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.Error} The built object */ -function buildingFn(model: Specification.Error): Specification.Error { +function buildingFn(model: Specification.Error, options: BuildOptions): Specification.Error { const instance = new Classes.Error(model); - validate('Error', instance); - return instance as Specification.Error; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.Error; } /** diff --git a/src/lib/generated/builders/event-consumption-strategy-all-builder.ts b/src/lib/generated/builders/event-consumption-strategy-all-builder.ts index 43de52ae..a3ba683c 100644 --- a/src/lib/generated/builders/event-consumption-strategy-all-builder.ts +++ b/src/lib/generated/builders/event-consumption-strategy-all-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { arrayBuilder, ArrayBuilder } from '../../builder'; -import { validate } from '../../validation'; +import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying array - * @param {Specification.EventConsumptionStrategyAll} model The underlying array - * @returns {Specification.EventConsumptionStrategyAll} The validated underlying array + * @param {Specification.EventConsumptionStrategyAll} model The proxied array + * @param {BuildOptions} options The build options to use + * @returns {Specification.EventConsumptionStrategyAll} The built array */ -function buildingFn(model: Specification.EventConsumptionStrategyAll): Specification.EventConsumptionStrategyAll { +function buildingFn( + model: Specification.EventConsumptionStrategyAll, + options: BuildOptions, +): Specification.EventConsumptionStrategyAll { const instance = new Classes.EventConsumptionStrategyAll(model); - validate('EventConsumptionStrategyAll', instance); - return instance as Specification.EventConsumptionStrategyAll; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.EventConsumptionStrategyAll; } /** diff --git a/src/lib/generated/builders/event-consumption-strategy-any-builder.ts b/src/lib/generated/builders/event-consumption-strategy-any-builder.ts index 78f52674..13fca0ad 100644 --- a/src/lib/generated/builders/event-consumption-strategy-any-builder.ts +++ b/src/lib/generated/builders/event-consumption-strategy-any-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { arrayBuilder, ArrayBuilder } from '../../builder'; -import { validate } from '../../validation'; +import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying array - * @param {Specification.EventConsumptionStrategyAny} model The underlying array - * @returns {Specification.EventConsumptionStrategyAny} The validated underlying array + * @param {Specification.EventConsumptionStrategyAny} model The proxied array + * @param {BuildOptions} options The build options to use + * @returns {Specification.EventConsumptionStrategyAny} The built array */ -function buildingFn(model: Specification.EventConsumptionStrategyAny): Specification.EventConsumptionStrategyAny { +function buildingFn( + model: Specification.EventConsumptionStrategyAny, + options: BuildOptions, +): Specification.EventConsumptionStrategyAny { const instance = new Classes.EventConsumptionStrategyAny(model); - validate('EventConsumptionStrategyAny', instance); - return instance as Specification.EventConsumptionStrategyAny; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.EventConsumptionStrategyAny; } /** diff --git a/src/lib/generated/builders/event-consumption-strategy-builder.ts b/src/lib/generated/builders/event-consumption-strategy-builder.ts index 68a69b2a..a783448a 100644 --- a/src/lib/generated/builders/event-consumption-strategy-builder.ts +++ b/src/lib/generated/builders/event-consumption-strategy-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EventConsumptionStrategy} model The underlying object - * @returns {Specification.EventConsumptionStrategy} The validated underlying object + * @param {Specification.EventConsumptionStrategy} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.EventConsumptionStrategy} The built object */ -function buildingFn(model: Specification.EventConsumptionStrategy): Specification.EventConsumptionStrategy { +function buildingFn( + model: Specification.EventConsumptionStrategy, + options: BuildOptions, +): Specification.EventConsumptionStrategy { const instance = new Classes.EventConsumptionStrategy(model); - validate('EventConsumptionStrategy', instance); - return instance as Specification.EventConsumptionStrategy; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.EventConsumptionStrategy; } /** diff --git a/src/lib/generated/builders/event-filter-builder.ts b/src/lib/generated/builders/event-filter-builder.ts index 592d8f86..e0f44403 100644 --- a/src/lib/generated/builders/event-filter-builder.ts +++ b/src/lib/generated/builders/event-filter-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EventFilter} model The underlying object - * @returns {Specification.EventFilter} The validated underlying object + * @param {Specification.EventFilter} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.EventFilter} The built object */ -function buildingFn(model: Specification.EventFilter): Specification.EventFilter { +function buildingFn(model: Specification.EventFilter, options: BuildOptions): Specification.EventFilter { const instance = new Classes.EventFilter(model); - validate('EventFilter', instance); - return instance as Specification.EventFilter; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.EventFilter; } /** diff --git a/src/lib/generated/builders/event-filter-correlate-builder.ts b/src/lib/generated/builders/event-filter-correlate-builder.ts index 41cdb2e6..422c9a9c 100644 --- a/src/lib/generated/builders/event-filter-correlate-builder.ts +++ b/src/lib/generated/builders/event-filter-correlate-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EventFilterCorrelate} model The underlying object - * @returns {Specification.EventFilterCorrelate} The validated underlying object + * @param {Specification.EventFilterCorrelate} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.EventFilterCorrelate} The built object */ -function buildingFn(model: Specification.EventFilterCorrelate): Specification.EventFilterCorrelate { +function buildingFn( + model: Specification.EventFilterCorrelate, + options: BuildOptions, +): Specification.EventFilterCorrelate { const instance = new Classes.EventFilterCorrelate(model); - validate('EventFilterCorrelate', instance); - return instance as Specification.EventFilterCorrelate; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.EventFilterCorrelate; } /** diff --git a/src/lib/generated/builders/event-filter-with-builder.ts b/src/lib/generated/builders/event-filter-with-builder.ts index bf9b18a0..19c10d96 100644 --- a/src/lib/generated/builders/event-filter-with-builder.ts +++ b/src/lib/generated/builders/event-filter-with-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EventFilterWith} model The underlying object - * @returns {Specification.EventFilterWith} The validated underlying object + * @param {Specification.EventFilterWith} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.EventFilterWith} The built object */ -function buildingFn(model: Specification.EventFilterWith): Specification.EventFilterWith { +function buildingFn(model: Specification.EventFilterWith, options: BuildOptions): Specification.EventFilterWith { const instance = new Classes.EventFilterWith(model); - validate('EventFilterWith', instance); - return instance as Specification.EventFilterWith; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.EventFilterWith; } /** diff --git a/src/lib/generated/builders/export-builder.ts b/src/lib/generated/builders/export-builder.ts index c7af3d03..dc828a61 100644 --- a/src/lib/generated/builders/export-builder.ts +++ b/src/lib/generated/builders/export-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Export} model The underlying object - * @returns {Specification.Export} The validated underlying object + * @param {Specification.Export} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.Export} The built object */ -function buildingFn(model: Specification.Export): Specification.Export { +function buildingFn(model: Specification.Export, options: BuildOptions): Specification.Export { const instance = new Classes.Export(model); - validate('Export', instance); - return instance as Specification.Export; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.Export; } /** diff --git a/src/lib/generated/builders/extension-builder.ts b/src/lib/generated/builders/extension-builder.ts index b4c2c86b..01e70963 100644 --- a/src/lib/generated/builders/extension-builder.ts +++ b/src/lib/generated/builders/extension-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Extension} model The underlying object - * @returns {Specification.Extension} The validated underlying object + * @param {Specification.Extension} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.Extension} The built object */ -function buildingFn(model: Specification.Extension): Specification.Extension { +function buildingFn(model: Specification.Extension, options: BuildOptions): Specification.Extension { const instance = new Classes.Extension(model); - validate('Extension', instance); - return instance as Specification.Extension; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.Extension; } /** diff --git a/src/lib/generated/builders/external-resource-authentication-builder.ts b/src/lib/generated/builders/external-resource-authentication-builder.ts index b2064bf9..2545d0f7 100644 --- a/src/lib/generated/builders/external-resource-authentication-builder.ts +++ b/src/lib/generated/builders/external-resource-authentication-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ExternalResourceAuthentication} model The underlying object - * @returns {Specification.ExternalResourceAuthentication} The validated underlying object + * @param {Specification.ExternalResourceAuthentication} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.ExternalResourceAuthentication} The built object */ -function buildingFn(model: Specification.ExternalResourceAuthentication): Specification.ExternalResourceAuthentication { +function buildingFn( + model: Specification.ExternalResourceAuthentication, + options: BuildOptions, +): Specification.ExternalResourceAuthentication { const instance = new Classes.ExternalResourceAuthentication(model); - validate('ExternalResourceAuthentication', instance); - return instance as Specification.ExternalResourceAuthentication; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.ExternalResourceAuthentication; } /** diff --git a/src/lib/generated/builders/external-resource-builder.ts b/src/lib/generated/builders/external-resource-builder.ts index 54e71a23..d60c2151 100644 --- a/src/lib/generated/builders/external-resource-builder.ts +++ b/src/lib/generated/builders/external-resource-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ExternalResource} model The underlying object - * @returns {Specification.ExternalResource} The validated underlying object + * @param {Specification.ExternalResource} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.ExternalResource} The built object */ -function buildingFn(model: Specification.ExternalResource): Specification.ExternalResource { +function buildingFn(model: Specification.ExternalResource, options: BuildOptions): Specification.ExternalResource { const instance = new Classes.ExternalResource(model); - validate('ExternalResource', instance); - return instance as Specification.ExternalResource; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.ExternalResource; } /** diff --git a/src/lib/generated/builders/flow-directive-builder.ts b/src/lib/generated/builders/flow-directive-builder.ts index 2551f570..13947c04 100644 --- a/src/lib/generated/builders/flow-directive-builder.ts +++ b/src/lib/generated/builders/flow-directive-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.FlowDirective} model The underlying object - * @returns {Specification.FlowDirective} The validated underlying object + * @param {Specification.FlowDirective} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.FlowDirective} The built object */ -function buildingFn(model: Specification.FlowDirective): Specification.FlowDirective { +function buildingFn(model: Specification.FlowDirective, options: BuildOptions): Specification.FlowDirective { const instance = new Classes.FlowDirective(model); - validate('FlowDirective', instance); - return instance as Specification.FlowDirective; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.FlowDirective; } /** diff --git a/src/lib/generated/builders/for-task-builder.ts b/src/lib/generated/builders/for-task-builder.ts index 27d083dc..bdd3db38 100644 --- a/src/lib/generated/builders/for-task-builder.ts +++ b/src/lib/generated/builders/for-task-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ForTask} model The underlying object - * @returns {Specification.ForTask} The validated underlying object + * @param {Specification.ForTask} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.ForTask} The built object */ -function buildingFn(model: Specification.ForTask): Specification.ForTask { +function buildingFn(model: Specification.ForTask, options: BuildOptions): Specification.ForTask { const instance = new Classes.ForTask(model); - validate('ForTask', instance); - return instance as Specification.ForTask; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.ForTask; } /** diff --git a/src/lib/generated/builders/for-task-for-builder.ts b/src/lib/generated/builders/for-task-for-builder.ts index f78a94f2..53b48436 100644 --- a/src/lib/generated/builders/for-task-for-builder.ts +++ b/src/lib/generated/builders/for-task-for-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ForTaskFor} model The underlying object - * @returns {Specification.ForTaskFor} The validated underlying object + * @param {Specification.ForTaskFor} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.ForTaskFor} The built object */ -function buildingFn(model: Specification.ForTaskFor): Specification.ForTaskFor { +function buildingFn(model: Specification.ForTaskFor, options: BuildOptions): Specification.ForTaskFor { const instance = new Classes.ForTaskFor(model); - validate('ForTaskFor', instance); - return instance as Specification.ForTaskFor; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.ForTaskFor; } /** diff --git a/src/lib/generated/builders/fork-task-builder.ts b/src/lib/generated/builders/fork-task-builder.ts index d9365f73..d772a3e3 100644 --- a/src/lib/generated/builders/fork-task-builder.ts +++ b/src/lib/generated/builders/fork-task-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ForkTask} model The underlying object - * @returns {Specification.ForkTask} The validated underlying object + * @param {Specification.ForkTask} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.ForkTask} The built object */ -function buildingFn(model: Specification.ForkTask): Specification.ForkTask { +function buildingFn(model: Specification.ForkTask, options: BuildOptions): Specification.ForkTask { const instance = new Classes.ForkTask(model); - validate('ForkTask', instance); - return instance as Specification.ForkTask; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.ForkTask; } /** diff --git a/src/lib/generated/builders/fork-task-fork-builder.ts b/src/lib/generated/builders/fork-task-fork-builder.ts index 7412e178..48bd6f05 100644 --- a/src/lib/generated/builders/fork-task-fork-builder.ts +++ b/src/lib/generated/builders/fork-task-fork-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ForkTaskFork} model The underlying object - * @returns {Specification.ForkTaskFork} The validated underlying object + * @param {Specification.ForkTaskFork} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.ForkTaskFork} The built object */ -function buildingFn(model: Specification.ForkTaskFork): Specification.ForkTaskFork { +function buildingFn(model: Specification.ForkTaskFork, options: BuildOptions): Specification.ForkTaskFork { const instance = new Classes.ForkTaskFork(model); - validate('ForkTaskFork', instance); - return instance as Specification.ForkTaskFork; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.ForkTaskFork; } /** diff --git a/src/lib/generated/builders/input-builder.ts b/src/lib/generated/builders/input-builder.ts index 343c8aed..15c68c82 100644 --- a/src/lib/generated/builders/input-builder.ts +++ b/src/lib/generated/builders/input-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Input} model The underlying object - * @returns {Specification.Input} The validated underlying object + * @param {Specification.Input} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.Input} The built object */ -function buildingFn(model: Specification.Input): Specification.Input { +function buildingFn(model: Specification.Input, options: BuildOptions): Specification.Input { const instance = new Classes.Input(model); - validate('Input', instance); - return instance as Specification.Input; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.Input; } /** diff --git a/src/lib/generated/builders/listen-task-builder.ts b/src/lib/generated/builders/listen-task-builder.ts index 6f98fba3..d1b3a320 100644 --- a/src/lib/generated/builders/listen-task-builder.ts +++ b/src/lib/generated/builders/listen-task-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ListenTask} model The underlying object - * @returns {Specification.ListenTask} The validated underlying object + * @param {Specification.ListenTask} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.ListenTask} The built object */ -function buildingFn(model: Specification.ListenTask): Specification.ListenTask { +function buildingFn(model: Specification.ListenTask, options: BuildOptions): Specification.ListenTask { const instance = new Classes.ListenTask(model); - validate('ListenTask', instance); - return instance as Specification.ListenTask; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.ListenTask; } /** diff --git a/src/lib/generated/builders/listen-task-listen-builder.ts b/src/lib/generated/builders/listen-task-listen-builder.ts index 697cde15..d021bf51 100644 --- a/src/lib/generated/builders/listen-task-listen-builder.ts +++ b/src/lib/generated/builders/listen-task-listen-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ListenTaskListen} model The underlying object - * @returns {Specification.ListenTaskListen} The validated underlying object + * @param {Specification.ListenTaskListen} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.ListenTaskListen} The built object */ -function buildingFn(model: Specification.ListenTaskListen): Specification.ListenTaskListen { +function buildingFn(model: Specification.ListenTaskListen, options: BuildOptions): Specification.ListenTaskListen { const instance = new Classes.ListenTaskListen(model); - validate('ListenTaskListen', instance); - return instance as Specification.ListenTaskListen; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.ListenTaskListen; } /** diff --git a/src/lib/generated/builders/oauth2-token-builder.ts b/src/lib/generated/builders/oauth2-token-builder.ts index 4cf90d3a..f86d2c8a 100644 --- a/src/lib/generated/builders/oauth2-token-builder.ts +++ b/src/lib/generated/builders/oauth2-token-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Oauth2Token} model The underlying object - * @returns {Specification.Oauth2Token} The validated underlying object + * @param {Specification.Oauth2Token} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.Oauth2Token} The built object */ -function buildingFn(model: Specification.Oauth2Token): Specification.Oauth2Token { +function buildingFn(model: Specification.Oauth2Token, options: BuildOptions): Specification.Oauth2Token { const instance = new Classes.Oauth2Token(model); - validate('Oauth2Token', instance); - return instance as Specification.Oauth2Token; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.Oauth2Token; } /** diff --git a/src/lib/generated/builders/output-builder.ts b/src/lib/generated/builders/output-builder.ts index f97ee3f1..3515ee46 100644 --- a/src/lib/generated/builders/output-builder.ts +++ b/src/lib/generated/builders/output-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Output} model The underlying object - * @returns {Specification.Output} The validated underlying object + * @param {Specification.Output} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.Output} The built object */ -function buildingFn(model: Specification.Output): Specification.Output { +function buildingFn(model: Specification.Output, options: BuildOptions): Specification.Output { const instance = new Classes.Output(model); - validate('Output', instance); - return instance as Specification.Output; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.Output; } /** diff --git a/src/lib/generated/builders/raise-task-builder.ts b/src/lib/generated/builders/raise-task-builder.ts index e05198e3..41845bf7 100644 --- a/src/lib/generated/builders/raise-task-builder.ts +++ b/src/lib/generated/builders/raise-task-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RaiseTask} model The underlying object - * @returns {Specification.RaiseTask} The validated underlying object + * @param {Specification.RaiseTask} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RaiseTask} The built object */ -function buildingFn(model: Specification.RaiseTask): Specification.RaiseTask { +function buildingFn(model: Specification.RaiseTask, options: BuildOptions): Specification.RaiseTask { const instance = new Classes.RaiseTask(model); - validate('RaiseTask', instance); - return instance as Specification.RaiseTask; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RaiseTask; } /** diff --git a/src/lib/generated/builders/raise-task-raise-builder.ts b/src/lib/generated/builders/raise-task-raise-builder.ts index ed599aaf..aa2f49d8 100644 --- a/src/lib/generated/builders/raise-task-raise-builder.ts +++ b/src/lib/generated/builders/raise-task-raise-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RaiseTaskRaise} model The underlying object - * @returns {Specification.RaiseTaskRaise} The validated underlying object + * @param {Specification.RaiseTaskRaise} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RaiseTaskRaise} The built object */ -function buildingFn(model: Specification.RaiseTaskRaise): Specification.RaiseTaskRaise { +function buildingFn(model: Specification.RaiseTaskRaise, options: BuildOptions): Specification.RaiseTaskRaise { const instance = new Classes.RaiseTaskRaise(model); - validate('RaiseTaskRaise', instance); - return instance as Specification.RaiseTaskRaise; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RaiseTaskRaise; } /** diff --git a/src/lib/generated/builders/retry-policy-backoff-builder.ts b/src/lib/generated/builders/retry-policy-backoff-builder.ts index 9755972d..1b1745ff 100644 --- a/src/lib/generated/builders/retry-policy-backoff-builder.ts +++ b/src/lib/generated/builders/retry-policy-backoff-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RetryPolicyBackoff} model The underlying object - * @returns {Specification.RetryPolicyBackoff} The validated underlying object + * @param {Specification.RetryPolicyBackoff} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RetryPolicyBackoff} The built object */ -function buildingFn(model: Specification.RetryPolicyBackoff): Specification.RetryPolicyBackoff { +function buildingFn(model: Specification.RetryPolicyBackoff, options: BuildOptions): Specification.RetryPolicyBackoff { const instance = new Classes.RetryPolicyBackoff(model); - validate('RetryPolicyBackoff', instance); - return instance as Specification.RetryPolicyBackoff; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RetryPolicyBackoff; } /** diff --git a/src/lib/generated/builders/retry-policy-builder.ts b/src/lib/generated/builders/retry-policy-builder.ts index f4af70e7..2f6eb8bc 100644 --- a/src/lib/generated/builders/retry-policy-builder.ts +++ b/src/lib/generated/builders/retry-policy-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RetryPolicy} model The underlying object - * @returns {Specification.RetryPolicy} The validated underlying object + * @param {Specification.RetryPolicy} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RetryPolicy} The built object */ -function buildingFn(model: Specification.RetryPolicy): Specification.RetryPolicy { +function buildingFn(model: Specification.RetryPolicy, options: BuildOptions): Specification.RetryPolicy { const instance = new Classes.RetryPolicy(model); - validate('RetryPolicy', instance); - return instance as Specification.RetryPolicy; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RetryPolicy; } /** diff --git a/src/lib/generated/builders/retry-policy-jitter-builder.ts b/src/lib/generated/builders/retry-policy-jitter-builder.ts index 0ef0ca4d..94f33282 100644 --- a/src/lib/generated/builders/retry-policy-jitter-builder.ts +++ b/src/lib/generated/builders/retry-policy-jitter-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RetryPolicyJitter} model The underlying object - * @returns {Specification.RetryPolicyJitter} The validated underlying object + * @param {Specification.RetryPolicyJitter} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RetryPolicyJitter} The built object */ -function buildingFn(model: Specification.RetryPolicyJitter): Specification.RetryPolicyJitter { +function buildingFn(model: Specification.RetryPolicyJitter, options: BuildOptions): Specification.RetryPolicyJitter { const instance = new Classes.RetryPolicyJitter(model); - validate('RetryPolicyJitter', instance); - return instance as Specification.RetryPolicyJitter; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RetryPolicyJitter; } /** diff --git a/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts b/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts index 5e00d825..4666c778 100644 --- a/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts +++ b/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RetryPolicyLimitAttempt} model The underlying object - * @returns {Specification.RetryPolicyLimitAttempt} The validated underlying object + * @param {Specification.RetryPolicyLimitAttempt} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RetryPolicyLimitAttempt} The built object */ -function buildingFn(model: Specification.RetryPolicyLimitAttempt): Specification.RetryPolicyLimitAttempt { +function buildingFn( + model: Specification.RetryPolicyLimitAttempt, + options: BuildOptions, +): Specification.RetryPolicyLimitAttempt { const instance = new Classes.RetryPolicyLimitAttempt(model); - validate('RetryPolicyLimitAttempt', instance); - return instance as Specification.RetryPolicyLimitAttempt; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RetryPolicyLimitAttempt; } /** diff --git a/src/lib/generated/builders/retry-policy-limit-builder.ts b/src/lib/generated/builders/retry-policy-limit-builder.ts index fecc6824..3aec76a5 100644 --- a/src/lib/generated/builders/retry-policy-limit-builder.ts +++ b/src/lib/generated/builders/retry-policy-limit-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RetryPolicyLimit} model The underlying object - * @returns {Specification.RetryPolicyLimit} The validated underlying object + * @param {Specification.RetryPolicyLimit} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RetryPolicyLimit} The built object */ -function buildingFn(model: Specification.RetryPolicyLimit): Specification.RetryPolicyLimit { +function buildingFn(model: Specification.RetryPolicyLimit, options: BuildOptions): Specification.RetryPolicyLimit { const instance = new Classes.RetryPolicyLimit(model); - validate('RetryPolicyLimit', instance); - return instance as Specification.RetryPolicyLimit; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RetryPolicyLimit; } /** diff --git a/src/lib/generated/builders/run-task-builder.ts b/src/lib/generated/builders/run-task-builder.ts index 18b84c0b..9cb168af 100644 --- a/src/lib/generated/builders/run-task-builder.ts +++ b/src/lib/generated/builders/run-task-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTask} model The underlying object - * @returns {Specification.RunTask} The validated underlying object + * @param {Specification.RunTask} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RunTask} The built object */ -function buildingFn(model: Specification.RunTask): Specification.RunTask { +function buildingFn(model: Specification.RunTask, options: BuildOptions): Specification.RunTask { const instance = new Classes.RunTask(model); - validate('RunTask', instance); - return instance as Specification.RunTask; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RunTask; } /** diff --git a/src/lib/generated/builders/run-task-run-builder.ts b/src/lib/generated/builders/run-task-run-builder.ts index 28ca4b6f..69a5f8c6 100644 --- a/src/lib/generated/builders/run-task-run-builder.ts +++ b/src/lib/generated/builders/run-task-run-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRun} model The underlying object - * @returns {Specification.RunTaskRun} The validated underlying object + * @param {Specification.RunTaskRun} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RunTaskRun} The built object */ -function buildingFn(model: Specification.RunTaskRun): Specification.RunTaskRun { +function buildingFn(model: Specification.RunTaskRun, options: BuildOptions): Specification.RunTaskRun { const instance = new Classes.RunTaskRun(model); - validate('RunTaskRun', instance); - return instance as Specification.RunTaskRun; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RunTaskRun; } /** diff --git a/src/lib/generated/builders/run-task-run-container-builder.ts b/src/lib/generated/builders/run-task-run-container-builder.ts index 771e447f..3202d9cd 100644 --- a/src/lib/generated/builders/run-task-run-container-builder.ts +++ b/src/lib/generated/builders/run-task-run-container-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunContainer} model The underlying object - * @returns {Specification.RunTaskRunContainer} The validated underlying object + * @param {Specification.RunTaskRunContainer} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RunTaskRunContainer} The built object */ -function buildingFn(model: Specification.RunTaskRunContainer): Specification.RunTaskRunContainer { +function buildingFn( + model: Specification.RunTaskRunContainer, + options: BuildOptions, +): Specification.RunTaskRunContainer { const instance = new Classes.RunTaskRunContainer(model); - validate('RunTaskRunContainer', instance); - return instance as Specification.RunTaskRunContainer; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RunTaskRunContainer; } /** diff --git a/src/lib/generated/builders/run-task-run-script-builder.ts b/src/lib/generated/builders/run-task-run-script-builder.ts index c31b973a..525fad7a 100644 --- a/src/lib/generated/builders/run-task-run-script-builder.ts +++ b/src/lib/generated/builders/run-task-run-script-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunScript} model The underlying object - * @returns {Specification.RunTaskRunScript} The validated underlying object + * @param {Specification.RunTaskRunScript} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RunTaskRunScript} The built object */ -function buildingFn(model: Specification.RunTaskRunScript): Specification.RunTaskRunScript { +function buildingFn(model: Specification.RunTaskRunScript, options: BuildOptions): Specification.RunTaskRunScript { const instance = new Classes.RunTaskRunScript(model); - validate('RunTaskRunScript', instance); - return instance as Specification.RunTaskRunScript; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RunTaskRunScript; } /** diff --git a/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts b/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts index 897fab7a..87c40e34 100644 --- a/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts +++ b/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunShellArguments} model The underlying object - * @returns {Specification.RunTaskRunShellArguments} The validated underlying object + * @param {Specification.RunTaskRunShellArguments} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RunTaskRunShellArguments} The built object */ -function buildingFn(model: Specification.RunTaskRunShellArguments): Specification.RunTaskRunShellArguments { +function buildingFn( + model: Specification.RunTaskRunShellArguments, + options: BuildOptions, +): Specification.RunTaskRunShellArguments { const instance = new Classes.RunTaskRunShellArguments(model); - validate('RunTaskRunShellArguments', instance); - return instance as Specification.RunTaskRunShellArguments; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RunTaskRunShellArguments; } /** diff --git a/src/lib/generated/builders/run-task-run-shell-builder.ts b/src/lib/generated/builders/run-task-run-shell-builder.ts index da1c4a71..407830da 100644 --- a/src/lib/generated/builders/run-task-run-shell-builder.ts +++ b/src/lib/generated/builders/run-task-run-shell-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunShell} model The underlying object - * @returns {Specification.RunTaskRunShell} The validated underlying object + * @param {Specification.RunTaskRunShell} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RunTaskRunShell} The built object */ -function buildingFn(model: Specification.RunTaskRunShell): Specification.RunTaskRunShell { +function buildingFn(model: Specification.RunTaskRunShell, options: BuildOptions): Specification.RunTaskRunShell { const instance = new Classes.RunTaskRunShell(model); - validate('RunTaskRunShell', instance); - return instance as Specification.RunTaskRunShell; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RunTaskRunShell; } /** diff --git a/src/lib/generated/builders/run-task-run-shell-environment-builder.ts b/src/lib/generated/builders/run-task-run-shell-environment-builder.ts index aa82b55a..8f903843 100644 --- a/src/lib/generated/builders/run-task-run-shell-environment-builder.ts +++ b/src/lib/generated/builders/run-task-run-shell-environment-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunShellEnvironment} model The underlying object - * @returns {Specification.RunTaskRunShellEnvironment} The validated underlying object + * @param {Specification.RunTaskRunShellEnvironment} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RunTaskRunShellEnvironment} The built object */ -function buildingFn(model: Specification.RunTaskRunShellEnvironment): Specification.RunTaskRunShellEnvironment { +function buildingFn( + model: Specification.RunTaskRunShellEnvironment, + options: BuildOptions, +): Specification.RunTaskRunShellEnvironment { const instance = new Classes.RunTaskRunShellEnvironment(model); - validate('RunTaskRunShellEnvironment', instance); - return instance as Specification.RunTaskRunShellEnvironment; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RunTaskRunShellEnvironment; } /** diff --git a/src/lib/generated/builders/run-task-run-workflow-builder.ts b/src/lib/generated/builders/run-task-run-workflow-builder.ts index edb0689f..1b7bcaed 100644 --- a/src/lib/generated/builders/run-task-run-workflow-builder.ts +++ b/src/lib/generated/builders/run-task-run-workflow-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunWorkflow} model The underlying object - * @returns {Specification.RunTaskRunWorkflow} The validated underlying object + * @param {Specification.RunTaskRunWorkflow} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RunTaskRunWorkflow} The built object */ -function buildingFn(model: Specification.RunTaskRunWorkflow): Specification.RunTaskRunWorkflow { +function buildingFn(model: Specification.RunTaskRunWorkflow, options: BuildOptions): Specification.RunTaskRunWorkflow { const instance = new Classes.RunTaskRunWorkflow(model); - validate('RunTaskRunWorkflow', instance); - return instance as Specification.RunTaskRunWorkflow; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RunTaskRunWorkflow; } /** diff --git a/src/lib/generated/builders/run-task-run-workflow-input-builder.ts b/src/lib/generated/builders/run-task-run-workflow-input-builder.ts index 95202f12..a01d0a71 100644 --- a/src/lib/generated/builders/run-task-run-workflow-input-builder.ts +++ b/src/lib/generated/builders/run-task-run-workflow-input-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunWorkflowInput} model The underlying object - * @returns {Specification.RunTaskRunWorkflowInput} The validated underlying object + * @param {Specification.RunTaskRunWorkflowInput} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RunTaskRunWorkflowInput} The built object */ -function buildingFn(model: Specification.RunTaskRunWorkflowInput): Specification.RunTaskRunWorkflowInput { +function buildingFn( + model: Specification.RunTaskRunWorkflowInput, + options: BuildOptions, +): Specification.RunTaskRunWorkflowInput { const instance = new Classes.RunTaskRunWorkflowInput(model); - validate('RunTaskRunWorkflowInput', instance); - return instance as Specification.RunTaskRunWorkflowInput; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RunTaskRunWorkflowInput; } /** diff --git a/src/lib/generated/builders/schedule-builder.ts b/src/lib/generated/builders/schedule-builder.ts index 292c384b..a53ab9f0 100644 --- a/src/lib/generated/builders/schedule-builder.ts +++ b/src/lib/generated/builders/schedule-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Schedule} model The underlying object - * @returns {Specification.Schedule} The validated underlying object + * @param {Specification.Schedule} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.Schedule} The built object */ -function buildingFn(model: Specification.Schedule): Specification.Schedule { +function buildingFn(model: Specification.Schedule, options: BuildOptions): Specification.Schedule { const instance = new Classes.Schedule(model); - validate('Schedule', instance); - return instance as Specification.Schedule; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.Schedule; } /** diff --git a/src/lib/generated/builders/schema-builder.ts b/src/lib/generated/builders/schema-builder.ts index 42298df7..c2e97258 100644 --- a/src/lib/generated/builders/schema-builder.ts +++ b/src/lib/generated/builders/schema-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Schema} model The underlying object - * @returns {Specification.Schema} The validated underlying object + * @param {Specification.Schema} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.Schema} The built object */ -function buildingFn(model: Specification.Schema): Specification.Schema { +function buildingFn(model: Specification.Schema, options: BuildOptions): Specification.Schema { const instance = new Classes.Schema(model); - validate('Schema', instance); - return instance as Specification.Schema; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.Schema; } /** diff --git a/src/lib/generated/builders/set-task-builder.ts b/src/lib/generated/builders/set-task-builder.ts index 295b2ebd..44b0047d 100644 --- a/src/lib/generated/builders/set-task-builder.ts +++ b/src/lib/generated/builders/set-task-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.SetTask} model The underlying object - * @returns {Specification.SetTask} The validated underlying object + * @param {Specification.SetTask} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.SetTask} The built object */ -function buildingFn(model: Specification.SetTask): Specification.SetTask { +function buildingFn(model: Specification.SetTask, options: BuildOptions): Specification.SetTask { const instance = new Classes.SetTask(model); - validate('SetTask', instance); - return instance as Specification.SetTask; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.SetTask; } /** diff --git a/src/lib/generated/builders/set-task-set-builder.ts b/src/lib/generated/builders/set-task-set-builder.ts index d44d87ef..cae7c67e 100644 --- a/src/lib/generated/builders/set-task-set-builder.ts +++ b/src/lib/generated/builders/set-task-set-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.SetTaskSet} model The underlying object - * @returns {Specification.SetTaskSet} The validated underlying object + * @param {Specification.SetTaskSet} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.SetTaskSet} The built object */ -function buildingFn(model: Specification.SetTaskSet): Specification.SetTaskSet { +function buildingFn(model: Specification.SetTaskSet, options: BuildOptions): Specification.SetTaskSet { const instance = new Classes.SetTaskSet(model); - validate('SetTaskSet', instance); - return instance as Specification.SetTaskSet; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.SetTaskSet; } /** diff --git a/src/lib/generated/builders/switch-task-builder.ts b/src/lib/generated/builders/switch-task-builder.ts index 2c931b4c..ec3d1d15 100644 --- a/src/lib/generated/builders/switch-task-builder.ts +++ b/src/lib/generated/builders/switch-task-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.SwitchTask} model The underlying object - * @returns {Specification.SwitchTask} The validated underlying object + * @param {Specification.SwitchTask} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.SwitchTask} The built object */ -function buildingFn(model: Specification.SwitchTask): Specification.SwitchTask { +function buildingFn(model: Specification.SwitchTask, options: BuildOptions): Specification.SwitchTask { const instance = new Classes.SwitchTask(model); - validate('SwitchTask', instance); - return instance as Specification.SwitchTask; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.SwitchTask; } /** diff --git a/src/lib/generated/builders/switch-task-switch-builder.ts b/src/lib/generated/builders/switch-task-switch-builder.ts index a91188da..32381a8f 100644 --- a/src/lib/generated/builders/switch-task-switch-builder.ts +++ b/src/lib/generated/builders/switch-task-switch-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.SwitchTaskSwitch} model The underlying object - * @returns {Specification.SwitchTaskSwitch} The validated underlying object + * @param {Specification.SwitchTaskSwitch} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.SwitchTaskSwitch} The built object */ -function buildingFn(model: Specification.SwitchTaskSwitch): Specification.SwitchTaskSwitch { +function buildingFn(model: Specification.SwitchTaskSwitch, options: BuildOptions): Specification.SwitchTaskSwitch { const instance = new Classes.SwitchTaskSwitch(model); - validate('SwitchTaskSwitch', instance); - return instance as Specification.SwitchTaskSwitch; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as unknown as Specification.SwitchTaskSwitch; } /** diff --git a/src/lib/generated/builders/switch-task-switch-case-builder.ts b/src/lib/generated/builders/switch-task-switch-case-builder.ts index 91b18a9f..7dd54788 100644 --- a/src/lib/generated/builders/switch-task-switch-case-builder.ts +++ b/src/lib/generated/builders/switch-task-switch-case-builder.ts @@ -20,20 +20,23 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.SwitchTaskSwitchCase} model The underlying object - * @returns {Specification.SwitchTaskSwitchCase} The validated underlying object + * @param {Specification.SwitchTaskSwitchCase} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.SwitchTaskSwitchCase} The built object */ -function buildingFn(model: Specification.SwitchTaskSwitchCase): Specification.SwitchTaskSwitchCase { +function buildingFn( + model: Specification.SwitchTaskSwitchCase, + options: BuildOptions, +): Specification.SwitchTaskSwitchCase { const instance = new Classes.SwitchTaskSwitchCase(model); - validate('SwitchTaskSwitchCase', instance); - return instance as Specification.SwitchTaskSwitchCase; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.SwitchTaskSwitchCase; } /** diff --git a/src/lib/generated/builders/task-base-builder.ts b/src/lib/generated/builders/task-base-builder.ts index 5028ba8a..94b1338d 100644 --- a/src/lib/generated/builders/task-base-builder.ts +++ b/src/lib/generated/builders/task-base-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.TaskBase} model The underlying object - * @returns {Specification.TaskBase} The validated underlying object + * @param {Specification.TaskBase} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.TaskBase} The built object */ -function buildingFn(model: Specification.TaskBase): Specification.TaskBase { +function buildingFn(model: Specification.TaskBase, options: BuildOptions): Specification.TaskBase { const instance = new Classes.TaskBase(model); - validate('TaskBase', instance); - return instance as Specification.TaskBase; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.TaskBase; } /** diff --git a/src/lib/generated/builders/task-builder.ts b/src/lib/generated/builders/task-builder.ts index 2dcc9ff0..d5477e4b 100644 --- a/src/lib/generated/builders/task-builder.ts +++ b/src/lib/generated/builders/task-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Task} model The underlying object - * @returns {Specification.Task} The validated underlying object + * @param {Specification.Task} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.Task} The built object */ -function buildingFn(model: Specification.Task): Specification.Task { +function buildingFn(model: Specification.Task, options: BuildOptions): Specification.Task { const instance = new Classes.Task(model); - validate('Task', instance); - return instance as Specification.Task; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.Task; } /** diff --git a/src/lib/generated/builders/task-list-builder.ts b/src/lib/generated/builders/task-list-builder.ts index 9f2ebf77..b916447d 100644 --- a/src/lib/generated/builders/task-list-builder.ts +++ b/src/lib/generated/builders/task-list-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { arrayBuilder, ArrayBuilder } from '../../builder'; -import { validate } from '../../validation'; +import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying array - * @param {Specification.TaskList} model The underlying array - * @returns {Specification.TaskList} The validated underlying array + * @param {Specification.TaskList} model The proxied array + * @param {BuildOptions} options The build options to use + * @returns {Specification.TaskList} The built array */ -function buildingFn(model: Specification.TaskList): Specification.TaskList { +function buildingFn(model: Specification.TaskList, options: BuildOptions): Specification.TaskList { const instance = new Classes.TaskList(model); - validate('TaskList', instance); - return instance as Specification.TaskList; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.TaskList; } /** diff --git a/src/lib/generated/builders/timeout-builder.ts b/src/lib/generated/builders/timeout-builder.ts index 32b8122c..80b8e9a9 100644 --- a/src/lib/generated/builders/timeout-builder.ts +++ b/src/lib/generated/builders/timeout-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Timeout} model The underlying object - * @returns {Specification.Timeout} The validated underlying object + * @param {Specification.Timeout} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.Timeout} The built object */ -function buildingFn(model: Specification.Timeout): Specification.Timeout { +function buildingFn(model: Specification.Timeout, options: BuildOptions): Specification.Timeout { const instance = new Classes.Timeout(model); - validate('Timeout', instance); - return instance as Specification.Timeout; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.Timeout; } /** diff --git a/src/lib/generated/builders/try-task-builder.ts b/src/lib/generated/builders/try-task-builder.ts index cfc1d0ad..cce241fd 100644 --- a/src/lib/generated/builders/try-task-builder.ts +++ b/src/lib/generated/builders/try-task-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.TryTask} model The underlying object - * @returns {Specification.TryTask} The validated underlying object + * @param {Specification.TryTask} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.TryTask} The built object */ -function buildingFn(model: Specification.TryTask): Specification.TryTask { +function buildingFn(model: Specification.TryTask, options: BuildOptions): Specification.TryTask { const instance = new Classes.TryTask(model); - validate('TryTask', instance); - return instance as Specification.TryTask; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.TryTask; } /** diff --git a/src/lib/generated/builders/try-task-catch-builder.ts b/src/lib/generated/builders/try-task-catch-builder.ts index 564c0a8a..b41a053f 100644 --- a/src/lib/generated/builders/try-task-catch-builder.ts +++ b/src/lib/generated/builders/try-task-catch-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.TryTaskCatch} model The underlying object - * @returns {Specification.TryTaskCatch} The validated underlying object + * @param {Specification.TryTaskCatch} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.TryTaskCatch} The built object */ -function buildingFn(model: Specification.TryTaskCatch): Specification.TryTaskCatch { +function buildingFn(model: Specification.TryTaskCatch, options: BuildOptions): Specification.TryTaskCatch { const instance = new Classes.TryTaskCatch(model); - validate('TryTaskCatch', instance); - return instance as Specification.TryTaskCatch; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.TryTaskCatch; } /** diff --git a/src/lib/generated/builders/use-authentications-builder.ts b/src/lib/generated/builders/use-authentications-builder.ts index 80ef91f7..8341f54b 100644 --- a/src/lib/generated/builders/use-authentications-builder.ts +++ b/src/lib/generated/builders/use-authentications-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.UseAuthentications} model The underlying object - * @returns {Specification.UseAuthentications} The validated underlying object + * @param {Specification.UseAuthentications} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.UseAuthentications} The built object */ -function buildingFn(model: Specification.UseAuthentications): Specification.UseAuthentications { +function buildingFn(model: Specification.UseAuthentications, options: BuildOptions): Specification.UseAuthentications { const instance = new Classes.UseAuthentications(model); - validate('UseAuthentications', instance); - return instance as Specification.UseAuthentications; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.UseAuthentications; } /** diff --git a/src/lib/generated/builders/use-builder.ts b/src/lib/generated/builders/use-builder.ts index c06be335..f5da14d2 100644 --- a/src/lib/generated/builders/use-builder.ts +++ b/src/lib/generated/builders/use-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Use} model The underlying object - * @returns {Specification.Use} The validated underlying object + * @param {Specification.Use} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.Use} The built object */ -function buildingFn(model: Specification.Use): Specification.Use { +function buildingFn(model: Specification.Use, options: BuildOptions): Specification.Use { const instance = new Classes.Use(model); - validate('Use', instance); - return instance as Specification.Use; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.Use; } /** diff --git a/src/lib/generated/builders/use-errors-builder.ts b/src/lib/generated/builders/use-errors-builder.ts index e61ee852..73b6b6e1 100644 --- a/src/lib/generated/builders/use-errors-builder.ts +++ b/src/lib/generated/builders/use-errors-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.UseErrors} model The underlying object - * @returns {Specification.UseErrors} The validated underlying object + * @param {Specification.UseErrors} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.UseErrors} The built object */ -function buildingFn(model: Specification.UseErrors): Specification.UseErrors { +function buildingFn(model: Specification.UseErrors, options: BuildOptions): Specification.UseErrors { const instance = new Classes.UseErrors(model); - validate('UseErrors', instance); - return instance as Specification.UseErrors; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.UseErrors; } /** diff --git a/src/lib/generated/builders/use-extensions-builder.ts b/src/lib/generated/builders/use-extensions-builder.ts index afaa86f0..40e64cc0 100644 --- a/src/lib/generated/builders/use-extensions-builder.ts +++ b/src/lib/generated/builders/use-extensions-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { arrayBuilder, ArrayBuilder } from '../../builder'; -import { validate } from '../../validation'; +import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying array - * @param {Specification.UseExtensions} model The underlying array - * @returns {Specification.UseExtensions} The validated underlying array + * @param {Specification.UseExtensions} model The proxied array + * @param {BuildOptions} options The build options to use + * @returns {Specification.UseExtensions} The built array */ -function buildingFn(model: Specification.UseExtensions): Specification.UseExtensions { +function buildingFn(model: Specification.UseExtensions, options: BuildOptions): Specification.UseExtensions { const instance = new Classes.UseExtensions(model); - validate('UseExtensions', instance); - return instance as Specification.UseExtensions; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.UseExtensions; } /** diff --git a/src/lib/generated/builders/use-functions-builder.ts b/src/lib/generated/builders/use-functions-builder.ts index b6f72db3..faff3cca 100644 --- a/src/lib/generated/builders/use-functions-builder.ts +++ b/src/lib/generated/builders/use-functions-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.UseFunctions} model The underlying object - * @returns {Specification.UseFunctions} The validated underlying object + * @param {Specification.UseFunctions} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.UseFunctions} The built object */ -function buildingFn(model: Specification.UseFunctions): Specification.UseFunctions { +function buildingFn(model: Specification.UseFunctions, options: BuildOptions): Specification.UseFunctions { const instance = new Classes.UseFunctions(model); - validate('UseFunctions', instance); - return instance as Specification.UseFunctions; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.UseFunctions; } /** diff --git a/src/lib/generated/builders/use-retries-builder.ts b/src/lib/generated/builders/use-retries-builder.ts index c937b10c..ed495ea7 100644 --- a/src/lib/generated/builders/use-retries-builder.ts +++ b/src/lib/generated/builders/use-retries-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.UseRetries} model The underlying object - * @returns {Specification.UseRetries} The validated underlying object + * @param {Specification.UseRetries} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.UseRetries} The built object */ -function buildingFn(model: Specification.UseRetries): Specification.UseRetries { +function buildingFn(model: Specification.UseRetries, options: BuildOptions): Specification.UseRetries { const instance = new Classes.UseRetries(model); - validate('UseRetries', instance); - return instance as Specification.UseRetries; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.UseRetries; } /** diff --git a/src/lib/generated/builders/wait-task-builder.ts b/src/lib/generated/builders/wait-task-builder.ts index 3a88a25b..27413422 100644 --- a/src/lib/generated/builders/wait-task-builder.ts +++ b/src/lib/generated/builders/wait-task-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.WaitTask} model The underlying object - * @returns {Specification.WaitTask} The validated underlying object + * @param {Specification.WaitTask} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.WaitTask} The built object */ -function buildingFn(model: Specification.WaitTask): Specification.WaitTask { +function buildingFn(model: Specification.WaitTask, options: BuildOptions): Specification.WaitTask { const instance = new Classes.WaitTask(model); - validate('WaitTask', instance); - return instance as Specification.WaitTask; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.WaitTask; } /** diff --git a/src/lib/generated/builders/workflow-builder.ts b/src/lib/generated/builders/workflow-builder.ts index 97822ce5..befe3f13 100644 --- a/src/lib/generated/builders/workflow-builder.ts +++ b/src/lib/generated/builders/workflow-builder.ts @@ -20,20 +20,20 @@ * *****************************************************************************************/ -import { builder, Builder } from '../../builder'; -import { validate } from '../../validation'; +import { builder, Builder, BuildOptions } from '../../builder'; import { Classes } from '../classes'; import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Workflow} model The underlying object - * @returns {Specification.Workflow} The validated underlying object + * @param {Specification.Workflow} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.Workflow} The built object */ -function buildingFn(model: Specification.Workflow): Specification.Workflow { +function buildingFn(model: Specification.Workflow, options: BuildOptions): Specification.Workflow { const instance = new Classes.Workflow(model); - validate('Workflow', instance); - return instance as Specification.Workflow; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.Workflow; } /** diff --git a/src/lib/generated/classes/authentication-policy-basic.ts b/src/lib/generated/classes/authentication-policy-basic.ts index af50feba..a7c898c5 100644 --- a/src/lib/generated/classes/authentication-policy-basic.ts +++ b/src/lib/generated/classes/authentication-policy-basic.ts @@ -21,12 +21,30 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class AuthenticationPolicyBasic extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('AuthenticationPolicyBasic')?.constructor?.(this); + } + + validate() { + const copy = new AuthenticationPolicyBasic(this as any) as AuthenticationPolicyBasic & + Specification.AuthenticationPolicyBasic; + getLifecycleHook('AuthenticationPolicyBasic')?.preValidation?.(copy); + validate('AuthenticationPolicyBasic', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('AuthenticationPolicyBasic')?.postValidation?.(copy); + } + + normalize(): AuthenticationPolicyBasic & Specification.AuthenticationPolicyBasic { + const copy = new AuthenticationPolicyBasic(this as any) as AuthenticationPolicyBasic & + Specification.AuthenticationPolicyBasic; + return getLifecycleHook('AuthenticationPolicyBasic')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/authentication-policy-bearer.ts b/src/lib/generated/classes/authentication-policy-bearer.ts index 609fd7d6..f89b814a 100644 --- a/src/lib/generated/classes/authentication-policy-bearer.ts +++ b/src/lib/generated/classes/authentication-policy-bearer.ts @@ -21,12 +21,30 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class AuthenticationPolicyBearer extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('AuthenticationPolicyBearer')?.constructor?.(this); + } + + validate() { + const copy = new AuthenticationPolicyBearer(this as any) as AuthenticationPolicyBearer & + Specification.AuthenticationPolicyBearer; + getLifecycleHook('AuthenticationPolicyBearer')?.preValidation?.(copy); + validate('AuthenticationPolicyBearer', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('AuthenticationPolicyBearer')?.postValidation?.(copy); + } + + normalize(): AuthenticationPolicyBearer & Specification.AuthenticationPolicyBearer { + const copy = new AuthenticationPolicyBearer(this as any) as AuthenticationPolicyBearer & + Specification.AuthenticationPolicyBearer; + return getLifecycleHook('AuthenticationPolicyBearer')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/authentication-policy-oauth2-client.ts b/src/lib/generated/classes/authentication-policy-oauth2-client.ts index 76d21936..9007b358 100644 --- a/src/lib/generated/classes/authentication-policy-oauth2-client.ts +++ b/src/lib/generated/classes/authentication-policy-oauth2-client.ts @@ -21,12 +21,30 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class AuthenticationPolicyOauth2Client extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('AuthenticationPolicyOauth2Client')?.constructor?.(this); + } + + validate() { + const copy = new AuthenticationPolicyOauth2Client(this as any) as AuthenticationPolicyOauth2Client & + Specification.AuthenticationPolicyOauth2Client; + getLifecycleHook('AuthenticationPolicyOauth2Client')?.preValidation?.(copy); + validate('AuthenticationPolicyOauth2Client', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('AuthenticationPolicyOauth2Client')?.postValidation?.(copy); + } + + normalize(): AuthenticationPolicyOauth2Client & Specification.AuthenticationPolicyOauth2Client { + const copy = new AuthenticationPolicyOauth2Client(this as any) as AuthenticationPolicyOauth2Client & + Specification.AuthenticationPolicyOauth2Client; + return getLifecycleHook('AuthenticationPolicyOauth2Client')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/authentication-policy-oauth2.ts b/src/lib/generated/classes/authentication-policy-oauth2.ts index 03187608..1dcf35c1 100644 --- a/src/lib/generated/classes/authentication-policy-oauth2.ts +++ b/src/lib/generated/classes/authentication-policy-oauth2.ts @@ -20,11 +20,13 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _AuthenticationPolicyOauth2Client } from './authentication-policy-oauth2-client'; import { _Oauth2Token } from './oauth2-token'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class AuthenticationPolicyOauth2 extends ObjectHydrator { constructor(model?: Partial) { @@ -35,6 +37,21 @@ class AuthenticationPolicyOauth2 extends ObjectHydrator { constructor(model?: Partial) { @@ -39,6 +41,19 @@ class AuthenticationPolicy extends ObjectHydrator { constructor(model?: Partial) { @@ -39,6 +41,21 @@ class CallAsyncAPIWithAuthentication extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('CallAsyncAPIWith')?.constructor?.(this); + } + + validate() { + const copy = new CallAsyncAPIWith(this as any) as CallAsyncAPIWith & Specification.CallAsyncAPIWith; + getLifecycleHook('CallAsyncAPIWith')?.preValidation?.(copy); + validate('CallAsyncAPIWith', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('CallAsyncAPIWith')?.postValidation?.(copy); + } + + normalize(): CallAsyncAPIWith & Specification.CallAsyncAPIWith { + const copy = new CallAsyncAPIWith(this as any) as CallAsyncAPIWith & Specification.CallAsyncAPIWith; + return getLifecycleHook('CallAsyncAPIWith')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/call-async-api.ts b/src/lib/generated/classes/call-async-api.ts index 8d03a30d..ed6806dd 100644 --- a/src/lib/generated/classes/call-async-api.ts +++ b/src/lib/generated/classes/call-async-api.ts @@ -20,14 +20,16 @@ * *****************************************************************************************/ -import { _TaskBase } from './task-base'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; import { _Timeout } from './timeout'; import { _CallAsyncAPIWith } from './call-async-api-with'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class CallAsyncAPI extends _TaskBase { constructor(model?: Partial) { @@ -41,6 +43,19 @@ class CallAsyncAPI extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.with === 'object') self.with = new _CallAsyncAPIWith(model.with); } + getLifecycleHook('CallAsyncAPI')?.constructor?.(this); + } + + validate() { + const copy = new CallAsyncAPI(this as any) as CallAsyncAPI & Specification.CallAsyncAPI; + getLifecycleHook('CallAsyncAPI')?.preValidation?.(copy); + validate('CallAsyncAPI', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('CallAsyncAPI')?.postValidation?.(copy); + } + + normalize(): CallAsyncAPI & Specification.CallAsyncAPI { + const copy = new CallAsyncAPI(this as any) as CallAsyncAPI & Specification.CallAsyncAPI; + return getLifecycleHook('CallAsyncAPI')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/call-function-with.ts b/src/lib/generated/classes/call-function-with.ts index b42fbddb..0b30e3e1 100644 --- a/src/lib/generated/classes/call-function-with.ts +++ b/src/lib/generated/classes/call-function-with.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class CallFunctionWith extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('CallFunctionWith')?.constructor?.(this); + } + + validate() { + const copy = new CallFunctionWith(this as any) as CallFunctionWith & Specification.CallFunctionWith; + getLifecycleHook('CallFunctionWith')?.preValidation?.(copy); + validate('CallFunctionWith', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('CallFunctionWith')?.postValidation?.(copy); + } + + normalize(): CallFunctionWith & Specification.CallFunctionWith { + const copy = new CallFunctionWith(this as any) as CallFunctionWith & Specification.CallFunctionWith; + return getLifecycleHook('CallFunctionWith')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/call-function.ts b/src/lib/generated/classes/call-function.ts index c9285297..baa6ed12 100644 --- a/src/lib/generated/classes/call-function.ts +++ b/src/lib/generated/classes/call-function.ts @@ -20,14 +20,16 @@ * *****************************************************************************************/ -import { _TaskBase } from './task-base'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; import { _Timeout } from './timeout'; import { _CallFunctionWith } from './call-function-with'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class CallFunction extends _TaskBase { constructor(model?: Partial) { @@ -40,6 +42,19 @@ class CallFunction extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.with === 'object') self.with = new _CallFunctionWith(model.with); } + getLifecycleHook('CallFunction')?.constructor?.(this); + } + + validate() { + const copy = new CallFunction(this as any) as CallFunction & Specification.CallFunction; + getLifecycleHook('CallFunction')?.preValidation?.(copy); + validate('CallFunction', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('CallFunction')?.postValidation?.(copy); + } + + normalize(): CallFunction & Specification.CallFunction { + const copy = new CallFunction(this as any) as CallFunction & Specification.CallFunction; + return getLifecycleHook('CallFunction')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/call-grpc-with-arguments.ts b/src/lib/generated/classes/call-grpc-with-arguments.ts index d891588e..503fa845 100644 --- a/src/lib/generated/classes/call-grpc-with-arguments.ts +++ b/src/lib/generated/classes/call-grpc-with-arguments.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class CallGRPCWithArguments extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('CallGRPCWithArguments')?.constructor?.(this); + } + + validate() { + const copy = new CallGRPCWithArguments(this as any) as CallGRPCWithArguments & Specification.CallGRPCWithArguments; + getLifecycleHook('CallGRPCWithArguments')?.preValidation?.(copy); + validate('CallGRPCWithArguments', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('CallGRPCWithArguments')?.postValidation?.(copy); + } + + normalize(): CallGRPCWithArguments & Specification.CallGRPCWithArguments { + const copy = new CallGRPCWithArguments(this as any) as CallGRPCWithArguments & Specification.CallGRPCWithArguments; + return getLifecycleHook('CallGRPCWithArguments')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/call-grpc-with-service-authentication.ts b/src/lib/generated/classes/call-grpc-with-service-authentication.ts index 2407e8da..1734e75c 100644 --- a/src/lib/generated/classes/call-grpc-with-service-authentication.ts +++ b/src/lib/generated/classes/call-grpc-with-service-authentication.ts @@ -20,12 +20,14 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class CallGRPCWithServiceAuthentication extends ObjectHydrator { constructor(model?: Partial) { @@ -39,6 +41,21 @@ class CallGRPCWithServiceAuthentication extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('CallGRPCWithService')?.constructor?.(this); + } + + validate() { + const copy = new CallGRPCWithService(this as any) as CallGRPCWithService & Specification.CallGRPCWithService; + getLifecycleHook('CallGRPCWithService')?.preValidation?.(copy); + validate('CallGRPCWithService', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('CallGRPCWithService')?.postValidation?.(copy); + } + + normalize(): CallGRPCWithService & Specification.CallGRPCWithService { + const copy = new CallGRPCWithService(this as any) as CallGRPCWithService & Specification.CallGRPCWithService; + return getLifecycleHook('CallGRPCWithService')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/call-grpc-with.ts b/src/lib/generated/classes/call-grpc-with.ts index 0d4f5903..37525f35 100644 --- a/src/lib/generated/classes/call-grpc-with.ts +++ b/src/lib/generated/classes/call-grpc-with.ts @@ -20,11 +20,13 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _CallGRPCWithService } from './call-grpc-with-service'; import { _CallGRPCWithArguments } from './call-grpc-with-arguments'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class CallGRPCWith extends ObjectHydrator { constructor(model?: Partial) { @@ -34,6 +36,19 @@ class CallGRPCWith extends ObjectHydrator { if (typeof model.service === 'object') self.service = new _CallGRPCWithService(model.service); if (typeof model.arguments === 'object') self.arguments = new _CallGRPCWithArguments(model.arguments); } + getLifecycleHook('CallGRPCWith')?.constructor?.(this); + } + + validate() { + const copy = new CallGRPCWith(this as any) as CallGRPCWith & Specification.CallGRPCWith; + getLifecycleHook('CallGRPCWith')?.preValidation?.(copy); + validate('CallGRPCWith', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('CallGRPCWith')?.postValidation?.(copy); + } + + normalize(): CallGRPCWith & Specification.CallGRPCWith { + const copy = new CallGRPCWith(this as any) as CallGRPCWith & Specification.CallGRPCWith; + return getLifecycleHook('CallGRPCWith')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/call-grpc.ts b/src/lib/generated/classes/call-grpc.ts index ad59e779..af103a58 100644 --- a/src/lib/generated/classes/call-grpc.ts +++ b/src/lib/generated/classes/call-grpc.ts @@ -20,14 +20,16 @@ * *****************************************************************************************/ -import { _TaskBase } from './task-base'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; import { _Timeout } from './timeout'; import { _CallGRPCWith } from './call-grpc-with'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class CallGRPC extends _TaskBase { constructor(model?: Partial) { @@ -41,6 +43,19 @@ class CallGRPC extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.with === 'object') self.with = new _CallGRPCWith(model.with); } + getLifecycleHook('CallGRPC')?.constructor?.(this); + } + + validate() { + const copy = new CallGRPC(this as any) as CallGRPC & Specification.CallGRPC; + getLifecycleHook('CallGRPC')?.preValidation?.(copy); + validate('CallGRPC', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('CallGRPC')?.postValidation?.(copy); + } + + normalize(): CallGRPC & Specification.CallGRPC { + const copy = new CallGRPC(this as any) as CallGRPC & Specification.CallGRPC; + return getLifecycleHook('CallGRPC')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/call-http-with-endpoint.ts b/src/lib/generated/classes/call-http-with-endpoint.ts index 9e6f488a..84f8b371 100644 --- a/src/lib/generated/classes/call-http-with-endpoint.ts +++ b/src/lib/generated/classes/call-http-with-endpoint.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class CallHTTPWithEndpoint extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('CallHTTPWithEndpoint')?.constructor?.(this); + } + + validate() { + const copy = new CallHTTPWithEndpoint(this as any) as CallHTTPWithEndpoint & Specification.CallHTTPWithEndpoint; + getLifecycleHook('CallHTTPWithEndpoint')?.preValidation?.(copy); + validate('CallHTTPWithEndpoint', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('CallHTTPWithEndpoint')?.postValidation?.(copy); + } + + normalize(): CallHTTPWithEndpoint & Specification.CallHTTPWithEndpoint { + const copy = new CallHTTPWithEndpoint(this as any) as CallHTTPWithEndpoint & Specification.CallHTTPWithEndpoint; + return getLifecycleHook('CallHTTPWithEndpoint')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/call-http-with.ts b/src/lib/generated/classes/call-http-with.ts index cbac01ae..9fe387d2 100644 --- a/src/lib/generated/classes/call-http-with.ts +++ b/src/lib/generated/classes/call-http-with.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _CallHTTPWithEndpoint } from './call-http-with-endpoint'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class CallHTTPWith extends ObjectHydrator { constructor(model?: Partial) { @@ -32,6 +34,19 @@ class CallHTTPWith extends ObjectHydrator { if (isObject(model)) { if (typeof model.endpoint === 'object') self.endpoint = new _CallHTTPWithEndpoint(model.endpoint); } + getLifecycleHook('CallHTTPWith')?.constructor?.(this); + } + + validate() { + const copy = new CallHTTPWith(this as any) as CallHTTPWith & Specification.CallHTTPWith; + getLifecycleHook('CallHTTPWith')?.preValidation?.(copy); + validate('CallHTTPWith', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('CallHTTPWith')?.postValidation?.(copy); + } + + normalize(): CallHTTPWith & Specification.CallHTTPWith { + const copy = new CallHTTPWith(this as any) as CallHTTPWith & Specification.CallHTTPWith; + return getLifecycleHook('CallHTTPWith')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/call-http.ts b/src/lib/generated/classes/call-http.ts index 01494bf1..055fdc91 100644 --- a/src/lib/generated/classes/call-http.ts +++ b/src/lib/generated/classes/call-http.ts @@ -20,14 +20,16 @@ * *****************************************************************************************/ -import { _TaskBase } from './task-base'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; import { _Timeout } from './timeout'; import { _CallHTTPWith } from './call-http-with'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class CallHTTP extends _TaskBase { constructor(model?: Partial) { @@ -41,6 +43,19 @@ class CallHTTP extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.with === 'object') self.with = new _CallHTTPWith(model.with); } + getLifecycleHook('CallHTTP')?.constructor?.(this); + } + + validate() { + const copy = new CallHTTP(this as any) as CallHTTP & Specification.CallHTTP; + getLifecycleHook('CallHTTP')?.preValidation?.(copy); + validate('CallHTTP', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('CallHTTP')?.postValidation?.(copy); + } + + normalize(): CallHTTP & Specification.CallHTTP { + const copy = new CallHTTP(this as any) as CallHTTP & Specification.CallHTTP; + return getLifecycleHook('CallHTTP')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/call-open-api-with-authentication.ts b/src/lib/generated/classes/call-open-api-with-authentication.ts index c0be53e3..24c36d52 100644 --- a/src/lib/generated/classes/call-open-api-with-authentication.ts +++ b/src/lib/generated/classes/call-open-api-with-authentication.ts @@ -20,12 +20,14 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class CallOpenAPIWithAuthentication extends ObjectHydrator { constructor(model?: Partial) { @@ -39,6 +41,21 @@ class CallOpenAPIWithAuthentication extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('CallOpenAPIWithParameters')?.constructor?.(this); + } + + validate() { + const copy = new CallOpenAPIWithParameters(this as any) as CallOpenAPIWithParameters & + Specification.CallOpenAPIWithParameters; + getLifecycleHook('CallOpenAPIWithParameters')?.preValidation?.(copy); + validate('CallOpenAPIWithParameters', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('CallOpenAPIWithParameters')?.postValidation?.(copy); + } + + normalize(): CallOpenAPIWithParameters & Specification.CallOpenAPIWithParameters { + const copy = new CallOpenAPIWithParameters(this as any) as CallOpenAPIWithParameters & + Specification.CallOpenAPIWithParameters; + return getLifecycleHook('CallOpenAPIWithParameters')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/call-open-api-with.ts b/src/lib/generated/classes/call-open-api-with.ts index b96c3a14..27c60654 100644 --- a/src/lib/generated/classes/call-open-api-with.ts +++ b/src/lib/generated/classes/call-open-api-with.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _CallOpenAPIWithParameters } from './call-open-api-with-parameters'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class CallOpenAPIWith extends ObjectHydrator { constructor(model?: Partial) { @@ -32,6 +34,19 @@ class CallOpenAPIWith extends ObjectHydrator { if (isObject(model)) { if (typeof model.parameters === 'object') self.parameters = new _CallOpenAPIWithParameters(model.parameters); } + getLifecycleHook('CallOpenAPIWith')?.constructor?.(this); + } + + validate() { + const copy = new CallOpenAPIWith(this as any) as CallOpenAPIWith & Specification.CallOpenAPIWith; + getLifecycleHook('CallOpenAPIWith')?.preValidation?.(copy); + validate('CallOpenAPIWith', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('CallOpenAPIWith')?.postValidation?.(copy); + } + + normalize(): CallOpenAPIWith & Specification.CallOpenAPIWith { + const copy = new CallOpenAPIWith(this as any) as CallOpenAPIWith & Specification.CallOpenAPIWith; + return getLifecycleHook('CallOpenAPIWith')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/call-open-api.ts b/src/lib/generated/classes/call-open-api.ts index 7671e301..ee5145a5 100644 --- a/src/lib/generated/classes/call-open-api.ts +++ b/src/lib/generated/classes/call-open-api.ts @@ -20,14 +20,16 @@ * *****************************************************************************************/ -import { _TaskBase } from './task-base'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; import { _Timeout } from './timeout'; import { _CallOpenAPIWith } from './call-open-api-with'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class CallOpenAPI extends _TaskBase { constructor(model?: Partial) { @@ -41,6 +43,19 @@ class CallOpenAPI extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.with === 'object') self.with = new _CallOpenAPIWith(model.with); } + getLifecycleHook('CallOpenAPI')?.constructor?.(this); + } + + validate() { + const copy = new CallOpenAPI(this as any) as CallOpenAPI & Specification.CallOpenAPI; + getLifecycleHook('CallOpenAPI')?.preValidation?.(copy); + validate('CallOpenAPI', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('CallOpenAPI')?.postValidation?.(copy); + } + + normalize(): CallOpenAPI & Specification.CallOpenAPI { + const copy = new CallOpenAPI(this as any) as CallOpenAPI & Specification.CallOpenAPI; + return getLifecycleHook('CallOpenAPI')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/call-task.ts b/src/lib/generated/classes/call-task.ts index b01c44db..c9eb4651 100644 --- a/src/lib/generated/classes/call-task.ts +++ b/src/lib/generated/classes/call-task.ts @@ -20,13 +20,15 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; import { _Timeout } from './timeout'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class CallTask extends ObjectHydrator { constructor(model?: Partial) { @@ -38,6 +40,19 @@ class CallTask extends ObjectHydrator { if (typeof model.export === 'object') self.export = new _Export(model.export as Specification.Export); if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout as Specification.Timeout); } + getLifecycleHook('CallTask')?.constructor?.(this); + } + + validate() { + const copy = new CallTask(this as any) as CallTask & Specification.CallTask; + getLifecycleHook('CallTask')?.preValidation?.(copy); + validate('CallTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('CallTask')?.postValidation?.(copy); + } + + normalize(): CallTask & Specification.CallTask { + const copy = new CallTask(this as any) as CallTask & Specification.CallTask; + return getLifecycleHook('CallTask')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/do-task.ts b/src/lib/generated/classes/do-task.ts index 9043b25f..485ee477 100644 --- a/src/lib/generated/classes/do-task.ts +++ b/src/lib/generated/classes/do-task.ts @@ -20,14 +20,16 @@ * *****************************************************************************************/ -import { _TaskBase } from './task-base'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; import { _Timeout } from './timeout'; import { _TaskList } from './task-list'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class DoTask extends _TaskBase { constructor(model?: Partial) { @@ -40,6 +42,19 @@ class DoTask extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.do === 'object') self.do = new _TaskList(model.do); } + getLifecycleHook('DoTask')?.constructor?.(this); + } + + validate() { + const copy = new DoTask(this as any) as DoTask & Specification.DoTask; + getLifecycleHook('DoTask')?.preValidation?.(copy); + validate('DoTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('DoTask')?.postValidation?.(copy); + } + + normalize(): DoTask & Specification.DoTask { + const copy = new DoTask(this as any) as DoTask & Specification.DoTask; + return getLifecycleHook('DoTask')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/document-tags.ts b/src/lib/generated/classes/document-tags.ts index b63b87a5..5d81eaf8 100644 --- a/src/lib/generated/classes/document-tags.ts +++ b/src/lib/generated/classes/document-tags.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class DocumentTags extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('DocumentTags')?.constructor?.(this); + } + + validate() { + const copy = new DocumentTags(this as any) as DocumentTags & Specification.DocumentTags; + getLifecycleHook('DocumentTags')?.preValidation?.(copy); + validate('DocumentTags', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('DocumentTags')?.postValidation?.(copy); + } + + normalize(): DocumentTags & Specification.DocumentTags { + const copy = new DocumentTags(this as any) as DocumentTags & Specification.DocumentTags; + return getLifecycleHook('DocumentTags')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/document.ts b/src/lib/generated/classes/document.ts index 42939f52..e121f46f 100644 --- a/src/lib/generated/classes/document.ts +++ b/src/lib/generated/classes/document.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _DocumentTags } from './document-tags'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class Document extends ObjectHydrator { constructor(model?: Partial) { @@ -32,6 +34,19 @@ class Document extends ObjectHydrator { if (isObject(model)) { if (typeof model.tags === 'object') self.tags = new _DocumentTags(model.tags); } + getLifecycleHook('Document')?.constructor?.(this); + } + + validate() { + const copy = new Document(this as any) as Document & Specification.Document; + getLifecycleHook('Document')?.preValidation?.(copy); + validate('Document', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('Document')?.postValidation?.(copy); + } + + normalize(): Document & Specification.Document { + const copy = new Document(this as any) as Document & Specification.Document; + return getLifecycleHook('Document')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/duration.ts b/src/lib/generated/classes/duration.ts index 460bcb20..9b4d0a0c 100644 --- a/src/lib/generated/classes/duration.ts +++ b/src/lib/generated/classes/duration.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class Duration extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('Duration')?.constructor?.(this); + } + + validate() { + const copy = new Duration(this as any) as Duration & Specification.Duration; + getLifecycleHook('Duration')?.preValidation?.(copy); + validate('Duration', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('Duration')?.postValidation?.(copy); + } + + normalize(): Duration & Specification.Duration { + const copy = new Duration(this as any) as Duration & Specification.Duration; + return getLifecycleHook('Duration')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/emit-task-emit-event.ts b/src/lib/generated/classes/emit-task-emit-event.ts index e6a6b4f7..00b50604 100644 --- a/src/lib/generated/classes/emit-task-emit-event.ts +++ b/src/lib/generated/classes/emit-task-emit-event.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class EmitTaskEmitEvent extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('EmitTaskEmitEvent')?.constructor?.(this); + } + + validate() { + const copy = new EmitTaskEmitEvent(this as any) as EmitTaskEmitEvent & Specification.EmitTaskEmitEvent; + getLifecycleHook('EmitTaskEmitEvent')?.preValidation?.(copy); + validate('EmitTaskEmitEvent', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('EmitTaskEmitEvent')?.postValidation?.(copy); + } + + normalize(): EmitTaskEmitEvent & Specification.EmitTaskEmitEvent { + const copy = new EmitTaskEmitEvent(this as any) as EmitTaskEmitEvent & Specification.EmitTaskEmitEvent; + return getLifecycleHook('EmitTaskEmitEvent')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/emit-task-emit.ts b/src/lib/generated/classes/emit-task-emit.ts index 1c1336e2..64ec6979 100644 --- a/src/lib/generated/classes/emit-task-emit.ts +++ b/src/lib/generated/classes/emit-task-emit.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _EmitTaskEmitEvent } from './emit-task-emit-event'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class EmitTaskEmit extends ObjectHydrator { constructor(model?: Partial) { @@ -32,6 +34,19 @@ class EmitTaskEmit extends ObjectHydrator { if (isObject(model)) { if (typeof model.event === 'object') self.event = new _EmitTaskEmitEvent(model.event); } + getLifecycleHook('EmitTaskEmit')?.constructor?.(this); + } + + validate() { + const copy = new EmitTaskEmit(this as any) as EmitTaskEmit & Specification.EmitTaskEmit; + getLifecycleHook('EmitTaskEmit')?.preValidation?.(copy); + validate('EmitTaskEmit', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('EmitTaskEmit')?.postValidation?.(copy); + } + + normalize(): EmitTaskEmit & Specification.EmitTaskEmit { + const copy = new EmitTaskEmit(this as any) as EmitTaskEmit & Specification.EmitTaskEmit; + return getLifecycleHook('EmitTaskEmit')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/emit-task.ts b/src/lib/generated/classes/emit-task.ts index 2836795a..0ee74122 100644 --- a/src/lib/generated/classes/emit-task.ts +++ b/src/lib/generated/classes/emit-task.ts @@ -20,14 +20,16 @@ * *****************************************************************************************/ -import { _TaskBase } from './task-base'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; import { _Timeout } from './timeout'; import { _EmitTaskEmit } from './emit-task-emit'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class EmitTask extends _TaskBase { constructor(model?: Partial) { @@ -40,6 +42,19 @@ class EmitTask extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.emit === 'object') self.emit = new _EmitTaskEmit(model.emit); } + getLifecycleHook('EmitTask')?.constructor?.(this); + } + + validate() { + const copy = new EmitTask(this as any) as EmitTask & Specification.EmitTask; + getLifecycleHook('EmitTask')?.preValidation?.(copy); + validate('EmitTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('EmitTask')?.postValidation?.(copy); + } + + normalize(): EmitTask & Specification.EmitTask { + const copy = new EmitTask(this as any) as EmitTask & Specification.EmitTask; + return getLifecycleHook('EmitTask')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/endpoint-authentication.ts b/src/lib/generated/classes/endpoint-authentication.ts index f270c610..4ab68584 100644 --- a/src/lib/generated/classes/endpoint-authentication.ts +++ b/src/lib/generated/classes/endpoint-authentication.ts @@ -20,12 +20,14 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class EndpointAuthentication extends ObjectHydrator { constructor(model?: Partial) { @@ -39,6 +41,21 @@ class EndpointAuthentication extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('Endpoint')?.constructor?.(this); + } + + validate() { + const copy = new Endpoint(this as any) as Endpoint & Specification.Endpoint; + getLifecycleHook('Endpoint')?.preValidation?.(copy); + validate('Endpoint', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('Endpoint')?.postValidation?.(copy); + } + + normalize(): Endpoint & Specification.Endpoint { + const copy = new Endpoint(this as any) as Endpoint & Specification.Endpoint; + return getLifecycleHook('Endpoint')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/error.ts b/src/lib/generated/classes/error.ts index 8f9ebe9f..4098ce3c 100644 --- a/src/lib/generated/classes/error.ts +++ b/src/lib/generated/classes/error.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class Error extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('Error')?.constructor?.(this); + } + + validate() { + const copy = new Error(this as any) as Error & Specification.Error; + getLifecycleHook('Error')?.preValidation?.(copy); + validate('Error', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('Error')?.postValidation?.(copy); + } + + normalize(): Error & Specification.Error { + const copy = new Error(this as any) as Error & Specification.Error; + return getLifecycleHook('Error')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/event-consumption-strategy-all.ts b/src/lib/generated/classes/event-consumption-strategy-all.ts index ef5fc9f3..499f8d26 100644 --- a/src/lib/generated/classes/event-consumption-strategy-all.ts +++ b/src/lib/generated/classes/event-consumption-strategy-all.ts @@ -23,6 +23,9 @@ import { _EventFilter } from './event-filter'; import { Specification } from '../definitions'; import { ArrayHydrator } from '../../hydrator'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class EventConsumptionStrategyAll extends ArrayHydrator { constructor(model?: Array | number) { @@ -34,6 +37,19 @@ class EventConsumptionStrategyAll extends ArrayHydrator { constructor(model?: Array | number) { @@ -34,6 +37,19 @@ class EventConsumptionStrategyAny extends ArrayHydrator { constructor(model?: Partial) { @@ -38,6 +40,21 @@ class EventConsumptionStrategy extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('EventFilterCorrelate')?.constructor?.(this); + } + + validate() { + const copy = new EventFilterCorrelate(this as any) as EventFilterCorrelate & Specification.EventFilterCorrelate; + getLifecycleHook('EventFilterCorrelate')?.preValidation?.(copy); + validate('EventFilterCorrelate', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('EventFilterCorrelate')?.postValidation?.(copy); + } + + normalize(): EventFilterCorrelate & Specification.EventFilterCorrelate { + const copy = new EventFilterCorrelate(this as any) as EventFilterCorrelate & Specification.EventFilterCorrelate; + return getLifecycleHook('EventFilterCorrelate')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/event-filter-with.ts b/src/lib/generated/classes/event-filter-with.ts index e891216e..22ad735f 100644 --- a/src/lib/generated/classes/event-filter-with.ts +++ b/src/lib/generated/classes/event-filter-with.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class EventFilterWith extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('EventFilterWith')?.constructor?.(this); + } + + validate() { + const copy = new EventFilterWith(this as any) as EventFilterWith & Specification.EventFilterWith; + getLifecycleHook('EventFilterWith')?.preValidation?.(copy); + validate('EventFilterWith', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('EventFilterWith')?.postValidation?.(copy); + } + + normalize(): EventFilterWith & Specification.EventFilterWith { + const copy = new EventFilterWith(this as any) as EventFilterWith & Specification.EventFilterWith; + return getLifecycleHook('EventFilterWith')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/event-filter.ts b/src/lib/generated/classes/event-filter.ts index 328e050a..2500ac36 100644 --- a/src/lib/generated/classes/event-filter.ts +++ b/src/lib/generated/classes/event-filter.ts @@ -20,11 +20,13 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _EventFilterWith } from './event-filter-with'; import { _EventFilterCorrelate } from './event-filter-correlate'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class EventFilter extends ObjectHydrator { constructor(model?: Partial) { @@ -34,6 +36,19 @@ class EventFilter extends ObjectHydrator { if (typeof model.with === 'object') self.with = new _EventFilterWith(model.with); if (typeof model.correlate === 'object') self.correlate = new _EventFilterCorrelate(model.correlate); } + getLifecycleHook('EventFilter')?.constructor?.(this); + } + + validate() { + const copy = new EventFilter(this as any) as EventFilter & Specification.EventFilter; + getLifecycleHook('EventFilter')?.preValidation?.(copy); + validate('EventFilter', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('EventFilter')?.postValidation?.(copy); + } + + normalize(): EventFilter & Specification.EventFilter { + const copy = new EventFilter(this as any) as EventFilter & Specification.EventFilter; + return getLifecycleHook('EventFilter')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/export.ts b/src/lib/generated/classes/export.ts index 5fe3b2b4..e6d3721f 100644 --- a/src/lib/generated/classes/export.ts +++ b/src/lib/generated/classes/export.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class Export extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('Export')?.constructor?.(this); + } + + validate() { + const copy = new Export(this as any) as Export & Specification.Export; + getLifecycleHook('Export')?.preValidation?.(copy); + validate('Export', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('Export')?.postValidation?.(copy); + } + + normalize(): Export & Specification.Export { + const copy = new Export(this as any) as Export & Specification.Export; + return getLifecycleHook('Export')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/extension.ts b/src/lib/generated/classes/extension.ts index 0cb3d007..54ba1ea0 100644 --- a/src/lib/generated/classes/extension.ts +++ b/src/lib/generated/classes/extension.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _TaskList } from './task-list'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class Extension extends ObjectHydrator { constructor(model?: Partial) { @@ -33,6 +35,19 @@ class Extension extends ObjectHydrator { if (typeof model.before === 'object') self.before = new _TaskList(model.before); if (typeof model.after === 'object') self.after = new _TaskList(model.after); } + getLifecycleHook('Extension')?.constructor?.(this); + } + + validate() { + const copy = new Extension(this as any) as Extension & Specification.Extension; + getLifecycleHook('Extension')?.preValidation?.(copy); + validate('Extension', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('Extension')?.postValidation?.(copy); + } + + normalize(): Extension & Specification.Extension { + const copy = new Extension(this as any) as Extension & Specification.Extension; + return getLifecycleHook('Extension')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/external-resource-authentication.ts b/src/lib/generated/classes/external-resource-authentication.ts index e664dc4c..41ea5147 100644 --- a/src/lib/generated/classes/external-resource-authentication.ts +++ b/src/lib/generated/classes/external-resource-authentication.ts @@ -20,12 +20,14 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class ExternalResourceAuthentication extends ObjectHydrator { constructor(model?: Partial) { @@ -39,6 +41,21 @@ class ExternalResourceAuthentication extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('ExternalResource')?.constructor?.(this); + } + + validate() { + const copy = new ExternalResource(this as any) as ExternalResource & Specification.ExternalResource; + getLifecycleHook('ExternalResource')?.preValidation?.(copy); + validate('ExternalResource', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('ExternalResource')?.postValidation?.(copy); + } + + normalize(): ExternalResource & Specification.ExternalResource { + const copy = new ExternalResource(this as any) as ExternalResource & Specification.ExternalResource; + return getLifecycleHook('ExternalResource')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/flow-directive.ts b/src/lib/generated/classes/flow-directive.ts index 71bcda94..ebf3ab97 100644 --- a/src/lib/generated/classes/flow-directive.ts +++ b/src/lib/generated/classes/flow-directive.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class FlowDirective extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('FlowDirective')?.constructor?.(this); + } + + validate() { + const copy = new FlowDirective(this as any) as FlowDirective & Specification.FlowDirective; + getLifecycleHook('FlowDirective')?.preValidation?.(copy); + validate('FlowDirective', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('FlowDirective')?.postValidation?.(copy); + } + + normalize(): FlowDirective & Specification.FlowDirective { + const copy = new FlowDirective(this as any) as FlowDirective & Specification.FlowDirective; + return getLifecycleHook('FlowDirective')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/for-task-for.ts b/src/lib/generated/classes/for-task-for.ts index 6df46a44..dd07e124 100644 --- a/src/lib/generated/classes/for-task-for.ts +++ b/src/lib/generated/classes/for-task-for.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class ForTaskFor extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('ForTaskFor')?.constructor?.(this); + } + + validate() { + const copy = new ForTaskFor(this as any) as ForTaskFor & Specification.ForTaskFor; + getLifecycleHook('ForTaskFor')?.preValidation?.(copy); + validate('ForTaskFor', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('ForTaskFor')?.postValidation?.(copy); + } + + normalize(): ForTaskFor & Specification.ForTaskFor { + const copy = new ForTaskFor(this as any) as ForTaskFor & Specification.ForTaskFor; + return getLifecycleHook('ForTaskFor')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/for-task.ts b/src/lib/generated/classes/for-task.ts index 62f5eb21..09112e97 100644 --- a/src/lib/generated/classes/for-task.ts +++ b/src/lib/generated/classes/for-task.ts @@ -20,15 +20,17 @@ * *****************************************************************************************/ -import { _TaskBase } from './task-base'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; import { _Timeout } from './timeout'; import { _ForTaskFor } from './for-task-for'; import { _TaskList } from './task-list'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class ForTask extends _TaskBase { constructor(model?: Partial) { @@ -42,6 +44,19 @@ class ForTask extends _TaskBase { if (typeof model.for === 'object') self.for = new _ForTaskFor(model.for); if (typeof model.do === 'object') self.do = new _TaskList(model.do); } + getLifecycleHook('ForTask')?.constructor?.(this); + } + + validate() { + const copy = new ForTask(this as any) as ForTask & Specification.ForTask; + getLifecycleHook('ForTask')?.preValidation?.(copy); + validate('ForTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('ForTask')?.postValidation?.(copy); + } + + normalize(): ForTask & Specification.ForTask { + const copy = new ForTask(this as any) as ForTask & Specification.ForTask; + return getLifecycleHook('ForTask')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/fork-task-fork.ts b/src/lib/generated/classes/fork-task-fork.ts index 03c302d4..3a54782b 100644 --- a/src/lib/generated/classes/fork-task-fork.ts +++ b/src/lib/generated/classes/fork-task-fork.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _TaskList } from './task-list'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class ForkTaskFork extends ObjectHydrator { constructor(model?: Partial) { @@ -32,6 +34,19 @@ class ForkTaskFork extends ObjectHydrator { if (isObject(model)) { if (typeof model.branches === 'object') self.branches = new _TaskList(model.branches); } + getLifecycleHook('ForkTaskFork')?.constructor?.(this); + } + + validate() { + const copy = new ForkTaskFork(this as any) as ForkTaskFork & Specification.ForkTaskFork; + getLifecycleHook('ForkTaskFork')?.preValidation?.(copy); + validate('ForkTaskFork', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('ForkTaskFork')?.postValidation?.(copy); + } + + normalize(): ForkTaskFork & Specification.ForkTaskFork { + const copy = new ForkTaskFork(this as any) as ForkTaskFork & Specification.ForkTaskFork; + return getLifecycleHook('ForkTaskFork')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/fork-task.ts b/src/lib/generated/classes/fork-task.ts index f6db2fea..88cf5a4b 100644 --- a/src/lib/generated/classes/fork-task.ts +++ b/src/lib/generated/classes/fork-task.ts @@ -20,14 +20,16 @@ * *****************************************************************************************/ -import { _TaskBase } from './task-base'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; import { _Timeout } from './timeout'; import { _ForkTaskFork } from './fork-task-fork'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class ForkTask extends _TaskBase { constructor(model?: Partial) { @@ -40,6 +42,19 @@ class ForkTask extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.fork === 'object') self.fork = new _ForkTaskFork(model.fork); } + getLifecycleHook('ForkTask')?.constructor?.(this); + } + + validate() { + const copy = new ForkTask(this as any) as ForkTask & Specification.ForkTask; + getLifecycleHook('ForkTask')?.preValidation?.(copy); + validate('ForkTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('ForkTask')?.postValidation?.(copy); + } + + normalize(): ForkTask & Specification.ForkTask { + const copy = new ForkTask(this as any) as ForkTask & Specification.ForkTask; + return getLifecycleHook('ForkTask')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/input.ts b/src/lib/generated/classes/input.ts index e1610703..200453c8 100644 --- a/src/lib/generated/classes/input.ts +++ b/src/lib/generated/classes/input.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class Input extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('Input')?.constructor?.(this); + } + + validate() { + const copy = new Input(this as any) as Input & Specification.Input; + getLifecycleHook('Input')?.preValidation?.(copy); + validate('Input', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('Input')?.postValidation?.(copy); + } + + normalize(): Input & Specification.Input { + const copy = new Input(this as any) as Input & Specification.Input; + return getLifecycleHook('Input')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/listen-task-listen.ts b/src/lib/generated/classes/listen-task-listen.ts index fc3e5ee5..da2f9e34 100644 --- a/src/lib/generated/classes/listen-task-listen.ts +++ b/src/lib/generated/classes/listen-task-listen.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class ListenTaskListen extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('ListenTaskListen')?.constructor?.(this); + } + + validate() { + const copy = new ListenTaskListen(this as any) as ListenTaskListen & Specification.ListenTaskListen; + getLifecycleHook('ListenTaskListen')?.preValidation?.(copy); + validate('ListenTaskListen', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('ListenTaskListen')?.postValidation?.(copy); + } + + normalize(): ListenTaskListen & Specification.ListenTaskListen { + const copy = new ListenTaskListen(this as any) as ListenTaskListen & Specification.ListenTaskListen; + return getLifecycleHook('ListenTaskListen')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/listen-task.ts b/src/lib/generated/classes/listen-task.ts index 0da18b5a..ff9a348a 100644 --- a/src/lib/generated/classes/listen-task.ts +++ b/src/lib/generated/classes/listen-task.ts @@ -20,14 +20,16 @@ * *****************************************************************************************/ -import { _TaskBase } from './task-base'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; import { _Timeout } from './timeout'; import { _ListenTaskListen } from './listen-task-listen'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class ListenTask extends _TaskBase { constructor(model?: Partial) { @@ -40,6 +42,19 @@ class ListenTask extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.listen === 'object') self.listen = new _ListenTaskListen(model.listen); } + getLifecycleHook('ListenTask')?.constructor?.(this); + } + + validate() { + const copy = new ListenTask(this as any) as ListenTask & Specification.ListenTask; + getLifecycleHook('ListenTask')?.preValidation?.(copy); + validate('ListenTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('ListenTask')?.postValidation?.(copy); + } + + normalize(): ListenTask & Specification.ListenTask { + const copy = new ListenTask(this as any) as ListenTask & Specification.ListenTask; + return getLifecycleHook('ListenTask')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/oauth2-token.ts b/src/lib/generated/classes/oauth2-token.ts index d5676dc5..649089ba 100644 --- a/src/lib/generated/classes/oauth2-token.ts +++ b/src/lib/generated/classes/oauth2-token.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class Oauth2Token extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('Oauth2Token')?.constructor?.(this); + } + + validate() { + const copy = new Oauth2Token(this as any) as Oauth2Token & Specification.Oauth2Token; + getLifecycleHook('Oauth2Token')?.preValidation?.(copy); + validate('Oauth2Token', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('Oauth2Token')?.postValidation?.(copy); + } + + normalize(): Oauth2Token & Specification.Oauth2Token { + const copy = new Oauth2Token(this as any) as Oauth2Token & Specification.Oauth2Token; + return getLifecycleHook('Oauth2Token')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/output.ts b/src/lib/generated/classes/output.ts index ce6a3ad1..a515de31 100644 --- a/src/lib/generated/classes/output.ts +++ b/src/lib/generated/classes/output.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class Output extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('Output')?.constructor?.(this); + } + + validate() { + const copy = new Output(this as any) as Output & Specification.Output; + getLifecycleHook('Output')?.preValidation?.(copy); + validate('Output', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('Output')?.postValidation?.(copy); + } + + normalize(): Output & Specification.Output { + const copy = new Output(this as any) as Output & Specification.Output; + return getLifecycleHook('Output')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/raise-task-raise.ts b/src/lib/generated/classes/raise-task-raise.ts index 8592c001..dce0f85e 100644 --- a/src/lib/generated/classes/raise-task-raise.ts +++ b/src/lib/generated/classes/raise-task-raise.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _Error } from './error'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class RaiseTaskRaise extends ObjectHydrator { constructor(model?: Partial) { @@ -32,6 +34,19 @@ class RaiseTaskRaise extends ObjectHydrator { if (isObject(model)) { if (typeof model.error === 'object') self.error = new _Error(model.error); } + getLifecycleHook('RaiseTaskRaise')?.constructor?.(this); + } + + validate() { + const copy = new RaiseTaskRaise(this as any) as RaiseTaskRaise & Specification.RaiseTaskRaise; + getLifecycleHook('RaiseTaskRaise')?.preValidation?.(copy); + validate('RaiseTaskRaise', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('RaiseTaskRaise')?.postValidation?.(copy); + } + + normalize(): RaiseTaskRaise & Specification.RaiseTaskRaise { + const copy = new RaiseTaskRaise(this as any) as RaiseTaskRaise & Specification.RaiseTaskRaise; + return getLifecycleHook('RaiseTaskRaise')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/raise-task.ts b/src/lib/generated/classes/raise-task.ts index e8d7f484..113a9d72 100644 --- a/src/lib/generated/classes/raise-task.ts +++ b/src/lib/generated/classes/raise-task.ts @@ -20,14 +20,16 @@ * *****************************************************************************************/ -import { _TaskBase } from './task-base'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; import { _Timeout } from './timeout'; import { _RaiseTaskRaise } from './raise-task-raise'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class RaiseTask extends _TaskBase { constructor(model?: Partial) { @@ -40,6 +42,19 @@ class RaiseTask extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.raise === 'object') self.raise = new _RaiseTaskRaise(model.raise); } + getLifecycleHook('RaiseTask')?.constructor?.(this); + } + + validate() { + const copy = new RaiseTask(this as any) as RaiseTask & Specification.RaiseTask; + getLifecycleHook('RaiseTask')?.preValidation?.(copy); + validate('RaiseTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('RaiseTask')?.postValidation?.(copy); + } + + normalize(): RaiseTask & Specification.RaiseTask { + const copy = new RaiseTask(this as any) as RaiseTask & Specification.RaiseTask; + return getLifecycleHook('RaiseTask')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/retry-policy-backoff.ts b/src/lib/generated/classes/retry-policy-backoff.ts index 5a08321f..e04bca75 100644 --- a/src/lib/generated/classes/retry-policy-backoff.ts +++ b/src/lib/generated/classes/retry-policy-backoff.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class RetryPolicyBackoff extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('RetryPolicyBackoff')?.constructor?.(this); + } + + validate() { + const copy = new RetryPolicyBackoff(this as any) as RetryPolicyBackoff & Specification.RetryPolicyBackoff; + getLifecycleHook('RetryPolicyBackoff')?.preValidation?.(copy); + validate('RetryPolicyBackoff', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('RetryPolicyBackoff')?.postValidation?.(copy); + } + + normalize(): RetryPolicyBackoff & Specification.RetryPolicyBackoff { + const copy = new RetryPolicyBackoff(this as any) as RetryPolicyBackoff & Specification.RetryPolicyBackoff; + return getLifecycleHook('RetryPolicyBackoff')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/retry-policy-jitter.ts b/src/lib/generated/classes/retry-policy-jitter.ts index 7a6927d0..995b3203 100644 --- a/src/lib/generated/classes/retry-policy-jitter.ts +++ b/src/lib/generated/classes/retry-policy-jitter.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _Duration } from './duration'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class RetryPolicyJitter extends ObjectHydrator { constructor(model?: Partial) { @@ -33,6 +35,19 @@ class RetryPolicyJitter extends ObjectHydrator if (typeof model.from === 'object') self.from = new _Duration(model.from); if (typeof model.to === 'object') self.to = new _Duration(model.to); } + getLifecycleHook('RetryPolicyJitter')?.constructor?.(this); + } + + validate() { + const copy = new RetryPolicyJitter(this as any) as RetryPolicyJitter & Specification.RetryPolicyJitter; + getLifecycleHook('RetryPolicyJitter')?.preValidation?.(copy); + validate('RetryPolicyJitter', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('RetryPolicyJitter')?.postValidation?.(copy); + } + + normalize(): RetryPolicyJitter & Specification.RetryPolicyJitter { + const copy = new RetryPolicyJitter(this as any) as RetryPolicyJitter & Specification.RetryPolicyJitter; + return getLifecycleHook('RetryPolicyJitter')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/retry-policy-limit-attempt.ts b/src/lib/generated/classes/retry-policy-limit-attempt.ts index 39c2b584..fbde2fe8 100644 --- a/src/lib/generated/classes/retry-policy-limit-attempt.ts +++ b/src/lib/generated/classes/retry-policy-limit-attempt.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _Duration } from './duration'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class RetryPolicyLimitAttempt extends ObjectHydrator { constructor(model?: Partial) { @@ -32,6 +34,21 @@ class RetryPolicyLimitAttempt extends ObjectHydrator { constructor(model?: Partial) { @@ -34,6 +36,19 @@ class RetryPolicyLimit extends ObjectHydrator { if (typeof model.attempt === 'object') self.attempt = new _RetryPolicyLimitAttempt(model.attempt); if (typeof model.duration === 'object') self.duration = new _Duration(model.duration); } + getLifecycleHook('RetryPolicyLimit')?.constructor?.(this); + } + + validate() { + const copy = new RetryPolicyLimit(this as any) as RetryPolicyLimit & Specification.RetryPolicyLimit; + getLifecycleHook('RetryPolicyLimit')?.preValidation?.(copy); + validate('RetryPolicyLimit', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('RetryPolicyLimit')?.postValidation?.(copy); + } + + normalize(): RetryPolicyLimit & Specification.RetryPolicyLimit { + const copy = new RetryPolicyLimit(this as any) as RetryPolicyLimit & Specification.RetryPolicyLimit; + return getLifecycleHook('RetryPolicyLimit')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/retry-policy.ts b/src/lib/generated/classes/retry-policy.ts index 77978bf5..aaa63e49 100644 --- a/src/lib/generated/classes/retry-policy.ts +++ b/src/lib/generated/classes/retry-policy.ts @@ -20,12 +20,14 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _Duration } from './duration'; import { _RetryPolicyLimit } from './retry-policy-limit'; import { _RetryPolicyJitter } from './retry-policy-jitter'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class RetryPolicy extends ObjectHydrator { constructor(model?: Partial) { @@ -36,6 +38,19 @@ class RetryPolicy extends ObjectHydrator { if (typeof model.limit === 'object') self.limit = new _RetryPolicyLimit(model.limit); if (typeof model.jitter === 'object') self.jitter = new _RetryPolicyJitter(model.jitter); } + getLifecycleHook('RetryPolicy')?.constructor?.(this); + } + + validate() { + const copy = new RetryPolicy(this as any) as RetryPolicy & Specification.RetryPolicy; + getLifecycleHook('RetryPolicy')?.preValidation?.(copy); + validate('RetryPolicy', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('RetryPolicy')?.postValidation?.(copy); + } + + normalize(): RetryPolicy & Specification.RetryPolicy { + const copy = new RetryPolicy(this as any) as RetryPolicy & Specification.RetryPolicy; + return getLifecycleHook('RetryPolicy')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/run-task-run-container.ts b/src/lib/generated/classes/run-task-run-container.ts index 8046e40f..8f6eed7c 100644 --- a/src/lib/generated/classes/run-task-run-container.ts +++ b/src/lib/generated/classes/run-task-run-container.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class RunTaskRunContainer extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('RunTaskRunContainer')?.constructor?.(this); + } + + validate() { + const copy = new RunTaskRunContainer(this as any) as RunTaskRunContainer & Specification.RunTaskRunContainer; + getLifecycleHook('RunTaskRunContainer')?.preValidation?.(copy); + validate('RunTaskRunContainer', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('RunTaskRunContainer')?.postValidation?.(copy); + } + + normalize(): RunTaskRunContainer & Specification.RunTaskRunContainer { + const copy = new RunTaskRunContainer(this as any) as RunTaskRunContainer & Specification.RunTaskRunContainer; + return getLifecycleHook('RunTaskRunContainer')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/run-task-run-script.ts b/src/lib/generated/classes/run-task-run-script.ts index b53cea07..82ee437f 100644 --- a/src/lib/generated/classes/run-task-run-script.ts +++ b/src/lib/generated/classes/run-task-run-script.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class RunTaskRunScript extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('RunTaskRunScript')?.constructor?.(this); + } + + validate() { + const copy = new RunTaskRunScript(this as any) as RunTaskRunScript & Specification.RunTaskRunScript; + getLifecycleHook('RunTaskRunScript')?.preValidation?.(copy); + validate('RunTaskRunScript', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('RunTaskRunScript')?.postValidation?.(copy); + } + + normalize(): RunTaskRunScript & Specification.RunTaskRunScript { + const copy = new RunTaskRunScript(this as any) as RunTaskRunScript & Specification.RunTaskRunScript; + return getLifecycleHook('RunTaskRunScript')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/run-task-run-shell-arguments.ts b/src/lib/generated/classes/run-task-run-shell-arguments.ts index 3c1d3c29..6e56f7e4 100644 --- a/src/lib/generated/classes/run-task-run-shell-arguments.ts +++ b/src/lib/generated/classes/run-task-run-shell-arguments.ts @@ -21,12 +21,30 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class RunTaskRunShellArguments extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('RunTaskRunShellArguments')?.constructor?.(this); + } + + validate() { + const copy = new RunTaskRunShellArguments(this as any) as RunTaskRunShellArguments & + Specification.RunTaskRunShellArguments; + getLifecycleHook('RunTaskRunShellArguments')?.preValidation?.(copy); + validate('RunTaskRunShellArguments', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('RunTaskRunShellArguments')?.postValidation?.(copy); + } + + normalize(): RunTaskRunShellArguments & Specification.RunTaskRunShellArguments { + const copy = new RunTaskRunShellArguments(this as any) as RunTaskRunShellArguments & + Specification.RunTaskRunShellArguments; + return getLifecycleHook('RunTaskRunShellArguments')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/run-task-run-shell-environment.ts b/src/lib/generated/classes/run-task-run-shell-environment.ts index b4439a3a..a3851e45 100644 --- a/src/lib/generated/classes/run-task-run-shell-environment.ts +++ b/src/lib/generated/classes/run-task-run-shell-environment.ts @@ -21,12 +21,30 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class RunTaskRunShellEnvironment extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('RunTaskRunShellEnvironment')?.constructor?.(this); + } + + validate() { + const copy = new RunTaskRunShellEnvironment(this as any) as RunTaskRunShellEnvironment & + Specification.RunTaskRunShellEnvironment; + getLifecycleHook('RunTaskRunShellEnvironment')?.preValidation?.(copy); + validate('RunTaskRunShellEnvironment', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('RunTaskRunShellEnvironment')?.postValidation?.(copy); + } + + normalize(): RunTaskRunShellEnvironment & Specification.RunTaskRunShellEnvironment { + const copy = new RunTaskRunShellEnvironment(this as any) as RunTaskRunShellEnvironment & + Specification.RunTaskRunShellEnvironment; + return getLifecycleHook('RunTaskRunShellEnvironment')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/run-task-run-shell.ts b/src/lib/generated/classes/run-task-run-shell.ts index 3a2603b0..b5a81788 100644 --- a/src/lib/generated/classes/run-task-run-shell.ts +++ b/src/lib/generated/classes/run-task-run-shell.ts @@ -20,11 +20,13 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _RunTaskRunShellArguments } from './run-task-run-shell-arguments'; import { _RunTaskRunShellEnvironment } from './run-task-run-shell-environment'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class RunTaskRunShell extends ObjectHydrator { constructor(model?: Partial) { @@ -34,6 +36,19 @@ class RunTaskRunShell extends ObjectHydrator { if (typeof model.arguments === 'object') self.arguments = new _RunTaskRunShellArguments(model.arguments); if (typeof model.environment === 'object') self.environment = new _RunTaskRunShellEnvironment(model.environment); } + getLifecycleHook('RunTaskRunShell')?.constructor?.(this); + } + + validate() { + const copy = new RunTaskRunShell(this as any) as RunTaskRunShell & Specification.RunTaskRunShell; + getLifecycleHook('RunTaskRunShell')?.preValidation?.(copy); + validate('RunTaskRunShell', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('RunTaskRunShell')?.postValidation?.(copy); + } + + normalize(): RunTaskRunShell & Specification.RunTaskRunShell { + const copy = new RunTaskRunShell(this as any) as RunTaskRunShell & Specification.RunTaskRunShell; + return getLifecycleHook('RunTaskRunShell')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/run-task-run-workflow-input.ts b/src/lib/generated/classes/run-task-run-workflow-input.ts index 5b26157b..5cc36e2f 100644 --- a/src/lib/generated/classes/run-task-run-workflow-input.ts +++ b/src/lib/generated/classes/run-task-run-workflow-input.ts @@ -21,12 +21,30 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class RunTaskRunWorkflowInput extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('RunTaskRunWorkflowInput')?.constructor?.(this); + } + + validate() { + const copy = new RunTaskRunWorkflowInput(this as any) as RunTaskRunWorkflowInput & + Specification.RunTaskRunWorkflowInput; + getLifecycleHook('RunTaskRunWorkflowInput')?.preValidation?.(copy); + validate('RunTaskRunWorkflowInput', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('RunTaskRunWorkflowInput')?.postValidation?.(copy); + } + + normalize(): RunTaskRunWorkflowInput & Specification.RunTaskRunWorkflowInput { + const copy = new RunTaskRunWorkflowInput(this as any) as RunTaskRunWorkflowInput & + Specification.RunTaskRunWorkflowInput; + return getLifecycleHook('RunTaskRunWorkflowInput')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/run-task-run-workflow.ts b/src/lib/generated/classes/run-task-run-workflow.ts index de11e52e..c4e1fff1 100644 --- a/src/lib/generated/classes/run-task-run-workflow.ts +++ b/src/lib/generated/classes/run-task-run-workflow.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _RunTaskRunWorkflowInput } from './run-task-run-workflow-input'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class RunTaskRunWorkflow extends ObjectHydrator { constructor(model?: Partial) { @@ -32,6 +34,19 @@ class RunTaskRunWorkflow extends ObjectHydrator { constructor(model?: Partial) { @@ -39,6 +41,19 @@ class RunTaskRun extends ObjectHydrator { if (typeof model.workflow === 'object') self.workflow = new _RunTaskRunWorkflow(model.workflow as Specification.RunTaskRunWorkflow); } + getLifecycleHook('RunTaskRun')?.constructor?.(this); + } + + validate() { + const copy = new RunTaskRun(this as any) as RunTaskRun & Specification.RunTaskRun; + getLifecycleHook('RunTaskRun')?.preValidation?.(copy); + validate('RunTaskRun', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('RunTaskRun')?.postValidation?.(copy); + } + + normalize(): RunTaskRun & Specification.RunTaskRun { + const copy = new RunTaskRun(this as any) as RunTaskRun & Specification.RunTaskRun; + return getLifecycleHook('RunTaskRun')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/run-task.ts b/src/lib/generated/classes/run-task.ts index cc17c05a..a7ad9125 100644 --- a/src/lib/generated/classes/run-task.ts +++ b/src/lib/generated/classes/run-task.ts @@ -20,13 +20,15 @@ * *****************************************************************************************/ -import { _TaskBase } from './task-base'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; import { _Timeout } from './timeout'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class RunTask extends _TaskBase { constructor(model?: Partial) { @@ -38,6 +40,19 @@ class RunTask extends _TaskBase { if (typeof model.export === 'object') self.export = new _Export(model.export); if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); } + getLifecycleHook('RunTask')?.constructor?.(this); + } + + validate() { + const copy = new RunTask(this as any) as RunTask & Specification.RunTask; + getLifecycleHook('RunTask')?.preValidation?.(copy); + validate('RunTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('RunTask')?.postValidation?.(copy); + } + + normalize(): RunTask & Specification.RunTask { + const copy = new RunTask(this as any) as RunTask & Specification.RunTask; + return getLifecycleHook('RunTask')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/schedule.ts b/src/lib/generated/classes/schedule.ts index 35c28334..2e659a51 100644 --- a/src/lib/generated/classes/schedule.ts +++ b/src/lib/generated/classes/schedule.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _Duration } from './duration'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class Schedule extends ObjectHydrator { constructor(model?: Partial) { @@ -33,6 +35,19 @@ class Schedule extends ObjectHydrator { if (typeof model.every === 'object') self.every = new _Duration(model.every); if (typeof model.after === 'object') self.after = new _Duration(model.after); } + getLifecycleHook('Schedule')?.constructor?.(this); + } + + validate() { + const copy = new Schedule(this as any) as Schedule & Specification.Schedule; + getLifecycleHook('Schedule')?.preValidation?.(copy); + validate('Schedule', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('Schedule')?.postValidation?.(copy); + } + + normalize(): Schedule & Specification.Schedule { + const copy = new Schedule(this as any) as Schedule & Specification.Schedule; + return getLifecycleHook('Schedule')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/schema.ts b/src/lib/generated/classes/schema.ts index 4c11a4ac..155aa00d 100644 --- a/src/lib/generated/classes/schema.ts +++ b/src/lib/generated/classes/schema.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class Schema extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('Schema')?.constructor?.(this); + } + + validate() { + const copy = new Schema(this as any) as Schema & Specification.Schema; + getLifecycleHook('Schema')?.preValidation?.(copy); + validate('Schema', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('Schema')?.postValidation?.(copy); + } + + normalize(): Schema & Specification.Schema { + const copy = new Schema(this as any) as Schema & Specification.Schema; + return getLifecycleHook('Schema')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/set-task-set.ts b/src/lib/generated/classes/set-task-set.ts index 7bf199b5..d96dff8f 100644 --- a/src/lib/generated/classes/set-task-set.ts +++ b/src/lib/generated/classes/set-task-set.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class SetTaskSet extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('SetTaskSet')?.constructor?.(this); + } + + validate() { + const copy = new SetTaskSet(this as any) as SetTaskSet & Specification.SetTaskSet; + getLifecycleHook('SetTaskSet')?.preValidation?.(copy); + validate('SetTaskSet', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('SetTaskSet')?.postValidation?.(copy); + } + + normalize(): SetTaskSet & Specification.SetTaskSet { + const copy = new SetTaskSet(this as any) as SetTaskSet & Specification.SetTaskSet; + return getLifecycleHook('SetTaskSet')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/set-task.ts b/src/lib/generated/classes/set-task.ts index 87b54b1d..c9187c10 100644 --- a/src/lib/generated/classes/set-task.ts +++ b/src/lib/generated/classes/set-task.ts @@ -20,14 +20,16 @@ * *****************************************************************************************/ -import { _TaskBase } from './task-base'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; import { _Timeout } from './timeout'; import { _SetTaskSet } from './set-task-set'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class SetTask extends _TaskBase { constructor(model?: Partial) { @@ -40,6 +42,19 @@ class SetTask extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.set === 'object') self.set = new _SetTaskSet(model.set); } + getLifecycleHook('SetTask')?.constructor?.(this); + } + + validate() { + const copy = new SetTask(this as any) as SetTask & Specification.SetTask; + getLifecycleHook('SetTask')?.preValidation?.(copy); + validate('SetTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('SetTask')?.postValidation?.(copy); + } + + normalize(): SetTask & Specification.SetTask { + const copy = new SetTask(this as any) as SetTask & Specification.SetTask; + return getLifecycleHook('SetTask')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/switch-task-switch-case.ts b/src/lib/generated/classes/switch-task-switch-case.ts index c1e1c47c..b8420aed 100644 --- a/src/lib/generated/classes/switch-task-switch-case.ts +++ b/src/lib/generated/classes/switch-task-switch-case.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class SwitchTaskSwitchCase extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('SwitchTaskSwitchCase')?.constructor?.(this); + } + + validate() { + const copy = new SwitchTaskSwitchCase(this as any) as SwitchTaskSwitchCase & Specification.SwitchTaskSwitchCase; + getLifecycleHook('SwitchTaskSwitchCase')?.preValidation?.(copy); + validate('SwitchTaskSwitchCase', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('SwitchTaskSwitchCase')?.postValidation?.(copy); + } + + normalize(): SwitchTaskSwitchCase & Specification.SwitchTaskSwitchCase { + const copy = new SwitchTaskSwitchCase(this as any) as SwitchTaskSwitchCase & Specification.SwitchTaskSwitchCase; + return getLifecycleHook('SwitchTaskSwitchCase')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/switch-task-switch.ts b/src/lib/generated/classes/switch-task-switch.ts index af2efcac..f757afcf 100644 --- a/src/lib/generated/classes/switch-task-switch.ts +++ b/src/lib/generated/classes/switch-task-switch.ts @@ -23,6 +23,9 @@ import { _SwitchTaskSwitchCase } from './switch-task-switch-case'; import { Specification } from '../definitions'; import { ArrayHydrator } from '../../hydrator'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class SwitchTaskSwitch extends ArrayHydrator<{ [k: string]: Specification.SwitchTaskSwitchCase }> { constructor(model?: Array<{ [k: string]: Specification.SwitchTaskSwitchCase }> | number) { @@ -38,6 +41,19 @@ class SwitchTaskSwitch extends ArrayHydrator<{ [k: string]: Specification.Switch } } Object.setPrototypeOf(this, Object.create(SwitchTaskSwitch.prototype)); + getLifecycleHook('SwitchTaskSwitch')?.constructor?.(this); + } + + validate() { + const copy = new SwitchTaskSwitch(this); + getLifecycleHook('SwitchTaskSwitch')?.preValidation?.(copy); + validate('SwitchTaskSwitch', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('SwitchTaskSwitch')?.postValidation?.(copy); + } + + normalize(): SwitchTaskSwitch { + const copy = new SwitchTaskSwitch(this); + return getLifecycleHook('SwitchTaskSwitch')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/switch-task.ts b/src/lib/generated/classes/switch-task.ts index 4b36f36b..edecb91b 100644 --- a/src/lib/generated/classes/switch-task.ts +++ b/src/lib/generated/classes/switch-task.ts @@ -20,14 +20,16 @@ * *****************************************************************************************/ -import { _TaskBase } from './task-base'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; import { _Timeout } from './timeout'; import { _SwitchTaskSwitch } from './switch-task-switch'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class SwitchTask extends _TaskBase { constructor(model?: Partial) { @@ -39,8 +41,21 @@ class SwitchTask extends _TaskBase { if (typeof model.export === 'object') self.export = new _Export(model.export); if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.switch === 'object') - self.switch = new _SwitchTaskSwitch(model.switch) as Specification.SwitchTaskSwitch; + self.switch = new _SwitchTaskSwitch(model.switch) as unknown as Specification.SwitchTaskSwitch; } + getLifecycleHook('SwitchTask')?.constructor?.(this); + } + + validate() { + const copy = new SwitchTask(this as any) as SwitchTask & Specification.SwitchTask; + getLifecycleHook('SwitchTask')?.preValidation?.(copy); + validate('SwitchTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('SwitchTask')?.postValidation?.(copy); + } + + normalize(): SwitchTask & Specification.SwitchTask { + const copy = new SwitchTask(this as any) as SwitchTask & Specification.SwitchTask; + return getLifecycleHook('SwitchTask')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/task-base.ts b/src/lib/generated/classes/task-base.ts index 90798871..69200c11 100644 --- a/src/lib/generated/classes/task-base.ts +++ b/src/lib/generated/classes/task-base.ts @@ -20,13 +20,15 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; import { _Timeout } from './timeout'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class TaskBase extends ObjectHydrator { constructor(model?: Partial) { @@ -38,6 +40,19 @@ class TaskBase extends ObjectHydrator { if (typeof model.export === 'object') self.export = new _Export(model.export); if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); } + getLifecycleHook('TaskBase')?.constructor?.(this); + } + + validate() { + const copy = new TaskBase(this as any) as TaskBase & Specification.TaskBase; + getLifecycleHook('TaskBase')?.preValidation?.(copy); + validate('TaskBase', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('TaskBase')?.postValidation?.(copy); + } + + normalize(): TaskBase & Specification.TaskBase { + const copy = new TaskBase(this as any) as TaskBase & Specification.TaskBase; + return getLifecycleHook('TaskBase')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/task-list.ts b/src/lib/generated/classes/task-list.ts index e29ecfc0..99a5ba64 100644 --- a/src/lib/generated/classes/task-list.ts +++ b/src/lib/generated/classes/task-list.ts @@ -23,6 +23,9 @@ import { _Task } from './task'; import { Specification } from '../definitions'; import { ArrayHydrator } from '../../hydrator'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class TaskList extends ArrayHydrator<{ [k: string]: Specification.Task }> { constructor(model?: Array<{ [k: string]: Specification.Task }> | number) { @@ -36,6 +39,19 @@ class TaskList extends ArrayHydrator<{ [k: string]: Specification.Task }> { } } Object.setPrototypeOf(this, Object.create(TaskList.prototype)); + getLifecycleHook('TaskList')?.constructor?.(this); + } + + validate() { + const copy = new TaskList(this); + getLifecycleHook('TaskList')?.preValidation?.(copy); + validate('TaskList', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('TaskList')?.postValidation?.(copy); + } + + normalize(): TaskList { + const copy = new TaskList(this); + return getLifecycleHook('TaskList')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/task.ts b/src/lib/generated/classes/task.ts index 66262cc5..d12eadd1 100644 --- a/src/lib/generated/classes/task.ts +++ b/src/lib/generated/classes/task.ts @@ -20,7 +20,6 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; @@ -35,8 +34,11 @@ import { _SwitchTaskSwitch } from './switch-task-switch'; import { _TaskList } from './task-list'; import { _TryTaskCatch } from './try-task-catch'; import { _Duration } from './duration'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class Task extends ObjectHydrator { constructor(model?: Partial) { @@ -58,11 +60,24 @@ class Task extends ObjectHydrator { if (typeof model.switch === 'object') self.switch = new _SwitchTaskSwitch( model.switch as Specification.SwitchTaskSwitch, - ) as Specification.SwitchTaskSwitch; + ) as unknown as Specification.SwitchTaskSwitch; if (typeof model.try === 'object') self.try = new _TaskList(model.try as Specification.TaskList); if (typeof model.catch === 'object') self.catch = new _TryTaskCatch(model.catch as Specification.TryTaskCatch); if (typeof model.wait === 'object') self.wait = new _Duration(model.wait as Specification.Duration); } + getLifecycleHook('Task')?.constructor?.(this); + } + + validate() { + const copy = new Task(this as any) as Task & Specification.Task; + getLifecycleHook('Task')?.preValidation?.(copy); + validate('Task', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('Task')?.postValidation?.(copy); + } + + normalize(): Task & Specification.Task { + const copy = new Task(this as any) as Task & Specification.Task; + return getLifecycleHook('Task')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/timeout.ts b/src/lib/generated/classes/timeout.ts index 8adae282..8e0204a7 100644 --- a/src/lib/generated/classes/timeout.ts +++ b/src/lib/generated/classes/timeout.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _Duration } from './duration'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class Timeout extends ObjectHydrator { constructor(model?: Partial) { @@ -32,6 +34,19 @@ class Timeout extends ObjectHydrator { if (isObject(model)) { if (typeof model.after === 'object') self.after = new _Duration(model.after); } + getLifecycleHook('Timeout')?.constructor?.(this); + } + + validate() { + const copy = new Timeout(this as any) as Timeout & Specification.Timeout; + getLifecycleHook('Timeout')?.preValidation?.(copy); + validate('Timeout', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('Timeout')?.postValidation?.(copy); + } + + normalize(): Timeout & Specification.Timeout { + const copy = new Timeout(this as any) as Timeout & Specification.Timeout; + return getLifecycleHook('Timeout')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/try-task-catch.ts b/src/lib/generated/classes/try-task-catch.ts index 9f5124de..fed85256 100644 --- a/src/lib/generated/classes/try-task-catch.ts +++ b/src/lib/generated/classes/try-task-catch.ts @@ -20,11 +20,13 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _RetryPolicy } from './retry-policy'; import { _TaskList } from './task-list'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class TryTaskCatch extends ObjectHydrator { constructor(model?: Partial) { @@ -34,6 +36,19 @@ class TryTaskCatch extends ObjectHydrator { if (typeof model.retry === 'object') self.retry = new _RetryPolicy(model.retry); if (typeof model.do === 'object') self.do = new _TaskList(model.do); } + getLifecycleHook('TryTaskCatch')?.constructor?.(this); + } + + validate() { + const copy = new TryTaskCatch(this as any) as TryTaskCatch & Specification.TryTaskCatch; + getLifecycleHook('TryTaskCatch')?.preValidation?.(copy); + validate('TryTaskCatch', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('TryTaskCatch')?.postValidation?.(copy); + } + + normalize(): TryTaskCatch & Specification.TryTaskCatch { + const copy = new TryTaskCatch(this as any) as TryTaskCatch & Specification.TryTaskCatch; + return getLifecycleHook('TryTaskCatch')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/try-task.ts b/src/lib/generated/classes/try-task.ts index 6997efba..61768a60 100644 --- a/src/lib/generated/classes/try-task.ts +++ b/src/lib/generated/classes/try-task.ts @@ -20,15 +20,17 @@ * *****************************************************************************************/ -import { _TaskBase } from './task-base'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; import { _Timeout } from './timeout'; import { _TaskList } from './task-list'; import { _TryTaskCatch } from './try-task-catch'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class TryTask extends _TaskBase { constructor(model?: Partial) { @@ -42,6 +44,19 @@ class TryTask extends _TaskBase { if (typeof model.try === 'object') self.try = new _TaskList(model.try); if (typeof model.catch === 'object') self.catch = new _TryTaskCatch(model.catch); } + getLifecycleHook('TryTask')?.constructor?.(this); + } + + validate() { + const copy = new TryTask(this as any) as TryTask & Specification.TryTask; + getLifecycleHook('TryTask')?.preValidation?.(copy); + validate('TryTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('TryTask')?.postValidation?.(copy); + } + + normalize(): TryTask & Specification.TryTask { + const copy = new TryTask(this as any) as TryTask & Specification.TryTask; + return getLifecycleHook('TryTask')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/use-authentications.ts b/src/lib/generated/classes/use-authentications.ts index 0eaede4f..c49e4d79 100644 --- a/src/lib/generated/classes/use-authentications.ts +++ b/src/lib/generated/classes/use-authentications.ts @@ -21,12 +21,28 @@ *****************************************************************************************/ import { ObjectHydrator } from '../../hydrator'; - import { Specification } from '../definitions'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class UseAuthentications extends ObjectHydrator { constructor(model?: Partial) { super(model); + + getLifecycleHook('UseAuthentications')?.constructor?.(this); + } + + validate() { + const copy = new UseAuthentications(this as any) as UseAuthentications & Specification.UseAuthentications; + getLifecycleHook('UseAuthentications')?.preValidation?.(copy); + validate('UseAuthentications', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('UseAuthentications')?.postValidation?.(copy); + } + + normalize(): UseAuthentications & Specification.UseAuthentications { + const copy = new UseAuthentications(this as any) as UseAuthentications & Specification.UseAuthentications; + return getLifecycleHook('UseAuthentications')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/use-errors.ts b/src/lib/generated/classes/use-errors.ts index 5dc49779..3db20397 100644 --- a/src/lib/generated/classes/use-errors.ts +++ b/src/lib/generated/classes/use-errors.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _Error } from './error'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class UseErrors extends ObjectHydrator { constructor(model?: Partial) { @@ -37,6 +39,19 @@ class UseErrors extends ObjectHydrator { self[key] = new _Error(value); }); } + getLifecycleHook('UseErrors')?.constructor?.(this); + } + + validate() { + const copy = new UseErrors(this as any) as UseErrors & Specification.UseErrors; + getLifecycleHook('UseErrors')?.preValidation?.(copy); + validate('UseErrors', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('UseErrors')?.postValidation?.(copy); + } + + normalize(): UseErrors & Specification.UseErrors { + const copy = new UseErrors(this as any) as UseErrors & Specification.UseErrors; + return getLifecycleHook('UseErrors')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/use-extensions.ts b/src/lib/generated/classes/use-extensions.ts index dcc1c986..149b1631 100644 --- a/src/lib/generated/classes/use-extensions.ts +++ b/src/lib/generated/classes/use-extensions.ts @@ -23,6 +23,9 @@ import { _Extension } from './extension'; import { Specification } from '../definitions'; import { ArrayHydrator } from '../../hydrator'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class UseExtensions extends ArrayHydrator<{ [k: string]: Specification.Extension }> { constructor(model?: Array<{ [k: string]: Specification.Extension }> | number) { @@ -36,6 +39,19 @@ class UseExtensions extends ArrayHydrator<{ [k: string]: Specification.Extension } } Object.setPrototypeOf(this, Object.create(UseExtensions.prototype)); + getLifecycleHook('UseExtensions')?.constructor?.(this); + } + + validate() { + const copy = new UseExtensions(this); + getLifecycleHook('UseExtensions')?.preValidation?.(copy); + validate('UseExtensions', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('UseExtensions')?.postValidation?.(copy); + } + + normalize(): UseExtensions { + const copy = new UseExtensions(this); + return getLifecycleHook('UseExtensions')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/use-functions.ts b/src/lib/generated/classes/use-functions.ts index 774277f2..6dd8f564 100644 --- a/src/lib/generated/classes/use-functions.ts +++ b/src/lib/generated/classes/use-functions.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _Task } from './task'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class UseFunctions extends ObjectHydrator { constructor(model?: Partial) { @@ -37,6 +39,19 @@ class UseFunctions extends ObjectHydrator { self[key] = new _Task(value); }); } + getLifecycleHook('UseFunctions')?.constructor?.(this); + } + + validate() { + const copy = new UseFunctions(this as any) as UseFunctions & Specification.UseFunctions; + getLifecycleHook('UseFunctions')?.preValidation?.(copy); + validate('UseFunctions', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('UseFunctions')?.postValidation?.(copy); + } + + normalize(): UseFunctions & Specification.UseFunctions { + const copy = new UseFunctions(this as any) as UseFunctions & Specification.UseFunctions; + return getLifecycleHook('UseFunctions')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/use-retries.ts b/src/lib/generated/classes/use-retries.ts index 03eb1c2b..f91b5b24 100644 --- a/src/lib/generated/classes/use-retries.ts +++ b/src/lib/generated/classes/use-retries.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _RetryPolicy } from './retry-policy'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class UseRetries extends ObjectHydrator { constructor(model?: Partial) { @@ -37,6 +39,19 @@ class UseRetries extends ObjectHydrator { self[key] = new _RetryPolicy(value); }); } + getLifecycleHook('UseRetries')?.constructor?.(this); + } + + validate() { + const copy = new UseRetries(this as any) as UseRetries & Specification.UseRetries; + getLifecycleHook('UseRetries')?.preValidation?.(copy); + validate('UseRetries', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('UseRetries')?.postValidation?.(copy); + } + + normalize(): UseRetries & Specification.UseRetries { + const copy = new UseRetries(this as any) as UseRetries & Specification.UseRetries; + return getLifecycleHook('UseRetries')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/use.ts b/src/lib/generated/classes/use.ts index e112a025..e1cf5529 100644 --- a/src/lib/generated/classes/use.ts +++ b/src/lib/generated/classes/use.ts @@ -20,14 +20,16 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _UseAuthentications } from './use-authentications'; import { _UseErrors } from './use-errors'; import { _UseExtensions } from './use-extensions'; import { _UseFunctions } from './use-functions'; import { _UseRetries } from './use-retries'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class Use extends ObjectHydrator { constructor(model?: Partial) { @@ -41,6 +43,19 @@ class Use extends ObjectHydrator { if (typeof model.functions === 'object') self.functions = new _UseFunctions(model.functions); if (typeof model.retries === 'object') self.retries = new _UseRetries(model.retries); } + getLifecycleHook('Use')?.constructor?.(this); + } + + validate() { + const copy = new Use(this as any) as Use & Specification.Use; + getLifecycleHook('Use')?.preValidation?.(copy); + validate('Use', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('Use')?.postValidation?.(copy); + } + + normalize(): Use & Specification.Use { + const copy = new Use(this as any) as Use & Specification.Use; + return getLifecycleHook('Use')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/wait-task.ts b/src/lib/generated/classes/wait-task.ts index 002ec5ad..b3241bdb 100644 --- a/src/lib/generated/classes/wait-task.ts +++ b/src/lib/generated/classes/wait-task.ts @@ -20,14 +20,16 @@ * *****************************************************************************************/ -import { _TaskBase } from './task-base'; import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; import { _Timeout } from './timeout'; import { _Duration } from './duration'; +import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class WaitTask extends _TaskBase { constructor(model?: Partial) { @@ -40,6 +42,19 @@ class WaitTask extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.wait === 'object') self.wait = new _Duration(model.wait); } + getLifecycleHook('WaitTask')?.constructor?.(this); + } + + validate() { + const copy = new WaitTask(this as any) as WaitTask & Specification.WaitTask; + getLifecycleHook('WaitTask')?.preValidation?.(copy); + validate('WaitTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('WaitTask')?.postValidation?.(copy); + } + + normalize(): WaitTask & Specification.WaitTask { + const copy = new WaitTask(this as any) as WaitTask & Specification.WaitTask; + return getLifecycleHook('WaitTask')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/workflow.ts b/src/lib/generated/classes/workflow.ts index 65612e55..71ca11a1 100644 --- a/src/lib/generated/classes/workflow.ts +++ b/src/lib/generated/classes/workflow.ts @@ -20,7 +20,6 @@ * *****************************************************************************************/ -import { ObjectHydrator } from '../../hydrator'; import { _Document } from './document'; import { _Input } from './input'; import { _Use } from './use'; @@ -28,8 +27,11 @@ import { _TaskList } from './task-list'; import { _Timeout } from './timeout'; import { _Output } from './output'; import { _Schedule } from './schedule'; +import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { isObject } from '../../utils'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy, isObject } from '../../utils'; class Workflow extends ObjectHydrator { constructor(model?: Partial) { @@ -44,6 +46,19 @@ class Workflow extends ObjectHydrator { if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.schedule === 'object') self.schedule = new _Schedule(model.schedule); } + getLifecycleHook('Workflow')?.constructor?.(this); + } + + validate() { + const copy = new Workflow(this as any) as Workflow & Specification.Workflow; + getLifecycleHook('Workflow')?.preValidation?.(copy); + validate('Workflow', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('Workflow')?.postValidation?.(copy); + } + + normalize(): Workflow & Specification.Workflow { + const copy = new Workflow(this as any) as Workflow & Specification.Workflow; + return getLifecycleHook('Workflow')?.normalize?.(copy) || copy; } } diff --git a/src/lib/hydrator.ts b/src/lib/hydrator.ts index 375af3d4..ec306d5c 100644 --- a/src/lib/hydrator.ts +++ b/src/lib/hydrator.ts @@ -1,4 +1,21 @@ -import { isObject } from './utils'; +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import { deepCopy, isObject } from './utils'; /** * A base class used for object hydration @@ -6,7 +23,7 @@ import { isObject } from './utils'; export class ObjectHydrator { constructor(model?: Partial) { if (isObject(model)) { - Object.assign(this, model); + Object.assign(this, deepCopy(model)); } } } diff --git a/src/lib/lifecycle-hooks.ts b/src/lib/lifecycle-hooks.ts new file mode 100644 index 00000000..79218493 --- /dev/null +++ b/src/lib/lifecycle-hooks.ts @@ -0,0 +1,57 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/** + * Represents the possible lifecycle hooks of an instance + */ +export type LifecycleHook = { + /** + * The hook called at the end of the constructor + * @param instance The instance being initialized + */ + constructor?: (instance: T) => void; + /** + * The hook called before the validation + * @param instance A copy instance being validated + */ + preValidation?: (instance: T) => void; + /** + * The hook called after the validation + * @param instance A copy instance being validated + */ + postValidation?: (instance: T) => void; + /** + * The hook called to normalized the instance + * @param instance A copy of the instance to normalize + * @returns The normalized instance + */ + normalize?: (instance: T) => T; +}; + +/** + * A mapping of type names and their lifecycle hooks + */ +const registeredHooks: Map = new Map(); + +/** + * Gets the lifecylce hook for the provided type, if any + * @param typeName The type to get the lifecycle hook for + * @returns The lifecycle hook, if any + */ +export const getLifecycleHook = (typeName: string): LifecycleHook | undefined => { + return registeredHooks.get(typeName); +}; diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 6dbe2d99..62d6fea5 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -1,3 +1,20 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + /** * Check if the provided value is an object but not an array * @param value The value to check diff --git a/src/lib/validation.ts b/src/lib/validation.ts index 8229467f..cdaa745b 100644 --- a/src/lib/validation.ts +++ b/src/lib/validation.ts @@ -1,8 +1,24 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + import Ajv, { ValidateFunction } from 'ajv/dist/2020'; import addFormats from 'ajv-formats'; import workflowSchema from './generated/schema/workflow.json'; import { validationPointers } from './generated/validation'; -import { deepCopy } from './utils'; const ajv = new Ajv({ schemas: [workflowSchema], @@ -13,7 +29,7 @@ addFormats(ajv); /** * A Map of validation functions, where the key is the name of the schema to validate with */ -export const validators: Map = new Map( +const validators: Map = new Map( Object.entries(validationPointers).map(([typeName, jsonPointer]) => { if (!jsonPointer) throw `No JSON pointer provided for type '${typeName}'`; const validate = ajv.getSchema(jsonPointer); @@ -33,7 +49,8 @@ export const validate = (typeName: string, data: T): boolean => { if (!validateFn) { throw Error(`Unable to find a validation function for '${typeName}'`); } - if (!validateFn(deepCopy(data))) { + if (!validateFn(data)) { + // can mutate the input data! throw new Error( `'${typeName}' is invalid: ${validateFn.errors?.reduce((acc, error) => acc + `- ${error.instancePath} | ${error.schemaPath} | ${error.message} | ${JSON.stringify(error.params)}\n`, '') ?? ''} diff --git a/tests/builders/call-http-builder.spec.ts b/tests/builders/call-http-builder.spec.ts index 2fffb158..9391c444 100644 --- a/tests/builders/call-http-builder.spec.ts +++ b/tests/builders/call-http-builder.spec.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ import { callHTTPBuilder } from '../../src/lib/generated/builders'; import { Classes } from '../../src/lib/generated/classes'; @@ -49,7 +65,7 @@ describe('CallHTTP builder', () => { it('should not validate', () => { const test = () => { - callHTTPBuilder().build(false); + callHTTPBuilder().build({ validate: false }); }; expect(test).not.toThrow(); }); diff --git a/tests/builders/use-extensions-builder.spec.ts b/tests/builders/use-extensions-builder.spec.ts index 7065b66a..13c91bab 100644 --- a/tests/builders/use-extensions-builder.spec.ts +++ b/tests/builders/use-extensions-builder.spec.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ import { useExtensionsBuilder } from '../../src/lib/generated/builders'; import { Classes } from '../../src/lib/generated/classes'; @@ -46,7 +62,7 @@ describe('UseExtensions builder', () => { it('should not validate', () => { const test = () => { - useExtensionsBuilder([1, 2, 3] as any).build(false); + useExtensionsBuilder([1, 2, 3] as any).build({ validate: false }); }; expect(test).not.toThrow(); }); diff --git a/tests/classes/use-extensions.spec.ts b/tests/classes/use-extensions.spec.ts index fba10387..e4ed660a 100644 --- a/tests/classes/use-extensions.spec.ts +++ b/tests/classes/use-extensions.spec.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ import { type } from 'ts-inference-check'; import { Classes } from '../../src/lib/generated/classes'; import { Specification } from '../../src/lib/generated/definitions'; diff --git a/tests/classes/workflow.spec.ts b/tests/classes/workflow.spec.ts index cadaeb69..6c7c3bc3 100644 --- a/tests/classes/workflow.spec.ts +++ b/tests/classes/workflow.spec.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ import { type } from 'ts-inference-check'; import { Classes } from '../../src/lib/generated/classes'; import { Specification } from '../../src/lib/generated/definitions'; diff --git a/tests/validation/workflow-validation.spec.ts b/tests/validation/workflow-validation.spec.ts index 4908bb66..79c45a94 100644 --- a/tests/validation/workflow-validation.spec.ts +++ b/tests/validation/workflow-validation.spec.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ import { Classes } from '../../src/lib/generated/classes'; import { validate } from '../../src/lib/validation'; diff --git a/tools/4_generate-classes.ts b/tools/4_generate-classes.ts index 7acadf98..71261de7 100644 --- a/tools/4_generate-classes.ts +++ b/tools/4_generate-classes.ts @@ -40,24 +40,38 @@ function getObjectClassDeclaration(name: string, node: Node, type: Type, baseCla return `${fileHeader} ${inFileDisclaimer} -${baseClass ? `import { _${baseClass} } from './${toKebabCase(normalizeKnownAllCaps(baseClass))}';` : "import { ObjectHydrator } from '../../hydrator';"} ${hydrationResult.imports.map((type) => `import { _${type} } from './${toKebabCase(normalizeKnownAllCaps(type))}';`).join('\n')} +${baseClass ? `import { _${baseClass} } from './${toKebabCase(normalizeKnownAllCaps(baseClass))}';` : "import { ObjectHydrator } from '../../hydrator';"} import { Specification } from '../definitions'; -${hydrationResult.code ? "import { isObject } from '../../utils';" : ''} +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy${hydrationResult.code ? ', isObject' : ''} } from '../../utils'; class ${name} extends ${baseClass ? '_' + baseClass : `ObjectHydrator`} { - constructor(model?: Partial) { - super(model); - ${ - hydrationResult.code - ? `const self = (this as unknown) as Specification.${name} & object; - if (isObject(model)) { - ${hydrationResult.code} - }` - : '' - } - + constructor(model?: Partial) { + super(model); + ${ + hydrationResult.code + ? `const self = (this as unknown) as Specification.${name} & object; + if (isObject(model)) { + ${hydrationResult.code} + }` + : '' } + getLifecycleHook('${name}')?.constructor?.(this); + } + + validate() { + const copy = new ${name}(this as any) as ${name} & Specification.${name}; + getLifecycleHook('${name}')?.preValidation?.(copy); + validate('${name}', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('${name}')?.postValidation?.(copy); + } + + normalize(): ${name} & Specification.${name} { + const copy = new ${name}(this as any) as ${name} & Specification.${name}; + return getLifecycleHook('${name}')?.normalize?.(copy) || copy; + } } export const _${name} = ${name} as ({ @@ -79,6 +93,9 @@ ${inFileDisclaimer} ${hydrationResult.imports.map((type) => `import { _${type} } from './${toKebabCase(normalizeKnownAllCaps(type))}';`)} import { Specification } from '../definitions'; import { ArrayHydrator } from '../../hydrator'; +import { getLifecycleHook } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { deepCopy } from '../../utils'; class ${name} extends ArrayHydrator<${arrayTypeName}> { constructor(model?: Array<${arrayTypeName}> | number) { @@ -87,6 +104,19 @@ class ${name} extends ArrayHydrator<${arrayTypeName}> { ${hydrationResult.code} } Object.setPrototypeOf(this, Object.create(${name}.prototype)); + getLifecycleHook('${name}')?.constructor?.(this); + } + + validate() { + const copy = new ${name}(this); + getLifecycleHook('${name}')?.preValidation?.(copy); + validate('${name}', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize + getLifecycleHook('${name}')?.postValidation?.(copy); + } + + normalize(): ${name} { + const copy = new ${name}(this); + return getLifecycleHook('${name}')?.normalize?.(copy) || copy; } } diff --git a/tools/5_generate-builders.ts b/tools/5_generate-builders.ts index 585457d5..0540636a 100644 --- a/tools/5_generate-builders.ts +++ b/tools/5_generate-builders.ts @@ -19,6 +19,7 @@ import * as path from 'path'; import { fileHeader, inFileDisclaimer } from './consts'; import { buildersDir, definitionsDir, normalizeKnownAllCaps, reset, toKebabCase } from './utils'; import { getExportedDeclarations } from './reflection'; +import { Type } from 'ts-morph'; const { readFile, writeFile } = fsPromises; @@ -37,24 +38,24 @@ function toCamelCase(value: string): string { * Creates an object builder for the provided type * @param name The name type to create the builder for */ -const getObjectBuilderDeclaration = (name: string): string => +const getObjectBuilderDeclaration = (name: string, type: Type): string => `${fileHeader} ${inFileDisclaimer} -import { builder, Builder } from "../../builder"; -import { validate } from "../../validation"; +import { builder, Builder, BuildOptions } from "../../builder"; import { Classes } from "../classes"; import { Specification } from "../definitions"; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.${name}} model The underlying object - * @returns {Specification.${name}} The validated underlying object + * @param {Specification.${name}} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.${name}} The built object */ -function buildingFn(model: Specification.${name}): Specification.${name} { +function buildingFn(model: Specification.${name}, options: BuildOptions): Specification.${name} { const instance = new Classes.${name}(model); - validate('${name}', instance); - return instance as Specification.${name}; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) ${type.isTuple() ? 'as unknown ' : ''}as Specification.${name}; } /** @@ -66,33 +67,33 @@ export const ${toCamelCase(name)}Builder = (model?: Partial +const getArrayBuilderDeclaration = (name: string, arrayTypeName: string): string => `${fileHeader} ${inFileDisclaimer} -import { arrayBuilder, ArrayBuilder } from "../../builder"; -import { validate } from "../../validation"; +import { arrayBuilder, ArrayBuilder, BuildOptions } from "../../builder"; import { Classes } from "../classes"; import { Specification } from "../definitions"; /** * The internal function used by the builder proxy to validate and return its underlying array - * @param {Specification.${name}} model The underlying array - * @returns {Specification.${name}} The validated underlying array + * @param {Specification.${name}} model The proxied array + * @param {BuildOptions} options The build options to use + * @returns {Specification.${name}} The built array */ -function buildingFn(model: Specification.${name}): Specification.${name} { +function buildingFn(model: Specification.${name}, options: BuildOptions): Specification.${name} { const instance = new Classes.${name}(model); - validate('${name}', instance); - return instance as Specification.${name}; + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.${name}; } /** * A factory to create a builder proxy for the type \`Specification.${name}\` * @returns {ArrayBuilder} A builder for \`Specification.${name}\` */ -export const ${toCamelCase(name)}Builder = (model?: Specification.${name}): ArrayBuilder<${arrayType}> => arrayBuilder<${arrayType}>(model, buildingFn);`; +export const ${toCamelCase(name)}Builder = (model?: Specification.${name}): ArrayBuilder<${arrayTypeName}> => arrayBuilder<${arrayTypeName}>(model, buildingFn);`; /** * Creates the builders index file @@ -133,7 +134,7 @@ async function generate(definitionFile: string, destDir: string): Promise const exportedType = node![0].getType(); let builderDeclaration: string = ''; if (!exportedType.isArray()) { - builderDeclaration = getObjectBuilderDeclaration(alias); + builderDeclaration = getObjectBuilderDeclaration(alias, exportedType); } else { const arrayType = exportedType .getArrayElementTypeOrThrow() diff --git a/tools/README.md b/tools/README.md index 715af84d..184b2dec 100644 --- a/tools/README.md +++ b/tools/README.md @@ -3,7 +3,8 @@ ## 1. Downloader A simple script that downloads the JSON Schema(s) from `https://serverlessworkflow.io/`. Currently, there is only one schema, but the script supports downloading referenced schemas as well for legacy reasons. As it might be useful in the future and doesn't add much complexity, it has been retained. -> *(i) The schema(s) are saved in `src/lib/generated/schema/`, the main one being `workflow.json`.* +> [!TIP] +> The schema(s) are saved in `src/lib/generated/schema/`, the main one being `workflow.json`.* ## 2. Generating Types The goal is to automatically generate TypeScript types/interfaces or classes corresponding to the specification's JSON Schema. This step is the trickiest. Its outcome will vary depending on the schema and the library used. @@ -28,7 +29,8 @@ The `type: object` is also added when not specified. This doesn't impact type ge Theoretically, *Phase 1* doesn't affect the validity of the schema. -> *(i) The resulting schema is saved as `src/lib/generated/schema/__internal_workflow.json` for later use.* +> [!TIP] +> The resulting schema is saved as `src/lib/generated/schema/__internal_workflow.json` for later use.* ### Phase 2: Mutating the JSON Schema `json-schema-to-typescript` has limitations, as highlighted in the issues linked above: @@ -45,39 +47,47 @@ The resulting schema is used in-memory to generate the types. The schema produce After phases 1 & 2, the mutated schema is passed to `json-schema-to-typescript` and the resulting TypeScript declarations are saved to `specification.ts`. -> *(i) The declarations are saved in `src/lib/generated/definitions/specification.ts`.* +> [!TIP] +> The declarations are saved in `src/lib/generated/definitions/specification.ts`.* ## 3. Generating Validators To validate an object of type `T`, where `T` is not the root object described by the JSON Schema, we need to know the subschema's JSON pointer corresponding to `T`. The exported declarations of the TypeScript file produced in [step 2](#2-generating-types) are extracted using `ts-morph`. *(At this point, it is probably overkill; a regex could probably do the trick, but this library will be useful later on.)* For each declaration, the internal JSON Schema produced in [step 2 - Phase 1](#phase-1-embellishing-the-json-schema) is crawled to find the object with the matching title. Then, an object where the keys are the names of the types and the values are their JSON pointers is saved as `validation-pointers.ts`. -> *(i) The validation pointers are saved in `src/lib/generated/validation/validation-pointers.ts`.* +> [!TIP] +> The validation pointers are saved in `src/lib/generated/validation/validation-pointers.ts`.* The produced validation pointers are used by the SDK to expose a `validate` function that takes the name of the type to validate and the object to validate: ```typescript validate('TypeName', value); ``` -> *(i) The validation function is located at `src/lib/validation.ts`.* +> [!TIP] +> The validation function is located at `src/lib/validation.ts`.* ## 4. Generating Classes [Generating types](#2-generating-types) is already a great step, but classes have a few advantages we'd like to leverage in an SDK: - Unlike types, they can be tested at runtime with `instanceof` -- They can carry business logic such as object hydration (for the aforementioned `instanceof` checking), self-validation, default value handling, etc. +- They can carry business logic such as object hydration (for the aforementioned `instanceof` checking), validation, normalization, etc. -The aim is to generate a class for each type/interface generated in the 2nd step that shares the same property signatures. This is achieved by exploiting a TypeScript trick: declaring an internal class and then exposing it as an intersection of its constructor and its associated type (see this [StackOverflow reply](https://stackoverflow.com/questions/54207173/classes-keyof-in-typescript/54207465#54207465)). For instance, if our type is `Foo`, we can mimic a class `FooClass` using the following code: +### Phase 1: Declaration +The aim is to generate a class for each type/interface generated in [step 2](#2-generating-types) that shares the same property signatures. This is achieved by exploiting a TypeScript trick: declaring an internal class and then exposing it as an intersection of its constructor and its associated type (see this [StackOverflow reply](https://stackoverflow.com/questions/54207173/classes-keyof-in-typescript/54207465#54207465)). For instance, if our type is `Foo`, we can mimic a class `FooClass` using the following code: ```typescript -class _FooClass { - constructor(model?: Partial) { +class FooClass { + constructor(model?: Partial) { if (model) Object.assign(this, model); } } -export const FooClass = _FooClass as { - new(model?: Foo): _FooClass & Foo // aka "the constructor creates an object which is both _FooClass and Foo" +const _FooClass = FooClass as { + new(model?: Foo): FooClass & Specification.Foo // aka "the constructor creates an object which is both FooClass and Foo" }; -const fooInstance = new FooClass(); -console.log(fooInstance instanceof FooClass); // true +export const Classes = { + FooClass: _FooClass +}; + +const fooInstance = new Classes.FooClass(); +console.log(fooInstance instanceof Classes.FooClass); // true ``` For array types, it's a bit different. Here the challenge is to extend `Array` but enforce our prototype: @@ -89,10 +99,31 @@ export class Foo extends Array { } } ``` +> [!NOTE] +> After implementing this approach, the "hydration" has been researched and implemented. During this phase, properties of a type/interface and their subtypes (union/intersection/tuple) are reflected to be recursively hydrated. We could maybe use those to declare classes properties instead of using the "cast trick". + +### Phase 2: Hydration +To hydrate the object, we rely on `ts-morph` to reflect the properties and build the hydration code. The process consists of the following steps: +- Get the target object associate type/interface and its subtypes (union/intersection/tuple) +- For each of those types, get their properties and indexed signature +- Get literal properties that can be constant and hydrate the constant if necessary +- Get properties that are not value types and hydrate the properties if necessary +- Get the indexed signature type and hydrate it if necessary + +If a property is defined in multiple subtypes with different types, it's ignore altogether and a warning is emitted. For instance, a `CallTask` is a union of specialized call task such as `CallAsyncAPI`, `CallHTTP`, ... Those types both declare a `with` property but with different signature. Therefore, its hydration is ignored at the `CallTask` level. + +In addition to the hydration, a call to the `constructor` lifecycle hook is also generated. + +### Phase 3: Validation and normalization +When generating the class, two methods will be added: +- `validate(): void` which calls, in that order, the `preValidation` lifecycle hook, the `validate` function using the pointers build in [step 3](#3-generating-validators) and the `postValidation` lifecycle hook +- `normalize(): T` which calls the the `normalize` lifecycle hook -At the moment, classes don't do anything else. Validation, for instance, is called by the builders (next step). In the future, validation will be migrated to the classes, along with recursive hydration and default values handling. +> [!TIP] +> The classes are saved in `src/lib/generated/classes/`.* -> *(i) The classes are saved in `src/lib/generated/classes/`.* +> [!TIP] +> The lifecycle hooks can be found in `src/lib/hooks/`.* ## 5. Generating Fluent Builders One feature of the SDK is to expose fluent builders. This feature heavily relies on the builder proxy in `src/lib/builder.ts`. The generic type `Builder` reflects properties of `T` as methods and adds a `build()` method to return the built object. The proxy sets the property value when the corresponding method is called or calls a "building function" when `build()` is called. @@ -101,13 +132,15 @@ The generator iterates over the generated types to: - Define a "building function" that creates an "instance of the type" (of the class that mimics the type) and validates it. - Wrap the generic proxy into a specific one. e.g., `export const workflowBuilder = (): Builder => builder(buildingFn);`. -At the moment, the "building function" can be extended to include pre-validation code, but this will likely migrate to the class level. +The "building function" will call the `validate()` and `normalize()` methods of the class. -> *(i) The builders are saved in `src/lib/generated/builders/`.* +> [!TIP] +> The builders are saved in `src/lib/generated/builders/`.* ## Conclusion With the tooling in place, we can automatically provide the required features of the SDK: - Type checking - Validation +- Normalization - Typed instances - Fluent builder \ No newline at end of file diff --git a/tools/reflection.ts b/tools/reflection.ts index 23119456..8512d4a7 100644 --- a/tools/reflection.ts +++ b/tools/reflection.ts @@ -228,7 +228,7 @@ export function getObjectHydration(node: Node, type: Type): HydrationResult { ...namedProperties.map((prop) => { const propName = !type.isUnion() ? prop.name : `${prop.name} as Specification.${prop.type}`; if (!prop.isAnonymous) { - return `if (typeof model.${prop.name} === 'object') self.${prop.name} = new _${prop.type}(model.${propName}) ${prop.originalType.isTuple() ? `as Specification.${prop.type}` : ''};`; + return `if (typeof model.${prop.name} === 'object') self.${prop.name} = new _${prop.type}(model.${propName}) ${prop.originalType.isTuple() ? `as unknown as Specification.${prop.type}` : ''};`; } if (prop.isAnonymous) { return `if (typeof model.${prop.name} === 'object') self.${prop.name} = Object.fromEntries( From 2ee8b616460b7597b19e09f4bc560168ae4a3175 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Wed, 31 Jul 2024 13:26:44 +0200 Subject: [PATCH 11/24] Added support for workflow (de)serialization Signed-off-by: Jean-Baptiste Bianchi --- README.md | 343 ++++++++++-------- src/index.ts | 1 + src/lib/generated/builders/index.ts | 120 +++--- .../classes/authentication-policy-basic.ts | 57 ++- .../classes/authentication-policy-bearer.ts | 58 ++- .../authentication-policy-oauth2-client.ts | 59 ++- .../classes/authentication-policy-oauth2.ts | 59 ++- .../classes/authentication-policy.ts | 54 ++- .../call-async-api-with-authentication.ts | 60 ++- .../generated/classes/call-async-api-with.ts | 53 ++- src/lib/generated/classes/call-async-api.ts | 54 ++- .../generated/classes/call-function-with.ts | 53 ++- src/lib/generated/classes/call-function.ts | 54 ++- .../classes/call-grpc-with-arguments.ts | 55 ++- .../call-grpc-with-service-authentication.ts | 60 ++- .../classes/call-grpc-with-service.ts | 53 ++- src/lib/generated/classes/call-grpc-with.ts | 54 ++- src/lib/generated/classes/call-grpc.ts | 54 ++- .../classes/call-http-with-endpoint.ts | 53 ++- src/lib/generated/classes/call-http-with.ts | 54 ++- src/lib/generated/classes/call-http.ts | 54 ++- .../call-open-api-with-authentication.ts | 59 ++- .../classes/call-open-api-with-parameters.ts | 57 ++- .../generated/classes/call-open-api-with.ts | 54 ++- src/lib/generated/classes/call-open-api.ts | 54 ++- src/lib/generated/classes/call-task.ts | 54 ++- src/lib/generated/classes/do-task.ts | 54 ++- src/lib/generated/classes/document-tags.ts | 53 ++- src/lib/generated/classes/document.ts | 54 ++- src/lib/generated/classes/duration.ts | 53 ++- .../generated/classes/emit-task-emit-event.ts | 53 ++- src/lib/generated/classes/emit-task-emit.ts | 54 ++- src/lib/generated/classes/emit-task.ts | 54 ++- .../classes/endpoint-authentication.ts | 58 ++- src/lib/generated/classes/endpoint.ts | 53 ++- src/lib/generated/classes/error.ts | 53 ++- .../classes/event-consumption-strategy-all.ts | 32 +- .../classes/event-consumption-strategy-any.ts | 32 +- .../classes/event-consumption-strategy.ts | 58 ++- .../classes/event-filter-correlate.ts | 53 ++- .../generated/classes/event-filter-with.ts | 53 ++- src/lib/generated/classes/event-filter.ts | 54 ++- src/lib/generated/classes/export.ts | 53 ++- src/lib/generated/classes/extension.ts | 54 ++- .../external-resource-authentication.ts | 60 ++- .../generated/classes/external-resource.ts | 53 ++- src/lib/generated/classes/flow-directive.ts | 53 ++- src/lib/generated/classes/for-task-for.ts | 53 ++- src/lib/generated/classes/for-task.ts | 54 ++- src/lib/generated/classes/fork-task-fork.ts | 54 ++- src/lib/generated/classes/fork-task.ts | 54 ++- src/lib/generated/classes/index.ts | 240 ++++++------ src/lib/generated/classes/input.ts | 53 ++- .../generated/classes/listen-task-listen.ts | 53 ++- src/lib/generated/classes/listen-task.ts | 54 ++- src/lib/generated/classes/oauth2-token.ts | 53 ++- src/lib/generated/classes/output.ts | 53 ++- src/lib/generated/classes/raise-task-raise.ts | 54 ++- src/lib/generated/classes/raise-task.ts | 54 ++- .../generated/classes/retry-policy-backoff.ts | 53 ++- .../generated/classes/retry-policy-jitter.ts | 54 ++- .../classes/retry-policy-limit-attempt.ts | 58 ++- .../generated/classes/retry-policy-limit.ts | 54 ++- src/lib/generated/classes/retry-policy.ts | 54 ++- .../classes/run-task-run-container.ts | 53 ++- .../generated/classes/run-task-run-script.ts | 53 ++- .../classes/run-task-run-shell-arguments.ts | 57 ++- .../classes/run-task-run-shell-environment.ts | 58 ++- .../generated/classes/run-task-run-shell.ts | 54 ++- .../classes/run-task-run-workflow-input.ts | 57 ++- .../classes/run-task-run-workflow.ts | 54 ++- src/lib/generated/classes/run-task-run.ts | 54 ++- src/lib/generated/classes/run-task.ts | 54 ++- src/lib/generated/classes/schedule.ts | 54 ++- src/lib/generated/classes/schema.ts | 53 ++- src/lib/generated/classes/set-task-set.ts | 53 ++- src/lib/generated/classes/set-task.ts | 54 ++- .../classes/switch-task-switch-case.ts | 53 ++- .../generated/classes/switch-task-switch.ts | 32 +- src/lib/generated/classes/switch-task.ts | 54 ++- src/lib/generated/classes/task-base.ts | 54 ++- src/lib/generated/classes/task-list.ts | 32 +- src/lib/generated/classes/task.ts | 54 ++- src/lib/generated/classes/timeout.ts | 54 ++- src/lib/generated/classes/try-task-catch.ts | 54 ++- src/lib/generated/classes/try-task.ts | 54 ++- .../generated/classes/use-authentications.ts | 53 ++- src/lib/generated/classes/use-errors.ts | 54 ++- src/lib/generated/classes/use-extensions.ts | 32 +- src/lib/generated/classes/use-functions.ts | 54 ++- src/lib/generated/classes/use-retries.ts | 54 ++- src/lib/generated/classes/use.ts | 54 ++- src/lib/generated/classes/wait-task.ts | 54 ++- src/lib/generated/classes/workflow.ts | 100 ++++- src/lib/hooks/index.ts | 1 + src/lib/hooks/workflow-hooks.ts | 31 ++ src/lib/lifecycle-hooks.ts | 27 +- src/lib/validation.ts | 13 +- src/serverless-workflow-sdk.ts | 4 + tests/builders/call-http-builder.spec.ts | 6 +- tests/builders/use-extensions-builder.spec.ts | 4 +- tests/builders/workflow-builder.spec.ts | 75 ++++ tests/classes/workflow.spec.ts | 1 + .../workflow-serialization.spec.ts | 94 +++++ tests/validation/workflow-validation.spec.ts | 51 ++- tools/4_generate-classes.ts | 140 +++++-- tools/5_generate-builders.ts | 11 +- tools/tmp.ts | 39 -- 108 files changed, 4409 insertions(+), 1628 deletions(-) create mode 100644 src/index.ts create mode 100644 src/lib/hooks/index.ts create mode 100644 src/lib/hooks/workflow-hooks.ts create mode 100644 src/serverless-workflow-sdk.ts create mode 100644 tests/builders/workflow-builder.spec.ts create mode 100644 tests/serialization/workflow-serialization.spec.ts delete mode 100644 tools/tmp.ts diff --git a/README.md b/README.md index ae577017..7b762ed3 100644 --- a/README.md +++ b/README.md @@ -1,215 +1,248 @@ ![Node CI](https://github.com/serverless-workflow/sdk/workflows/Node%20CI/badge.svg) [![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/serverless-workflow/sdk) -# Serverless Workflow Specification - Typescript SDK +# Serverless Workflow Specification - TypeScript SDK -Provides the Typescript API/SPI for the [Serverless Workflow Specification](https://github.com/serverlessworkflow/specification) +This SDK provides a TypeScript API for working with the [Serverless Workflow Specification](https://github.com/serverlessworkflow/specification). -With the SDK you can: -* Parse workflow JSON and YAML definitions +With this SDK, you can: +* Parse workflow definitions in JSON and YAML formats * Programmatically build workflow definitions * Validate workflow definitions +## Status +The npm [`@serverlessworkflow/sdk`](https://www.npmjs.com/package/@serverlessworkflow/sdk) package versioning aligns with the versioning of the [specification](https://github.com/serverlessworkflow/specification): -### Status +| Latest Releases | Conformance to Spec Version | +| :---: | :---: | +| [v1.0.0-alpha2.\*](https://github.com/serverless-workflow/sdk/releases/) | [v1.0.0-alpha2](https://github.com/serverlessworkflow/specification) | + +> [!WARNING] +> Previous versions of the SDK were published with a typo in the scope: +> @severlessworkflow/sdk-typescript instead of +> @se**r**verlessworkflow/sdk-typescript -| Latest Releases | Conformance to spec version | +| Latest Releases | Conformance to Spec Version | | :---: | :---: | | [v1.0.0](https://github.com/serverless-workflow/sdk/releases/) | [v0.6](https://github.com/serverlessworkflow/specification/tree/0.6.x) | | [v2.0.0](https://github.com/serverless-workflow/sdk/releases/) | [v0.7](https://github.com/serverlessworkflow/specification/tree/0.7.x) | | [v3.0.0](https://github.com/serverless-workflow/sdk/releases/) | [v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x) | +## SDK Structure +This SDK includes the following key components: +### Types and Interfaces +The SDK provides various TypeScript types and interfaces that ensure type safety and enhance the development experience by catching type errors during compile time. -## Getting Started +To avoid confusion with classes, these types and interfaces are exported under the **`Specification`** object, e.g., `Specification.Workflow`. -### Building locally +### Classes +The SDK includes classes that correspond to the aforementioned types and interfaces. These classes offer: -To build the project and run tests locally: +- **Instance Checking**: Easily verify if an object is an instance of a specific class. +- **Self-Validation**: Validate the internal state of an object to ensure it adheres to the expected structure. +- **Normalization**: Methods to normalize object data, ensuring consistent formatting and values. -```sh -git clone https://github.com/serverless-workflow/sdk.git -cd sdk-typescript -npm install && npm run build && npm run test -``` +To avoid confusion with type definitions, these classes are exported under the **`Classes`** object, e.g., `Classes.Workflow`. +### Fluent Builders +The fluent builders wrap the core classes and provide a fluent API for constructing objects. This API allows you to chain method calls and configure objects in a more readable and convenient manner. -### How to use +The fluent builders are directly exported as `**Builder`, e.g., `workflowBuilder`. -#### Install +### Validation Function +The SDK includes a validation function to check if objects conform to the expected schema. This function ensures that your workflow objects are correctly structured and meet the required specifications. +The `validate` function is directly exported and can be used as `validate('Workflow', workflowObject)`. -##### Version >= 4.0.0 -Note: Version 4.0.0 has not been released yet. -```sh -npm i @serverlessworkflow/sdk -``` +## Getting Started +### Installation +> [!NOTE] +> Version v1.0.0-alpha2.\* has not been released yet. -##### Version < 4.0.0 ```sh -npm i @severlessworkflow/sdk-typescript +npm install @serverlessworkflow/sdk ``` - - -#### Create Workflow using builder API +### Usage +#### Create a Workflow Definition from YAML or JSON +You can deserialize a YAML or JSON representation of the workflow using the static method `Classes.Workflow.deserialize`: ```typescript -import { workflowBuilder, injectstateBuilder, Specification } from '@serverlessworkflow/sdk'; - -const workflow: Specification.Workflow = workflowBuilder() - .id("helloworld") - .specVersion("0.8") - .version("1.0") - .name("Hello World Workflow") - .description("Inject Hello World") - .start("Hello State") - .states([ - injectstateBuilder() - .name("Hello State") - .data({ - "result": "Hello World!" - }) - .build() - ]) - .build(); +import { Classes } from '@serverlessworkflow/sdk'; + +// const text = await readFile('/some/path/my-workflow-definition.yaml', { encoding: 'utf8' }); +// const text = await fetch('https://myserver.com/my-workflow-definition.json'); +const text = ` +document: + dsl: 1.0.0-alpha2 + name: test + version: 1.0.0 + namespace: default +do: +- step1: + set: + variable: 'my first workflow' +`; +const workflowDefinition = Classes.Workflow.deserialize(text); ``` -#### Create Workflow from JSON/YAML source +#### Create a Workflow Definition by Casting an Object +You can type-cast an object to match the structure of a workflow definition: ```typescript -import { Specification, Workflow } from '@serverlessworkflow/sdk'; - -const source = `id: helloworld -version: '1.0' -specVerion: '0.8' -name: Hello World Workflow -description: Inject Hello World -start: Hello State -states: - - type: inject - name: Hello State - data: - result: Hello World! - end: true` - -const workflow: Specification.Workflow = Workflow.fromSource(source); +import { Classes, Specification, validate } from '@serverlessworkflow/sdk'; + +// Simply cast an object: +const workflowDefinition = { + document: { + dsl: '1.0.0-alpha2', + name: 'test', + version: '1.0.0', + namespace: 'default', + }, + do: [ + { + step1: { + set: { + variable: 'my first workflow', + }, + }, + }, + ], +} as Specification.Workflow; + +// Validate it +try { + validate('Workflow', workflowDefinition); + // Serialize it + const definitionTxt = Classes.Workflow.serialize(workflowDefinition); +} +catch (ex) { + // Invalid workflow definition +} ``` -Where `source` can be in both JSON or YAML format. - -#### Parse a Workflow instance to JSON/YAML -Having the following workflow instance: +#### Create a Workflow Definition Using a Class Constructor +You can create a workflow definition by calling a constructor: ```typescript -import { workflowBuilder, injectstateBuilder, Specification } from '@serverlessworkflow/sdk'; - -const workflow: Specification.Workflow = workflowBuilder() - .id("helloworld") - .version("1.0") - .specVersion("0.8") - .name("Hello World Workflow") - .description("Inject Hello World") - .start("Hello State") - .states([ - injectstateBuilder() - .name("Hello State") - .data({ - "result": "Hello World!" - }) - .end(true) - .build() - ]) - .build(); +import { Classes, validate } from '@serverlessworkflow/sdk'; + +// Simply use the constructor +const workflowDefinition = new Classes.Workflow({ + document: { + dsl: '1.0.0-alpha2', + name: 'test', + version: '1.0.0', + namespace: 'default', + }, + do: [/* + { + step1: { + set: { + variable: 'my first workflow', + }, + }, + }, + */], +}); +workflowDefinition.do.push({ + step1: new Classes.SetTask({ + set: { + variable: 'my first workflow', + } + }) +}); + +// Validate it +try { + workflowDefinition.validate(); + // Serialize it + const definitionTxt = workflowDefinition.serialize(); +} +catch (ex) { + // Invalid workflow definition +} ``` -You can convert it to its string representation in JSON or YAML format -by using the static methods `Workflow.toJson` or `Workflow.toYaml` respectively: - -```typescript -import {Specification, workflowBuilder} from "@severlessworkflow/sdk-typescript"; - -const workflow: Specification.Workflow = workflowBuilder() - //... - .build() - -const workflowAsJson: string = Specification.Workflow.toJson(workflow); -``` +#### Create a Workflow Definition Using the Builder API +You can use the fluent API to build a validated and normalized workflow definition: ```typescript -import {Specification, workflowBuilder} from "@severlessworkflow/sdk-typescript"; - -const workflow: Specification.Workflow = workflowBuilder() - //... +import { documentBuilder, setTaskBuilder, taskListBuilder, workflowBuilder } from '@serverlessworkflow/sdk'; + +const workflowDefinition = workflowBuilder(/*workflowDefinitionObject*/) + .document( + documentBuilder() + .dsl('1.0.0-alpha2') + .name('test') + .version('1.0.0') + .namespace('default') .build() - -const workflowAsYaml: string = Specification.Workflow.toYaml(workflow); + ) + .do( + taskListBuilder() + .push({ + step1: setTaskBuilder() + .set({ + variable: 'my first workflow' + }) + .build() + }) + .build() + ) + .build(/*{ + validate: false, + normalize: false + }*/); ``` - -#### Validate workflow definitions - -The sdk provides a way to validate if a workflow object is compliant with the serverlessworkflow specification. - -`WorkflowValidator` class provides a validation method: - -- `validate(): boolean` +#### Serialize a Workflow Definition to YAML or JSON +You can serialize a workflow definition either by using its `serialize` method if it's an instance or the static method with the same name: ```typescript -import {WorkflowValidator, Specification} from '@serverlessworkflow/sdk'; -import {Workflow} from "./workflow"; - -const workflow = { - id: 'helloworld', - version: '1.0', - specVersion: '0.3', - name: 'Hello World Workflow', - description: 'Inject Hello World', - start: 'Hello State', - states: [ - { - type: 'inject', - name: 'Hello State', - end: true, - data: { - result: "Hello World!" - } - } - ] -}; - -const workflowValidator: WorkflowValidator = new WorkflowValidator(Workflow.fromSource(JSON.stringify(workflow))); -if (!workflowValidator.isValid) { - workflowValidator.errors.forEach(error => console.error((error as ValidationError).message)); +import { Classes } from '@serverlessworkflow/sdk'; + +// const workflowDefinition = ; +if (workflowDefinition instanceof Classes.Workflow) { + const yaml = workflowDefinition.serialize(/*'yaml' | 'json' */); +} +else { + const json = Classes.Workflow.serialize(workflowDefinition, 'json'); } ``` +> [!NOTE] +> The default serialization format is YAML. -You can also validate parts of a workflow using `validators`: +#### Validate Workflow Definitions +Validation can be achieved in two ways: via the `validate` function or the instance `validate` method: ```typescript -import { ValidateFunction } from 'ajv'; -import { validators, Specification } from '@serverlessworkflow/sdk'; - -const injectionState: Specification.Injectstate = workflow.states[0]; -const injectionStateValidator: ValidateFunction = validators.get('Injectstate'); -if (!injectionStateValidator(injectionState)) { - injectionStateValidator.errors.forEach(error => console.error(error.message)); +import { Classes, validate } from '@serverlessworkflow/sdk'; + +// const workflowDefinition = ; +try { + if (workflowDefinition instanceof Classes.Workflow) { + workflowDefinition.validate(); + } + else { + validate('Workflow', workflowDefinition); + } +} +catch (ex) { + // Workflow definition is invalid } ``` +### Building Locally -#### Generate workflow diagram - -It is possible to generate the workflow diagram with [Mermaid](https://github.com/mermaid-js/mermaid) - +To build the project and run tests locally, use the following commands: -``` -const workflow = workflowBuilder() - .id("helloworld") - .... - .build(); - -const mermaidSourceCode = new MermaidDiagram(workflow).sourceCode(); +```sh +git clone https://github.com/serverless-workflow/sdk.git +cd sdk-typescript +npm install && npm run build && npm run test ``` -[Here](./examples/browser/mermaid.html) you can see a full example that uses mermaid in the browser to generate the workflow diagram. +If you're interested in contributing, reading the [Tooling Architecture](/tools/README.md) is a good place to start. \ No newline at end of file diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 00000000..c957c397 --- /dev/null +++ b/src/index.ts @@ -0,0 +1 @@ +export * from './serverless-workflow-sdk'; diff --git a/src/lib/generated/builders/index.ts b/src/lib/generated/builders/index.ts index b4d8f4fb..48acdce0 100644 --- a/src/lib/generated/builders/index.ts +++ b/src/lib/generated/builders/index.ts @@ -14,93 +14,93 @@ * limitations under the License. */ -export * from './schema-builder'; -export * from './external-resource-builder'; -export * from './external-resource-authentication-builder'; export * from './authentication-policy-builder'; -export * from './task-builder'; -export * from './call-task-builder'; +export * from './authentication-policy-basic-builder'; +export * from './authentication-policy-bearer-builder'; +export * from './authentication-policy-oauth2-builder'; +export * from './authentication-policy-oauth2-client-builder'; export * from './call-async-api-builder'; -export * from './flow-directive-builder'; +export * from './call-async-api-with-builder'; export * from './call-async-api-with-authentication-builder'; +export * from './call-function-builder'; +export * from './call-function-with-builder'; export * from './call-grpc-builder'; +export * from './call-grpc-with-builder'; +export * from './call-grpc-with-arguments-builder'; +export * from './call-grpc-with-service-builder'; export * from './call-grpc-with-service-authentication-builder'; export * from './call-http-builder'; +export * from './call-http-with-builder'; export * from './call-http-with-endpoint-builder'; -export * from './endpoint-authentication-builder'; export * from './call-open-api-builder'; +export * from './call-open-api-with-builder'; export * from './call-open-api-with-authentication-builder'; -export * from './call-function-builder'; +export * from './call-open-api-with-parameters-builder'; +export * from './call-task-builder'; +export * from './document-builder'; +export * from './document-tags-builder'; export * from './do-task-builder'; -export * from './fork-task-builder'; +export * from './duration-builder'; export * from './emit-task-builder'; -export * from './for-task-builder'; -export * from './listen-task-builder'; +export * from './emit-task-emit-builder'; +export * from './emit-task-emit-event-builder'; +export * from './endpoint-builder'; +export * from './endpoint-authentication-builder'; +export * from './error-builder'; export * from './event-consumption-strategy-builder'; export * from './event-consumption-strategy-all-builder'; export * from './event-consumption-strategy-any-builder'; -export * from './raise-task-builder'; -export * from './run-task-builder'; -export * from './run-task-run-builder'; -export * from './run-task-run-script-builder'; -export * from './set-task-builder'; -export * from './switch-task-builder'; -export * from './switch-task-switch-builder'; -export * from './try-task-builder'; -export * from './retry-policy-backoff-builder'; -export * from './wait-task-builder'; -export * from './task-list-builder'; -export * from './use-extensions-builder'; -export * from './workflow-builder'; -export * from './document-builder'; -export * from './document-tags-builder'; -export * from './input-builder'; -export * from './authentication-policy-basic-builder'; -export * from './authentication-policy-bearer-builder'; -export * from './authentication-policy-oauth2-builder'; -export * from './authentication-policy-oauth2-client-builder'; -export * from './oauth2-token-builder'; -export * from './use-builder'; -export * from './use-authentications-builder'; -export * from './use-errors-builder'; -export * from './error-builder'; -export * from './extension-builder'; -export * from './task-base-builder'; -export * from './output-builder'; +export * from './event-filter-builder'; +export * from './event-filter-correlate-builder'; +export * from './event-filter-with-builder'; export * from './export-builder'; -export * from './timeout-builder'; -export * from './duration-builder'; -export * from './call-async-api-with-builder'; -export * from './call-grpc-with-builder'; -export * from './call-grpc-with-service-builder'; -export * from './call-grpc-with-arguments-builder'; -export * from './call-http-with-builder'; -export * from './endpoint-builder'; -export * from './call-open-api-with-builder'; -export * from './call-open-api-with-parameters-builder'; -export * from './call-function-with-builder'; +export * from './extension-builder'; +export * from './external-resource-builder'; +export * from './external-resource-authentication-builder'; +export * from './flow-directive-builder'; +export * from './fork-task-builder'; export * from './fork-task-fork-builder'; -export * from './emit-task-emit-builder'; -export * from './emit-task-emit-event-builder'; +export * from './for-task-builder'; export * from './for-task-for-builder'; +export * from './input-builder'; +export * from './listen-task-builder'; export * from './listen-task-listen-builder'; -export * from './event-filter-builder'; -export * from './event-filter-with-builder'; -export * from './event-filter-correlate-builder'; +export * from './oauth2-token-builder'; +export * from './output-builder'; +export * from './raise-task-builder'; export * from './raise-task-raise-builder'; +export * from './retry-policy-builder'; +export * from './retry-policy-backoff-builder'; +export * from './retry-policy-jitter-builder'; +export * from './retry-policy-limit-builder'; +export * from './retry-policy-limit-attempt-builder'; +export * from './run-task-builder'; +export * from './run-task-run-builder'; export * from './run-task-run-container-builder'; +export * from './run-task-run-script-builder'; export * from './run-task-run-shell-builder'; export * from './run-task-run-shell-arguments-builder'; export * from './run-task-run-shell-environment-builder'; export * from './run-task-run-workflow-builder'; export * from './run-task-run-workflow-input-builder'; +export * from './schedule-builder'; +export * from './schema-builder'; +export * from './set-task-builder'; export * from './set-task-set-builder'; +export * from './switch-task-builder'; +export * from './switch-task-switch-builder'; export * from './switch-task-switch-case-builder'; +export * from './task-builder'; +export * from './task-base-builder'; +export * from './task-list-builder'; +export * from './timeout-builder'; +export * from './try-task-builder'; export * from './try-task-catch-builder'; -export * from './retry-policy-builder'; -export * from './retry-policy-limit-builder'; -export * from './retry-policy-limit-attempt-builder'; -export * from './retry-policy-jitter-builder'; +export * from './use-builder'; +export * from './use-authentications-builder'; +export * from './use-errors-builder'; +export * from './use-extensions-builder'; export * from './use-functions-builder'; export * from './use-retries-builder'; -export * from './schedule-builder'; +export * from './wait-task-builder'; +export * from './workflow-builder'; diff --git a/src/lib/generated/classes/authentication-policy-basic.ts b/src/lib/generated/classes/authentication-policy-basic.ts index a7c898c5..43033306 100644 --- a/src/lib/generated/classes/authentication-policy-basic.ts +++ b/src/lib/generated/classes/authentication-policy-basic.ts @@ -22,34 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class AuthenticationPolicyBasic extends ObjectHydrator { +/** + * Represents the intersection between the AuthenticationPolicyBasic class and type + */ +export type AuthenticationPolicyBasicIntersection = AuthenticationPolicyBasic & Specification.AuthenticationPolicyBasic; + +/** + * Represents a constructor for the intersection of the AuthenticationPolicyBasic class and type + */ +export interface AuthenticationPolicyBasicConstructor { + new (model?: Partial): AuthenticationPolicyBasicIntersection; +} + +/** + * Represents a AuthenticationPolicyBasic with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class AuthenticationPolicyBasic extends ObjectHydrator { + /** + * Instanciates a new instance of the AuthenticationPolicyBasic class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the AuthenticationPolicyBasic. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('AuthenticationPolicyBasic')?.constructor?.(this); + getLifecycleHooks('AuthenticationPolicyBasic')?.constructor?.(this); } + /** + * Validates the current instance of the AuthenticationPolicyBasic. + * Throws if invalid. + */ validate() { - const copy = new AuthenticationPolicyBasic(this as any) as AuthenticationPolicyBasic & - Specification.AuthenticationPolicyBasic; - getLifecycleHook('AuthenticationPolicyBasic')?.preValidation?.(copy); - validate('AuthenticationPolicyBasic', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('AuthenticationPolicyBasic')?.postValidation?.(copy); + const copy = new AuthenticationPolicyBasic(this as any) as AuthenticationPolicyBasicIntersection; + validate('AuthenticationPolicyBasic', copy); } + /** + * Normalizes the current instance of the AuthenticationPolicyBasic. + * Creates a copy of the AuthenticationPolicyBasic, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the AuthenticationPolicyBasic instance. + */ normalize(): AuthenticationPolicyBasic & Specification.AuthenticationPolicyBasic { - const copy = new AuthenticationPolicyBasic(this as any) as AuthenticationPolicyBasic & - Specification.AuthenticationPolicyBasic; - return getLifecycleHook('AuthenticationPolicyBasic')?.normalize?.(copy) || copy; + const copy = new AuthenticationPolicyBasic(this as any) as AuthenticationPolicyBasicIntersection; + return getLifecycleHooks('AuthenticationPolicyBasic')?.normalize?.(copy) || copy; } } -export const _AuthenticationPolicyBasic = AuthenticationPolicyBasic as { - new ( - model?: Partial, - ): AuthenticationPolicyBasic & Specification.AuthenticationPolicyBasic; -}; +export const _AuthenticationPolicyBasic = AuthenticationPolicyBasic as AuthenticationPolicyBasicConstructor; diff --git a/src/lib/generated/classes/authentication-policy-bearer.ts b/src/lib/generated/classes/authentication-policy-bearer.ts index f89b814a..2cc5c450 100644 --- a/src/lib/generated/classes/authentication-policy-bearer.ts +++ b/src/lib/generated/classes/authentication-policy-bearer.ts @@ -22,34 +22,58 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class AuthenticationPolicyBearer extends ObjectHydrator { +/** + * Represents the intersection between the AuthenticationPolicyBearer class and type + */ +export type AuthenticationPolicyBearerIntersection = AuthenticationPolicyBearer & + Specification.AuthenticationPolicyBearer; + +/** + * Represents a constructor for the intersection of the AuthenticationPolicyBearer class and type + */ +export interface AuthenticationPolicyBearerConstructor { + new (model?: Partial): AuthenticationPolicyBearerIntersection; +} + +/** + * Represents a AuthenticationPolicyBearer with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class AuthenticationPolicyBearer extends ObjectHydrator { + /** + * Instanciates a new instance of the AuthenticationPolicyBearer class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the AuthenticationPolicyBearer. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('AuthenticationPolicyBearer')?.constructor?.(this); + getLifecycleHooks('AuthenticationPolicyBearer')?.constructor?.(this); } + /** + * Validates the current instance of the AuthenticationPolicyBearer. + * Throws if invalid. + */ validate() { - const copy = new AuthenticationPolicyBearer(this as any) as AuthenticationPolicyBearer & - Specification.AuthenticationPolicyBearer; - getLifecycleHook('AuthenticationPolicyBearer')?.preValidation?.(copy); - validate('AuthenticationPolicyBearer', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('AuthenticationPolicyBearer')?.postValidation?.(copy); + const copy = new AuthenticationPolicyBearer(this as any) as AuthenticationPolicyBearerIntersection; + validate('AuthenticationPolicyBearer', copy); } + /** + * Normalizes the current instance of the AuthenticationPolicyBearer. + * Creates a copy of the AuthenticationPolicyBearer, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the AuthenticationPolicyBearer instance. + */ normalize(): AuthenticationPolicyBearer & Specification.AuthenticationPolicyBearer { - const copy = new AuthenticationPolicyBearer(this as any) as AuthenticationPolicyBearer & - Specification.AuthenticationPolicyBearer; - return getLifecycleHook('AuthenticationPolicyBearer')?.normalize?.(copy) || copy; + const copy = new AuthenticationPolicyBearer(this as any) as AuthenticationPolicyBearerIntersection; + return getLifecycleHooks('AuthenticationPolicyBearer')?.normalize?.(copy) || copy; } } -export const _AuthenticationPolicyBearer = AuthenticationPolicyBearer as { - new ( - model?: Partial, - ): AuthenticationPolicyBearer & Specification.AuthenticationPolicyBearer; -}; +export const _AuthenticationPolicyBearer = AuthenticationPolicyBearer as AuthenticationPolicyBearerConstructor; diff --git a/src/lib/generated/classes/authentication-policy-oauth2-client.ts b/src/lib/generated/classes/authentication-policy-oauth2-client.ts index 9007b358..890598ed 100644 --- a/src/lib/generated/classes/authentication-policy-oauth2-client.ts +++ b/src/lib/generated/classes/authentication-policy-oauth2-client.ts @@ -22,34 +22,59 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class AuthenticationPolicyOauth2Client extends ObjectHydrator { +/** + * Represents the intersection between the AuthenticationPolicyOauth2Client class and type + */ +export type AuthenticationPolicyOauth2ClientIntersection = AuthenticationPolicyOauth2Client & + Specification.AuthenticationPolicyOauth2Client; + +/** + * Represents a constructor for the intersection of the AuthenticationPolicyOauth2Client class and type + */ +export interface AuthenticationPolicyOauth2ClientConstructor { + new (model?: Partial): AuthenticationPolicyOauth2ClientIntersection; +} + +/** + * Represents a AuthenticationPolicyOauth2Client with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class AuthenticationPolicyOauth2Client extends ObjectHydrator { + /** + * Instanciates a new instance of the AuthenticationPolicyOauth2Client class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the AuthenticationPolicyOauth2Client. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('AuthenticationPolicyOauth2Client')?.constructor?.(this); + getLifecycleHooks('AuthenticationPolicyOauth2Client')?.constructor?.(this); } + /** + * Validates the current instance of the AuthenticationPolicyOauth2Client. + * Throws if invalid. + */ validate() { - const copy = new AuthenticationPolicyOauth2Client(this as any) as AuthenticationPolicyOauth2Client & - Specification.AuthenticationPolicyOauth2Client; - getLifecycleHook('AuthenticationPolicyOauth2Client')?.preValidation?.(copy); - validate('AuthenticationPolicyOauth2Client', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('AuthenticationPolicyOauth2Client')?.postValidation?.(copy); + const copy = new AuthenticationPolicyOauth2Client(this as any) as AuthenticationPolicyOauth2ClientIntersection; + validate('AuthenticationPolicyOauth2Client', copy); } + /** + * Normalizes the current instance of the AuthenticationPolicyOauth2Client. + * Creates a copy of the AuthenticationPolicyOauth2Client, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the AuthenticationPolicyOauth2Client instance. + */ normalize(): AuthenticationPolicyOauth2Client & Specification.AuthenticationPolicyOauth2Client { - const copy = new AuthenticationPolicyOauth2Client(this as any) as AuthenticationPolicyOauth2Client & - Specification.AuthenticationPolicyOauth2Client; - return getLifecycleHook('AuthenticationPolicyOauth2Client')?.normalize?.(copy) || copy; + const copy = new AuthenticationPolicyOauth2Client(this as any) as AuthenticationPolicyOauth2ClientIntersection; + return getLifecycleHooks('AuthenticationPolicyOauth2Client')?.normalize?.(copy) || copy; } } -export const _AuthenticationPolicyOauth2Client = AuthenticationPolicyOauth2Client as { - new ( - model?: Partial, - ): AuthenticationPolicyOauth2Client & Specification.AuthenticationPolicyOauth2Client; -}; +export const _AuthenticationPolicyOauth2Client = + AuthenticationPolicyOauth2Client as AuthenticationPolicyOauth2ClientConstructor; diff --git a/src/lib/generated/classes/authentication-policy-oauth2.ts b/src/lib/generated/classes/authentication-policy-oauth2.ts index 1dcf35c1..e6a69f42 100644 --- a/src/lib/generated/classes/authentication-policy-oauth2.ts +++ b/src/lib/generated/classes/authentication-policy-oauth2.ts @@ -24,11 +24,34 @@ import { _AuthenticationPolicyOauth2Client } from './authentication-policy-oauth import { _Oauth2Token } from './oauth2-token'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class AuthenticationPolicyOauth2 extends ObjectHydrator { +/** + * Represents the intersection between the AuthenticationPolicyOauth2 class and type + */ +export type AuthenticationPolicyOauth2Intersection = AuthenticationPolicyOauth2 & + Specification.AuthenticationPolicyOauth2; + +/** + * Represents a constructor for the intersection of the AuthenticationPolicyOauth2 class and type + */ +export interface AuthenticationPolicyOauth2Constructor { + new (model?: Partial): AuthenticationPolicyOauth2Intersection; +} + +/** + * Represents a AuthenticationPolicyOauth2 with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class AuthenticationPolicyOauth2 extends ObjectHydrator { + /** + * Instanciates a new instance of the AuthenticationPolicyOauth2 class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the AuthenticationPolicyOauth2. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.AuthenticationPolicyOauth2 & object; @@ -37,26 +60,28 @@ class AuthenticationPolicyOauth2 extends ObjectHydrator, - ): AuthenticationPolicyOauth2 & Specification.AuthenticationPolicyOauth2; -}; +export const _AuthenticationPolicyOauth2 = AuthenticationPolicyOauth2 as AuthenticationPolicyOauth2Constructor; diff --git a/src/lib/generated/classes/authentication-policy.ts b/src/lib/generated/classes/authentication-policy.ts index b71ea1b1..0cad70f4 100644 --- a/src/lib/generated/classes/authentication-policy.ts +++ b/src/lib/generated/classes/authentication-policy.ts @@ -25,11 +25,33 @@ import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class AuthenticationPolicy extends ObjectHydrator { +/** + * Represents the intersection between the AuthenticationPolicy class and type + */ +export type AuthenticationPolicyIntersection = AuthenticationPolicy & Specification.AuthenticationPolicy; + +/** + * Represents a constructor for the intersection of the AuthenticationPolicy class and type + */ +export interface AuthenticationPolicyConstructor { + new (model?: Partial): AuthenticationPolicyIntersection; +} + +/** + * Represents a AuthenticationPolicy with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class AuthenticationPolicy extends ObjectHydrator { + /** + * Instanciates a new instance of the AuthenticationPolicy class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the AuthenticationPolicy. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.AuthenticationPolicy & object; @@ -41,22 +63,28 @@ class AuthenticationPolicy extends ObjectHydrator): AuthenticationPolicy & Specification.AuthenticationPolicy; -}; +export const _AuthenticationPolicy = AuthenticationPolicy as AuthenticationPolicyConstructor; diff --git a/src/lib/generated/classes/call-async-api-with-authentication.ts b/src/lib/generated/classes/call-async-api-with-authentication.ts index fa8e4881..490d6505 100644 --- a/src/lib/generated/classes/call-async-api-with-authentication.ts +++ b/src/lib/generated/classes/call-async-api-with-authentication.ts @@ -25,11 +25,34 @@ import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class CallAsyncAPIWithAuthentication extends ObjectHydrator { +/** + * Represents the intersection between the CallAsyncAPIWithAuthentication class and type + */ +export type CallAsyncAPIWithAuthenticationIntersection = CallAsyncAPIWithAuthentication & + Specification.CallAsyncAPIWithAuthentication; + +/** + * Represents a constructor for the intersection of the CallAsyncAPIWithAuthentication class and type + */ +export interface CallAsyncAPIWithAuthenticationConstructor { + new (model?: Partial): CallAsyncAPIWithAuthenticationIntersection; +} + +/** + * Represents a CallAsyncAPIWithAuthentication with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class CallAsyncAPIWithAuthentication extends ObjectHydrator { + /** + * Instanciates a new instance of the CallAsyncAPIWithAuthentication class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the CallAsyncAPIWithAuthentication. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.CallAsyncAPIWithAuthentication & object; @@ -41,26 +64,29 @@ class CallAsyncAPIWithAuthentication extends ObjectHydrator, - ): CallAsyncAPIWithAuthentication & Specification.CallAsyncAPIWithAuthentication; -}; +export const _CallAsyncAPIWithAuthentication = + CallAsyncAPIWithAuthentication as CallAsyncAPIWithAuthenticationConstructor; diff --git a/src/lib/generated/classes/call-async-api-with.ts b/src/lib/generated/classes/call-async-api-with.ts index 43c4c7e5..5f5bf036 100644 --- a/src/lib/generated/classes/call-async-api-with.ts +++ b/src/lib/generated/classes/call-async-api-with.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class CallAsyncAPIWith extends ObjectHydrator { +/** + * Represents the intersection between the CallAsyncAPIWith class and type + */ +export type CallAsyncAPIWithIntersection = CallAsyncAPIWith & Specification.CallAsyncAPIWith; + +/** + * Represents a constructor for the intersection of the CallAsyncAPIWith class and type + */ +export interface CallAsyncAPIWithConstructor { + new (model?: Partial): CallAsyncAPIWithIntersection; +} + +/** + * Represents a CallAsyncAPIWith with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class CallAsyncAPIWith extends ObjectHydrator { + /** + * Instanciates a new instance of the CallAsyncAPIWith class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the CallAsyncAPIWith. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('CallAsyncAPIWith')?.constructor?.(this); + getLifecycleHooks('CallAsyncAPIWith')?.constructor?.(this); } + /** + * Validates the current instance of the CallAsyncAPIWith. + * Throws if invalid. + */ validate() { - const copy = new CallAsyncAPIWith(this as any) as CallAsyncAPIWith & Specification.CallAsyncAPIWith; - getLifecycleHook('CallAsyncAPIWith')?.preValidation?.(copy); - validate('CallAsyncAPIWith', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('CallAsyncAPIWith')?.postValidation?.(copy); + const copy = new CallAsyncAPIWith(this as any) as CallAsyncAPIWithIntersection; + validate('CallAsyncAPIWith', copy); } + /** + * Normalizes the current instance of the CallAsyncAPIWith. + * Creates a copy of the CallAsyncAPIWith, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the CallAsyncAPIWith instance. + */ normalize(): CallAsyncAPIWith & Specification.CallAsyncAPIWith { - const copy = new CallAsyncAPIWith(this as any) as CallAsyncAPIWith & Specification.CallAsyncAPIWith; - return getLifecycleHook('CallAsyncAPIWith')?.normalize?.(copy) || copy; + const copy = new CallAsyncAPIWith(this as any) as CallAsyncAPIWithIntersection; + return getLifecycleHooks('CallAsyncAPIWith')?.normalize?.(copy) || copy; } } -export const _CallAsyncAPIWith = CallAsyncAPIWith as { - new (model?: Partial): CallAsyncAPIWith & Specification.CallAsyncAPIWith; -}; +export const _CallAsyncAPIWith = CallAsyncAPIWith as CallAsyncAPIWithConstructor; diff --git a/src/lib/generated/classes/call-async-api.ts b/src/lib/generated/classes/call-async-api.ts index ed6806dd..e2695628 100644 --- a/src/lib/generated/classes/call-async-api.ts +++ b/src/lib/generated/classes/call-async-api.ts @@ -27,11 +27,33 @@ import { _Timeout } from './timeout'; import { _CallAsyncAPIWith } from './call-async-api-with'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class CallAsyncAPI extends _TaskBase { +/** + * Represents the intersection between the CallAsyncAPI class and type + */ +export type CallAsyncAPIIntersection = CallAsyncAPI & Specification.CallAsyncAPI; + +/** + * Represents a constructor for the intersection of the CallAsyncAPI class and type + */ +export interface CallAsyncAPIConstructor { + new (model?: Partial): CallAsyncAPIIntersection; +} + +/** + * Represents a CallAsyncAPI with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class CallAsyncAPI extends _TaskBase { + /** + * Instanciates a new instance of the CallAsyncAPI class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the CallAsyncAPI. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.CallAsyncAPI & object; @@ -43,22 +65,28 @@ class CallAsyncAPI extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.with === 'object') self.with = new _CallAsyncAPIWith(model.with); } - getLifecycleHook('CallAsyncAPI')?.constructor?.(this); + getLifecycleHooks('CallAsyncAPI')?.constructor?.(this); } + /** + * Validates the current instance of the CallAsyncAPI. + * Throws if invalid. + */ validate() { - const copy = new CallAsyncAPI(this as any) as CallAsyncAPI & Specification.CallAsyncAPI; - getLifecycleHook('CallAsyncAPI')?.preValidation?.(copy); - validate('CallAsyncAPI', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('CallAsyncAPI')?.postValidation?.(copy); + const copy = new CallAsyncAPI(this as any) as CallAsyncAPIIntersection; + validate('CallAsyncAPI', copy); } + /** + * Normalizes the current instance of the CallAsyncAPI. + * Creates a copy of the CallAsyncAPI, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the CallAsyncAPI instance. + */ normalize(): CallAsyncAPI & Specification.CallAsyncAPI { - const copy = new CallAsyncAPI(this as any) as CallAsyncAPI & Specification.CallAsyncAPI; - return getLifecycleHook('CallAsyncAPI')?.normalize?.(copy) || copy; + const copy = new CallAsyncAPI(this as any) as CallAsyncAPIIntersection; + return getLifecycleHooks('CallAsyncAPI')?.normalize?.(copy) || copy; } } -export const _CallAsyncAPI = CallAsyncAPI as { - new (model?: Partial): CallAsyncAPI & Specification.CallAsyncAPI; -}; +export const _CallAsyncAPI = CallAsyncAPI as CallAsyncAPIConstructor; diff --git a/src/lib/generated/classes/call-function-with.ts b/src/lib/generated/classes/call-function-with.ts index 0b30e3e1..9bde3457 100644 --- a/src/lib/generated/classes/call-function-with.ts +++ b/src/lib/generated/classes/call-function-with.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class CallFunctionWith extends ObjectHydrator { +/** + * Represents the intersection between the CallFunctionWith class and type + */ +export type CallFunctionWithIntersection = CallFunctionWith & Specification.CallFunctionWith; + +/** + * Represents a constructor for the intersection of the CallFunctionWith class and type + */ +export interface CallFunctionWithConstructor { + new (model?: Partial): CallFunctionWithIntersection; +} + +/** + * Represents a CallFunctionWith with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class CallFunctionWith extends ObjectHydrator { + /** + * Instanciates a new instance of the CallFunctionWith class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the CallFunctionWith. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('CallFunctionWith')?.constructor?.(this); + getLifecycleHooks('CallFunctionWith')?.constructor?.(this); } + /** + * Validates the current instance of the CallFunctionWith. + * Throws if invalid. + */ validate() { - const copy = new CallFunctionWith(this as any) as CallFunctionWith & Specification.CallFunctionWith; - getLifecycleHook('CallFunctionWith')?.preValidation?.(copy); - validate('CallFunctionWith', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('CallFunctionWith')?.postValidation?.(copy); + const copy = new CallFunctionWith(this as any) as CallFunctionWithIntersection; + validate('CallFunctionWith', copy); } + /** + * Normalizes the current instance of the CallFunctionWith. + * Creates a copy of the CallFunctionWith, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the CallFunctionWith instance. + */ normalize(): CallFunctionWith & Specification.CallFunctionWith { - const copy = new CallFunctionWith(this as any) as CallFunctionWith & Specification.CallFunctionWith; - return getLifecycleHook('CallFunctionWith')?.normalize?.(copy) || copy; + const copy = new CallFunctionWith(this as any) as CallFunctionWithIntersection; + return getLifecycleHooks('CallFunctionWith')?.normalize?.(copy) || copy; } } -export const _CallFunctionWith = CallFunctionWith as { - new (model?: Partial): CallFunctionWith & Specification.CallFunctionWith; -}; +export const _CallFunctionWith = CallFunctionWith as CallFunctionWithConstructor; diff --git a/src/lib/generated/classes/call-function.ts b/src/lib/generated/classes/call-function.ts index baa6ed12..88df771f 100644 --- a/src/lib/generated/classes/call-function.ts +++ b/src/lib/generated/classes/call-function.ts @@ -27,11 +27,33 @@ import { _Timeout } from './timeout'; import { _CallFunctionWith } from './call-function-with'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class CallFunction extends _TaskBase { +/** + * Represents the intersection between the CallFunction class and type + */ +export type CallFunctionIntersection = CallFunction & Specification.CallFunction; + +/** + * Represents a constructor for the intersection of the CallFunction class and type + */ +export interface CallFunctionConstructor { + new (model?: Partial): CallFunctionIntersection; +} + +/** + * Represents a CallFunction with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class CallFunction extends _TaskBase { + /** + * Instanciates a new instance of the CallFunction class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the CallFunction. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.CallFunction & object; @@ -42,22 +64,28 @@ class CallFunction extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.with === 'object') self.with = new _CallFunctionWith(model.with); } - getLifecycleHook('CallFunction')?.constructor?.(this); + getLifecycleHooks('CallFunction')?.constructor?.(this); } + /** + * Validates the current instance of the CallFunction. + * Throws if invalid. + */ validate() { - const copy = new CallFunction(this as any) as CallFunction & Specification.CallFunction; - getLifecycleHook('CallFunction')?.preValidation?.(copy); - validate('CallFunction', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('CallFunction')?.postValidation?.(copy); + const copy = new CallFunction(this as any) as CallFunctionIntersection; + validate('CallFunction', copy); } + /** + * Normalizes the current instance of the CallFunction. + * Creates a copy of the CallFunction, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the CallFunction instance. + */ normalize(): CallFunction & Specification.CallFunction { - const copy = new CallFunction(this as any) as CallFunction & Specification.CallFunction; - return getLifecycleHook('CallFunction')?.normalize?.(copy) || copy; + const copy = new CallFunction(this as any) as CallFunctionIntersection; + return getLifecycleHooks('CallFunction')?.normalize?.(copy) || copy; } } -export const _CallFunction = CallFunction as { - new (model?: Partial): CallFunction & Specification.CallFunction; -}; +export const _CallFunction = CallFunction as CallFunctionConstructor; diff --git a/src/lib/generated/classes/call-grpc-with-arguments.ts b/src/lib/generated/classes/call-grpc-with-arguments.ts index 503fa845..05adfb06 100644 --- a/src/lib/generated/classes/call-grpc-with-arguments.ts +++ b/src/lib/generated/classes/call-grpc-with-arguments.ts @@ -22,32 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class CallGRPCWithArguments extends ObjectHydrator { +/** + * Represents the intersection between the CallGRPCWithArguments class and type + */ +export type CallGRPCWithArgumentsIntersection = CallGRPCWithArguments & Specification.CallGRPCWithArguments; + +/** + * Represents a constructor for the intersection of the CallGRPCWithArguments class and type + */ +export interface CallGRPCWithArgumentsConstructor { + new (model?: Partial): CallGRPCWithArgumentsIntersection; +} + +/** + * Represents a CallGRPCWithArguments with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class CallGRPCWithArguments extends ObjectHydrator { + /** + * Instanciates a new instance of the CallGRPCWithArguments class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the CallGRPCWithArguments. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('CallGRPCWithArguments')?.constructor?.(this); + getLifecycleHooks('CallGRPCWithArguments')?.constructor?.(this); } + /** + * Validates the current instance of the CallGRPCWithArguments. + * Throws if invalid. + */ validate() { - const copy = new CallGRPCWithArguments(this as any) as CallGRPCWithArguments & Specification.CallGRPCWithArguments; - getLifecycleHook('CallGRPCWithArguments')?.preValidation?.(copy); - validate('CallGRPCWithArguments', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('CallGRPCWithArguments')?.postValidation?.(copy); + const copy = new CallGRPCWithArguments(this as any) as CallGRPCWithArgumentsIntersection; + validate('CallGRPCWithArguments', copy); } + /** + * Normalizes the current instance of the CallGRPCWithArguments. + * Creates a copy of the CallGRPCWithArguments, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the CallGRPCWithArguments instance. + */ normalize(): CallGRPCWithArguments & Specification.CallGRPCWithArguments { - const copy = new CallGRPCWithArguments(this as any) as CallGRPCWithArguments & Specification.CallGRPCWithArguments; - return getLifecycleHook('CallGRPCWithArguments')?.normalize?.(copy) || copy; + const copy = new CallGRPCWithArguments(this as any) as CallGRPCWithArgumentsIntersection; + return getLifecycleHooks('CallGRPCWithArguments')?.normalize?.(copy) || copy; } } -export const _CallGRPCWithArguments = CallGRPCWithArguments as { - new ( - model?: Partial, - ): CallGRPCWithArguments & Specification.CallGRPCWithArguments; -}; +export const _CallGRPCWithArguments = CallGRPCWithArguments as CallGRPCWithArgumentsConstructor; diff --git a/src/lib/generated/classes/call-grpc-with-service-authentication.ts b/src/lib/generated/classes/call-grpc-with-service-authentication.ts index 1734e75c..b9fa1533 100644 --- a/src/lib/generated/classes/call-grpc-with-service-authentication.ts +++ b/src/lib/generated/classes/call-grpc-with-service-authentication.ts @@ -25,11 +25,34 @@ import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class CallGRPCWithServiceAuthentication extends ObjectHydrator { +/** + * Represents the intersection between the CallGRPCWithServiceAuthentication class and type + */ +export type CallGRPCWithServiceAuthenticationIntersection = CallGRPCWithServiceAuthentication & + Specification.CallGRPCWithServiceAuthentication; + +/** + * Represents a constructor for the intersection of the CallGRPCWithServiceAuthentication class and type + */ +export interface CallGRPCWithServiceAuthenticationConstructor { + new (model?: Partial): CallGRPCWithServiceAuthenticationIntersection; +} + +/** + * Represents a CallGRPCWithServiceAuthentication with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class CallGRPCWithServiceAuthentication extends ObjectHydrator { + /** + * Instanciates a new instance of the CallGRPCWithServiceAuthentication class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the CallGRPCWithServiceAuthentication. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.CallGRPCWithServiceAuthentication & object; @@ -41,26 +64,29 @@ class CallGRPCWithServiceAuthentication extends ObjectHydrator, - ): CallGRPCWithServiceAuthentication & Specification.CallGRPCWithServiceAuthentication; -}; +export const _CallGRPCWithServiceAuthentication = + CallGRPCWithServiceAuthentication as CallGRPCWithServiceAuthenticationConstructor; diff --git a/src/lib/generated/classes/call-grpc-with-service.ts b/src/lib/generated/classes/call-grpc-with-service.ts index 04f7ed67..7fee4d79 100644 --- a/src/lib/generated/classes/call-grpc-with-service.ts +++ b/src/lib/generated/classes/call-grpc-with-service.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class CallGRPCWithService extends ObjectHydrator { +/** + * Represents the intersection between the CallGRPCWithService class and type + */ +export type CallGRPCWithServiceIntersection = CallGRPCWithService & Specification.CallGRPCWithService; + +/** + * Represents a constructor for the intersection of the CallGRPCWithService class and type + */ +export interface CallGRPCWithServiceConstructor { + new (model?: Partial): CallGRPCWithServiceIntersection; +} + +/** + * Represents a CallGRPCWithService with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class CallGRPCWithService extends ObjectHydrator { + /** + * Instanciates a new instance of the CallGRPCWithService class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the CallGRPCWithService. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('CallGRPCWithService')?.constructor?.(this); + getLifecycleHooks('CallGRPCWithService')?.constructor?.(this); } + /** + * Validates the current instance of the CallGRPCWithService. + * Throws if invalid. + */ validate() { - const copy = new CallGRPCWithService(this as any) as CallGRPCWithService & Specification.CallGRPCWithService; - getLifecycleHook('CallGRPCWithService')?.preValidation?.(copy); - validate('CallGRPCWithService', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('CallGRPCWithService')?.postValidation?.(copy); + const copy = new CallGRPCWithService(this as any) as CallGRPCWithServiceIntersection; + validate('CallGRPCWithService', copy); } + /** + * Normalizes the current instance of the CallGRPCWithService. + * Creates a copy of the CallGRPCWithService, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the CallGRPCWithService instance. + */ normalize(): CallGRPCWithService & Specification.CallGRPCWithService { - const copy = new CallGRPCWithService(this as any) as CallGRPCWithService & Specification.CallGRPCWithService; - return getLifecycleHook('CallGRPCWithService')?.normalize?.(copy) || copy; + const copy = new CallGRPCWithService(this as any) as CallGRPCWithServiceIntersection; + return getLifecycleHooks('CallGRPCWithService')?.normalize?.(copy) || copy; } } -export const _CallGRPCWithService = CallGRPCWithService as { - new (model?: Partial): CallGRPCWithService & Specification.CallGRPCWithService; -}; +export const _CallGRPCWithService = CallGRPCWithService as CallGRPCWithServiceConstructor; diff --git a/src/lib/generated/classes/call-grpc-with.ts b/src/lib/generated/classes/call-grpc-with.ts index 37525f35..d7169a66 100644 --- a/src/lib/generated/classes/call-grpc-with.ts +++ b/src/lib/generated/classes/call-grpc-with.ts @@ -24,11 +24,33 @@ import { _CallGRPCWithService } from './call-grpc-with-service'; import { _CallGRPCWithArguments } from './call-grpc-with-arguments'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class CallGRPCWith extends ObjectHydrator { +/** + * Represents the intersection between the CallGRPCWith class and type + */ +export type CallGRPCWithIntersection = CallGRPCWith & Specification.CallGRPCWith; + +/** + * Represents a constructor for the intersection of the CallGRPCWith class and type + */ +export interface CallGRPCWithConstructor { + new (model?: Partial): CallGRPCWithIntersection; +} + +/** + * Represents a CallGRPCWith with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class CallGRPCWith extends ObjectHydrator { + /** + * Instanciates a new instance of the CallGRPCWith class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the CallGRPCWith. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.CallGRPCWith & object; @@ -36,22 +58,28 @@ class CallGRPCWith extends ObjectHydrator { if (typeof model.service === 'object') self.service = new _CallGRPCWithService(model.service); if (typeof model.arguments === 'object') self.arguments = new _CallGRPCWithArguments(model.arguments); } - getLifecycleHook('CallGRPCWith')?.constructor?.(this); + getLifecycleHooks('CallGRPCWith')?.constructor?.(this); } + /** + * Validates the current instance of the CallGRPCWith. + * Throws if invalid. + */ validate() { - const copy = new CallGRPCWith(this as any) as CallGRPCWith & Specification.CallGRPCWith; - getLifecycleHook('CallGRPCWith')?.preValidation?.(copy); - validate('CallGRPCWith', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('CallGRPCWith')?.postValidation?.(copy); + const copy = new CallGRPCWith(this as any) as CallGRPCWithIntersection; + validate('CallGRPCWith', copy); } + /** + * Normalizes the current instance of the CallGRPCWith. + * Creates a copy of the CallGRPCWith, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the CallGRPCWith instance. + */ normalize(): CallGRPCWith & Specification.CallGRPCWith { - const copy = new CallGRPCWith(this as any) as CallGRPCWith & Specification.CallGRPCWith; - return getLifecycleHook('CallGRPCWith')?.normalize?.(copy) || copy; + const copy = new CallGRPCWith(this as any) as CallGRPCWithIntersection; + return getLifecycleHooks('CallGRPCWith')?.normalize?.(copy) || copy; } } -export const _CallGRPCWith = CallGRPCWith as { - new (model?: Partial): CallGRPCWith & Specification.CallGRPCWith; -}; +export const _CallGRPCWith = CallGRPCWith as CallGRPCWithConstructor; diff --git a/src/lib/generated/classes/call-grpc.ts b/src/lib/generated/classes/call-grpc.ts index af103a58..306194f1 100644 --- a/src/lib/generated/classes/call-grpc.ts +++ b/src/lib/generated/classes/call-grpc.ts @@ -27,11 +27,33 @@ import { _Timeout } from './timeout'; import { _CallGRPCWith } from './call-grpc-with'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class CallGRPC extends _TaskBase { +/** + * Represents the intersection between the CallGRPC class and type + */ +export type CallGRPCIntersection = CallGRPC & Specification.CallGRPC; + +/** + * Represents a constructor for the intersection of the CallGRPC class and type + */ +export interface CallGRPCConstructor { + new (model?: Partial): CallGRPCIntersection; +} + +/** + * Represents a CallGRPC with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class CallGRPC extends _TaskBase { + /** + * Instanciates a new instance of the CallGRPC class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the CallGRPC. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.CallGRPC & object; @@ -43,22 +65,28 @@ class CallGRPC extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.with === 'object') self.with = new _CallGRPCWith(model.with); } - getLifecycleHook('CallGRPC')?.constructor?.(this); + getLifecycleHooks('CallGRPC')?.constructor?.(this); } + /** + * Validates the current instance of the CallGRPC. + * Throws if invalid. + */ validate() { - const copy = new CallGRPC(this as any) as CallGRPC & Specification.CallGRPC; - getLifecycleHook('CallGRPC')?.preValidation?.(copy); - validate('CallGRPC', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('CallGRPC')?.postValidation?.(copy); + const copy = new CallGRPC(this as any) as CallGRPCIntersection; + validate('CallGRPC', copy); } + /** + * Normalizes the current instance of the CallGRPC. + * Creates a copy of the CallGRPC, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the CallGRPC instance. + */ normalize(): CallGRPC & Specification.CallGRPC { - const copy = new CallGRPC(this as any) as CallGRPC & Specification.CallGRPC; - return getLifecycleHook('CallGRPC')?.normalize?.(copy) || copy; + const copy = new CallGRPC(this as any) as CallGRPCIntersection; + return getLifecycleHooks('CallGRPC')?.normalize?.(copy) || copy; } } -export const _CallGRPC = CallGRPC as { - new (model?: Partial): CallGRPC & Specification.CallGRPC; -}; +export const _CallGRPC = CallGRPC as CallGRPCConstructor; diff --git a/src/lib/generated/classes/call-http-with-endpoint.ts b/src/lib/generated/classes/call-http-with-endpoint.ts index 84f8b371..565de721 100644 --- a/src/lib/generated/classes/call-http-with-endpoint.ts +++ b/src/lib/generated/classes/call-http-with-endpoint.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class CallHTTPWithEndpoint extends ObjectHydrator { +/** + * Represents the intersection between the CallHTTPWithEndpoint class and type + */ +export type CallHTTPWithEndpointIntersection = CallHTTPWithEndpoint & Specification.CallHTTPWithEndpoint; + +/** + * Represents a constructor for the intersection of the CallHTTPWithEndpoint class and type + */ +export interface CallHTTPWithEndpointConstructor { + new (model?: Partial): CallHTTPWithEndpointIntersection; +} + +/** + * Represents a CallHTTPWithEndpoint with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class CallHTTPWithEndpoint extends ObjectHydrator { + /** + * Instanciates a new instance of the CallHTTPWithEndpoint class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the CallHTTPWithEndpoint. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('CallHTTPWithEndpoint')?.constructor?.(this); + getLifecycleHooks('CallHTTPWithEndpoint')?.constructor?.(this); } + /** + * Validates the current instance of the CallHTTPWithEndpoint. + * Throws if invalid. + */ validate() { - const copy = new CallHTTPWithEndpoint(this as any) as CallHTTPWithEndpoint & Specification.CallHTTPWithEndpoint; - getLifecycleHook('CallHTTPWithEndpoint')?.preValidation?.(copy); - validate('CallHTTPWithEndpoint', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('CallHTTPWithEndpoint')?.postValidation?.(copy); + const copy = new CallHTTPWithEndpoint(this as any) as CallHTTPWithEndpointIntersection; + validate('CallHTTPWithEndpoint', copy); } + /** + * Normalizes the current instance of the CallHTTPWithEndpoint. + * Creates a copy of the CallHTTPWithEndpoint, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the CallHTTPWithEndpoint instance. + */ normalize(): CallHTTPWithEndpoint & Specification.CallHTTPWithEndpoint { - const copy = new CallHTTPWithEndpoint(this as any) as CallHTTPWithEndpoint & Specification.CallHTTPWithEndpoint; - return getLifecycleHook('CallHTTPWithEndpoint')?.normalize?.(copy) || copy; + const copy = new CallHTTPWithEndpoint(this as any) as CallHTTPWithEndpointIntersection; + return getLifecycleHooks('CallHTTPWithEndpoint')?.normalize?.(copy) || copy; } } -export const _CallHTTPWithEndpoint = CallHTTPWithEndpoint as { - new (model?: Partial): CallHTTPWithEndpoint & Specification.CallHTTPWithEndpoint; -}; +export const _CallHTTPWithEndpoint = CallHTTPWithEndpoint as CallHTTPWithEndpointConstructor; diff --git a/src/lib/generated/classes/call-http-with.ts b/src/lib/generated/classes/call-http-with.ts index 9fe387d2..d487d61a 100644 --- a/src/lib/generated/classes/call-http-with.ts +++ b/src/lib/generated/classes/call-http-with.ts @@ -23,33 +23,61 @@ import { _CallHTTPWithEndpoint } from './call-http-with-endpoint'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class CallHTTPWith extends ObjectHydrator { +/** + * Represents the intersection between the CallHTTPWith class and type + */ +export type CallHTTPWithIntersection = CallHTTPWith & Specification.CallHTTPWith; + +/** + * Represents a constructor for the intersection of the CallHTTPWith class and type + */ +export interface CallHTTPWithConstructor { + new (model?: Partial): CallHTTPWithIntersection; +} + +/** + * Represents a CallHTTPWith with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class CallHTTPWith extends ObjectHydrator { + /** + * Instanciates a new instance of the CallHTTPWith class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the CallHTTPWith. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.CallHTTPWith & object; if (isObject(model)) { if (typeof model.endpoint === 'object') self.endpoint = new _CallHTTPWithEndpoint(model.endpoint); } - getLifecycleHook('CallHTTPWith')?.constructor?.(this); + getLifecycleHooks('CallHTTPWith')?.constructor?.(this); } + /** + * Validates the current instance of the CallHTTPWith. + * Throws if invalid. + */ validate() { - const copy = new CallHTTPWith(this as any) as CallHTTPWith & Specification.CallHTTPWith; - getLifecycleHook('CallHTTPWith')?.preValidation?.(copy); - validate('CallHTTPWith', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('CallHTTPWith')?.postValidation?.(copy); + const copy = new CallHTTPWith(this as any) as CallHTTPWithIntersection; + validate('CallHTTPWith', copy); } + /** + * Normalizes the current instance of the CallHTTPWith. + * Creates a copy of the CallHTTPWith, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the CallHTTPWith instance. + */ normalize(): CallHTTPWith & Specification.CallHTTPWith { - const copy = new CallHTTPWith(this as any) as CallHTTPWith & Specification.CallHTTPWith; - return getLifecycleHook('CallHTTPWith')?.normalize?.(copy) || copy; + const copy = new CallHTTPWith(this as any) as CallHTTPWithIntersection; + return getLifecycleHooks('CallHTTPWith')?.normalize?.(copy) || copy; } } -export const _CallHTTPWith = CallHTTPWith as { - new (model?: Partial): CallHTTPWith & Specification.CallHTTPWith; -}; +export const _CallHTTPWith = CallHTTPWith as CallHTTPWithConstructor; diff --git a/src/lib/generated/classes/call-http.ts b/src/lib/generated/classes/call-http.ts index 055fdc91..c63a5fa5 100644 --- a/src/lib/generated/classes/call-http.ts +++ b/src/lib/generated/classes/call-http.ts @@ -27,11 +27,33 @@ import { _Timeout } from './timeout'; import { _CallHTTPWith } from './call-http-with'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class CallHTTP extends _TaskBase { +/** + * Represents the intersection between the CallHTTP class and type + */ +export type CallHTTPIntersection = CallHTTP & Specification.CallHTTP; + +/** + * Represents a constructor for the intersection of the CallHTTP class and type + */ +export interface CallHTTPConstructor { + new (model?: Partial): CallHTTPIntersection; +} + +/** + * Represents a CallHTTP with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class CallHTTP extends _TaskBase { + /** + * Instanciates a new instance of the CallHTTP class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the CallHTTP. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.CallHTTP & object; @@ -43,22 +65,28 @@ class CallHTTP extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.with === 'object') self.with = new _CallHTTPWith(model.with); } - getLifecycleHook('CallHTTP')?.constructor?.(this); + getLifecycleHooks('CallHTTP')?.constructor?.(this); } + /** + * Validates the current instance of the CallHTTP. + * Throws if invalid. + */ validate() { - const copy = new CallHTTP(this as any) as CallHTTP & Specification.CallHTTP; - getLifecycleHook('CallHTTP')?.preValidation?.(copy); - validate('CallHTTP', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('CallHTTP')?.postValidation?.(copy); + const copy = new CallHTTP(this as any) as CallHTTPIntersection; + validate('CallHTTP', copy); } + /** + * Normalizes the current instance of the CallHTTP. + * Creates a copy of the CallHTTP, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the CallHTTP instance. + */ normalize(): CallHTTP & Specification.CallHTTP { - const copy = new CallHTTP(this as any) as CallHTTP & Specification.CallHTTP; - return getLifecycleHook('CallHTTP')?.normalize?.(copy) || copy; + const copy = new CallHTTP(this as any) as CallHTTPIntersection; + return getLifecycleHooks('CallHTTP')?.normalize?.(copy) || copy; } } -export const _CallHTTP = CallHTTP as { - new (model?: Partial): CallHTTP & Specification.CallHTTP; -}; +export const _CallHTTP = CallHTTP as CallHTTPConstructor; diff --git a/src/lib/generated/classes/call-open-api-with-authentication.ts b/src/lib/generated/classes/call-open-api-with-authentication.ts index 24c36d52..3d9b8b5e 100644 --- a/src/lib/generated/classes/call-open-api-with-authentication.ts +++ b/src/lib/generated/classes/call-open-api-with-authentication.ts @@ -25,11 +25,34 @@ import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class CallOpenAPIWithAuthentication extends ObjectHydrator { +/** + * Represents the intersection between the CallOpenAPIWithAuthentication class and type + */ +export type CallOpenAPIWithAuthenticationIntersection = CallOpenAPIWithAuthentication & + Specification.CallOpenAPIWithAuthentication; + +/** + * Represents a constructor for the intersection of the CallOpenAPIWithAuthentication class and type + */ +export interface CallOpenAPIWithAuthenticationConstructor { + new (model?: Partial): CallOpenAPIWithAuthenticationIntersection; +} + +/** + * Represents a CallOpenAPIWithAuthentication with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class CallOpenAPIWithAuthentication extends ObjectHydrator { + /** + * Instanciates a new instance of the CallOpenAPIWithAuthentication class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the CallOpenAPIWithAuthentication. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.CallOpenAPIWithAuthentication & object; @@ -41,26 +64,28 @@ class CallOpenAPIWithAuthentication extends ObjectHydrator, - ): CallOpenAPIWithAuthentication & Specification.CallOpenAPIWithAuthentication; -}; +export const _CallOpenAPIWithAuthentication = CallOpenAPIWithAuthentication as CallOpenAPIWithAuthenticationConstructor; diff --git a/src/lib/generated/classes/call-open-api-with-parameters.ts b/src/lib/generated/classes/call-open-api-with-parameters.ts index 800b3962..43b2829f 100644 --- a/src/lib/generated/classes/call-open-api-with-parameters.ts +++ b/src/lib/generated/classes/call-open-api-with-parameters.ts @@ -22,34 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class CallOpenAPIWithParameters extends ObjectHydrator { +/** + * Represents the intersection between the CallOpenAPIWithParameters class and type + */ +export type CallOpenAPIWithParametersIntersection = CallOpenAPIWithParameters & Specification.CallOpenAPIWithParameters; + +/** + * Represents a constructor for the intersection of the CallOpenAPIWithParameters class and type + */ +export interface CallOpenAPIWithParametersConstructor { + new (model?: Partial): CallOpenAPIWithParametersIntersection; +} + +/** + * Represents a CallOpenAPIWithParameters with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class CallOpenAPIWithParameters extends ObjectHydrator { + /** + * Instanciates a new instance of the CallOpenAPIWithParameters class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the CallOpenAPIWithParameters. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('CallOpenAPIWithParameters')?.constructor?.(this); + getLifecycleHooks('CallOpenAPIWithParameters')?.constructor?.(this); } + /** + * Validates the current instance of the CallOpenAPIWithParameters. + * Throws if invalid. + */ validate() { - const copy = new CallOpenAPIWithParameters(this as any) as CallOpenAPIWithParameters & - Specification.CallOpenAPIWithParameters; - getLifecycleHook('CallOpenAPIWithParameters')?.preValidation?.(copy); - validate('CallOpenAPIWithParameters', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('CallOpenAPIWithParameters')?.postValidation?.(copy); + const copy = new CallOpenAPIWithParameters(this as any) as CallOpenAPIWithParametersIntersection; + validate('CallOpenAPIWithParameters', copy); } + /** + * Normalizes the current instance of the CallOpenAPIWithParameters. + * Creates a copy of the CallOpenAPIWithParameters, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the CallOpenAPIWithParameters instance. + */ normalize(): CallOpenAPIWithParameters & Specification.CallOpenAPIWithParameters { - const copy = new CallOpenAPIWithParameters(this as any) as CallOpenAPIWithParameters & - Specification.CallOpenAPIWithParameters; - return getLifecycleHook('CallOpenAPIWithParameters')?.normalize?.(copy) || copy; + const copy = new CallOpenAPIWithParameters(this as any) as CallOpenAPIWithParametersIntersection; + return getLifecycleHooks('CallOpenAPIWithParameters')?.normalize?.(copy) || copy; } } -export const _CallOpenAPIWithParameters = CallOpenAPIWithParameters as { - new ( - model?: Partial, - ): CallOpenAPIWithParameters & Specification.CallOpenAPIWithParameters; -}; +export const _CallOpenAPIWithParameters = CallOpenAPIWithParameters as CallOpenAPIWithParametersConstructor; diff --git a/src/lib/generated/classes/call-open-api-with.ts b/src/lib/generated/classes/call-open-api-with.ts index 27c60654..c8e1058c 100644 --- a/src/lib/generated/classes/call-open-api-with.ts +++ b/src/lib/generated/classes/call-open-api-with.ts @@ -23,33 +23,61 @@ import { _CallOpenAPIWithParameters } from './call-open-api-with-parameters'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class CallOpenAPIWith extends ObjectHydrator { +/** + * Represents the intersection between the CallOpenAPIWith class and type + */ +export type CallOpenAPIWithIntersection = CallOpenAPIWith & Specification.CallOpenAPIWith; + +/** + * Represents a constructor for the intersection of the CallOpenAPIWith class and type + */ +export interface CallOpenAPIWithConstructor { + new (model?: Partial): CallOpenAPIWithIntersection; +} + +/** + * Represents a CallOpenAPIWith with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class CallOpenAPIWith extends ObjectHydrator { + /** + * Instanciates a new instance of the CallOpenAPIWith class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the CallOpenAPIWith. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.CallOpenAPIWith & object; if (isObject(model)) { if (typeof model.parameters === 'object') self.parameters = new _CallOpenAPIWithParameters(model.parameters); } - getLifecycleHook('CallOpenAPIWith')?.constructor?.(this); + getLifecycleHooks('CallOpenAPIWith')?.constructor?.(this); } + /** + * Validates the current instance of the CallOpenAPIWith. + * Throws if invalid. + */ validate() { - const copy = new CallOpenAPIWith(this as any) as CallOpenAPIWith & Specification.CallOpenAPIWith; - getLifecycleHook('CallOpenAPIWith')?.preValidation?.(copy); - validate('CallOpenAPIWith', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('CallOpenAPIWith')?.postValidation?.(copy); + const copy = new CallOpenAPIWith(this as any) as CallOpenAPIWithIntersection; + validate('CallOpenAPIWith', copy); } + /** + * Normalizes the current instance of the CallOpenAPIWith. + * Creates a copy of the CallOpenAPIWith, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the CallOpenAPIWith instance. + */ normalize(): CallOpenAPIWith & Specification.CallOpenAPIWith { - const copy = new CallOpenAPIWith(this as any) as CallOpenAPIWith & Specification.CallOpenAPIWith; - return getLifecycleHook('CallOpenAPIWith')?.normalize?.(copy) || copy; + const copy = new CallOpenAPIWith(this as any) as CallOpenAPIWithIntersection; + return getLifecycleHooks('CallOpenAPIWith')?.normalize?.(copy) || copy; } } -export const _CallOpenAPIWith = CallOpenAPIWith as { - new (model?: Partial): CallOpenAPIWith & Specification.CallOpenAPIWith; -}; +export const _CallOpenAPIWith = CallOpenAPIWith as CallOpenAPIWithConstructor; diff --git a/src/lib/generated/classes/call-open-api.ts b/src/lib/generated/classes/call-open-api.ts index ee5145a5..12481fa8 100644 --- a/src/lib/generated/classes/call-open-api.ts +++ b/src/lib/generated/classes/call-open-api.ts @@ -27,11 +27,33 @@ import { _Timeout } from './timeout'; import { _CallOpenAPIWith } from './call-open-api-with'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class CallOpenAPI extends _TaskBase { +/** + * Represents the intersection between the CallOpenAPI class and type + */ +export type CallOpenAPIIntersection = CallOpenAPI & Specification.CallOpenAPI; + +/** + * Represents a constructor for the intersection of the CallOpenAPI class and type + */ +export interface CallOpenAPIConstructor { + new (model?: Partial): CallOpenAPIIntersection; +} + +/** + * Represents a CallOpenAPI with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class CallOpenAPI extends _TaskBase { + /** + * Instanciates a new instance of the CallOpenAPI class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the CallOpenAPI. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.CallOpenAPI & object; @@ -43,22 +65,28 @@ class CallOpenAPI extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.with === 'object') self.with = new _CallOpenAPIWith(model.with); } - getLifecycleHook('CallOpenAPI')?.constructor?.(this); + getLifecycleHooks('CallOpenAPI')?.constructor?.(this); } + /** + * Validates the current instance of the CallOpenAPI. + * Throws if invalid. + */ validate() { - const copy = new CallOpenAPI(this as any) as CallOpenAPI & Specification.CallOpenAPI; - getLifecycleHook('CallOpenAPI')?.preValidation?.(copy); - validate('CallOpenAPI', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('CallOpenAPI')?.postValidation?.(copy); + const copy = new CallOpenAPI(this as any) as CallOpenAPIIntersection; + validate('CallOpenAPI', copy); } + /** + * Normalizes the current instance of the CallOpenAPI. + * Creates a copy of the CallOpenAPI, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the CallOpenAPI instance. + */ normalize(): CallOpenAPI & Specification.CallOpenAPI { - const copy = new CallOpenAPI(this as any) as CallOpenAPI & Specification.CallOpenAPI; - return getLifecycleHook('CallOpenAPI')?.normalize?.(copy) || copy; + const copy = new CallOpenAPI(this as any) as CallOpenAPIIntersection; + return getLifecycleHooks('CallOpenAPI')?.normalize?.(copy) || copy; } } -export const _CallOpenAPI = CallOpenAPI as { - new (model?: Partial): CallOpenAPI & Specification.CallOpenAPI; -}; +export const _CallOpenAPI = CallOpenAPI as CallOpenAPIConstructor; diff --git a/src/lib/generated/classes/call-task.ts b/src/lib/generated/classes/call-task.ts index c9eb4651..605aeb2b 100644 --- a/src/lib/generated/classes/call-task.ts +++ b/src/lib/generated/classes/call-task.ts @@ -26,11 +26,33 @@ import { _Export } from './export'; import { _Timeout } from './timeout'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class CallTask extends ObjectHydrator { +/** + * Represents the intersection between the CallTask class and type + */ +export type CallTaskIntersection = CallTask & Specification.CallTask; + +/** + * Represents a constructor for the intersection of the CallTask class and type + */ +export interface CallTaskConstructor { + new (model?: Partial): CallTaskIntersection; +} + +/** + * Represents a CallTask with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class CallTask extends ObjectHydrator { + /** + * Instanciates a new instance of the CallTask class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the CallTask. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.CallTask & object; @@ -40,22 +62,28 @@ class CallTask extends ObjectHydrator { if (typeof model.export === 'object') self.export = new _Export(model.export as Specification.Export); if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout as Specification.Timeout); } - getLifecycleHook('CallTask')?.constructor?.(this); + getLifecycleHooks('CallTask')?.constructor?.(this); } + /** + * Validates the current instance of the CallTask. + * Throws if invalid. + */ validate() { - const copy = new CallTask(this as any) as CallTask & Specification.CallTask; - getLifecycleHook('CallTask')?.preValidation?.(copy); - validate('CallTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('CallTask')?.postValidation?.(copy); + const copy = new CallTask(this as any) as CallTaskIntersection; + validate('CallTask', copy); } + /** + * Normalizes the current instance of the CallTask. + * Creates a copy of the CallTask, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the CallTask instance. + */ normalize(): CallTask & Specification.CallTask { - const copy = new CallTask(this as any) as CallTask & Specification.CallTask; - return getLifecycleHook('CallTask')?.normalize?.(copy) || copy; + const copy = new CallTask(this as any) as CallTaskIntersection; + return getLifecycleHooks('CallTask')?.normalize?.(copy) || copy; } } -export const _CallTask = CallTask as { - new (model?: Partial): CallTask & Specification.CallTask; -}; +export const _CallTask = CallTask as CallTaskConstructor; diff --git a/src/lib/generated/classes/do-task.ts b/src/lib/generated/classes/do-task.ts index 485ee477..4032e917 100644 --- a/src/lib/generated/classes/do-task.ts +++ b/src/lib/generated/classes/do-task.ts @@ -27,11 +27,33 @@ import { _Timeout } from './timeout'; import { _TaskList } from './task-list'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class DoTask extends _TaskBase { +/** + * Represents the intersection between the DoTask class and type + */ +export type DoTaskIntersection = DoTask & Specification.DoTask; + +/** + * Represents a constructor for the intersection of the DoTask class and type + */ +export interface DoTaskConstructor { + new (model?: Partial): DoTaskIntersection; +} + +/** + * Represents a DoTask with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class DoTask extends _TaskBase { + /** + * Instanciates a new instance of the DoTask class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the DoTask. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.DoTask & object; @@ -42,22 +64,28 @@ class DoTask extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.do === 'object') self.do = new _TaskList(model.do); } - getLifecycleHook('DoTask')?.constructor?.(this); + getLifecycleHooks('DoTask')?.constructor?.(this); } + /** + * Validates the current instance of the DoTask. + * Throws if invalid. + */ validate() { - const copy = new DoTask(this as any) as DoTask & Specification.DoTask; - getLifecycleHook('DoTask')?.preValidation?.(copy); - validate('DoTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('DoTask')?.postValidation?.(copy); + const copy = new DoTask(this as any) as DoTaskIntersection; + validate('DoTask', copy); } + /** + * Normalizes the current instance of the DoTask. + * Creates a copy of the DoTask, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the DoTask instance. + */ normalize(): DoTask & Specification.DoTask { - const copy = new DoTask(this as any) as DoTask & Specification.DoTask; - return getLifecycleHook('DoTask')?.normalize?.(copy) || copy; + const copy = new DoTask(this as any) as DoTaskIntersection; + return getLifecycleHooks('DoTask')?.normalize?.(copy) || copy; } } -export const _DoTask = DoTask as { - new (model?: Partial): DoTask & Specification.DoTask; -}; +export const _DoTask = DoTask as DoTaskConstructor; diff --git a/src/lib/generated/classes/document-tags.ts b/src/lib/generated/classes/document-tags.ts index 5d81eaf8..a876196a 100644 --- a/src/lib/generated/classes/document-tags.ts +++ b/src/lib/generated/classes/document-tags.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class DocumentTags extends ObjectHydrator { +/** + * Represents the intersection between the DocumentTags class and type + */ +export type DocumentTagsIntersection = DocumentTags & Specification.DocumentTags; + +/** + * Represents a constructor for the intersection of the DocumentTags class and type + */ +export interface DocumentTagsConstructor { + new (model?: Partial): DocumentTagsIntersection; +} + +/** + * Represents a DocumentTags with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class DocumentTags extends ObjectHydrator { + /** + * Instanciates a new instance of the DocumentTags class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the DocumentTags. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('DocumentTags')?.constructor?.(this); + getLifecycleHooks('DocumentTags')?.constructor?.(this); } + /** + * Validates the current instance of the DocumentTags. + * Throws if invalid. + */ validate() { - const copy = new DocumentTags(this as any) as DocumentTags & Specification.DocumentTags; - getLifecycleHook('DocumentTags')?.preValidation?.(copy); - validate('DocumentTags', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('DocumentTags')?.postValidation?.(copy); + const copy = new DocumentTags(this as any) as DocumentTagsIntersection; + validate('DocumentTags', copy); } + /** + * Normalizes the current instance of the DocumentTags. + * Creates a copy of the DocumentTags, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the DocumentTags instance. + */ normalize(): DocumentTags & Specification.DocumentTags { - const copy = new DocumentTags(this as any) as DocumentTags & Specification.DocumentTags; - return getLifecycleHook('DocumentTags')?.normalize?.(copy) || copy; + const copy = new DocumentTags(this as any) as DocumentTagsIntersection; + return getLifecycleHooks('DocumentTags')?.normalize?.(copy) || copy; } } -export const _DocumentTags = DocumentTags as { - new (model?: Partial): DocumentTags & Specification.DocumentTags; -}; +export const _DocumentTags = DocumentTags as DocumentTagsConstructor; diff --git a/src/lib/generated/classes/document.ts b/src/lib/generated/classes/document.ts index e121f46f..064e4229 100644 --- a/src/lib/generated/classes/document.ts +++ b/src/lib/generated/classes/document.ts @@ -23,33 +23,61 @@ import { _DocumentTags } from './document-tags'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class Document extends ObjectHydrator { +/** + * Represents the intersection between the Document class and type + */ +export type DocumentIntersection = Document & Specification.Document; + +/** + * Represents a constructor for the intersection of the Document class and type + */ +export interface DocumentConstructor { + new (model?: Partial): DocumentIntersection; +} + +/** + * Represents a Document with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Document extends ObjectHydrator { + /** + * Instanciates a new instance of the Document class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Document. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.Document & object; if (isObject(model)) { if (typeof model.tags === 'object') self.tags = new _DocumentTags(model.tags); } - getLifecycleHook('Document')?.constructor?.(this); + getLifecycleHooks('Document')?.constructor?.(this); } + /** + * Validates the current instance of the Document. + * Throws if invalid. + */ validate() { - const copy = new Document(this as any) as Document & Specification.Document; - getLifecycleHook('Document')?.preValidation?.(copy); - validate('Document', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('Document')?.postValidation?.(copy); + const copy = new Document(this as any) as DocumentIntersection; + validate('Document', copy); } + /** + * Normalizes the current instance of the Document. + * Creates a copy of the Document, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Document instance. + */ normalize(): Document & Specification.Document { - const copy = new Document(this as any) as Document & Specification.Document; - return getLifecycleHook('Document')?.normalize?.(copy) || copy; + const copy = new Document(this as any) as DocumentIntersection; + return getLifecycleHooks('Document')?.normalize?.(copy) || copy; } } -export const _Document = Document as { - new (model?: Partial): Document & Specification.Document; -}; +export const _Document = Document as DocumentConstructor; diff --git a/src/lib/generated/classes/duration.ts b/src/lib/generated/classes/duration.ts index 9b4d0a0c..c3d71cdd 100644 --- a/src/lib/generated/classes/duration.ts +++ b/src/lib/generated/classes/duration.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class Duration extends ObjectHydrator { +/** + * Represents the intersection between the Duration class and type + */ +export type DurationIntersection = Duration & Specification.Duration; + +/** + * Represents a constructor for the intersection of the Duration class and type + */ +export interface DurationConstructor { + new (model?: Partial): DurationIntersection; +} + +/** + * Represents a Duration with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Duration extends ObjectHydrator { + /** + * Instanciates a new instance of the Duration class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Duration. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('Duration')?.constructor?.(this); + getLifecycleHooks('Duration')?.constructor?.(this); } + /** + * Validates the current instance of the Duration. + * Throws if invalid. + */ validate() { - const copy = new Duration(this as any) as Duration & Specification.Duration; - getLifecycleHook('Duration')?.preValidation?.(copy); - validate('Duration', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('Duration')?.postValidation?.(copy); + const copy = new Duration(this as any) as DurationIntersection; + validate('Duration', copy); } + /** + * Normalizes the current instance of the Duration. + * Creates a copy of the Duration, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Duration instance. + */ normalize(): Duration & Specification.Duration { - const copy = new Duration(this as any) as Duration & Specification.Duration; - return getLifecycleHook('Duration')?.normalize?.(copy) || copy; + const copy = new Duration(this as any) as DurationIntersection; + return getLifecycleHooks('Duration')?.normalize?.(copy) || copy; } } -export const _Duration = Duration as { - new (model?: Partial): Duration & Specification.Duration; -}; +export const _Duration = Duration as DurationConstructor; diff --git a/src/lib/generated/classes/emit-task-emit-event.ts b/src/lib/generated/classes/emit-task-emit-event.ts index 00b50604..22f1b45d 100644 --- a/src/lib/generated/classes/emit-task-emit-event.ts +++ b/src/lib/generated/classes/emit-task-emit-event.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class EmitTaskEmitEvent extends ObjectHydrator { +/** + * Represents the intersection between the EmitTaskEmitEvent class and type + */ +export type EmitTaskEmitEventIntersection = EmitTaskEmitEvent & Specification.EmitTaskEmitEvent; + +/** + * Represents a constructor for the intersection of the EmitTaskEmitEvent class and type + */ +export interface EmitTaskEmitEventConstructor { + new (model?: Partial): EmitTaskEmitEventIntersection; +} + +/** + * Represents a EmitTaskEmitEvent with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class EmitTaskEmitEvent extends ObjectHydrator { + /** + * Instanciates a new instance of the EmitTaskEmitEvent class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the EmitTaskEmitEvent. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('EmitTaskEmitEvent')?.constructor?.(this); + getLifecycleHooks('EmitTaskEmitEvent')?.constructor?.(this); } + /** + * Validates the current instance of the EmitTaskEmitEvent. + * Throws if invalid. + */ validate() { - const copy = new EmitTaskEmitEvent(this as any) as EmitTaskEmitEvent & Specification.EmitTaskEmitEvent; - getLifecycleHook('EmitTaskEmitEvent')?.preValidation?.(copy); - validate('EmitTaskEmitEvent', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('EmitTaskEmitEvent')?.postValidation?.(copy); + const copy = new EmitTaskEmitEvent(this as any) as EmitTaskEmitEventIntersection; + validate('EmitTaskEmitEvent', copy); } + /** + * Normalizes the current instance of the EmitTaskEmitEvent. + * Creates a copy of the EmitTaskEmitEvent, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the EmitTaskEmitEvent instance. + */ normalize(): EmitTaskEmitEvent & Specification.EmitTaskEmitEvent { - const copy = new EmitTaskEmitEvent(this as any) as EmitTaskEmitEvent & Specification.EmitTaskEmitEvent; - return getLifecycleHook('EmitTaskEmitEvent')?.normalize?.(copy) || copy; + const copy = new EmitTaskEmitEvent(this as any) as EmitTaskEmitEventIntersection; + return getLifecycleHooks('EmitTaskEmitEvent')?.normalize?.(copy) || copy; } } -export const _EmitTaskEmitEvent = EmitTaskEmitEvent as { - new (model?: Partial): EmitTaskEmitEvent & Specification.EmitTaskEmitEvent; -}; +export const _EmitTaskEmitEvent = EmitTaskEmitEvent as EmitTaskEmitEventConstructor; diff --git a/src/lib/generated/classes/emit-task-emit.ts b/src/lib/generated/classes/emit-task-emit.ts index 64ec6979..551d9617 100644 --- a/src/lib/generated/classes/emit-task-emit.ts +++ b/src/lib/generated/classes/emit-task-emit.ts @@ -23,33 +23,61 @@ import { _EmitTaskEmitEvent } from './emit-task-emit-event'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class EmitTaskEmit extends ObjectHydrator { +/** + * Represents the intersection between the EmitTaskEmit class and type + */ +export type EmitTaskEmitIntersection = EmitTaskEmit & Specification.EmitTaskEmit; + +/** + * Represents a constructor for the intersection of the EmitTaskEmit class and type + */ +export interface EmitTaskEmitConstructor { + new (model?: Partial): EmitTaskEmitIntersection; +} + +/** + * Represents a EmitTaskEmit with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class EmitTaskEmit extends ObjectHydrator { + /** + * Instanciates a new instance of the EmitTaskEmit class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the EmitTaskEmit. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.EmitTaskEmit & object; if (isObject(model)) { if (typeof model.event === 'object') self.event = new _EmitTaskEmitEvent(model.event); } - getLifecycleHook('EmitTaskEmit')?.constructor?.(this); + getLifecycleHooks('EmitTaskEmit')?.constructor?.(this); } + /** + * Validates the current instance of the EmitTaskEmit. + * Throws if invalid. + */ validate() { - const copy = new EmitTaskEmit(this as any) as EmitTaskEmit & Specification.EmitTaskEmit; - getLifecycleHook('EmitTaskEmit')?.preValidation?.(copy); - validate('EmitTaskEmit', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('EmitTaskEmit')?.postValidation?.(copy); + const copy = new EmitTaskEmit(this as any) as EmitTaskEmitIntersection; + validate('EmitTaskEmit', copy); } + /** + * Normalizes the current instance of the EmitTaskEmit. + * Creates a copy of the EmitTaskEmit, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the EmitTaskEmit instance. + */ normalize(): EmitTaskEmit & Specification.EmitTaskEmit { - const copy = new EmitTaskEmit(this as any) as EmitTaskEmit & Specification.EmitTaskEmit; - return getLifecycleHook('EmitTaskEmit')?.normalize?.(copy) || copy; + const copy = new EmitTaskEmit(this as any) as EmitTaskEmitIntersection; + return getLifecycleHooks('EmitTaskEmit')?.normalize?.(copy) || copy; } } -export const _EmitTaskEmit = EmitTaskEmit as { - new (model?: Partial): EmitTaskEmit & Specification.EmitTaskEmit; -}; +export const _EmitTaskEmit = EmitTaskEmit as EmitTaskEmitConstructor; diff --git a/src/lib/generated/classes/emit-task.ts b/src/lib/generated/classes/emit-task.ts index 0ee74122..5cd34c83 100644 --- a/src/lib/generated/classes/emit-task.ts +++ b/src/lib/generated/classes/emit-task.ts @@ -27,11 +27,33 @@ import { _Timeout } from './timeout'; import { _EmitTaskEmit } from './emit-task-emit'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class EmitTask extends _TaskBase { +/** + * Represents the intersection between the EmitTask class and type + */ +export type EmitTaskIntersection = EmitTask & Specification.EmitTask; + +/** + * Represents a constructor for the intersection of the EmitTask class and type + */ +export interface EmitTaskConstructor { + new (model?: Partial): EmitTaskIntersection; +} + +/** + * Represents a EmitTask with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class EmitTask extends _TaskBase { + /** + * Instanciates a new instance of the EmitTask class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the EmitTask. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.EmitTask & object; @@ -42,22 +64,28 @@ class EmitTask extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.emit === 'object') self.emit = new _EmitTaskEmit(model.emit); } - getLifecycleHook('EmitTask')?.constructor?.(this); + getLifecycleHooks('EmitTask')?.constructor?.(this); } + /** + * Validates the current instance of the EmitTask. + * Throws if invalid. + */ validate() { - const copy = new EmitTask(this as any) as EmitTask & Specification.EmitTask; - getLifecycleHook('EmitTask')?.preValidation?.(copy); - validate('EmitTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('EmitTask')?.postValidation?.(copy); + const copy = new EmitTask(this as any) as EmitTaskIntersection; + validate('EmitTask', copy); } + /** + * Normalizes the current instance of the EmitTask. + * Creates a copy of the EmitTask, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the EmitTask instance. + */ normalize(): EmitTask & Specification.EmitTask { - const copy = new EmitTask(this as any) as EmitTask & Specification.EmitTask; - return getLifecycleHook('EmitTask')?.normalize?.(copy) || copy; + const copy = new EmitTask(this as any) as EmitTaskIntersection; + return getLifecycleHooks('EmitTask')?.normalize?.(copy) || copy; } } -export const _EmitTask = EmitTask as { - new (model?: Partial): EmitTask & Specification.EmitTask; -}; +export const _EmitTask = EmitTask as EmitTaskConstructor; diff --git a/src/lib/generated/classes/endpoint-authentication.ts b/src/lib/generated/classes/endpoint-authentication.ts index 4ab68584..1dc164c8 100644 --- a/src/lib/generated/classes/endpoint-authentication.ts +++ b/src/lib/generated/classes/endpoint-authentication.ts @@ -25,11 +25,33 @@ import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class EndpointAuthentication extends ObjectHydrator { +/** + * Represents the intersection between the EndpointAuthentication class and type + */ +export type EndpointAuthenticationIntersection = EndpointAuthentication & Specification.EndpointAuthentication; + +/** + * Represents a constructor for the intersection of the EndpointAuthentication class and type + */ +export interface EndpointAuthenticationConstructor { + new (model?: Partial): EndpointAuthenticationIntersection; +} + +/** + * Represents a EndpointAuthentication with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class EndpointAuthentication extends ObjectHydrator { + /** + * Instanciates a new instance of the EndpointAuthentication class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the EndpointAuthentication. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.EndpointAuthentication & object; @@ -41,26 +63,28 @@ class EndpointAuthentication extends ObjectHydrator, - ): EndpointAuthentication & Specification.EndpointAuthentication; -}; +export const _EndpointAuthentication = EndpointAuthentication as EndpointAuthenticationConstructor; diff --git a/src/lib/generated/classes/endpoint.ts b/src/lib/generated/classes/endpoint.ts index 37ab3a11..c59b4d2d 100644 --- a/src/lib/generated/classes/endpoint.ts +++ b/src/lib/generated/classes/endpoint.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class Endpoint extends ObjectHydrator { +/** + * Represents the intersection between the Endpoint class and type + */ +export type EndpointIntersection = Endpoint & Specification.Endpoint; + +/** + * Represents a constructor for the intersection of the Endpoint class and type + */ +export interface EndpointConstructor { + new (model?: Partial): EndpointIntersection; +} + +/** + * Represents a Endpoint with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Endpoint extends ObjectHydrator { + /** + * Instanciates a new instance of the Endpoint class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Endpoint. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('Endpoint')?.constructor?.(this); + getLifecycleHooks('Endpoint')?.constructor?.(this); } + /** + * Validates the current instance of the Endpoint. + * Throws if invalid. + */ validate() { - const copy = new Endpoint(this as any) as Endpoint & Specification.Endpoint; - getLifecycleHook('Endpoint')?.preValidation?.(copy); - validate('Endpoint', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('Endpoint')?.postValidation?.(copy); + const copy = new Endpoint(this as any) as EndpointIntersection; + validate('Endpoint', copy); } + /** + * Normalizes the current instance of the Endpoint. + * Creates a copy of the Endpoint, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Endpoint instance. + */ normalize(): Endpoint & Specification.Endpoint { - const copy = new Endpoint(this as any) as Endpoint & Specification.Endpoint; - return getLifecycleHook('Endpoint')?.normalize?.(copy) || copy; + const copy = new Endpoint(this as any) as EndpointIntersection; + return getLifecycleHooks('Endpoint')?.normalize?.(copy) || copy; } } -export const _Endpoint = Endpoint as { - new (model?: Partial): Endpoint & Specification.Endpoint; -}; +export const _Endpoint = Endpoint as EndpointConstructor; diff --git a/src/lib/generated/classes/error.ts b/src/lib/generated/classes/error.ts index 4098ce3c..a191f57c 100644 --- a/src/lib/generated/classes/error.ts +++ b/src/lib/generated/classes/error.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class Error extends ObjectHydrator { +/** + * Represents the intersection between the Error class and type + */ +export type ErrorIntersection = Error & Specification.Error; + +/** + * Represents a constructor for the intersection of the Error class and type + */ +export interface ErrorConstructor { + new (model?: Partial): ErrorIntersection; +} + +/** + * Represents a Error with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Error extends ObjectHydrator { + /** + * Instanciates a new instance of the Error class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Error. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('Error')?.constructor?.(this); + getLifecycleHooks('Error')?.constructor?.(this); } + /** + * Validates the current instance of the Error. + * Throws if invalid. + */ validate() { - const copy = new Error(this as any) as Error & Specification.Error; - getLifecycleHook('Error')?.preValidation?.(copy); - validate('Error', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('Error')?.postValidation?.(copy); + const copy = new Error(this as any) as ErrorIntersection; + validate('Error', copy); } + /** + * Normalizes the current instance of the Error. + * Creates a copy of the Error, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Error instance. + */ normalize(): Error & Specification.Error { - const copy = new Error(this as any) as Error & Specification.Error; - return getLifecycleHook('Error')?.normalize?.(copy) || copy; + const copy = new Error(this as any) as ErrorIntersection; + return getLifecycleHooks('Error')?.normalize?.(copy) || copy; } } -export const _Error = Error as { - new (model?: Partial): Error & Specification.Error; -}; +export const _Error = Error as ErrorConstructor; diff --git a/src/lib/generated/classes/event-consumption-strategy-all.ts b/src/lib/generated/classes/event-consumption-strategy-all.ts index 499f8d26..de4b5b92 100644 --- a/src/lib/generated/classes/event-consumption-strategy-all.ts +++ b/src/lib/generated/classes/event-consumption-strategy-all.ts @@ -23,11 +23,19 @@ import { _EventFilter } from './event-filter'; import { Specification } from '../definitions'; import { ArrayHydrator } from '../../hydrator'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class EventConsumptionStrategyAll extends ArrayHydrator { +/** + * Represents a collection of Specification.EventFilter. + * Inherits from ArrayHydrator to handle array-specific hydration. + */ +export class EventConsumptionStrategyAll extends ArrayHydrator { + /** + * Constructs a new instance of the EventConsumptionStrategyAll class. + * + * @param model - Optional parameter which can be an array of objects or a number representing the array length. + */ constructor(model?: Array | number) { super(model); if (Array.isArray(model)) { @@ -37,19 +45,27 @@ class EventConsumptionStrategyAll extends ArrayHydrator { +/** + * Represents a collection of Specification.EventFilter. + * Inherits from ArrayHydrator to handle array-specific hydration. + */ +export class EventConsumptionStrategyAny extends ArrayHydrator { + /** + * Constructs a new instance of the EventConsumptionStrategyAny class. + * + * @param model - Optional parameter which can be an array of objects or a number representing the array length. + */ constructor(model?: Array | number) { super(model); if (Array.isArray(model)) { @@ -37,19 +45,27 @@ class EventConsumptionStrategyAny extends ArrayHydrator { +/** + * Represents the intersection between the EventConsumptionStrategy class and type + */ +export type EventConsumptionStrategyIntersection = EventConsumptionStrategy & Specification.EventConsumptionStrategy; + +/** + * Represents a constructor for the intersection of the EventConsumptionStrategy class and type + */ +export interface EventConsumptionStrategyConstructor { + new (model?: Partial): EventConsumptionStrategyIntersection; +} + +/** + * Represents a EventConsumptionStrategy with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class EventConsumptionStrategy extends ObjectHydrator { + /** + * Instanciates a new instance of the EventConsumptionStrategy class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the EventConsumptionStrategy. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.EventConsumptionStrategy & object; @@ -40,26 +62,28 @@ class EventConsumptionStrategy extends ObjectHydrator, - ): EventConsumptionStrategy & Specification.EventConsumptionStrategy; -}; +export const _EventConsumptionStrategy = EventConsumptionStrategy as EventConsumptionStrategyConstructor; diff --git a/src/lib/generated/classes/event-filter-correlate.ts b/src/lib/generated/classes/event-filter-correlate.ts index fc6ee3e7..f4ccc331 100644 --- a/src/lib/generated/classes/event-filter-correlate.ts +++ b/src/lib/generated/classes/event-filter-correlate.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class EventFilterCorrelate extends ObjectHydrator { +/** + * Represents the intersection between the EventFilterCorrelate class and type + */ +export type EventFilterCorrelateIntersection = EventFilterCorrelate & Specification.EventFilterCorrelate; + +/** + * Represents a constructor for the intersection of the EventFilterCorrelate class and type + */ +export interface EventFilterCorrelateConstructor { + new (model?: Partial): EventFilterCorrelateIntersection; +} + +/** + * Represents a EventFilterCorrelate with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class EventFilterCorrelate extends ObjectHydrator { + /** + * Instanciates a new instance of the EventFilterCorrelate class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the EventFilterCorrelate. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('EventFilterCorrelate')?.constructor?.(this); + getLifecycleHooks('EventFilterCorrelate')?.constructor?.(this); } + /** + * Validates the current instance of the EventFilterCorrelate. + * Throws if invalid. + */ validate() { - const copy = new EventFilterCorrelate(this as any) as EventFilterCorrelate & Specification.EventFilterCorrelate; - getLifecycleHook('EventFilterCorrelate')?.preValidation?.(copy); - validate('EventFilterCorrelate', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('EventFilterCorrelate')?.postValidation?.(copy); + const copy = new EventFilterCorrelate(this as any) as EventFilterCorrelateIntersection; + validate('EventFilterCorrelate', copy); } + /** + * Normalizes the current instance of the EventFilterCorrelate. + * Creates a copy of the EventFilterCorrelate, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the EventFilterCorrelate instance. + */ normalize(): EventFilterCorrelate & Specification.EventFilterCorrelate { - const copy = new EventFilterCorrelate(this as any) as EventFilterCorrelate & Specification.EventFilterCorrelate; - return getLifecycleHook('EventFilterCorrelate')?.normalize?.(copy) || copy; + const copy = new EventFilterCorrelate(this as any) as EventFilterCorrelateIntersection; + return getLifecycleHooks('EventFilterCorrelate')?.normalize?.(copy) || copy; } } -export const _EventFilterCorrelate = EventFilterCorrelate as { - new (model?: Partial): EventFilterCorrelate & Specification.EventFilterCorrelate; -}; +export const _EventFilterCorrelate = EventFilterCorrelate as EventFilterCorrelateConstructor; diff --git a/src/lib/generated/classes/event-filter-with.ts b/src/lib/generated/classes/event-filter-with.ts index 22ad735f..20c61074 100644 --- a/src/lib/generated/classes/event-filter-with.ts +++ b/src/lib/generated/classes/event-filter-with.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class EventFilterWith extends ObjectHydrator { +/** + * Represents the intersection between the EventFilterWith class and type + */ +export type EventFilterWithIntersection = EventFilterWith & Specification.EventFilterWith; + +/** + * Represents a constructor for the intersection of the EventFilterWith class and type + */ +export interface EventFilterWithConstructor { + new (model?: Partial): EventFilterWithIntersection; +} + +/** + * Represents a EventFilterWith with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class EventFilterWith extends ObjectHydrator { + /** + * Instanciates a new instance of the EventFilterWith class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the EventFilterWith. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('EventFilterWith')?.constructor?.(this); + getLifecycleHooks('EventFilterWith')?.constructor?.(this); } + /** + * Validates the current instance of the EventFilterWith. + * Throws if invalid. + */ validate() { - const copy = new EventFilterWith(this as any) as EventFilterWith & Specification.EventFilterWith; - getLifecycleHook('EventFilterWith')?.preValidation?.(copy); - validate('EventFilterWith', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('EventFilterWith')?.postValidation?.(copy); + const copy = new EventFilterWith(this as any) as EventFilterWithIntersection; + validate('EventFilterWith', copy); } + /** + * Normalizes the current instance of the EventFilterWith. + * Creates a copy of the EventFilterWith, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the EventFilterWith instance. + */ normalize(): EventFilterWith & Specification.EventFilterWith { - const copy = new EventFilterWith(this as any) as EventFilterWith & Specification.EventFilterWith; - return getLifecycleHook('EventFilterWith')?.normalize?.(copy) || copy; + const copy = new EventFilterWith(this as any) as EventFilterWithIntersection; + return getLifecycleHooks('EventFilterWith')?.normalize?.(copy) || copy; } } -export const _EventFilterWith = EventFilterWith as { - new (model?: Partial): EventFilterWith & Specification.EventFilterWith; -}; +export const _EventFilterWith = EventFilterWith as EventFilterWithConstructor; diff --git a/src/lib/generated/classes/event-filter.ts b/src/lib/generated/classes/event-filter.ts index 2500ac36..9b31d750 100644 --- a/src/lib/generated/classes/event-filter.ts +++ b/src/lib/generated/classes/event-filter.ts @@ -24,11 +24,33 @@ import { _EventFilterWith } from './event-filter-with'; import { _EventFilterCorrelate } from './event-filter-correlate'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class EventFilter extends ObjectHydrator { +/** + * Represents the intersection between the EventFilter class and type + */ +export type EventFilterIntersection = EventFilter & Specification.EventFilter; + +/** + * Represents a constructor for the intersection of the EventFilter class and type + */ +export interface EventFilterConstructor { + new (model?: Partial): EventFilterIntersection; +} + +/** + * Represents a EventFilter with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class EventFilter extends ObjectHydrator { + /** + * Instanciates a new instance of the EventFilter class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the EventFilter. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.EventFilter & object; @@ -36,22 +58,28 @@ class EventFilter extends ObjectHydrator { if (typeof model.with === 'object') self.with = new _EventFilterWith(model.with); if (typeof model.correlate === 'object') self.correlate = new _EventFilterCorrelate(model.correlate); } - getLifecycleHook('EventFilter')?.constructor?.(this); + getLifecycleHooks('EventFilter')?.constructor?.(this); } + /** + * Validates the current instance of the EventFilter. + * Throws if invalid. + */ validate() { - const copy = new EventFilter(this as any) as EventFilter & Specification.EventFilter; - getLifecycleHook('EventFilter')?.preValidation?.(copy); - validate('EventFilter', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('EventFilter')?.postValidation?.(copy); + const copy = new EventFilter(this as any) as EventFilterIntersection; + validate('EventFilter', copy); } + /** + * Normalizes the current instance of the EventFilter. + * Creates a copy of the EventFilter, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the EventFilter instance. + */ normalize(): EventFilter & Specification.EventFilter { - const copy = new EventFilter(this as any) as EventFilter & Specification.EventFilter; - return getLifecycleHook('EventFilter')?.normalize?.(copy) || copy; + const copy = new EventFilter(this as any) as EventFilterIntersection; + return getLifecycleHooks('EventFilter')?.normalize?.(copy) || copy; } } -export const _EventFilter = EventFilter as { - new (model?: Partial): EventFilter & Specification.EventFilter; -}; +export const _EventFilter = EventFilter as EventFilterConstructor; diff --git a/src/lib/generated/classes/export.ts b/src/lib/generated/classes/export.ts index e6d3721f..280605c2 100644 --- a/src/lib/generated/classes/export.ts +++ b/src/lib/generated/classes/export.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class Export extends ObjectHydrator { +/** + * Represents the intersection between the Export class and type + */ +export type ExportIntersection = Export & Specification.Export; + +/** + * Represents a constructor for the intersection of the Export class and type + */ +export interface ExportConstructor { + new (model?: Partial): ExportIntersection; +} + +/** + * Represents a Export with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Export extends ObjectHydrator { + /** + * Instanciates a new instance of the Export class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Export. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('Export')?.constructor?.(this); + getLifecycleHooks('Export')?.constructor?.(this); } + /** + * Validates the current instance of the Export. + * Throws if invalid. + */ validate() { - const copy = new Export(this as any) as Export & Specification.Export; - getLifecycleHook('Export')?.preValidation?.(copy); - validate('Export', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('Export')?.postValidation?.(copy); + const copy = new Export(this as any) as ExportIntersection; + validate('Export', copy); } + /** + * Normalizes the current instance of the Export. + * Creates a copy of the Export, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Export instance. + */ normalize(): Export & Specification.Export { - const copy = new Export(this as any) as Export & Specification.Export; - return getLifecycleHook('Export')?.normalize?.(copy) || copy; + const copy = new Export(this as any) as ExportIntersection; + return getLifecycleHooks('Export')?.normalize?.(copy) || copy; } } -export const _Export = Export as { - new (model?: Partial): Export & Specification.Export; -}; +export const _Export = Export as ExportConstructor; diff --git a/src/lib/generated/classes/extension.ts b/src/lib/generated/classes/extension.ts index 54ba1ea0..a1919c67 100644 --- a/src/lib/generated/classes/extension.ts +++ b/src/lib/generated/classes/extension.ts @@ -23,11 +23,33 @@ import { _TaskList } from './task-list'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class Extension extends ObjectHydrator { +/** + * Represents the intersection between the Extension class and type + */ +export type ExtensionIntersection = Extension & Specification.Extension; + +/** + * Represents a constructor for the intersection of the Extension class and type + */ +export interface ExtensionConstructor { + new (model?: Partial): ExtensionIntersection; +} + +/** + * Represents a Extension with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Extension extends ObjectHydrator { + /** + * Instanciates a new instance of the Extension class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Extension. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.Extension & object; @@ -35,22 +57,28 @@ class Extension extends ObjectHydrator { if (typeof model.before === 'object') self.before = new _TaskList(model.before); if (typeof model.after === 'object') self.after = new _TaskList(model.after); } - getLifecycleHook('Extension')?.constructor?.(this); + getLifecycleHooks('Extension')?.constructor?.(this); } + /** + * Validates the current instance of the Extension. + * Throws if invalid. + */ validate() { - const copy = new Extension(this as any) as Extension & Specification.Extension; - getLifecycleHook('Extension')?.preValidation?.(copy); - validate('Extension', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('Extension')?.postValidation?.(copy); + const copy = new Extension(this as any) as ExtensionIntersection; + validate('Extension', copy); } + /** + * Normalizes the current instance of the Extension. + * Creates a copy of the Extension, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Extension instance. + */ normalize(): Extension & Specification.Extension { - const copy = new Extension(this as any) as Extension & Specification.Extension; - return getLifecycleHook('Extension')?.normalize?.(copy) || copy; + const copy = new Extension(this as any) as ExtensionIntersection; + return getLifecycleHooks('Extension')?.normalize?.(copy) || copy; } } -export const _Extension = Extension as { - new (model?: Partial): Extension & Specification.Extension; -}; +export const _Extension = Extension as ExtensionConstructor; diff --git a/src/lib/generated/classes/external-resource-authentication.ts b/src/lib/generated/classes/external-resource-authentication.ts index 41ea5147..f9040e35 100644 --- a/src/lib/generated/classes/external-resource-authentication.ts +++ b/src/lib/generated/classes/external-resource-authentication.ts @@ -25,11 +25,34 @@ import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class ExternalResourceAuthentication extends ObjectHydrator { +/** + * Represents the intersection between the ExternalResourceAuthentication class and type + */ +export type ExternalResourceAuthenticationIntersection = ExternalResourceAuthentication & + Specification.ExternalResourceAuthentication; + +/** + * Represents a constructor for the intersection of the ExternalResourceAuthentication class and type + */ +export interface ExternalResourceAuthenticationConstructor { + new (model?: Partial): ExternalResourceAuthenticationIntersection; +} + +/** + * Represents a ExternalResourceAuthentication with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class ExternalResourceAuthentication extends ObjectHydrator { + /** + * Instanciates a new instance of the ExternalResourceAuthentication class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the ExternalResourceAuthentication. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.ExternalResourceAuthentication & object; @@ -41,26 +64,29 @@ class ExternalResourceAuthentication extends ObjectHydrator, - ): ExternalResourceAuthentication & Specification.ExternalResourceAuthentication; -}; +export const _ExternalResourceAuthentication = + ExternalResourceAuthentication as ExternalResourceAuthenticationConstructor; diff --git a/src/lib/generated/classes/external-resource.ts b/src/lib/generated/classes/external-resource.ts index 49cac3cb..400cde81 100644 --- a/src/lib/generated/classes/external-resource.ts +++ b/src/lib/generated/classes/external-resource.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class ExternalResource extends ObjectHydrator { +/** + * Represents the intersection between the ExternalResource class and type + */ +export type ExternalResourceIntersection = ExternalResource & Specification.ExternalResource; + +/** + * Represents a constructor for the intersection of the ExternalResource class and type + */ +export interface ExternalResourceConstructor { + new (model?: Partial): ExternalResourceIntersection; +} + +/** + * Represents a ExternalResource with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class ExternalResource extends ObjectHydrator { + /** + * Instanciates a new instance of the ExternalResource class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the ExternalResource. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('ExternalResource')?.constructor?.(this); + getLifecycleHooks('ExternalResource')?.constructor?.(this); } + /** + * Validates the current instance of the ExternalResource. + * Throws if invalid. + */ validate() { - const copy = new ExternalResource(this as any) as ExternalResource & Specification.ExternalResource; - getLifecycleHook('ExternalResource')?.preValidation?.(copy); - validate('ExternalResource', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('ExternalResource')?.postValidation?.(copy); + const copy = new ExternalResource(this as any) as ExternalResourceIntersection; + validate('ExternalResource', copy); } + /** + * Normalizes the current instance of the ExternalResource. + * Creates a copy of the ExternalResource, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the ExternalResource instance. + */ normalize(): ExternalResource & Specification.ExternalResource { - const copy = new ExternalResource(this as any) as ExternalResource & Specification.ExternalResource; - return getLifecycleHook('ExternalResource')?.normalize?.(copy) || copy; + const copy = new ExternalResource(this as any) as ExternalResourceIntersection; + return getLifecycleHooks('ExternalResource')?.normalize?.(copy) || copy; } } -export const _ExternalResource = ExternalResource as { - new (model?: Partial): ExternalResource & Specification.ExternalResource; -}; +export const _ExternalResource = ExternalResource as ExternalResourceConstructor; diff --git a/src/lib/generated/classes/flow-directive.ts b/src/lib/generated/classes/flow-directive.ts index ebf3ab97..273086f0 100644 --- a/src/lib/generated/classes/flow-directive.ts +++ b/src/lib/generated/classes/flow-directive.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class FlowDirective extends ObjectHydrator { +/** + * Represents the intersection between the FlowDirective class and type + */ +export type FlowDirectiveIntersection = FlowDirective & Specification.FlowDirective; + +/** + * Represents a constructor for the intersection of the FlowDirective class and type + */ +export interface FlowDirectiveConstructor { + new (model?: Partial): FlowDirectiveIntersection; +} + +/** + * Represents a FlowDirective with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class FlowDirective extends ObjectHydrator { + /** + * Instanciates a new instance of the FlowDirective class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the FlowDirective. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('FlowDirective')?.constructor?.(this); + getLifecycleHooks('FlowDirective')?.constructor?.(this); } + /** + * Validates the current instance of the FlowDirective. + * Throws if invalid. + */ validate() { - const copy = new FlowDirective(this as any) as FlowDirective & Specification.FlowDirective; - getLifecycleHook('FlowDirective')?.preValidation?.(copy); - validate('FlowDirective', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('FlowDirective')?.postValidation?.(copy); + const copy = new FlowDirective(this as any) as FlowDirectiveIntersection; + validate('FlowDirective', copy); } + /** + * Normalizes the current instance of the FlowDirective. + * Creates a copy of the FlowDirective, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the FlowDirective instance. + */ normalize(): FlowDirective & Specification.FlowDirective { - const copy = new FlowDirective(this as any) as FlowDirective & Specification.FlowDirective; - return getLifecycleHook('FlowDirective')?.normalize?.(copy) || copy; + const copy = new FlowDirective(this as any) as FlowDirectiveIntersection; + return getLifecycleHooks('FlowDirective')?.normalize?.(copy) || copy; } } -export const _FlowDirective = FlowDirective as { - new (model?: Partial): FlowDirective & Specification.FlowDirective; -}; +export const _FlowDirective = FlowDirective as FlowDirectiveConstructor; diff --git a/src/lib/generated/classes/for-task-for.ts b/src/lib/generated/classes/for-task-for.ts index dd07e124..c41d6acb 100644 --- a/src/lib/generated/classes/for-task-for.ts +++ b/src/lib/generated/classes/for-task-for.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class ForTaskFor extends ObjectHydrator { +/** + * Represents the intersection between the ForTaskFor class and type + */ +export type ForTaskForIntersection = ForTaskFor & Specification.ForTaskFor; + +/** + * Represents a constructor for the intersection of the ForTaskFor class and type + */ +export interface ForTaskForConstructor { + new (model?: Partial): ForTaskForIntersection; +} + +/** + * Represents a ForTaskFor with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class ForTaskFor extends ObjectHydrator { + /** + * Instanciates a new instance of the ForTaskFor class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the ForTaskFor. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('ForTaskFor')?.constructor?.(this); + getLifecycleHooks('ForTaskFor')?.constructor?.(this); } + /** + * Validates the current instance of the ForTaskFor. + * Throws if invalid. + */ validate() { - const copy = new ForTaskFor(this as any) as ForTaskFor & Specification.ForTaskFor; - getLifecycleHook('ForTaskFor')?.preValidation?.(copy); - validate('ForTaskFor', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('ForTaskFor')?.postValidation?.(copy); + const copy = new ForTaskFor(this as any) as ForTaskForIntersection; + validate('ForTaskFor', copy); } + /** + * Normalizes the current instance of the ForTaskFor. + * Creates a copy of the ForTaskFor, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the ForTaskFor instance. + */ normalize(): ForTaskFor & Specification.ForTaskFor { - const copy = new ForTaskFor(this as any) as ForTaskFor & Specification.ForTaskFor; - return getLifecycleHook('ForTaskFor')?.normalize?.(copy) || copy; + const copy = new ForTaskFor(this as any) as ForTaskForIntersection; + return getLifecycleHooks('ForTaskFor')?.normalize?.(copy) || copy; } } -export const _ForTaskFor = ForTaskFor as { - new (model?: Partial): ForTaskFor & Specification.ForTaskFor; -}; +export const _ForTaskFor = ForTaskFor as ForTaskForConstructor; diff --git a/src/lib/generated/classes/for-task.ts b/src/lib/generated/classes/for-task.ts index 09112e97..8a639b8f 100644 --- a/src/lib/generated/classes/for-task.ts +++ b/src/lib/generated/classes/for-task.ts @@ -28,11 +28,33 @@ import { _ForTaskFor } from './for-task-for'; import { _TaskList } from './task-list'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class ForTask extends _TaskBase { +/** + * Represents the intersection between the ForTask class and type + */ +export type ForTaskIntersection = ForTask & Specification.ForTask; + +/** + * Represents a constructor for the intersection of the ForTask class and type + */ +export interface ForTaskConstructor { + new (model?: Partial): ForTaskIntersection; +} + +/** + * Represents a ForTask with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class ForTask extends _TaskBase { + /** + * Instanciates a new instance of the ForTask class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the ForTask. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.ForTask & object; @@ -44,22 +66,28 @@ class ForTask extends _TaskBase { if (typeof model.for === 'object') self.for = new _ForTaskFor(model.for); if (typeof model.do === 'object') self.do = new _TaskList(model.do); } - getLifecycleHook('ForTask')?.constructor?.(this); + getLifecycleHooks('ForTask')?.constructor?.(this); } + /** + * Validates the current instance of the ForTask. + * Throws if invalid. + */ validate() { - const copy = new ForTask(this as any) as ForTask & Specification.ForTask; - getLifecycleHook('ForTask')?.preValidation?.(copy); - validate('ForTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('ForTask')?.postValidation?.(copy); + const copy = new ForTask(this as any) as ForTaskIntersection; + validate('ForTask', copy); } + /** + * Normalizes the current instance of the ForTask. + * Creates a copy of the ForTask, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the ForTask instance. + */ normalize(): ForTask & Specification.ForTask { - const copy = new ForTask(this as any) as ForTask & Specification.ForTask; - return getLifecycleHook('ForTask')?.normalize?.(copy) || copy; + const copy = new ForTask(this as any) as ForTaskIntersection; + return getLifecycleHooks('ForTask')?.normalize?.(copy) || copy; } } -export const _ForTask = ForTask as { - new (model?: Partial): ForTask & Specification.ForTask; -}; +export const _ForTask = ForTask as ForTaskConstructor; diff --git a/src/lib/generated/classes/fork-task-fork.ts b/src/lib/generated/classes/fork-task-fork.ts index 3a54782b..79e0c02c 100644 --- a/src/lib/generated/classes/fork-task-fork.ts +++ b/src/lib/generated/classes/fork-task-fork.ts @@ -23,33 +23,61 @@ import { _TaskList } from './task-list'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class ForkTaskFork extends ObjectHydrator { +/** + * Represents the intersection between the ForkTaskFork class and type + */ +export type ForkTaskForkIntersection = ForkTaskFork & Specification.ForkTaskFork; + +/** + * Represents a constructor for the intersection of the ForkTaskFork class and type + */ +export interface ForkTaskForkConstructor { + new (model?: Partial): ForkTaskForkIntersection; +} + +/** + * Represents a ForkTaskFork with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class ForkTaskFork extends ObjectHydrator { + /** + * Instanciates a new instance of the ForkTaskFork class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the ForkTaskFork. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.ForkTaskFork & object; if (isObject(model)) { if (typeof model.branches === 'object') self.branches = new _TaskList(model.branches); } - getLifecycleHook('ForkTaskFork')?.constructor?.(this); + getLifecycleHooks('ForkTaskFork')?.constructor?.(this); } + /** + * Validates the current instance of the ForkTaskFork. + * Throws if invalid. + */ validate() { - const copy = new ForkTaskFork(this as any) as ForkTaskFork & Specification.ForkTaskFork; - getLifecycleHook('ForkTaskFork')?.preValidation?.(copy); - validate('ForkTaskFork', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('ForkTaskFork')?.postValidation?.(copy); + const copy = new ForkTaskFork(this as any) as ForkTaskForkIntersection; + validate('ForkTaskFork', copy); } + /** + * Normalizes the current instance of the ForkTaskFork. + * Creates a copy of the ForkTaskFork, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the ForkTaskFork instance. + */ normalize(): ForkTaskFork & Specification.ForkTaskFork { - const copy = new ForkTaskFork(this as any) as ForkTaskFork & Specification.ForkTaskFork; - return getLifecycleHook('ForkTaskFork')?.normalize?.(copy) || copy; + const copy = new ForkTaskFork(this as any) as ForkTaskForkIntersection; + return getLifecycleHooks('ForkTaskFork')?.normalize?.(copy) || copy; } } -export const _ForkTaskFork = ForkTaskFork as { - new (model?: Partial): ForkTaskFork & Specification.ForkTaskFork; -}; +export const _ForkTaskFork = ForkTaskFork as ForkTaskForkConstructor; diff --git a/src/lib/generated/classes/fork-task.ts b/src/lib/generated/classes/fork-task.ts index 88cf5a4b..6667c8a6 100644 --- a/src/lib/generated/classes/fork-task.ts +++ b/src/lib/generated/classes/fork-task.ts @@ -27,11 +27,33 @@ import { _Timeout } from './timeout'; import { _ForkTaskFork } from './fork-task-fork'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class ForkTask extends _TaskBase { +/** + * Represents the intersection between the ForkTask class and type + */ +export type ForkTaskIntersection = ForkTask & Specification.ForkTask; + +/** + * Represents a constructor for the intersection of the ForkTask class and type + */ +export interface ForkTaskConstructor { + new (model?: Partial): ForkTaskIntersection; +} + +/** + * Represents a ForkTask with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class ForkTask extends _TaskBase { + /** + * Instanciates a new instance of the ForkTask class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the ForkTask. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.ForkTask & object; @@ -42,22 +64,28 @@ class ForkTask extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.fork === 'object') self.fork = new _ForkTaskFork(model.fork); } - getLifecycleHook('ForkTask')?.constructor?.(this); + getLifecycleHooks('ForkTask')?.constructor?.(this); } + /** + * Validates the current instance of the ForkTask. + * Throws if invalid. + */ validate() { - const copy = new ForkTask(this as any) as ForkTask & Specification.ForkTask; - getLifecycleHook('ForkTask')?.preValidation?.(copy); - validate('ForkTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('ForkTask')?.postValidation?.(copy); + const copy = new ForkTask(this as any) as ForkTaskIntersection; + validate('ForkTask', copy); } + /** + * Normalizes the current instance of the ForkTask. + * Creates a copy of the ForkTask, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the ForkTask instance. + */ normalize(): ForkTask & Specification.ForkTask { - const copy = new ForkTask(this as any) as ForkTask & Specification.ForkTask; - return getLifecycleHook('ForkTask')?.normalize?.(copy) || copy; + const copy = new ForkTask(this as any) as ForkTaskIntersection; + return getLifecycleHooks('ForkTask')?.normalize?.(copy) || copy; } } -export const _ForkTask = ForkTask as { - new (model?: Partial): ForkTask & Specification.ForkTask; -}; +export const _ForkTask = ForkTask as ForkTaskConstructor; diff --git a/src/lib/generated/classes/index.ts b/src/lib/generated/classes/index.ts index a2e79eac..5e88cdf1 100644 --- a/src/lib/generated/classes/index.ts +++ b/src/lib/generated/classes/index.ts @@ -14,186 +14,186 @@ * limitations under the License. */ -import { _Schema } from './schema'; -import { _ExternalResource } from './external-resource'; -import { _ExternalResourceAuthentication } from './external-resource-authentication'; import { _AuthenticationPolicy } from './authentication-policy'; -import { _Task } from './task'; -import { _CallTask } from './call-task'; +import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; +import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; +import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; +import { _AuthenticationPolicyOauth2Client } from './authentication-policy-oauth2-client'; import { _CallAsyncAPI } from './call-async-api'; -import { _FlowDirective } from './flow-directive'; +import { _CallAsyncAPIWith } from './call-async-api-with'; import { _CallAsyncAPIWithAuthentication } from './call-async-api-with-authentication'; +import { _CallFunction } from './call-function'; +import { _CallFunctionWith } from './call-function-with'; import { _CallGRPC } from './call-grpc'; +import { _CallGRPCWith } from './call-grpc-with'; +import { _CallGRPCWithArguments } from './call-grpc-with-arguments'; +import { _CallGRPCWithService } from './call-grpc-with-service'; import { _CallGRPCWithServiceAuthentication } from './call-grpc-with-service-authentication'; import { _CallHTTP } from './call-http'; +import { _CallHTTPWith } from './call-http-with'; import { _CallHTTPWithEndpoint } from './call-http-with-endpoint'; -import { _EndpointAuthentication } from './endpoint-authentication'; import { _CallOpenAPI } from './call-open-api'; +import { _CallOpenAPIWith } from './call-open-api-with'; import { _CallOpenAPIWithAuthentication } from './call-open-api-with-authentication'; -import { _CallFunction } from './call-function'; +import { _CallOpenAPIWithParameters } from './call-open-api-with-parameters'; +import { _CallTask } from './call-task'; +import { _Document } from './document'; +import { _DocumentTags } from './document-tags'; import { _DoTask } from './do-task'; -import { _ForkTask } from './fork-task'; +import { _Duration } from './duration'; import { _EmitTask } from './emit-task'; -import { _ForTask } from './for-task'; -import { _ListenTask } from './listen-task'; +import { _EmitTaskEmit } from './emit-task-emit'; +import { _EmitTaskEmitEvent } from './emit-task-emit-event'; +import { _Endpoint } from './endpoint'; +import { _EndpointAuthentication } from './endpoint-authentication'; +import { _Error } from './error'; import { _EventConsumptionStrategy } from './event-consumption-strategy'; import { _EventConsumptionStrategyAll } from './event-consumption-strategy-all'; import { _EventConsumptionStrategyAny } from './event-consumption-strategy-any'; -import { _RaiseTask } from './raise-task'; -import { _RunTask } from './run-task'; -import { _RunTaskRun } from './run-task-run'; -import { _RunTaskRunScript } from './run-task-run-script'; -import { _SetTask } from './set-task'; -import { _SwitchTask } from './switch-task'; -import { _SwitchTaskSwitch } from './switch-task-switch'; -import { _TryTask } from './try-task'; -import { _RetryPolicyBackoff } from './retry-policy-backoff'; -import { _WaitTask } from './wait-task'; -import { _TaskList } from './task-list'; -import { _UseExtensions } from './use-extensions'; -import { _Workflow } from './workflow'; -import { _Document } from './document'; -import { _DocumentTags } from './document-tags'; -import { _Input } from './input'; -import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; -import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; -import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; -import { _AuthenticationPolicyOauth2Client } from './authentication-policy-oauth2-client'; -import { _Oauth2Token } from './oauth2-token'; -import { _Use } from './use'; -import { _UseAuthentications } from './use-authentications'; -import { _UseErrors } from './use-errors'; -import { _Error } from './error'; -import { _Extension } from './extension'; -import { _TaskBase } from './task-base'; -import { _Output } from './output'; +import { _EventFilter } from './event-filter'; +import { _EventFilterCorrelate } from './event-filter-correlate'; +import { _EventFilterWith } from './event-filter-with'; import { _Export } from './export'; -import { _Timeout } from './timeout'; -import { _Duration } from './duration'; -import { _CallAsyncAPIWith } from './call-async-api-with'; -import { _CallGRPCWith } from './call-grpc-with'; -import { _CallGRPCWithService } from './call-grpc-with-service'; -import { _CallGRPCWithArguments } from './call-grpc-with-arguments'; -import { _CallHTTPWith } from './call-http-with'; -import { _Endpoint } from './endpoint'; -import { _CallOpenAPIWith } from './call-open-api-with'; -import { _CallOpenAPIWithParameters } from './call-open-api-with-parameters'; -import { _CallFunctionWith } from './call-function-with'; +import { _Extension } from './extension'; +import { _ExternalResource } from './external-resource'; +import { _ExternalResourceAuthentication } from './external-resource-authentication'; +import { _FlowDirective } from './flow-directive'; +import { _ForkTask } from './fork-task'; import { _ForkTaskFork } from './fork-task-fork'; -import { _EmitTaskEmit } from './emit-task-emit'; -import { _EmitTaskEmitEvent } from './emit-task-emit-event'; +import { _ForTask } from './for-task'; import { _ForTaskFor } from './for-task-for'; +import { _Input } from './input'; +import { _ListenTask } from './listen-task'; import { _ListenTaskListen } from './listen-task-listen'; -import { _EventFilter } from './event-filter'; -import { _EventFilterWith } from './event-filter-with'; -import { _EventFilterCorrelate } from './event-filter-correlate'; +import { _Oauth2Token } from './oauth2-token'; +import { _Output } from './output'; +import { _RaiseTask } from './raise-task'; import { _RaiseTaskRaise } from './raise-task-raise'; +import { _RetryPolicy } from './retry-policy'; +import { _RetryPolicyBackoff } from './retry-policy-backoff'; +import { _RetryPolicyJitter } from './retry-policy-jitter'; +import { _RetryPolicyLimit } from './retry-policy-limit'; +import { _RetryPolicyLimitAttempt } from './retry-policy-limit-attempt'; +import { _RunTask } from './run-task'; +import { _RunTaskRun } from './run-task-run'; import { _RunTaskRunContainer } from './run-task-run-container'; +import { _RunTaskRunScript } from './run-task-run-script'; import { _RunTaskRunShell } from './run-task-run-shell'; import { _RunTaskRunShellArguments } from './run-task-run-shell-arguments'; import { _RunTaskRunShellEnvironment } from './run-task-run-shell-environment'; import { _RunTaskRunWorkflow } from './run-task-run-workflow'; import { _RunTaskRunWorkflowInput } from './run-task-run-workflow-input'; +import { _Schedule } from './schedule'; +import { _Schema } from './schema'; +import { _SetTask } from './set-task'; import { _SetTaskSet } from './set-task-set'; +import { _SwitchTask } from './switch-task'; +import { _SwitchTaskSwitch } from './switch-task-switch'; import { _SwitchTaskSwitchCase } from './switch-task-switch-case'; +import { _Task } from './task'; +import { _TaskBase } from './task-base'; +import { _TaskList } from './task-list'; +import { _Timeout } from './timeout'; +import { _TryTask } from './try-task'; import { _TryTaskCatch } from './try-task-catch'; -import { _RetryPolicy } from './retry-policy'; -import { _RetryPolicyLimit } from './retry-policy-limit'; -import { _RetryPolicyLimitAttempt } from './retry-policy-limit-attempt'; -import { _RetryPolicyJitter } from './retry-policy-jitter'; +import { _Use } from './use'; +import { _UseAuthentications } from './use-authentications'; +import { _UseErrors } from './use-errors'; +import { _UseExtensions } from './use-extensions'; import { _UseFunctions } from './use-functions'; import { _UseRetries } from './use-retries'; -import { _Schedule } from './schedule'; +import { _WaitTask } from './wait-task'; +import { _Workflow } from './workflow'; export const Classes = { - Schema: _Schema, - ExternalResource: _ExternalResource, - ExternalResourceAuthentication: _ExternalResourceAuthentication, AuthenticationPolicy: _AuthenticationPolicy, - Task: _Task, - CallTask: _CallTask, + AuthenticationPolicyBasic: _AuthenticationPolicyBasic, + AuthenticationPolicyBearer: _AuthenticationPolicyBearer, + AuthenticationPolicyOauth2: _AuthenticationPolicyOauth2, + AuthenticationPolicyOauth2Client: _AuthenticationPolicyOauth2Client, CallAsyncAPI: _CallAsyncAPI, - FlowDirective: _FlowDirective, + CallAsyncAPIWith: _CallAsyncAPIWith, CallAsyncAPIWithAuthentication: _CallAsyncAPIWithAuthentication, + CallFunction: _CallFunction, + CallFunctionWith: _CallFunctionWith, CallGRPC: _CallGRPC, + CallGRPCWith: _CallGRPCWith, + CallGRPCWithArguments: _CallGRPCWithArguments, + CallGRPCWithService: _CallGRPCWithService, CallGRPCWithServiceAuthentication: _CallGRPCWithServiceAuthentication, CallHTTP: _CallHTTP, + CallHTTPWith: _CallHTTPWith, CallHTTPWithEndpoint: _CallHTTPWithEndpoint, - EndpointAuthentication: _EndpointAuthentication, CallOpenAPI: _CallOpenAPI, + CallOpenAPIWith: _CallOpenAPIWith, CallOpenAPIWithAuthentication: _CallOpenAPIWithAuthentication, - CallFunction: _CallFunction, + CallOpenAPIWithParameters: _CallOpenAPIWithParameters, + CallTask: _CallTask, + Document: _Document, + DocumentTags: _DocumentTags, DoTask: _DoTask, - ForkTask: _ForkTask, + Duration: _Duration, EmitTask: _EmitTask, - ForTask: _ForTask, - ListenTask: _ListenTask, + EmitTaskEmit: _EmitTaskEmit, + EmitTaskEmitEvent: _EmitTaskEmitEvent, + Endpoint: _Endpoint, + EndpointAuthentication: _EndpointAuthentication, + Error: _Error, EventConsumptionStrategy: _EventConsumptionStrategy, EventConsumptionStrategyAll: _EventConsumptionStrategyAll, EventConsumptionStrategyAny: _EventConsumptionStrategyAny, - RaiseTask: _RaiseTask, - RunTask: _RunTask, - RunTaskRun: _RunTaskRun, - RunTaskRunScript: _RunTaskRunScript, - SetTask: _SetTask, - SwitchTask: _SwitchTask, - SwitchTaskSwitch: _SwitchTaskSwitch, - TryTask: _TryTask, - RetryPolicyBackoff: _RetryPolicyBackoff, - WaitTask: _WaitTask, - TaskList: _TaskList, - UseExtensions: _UseExtensions, - Workflow: _Workflow, - Document: _Document, - DocumentTags: _DocumentTags, - Input: _Input, - AuthenticationPolicyBasic: _AuthenticationPolicyBasic, - AuthenticationPolicyBearer: _AuthenticationPolicyBearer, - AuthenticationPolicyOauth2: _AuthenticationPolicyOauth2, - AuthenticationPolicyOauth2Client: _AuthenticationPolicyOauth2Client, - Oauth2Token: _Oauth2Token, - Use: _Use, - UseAuthentications: _UseAuthentications, - UseErrors: _UseErrors, - Error: _Error, - Extension: _Extension, - TaskBase: _TaskBase, - Output: _Output, + EventFilter: _EventFilter, + EventFilterCorrelate: _EventFilterCorrelate, + EventFilterWith: _EventFilterWith, Export: _Export, - Timeout: _Timeout, - Duration: _Duration, - CallAsyncAPIWith: _CallAsyncAPIWith, - CallGRPCWith: _CallGRPCWith, - CallGRPCWithService: _CallGRPCWithService, - CallGRPCWithArguments: _CallGRPCWithArguments, - CallHTTPWith: _CallHTTPWith, - Endpoint: _Endpoint, - CallOpenAPIWith: _CallOpenAPIWith, - CallOpenAPIWithParameters: _CallOpenAPIWithParameters, - CallFunctionWith: _CallFunctionWith, + Extension: _Extension, + ExternalResource: _ExternalResource, + ExternalResourceAuthentication: _ExternalResourceAuthentication, + FlowDirective: _FlowDirective, + ForkTask: _ForkTask, ForkTaskFork: _ForkTaskFork, - EmitTaskEmit: _EmitTaskEmit, - EmitTaskEmitEvent: _EmitTaskEmitEvent, + ForTask: _ForTask, ForTaskFor: _ForTaskFor, + Input: _Input, + ListenTask: _ListenTask, ListenTaskListen: _ListenTaskListen, - EventFilter: _EventFilter, - EventFilterWith: _EventFilterWith, - EventFilterCorrelate: _EventFilterCorrelate, + Oauth2Token: _Oauth2Token, + Output: _Output, + RaiseTask: _RaiseTask, RaiseTaskRaise: _RaiseTaskRaise, + RetryPolicy: _RetryPolicy, + RetryPolicyBackoff: _RetryPolicyBackoff, + RetryPolicyJitter: _RetryPolicyJitter, + RetryPolicyLimit: _RetryPolicyLimit, + RetryPolicyLimitAttempt: _RetryPolicyLimitAttempt, + RunTask: _RunTask, + RunTaskRun: _RunTaskRun, RunTaskRunContainer: _RunTaskRunContainer, + RunTaskRunScript: _RunTaskRunScript, RunTaskRunShell: _RunTaskRunShell, RunTaskRunShellArguments: _RunTaskRunShellArguments, RunTaskRunShellEnvironment: _RunTaskRunShellEnvironment, RunTaskRunWorkflow: _RunTaskRunWorkflow, RunTaskRunWorkflowInput: _RunTaskRunWorkflowInput, + Schedule: _Schedule, + Schema: _Schema, + SetTask: _SetTask, SetTaskSet: _SetTaskSet, + SwitchTask: _SwitchTask, + SwitchTaskSwitch: _SwitchTaskSwitch, SwitchTaskSwitchCase: _SwitchTaskSwitchCase, + Task: _Task, + TaskBase: _TaskBase, + TaskList: _TaskList, + Timeout: _Timeout, + TryTask: _TryTask, TryTaskCatch: _TryTaskCatch, - RetryPolicy: _RetryPolicy, - RetryPolicyLimit: _RetryPolicyLimit, - RetryPolicyLimitAttempt: _RetryPolicyLimitAttempt, - RetryPolicyJitter: _RetryPolicyJitter, + Use: _Use, + UseAuthentications: _UseAuthentications, + UseErrors: _UseErrors, + UseExtensions: _UseExtensions, UseFunctions: _UseFunctions, UseRetries: _UseRetries, - Schedule: _Schedule, + WaitTask: _WaitTask, + Workflow: _Workflow, }; diff --git a/src/lib/generated/classes/input.ts b/src/lib/generated/classes/input.ts index 200453c8..fe9269b7 100644 --- a/src/lib/generated/classes/input.ts +++ b/src/lib/generated/classes/input.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class Input extends ObjectHydrator { +/** + * Represents the intersection between the Input class and type + */ +export type InputIntersection = Input & Specification.Input; + +/** + * Represents a constructor for the intersection of the Input class and type + */ +export interface InputConstructor { + new (model?: Partial): InputIntersection; +} + +/** + * Represents a Input with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Input extends ObjectHydrator { + /** + * Instanciates a new instance of the Input class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Input. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('Input')?.constructor?.(this); + getLifecycleHooks('Input')?.constructor?.(this); } + /** + * Validates the current instance of the Input. + * Throws if invalid. + */ validate() { - const copy = new Input(this as any) as Input & Specification.Input; - getLifecycleHook('Input')?.preValidation?.(copy); - validate('Input', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('Input')?.postValidation?.(copy); + const copy = new Input(this as any) as InputIntersection; + validate('Input', copy); } + /** + * Normalizes the current instance of the Input. + * Creates a copy of the Input, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Input instance. + */ normalize(): Input & Specification.Input { - const copy = new Input(this as any) as Input & Specification.Input; - return getLifecycleHook('Input')?.normalize?.(copy) || copy; + const copy = new Input(this as any) as InputIntersection; + return getLifecycleHooks('Input')?.normalize?.(copy) || copy; } } -export const _Input = Input as { - new (model?: Partial): Input & Specification.Input; -}; +export const _Input = Input as InputConstructor; diff --git a/src/lib/generated/classes/listen-task-listen.ts b/src/lib/generated/classes/listen-task-listen.ts index da2f9e34..5d94f36c 100644 --- a/src/lib/generated/classes/listen-task-listen.ts +++ b/src/lib/generated/classes/listen-task-listen.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class ListenTaskListen extends ObjectHydrator { +/** + * Represents the intersection between the ListenTaskListen class and type + */ +export type ListenTaskListenIntersection = ListenTaskListen & Specification.ListenTaskListen; + +/** + * Represents a constructor for the intersection of the ListenTaskListen class and type + */ +export interface ListenTaskListenConstructor { + new (model?: Partial): ListenTaskListenIntersection; +} + +/** + * Represents a ListenTaskListen with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class ListenTaskListen extends ObjectHydrator { + /** + * Instanciates a new instance of the ListenTaskListen class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the ListenTaskListen. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('ListenTaskListen')?.constructor?.(this); + getLifecycleHooks('ListenTaskListen')?.constructor?.(this); } + /** + * Validates the current instance of the ListenTaskListen. + * Throws if invalid. + */ validate() { - const copy = new ListenTaskListen(this as any) as ListenTaskListen & Specification.ListenTaskListen; - getLifecycleHook('ListenTaskListen')?.preValidation?.(copy); - validate('ListenTaskListen', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('ListenTaskListen')?.postValidation?.(copy); + const copy = new ListenTaskListen(this as any) as ListenTaskListenIntersection; + validate('ListenTaskListen', copy); } + /** + * Normalizes the current instance of the ListenTaskListen. + * Creates a copy of the ListenTaskListen, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the ListenTaskListen instance. + */ normalize(): ListenTaskListen & Specification.ListenTaskListen { - const copy = new ListenTaskListen(this as any) as ListenTaskListen & Specification.ListenTaskListen; - return getLifecycleHook('ListenTaskListen')?.normalize?.(copy) || copy; + const copy = new ListenTaskListen(this as any) as ListenTaskListenIntersection; + return getLifecycleHooks('ListenTaskListen')?.normalize?.(copy) || copy; } } -export const _ListenTaskListen = ListenTaskListen as { - new (model?: Partial): ListenTaskListen & Specification.ListenTaskListen; -}; +export const _ListenTaskListen = ListenTaskListen as ListenTaskListenConstructor; diff --git a/src/lib/generated/classes/listen-task.ts b/src/lib/generated/classes/listen-task.ts index ff9a348a..c4bea543 100644 --- a/src/lib/generated/classes/listen-task.ts +++ b/src/lib/generated/classes/listen-task.ts @@ -27,11 +27,33 @@ import { _Timeout } from './timeout'; import { _ListenTaskListen } from './listen-task-listen'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class ListenTask extends _TaskBase { +/** + * Represents the intersection between the ListenTask class and type + */ +export type ListenTaskIntersection = ListenTask & Specification.ListenTask; + +/** + * Represents a constructor for the intersection of the ListenTask class and type + */ +export interface ListenTaskConstructor { + new (model?: Partial): ListenTaskIntersection; +} + +/** + * Represents a ListenTask with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class ListenTask extends _TaskBase { + /** + * Instanciates a new instance of the ListenTask class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the ListenTask. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.ListenTask & object; @@ -42,22 +64,28 @@ class ListenTask extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.listen === 'object') self.listen = new _ListenTaskListen(model.listen); } - getLifecycleHook('ListenTask')?.constructor?.(this); + getLifecycleHooks('ListenTask')?.constructor?.(this); } + /** + * Validates the current instance of the ListenTask. + * Throws if invalid. + */ validate() { - const copy = new ListenTask(this as any) as ListenTask & Specification.ListenTask; - getLifecycleHook('ListenTask')?.preValidation?.(copy); - validate('ListenTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('ListenTask')?.postValidation?.(copy); + const copy = new ListenTask(this as any) as ListenTaskIntersection; + validate('ListenTask', copy); } + /** + * Normalizes the current instance of the ListenTask. + * Creates a copy of the ListenTask, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the ListenTask instance. + */ normalize(): ListenTask & Specification.ListenTask { - const copy = new ListenTask(this as any) as ListenTask & Specification.ListenTask; - return getLifecycleHook('ListenTask')?.normalize?.(copy) || copy; + const copy = new ListenTask(this as any) as ListenTaskIntersection; + return getLifecycleHooks('ListenTask')?.normalize?.(copy) || copy; } } -export const _ListenTask = ListenTask as { - new (model?: Partial): ListenTask & Specification.ListenTask; -}; +export const _ListenTask = ListenTask as ListenTaskConstructor; diff --git a/src/lib/generated/classes/oauth2-token.ts b/src/lib/generated/classes/oauth2-token.ts index 649089ba..8779e501 100644 --- a/src/lib/generated/classes/oauth2-token.ts +++ b/src/lib/generated/classes/oauth2-token.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class Oauth2Token extends ObjectHydrator { +/** + * Represents the intersection between the Oauth2Token class and type + */ +export type Oauth2TokenIntersection = Oauth2Token & Specification.Oauth2Token; + +/** + * Represents a constructor for the intersection of the Oauth2Token class and type + */ +export interface Oauth2TokenConstructor { + new (model?: Partial): Oauth2TokenIntersection; +} + +/** + * Represents a Oauth2Token with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Oauth2Token extends ObjectHydrator { + /** + * Instanciates a new instance of the Oauth2Token class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Oauth2Token. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('Oauth2Token')?.constructor?.(this); + getLifecycleHooks('Oauth2Token')?.constructor?.(this); } + /** + * Validates the current instance of the Oauth2Token. + * Throws if invalid. + */ validate() { - const copy = new Oauth2Token(this as any) as Oauth2Token & Specification.Oauth2Token; - getLifecycleHook('Oauth2Token')?.preValidation?.(copy); - validate('Oauth2Token', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('Oauth2Token')?.postValidation?.(copy); + const copy = new Oauth2Token(this as any) as Oauth2TokenIntersection; + validate('Oauth2Token', copy); } + /** + * Normalizes the current instance of the Oauth2Token. + * Creates a copy of the Oauth2Token, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Oauth2Token instance. + */ normalize(): Oauth2Token & Specification.Oauth2Token { - const copy = new Oauth2Token(this as any) as Oauth2Token & Specification.Oauth2Token; - return getLifecycleHook('Oauth2Token')?.normalize?.(copy) || copy; + const copy = new Oauth2Token(this as any) as Oauth2TokenIntersection; + return getLifecycleHooks('Oauth2Token')?.normalize?.(copy) || copy; } } -export const _Oauth2Token = Oauth2Token as { - new (model?: Partial): Oauth2Token & Specification.Oauth2Token; -}; +export const _Oauth2Token = Oauth2Token as Oauth2TokenConstructor; diff --git a/src/lib/generated/classes/output.ts b/src/lib/generated/classes/output.ts index a515de31..89885248 100644 --- a/src/lib/generated/classes/output.ts +++ b/src/lib/generated/classes/output.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class Output extends ObjectHydrator { +/** + * Represents the intersection between the Output class and type + */ +export type OutputIntersection = Output & Specification.Output; + +/** + * Represents a constructor for the intersection of the Output class and type + */ +export interface OutputConstructor { + new (model?: Partial): OutputIntersection; +} + +/** + * Represents a Output with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Output extends ObjectHydrator { + /** + * Instanciates a new instance of the Output class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Output. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('Output')?.constructor?.(this); + getLifecycleHooks('Output')?.constructor?.(this); } + /** + * Validates the current instance of the Output. + * Throws if invalid. + */ validate() { - const copy = new Output(this as any) as Output & Specification.Output; - getLifecycleHook('Output')?.preValidation?.(copy); - validate('Output', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('Output')?.postValidation?.(copy); + const copy = new Output(this as any) as OutputIntersection; + validate('Output', copy); } + /** + * Normalizes the current instance of the Output. + * Creates a copy of the Output, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Output instance. + */ normalize(): Output & Specification.Output { - const copy = new Output(this as any) as Output & Specification.Output; - return getLifecycleHook('Output')?.normalize?.(copy) || copy; + const copy = new Output(this as any) as OutputIntersection; + return getLifecycleHooks('Output')?.normalize?.(copy) || copy; } } -export const _Output = Output as { - new (model?: Partial): Output & Specification.Output; -}; +export const _Output = Output as OutputConstructor; diff --git a/src/lib/generated/classes/raise-task-raise.ts b/src/lib/generated/classes/raise-task-raise.ts index dce0f85e..34b52efb 100644 --- a/src/lib/generated/classes/raise-task-raise.ts +++ b/src/lib/generated/classes/raise-task-raise.ts @@ -23,33 +23,61 @@ import { _Error } from './error'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class RaiseTaskRaise extends ObjectHydrator { +/** + * Represents the intersection between the RaiseTaskRaise class and type + */ +export type RaiseTaskRaiseIntersection = RaiseTaskRaise & Specification.RaiseTaskRaise; + +/** + * Represents a constructor for the intersection of the RaiseTaskRaise class and type + */ +export interface RaiseTaskRaiseConstructor { + new (model?: Partial): RaiseTaskRaiseIntersection; +} + +/** + * Represents a RaiseTaskRaise with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RaiseTaskRaise extends ObjectHydrator { + /** + * Instanciates a new instance of the RaiseTaskRaise class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RaiseTaskRaise. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.RaiseTaskRaise & object; if (isObject(model)) { if (typeof model.error === 'object') self.error = new _Error(model.error); } - getLifecycleHook('RaiseTaskRaise')?.constructor?.(this); + getLifecycleHooks('RaiseTaskRaise')?.constructor?.(this); } + /** + * Validates the current instance of the RaiseTaskRaise. + * Throws if invalid. + */ validate() { - const copy = new RaiseTaskRaise(this as any) as RaiseTaskRaise & Specification.RaiseTaskRaise; - getLifecycleHook('RaiseTaskRaise')?.preValidation?.(copy); - validate('RaiseTaskRaise', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('RaiseTaskRaise')?.postValidation?.(copy); + const copy = new RaiseTaskRaise(this as any) as RaiseTaskRaiseIntersection; + validate('RaiseTaskRaise', copy); } + /** + * Normalizes the current instance of the RaiseTaskRaise. + * Creates a copy of the RaiseTaskRaise, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RaiseTaskRaise instance. + */ normalize(): RaiseTaskRaise & Specification.RaiseTaskRaise { - const copy = new RaiseTaskRaise(this as any) as RaiseTaskRaise & Specification.RaiseTaskRaise; - return getLifecycleHook('RaiseTaskRaise')?.normalize?.(copy) || copy; + const copy = new RaiseTaskRaise(this as any) as RaiseTaskRaiseIntersection; + return getLifecycleHooks('RaiseTaskRaise')?.normalize?.(copy) || copy; } } -export const _RaiseTaskRaise = RaiseTaskRaise as { - new (model?: Partial): RaiseTaskRaise & Specification.RaiseTaskRaise; -}; +export const _RaiseTaskRaise = RaiseTaskRaise as RaiseTaskRaiseConstructor; diff --git a/src/lib/generated/classes/raise-task.ts b/src/lib/generated/classes/raise-task.ts index 113a9d72..71da255a 100644 --- a/src/lib/generated/classes/raise-task.ts +++ b/src/lib/generated/classes/raise-task.ts @@ -27,11 +27,33 @@ import { _Timeout } from './timeout'; import { _RaiseTaskRaise } from './raise-task-raise'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class RaiseTask extends _TaskBase { +/** + * Represents the intersection between the RaiseTask class and type + */ +export type RaiseTaskIntersection = RaiseTask & Specification.RaiseTask; + +/** + * Represents a constructor for the intersection of the RaiseTask class and type + */ +export interface RaiseTaskConstructor { + new (model?: Partial): RaiseTaskIntersection; +} + +/** + * Represents a RaiseTask with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RaiseTask extends _TaskBase { + /** + * Instanciates a new instance of the RaiseTask class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RaiseTask. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.RaiseTask & object; @@ -42,22 +64,28 @@ class RaiseTask extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.raise === 'object') self.raise = new _RaiseTaskRaise(model.raise); } - getLifecycleHook('RaiseTask')?.constructor?.(this); + getLifecycleHooks('RaiseTask')?.constructor?.(this); } + /** + * Validates the current instance of the RaiseTask. + * Throws if invalid. + */ validate() { - const copy = new RaiseTask(this as any) as RaiseTask & Specification.RaiseTask; - getLifecycleHook('RaiseTask')?.preValidation?.(copy); - validate('RaiseTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('RaiseTask')?.postValidation?.(copy); + const copy = new RaiseTask(this as any) as RaiseTaskIntersection; + validate('RaiseTask', copy); } + /** + * Normalizes the current instance of the RaiseTask. + * Creates a copy of the RaiseTask, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RaiseTask instance. + */ normalize(): RaiseTask & Specification.RaiseTask { - const copy = new RaiseTask(this as any) as RaiseTask & Specification.RaiseTask; - return getLifecycleHook('RaiseTask')?.normalize?.(copy) || copy; + const copy = new RaiseTask(this as any) as RaiseTaskIntersection; + return getLifecycleHooks('RaiseTask')?.normalize?.(copy) || copy; } } -export const _RaiseTask = RaiseTask as { - new (model?: Partial): RaiseTask & Specification.RaiseTask; -}; +export const _RaiseTask = RaiseTask as RaiseTaskConstructor; diff --git a/src/lib/generated/classes/retry-policy-backoff.ts b/src/lib/generated/classes/retry-policy-backoff.ts index e04bca75..aa2107eb 100644 --- a/src/lib/generated/classes/retry-policy-backoff.ts +++ b/src/lib/generated/classes/retry-policy-backoff.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class RetryPolicyBackoff extends ObjectHydrator { +/** + * Represents the intersection between the RetryPolicyBackoff class and type + */ +export type RetryPolicyBackoffIntersection = RetryPolicyBackoff & Specification.RetryPolicyBackoff; + +/** + * Represents a constructor for the intersection of the RetryPolicyBackoff class and type + */ +export interface RetryPolicyBackoffConstructor { + new (model?: Partial): RetryPolicyBackoffIntersection; +} + +/** + * Represents a RetryPolicyBackoff with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RetryPolicyBackoff extends ObjectHydrator { + /** + * Instanciates a new instance of the RetryPolicyBackoff class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RetryPolicyBackoff. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('RetryPolicyBackoff')?.constructor?.(this); + getLifecycleHooks('RetryPolicyBackoff')?.constructor?.(this); } + /** + * Validates the current instance of the RetryPolicyBackoff. + * Throws if invalid. + */ validate() { - const copy = new RetryPolicyBackoff(this as any) as RetryPolicyBackoff & Specification.RetryPolicyBackoff; - getLifecycleHook('RetryPolicyBackoff')?.preValidation?.(copy); - validate('RetryPolicyBackoff', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('RetryPolicyBackoff')?.postValidation?.(copy); + const copy = new RetryPolicyBackoff(this as any) as RetryPolicyBackoffIntersection; + validate('RetryPolicyBackoff', copy); } + /** + * Normalizes the current instance of the RetryPolicyBackoff. + * Creates a copy of the RetryPolicyBackoff, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RetryPolicyBackoff instance. + */ normalize(): RetryPolicyBackoff & Specification.RetryPolicyBackoff { - const copy = new RetryPolicyBackoff(this as any) as RetryPolicyBackoff & Specification.RetryPolicyBackoff; - return getLifecycleHook('RetryPolicyBackoff')?.normalize?.(copy) || copy; + const copy = new RetryPolicyBackoff(this as any) as RetryPolicyBackoffIntersection; + return getLifecycleHooks('RetryPolicyBackoff')?.normalize?.(copy) || copy; } } -export const _RetryPolicyBackoff = RetryPolicyBackoff as { - new (model?: Partial): RetryPolicyBackoff & Specification.RetryPolicyBackoff; -}; +export const _RetryPolicyBackoff = RetryPolicyBackoff as RetryPolicyBackoffConstructor; diff --git a/src/lib/generated/classes/retry-policy-jitter.ts b/src/lib/generated/classes/retry-policy-jitter.ts index 995b3203..25f7eb14 100644 --- a/src/lib/generated/classes/retry-policy-jitter.ts +++ b/src/lib/generated/classes/retry-policy-jitter.ts @@ -23,11 +23,33 @@ import { _Duration } from './duration'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class RetryPolicyJitter extends ObjectHydrator { +/** + * Represents the intersection between the RetryPolicyJitter class and type + */ +export type RetryPolicyJitterIntersection = RetryPolicyJitter & Specification.RetryPolicyJitter; + +/** + * Represents a constructor for the intersection of the RetryPolicyJitter class and type + */ +export interface RetryPolicyJitterConstructor { + new (model?: Partial): RetryPolicyJitterIntersection; +} + +/** + * Represents a RetryPolicyJitter with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RetryPolicyJitter extends ObjectHydrator { + /** + * Instanciates a new instance of the RetryPolicyJitter class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RetryPolicyJitter. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.RetryPolicyJitter & object; @@ -35,22 +57,28 @@ class RetryPolicyJitter extends ObjectHydrator if (typeof model.from === 'object') self.from = new _Duration(model.from); if (typeof model.to === 'object') self.to = new _Duration(model.to); } - getLifecycleHook('RetryPolicyJitter')?.constructor?.(this); + getLifecycleHooks('RetryPolicyJitter')?.constructor?.(this); } + /** + * Validates the current instance of the RetryPolicyJitter. + * Throws if invalid. + */ validate() { - const copy = new RetryPolicyJitter(this as any) as RetryPolicyJitter & Specification.RetryPolicyJitter; - getLifecycleHook('RetryPolicyJitter')?.preValidation?.(copy); - validate('RetryPolicyJitter', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('RetryPolicyJitter')?.postValidation?.(copy); + const copy = new RetryPolicyJitter(this as any) as RetryPolicyJitterIntersection; + validate('RetryPolicyJitter', copy); } + /** + * Normalizes the current instance of the RetryPolicyJitter. + * Creates a copy of the RetryPolicyJitter, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RetryPolicyJitter instance. + */ normalize(): RetryPolicyJitter & Specification.RetryPolicyJitter { - const copy = new RetryPolicyJitter(this as any) as RetryPolicyJitter & Specification.RetryPolicyJitter; - return getLifecycleHook('RetryPolicyJitter')?.normalize?.(copy) || copy; + const copy = new RetryPolicyJitter(this as any) as RetryPolicyJitterIntersection; + return getLifecycleHooks('RetryPolicyJitter')?.normalize?.(copy) || copy; } } -export const _RetryPolicyJitter = RetryPolicyJitter as { - new (model?: Partial): RetryPolicyJitter & Specification.RetryPolicyJitter; -}; +export const _RetryPolicyJitter = RetryPolicyJitter as RetryPolicyJitterConstructor; diff --git a/src/lib/generated/classes/retry-policy-limit-attempt.ts b/src/lib/generated/classes/retry-policy-limit-attempt.ts index fbde2fe8..c828d7cc 100644 --- a/src/lib/generated/classes/retry-policy-limit-attempt.ts +++ b/src/lib/generated/classes/retry-policy-limit-attempt.ts @@ -23,37 +23,61 @@ import { _Duration } from './duration'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class RetryPolicyLimitAttempt extends ObjectHydrator { +/** + * Represents the intersection between the RetryPolicyLimitAttempt class and type + */ +export type RetryPolicyLimitAttemptIntersection = RetryPolicyLimitAttempt & Specification.RetryPolicyLimitAttempt; + +/** + * Represents a constructor for the intersection of the RetryPolicyLimitAttempt class and type + */ +export interface RetryPolicyLimitAttemptConstructor { + new (model?: Partial): RetryPolicyLimitAttemptIntersection; +} + +/** + * Represents a RetryPolicyLimitAttempt with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RetryPolicyLimitAttempt extends ObjectHydrator { + /** + * Instanciates a new instance of the RetryPolicyLimitAttempt class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RetryPolicyLimitAttempt. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.RetryPolicyLimitAttempt & object; if (isObject(model)) { if (typeof model.duration === 'object') self.duration = new _Duration(model.duration); } - getLifecycleHook('RetryPolicyLimitAttempt')?.constructor?.(this); + getLifecycleHooks('RetryPolicyLimitAttempt')?.constructor?.(this); } + /** + * Validates the current instance of the RetryPolicyLimitAttempt. + * Throws if invalid. + */ validate() { - const copy = new RetryPolicyLimitAttempt(this as any) as RetryPolicyLimitAttempt & - Specification.RetryPolicyLimitAttempt; - getLifecycleHook('RetryPolicyLimitAttempt')?.preValidation?.(copy); - validate('RetryPolicyLimitAttempt', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('RetryPolicyLimitAttempt')?.postValidation?.(copy); + const copy = new RetryPolicyLimitAttempt(this as any) as RetryPolicyLimitAttemptIntersection; + validate('RetryPolicyLimitAttempt', copy); } + /** + * Normalizes the current instance of the RetryPolicyLimitAttempt. + * Creates a copy of the RetryPolicyLimitAttempt, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RetryPolicyLimitAttempt instance. + */ normalize(): RetryPolicyLimitAttempt & Specification.RetryPolicyLimitAttempt { - const copy = new RetryPolicyLimitAttempt(this as any) as RetryPolicyLimitAttempt & - Specification.RetryPolicyLimitAttempt; - return getLifecycleHook('RetryPolicyLimitAttempt')?.normalize?.(copy) || copy; + const copy = new RetryPolicyLimitAttempt(this as any) as RetryPolicyLimitAttemptIntersection; + return getLifecycleHooks('RetryPolicyLimitAttempt')?.normalize?.(copy) || copy; } } -export const _RetryPolicyLimitAttempt = RetryPolicyLimitAttempt as { - new ( - model?: Partial, - ): RetryPolicyLimitAttempt & Specification.RetryPolicyLimitAttempt; -}; +export const _RetryPolicyLimitAttempt = RetryPolicyLimitAttempt as RetryPolicyLimitAttemptConstructor; diff --git a/src/lib/generated/classes/retry-policy-limit.ts b/src/lib/generated/classes/retry-policy-limit.ts index e3195014..7f349abe 100644 --- a/src/lib/generated/classes/retry-policy-limit.ts +++ b/src/lib/generated/classes/retry-policy-limit.ts @@ -24,11 +24,33 @@ import { _RetryPolicyLimitAttempt } from './retry-policy-limit-attempt'; import { _Duration } from './duration'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class RetryPolicyLimit extends ObjectHydrator { +/** + * Represents the intersection between the RetryPolicyLimit class and type + */ +export type RetryPolicyLimitIntersection = RetryPolicyLimit & Specification.RetryPolicyLimit; + +/** + * Represents a constructor for the intersection of the RetryPolicyLimit class and type + */ +export interface RetryPolicyLimitConstructor { + new (model?: Partial): RetryPolicyLimitIntersection; +} + +/** + * Represents a RetryPolicyLimit with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RetryPolicyLimit extends ObjectHydrator { + /** + * Instanciates a new instance of the RetryPolicyLimit class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RetryPolicyLimit. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.RetryPolicyLimit & object; @@ -36,22 +58,28 @@ class RetryPolicyLimit extends ObjectHydrator { if (typeof model.attempt === 'object') self.attempt = new _RetryPolicyLimitAttempt(model.attempt); if (typeof model.duration === 'object') self.duration = new _Duration(model.duration); } - getLifecycleHook('RetryPolicyLimit')?.constructor?.(this); + getLifecycleHooks('RetryPolicyLimit')?.constructor?.(this); } + /** + * Validates the current instance of the RetryPolicyLimit. + * Throws if invalid. + */ validate() { - const copy = new RetryPolicyLimit(this as any) as RetryPolicyLimit & Specification.RetryPolicyLimit; - getLifecycleHook('RetryPolicyLimit')?.preValidation?.(copy); - validate('RetryPolicyLimit', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('RetryPolicyLimit')?.postValidation?.(copy); + const copy = new RetryPolicyLimit(this as any) as RetryPolicyLimitIntersection; + validate('RetryPolicyLimit', copy); } + /** + * Normalizes the current instance of the RetryPolicyLimit. + * Creates a copy of the RetryPolicyLimit, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RetryPolicyLimit instance. + */ normalize(): RetryPolicyLimit & Specification.RetryPolicyLimit { - const copy = new RetryPolicyLimit(this as any) as RetryPolicyLimit & Specification.RetryPolicyLimit; - return getLifecycleHook('RetryPolicyLimit')?.normalize?.(copy) || copy; + const copy = new RetryPolicyLimit(this as any) as RetryPolicyLimitIntersection; + return getLifecycleHooks('RetryPolicyLimit')?.normalize?.(copy) || copy; } } -export const _RetryPolicyLimit = RetryPolicyLimit as { - new (model?: Partial): RetryPolicyLimit & Specification.RetryPolicyLimit; -}; +export const _RetryPolicyLimit = RetryPolicyLimit as RetryPolicyLimitConstructor; diff --git a/src/lib/generated/classes/retry-policy.ts b/src/lib/generated/classes/retry-policy.ts index aaa63e49..dee6fd4d 100644 --- a/src/lib/generated/classes/retry-policy.ts +++ b/src/lib/generated/classes/retry-policy.ts @@ -25,11 +25,33 @@ import { _RetryPolicyLimit } from './retry-policy-limit'; import { _RetryPolicyJitter } from './retry-policy-jitter'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class RetryPolicy extends ObjectHydrator { +/** + * Represents the intersection between the RetryPolicy class and type + */ +export type RetryPolicyIntersection = RetryPolicy & Specification.RetryPolicy; + +/** + * Represents a constructor for the intersection of the RetryPolicy class and type + */ +export interface RetryPolicyConstructor { + new (model?: Partial): RetryPolicyIntersection; +} + +/** + * Represents a RetryPolicy with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RetryPolicy extends ObjectHydrator { + /** + * Instanciates a new instance of the RetryPolicy class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RetryPolicy. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.RetryPolicy & object; @@ -38,22 +60,28 @@ class RetryPolicy extends ObjectHydrator { if (typeof model.limit === 'object') self.limit = new _RetryPolicyLimit(model.limit); if (typeof model.jitter === 'object') self.jitter = new _RetryPolicyJitter(model.jitter); } - getLifecycleHook('RetryPolicy')?.constructor?.(this); + getLifecycleHooks('RetryPolicy')?.constructor?.(this); } + /** + * Validates the current instance of the RetryPolicy. + * Throws if invalid. + */ validate() { - const copy = new RetryPolicy(this as any) as RetryPolicy & Specification.RetryPolicy; - getLifecycleHook('RetryPolicy')?.preValidation?.(copy); - validate('RetryPolicy', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('RetryPolicy')?.postValidation?.(copy); + const copy = new RetryPolicy(this as any) as RetryPolicyIntersection; + validate('RetryPolicy', copy); } + /** + * Normalizes the current instance of the RetryPolicy. + * Creates a copy of the RetryPolicy, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RetryPolicy instance. + */ normalize(): RetryPolicy & Specification.RetryPolicy { - const copy = new RetryPolicy(this as any) as RetryPolicy & Specification.RetryPolicy; - return getLifecycleHook('RetryPolicy')?.normalize?.(copy) || copy; + const copy = new RetryPolicy(this as any) as RetryPolicyIntersection; + return getLifecycleHooks('RetryPolicy')?.normalize?.(copy) || copy; } } -export const _RetryPolicy = RetryPolicy as { - new (model?: Partial): RetryPolicy & Specification.RetryPolicy; -}; +export const _RetryPolicy = RetryPolicy as RetryPolicyConstructor; diff --git a/src/lib/generated/classes/run-task-run-container.ts b/src/lib/generated/classes/run-task-run-container.ts index 8f6eed7c..41946689 100644 --- a/src/lib/generated/classes/run-task-run-container.ts +++ b/src/lib/generated/classes/run-task-run-container.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class RunTaskRunContainer extends ObjectHydrator { +/** + * Represents the intersection between the RunTaskRunContainer class and type + */ +export type RunTaskRunContainerIntersection = RunTaskRunContainer & Specification.RunTaskRunContainer; + +/** + * Represents a constructor for the intersection of the RunTaskRunContainer class and type + */ +export interface RunTaskRunContainerConstructor { + new (model?: Partial): RunTaskRunContainerIntersection; +} + +/** + * Represents a RunTaskRunContainer with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RunTaskRunContainer extends ObjectHydrator { + /** + * Instanciates a new instance of the RunTaskRunContainer class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RunTaskRunContainer. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('RunTaskRunContainer')?.constructor?.(this); + getLifecycleHooks('RunTaskRunContainer')?.constructor?.(this); } + /** + * Validates the current instance of the RunTaskRunContainer. + * Throws if invalid. + */ validate() { - const copy = new RunTaskRunContainer(this as any) as RunTaskRunContainer & Specification.RunTaskRunContainer; - getLifecycleHook('RunTaskRunContainer')?.preValidation?.(copy); - validate('RunTaskRunContainer', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('RunTaskRunContainer')?.postValidation?.(copy); + const copy = new RunTaskRunContainer(this as any) as RunTaskRunContainerIntersection; + validate('RunTaskRunContainer', copy); } + /** + * Normalizes the current instance of the RunTaskRunContainer. + * Creates a copy of the RunTaskRunContainer, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RunTaskRunContainer instance. + */ normalize(): RunTaskRunContainer & Specification.RunTaskRunContainer { - const copy = new RunTaskRunContainer(this as any) as RunTaskRunContainer & Specification.RunTaskRunContainer; - return getLifecycleHook('RunTaskRunContainer')?.normalize?.(copy) || copy; + const copy = new RunTaskRunContainer(this as any) as RunTaskRunContainerIntersection; + return getLifecycleHooks('RunTaskRunContainer')?.normalize?.(copy) || copy; } } -export const _RunTaskRunContainer = RunTaskRunContainer as { - new (model?: Partial): RunTaskRunContainer & Specification.RunTaskRunContainer; -}; +export const _RunTaskRunContainer = RunTaskRunContainer as RunTaskRunContainerConstructor; diff --git a/src/lib/generated/classes/run-task-run-script.ts b/src/lib/generated/classes/run-task-run-script.ts index 82ee437f..4833706b 100644 --- a/src/lib/generated/classes/run-task-run-script.ts +++ b/src/lib/generated/classes/run-task-run-script.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class RunTaskRunScript extends ObjectHydrator { +/** + * Represents the intersection between the RunTaskRunScript class and type + */ +export type RunTaskRunScriptIntersection = RunTaskRunScript & Specification.RunTaskRunScript; + +/** + * Represents a constructor for the intersection of the RunTaskRunScript class and type + */ +export interface RunTaskRunScriptConstructor { + new (model?: Partial): RunTaskRunScriptIntersection; +} + +/** + * Represents a RunTaskRunScript with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RunTaskRunScript extends ObjectHydrator { + /** + * Instanciates a new instance of the RunTaskRunScript class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RunTaskRunScript. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('RunTaskRunScript')?.constructor?.(this); + getLifecycleHooks('RunTaskRunScript')?.constructor?.(this); } + /** + * Validates the current instance of the RunTaskRunScript. + * Throws if invalid. + */ validate() { - const copy = new RunTaskRunScript(this as any) as RunTaskRunScript & Specification.RunTaskRunScript; - getLifecycleHook('RunTaskRunScript')?.preValidation?.(copy); - validate('RunTaskRunScript', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('RunTaskRunScript')?.postValidation?.(copy); + const copy = new RunTaskRunScript(this as any) as RunTaskRunScriptIntersection; + validate('RunTaskRunScript', copy); } + /** + * Normalizes the current instance of the RunTaskRunScript. + * Creates a copy of the RunTaskRunScript, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RunTaskRunScript instance. + */ normalize(): RunTaskRunScript & Specification.RunTaskRunScript { - const copy = new RunTaskRunScript(this as any) as RunTaskRunScript & Specification.RunTaskRunScript; - return getLifecycleHook('RunTaskRunScript')?.normalize?.(copy) || copy; + const copy = new RunTaskRunScript(this as any) as RunTaskRunScriptIntersection; + return getLifecycleHooks('RunTaskRunScript')?.normalize?.(copy) || copy; } } -export const _RunTaskRunScript = RunTaskRunScript as { - new (model?: Partial): RunTaskRunScript & Specification.RunTaskRunScript; -}; +export const _RunTaskRunScript = RunTaskRunScript as RunTaskRunScriptConstructor; diff --git a/src/lib/generated/classes/run-task-run-shell-arguments.ts b/src/lib/generated/classes/run-task-run-shell-arguments.ts index 6e56f7e4..0b7142f1 100644 --- a/src/lib/generated/classes/run-task-run-shell-arguments.ts +++ b/src/lib/generated/classes/run-task-run-shell-arguments.ts @@ -22,34 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class RunTaskRunShellArguments extends ObjectHydrator { +/** + * Represents the intersection between the RunTaskRunShellArguments class and type + */ +export type RunTaskRunShellArgumentsIntersection = RunTaskRunShellArguments & Specification.RunTaskRunShellArguments; + +/** + * Represents a constructor for the intersection of the RunTaskRunShellArguments class and type + */ +export interface RunTaskRunShellArgumentsConstructor { + new (model?: Partial): RunTaskRunShellArgumentsIntersection; +} + +/** + * Represents a RunTaskRunShellArguments with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RunTaskRunShellArguments extends ObjectHydrator { + /** + * Instanciates a new instance of the RunTaskRunShellArguments class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RunTaskRunShellArguments. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('RunTaskRunShellArguments')?.constructor?.(this); + getLifecycleHooks('RunTaskRunShellArguments')?.constructor?.(this); } + /** + * Validates the current instance of the RunTaskRunShellArguments. + * Throws if invalid. + */ validate() { - const copy = new RunTaskRunShellArguments(this as any) as RunTaskRunShellArguments & - Specification.RunTaskRunShellArguments; - getLifecycleHook('RunTaskRunShellArguments')?.preValidation?.(copy); - validate('RunTaskRunShellArguments', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('RunTaskRunShellArguments')?.postValidation?.(copy); + const copy = new RunTaskRunShellArguments(this as any) as RunTaskRunShellArgumentsIntersection; + validate('RunTaskRunShellArguments', copy); } + /** + * Normalizes the current instance of the RunTaskRunShellArguments. + * Creates a copy of the RunTaskRunShellArguments, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RunTaskRunShellArguments instance. + */ normalize(): RunTaskRunShellArguments & Specification.RunTaskRunShellArguments { - const copy = new RunTaskRunShellArguments(this as any) as RunTaskRunShellArguments & - Specification.RunTaskRunShellArguments; - return getLifecycleHook('RunTaskRunShellArguments')?.normalize?.(copy) || copy; + const copy = new RunTaskRunShellArguments(this as any) as RunTaskRunShellArgumentsIntersection; + return getLifecycleHooks('RunTaskRunShellArguments')?.normalize?.(copy) || copy; } } -export const _RunTaskRunShellArguments = RunTaskRunShellArguments as { - new ( - model?: Partial, - ): RunTaskRunShellArguments & Specification.RunTaskRunShellArguments; -}; +export const _RunTaskRunShellArguments = RunTaskRunShellArguments as RunTaskRunShellArgumentsConstructor; diff --git a/src/lib/generated/classes/run-task-run-shell-environment.ts b/src/lib/generated/classes/run-task-run-shell-environment.ts index a3851e45..68e3db7a 100644 --- a/src/lib/generated/classes/run-task-run-shell-environment.ts +++ b/src/lib/generated/classes/run-task-run-shell-environment.ts @@ -22,34 +22,58 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class RunTaskRunShellEnvironment extends ObjectHydrator { +/** + * Represents the intersection between the RunTaskRunShellEnvironment class and type + */ +export type RunTaskRunShellEnvironmentIntersection = RunTaskRunShellEnvironment & + Specification.RunTaskRunShellEnvironment; + +/** + * Represents a constructor for the intersection of the RunTaskRunShellEnvironment class and type + */ +export interface RunTaskRunShellEnvironmentConstructor { + new (model?: Partial): RunTaskRunShellEnvironmentIntersection; +} + +/** + * Represents a RunTaskRunShellEnvironment with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RunTaskRunShellEnvironment extends ObjectHydrator { + /** + * Instanciates a new instance of the RunTaskRunShellEnvironment class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RunTaskRunShellEnvironment. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('RunTaskRunShellEnvironment')?.constructor?.(this); + getLifecycleHooks('RunTaskRunShellEnvironment')?.constructor?.(this); } + /** + * Validates the current instance of the RunTaskRunShellEnvironment. + * Throws if invalid. + */ validate() { - const copy = new RunTaskRunShellEnvironment(this as any) as RunTaskRunShellEnvironment & - Specification.RunTaskRunShellEnvironment; - getLifecycleHook('RunTaskRunShellEnvironment')?.preValidation?.(copy); - validate('RunTaskRunShellEnvironment', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('RunTaskRunShellEnvironment')?.postValidation?.(copy); + const copy = new RunTaskRunShellEnvironment(this as any) as RunTaskRunShellEnvironmentIntersection; + validate('RunTaskRunShellEnvironment', copy); } + /** + * Normalizes the current instance of the RunTaskRunShellEnvironment. + * Creates a copy of the RunTaskRunShellEnvironment, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RunTaskRunShellEnvironment instance. + */ normalize(): RunTaskRunShellEnvironment & Specification.RunTaskRunShellEnvironment { - const copy = new RunTaskRunShellEnvironment(this as any) as RunTaskRunShellEnvironment & - Specification.RunTaskRunShellEnvironment; - return getLifecycleHook('RunTaskRunShellEnvironment')?.normalize?.(copy) || copy; + const copy = new RunTaskRunShellEnvironment(this as any) as RunTaskRunShellEnvironmentIntersection; + return getLifecycleHooks('RunTaskRunShellEnvironment')?.normalize?.(copy) || copy; } } -export const _RunTaskRunShellEnvironment = RunTaskRunShellEnvironment as { - new ( - model?: Partial, - ): RunTaskRunShellEnvironment & Specification.RunTaskRunShellEnvironment; -}; +export const _RunTaskRunShellEnvironment = RunTaskRunShellEnvironment as RunTaskRunShellEnvironmentConstructor; diff --git a/src/lib/generated/classes/run-task-run-shell.ts b/src/lib/generated/classes/run-task-run-shell.ts index b5a81788..fb35dd6f 100644 --- a/src/lib/generated/classes/run-task-run-shell.ts +++ b/src/lib/generated/classes/run-task-run-shell.ts @@ -24,11 +24,33 @@ import { _RunTaskRunShellArguments } from './run-task-run-shell-arguments'; import { _RunTaskRunShellEnvironment } from './run-task-run-shell-environment'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class RunTaskRunShell extends ObjectHydrator { +/** + * Represents the intersection between the RunTaskRunShell class and type + */ +export type RunTaskRunShellIntersection = RunTaskRunShell & Specification.RunTaskRunShell; + +/** + * Represents a constructor for the intersection of the RunTaskRunShell class and type + */ +export interface RunTaskRunShellConstructor { + new (model?: Partial): RunTaskRunShellIntersection; +} + +/** + * Represents a RunTaskRunShell with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RunTaskRunShell extends ObjectHydrator { + /** + * Instanciates a new instance of the RunTaskRunShell class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RunTaskRunShell. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.RunTaskRunShell & object; @@ -36,22 +58,28 @@ class RunTaskRunShell extends ObjectHydrator { if (typeof model.arguments === 'object') self.arguments = new _RunTaskRunShellArguments(model.arguments); if (typeof model.environment === 'object') self.environment = new _RunTaskRunShellEnvironment(model.environment); } - getLifecycleHook('RunTaskRunShell')?.constructor?.(this); + getLifecycleHooks('RunTaskRunShell')?.constructor?.(this); } + /** + * Validates the current instance of the RunTaskRunShell. + * Throws if invalid. + */ validate() { - const copy = new RunTaskRunShell(this as any) as RunTaskRunShell & Specification.RunTaskRunShell; - getLifecycleHook('RunTaskRunShell')?.preValidation?.(copy); - validate('RunTaskRunShell', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('RunTaskRunShell')?.postValidation?.(copy); + const copy = new RunTaskRunShell(this as any) as RunTaskRunShellIntersection; + validate('RunTaskRunShell', copy); } + /** + * Normalizes the current instance of the RunTaskRunShell. + * Creates a copy of the RunTaskRunShell, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RunTaskRunShell instance. + */ normalize(): RunTaskRunShell & Specification.RunTaskRunShell { - const copy = new RunTaskRunShell(this as any) as RunTaskRunShell & Specification.RunTaskRunShell; - return getLifecycleHook('RunTaskRunShell')?.normalize?.(copy) || copy; + const copy = new RunTaskRunShell(this as any) as RunTaskRunShellIntersection; + return getLifecycleHooks('RunTaskRunShell')?.normalize?.(copy) || copy; } } -export const _RunTaskRunShell = RunTaskRunShell as { - new (model?: Partial): RunTaskRunShell & Specification.RunTaskRunShell; -}; +export const _RunTaskRunShell = RunTaskRunShell as RunTaskRunShellConstructor; diff --git a/src/lib/generated/classes/run-task-run-workflow-input.ts b/src/lib/generated/classes/run-task-run-workflow-input.ts index 5cc36e2f..9b04812d 100644 --- a/src/lib/generated/classes/run-task-run-workflow-input.ts +++ b/src/lib/generated/classes/run-task-run-workflow-input.ts @@ -22,34 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class RunTaskRunWorkflowInput extends ObjectHydrator { +/** + * Represents the intersection between the RunTaskRunWorkflowInput class and type + */ +export type RunTaskRunWorkflowInputIntersection = RunTaskRunWorkflowInput & Specification.RunTaskRunWorkflowInput; + +/** + * Represents a constructor for the intersection of the RunTaskRunWorkflowInput class and type + */ +export interface RunTaskRunWorkflowInputConstructor { + new (model?: Partial): RunTaskRunWorkflowInputIntersection; +} + +/** + * Represents a RunTaskRunWorkflowInput with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RunTaskRunWorkflowInput extends ObjectHydrator { + /** + * Instanciates a new instance of the RunTaskRunWorkflowInput class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RunTaskRunWorkflowInput. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('RunTaskRunWorkflowInput')?.constructor?.(this); + getLifecycleHooks('RunTaskRunWorkflowInput')?.constructor?.(this); } + /** + * Validates the current instance of the RunTaskRunWorkflowInput. + * Throws if invalid. + */ validate() { - const copy = new RunTaskRunWorkflowInput(this as any) as RunTaskRunWorkflowInput & - Specification.RunTaskRunWorkflowInput; - getLifecycleHook('RunTaskRunWorkflowInput')?.preValidation?.(copy); - validate('RunTaskRunWorkflowInput', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('RunTaskRunWorkflowInput')?.postValidation?.(copy); + const copy = new RunTaskRunWorkflowInput(this as any) as RunTaskRunWorkflowInputIntersection; + validate('RunTaskRunWorkflowInput', copy); } + /** + * Normalizes the current instance of the RunTaskRunWorkflowInput. + * Creates a copy of the RunTaskRunWorkflowInput, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RunTaskRunWorkflowInput instance. + */ normalize(): RunTaskRunWorkflowInput & Specification.RunTaskRunWorkflowInput { - const copy = new RunTaskRunWorkflowInput(this as any) as RunTaskRunWorkflowInput & - Specification.RunTaskRunWorkflowInput; - return getLifecycleHook('RunTaskRunWorkflowInput')?.normalize?.(copy) || copy; + const copy = new RunTaskRunWorkflowInput(this as any) as RunTaskRunWorkflowInputIntersection; + return getLifecycleHooks('RunTaskRunWorkflowInput')?.normalize?.(copy) || copy; } } -export const _RunTaskRunWorkflowInput = RunTaskRunWorkflowInput as { - new ( - model?: Partial, - ): RunTaskRunWorkflowInput & Specification.RunTaskRunWorkflowInput; -}; +export const _RunTaskRunWorkflowInput = RunTaskRunWorkflowInput as RunTaskRunWorkflowInputConstructor; diff --git a/src/lib/generated/classes/run-task-run-workflow.ts b/src/lib/generated/classes/run-task-run-workflow.ts index c4e1fff1..817bd914 100644 --- a/src/lib/generated/classes/run-task-run-workflow.ts +++ b/src/lib/generated/classes/run-task-run-workflow.ts @@ -23,33 +23,61 @@ import { _RunTaskRunWorkflowInput } from './run-task-run-workflow-input'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class RunTaskRunWorkflow extends ObjectHydrator { +/** + * Represents the intersection between the RunTaskRunWorkflow class and type + */ +export type RunTaskRunWorkflowIntersection = RunTaskRunWorkflow & Specification.RunTaskRunWorkflow; + +/** + * Represents a constructor for the intersection of the RunTaskRunWorkflow class and type + */ +export interface RunTaskRunWorkflowConstructor { + new (model?: Partial): RunTaskRunWorkflowIntersection; +} + +/** + * Represents a RunTaskRunWorkflow with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RunTaskRunWorkflow extends ObjectHydrator { + /** + * Instanciates a new instance of the RunTaskRunWorkflow class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RunTaskRunWorkflow. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.RunTaskRunWorkflow & object; if (isObject(model)) { if (typeof model.input === 'object') self.input = new _RunTaskRunWorkflowInput(model.input); } - getLifecycleHook('RunTaskRunWorkflow')?.constructor?.(this); + getLifecycleHooks('RunTaskRunWorkflow')?.constructor?.(this); } + /** + * Validates the current instance of the RunTaskRunWorkflow. + * Throws if invalid. + */ validate() { - const copy = new RunTaskRunWorkflow(this as any) as RunTaskRunWorkflow & Specification.RunTaskRunWorkflow; - getLifecycleHook('RunTaskRunWorkflow')?.preValidation?.(copy); - validate('RunTaskRunWorkflow', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('RunTaskRunWorkflow')?.postValidation?.(copy); + const copy = new RunTaskRunWorkflow(this as any) as RunTaskRunWorkflowIntersection; + validate('RunTaskRunWorkflow', copy); } + /** + * Normalizes the current instance of the RunTaskRunWorkflow. + * Creates a copy of the RunTaskRunWorkflow, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RunTaskRunWorkflow instance. + */ normalize(): RunTaskRunWorkflow & Specification.RunTaskRunWorkflow { - const copy = new RunTaskRunWorkflow(this as any) as RunTaskRunWorkflow & Specification.RunTaskRunWorkflow; - return getLifecycleHook('RunTaskRunWorkflow')?.normalize?.(copy) || copy; + const copy = new RunTaskRunWorkflow(this as any) as RunTaskRunWorkflowIntersection; + return getLifecycleHooks('RunTaskRunWorkflow')?.normalize?.(copy) || copy; } } -export const _RunTaskRunWorkflow = RunTaskRunWorkflow as { - new (model?: Partial): RunTaskRunWorkflow & Specification.RunTaskRunWorkflow; -}; +export const _RunTaskRunWorkflow = RunTaskRunWorkflow as RunTaskRunWorkflowConstructor; diff --git a/src/lib/generated/classes/run-task-run.ts b/src/lib/generated/classes/run-task-run.ts index 03f3918e..2a7fceaa 100644 --- a/src/lib/generated/classes/run-task-run.ts +++ b/src/lib/generated/classes/run-task-run.ts @@ -25,11 +25,33 @@ import { _RunTaskRunShell } from './run-task-run-shell'; import { _RunTaskRunWorkflow } from './run-task-run-workflow'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class RunTaskRun extends ObjectHydrator { +/** + * Represents the intersection between the RunTaskRun class and type + */ +export type RunTaskRunIntersection = RunTaskRun & Specification.RunTaskRun; + +/** + * Represents a constructor for the intersection of the RunTaskRun class and type + */ +export interface RunTaskRunConstructor { + new (model?: Partial): RunTaskRunIntersection; +} + +/** + * Represents a RunTaskRun with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RunTaskRun extends ObjectHydrator { + /** + * Instanciates a new instance of the RunTaskRun class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RunTaskRun. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.RunTaskRun & object; @@ -41,22 +63,28 @@ class RunTaskRun extends ObjectHydrator { if (typeof model.workflow === 'object') self.workflow = new _RunTaskRunWorkflow(model.workflow as Specification.RunTaskRunWorkflow); } - getLifecycleHook('RunTaskRun')?.constructor?.(this); + getLifecycleHooks('RunTaskRun')?.constructor?.(this); } + /** + * Validates the current instance of the RunTaskRun. + * Throws if invalid. + */ validate() { - const copy = new RunTaskRun(this as any) as RunTaskRun & Specification.RunTaskRun; - getLifecycleHook('RunTaskRun')?.preValidation?.(copy); - validate('RunTaskRun', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('RunTaskRun')?.postValidation?.(copy); + const copy = new RunTaskRun(this as any) as RunTaskRunIntersection; + validate('RunTaskRun', copy); } + /** + * Normalizes the current instance of the RunTaskRun. + * Creates a copy of the RunTaskRun, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RunTaskRun instance. + */ normalize(): RunTaskRun & Specification.RunTaskRun { - const copy = new RunTaskRun(this as any) as RunTaskRun & Specification.RunTaskRun; - return getLifecycleHook('RunTaskRun')?.normalize?.(copy) || copy; + const copy = new RunTaskRun(this as any) as RunTaskRunIntersection; + return getLifecycleHooks('RunTaskRun')?.normalize?.(copy) || copy; } } -export const _RunTaskRun = RunTaskRun as { - new (model?: Partial): RunTaskRun & Specification.RunTaskRun; -}; +export const _RunTaskRun = RunTaskRun as RunTaskRunConstructor; diff --git a/src/lib/generated/classes/run-task.ts b/src/lib/generated/classes/run-task.ts index a7ad9125..e4945747 100644 --- a/src/lib/generated/classes/run-task.ts +++ b/src/lib/generated/classes/run-task.ts @@ -26,11 +26,33 @@ import { _Export } from './export'; import { _Timeout } from './timeout'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class RunTask extends _TaskBase { +/** + * Represents the intersection between the RunTask class and type + */ +export type RunTaskIntersection = RunTask & Specification.RunTask; + +/** + * Represents a constructor for the intersection of the RunTask class and type + */ +export interface RunTaskConstructor { + new (model?: Partial): RunTaskIntersection; +} + +/** + * Represents a RunTask with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RunTask extends _TaskBase { + /** + * Instanciates a new instance of the RunTask class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RunTask. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.RunTask & object; @@ -40,22 +62,28 @@ class RunTask extends _TaskBase { if (typeof model.export === 'object') self.export = new _Export(model.export); if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); } - getLifecycleHook('RunTask')?.constructor?.(this); + getLifecycleHooks('RunTask')?.constructor?.(this); } + /** + * Validates the current instance of the RunTask. + * Throws if invalid. + */ validate() { - const copy = new RunTask(this as any) as RunTask & Specification.RunTask; - getLifecycleHook('RunTask')?.preValidation?.(copy); - validate('RunTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('RunTask')?.postValidation?.(copy); + const copy = new RunTask(this as any) as RunTaskIntersection; + validate('RunTask', copy); } + /** + * Normalizes the current instance of the RunTask. + * Creates a copy of the RunTask, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RunTask instance. + */ normalize(): RunTask & Specification.RunTask { - const copy = new RunTask(this as any) as RunTask & Specification.RunTask; - return getLifecycleHook('RunTask')?.normalize?.(copy) || copy; + const copy = new RunTask(this as any) as RunTaskIntersection; + return getLifecycleHooks('RunTask')?.normalize?.(copy) || copy; } } -export const _RunTask = RunTask as { - new (model?: Partial): RunTask & Specification.RunTask; -}; +export const _RunTask = RunTask as RunTaskConstructor; diff --git a/src/lib/generated/classes/schedule.ts b/src/lib/generated/classes/schedule.ts index 2e659a51..3d9a4bc4 100644 --- a/src/lib/generated/classes/schedule.ts +++ b/src/lib/generated/classes/schedule.ts @@ -23,11 +23,33 @@ import { _Duration } from './duration'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class Schedule extends ObjectHydrator { +/** + * Represents the intersection between the Schedule class and type + */ +export type ScheduleIntersection = Schedule & Specification.Schedule; + +/** + * Represents a constructor for the intersection of the Schedule class and type + */ +export interface ScheduleConstructor { + new (model?: Partial): ScheduleIntersection; +} + +/** + * Represents a Schedule with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Schedule extends ObjectHydrator { + /** + * Instanciates a new instance of the Schedule class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Schedule. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.Schedule & object; @@ -35,22 +57,28 @@ class Schedule extends ObjectHydrator { if (typeof model.every === 'object') self.every = new _Duration(model.every); if (typeof model.after === 'object') self.after = new _Duration(model.after); } - getLifecycleHook('Schedule')?.constructor?.(this); + getLifecycleHooks('Schedule')?.constructor?.(this); } + /** + * Validates the current instance of the Schedule. + * Throws if invalid. + */ validate() { - const copy = new Schedule(this as any) as Schedule & Specification.Schedule; - getLifecycleHook('Schedule')?.preValidation?.(copy); - validate('Schedule', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('Schedule')?.postValidation?.(copy); + const copy = new Schedule(this as any) as ScheduleIntersection; + validate('Schedule', copy); } + /** + * Normalizes the current instance of the Schedule. + * Creates a copy of the Schedule, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Schedule instance. + */ normalize(): Schedule & Specification.Schedule { - const copy = new Schedule(this as any) as Schedule & Specification.Schedule; - return getLifecycleHook('Schedule')?.normalize?.(copy) || copy; + const copy = new Schedule(this as any) as ScheduleIntersection; + return getLifecycleHooks('Schedule')?.normalize?.(copy) || copy; } } -export const _Schedule = Schedule as { - new (model?: Partial): Schedule & Specification.Schedule; -}; +export const _Schedule = Schedule as ScheduleConstructor; diff --git a/src/lib/generated/classes/schema.ts b/src/lib/generated/classes/schema.ts index 155aa00d..6c88ad7b 100644 --- a/src/lib/generated/classes/schema.ts +++ b/src/lib/generated/classes/schema.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class Schema extends ObjectHydrator { +/** + * Represents the intersection between the Schema class and type + */ +export type SchemaIntersection = Schema & Specification.Schema; + +/** + * Represents a constructor for the intersection of the Schema class and type + */ +export interface SchemaConstructor { + new (model?: Partial): SchemaIntersection; +} + +/** + * Represents a Schema with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Schema extends ObjectHydrator { + /** + * Instanciates a new instance of the Schema class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Schema. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('Schema')?.constructor?.(this); + getLifecycleHooks('Schema')?.constructor?.(this); } + /** + * Validates the current instance of the Schema. + * Throws if invalid. + */ validate() { - const copy = new Schema(this as any) as Schema & Specification.Schema; - getLifecycleHook('Schema')?.preValidation?.(copy); - validate('Schema', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('Schema')?.postValidation?.(copy); + const copy = new Schema(this as any) as SchemaIntersection; + validate('Schema', copy); } + /** + * Normalizes the current instance of the Schema. + * Creates a copy of the Schema, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Schema instance. + */ normalize(): Schema & Specification.Schema { - const copy = new Schema(this as any) as Schema & Specification.Schema; - return getLifecycleHook('Schema')?.normalize?.(copy) || copy; + const copy = new Schema(this as any) as SchemaIntersection; + return getLifecycleHooks('Schema')?.normalize?.(copy) || copy; } } -export const _Schema = Schema as { - new (model?: Partial): Schema & Specification.Schema; -}; +export const _Schema = Schema as SchemaConstructor; diff --git a/src/lib/generated/classes/set-task-set.ts b/src/lib/generated/classes/set-task-set.ts index d96dff8f..dd494903 100644 --- a/src/lib/generated/classes/set-task-set.ts +++ b/src/lib/generated/classes/set-task-set.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class SetTaskSet extends ObjectHydrator { +/** + * Represents the intersection between the SetTaskSet class and type + */ +export type SetTaskSetIntersection = SetTaskSet & Specification.SetTaskSet; + +/** + * Represents a constructor for the intersection of the SetTaskSet class and type + */ +export interface SetTaskSetConstructor { + new (model?: Partial): SetTaskSetIntersection; +} + +/** + * Represents a SetTaskSet with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class SetTaskSet extends ObjectHydrator { + /** + * Instanciates a new instance of the SetTaskSet class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the SetTaskSet. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('SetTaskSet')?.constructor?.(this); + getLifecycleHooks('SetTaskSet')?.constructor?.(this); } + /** + * Validates the current instance of the SetTaskSet. + * Throws if invalid. + */ validate() { - const copy = new SetTaskSet(this as any) as SetTaskSet & Specification.SetTaskSet; - getLifecycleHook('SetTaskSet')?.preValidation?.(copy); - validate('SetTaskSet', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('SetTaskSet')?.postValidation?.(copy); + const copy = new SetTaskSet(this as any) as SetTaskSetIntersection; + validate('SetTaskSet', copy); } + /** + * Normalizes the current instance of the SetTaskSet. + * Creates a copy of the SetTaskSet, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the SetTaskSet instance. + */ normalize(): SetTaskSet & Specification.SetTaskSet { - const copy = new SetTaskSet(this as any) as SetTaskSet & Specification.SetTaskSet; - return getLifecycleHook('SetTaskSet')?.normalize?.(copy) || copy; + const copy = new SetTaskSet(this as any) as SetTaskSetIntersection; + return getLifecycleHooks('SetTaskSet')?.normalize?.(copy) || copy; } } -export const _SetTaskSet = SetTaskSet as { - new (model?: Partial): SetTaskSet & Specification.SetTaskSet; -}; +export const _SetTaskSet = SetTaskSet as SetTaskSetConstructor; diff --git a/src/lib/generated/classes/set-task.ts b/src/lib/generated/classes/set-task.ts index c9187c10..a82a6b1b 100644 --- a/src/lib/generated/classes/set-task.ts +++ b/src/lib/generated/classes/set-task.ts @@ -27,11 +27,33 @@ import { _Timeout } from './timeout'; import { _SetTaskSet } from './set-task-set'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class SetTask extends _TaskBase { +/** + * Represents the intersection between the SetTask class and type + */ +export type SetTaskIntersection = SetTask & Specification.SetTask; + +/** + * Represents a constructor for the intersection of the SetTask class and type + */ +export interface SetTaskConstructor { + new (model?: Partial): SetTaskIntersection; +} + +/** + * Represents a SetTask with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class SetTask extends _TaskBase { + /** + * Instanciates a new instance of the SetTask class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the SetTask. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.SetTask & object; @@ -42,22 +64,28 @@ class SetTask extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.set === 'object') self.set = new _SetTaskSet(model.set); } - getLifecycleHook('SetTask')?.constructor?.(this); + getLifecycleHooks('SetTask')?.constructor?.(this); } + /** + * Validates the current instance of the SetTask. + * Throws if invalid. + */ validate() { - const copy = new SetTask(this as any) as SetTask & Specification.SetTask; - getLifecycleHook('SetTask')?.preValidation?.(copy); - validate('SetTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('SetTask')?.postValidation?.(copy); + const copy = new SetTask(this as any) as SetTaskIntersection; + validate('SetTask', copy); } + /** + * Normalizes the current instance of the SetTask. + * Creates a copy of the SetTask, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the SetTask instance. + */ normalize(): SetTask & Specification.SetTask { - const copy = new SetTask(this as any) as SetTask & Specification.SetTask; - return getLifecycleHook('SetTask')?.normalize?.(copy) || copy; + const copy = new SetTask(this as any) as SetTaskIntersection; + return getLifecycleHooks('SetTask')?.normalize?.(copy) || copy; } } -export const _SetTask = SetTask as { - new (model?: Partial): SetTask & Specification.SetTask; -}; +export const _SetTask = SetTask as SetTaskConstructor; diff --git a/src/lib/generated/classes/switch-task-switch-case.ts b/src/lib/generated/classes/switch-task-switch-case.ts index b8420aed..8ee28cdd 100644 --- a/src/lib/generated/classes/switch-task-switch-case.ts +++ b/src/lib/generated/classes/switch-task-switch-case.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class SwitchTaskSwitchCase extends ObjectHydrator { +/** + * Represents the intersection between the SwitchTaskSwitchCase class and type + */ +export type SwitchTaskSwitchCaseIntersection = SwitchTaskSwitchCase & Specification.SwitchTaskSwitchCase; + +/** + * Represents a constructor for the intersection of the SwitchTaskSwitchCase class and type + */ +export interface SwitchTaskSwitchCaseConstructor { + new (model?: Partial): SwitchTaskSwitchCaseIntersection; +} + +/** + * Represents a SwitchTaskSwitchCase with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class SwitchTaskSwitchCase extends ObjectHydrator { + /** + * Instanciates a new instance of the SwitchTaskSwitchCase class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the SwitchTaskSwitchCase. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('SwitchTaskSwitchCase')?.constructor?.(this); + getLifecycleHooks('SwitchTaskSwitchCase')?.constructor?.(this); } + /** + * Validates the current instance of the SwitchTaskSwitchCase. + * Throws if invalid. + */ validate() { - const copy = new SwitchTaskSwitchCase(this as any) as SwitchTaskSwitchCase & Specification.SwitchTaskSwitchCase; - getLifecycleHook('SwitchTaskSwitchCase')?.preValidation?.(copy); - validate('SwitchTaskSwitchCase', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('SwitchTaskSwitchCase')?.postValidation?.(copy); + const copy = new SwitchTaskSwitchCase(this as any) as SwitchTaskSwitchCaseIntersection; + validate('SwitchTaskSwitchCase', copy); } + /** + * Normalizes the current instance of the SwitchTaskSwitchCase. + * Creates a copy of the SwitchTaskSwitchCase, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the SwitchTaskSwitchCase instance. + */ normalize(): SwitchTaskSwitchCase & Specification.SwitchTaskSwitchCase { - const copy = new SwitchTaskSwitchCase(this as any) as SwitchTaskSwitchCase & Specification.SwitchTaskSwitchCase; - return getLifecycleHook('SwitchTaskSwitchCase')?.normalize?.(copy) || copy; + const copy = new SwitchTaskSwitchCase(this as any) as SwitchTaskSwitchCaseIntersection; + return getLifecycleHooks('SwitchTaskSwitchCase')?.normalize?.(copy) || copy; } } -export const _SwitchTaskSwitchCase = SwitchTaskSwitchCase as { - new (model?: Partial): SwitchTaskSwitchCase & Specification.SwitchTaskSwitchCase; -}; +export const _SwitchTaskSwitchCase = SwitchTaskSwitchCase as SwitchTaskSwitchCaseConstructor; diff --git a/src/lib/generated/classes/switch-task-switch.ts b/src/lib/generated/classes/switch-task-switch.ts index f757afcf..ffe23bea 100644 --- a/src/lib/generated/classes/switch-task-switch.ts +++ b/src/lib/generated/classes/switch-task-switch.ts @@ -23,11 +23,19 @@ import { _SwitchTaskSwitchCase } from './switch-task-switch-case'; import { Specification } from '../definitions'; import { ArrayHydrator } from '../../hydrator'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class SwitchTaskSwitch extends ArrayHydrator<{ [k: string]: Specification.SwitchTaskSwitchCase }> { +/** + * Represents a collection of { [k: string]: Specification.SwitchTaskSwitchCase; }. + * Inherits from ArrayHydrator to handle array-specific hydration. + */ +export class SwitchTaskSwitch extends ArrayHydrator<{ [k: string]: Specification.SwitchTaskSwitchCase }> { + /** + * Constructs a new instance of the SwitchTaskSwitch class. + * + * @param model - Optional parameter which can be an array of objects or a number representing the array length. + */ constructor(model?: Array<{ [k: string]: Specification.SwitchTaskSwitchCase }> | number) { super(model); if (Array.isArray(model)) { @@ -41,19 +49,27 @@ class SwitchTaskSwitch extends ArrayHydrator<{ [k: string]: Specification.Switch } } Object.setPrototypeOf(this, Object.create(SwitchTaskSwitch.prototype)); - getLifecycleHook('SwitchTaskSwitch')?.constructor?.(this); + getLifecycleHooks('SwitchTaskSwitch')?.constructor?.(this); } + /** + * Validates the current instance of the SwitchTaskSwitch. + * Throws if invalid. + */ validate() { const copy = new SwitchTaskSwitch(this); - getLifecycleHook('SwitchTaskSwitch')?.preValidation?.(copy); - validate('SwitchTaskSwitch', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('SwitchTaskSwitch')?.postValidation?.(copy); + validate('SwitchTaskSwitch', copy); } + /** + * Normalizes the current instance of the SwitchTaskSwitch. + * Creates a copy of the SwitchTaskSwitch, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the SwitchTaskSwitch instance. + */ normalize(): SwitchTaskSwitch { const copy = new SwitchTaskSwitch(this); - return getLifecycleHook('SwitchTaskSwitch')?.normalize?.(copy) || copy; + return getLifecycleHooks('SwitchTaskSwitch')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/switch-task.ts b/src/lib/generated/classes/switch-task.ts index edecb91b..12becff0 100644 --- a/src/lib/generated/classes/switch-task.ts +++ b/src/lib/generated/classes/switch-task.ts @@ -27,11 +27,33 @@ import { _Timeout } from './timeout'; import { _SwitchTaskSwitch } from './switch-task-switch'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class SwitchTask extends _TaskBase { +/** + * Represents the intersection between the SwitchTask class and type + */ +export type SwitchTaskIntersection = SwitchTask & Specification.SwitchTask; + +/** + * Represents a constructor for the intersection of the SwitchTask class and type + */ +export interface SwitchTaskConstructor { + new (model?: Partial): SwitchTaskIntersection; +} + +/** + * Represents a SwitchTask with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class SwitchTask extends _TaskBase { + /** + * Instanciates a new instance of the SwitchTask class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the SwitchTask. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.SwitchTask & object; @@ -43,22 +65,28 @@ class SwitchTask extends _TaskBase { if (typeof model.switch === 'object') self.switch = new _SwitchTaskSwitch(model.switch) as unknown as Specification.SwitchTaskSwitch; } - getLifecycleHook('SwitchTask')?.constructor?.(this); + getLifecycleHooks('SwitchTask')?.constructor?.(this); } + /** + * Validates the current instance of the SwitchTask. + * Throws if invalid. + */ validate() { - const copy = new SwitchTask(this as any) as SwitchTask & Specification.SwitchTask; - getLifecycleHook('SwitchTask')?.preValidation?.(copy); - validate('SwitchTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('SwitchTask')?.postValidation?.(copy); + const copy = new SwitchTask(this as any) as SwitchTaskIntersection; + validate('SwitchTask', copy); } + /** + * Normalizes the current instance of the SwitchTask. + * Creates a copy of the SwitchTask, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the SwitchTask instance. + */ normalize(): SwitchTask & Specification.SwitchTask { - const copy = new SwitchTask(this as any) as SwitchTask & Specification.SwitchTask; - return getLifecycleHook('SwitchTask')?.normalize?.(copy) || copy; + const copy = new SwitchTask(this as any) as SwitchTaskIntersection; + return getLifecycleHooks('SwitchTask')?.normalize?.(copy) || copy; } } -export const _SwitchTask = SwitchTask as { - new (model?: Partial): SwitchTask & Specification.SwitchTask; -}; +export const _SwitchTask = SwitchTask as SwitchTaskConstructor; diff --git a/src/lib/generated/classes/task-base.ts b/src/lib/generated/classes/task-base.ts index 69200c11..5059c163 100644 --- a/src/lib/generated/classes/task-base.ts +++ b/src/lib/generated/classes/task-base.ts @@ -26,11 +26,33 @@ import { _Export } from './export'; import { _Timeout } from './timeout'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class TaskBase extends ObjectHydrator { +/** + * Represents the intersection between the TaskBase class and type + */ +export type TaskBaseIntersection = TaskBase & Specification.TaskBase; + +/** + * Represents a constructor for the intersection of the TaskBase class and type + */ +export interface TaskBaseConstructor { + new (model?: Partial): TaskBaseIntersection; +} + +/** + * Represents a TaskBase with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class TaskBase extends ObjectHydrator { + /** + * Instanciates a new instance of the TaskBase class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the TaskBase. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.TaskBase & object; @@ -40,22 +62,28 @@ class TaskBase extends ObjectHydrator { if (typeof model.export === 'object') self.export = new _Export(model.export); if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); } - getLifecycleHook('TaskBase')?.constructor?.(this); + getLifecycleHooks('TaskBase')?.constructor?.(this); } + /** + * Validates the current instance of the TaskBase. + * Throws if invalid. + */ validate() { - const copy = new TaskBase(this as any) as TaskBase & Specification.TaskBase; - getLifecycleHook('TaskBase')?.preValidation?.(copy); - validate('TaskBase', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('TaskBase')?.postValidation?.(copy); + const copy = new TaskBase(this as any) as TaskBaseIntersection; + validate('TaskBase', copy); } + /** + * Normalizes the current instance of the TaskBase. + * Creates a copy of the TaskBase, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the TaskBase instance. + */ normalize(): TaskBase & Specification.TaskBase { - const copy = new TaskBase(this as any) as TaskBase & Specification.TaskBase; - return getLifecycleHook('TaskBase')?.normalize?.(copy) || copy; + const copy = new TaskBase(this as any) as TaskBaseIntersection; + return getLifecycleHooks('TaskBase')?.normalize?.(copy) || copy; } } -export const _TaskBase = TaskBase as { - new (model?: Partial): TaskBase & Specification.TaskBase; -}; +export const _TaskBase = TaskBase as TaskBaseConstructor; diff --git a/src/lib/generated/classes/task-list.ts b/src/lib/generated/classes/task-list.ts index 99a5ba64..36fe5c36 100644 --- a/src/lib/generated/classes/task-list.ts +++ b/src/lib/generated/classes/task-list.ts @@ -23,11 +23,19 @@ import { _Task } from './task'; import { Specification } from '../definitions'; import { ArrayHydrator } from '../../hydrator'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class TaskList extends ArrayHydrator<{ [k: string]: Specification.Task }> { +/** + * Represents a collection of { [k: string]: Specification.Task; }. + * Inherits from ArrayHydrator to handle array-specific hydration. + */ +export class TaskList extends ArrayHydrator<{ [k: string]: Specification.Task }> { + /** + * Constructs a new instance of the TaskList class. + * + * @param model - Optional parameter which can be an array of objects or a number representing the array length. + */ constructor(model?: Array<{ [k: string]: Specification.Task }> | number) { super(model); if (Array.isArray(model)) { @@ -39,19 +47,27 @@ class TaskList extends ArrayHydrator<{ [k: string]: Specification.Task }> { } } Object.setPrototypeOf(this, Object.create(TaskList.prototype)); - getLifecycleHook('TaskList')?.constructor?.(this); + getLifecycleHooks('TaskList')?.constructor?.(this); } + /** + * Validates the current instance of the TaskList. + * Throws if invalid. + */ validate() { const copy = new TaskList(this); - getLifecycleHook('TaskList')?.preValidation?.(copy); - validate('TaskList', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('TaskList')?.postValidation?.(copy); + validate('TaskList', copy); } + /** + * Normalizes the current instance of the TaskList. + * Creates a copy of the TaskList, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the TaskList instance. + */ normalize(): TaskList { const copy = new TaskList(this); - return getLifecycleHook('TaskList')?.normalize?.(copy) || copy; + return getLifecycleHooks('TaskList')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/task.ts b/src/lib/generated/classes/task.ts index d12eadd1..40d09f67 100644 --- a/src/lib/generated/classes/task.ts +++ b/src/lib/generated/classes/task.ts @@ -36,11 +36,33 @@ import { _TryTaskCatch } from './try-task-catch'; import { _Duration } from './duration'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class Task extends ObjectHydrator { +/** + * Represents the intersection between the Task class and type + */ +export type TaskIntersection = Task & Specification.Task; + +/** + * Represents a constructor for the intersection of the Task class and type + */ +export interface TaskConstructor { + new (model?: Partial): TaskIntersection; +} + +/** + * Represents a Task with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Task extends ObjectHydrator { + /** + * Instanciates a new instance of the Task class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Task. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.Task & object; @@ -65,22 +87,28 @@ class Task extends ObjectHydrator { if (typeof model.catch === 'object') self.catch = new _TryTaskCatch(model.catch as Specification.TryTaskCatch); if (typeof model.wait === 'object') self.wait = new _Duration(model.wait as Specification.Duration); } - getLifecycleHook('Task')?.constructor?.(this); + getLifecycleHooks('Task')?.constructor?.(this); } + /** + * Validates the current instance of the Task. + * Throws if invalid. + */ validate() { - const copy = new Task(this as any) as Task & Specification.Task; - getLifecycleHook('Task')?.preValidation?.(copy); - validate('Task', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('Task')?.postValidation?.(copy); + const copy = new Task(this as any) as TaskIntersection; + validate('Task', copy); } + /** + * Normalizes the current instance of the Task. + * Creates a copy of the Task, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Task instance. + */ normalize(): Task & Specification.Task { - const copy = new Task(this as any) as Task & Specification.Task; - return getLifecycleHook('Task')?.normalize?.(copy) || copy; + const copy = new Task(this as any) as TaskIntersection; + return getLifecycleHooks('Task')?.normalize?.(copy) || copy; } } -export const _Task = Task as { - new (model?: Partial): Task & Specification.Task; -}; +export const _Task = Task as TaskConstructor; diff --git a/src/lib/generated/classes/timeout.ts b/src/lib/generated/classes/timeout.ts index 8e0204a7..1fca623a 100644 --- a/src/lib/generated/classes/timeout.ts +++ b/src/lib/generated/classes/timeout.ts @@ -23,33 +23,61 @@ import { _Duration } from './duration'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class Timeout extends ObjectHydrator { +/** + * Represents the intersection between the Timeout class and type + */ +export type TimeoutIntersection = Timeout & Specification.Timeout; + +/** + * Represents a constructor for the intersection of the Timeout class and type + */ +export interface TimeoutConstructor { + new (model?: Partial): TimeoutIntersection; +} + +/** + * Represents a Timeout with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Timeout extends ObjectHydrator { + /** + * Instanciates a new instance of the Timeout class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Timeout. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.Timeout & object; if (isObject(model)) { if (typeof model.after === 'object') self.after = new _Duration(model.after); } - getLifecycleHook('Timeout')?.constructor?.(this); + getLifecycleHooks('Timeout')?.constructor?.(this); } + /** + * Validates the current instance of the Timeout. + * Throws if invalid. + */ validate() { - const copy = new Timeout(this as any) as Timeout & Specification.Timeout; - getLifecycleHook('Timeout')?.preValidation?.(copy); - validate('Timeout', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('Timeout')?.postValidation?.(copy); + const copy = new Timeout(this as any) as TimeoutIntersection; + validate('Timeout', copy); } + /** + * Normalizes the current instance of the Timeout. + * Creates a copy of the Timeout, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Timeout instance. + */ normalize(): Timeout & Specification.Timeout { - const copy = new Timeout(this as any) as Timeout & Specification.Timeout; - return getLifecycleHook('Timeout')?.normalize?.(copy) || copy; + const copy = new Timeout(this as any) as TimeoutIntersection; + return getLifecycleHooks('Timeout')?.normalize?.(copy) || copy; } } -export const _Timeout = Timeout as { - new (model?: Partial): Timeout & Specification.Timeout; -}; +export const _Timeout = Timeout as TimeoutConstructor; diff --git a/src/lib/generated/classes/try-task-catch.ts b/src/lib/generated/classes/try-task-catch.ts index fed85256..0a121aa7 100644 --- a/src/lib/generated/classes/try-task-catch.ts +++ b/src/lib/generated/classes/try-task-catch.ts @@ -24,11 +24,33 @@ import { _RetryPolicy } from './retry-policy'; import { _TaskList } from './task-list'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class TryTaskCatch extends ObjectHydrator { +/** + * Represents the intersection between the TryTaskCatch class and type + */ +export type TryTaskCatchIntersection = TryTaskCatch & Specification.TryTaskCatch; + +/** + * Represents a constructor for the intersection of the TryTaskCatch class and type + */ +export interface TryTaskCatchConstructor { + new (model?: Partial): TryTaskCatchIntersection; +} + +/** + * Represents a TryTaskCatch with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class TryTaskCatch extends ObjectHydrator { + /** + * Instanciates a new instance of the TryTaskCatch class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the TryTaskCatch. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.TryTaskCatch & object; @@ -36,22 +58,28 @@ class TryTaskCatch extends ObjectHydrator { if (typeof model.retry === 'object') self.retry = new _RetryPolicy(model.retry); if (typeof model.do === 'object') self.do = new _TaskList(model.do); } - getLifecycleHook('TryTaskCatch')?.constructor?.(this); + getLifecycleHooks('TryTaskCatch')?.constructor?.(this); } + /** + * Validates the current instance of the TryTaskCatch. + * Throws if invalid. + */ validate() { - const copy = new TryTaskCatch(this as any) as TryTaskCatch & Specification.TryTaskCatch; - getLifecycleHook('TryTaskCatch')?.preValidation?.(copy); - validate('TryTaskCatch', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('TryTaskCatch')?.postValidation?.(copy); + const copy = new TryTaskCatch(this as any) as TryTaskCatchIntersection; + validate('TryTaskCatch', copy); } + /** + * Normalizes the current instance of the TryTaskCatch. + * Creates a copy of the TryTaskCatch, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the TryTaskCatch instance. + */ normalize(): TryTaskCatch & Specification.TryTaskCatch { - const copy = new TryTaskCatch(this as any) as TryTaskCatch & Specification.TryTaskCatch; - return getLifecycleHook('TryTaskCatch')?.normalize?.(copy) || copy; + const copy = new TryTaskCatch(this as any) as TryTaskCatchIntersection; + return getLifecycleHooks('TryTaskCatch')?.normalize?.(copy) || copy; } } -export const _TryTaskCatch = TryTaskCatch as { - new (model?: Partial): TryTaskCatch & Specification.TryTaskCatch; -}; +export const _TryTaskCatch = TryTaskCatch as TryTaskCatchConstructor; diff --git a/src/lib/generated/classes/try-task.ts b/src/lib/generated/classes/try-task.ts index 61768a60..c2231e54 100644 --- a/src/lib/generated/classes/try-task.ts +++ b/src/lib/generated/classes/try-task.ts @@ -28,11 +28,33 @@ import { _TaskList } from './task-list'; import { _TryTaskCatch } from './try-task-catch'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class TryTask extends _TaskBase { +/** + * Represents the intersection between the TryTask class and type + */ +export type TryTaskIntersection = TryTask & Specification.TryTask; + +/** + * Represents a constructor for the intersection of the TryTask class and type + */ +export interface TryTaskConstructor { + new (model?: Partial): TryTaskIntersection; +} + +/** + * Represents a TryTask with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class TryTask extends _TaskBase { + /** + * Instanciates a new instance of the TryTask class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the TryTask. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.TryTask & object; @@ -44,22 +66,28 @@ class TryTask extends _TaskBase { if (typeof model.try === 'object') self.try = new _TaskList(model.try); if (typeof model.catch === 'object') self.catch = new _TryTaskCatch(model.catch); } - getLifecycleHook('TryTask')?.constructor?.(this); + getLifecycleHooks('TryTask')?.constructor?.(this); } + /** + * Validates the current instance of the TryTask. + * Throws if invalid. + */ validate() { - const copy = new TryTask(this as any) as TryTask & Specification.TryTask; - getLifecycleHook('TryTask')?.preValidation?.(copy); - validate('TryTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('TryTask')?.postValidation?.(copy); + const copy = new TryTask(this as any) as TryTaskIntersection; + validate('TryTask', copy); } + /** + * Normalizes the current instance of the TryTask. + * Creates a copy of the TryTask, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the TryTask instance. + */ normalize(): TryTask & Specification.TryTask { - const copy = new TryTask(this as any) as TryTask & Specification.TryTask; - return getLifecycleHook('TryTask')?.normalize?.(copy) || copy; + const copy = new TryTask(this as any) as TryTaskIntersection; + return getLifecycleHooks('TryTask')?.normalize?.(copy) || copy; } } -export const _TryTask = TryTask as { - new (model?: Partial): TryTask & Specification.TryTask; -}; +export const _TryTask = TryTask as TryTaskConstructor; diff --git a/src/lib/generated/classes/use-authentications.ts b/src/lib/generated/classes/use-authentications.ts index c49e4d79..99b4c6b5 100644 --- a/src/lib/generated/classes/use-authentications.ts +++ b/src/lib/generated/classes/use-authentications.ts @@ -22,30 +22,57 @@ import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class UseAuthentications extends ObjectHydrator { +/** + * Represents the intersection between the UseAuthentications class and type + */ +export type UseAuthenticationsIntersection = UseAuthentications & Specification.UseAuthentications; + +/** + * Represents a constructor for the intersection of the UseAuthentications class and type + */ +export interface UseAuthenticationsConstructor { + new (model?: Partial): UseAuthenticationsIntersection; +} + +/** + * Represents a UseAuthentications with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class UseAuthentications extends ObjectHydrator { + /** + * Instanciates a new instance of the UseAuthentications class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the UseAuthentications. + */ constructor(model?: Partial) { super(model); - getLifecycleHook('UseAuthentications')?.constructor?.(this); + getLifecycleHooks('UseAuthentications')?.constructor?.(this); } + /** + * Validates the current instance of the UseAuthentications. + * Throws if invalid. + */ validate() { - const copy = new UseAuthentications(this as any) as UseAuthentications & Specification.UseAuthentications; - getLifecycleHook('UseAuthentications')?.preValidation?.(copy); - validate('UseAuthentications', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('UseAuthentications')?.postValidation?.(copy); + const copy = new UseAuthentications(this as any) as UseAuthenticationsIntersection; + validate('UseAuthentications', copy); } + /** + * Normalizes the current instance of the UseAuthentications. + * Creates a copy of the UseAuthentications, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the UseAuthentications instance. + */ normalize(): UseAuthentications & Specification.UseAuthentications { - const copy = new UseAuthentications(this as any) as UseAuthentications & Specification.UseAuthentications; - return getLifecycleHook('UseAuthentications')?.normalize?.(copy) || copy; + const copy = new UseAuthentications(this as any) as UseAuthenticationsIntersection; + return getLifecycleHooks('UseAuthentications')?.normalize?.(copy) || copy; } } -export const _UseAuthentications = UseAuthentications as { - new (model?: Partial): UseAuthentications & Specification.UseAuthentications; -}; +export const _UseAuthentications = UseAuthentications as UseAuthenticationsConstructor; diff --git a/src/lib/generated/classes/use-errors.ts b/src/lib/generated/classes/use-errors.ts index 3db20397..983aec2a 100644 --- a/src/lib/generated/classes/use-errors.ts +++ b/src/lib/generated/classes/use-errors.ts @@ -23,11 +23,33 @@ import { _Error } from './error'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class UseErrors extends ObjectHydrator { +/** + * Represents the intersection between the UseErrors class and type + */ +export type UseErrorsIntersection = UseErrors & Specification.UseErrors; + +/** + * Represents a constructor for the intersection of the UseErrors class and type + */ +export interface UseErrorsConstructor { + new (model?: Partial): UseErrorsIntersection; +} + +/** + * Represents a UseErrors with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class UseErrors extends ObjectHydrator { + /** + * Instanciates a new instance of the UseErrors class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the UseErrors. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.UseErrors & object; @@ -39,22 +61,28 @@ class UseErrors extends ObjectHydrator { self[key] = new _Error(value); }); } - getLifecycleHook('UseErrors')?.constructor?.(this); + getLifecycleHooks('UseErrors')?.constructor?.(this); } + /** + * Validates the current instance of the UseErrors. + * Throws if invalid. + */ validate() { - const copy = new UseErrors(this as any) as UseErrors & Specification.UseErrors; - getLifecycleHook('UseErrors')?.preValidation?.(copy); - validate('UseErrors', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('UseErrors')?.postValidation?.(copy); + const copy = new UseErrors(this as any) as UseErrorsIntersection; + validate('UseErrors', copy); } + /** + * Normalizes the current instance of the UseErrors. + * Creates a copy of the UseErrors, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the UseErrors instance. + */ normalize(): UseErrors & Specification.UseErrors { - const copy = new UseErrors(this as any) as UseErrors & Specification.UseErrors; - return getLifecycleHook('UseErrors')?.normalize?.(copy) || copy; + const copy = new UseErrors(this as any) as UseErrorsIntersection; + return getLifecycleHooks('UseErrors')?.normalize?.(copy) || copy; } } -export const _UseErrors = UseErrors as { - new (model?: Partial): UseErrors & Specification.UseErrors; -}; +export const _UseErrors = UseErrors as UseErrorsConstructor; diff --git a/src/lib/generated/classes/use-extensions.ts b/src/lib/generated/classes/use-extensions.ts index 149b1631..485985ae 100644 --- a/src/lib/generated/classes/use-extensions.ts +++ b/src/lib/generated/classes/use-extensions.ts @@ -23,11 +23,19 @@ import { _Extension } from './extension'; import { Specification } from '../definitions'; import { ArrayHydrator } from '../../hydrator'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class UseExtensions extends ArrayHydrator<{ [k: string]: Specification.Extension }> { +/** + * Represents a collection of { [k: string]: Specification.Extension; }. + * Inherits from ArrayHydrator to handle array-specific hydration. + */ +export class UseExtensions extends ArrayHydrator<{ [k: string]: Specification.Extension }> { + /** + * Constructs a new instance of the UseExtensions class. + * + * @param model - Optional parameter which can be an array of objects or a number representing the array length. + */ constructor(model?: Array<{ [k: string]: Specification.Extension }> | number) { super(model); if (Array.isArray(model)) { @@ -39,19 +47,27 @@ class UseExtensions extends ArrayHydrator<{ [k: string]: Specification.Extension } } Object.setPrototypeOf(this, Object.create(UseExtensions.prototype)); - getLifecycleHook('UseExtensions')?.constructor?.(this); + getLifecycleHooks('UseExtensions')?.constructor?.(this); } + /** + * Validates the current instance of the UseExtensions. + * Throws if invalid. + */ validate() { const copy = new UseExtensions(this); - getLifecycleHook('UseExtensions')?.preValidation?.(copy); - validate('UseExtensions', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('UseExtensions')?.postValidation?.(copy); + validate('UseExtensions', copy); } + /** + * Normalizes the current instance of the UseExtensions. + * Creates a copy of the UseExtensions, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the UseExtensions instance. + */ normalize(): UseExtensions { const copy = new UseExtensions(this); - return getLifecycleHook('UseExtensions')?.normalize?.(copy) || copy; + return getLifecycleHooks('UseExtensions')?.normalize?.(copy) || copy; } } diff --git a/src/lib/generated/classes/use-functions.ts b/src/lib/generated/classes/use-functions.ts index 6dd8f564..75325f70 100644 --- a/src/lib/generated/classes/use-functions.ts +++ b/src/lib/generated/classes/use-functions.ts @@ -23,11 +23,33 @@ import { _Task } from './task'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class UseFunctions extends ObjectHydrator { +/** + * Represents the intersection between the UseFunctions class and type + */ +export type UseFunctionsIntersection = UseFunctions & Specification.UseFunctions; + +/** + * Represents a constructor for the intersection of the UseFunctions class and type + */ +export interface UseFunctionsConstructor { + new (model?: Partial): UseFunctionsIntersection; +} + +/** + * Represents a UseFunctions with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class UseFunctions extends ObjectHydrator { + /** + * Instanciates a new instance of the UseFunctions class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the UseFunctions. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.UseFunctions & object; @@ -39,22 +61,28 @@ class UseFunctions extends ObjectHydrator { self[key] = new _Task(value); }); } - getLifecycleHook('UseFunctions')?.constructor?.(this); + getLifecycleHooks('UseFunctions')?.constructor?.(this); } + /** + * Validates the current instance of the UseFunctions. + * Throws if invalid. + */ validate() { - const copy = new UseFunctions(this as any) as UseFunctions & Specification.UseFunctions; - getLifecycleHook('UseFunctions')?.preValidation?.(copy); - validate('UseFunctions', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('UseFunctions')?.postValidation?.(copy); + const copy = new UseFunctions(this as any) as UseFunctionsIntersection; + validate('UseFunctions', copy); } + /** + * Normalizes the current instance of the UseFunctions. + * Creates a copy of the UseFunctions, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the UseFunctions instance. + */ normalize(): UseFunctions & Specification.UseFunctions { - const copy = new UseFunctions(this as any) as UseFunctions & Specification.UseFunctions; - return getLifecycleHook('UseFunctions')?.normalize?.(copy) || copy; + const copy = new UseFunctions(this as any) as UseFunctionsIntersection; + return getLifecycleHooks('UseFunctions')?.normalize?.(copy) || copy; } } -export const _UseFunctions = UseFunctions as { - new (model?: Partial): UseFunctions & Specification.UseFunctions; -}; +export const _UseFunctions = UseFunctions as UseFunctionsConstructor; diff --git a/src/lib/generated/classes/use-retries.ts b/src/lib/generated/classes/use-retries.ts index f91b5b24..05d2c657 100644 --- a/src/lib/generated/classes/use-retries.ts +++ b/src/lib/generated/classes/use-retries.ts @@ -23,11 +23,33 @@ import { _RetryPolicy } from './retry-policy'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class UseRetries extends ObjectHydrator { +/** + * Represents the intersection between the UseRetries class and type + */ +export type UseRetriesIntersection = UseRetries & Specification.UseRetries; + +/** + * Represents a constructor for the intersection of the UseRetries class and type + */ +export interface UseRetriesConstructor { + new (model?: Partial): UseRetriesIntersection; +} + +/** + * Represents a UseRetries with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class UseRetries extends ObjectHydrator { + /** + * Instanciates a new instance of the UseRetries class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the UseRetries. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.UseRetries & object; @@ -39,22 +61,28 @@ class UseRetries extends ObjectHydrator { self[key] = new _RetryPolicy(value); }); } - getLifecycleHook('UseRetries')?.constructor?.(this); + getLifecycleHooks('UseRetries')?.constructor?.(this); } + /** + * Validates the current instance of the UseRetries. + * Throws if invalid. + */ validate() { - const copy = new UseRetries(this as any) as UseRetries & Specification.UseRetries; - getLifecycleHook('UseRetries')?.preValidation?.(copy); - validate('UseRetries', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('UseRetries')?.postValidation?.(copy); + const copy = new UseRetries(this as any) as UseRetriesIntersection; + validate('UseRetries', copy); } + /** + * Normalizes the current instance of the UseRetries. + * Creates a copy of the UseRetries, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the UseRetries instance. + */ normalize(): UseRetries & Specification.UseRetries { - const copy = new UseRetries(this as any) as UseRetries & Specification.UseRetries; - return getLifecycleHook('UseRetries')?.normalize?.(copy) || copy; + const copy = new UseRetries(this as any) as UseRetriesIntersection; + return getLifecycleHooks('UseRetries')?.normalize?.(copy) || copy; } } -export const _UseRetries = UseRetries as { - new (model?: Partial): UseRetries & Specification.UseRetries; -}; +export const _UseRetries = UseRetries as UseRetriesConstructor; diff --git a/src/lib/generated/classes/use.ts b/src/lib/generated/classes/use.ts index e1cf5529..9e43524d 100644 --- a/src/lib/generated/classes/use.ts +++ b/src/lib/generated/classes/use.ts @@ -27,11 +27,33 @@ import { _UseFunctions } from './use-functions'; import { _UseRetries } from './use-retries'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class Use extends ObjectHydrator { +/** + * Represents the intersection between the Use class and type + */ +export type UseIntersection = Use & Specification.Use; + +/** + * Represents a constructor for the intersection of the Use class and type + */ +export interface UseConstructor { + new (model?: Partial): UseIntersection; +} + +/** + * Represents a Use with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Use extends ObjectHydrator { + /** + * Instanciates a new instance of the Use class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Use. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.Use & object; @@ -43,22 +65,28 @@ class Use extends ObjectHydrator { if (typeof model.functions === 'object') self.functions = new _UseFunctions(model.functions); if (typeof model.retries === 'object') self.retries = new _UseRetries(model.retries); } - getLifecycleHook('Use')?.constructor?.(this); + getLifecycleHooks('Use')?.constructor?.(this); } + /** + * Validates the current instance of the Use. + * Throws if invalid. + */ validate() { - const copy = new Use(this as any) as Use & Specification.Use; - getLifecycleHook('Use')?.preValidation?.(copy); - validate('Use', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('Use')?.postValidation?.(copy); + const copy = new Use(this as any) as UseIntersection; + validate('Use', copy); } + /** + * Normalizes the current instance of the Use. + * Creates a copy of the Use, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Use instance. + */ normalize(): Use & Specification.Use { - const copy = new Use(this as any) as Use & Specification.Use; - return getLifecycleHook('Use')?.normalize?.(copy) || copy; + const copy = new Use(this as any) as UseIntersection; + return getLifecycleHooks('Use')?.normalize?.(copy) || copy; } } -export const _Use = Use as { - new (model?: Partial): Use & Specification.Use; -}; +export const _Use = Use as UseConstructor; diff --git a/src/lib/generated/classes/wait-task.ts b/src/lib/generated/classes/wait-task.ts index b3241bdb..72a7e18e 100644 --- a/src/lib/generated/classes/wait-task.ts +++ b/src/lib/generated/classes/wait-task.ts @@ -27,11 +27,33 @@ import { _Timeout } from './timeout'; import { _Duration } from './duration'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; -class WaitTask extends _TaskBase { +/** + * Represents the intersection between the WaitTask class and type + */ +export type WaitTaskIntersection = WaitTask & Specification.WaitTask; + +/** + * Represents a constructor for the intersection of the WaitTask class and type + */ +export interface WaitTaskConstructor { + new (model?: Partial): WaitTaskIntersection; +} + +/** + * Represents a WaitTask with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class WaitTask extends _TaskBase { + /** + * Instanciates a new instance of the WaitTask class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the WaitTask. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.WaitTask & object; @@ -42,22 +64,28 @@ class WaitTask extends _TaskBase { if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); if (typeof model.wait === 'object') self.wait = new _Duration(model.wait); } - getLifecycleHook('WaitTask')?.constructor?.(this); + getLifecycleHooks('WaitTask')?.constructor?.(this); } + /** + * Validates the current instance of the WaitTask. + * Throws if invalid. + */ validate() { - const copy = new WaitTask(this as any) as WaitTask & Specification.WaitTask; - getLifecycleHook('WaitTask')?.preValidation?.(copy); - validate('WaitTask', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('WaitTask')?.postValidation?.(copy); + const copy = new WaitTask(this as any) as WaitTaskIntersection; + validate('WaitTask', copy); } + /** + * Normalizes the current instance of the WaitTask. + * Creates a copy of the WaitTask, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the WaitTask instance. + */ normalize(): WaitTask & Specification.WaitTask { - const copy = new WaitTask(this as any) as WaitTask & Specification.WaitTask; - return getLifecycleHook('WaitTask')?.normalize?.(copy) || copy; + const copy = new WaitTask(this as any) as WaitTaskIntersection; + return getLifecycleHooks('WaitTask')?.normalize?.(copy) || copy; } } -export const _WaitTask = WaitTask as { - new (model?: Partial): WaitTask & Specification.WaitTask; -}; +export const _WaitTask = WaitTask as WaitTaskConstructor; diff --git a/src/lib/generated/classes/workflow.ts b/src/lib/generated/classes/workflow.ts index 71ca11a1..62c5b56e 100644 --- a/src/lib/generated/classes/workflow.ts +++ b/src/lib/generated/classes/workflow.ts @@ -29,11 +29,34 @@ import { _Output } from './output'; import { _Schedule } from './schedule'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy, isObject } from '../../utils'; +import { isObject } from '../../utils'; +import * as yaml from 'js-yaml'; -class Workflow extends ObjectHydrator { +/** + * Represents the intersection between the Workflow class and type + */ +export type WorkflowIntersection = Workflow & Specification.Workflow; + +/** + * Represents a constructor for the intersection of the Workflow class and type + */ +export interface WorkflowConstructor { + new (model?: Partial): WorkflowIntersection; +} + +/** + * Represents a Workflow with methods for validation normalization, and serialization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Workflow extends ObjectHydrator { + /** + * Instanciates a new instance of the Workflow class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Workflow. + */ constructor(model?: Partial) { super(model); const self = this as unknown as Specification.Workflow & object; @@ -46,22 +69,75 @@ class Workflow extends ObjectHydrator { if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.schedule === 'object') self.schedule = new _Schedule(model.schedule); } - getLifecycleHook('Workflow')?.constructor?.(this); + getLifecycleHooks('Workflow')?.constructor?.(this); } + /** + * Validates the current instance of the Workflow. + * Throws if invalid. + */ validate() { - const copy = new Workflow(this as any) as Workflow & Specification.Workflow; - getLifecycleHook('Workflow')?.preValidation?.(copy); - validate('Workflow', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('Workflow')?.postValidation?.(copy); + const copy = new Workflow(this as any) as WorkflowIntersection; + validate('Workflow', copy); } + /** + * Normalizes the current instance of the Workflow. + * Creates a copy of the Workflow, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Workflow instance. + */ normalize(): Workflow & Specification.Workflow { - const copy = new Workflow(this as any) as Workflow & Specification.Workflow; - return getLifecycleHook('Workflow')?.normalize?.(copy) || copy; + const copy = new Workflow(this as any) as WorkflowIntersection; + return getLifecycleHooks('Workflow')?.normalize?.(copy) || copy; + } + + static deserialize(text: string): WorkflowIntersection { + const model = yaml.load(text) as Partial; + getLifecycleHooks('Workflow')?.preValidation?.(model); + validate('Workflow', model); + getLifecycleHooks('Workflow')?.postValidation?.(model); + return new Workflow(model) as WorkflowIntersection; + } + + static serialize( + workflow: WorkflowIntersection, + format: 'yaml' | 'json' = 'yaml', + normalize: boolean = true, + ): string { + workflow.validate(); + const model = normalize ? workflow.normalize() : workflow; + if (format === 'json') { + return JSON.stringify(model); + } + return yaml.dump(model); + } + + /** + * Serializes the workflow to YAML or JSON + * @param format The format, 'yaml' or 'json', default is 'yaml' + * @param normalize If the workflow should be normalized before serialization, default true + * @returns A string representation of the workflow + */ + serialize(format: 'yaml' | 'json' = 'yaml', normalize: boolean = true): string { + return Workflow.serialize(this as unknown as WorkflowIntersection, format, normalize); } } -export const _Workflow = Workflow as { - new (model?: Partial): Workflow & Specification.Workflow; +export const _Workflow = Workflow as WorkflowConstructor & { + /** + * Deserializes the provided string as a Workflow + * @param text The YAML or JSON representation of a workflow + * @returns A new Workflow instance + */ + deserialize(text: string): WorkflowIntersection; + + /** + * Serializes the provided Workflow to YAML or JSON + * @param workflow The workflow to serialize + * @param format The format, 'yaml' or 'json', default is 'yaml' + * @param normalize If the workflow should be normalized before serialization, default true + * @returns A string representation of the workflow + */ + serialize(workflow: WorkflowIntersection, format?: 'yaml' | 'json', normalize?: boolean): string; }; diff --git a/src/lib/hooks/index.ts b/src/lib/hooks/index.ts new file mode 100644 index 00000000..4d11de67 --- /dev/null +++ b/src/lib/hooks/index.ts @@ -0,0 +1 @@ +export * from './workflow-hooks'; diff --git a/src/lib/hooks/workflow-hooks.ts b/src/lib/hooks/workflow-hooks.ts new file mode 100644 index 00000000..7cb819ea --- /dev/null +++ b/src/lib/hooks/workflow-hooks.ts @@ -0,0 +1,31 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { LifecycleHooks } from '../lifecycle-hooks'; +import { Specification } from '../generated/definitions'; + +import { schemaVersion } from '../../../package.json'; + +export const WorkflowHooks = { + preValidation(instance) { + if (instance?.document?.dsl !== schemaVersion) { + throw new Error( + `'Workflow' is invalid - The DSL version of the workflow '${instance?.document?.dsl}' doesn't match the supported version of the SDK '${schemaVersion}'.`, + ); + } + return; + }, +} as LifecycleHooks; diff --git a/src/lib/lifecycle-hooks.ts b/src/lib/lifecycle-hooks.ts index 79218493..a2c3b5f8 100644 --- a/src/lib/lifecycle-hooks.ts +++ b/src/lib/lifecycle-hooks.ts @@ -15,43 +15,56 @@ * */ +import { WorkflowHooks } from './hooks'; + /** * Represents the possible lifecycle hooks of an instance */ -export type LifecycleHook = { +export type LifecycleHooks = { /** * The hook called at the end of the constructor * @param instance The instance being initialized */ - constructor?: (instance: T) => void; + constructor?: (instance: T) => void; /** * The hook called before the validation * @param instance A copy instance being validated */ - preValidation?: (instance: T) => void; + preValidation?: (instance: T) => void; /** * The hook called after the validation * @param instance A copy instance being validated */ - postValidation?: (instance: T) => void; + postValidation?: (instance: T) => void; /** * The hook called to normalized the instance * @param instance A copy of the instance to normalize * @returns The normalized instance */ - normalize?: (instance: T) => T; + normalize?: (instance: T) => T; }; /** * A mapping of type names and their lifecycle hooks */ -const registeredHooks: Map = new Map(); +const registeredHooks: Map> = new Map>(); + +/** + * The function used to register hooks + * @param typeName The name of the type to register the hooks for + * @param hooks The hooks to register + */ +export const registerHooks = (typeName: string, hooks: LifecycleHooks): void => { + registeredHooks.set(typeName, hooks); +}; /** * Gets the lifecylce hook for the provided type, if any * @param typeName The type to get the lifecycle hook for * @returns The lifecycle hook, if any */ -export const getLifecycleHook = (typeName: string): LifecycleHook | undefined => { +export const getLifecycleHooks = (typeName: string): LifecycleHooks | undefined => { return registeredHooks.get(typeName); }; + +registerHooks('Workflow', WorkflowHooks); diff --git a/src/lib/validation.ts b/src/lib/validation.ts index cdaa745b..6c63630a 100644 --- a/src/lib/validation.ts +++ b/src/lib/validation.ts @@ -19,6 +19,8 @@ import Ajv, { ValidateFunction } from 'ajv/dist/2020'; import addFormats from 'ajv-formats'; import workflowSchema from './generated/schema/workflow.json'; import { validationPointers } from './generated/validation'; +import { deepCopy } from './utils'; +import { getLifecycleHooks } from './lifecycle-hooks'; const ajv = new Ajv({ schemas: [workflowSchema], @@ -42,15 +44,16 @@ const validators: Map = new Map(typeName: string, data: T): boolean => { +export const validate = (typeName: string, data: T) => { + getLifecycleHooks(typeName)?.preValidation?.(data); const validateFn: ValidateFunction | undefined = validators.get(typeName); if (!validateFn) { throw Error(`Unable to find a validation function for '${typeName}'`); } - if (!validateFn(data)) { - // can mutate the input data! + // prevents possible data mutation and invalid "additional properties" from the classes like constructor/validate/normalize + if (!validateFn(deepCopy(data))) { throw new Error( `'${typeName}' is invalid: ${validateFn.errors?.reduce((acc, error) => acc + `- ${error.instancePath} | ${error.schemaPath} | ${error.message} | ${JSON.stringify(error.params)}\n`, '') ?? ''} @@ -58,5 +61,5 @@ ${validateFn.errors?.reduce((acc, error) => acc + `- ${error.instancePath} | ${e data: ${JSON.stringify(data, null, 4)}`, ); } - return true; + getLifecycleHooks(typeName)?.postValidation?.(data); }; diff --git a/src/serverless-workflow-sdk.ts b/src/serverless-workflow-sdk.ts new file mode 100644 index 00000000..35497532 --- /dev/null +++ b/src/serverless-workflow-sdk.ts @@ -0,0 +1,4 @@ +export * from './lib/generated/builders'; +export * from './lib/generated/classes'; +export * from './lib/generated/definitions'; +export * from './lib/validation'; diff --git a/tests/builders/call-http-builder.spec.ts b/tests/builders/call-http-builder.spec.ts index 9391c444..67fd2e54 100644 --- a/tests/builders/call-http-builder.spec.ts +++ b/tests/builders/call-http-builder.spec.ts @@ -22,7 +22,6 @@ describe('CallHTTP builder', () => { const endpoint = 'https://serverlessworkflow.io'; const method = 'get'; const callHttp = callHTTPBuilder() - .call('http') // should be set by the CallHTTP class .with({ endpoint, method, @@ -40,7 +39,6 @@ describe('CallHTTP builder', () => { const endpoint = 'https://serverlessworkflow.io'; const method = 'get'; const data = { - call: 'http' as const, with: { endpoint, method, @@ -55,7 +53,7 @@ describe('CallHTTP builder', () => { expect(callHttp.with!.method).toBe(method); }); - it('should validate', () => { + it('should throw when invalid', () => { const test = () => { callHTTPBuilder().build(); }; @@ -63,7 +61,7 @@ describe('CallHTTP builder', () => { expect(test).toThrow(/'CallHTTP' is invalid/); }); - it('should not validate', () => { + it('should not throw when validation is disabled', () => { const test = () => { callHTTPBuilder().build({ validate: false }); }; diff --git a/tests/builders/use-extensions-builder.spec.ts b/tests/builders/use-extensions-builder.spec.ts index 13c91bab..f10cb94f 100644 --- a/tests/builders/use-extensions-builder.spec.ts +++ b/tests/builders/use-extensions-builder.spec.ts @@ -52,7 +52,7 @@ describe('UseExtensions builder', () => { expect(test).toThrow('The provided model should be an array'); }); - it('should validate', () => { + it('should throw when invalid', () => { const test = () => { useExtensionsBuilder([1, 2, 3] as any).build(); }; @@ -60,7 +60,7 @@ describe('UseExtensions builder', () => { expect(test).toThrow(/'UseExtensions' is invalid/); }); - it('should not validate', () => { + it('should not throw when validation is disabled', () => { const test = () => { useExtensionsBuilder([1, 2, 3] as any).build({ validate: false }); }; diff --git a/tests/builders/workflow-builder.spec.ts b/tests/builders/workflow-builder.spec.ts new file mode 100644 index 00000000..272cc0fd --- /dev/null +++ b/tests/builders/workflow-builder.spec.ts @@ -0,0 +1,75 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +import { documentBuilder, setTaskBuilder, taskListBuilder, workflowBuilder } from '../../src/lib/generated/builders'; +import { Classes } from '../../src/lib/generated/classes'; + +import { schemaVersion } from '../../package.json'; + +describe('Workflow builder', () => { + it('should build with fluent api', () => { + const workflow = workflowBuilder() + .document(documentBuilder().dsl(schemaVersion).name('test').version('1.0.0').namespace('default').build()) + .do( + taskListBuilder() + .push({ + step1: setTaskBuilder().set({ foo: 'bar' }).build(), + }) + .build(), + ) + .build(); + expect(workflow).toBeDefined(); + expect(workflow).toBeInstanceOf(Classes.Workflow); + }); + + it('should build with input', () => { + const data = { + document: { + dsl: schemaVersion, + name: 'test', + version: '1.0.0', + namespace: 'default', + }, + do: [ + { + step1: { + set: { + foo: 'bar', + }, + }, + }, + ], + }; + const workflow = workflowBuilder(data).build(); + expect(workflow).toBeDefined(); + expect(workflow).toBeInstanceOf(Classes.Workflow); + }); + + it('should throw when invalid', () => { + const test = () => { + workflowBuilder().build(); + }; + expect(test).toThrow(Error); + expect(test).toThrow(/'Workflow' is invalid/); + }); + + it('should not throw when validation is disabled', () => { + const test = () => { + workflowBuilder().build({ validate: false }); + }; + expect(test).not.toThrow(); + }); +}); diff --git a/tests/classes/workflow.spec.ts b/tests/classes/workflow.spec.ts index 6c7c3bc3..5a5fe2e3 100644 --- a/tests/classes/workflow.spec.ts +++ b/tests/classes/workflow.spec.ts @@ -17,6 +17,7 @@ import { type } from 'ts-inference-check'; import { Classes } from '../../src/lib/generated/classes'; import { Specification } from '../../src/lib/generated/definitions'; +//import { schemaVersion } from '../../package.json'; describe('Workflow class', () => { it('should be an instance of Workflow', () => { diff --git a/tests/serialization/workflow-serialization.spec.ts b/tests/serialization/workflow-serialization.spec.ts new file mode 100644 index 00000000..09d53937 --- /dev/null +++ b/tests/serialization/workflow-serialization.spec.ts @@ -0,0 +1,94 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import { Specification } from '../../src/lib/generated/definitions'; +import { Classes } from '../../src/lib/generated/classes'; + +import { schemaVersion } from '../../package.json'; + +describe('Workflow (de)serialization', () => { + it('should deserialize JSON', () => { + const data: Specification.Workflow = { + document: { + dsl: schemaVersion, + name: 'test', + version: '1.0.0', + namespace: 'default', + }, + do: [ + { + step1: { + set: { + foo: 'bar', + }, + }, + }, + ], + }; + const dataJson = JSON.stringify(data); + const workflow = Classes.Workflow.deserialize(dataJson); + expect(workflow).toBeInstanceOf(Classes.Workflow); + }); + + it('should serialize as JSON from static method', () => { + const data: Specification.Workflow = { + document: { + dsl: schemaVersion, + name: 'test', + version: '1.0.0', + namespace: 'default', + }, + do: [ + { + step1: { + set: { + foo: 'bar', + }, + }, + }, + ], + }; + const workflow = new Classes.Workflow(data); + const expected = JSON.stringify(data); + const serialized = Classes.Workflow.serialize(workflow, 'json'); + expect(serialized).toEqual(expected); + }); + + it('should serialize as JSON from instance method', () => { + const data: Specification.Workflow = { + document: { + dsl: schemaVersion, + name: 'test', + version: '1.0.0', + namespace: 'default', + }, + do: [ + { + step1: { + set: { + foo: 'bar', + }, + }, + }, + ], + }; + const workflow = new Classes.Workflow(data); + const expected = JSON.stringify(data); + const serialized = workflow.serialize('json'); + expect(serialized).toEqual(expected); + }); +}); diff --git a/tests/validation/workflow-validation.spec.ts b/tests/validation/workflow-validation.spec.ts index 79c45a94..b645ac3f 100644 --- a/tests/validation/workflow-validation.spec.ts +++ b/tests/validation/workflow-validation.spec.ts @@ -14,14 +14,61 @@ * limitations under the License. * */ + import { Classes } from '../../src/lib/generated/classes'; import { validate } from '../../src/lib/validation'; +import { schemaVersion } from '../../package.json'; + describe('Workflow validation', () => { - it('should be invalid', () => { - const workflow = new Classes.Workflow(); + it('should be valid', () => { + const workflow = new Classes.Workflow({ + document: { + dsl: schemaVersion, + name: 'test', + version: '1.0.0', + namespace: 'default', + }, + do: [ + { + step1: { + set: { + foo: 'bar', + }, + }, + }, + ], + }); + const test = () => validate('Workflow', workflow); + expect(test).not.toThrow(Error); + }); + + it('should throw when invalid', () => { + const workflow = new Classes.Workflow({ + document: { + dsl: schemaVersion, + name: 'test', + version: '1.0.0', + namespace: 'default', + }, + }); const test = () => validate('Workflow', workflow); expect(test).toThrow(Error); expect(test).toThrow(/'Workflow' is invalid/); }); + + it('should throw with incompatible DSL version', () => { + const oldVersion = '0.9'; + const workflow = new Classes.Workflow({ + document: { + dsl: oldVersion, + name: 'test', + version: '1.0.0', + namespace: 'default', + }, + }); + expect(() => workflow.validate()).toThrow( + `The DSL version of the workflow '${oldVersion}' doesn't match the supported version of the SDK '${schemaVersion}'.`, + ); + }); }); diff --git a/tools/4_generate-classes.ts b/tools/4_generate-classes.ts index 71261de7..56515ebd 100644 --- a/tools/4_generate-classes.ts +++ b/tools/4_generate-classes.ts @@ -43,11 +43,34 @@ ${inFileDisclaimer} ${hydrationResult.imports.map((type) => `import { _${type} } from './${toKebabCase(normalizeKnownAllCaps(type))}';`).join('\n')} ${baseClass ? `import { _${baseClass} } from './${toKebabCase(normalizeKnownAllCaps(baseClass))}';` : "import { ObjectHydrator } from '../../hydrator';"} import { Specification } from '../definitions'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy${hydrationResult.code ? ', isObject' : ''} } from '../../utils'; +${hydrationResult.code ? `import { isObject } from '../../utils';` : ''} +${name === 'Workflow' ? `import * as yaml from 'js-yaml';` : ''} -class ${name} extends ${baseClass ? '_' + baseClass : `ObjectHydrator`} { +/** + * Represents the intersection between the ${name} class and type + */ +export type ${name}Intersection = ${name} & Specification.${name}; + +/** + * Represents a constructor for the intersection of the ${name} class and type + */ +export interface ${name}Constructor { + new (model?: Partial): ${name}Intersection; +} + +/** + * Represents a ${name} with methods for validation ${name === 'Workflow' ? 'normalization, and serialization.' : 'and normalization.'} + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class ${name} extends ${baseClass ? '_' + baseClass : `ObjectHydrator`} { + /** + * Instanciates a new instance of the ${name} class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the ${name}. + */ constructor(model?: Partial) { super(model); ${ @@ -58,25 +81,82 @@ class ${name} extends ${baseClass ? '_' + baseClass : `ObjectHydrator; + getLifecycleHooks('Workflow')?.preValidation?.(model); + validate('Workflow', model); + getLifecycleHooks('Workflow')?.postValidation?.(model); + return new Workflow(model) as WorkflowIntersection; + } + + static serialize(workflow: WorkflowIntersection, format: 'yaml' | 'json' = 'yaml', normalize: boolean = true): string { + workflow.validate(); + const model = normalize ? workflow.normalize() : workflow; + if (format === 'json') { + return JSON.stringify(model); + } + return yaml.dump(model); + } + + /** + * Serializes the workflow to YAML or JSON + * @param format The format, 'yaml' or 'json', default is 'yaml' + * @param normalize If the workflow should be normalized before serialization, default true + * @returns A string representation of the workflow + */ + serialize(format: 'yaml' | 'json' = 'yaml', normalize: boolean = true): string { + return Workflow.serialize(this as unknown as WorkflowIntersection, format, normalize); + }` + : '' } } -export const _${name} = ${name} as ({ - new (model?: Partial): ${name} & Specification.${name} -});`; +export const _${name} = ${name} as ${name}Constructor${ + name === 'Workflow' + ? `& { + /** + * Deserializes the provided string as a Workflow + * @param text The YAML or JSON representation of a workflow + * @returns A new Workflow instance + */ + deserialize(text: string): WorkflowIntersection; + + /** + * Serializes the provided Workflow to YAML or JSON + * @param workflow The workflow to serialize + * @param format The format, 'yaml' or 'json', default is 'yaml' + * @param normalize If the workflow should be normalized before serialization, default true + * @returns A string representation of the workflow + */ + serialize(workflow: WorkflowIntersection, format?: 'yaml' | 'json', normalize?: boolean): string +}` + : '' + };`; } /** @@ -93,30 +173,46 @@ ${inFileDisclaimer} ${hydrationResult.imports.map((type) => `import { _${type} } from './${toKebabCase(normalizeKnownAllCaps(type))}';`)} import { Specification } from '../definitions'; import { ArrayHydrator } from '../../hydrator'; -import { getLifecycleHook } from '../../lifecycle-hooks'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; -import { deepCopy } from '../../utils'; -class ${name} extends ArrayHydrator<${arrayTypeName}> { +/** + * Represents a collection of ${arrayTypeName}. + * Inherits from ArrayHydrator to handle array-specific hydration. + */ +export class ${name} extends ArrayHydrator<${arrayTypeName}> { + /** + * Constructs a new instance of the ${name} class. + * + * @param model - Optional parameter which can be an array of objects or a number representing the array length. + */ constructor(model?: Array<${arrayTypeName}> | number) { super(model); if (Array.isArray(model)) { ${hydrationResult.code} } Object.setPrototypeOf(this, Object.create(${name}.prototype)); - getLifecycleHook('${name}')?.constructor?.(this); + getLifecycleHooks('${name}')?.constructor?.(this); } + /** + * Validates the current instance of the ${name}. + * Throws if invalid. + */ validate() { const copy = new ${name}(this); - getLifecycleHook('${name}')?.preValidation?.(copy); - validate('${name}', deepCopy(copy)); // deepCopy prevents potential additional properties error for constructor, validate, normalize - getLifecycleHook('${name}')?.postValidation?.(copy); + validate('${name}', copy); } + /** + * Normalizes the current instance of the ${name}. + * Creates a copy of the ${name}, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the ${name} instance. + */ normalize(): ${name} { const copy = new ${name}(this); - return getLifecycleHook('${name}')?.normalize?.(copy) || copy; + return getLifecycleHooks('${name}')?.normalize?.(copy) || copy; } } @@ -132,7 +228,7 @@ export const _${name} = ${name}; // could be exported directly, but it makes the async function generate(definitionFile: string, destDir: string): Promise { const definitions = await readFile(definitionFile, { encoding: 'utf-8' }); const exportedDeclarations = getExportedDeclarations(definitions); - const aliases = Array.from(exportedDeclarations.keys()); + const aliases = Array.from(exportedDeclarations.keys()).sort((a, b) => a.localeCompare(b)); await reset(destDir); for (const [alias, node] of exportedDeclarations) { const exportedType = node![0].getType(); diff --git a/tools/5_generate-builders.ts b/tools/5_generate-builders.ts index 0540636a..8fde3e8d 100644 --- a/tools/5_generate-builders.ts +++ b/tools/5_generate-builders.ts @@ -98,16 +98,15 @@ export const ${toCamelCase(name)}Builder = (model?: Specification.${name}): Arra /** * Creates the builders index file * @param destDir The builders directory - * @param declarations The list of types to create the index for + * @param aliases The list of types to create the index for * @returns */ -async function createIndex(destDir: string, declarations: string[]): Promise { +async function createIndex(destDir: string, aliases: string[]): Promise { try { const indexCode: string = fileHeader + - declarations.reduce( - (acc, declaration) => - acc + `export * from './${toKebabCase(normalizeKnownAllCaps(declaration)) + '-builder'}';\n`, + aliases.reduce( + (acc, alias) => acc + `export * from './${toKebabCase(normalizeKnownAllCaps(alias)) + '-builder'}';\n`, '', ); const indexFile = path.resolve(destDir, 'index.ts'); @@ -129,7 +128,7 @@ async function generate(definitionFile: string, destDir: string): Promise await reset(destDir); const definitions = await readFile(definitionFile, { encoding: 'utf-8' }); const exportedDeclarations = getExportedDeclarations(definitions); - const aliases = Array.from(exportedDeclarations.keys()); + const aliases = Array.from(exportedDeclarations.keys()).sort((a, b) => a.localeCompare(b)); for (const [alias, node] of exportedDeclarations) { const exportedType = node![0].getType(); let builderDeclaration: string = ''; diff --git a/tools/tmp.ts b/tools/tmp.ts deleted file mode 100644 index 9909d1c3..00000000 --- a/tools/tmp.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* eslint-disable */ -import { definitionsDir } from './utils'; -import * as path from 'path'; -import { promises as fsPromises } from 'fs'; -import { Project, QuoteKind, Type, Node, Symbol, printNode } from 'ts-morph'; -import { getArrayHydration, getObjectHydration } from './reflection'; - -const { readFile, writeFile } = fsPromises; - -const definitionFile = path.resolve(definitionsDir, 'specification.ts'); - -async function test() { - const source = await readFile(definitionFile, { encoding: 'utf-8' }); - const project = new Project({ - useInMemoryFileSystem: true, - manipulationSettings: { - quoteKind: QuoteKind.Single, - }, - compilerOptions: { - strictNullChecks: true, - }, - }); - const sourceFile = project.createSourceFile('declarations.ts', source); - const exportedDeclarations = sourceFile.getExportedDeclarations(); - //var tuples = Array.from(exportedDeclarations).filter(([k, v]) => v[0]!.getType().isTuple()); - //var arrays = Array.from(exportedDeclarations).filter(([k, v]) => v[0]!.getType().isArray()); - // var node = exportedDeclarations.get('ExternalResource')![0]; - // var target = node.getType(); - // var props = getProperties(node, target); - var node = exportedDeclarations.get('AuthenticationPolicyOauth2')![0]; - var target = node.getType(); - var declarations = !target.isArray() ? getObjectHydration(node, target) : getArrayHydration(target); - console.log(declarations.code); -} - -test() - .then(() => console.log('done')) - .catch((err) => console.error(err)); -/* eslint-enable */ From a4a1084cfbd8333014133765217bb3cb8f50aa1c Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Wed, 31 Jul 2024 13:36:59 +0200 Subject: [PATCH 12/24] Fixed github uri Signed-off-by: Jean-Baptiste Bianchi --- README.md | 12 ++++++------ package.json | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7b762ed3..36de0505 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Node CI](https://github.com/serverless-workflow/sdk/workflows/Node%20CI/badge.svg) [![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/serverless-workflow/sdk) +![Node CI](https://github.com/serverlessworkflow/sdk-typescript/workflows/Node%20CI/badge.svg) [![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/serverlessworkflow/sdk-typescript) # Serverless Workflow Specification - TypeScript SDK @@ -14,7 +14,7 @@ The npm [`@serverlessworkflow/sdk`](https://www.npmjs.com/package/@serverlesswor | Latest Releases | Conformance to Spec Version | | :---: | :---: | -| [v1.0.0-alpha2.\*](https://github.com/serverless-workflow/sdk/releases/) | [v1.0.0-alpha2](https://github.com/serverlessworkflow/specification) | +| [v1.0.0-alpha2.\*](https://github.com/serverlessworkflow/sdk-typescript/releases/) | [v1.0.0-alpha2](https://github.com/serverlessworkflow/specification) | > [!WARNING] > Previous versions of the SDK were published with a typo in the scope: @@ -23,9 +23,9 @@ The npm [`@serverlessworkflow/sdk`](https://www.npmjs.com/package/@serverlesswor | Latest Releases | Conformance to Spec Version | | :---: | :---: | -| [v1.0.0](https://github.com/serverless-workflow/sdk/releases/) | [v0.6](https://github.com/serverlessworkflow/specification/tree/0.6.x) | -| [v2.0.0](https://github.com/serverless-workflow/sdk/releases/) | [v0.7](https://github.com/serverlessworkflow/specification/tree/0.7.x) | -| [v3.0.0](https://github.com/serverless-workflow/sdk/releases/) | [v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x) | +| [v1.0.0](https://github.com/serverlessworkflow/sdk-typescript/releases/) | [v0.6](https://github.com/serverlessworkflow/specification/tree/0.6.x) | +| [v2.0.0](https://github.com/serverlessworkflow/sdk-typescript/releases/) | [v0.7](https://github.com/serverlessworkflow/specification/tree/0.7.x) | +| [v3.0.0](https://github.com/serverlessworkflow/sdk-typescript/releases/) | [v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x) | ## SDK Structure This SDK includes the following key components: @@ -240,7 +240,7 @@ catch (ex) { To build the project and run tests locally, use the following commands: ```sh -git clone https://github.com/serverless-workflow/sdk.git +git clone https://github.com/serverlessworkflow/sdk-typescript.git cd sdk-typescript npm install && npm run build && npm run test ``` diff --git a/package.json b/package.json index bdc0531c..ee7910a6 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/serverless-workflow/sdk.git" + "url": "https://github.com/serverlessworkflow/sdk-typescript.git" }, "author": { "name": "Serverless Workflow Contributors", @@ -83,7 +83,7 @@ }, "license": "http://www.apache.org/licenses/LICENSE-2.0.txt", "bugs": { - "url": "https://github.com/serverless-workflow/sdk/issues" + "url": "https://github.com/serverlessworkflow/sdk-typescript/issues" }, "homepage": "https://serverlessworkflow.io", "engines": { From faff52e650ad1479f5a320eb1f02b3897de35d3a Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Thu, 1 Aug 2024 14:53:01 +0200 Subject: [PATCH 13/24] fixed jest-haste-map module naming collision Signed-off-by: Jean-Baptiste Bianchi --- jest.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index d605f1c1..c24ec706 100644 --- a/jest.config.js +++ b/jest.config.js @@ -2,5 +2,6 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', - testPathIgnorePatterns: [".d.ts", ".js"] + testPathIgnorePatterns: [".d.ts", ".js"], + modulePathIgnorePatterns: ['/dist/'], }; \ No newline at end of file From 14e768a180aa68e843f0a46dd249be16eddb8be3 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Tue, 6 Aug 2024 12:39:32 +0200 Subject: [PATCH 14/24] Improved handling of union types when generating classes Prevents accessing a property which is declared in one type but not the other: ``` type A = { p: string; }; type B = { k: number; }; const foo = {} as A | B; foo.p = "bar"; //>Property 'p' does not exist on type 'A | B'. //> Property 'p' does not exist on type 'B'. ``` Signed-off-by: Jean-Baptiste Bianchi --- .../classes/authentication-policy.ts | 28 ++++-- .../call-async-api-with-authentication.ts | 28 ++++-- .../call-grpc-with-service-authentication.ts | 28 ++++-- .../call-open-api-with-authentication.ts | 28 ++++-- src/lib/generated/classes/call-task.ts | 20 +++- .../classes/endpoint-authentication.ts | 28 ++++-- .../classes/event-consumption-strategy.ts | 21 +++- .../external-resource-authentication.ts | 28 ++++-- src/lib/generated/classes/run-task-run.ts | 25 +++-- src/lib/generated/classes/task.ts | 99 +++++++++++++++---- tools/reflection.ts | 57 +++++++---- 11 files changed, 302 insertions(+), 88 deletions(-) diff --git a/src/lib/generated/classes/authentication-policy.ts b/src/lib/generated/classes/authentication-policy.ts index 0cad70f4..19fe078a 100644 --- a/src/lib/generated/classes/authentication-policy.ts +++ b/src/lib/generated/classes/authentication-policy.ts @@ -56,12 +56,28 @@ export class AuthenticationPolicy extends ObjectHydrator { super(model); const self = this as unknown as Specification.CallTask & object; if (isObject(model)) { - if (typeof model.input === 'object') self.input = new _Input(model.input as Specification.Input); - if (typeof model.output === 'object') self.output = new _Output(model.output as Specification.Output); - if (typeof model.export === 'object') self.export = new _Export(model.export as Specification.Export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout as Specification.Timeout); + if (typeof (model as Specification.TaskBase).input === 'object') + (self as Specification.TaskBase).input = new _Input( + (model as Specification.TaskBase).input as Specification.Input, + ); + if (typeof (model as Specification.TaskBase).output === 'object') + (self as Specification.TaskBase).output = new _Output( + (model as Specification.TaskBase).output as Specification.Output, + ); + if (typeof (model as Specification.TaskBase).export === 'object') + (self as Specification.TaskBase).export = new _Export( + (model as Specification.TaskBase).export as Specification.Export, + ); + if (typeof (model as Specification.TaskBase).timeout === 'object') + (self as Specification.TaskBase).timeout = new _Timeout( + (model as Specification.TaskBase).timeout as Specification.Timeout, + ); } getLifecycleHooks('CallTask')?.constructor?.(this); } diff --git a/src/lib/generated/classes/endpoint-authentication.ts b/src/lib/generated/classes/endpoint-authentication.ts index 1dc164c8..e9ff1a3a 100644 --- a/src/lib/generated/classes/endpoint-authentication.ts +++ b/src/lib/generated/classes/endpoint-authentication.ts @@ -56,12 +56,28 @@ export class EndpointAuthentication extends ObjectHydrator { super(model); const self = this as unknown as Specification.RunTaskRun & object; if (isObject(model)) { - if (typeof model.container === 'object') - self.container = new _RunTaskRunContainer(model.container as Specification.RunTaskRunContainer); - if (typeof model.shell === 'object') - self.shell = new _RunTaskRunShell(model.shell as Specification.RunTaskRunShell); - if (typeof model.workflow === 'object') - self.workflow = new _RunTaskRunWorkflow(model.workflow as Specification.RunTaskRunWorkflow); + if ( + typeof (model as { [k: string]: unknown; container: Specification.RunTaskRunContainer }).container === 'object' + ) + (self as { [k: string]: unknown; container: Specification.RunTaskRunContainer }).container = + new _RunTaskRunContainer( + (model as { [k: string]: unknown; container: Specification.RunTaskRunContainer }) + .container as Specification.RunTaskRunContainer, + ); + if (typeof (model as { [k: string]: unknown; shell: Specification.RunTaskRunShell }).shell === 'object') + (self as { [k: string]: unknown; shell: Specification.RunTaskRunShell }).shell = new _RunTaskRunShell( + (model as { [k: string]: unknown; shell: Specification.RunTaskRunShell }) + .shell as Specification.RunTaskRunShell, + ); + if (typeof (model as { [k: string]: unknown; workflow: Specification.RunTaskRunWorkflow }).workflow === 'object') + (self as { [k: string]: unknown; workflow: Specification.RunTaskRunWorkflow }).workflow = + new _RunTaskRunWorkflow( + (model as { [k: string]: unknown; workflow: Specification.RunTaskRunWorkflow }) + .workflow as Specification.RunTaskRunWorkflow, + ); } getLifecycleHooks('RunTaskRun')?.constructor?.(this); } diff --git a/src/lib/generated/classes/task.ts b/src/lib/generated/classes/task.ts index 40d09f67..02682444 100644 --- a/src/lib/generated/classes/task.ts +++ b/src/lib/generated/classes/task.ts @@ -67,25 +67,88 @@ export class Task extends ObjectHydrator { super(model); const self = this as unknown as Specification.Task & object; if (isObject(model)) { - if (typeof model.input === 'object') self.input = new _Input(model.input as Specification.Input); - if (typeof model.output === 'object') self.output = new _Output(model.output as Specification.Output); - if (typeof model.export === 'object') self.export = new _Export(model.export as Specification.Export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout as Specification.Timeout); - if (typeof model.fork === 'object') self.fork = new _ForkTaskFork(model.fork as Specification.ForkTaskFork); - if (typeof model.emit === 'object') self.emit = new _EmitTaskEmit(model.emit as Specification.EmitTaskEmit); - if (typeof model.for === 'object') self.for = new _ForTaskFor(model.for as Specification.ForTaskFor); - if (typeof model.listen === 'object') - self.listen = new _ListenTaskListen(model.listen as Specification.ListenTaskListen); - if (typeof model.raise === 'object') - self.raise = new _RaiseTaskRaise(model.raise as Specification.RaiseTaskRaise); - if (typeof model.set === 'object') self.set = new _SetTaskSet(model.set as Specification.SetTaskSet); - if (typeof model.switch === 'object') - self.switch = new _SwitchTaskSwitch( - model.switch as Specification.SwitchTaskSwitch, + if (typeof (model as Specification.TaskBase).input === 'object') + (self as Specification.TaskBase).input = new _Input( + (model as Specification.TaskBase).input as Specification.Input, + ); + if (typeof (model as Specification.TaskBase).output === 'object') + (self as Specification.TaskBase).output = new _Output( + (model as Specification.TaskBase).output as Specification.Output, + ); + if (typeof (model as Specification.TaskBase).export === 'object') + (self as Specification.TaskBase).export = new _Export( + (model as Specification.TaskBase).export as Specification.Export, + ); + if (typeof (model as Specification.TaskBase).timeout === 'object') + (self as Specification.TaskBase).timeout = new _Timeout( + (model as Specification.TaskBase).timeout as Specification.Timeout, + ); + if (typeof (model as { [k: string]: unknown; fork?: Specification.ForkTaskFork }).fork === 'object') + (self as { [k: string]: unknown; fork?: Specification.ForkTaskFork }).fork = new _ForkTaskFork( + (model as { [k: string]: unknown; fork?: Specification.ForkTaskFork }).fork as Specification.ForkTaskFork, + ); + if (typeof (model as { [k: string]: unknown; emit?: Specification.EmitTaskEmit }).emit === 'object') + (self as { [k: string]: unknown; emit?: Specification.EmitTaskEmit }).emit = new _EmitTaskEmit( + (model as { [k: string]: unknown; emit?: Specification.EmitTaskEmit }).emit as Specification.EmitTaskEmit, + ); + if ( + typeof ( + model as { [k: string]: unknown; for?: Specification.ForTaskFor; while?: string; do?: Specification.TaskList } + ).for === 'object' + ) + ( + self as { [k: string]: unknown; for?: Specification.ForTaskFor; while?: string; do?: Specification.TaskList } + ).for = new _ForTaskFor( + ( + model as { + [k: string]: unknown; + for?: Specification.ForTaskFor; + while?: string; + do?: Specification.TaskList; + } + ).for as Specification.ForTaskFor, + ); + if (typeof (model as { [k: string]: unknown; listen?: Specification.ListenTaskListen }).listen === 'object') + (self as { [k: string]: unknown; listen?: Specification.ListenTaskListen }).listen = new _ListenTaskListen( + (model as { [k: string]: unknown; listen?: Specification.ListenTaskListen }) + .listen as Specification.ListenTaskListen, + ); + if (typeof (model as { [k: string]: unknown; raise?: Specification.RaiseTaskRaise }).raise === 'object') + (self as { [k: string]: unknown; raise?: Specification.RaiseTaskRaise }).raise = new _RaiseTaskRaise( + (model as { [k: string]: unknown; raise?: Specification.RaiseTaskRaise }) + .raise as Specification.RaiseTaskRaise, + ); + if (typeof (model as { [k: string]: unknown; set?: Specification.SetTaskSet }).set === 'object') + (self as { [k: string]: unknown; set?: Specification.SetTaskSet }).set = new _SetTaskSet( + (model as { [k: string]: unknown; set?: Specification.SetTaskSet }).set as Specification.SetTaskSet, + ); + if (typeof (model as { [k: string]: unknown; switch?: Specification.SwitchTaskSwitch }).switch === 'object') + (self as { [k: string]: unknown; switch?: Specification.SwitchTaskSwitch }).switch = new _SwitchTaskSwitch( + (model as { [k: string]: unknown; switch?: Specification.SwitchTaskSwitch }) + .switch as Specification.SwitchTaskSwitch, ) as unknown as Specification.SwitchTaskSwitch; - if (typeof model.try === 'object') self.try = new _TaskList(model.try as Specification.TaskList); - if (typeof model.catch === 'object') self.catch = new _TryTaskCatch(model.catch as Specification.TryTaskCatch); - if (typeof model.wait === 'object') self.wait = new _Duration(model.wait as Specification.Duration); + if ( + typeof (model as { [k: string]: unknown; try?: Specification.TaskList; catch?: Specification.TryTaskCatch }) + .try === 'object' + ) + (self as { [k: string]: unknown; try?: Specification.TaskList; catch?: Specification.TryTaskCatch }).try = + new _TaskList( + (model as { [k: string]: unknown; try?: Specification.TaskList; catch?: Specification.TryTaskCatch }) + .try as Specification.TaskList, + ); + if ( + typeof (model as { [k: string]: unknown; try?: Specification.TaskList; catch?: Specification.TryTaskCatch }) + .catch === 'object' + ) + (self as { [k: string]: unknown; try?: Specification.TaskList; catch?: Specification.TryTaskCatch }).catch = + new _TryTaskCatch( + (model as { [k: string]: unknown; try?: Specification.TaskList; catch?: Specification.TryTaskCatch }) + .catch as Specification.TryTaskCatch, + ); + if (typeof (model as { [k: string]: unknown; wait?: Specification.Duration }).wait === 'object') + (self as { [k: string]: unknown; wait?: Specification.Duration }).wait = new _Duration( + (model as { [k: string]: unknown; wait?: Specification.Duration }).wait as Specification.Duration, + ); } getLifecycleHooks('Task')?.constructor?.(this); } diff --git a/tools/reflection.ts b/tools/reflection.ts index 8512d4a7..df885eb8 100644 --- a/tools/reflection.ts +++ b/tools/reflection.ts @@ -16,6 +16,16 @@ import { ExportedDeclarations, Project, QuoteKind, Type, Symbol as TsMorphSymbol, Node } from 'ts-morph'; +/** + * Maps a property and its the type it's declared into + */ +type PropertyMap = { + /** The declaring type */ + parent: Type; + /** The property symbol */ + property: TsMorphSymbol; +}; + /** * Describes an object property */ @@ -28,6 +38,8 @@ type PropertyInfo = { originalType: Type; /** The original declaration */ originalDeclaration: string; + /** The type the property belongs to */ + parentType: Type; /** True if the property type is anonymous */ isAnonymous: boolean; /** True if the property type has an indexed signature */ @@ -106,7 +118,7 @@ const isValueType = (type: Type): boolean => * @returns The type name */ export const getTypeName = (type: Type, replacement: string = '') => - type.getText().replace('import("/declarations").', replacement); + type.getText().replace(/import\("\/declarations"\)\./g, replacement); /** * Returns the properties of the give type @@ -114,17 +126,19 @@ export const getTypeName = (type: Type, replacement: string = '') => * @param type The type to get the properties from * @returns An array of Symbol for the type's properties */ -const getProperties = (node: Node, type: Type): TsMorphSymbol[] => +const getProperties = (node: Node, type: Type): PropertyMap[] => getUnderlyingTypes(type) .filter((t) => t.isObject()) - .flatMap((t) => t.getProperties()); + .flatMap((t) => t.getProperties().map((p) => ({ parent: t, property: p }))); + /** * Transforms the provided property Symbol to a PropertyInfo * @param property The property to transform - * @param node The node the property belongs to + * @param parent The type the property is declared into + * @param node The root node * @returns The PropertyInfo for the provided property */ -function asPropertyInfo(property: TsMorphSymbol, node: Node): PropertyInfo { +function asPropertyInfo(property: TsMorphSymbol, parent: Type, node: Node): PropertyInfo { const name = property.getName(); const originalType = property.getTypeAtLocation(node).getNonNullableType(); const originalDeclaration = originalType.getText(); @@ -143,6 +157,7 @@ function asPropertyInfo(property: TsMorphSymbol, node: Node): PropertyInfo { isAnonymous, hasIndexedSignature, type: typeTxt, + parentType: parent, }; } @@ -150,17 +165,17 @@ function asPropertyInfo(property: TsMorphSymbol, node: Node): PropertyInfo { * Gets a list of properties that could be hydrated * @param node The node containing the type * @param type The type to get the properties from - * @param properties The type properties + * @param propertiesMap The type properties * @returns An array of hydratable PropertyInfo */ -const getHydratableProperties = (node: Node, type: Type, properties: TsMorphSymbol[]): PropertyInfo[] => - properties - .filter((p) => { - const originalType = p.getTypeAtLocation(node).getNonNullableType(); +const getHydratableProperties = (node: Node, type: Type, propertiesMap: PropertyMap[]): PropertyInfo[] => + propertiesMap + .filter((pMap) => { + const originalType = pMap.property.getTypeAtLocation(node).getNonNullableType(); //debugType(originalType); return !isValueType(originalType); }) - .map((p) => asPropertyInfo(p, node)) + .map((pMap) => asPropertyInfo(pMap.property, pMap.parent, node)) .concat( ...getUnderlyingTypes(type) .map((t) => t.getStringIndexType()) @@ -173,6 +188,7 @@ const getHydratableProperties = (node: Node, type: Type, properties: TsMorphSymb isAnonymous: t.isAnonymous(), hasIndexedSignature: true, type: getTypeName(t), + parentType: t, }); return props; }, [] as PropertyInfo[]), @@ -184,14 +200,14 @@ const getHydratableProperties = (node: Node, type: Type, properties: TsMorphSymb * @param properties The type properties * @returns An array of literal PropertyInfo */ -const getConstantProperties = (node: Node, properties: TsMorphSymbol[]): PropertyInfo[] => +const getConstantProperties = (node: Node, properties: PropertyMap[]): PropertyInfo[] => properties - .filter((p) => { - const originalType = p.getTypeAtLocation(node).getNonNullableType(); + .filter((pMap) => { + const originalType = pMap.property.getTypeAtLocation(node).getNonNullableType(); //debugType(originalType); return originalType.isLiteral() && (!originalType.isUnion() || !originalType.isIntersection()); }) - .map((p) => asPropertyInfo(p, node)); + .map((pMap) => asPropertyInfo(pMap.property, pMap.parent, node)); /** * Gets duplicate values from an array @@ -227,24 +243,27 @@ export function getObjectHydration(node: Node, type: Type): HydrationResult { ...constantProperties.map((prop) => `self.${prop.name} = ${prop.type} as const;`), ...namedProperties.map((prop) => { const propName = !type.isUnion() ? prop.name : `${prop.name} as Specification.${prop.type}`; + const modelCast = !type.isUnion() ? 'model' : `(model as ${getTypeName(prop.parentType, 'Specification.')})`; + const selfCase = !type.isUnion() ? 'self' : `(self as ${getTypeName(prop.parentType, 'Specification.')})`; if (!prop.isAnonymous) { - return `if (typeof model.${prop.name} === 'object') self.${prop.name} = new _${prop.type}(model.${propName}) ${prop.originalType.isTuple() ? `as unknown as Specification.${prop.type}` : ''};`; + return `if (typeof ${modelCast}.${prop.name} === 'object') ${selfCase}.${prop.name} = new _${prop.type}(${modelCast}.${propName}) ${prop.originalType.isTuple() ? `as unknown as Specification.${prop.type}` : ''};`; } if (prop.isAnonymous) { - return `if (typeof model.${prop.name} === 'object') self.${prop.name} = Object.fromEntries( - Object.entries(model.${propName}).map(([key, value]) => [key, new _${prop.type}(value)] ) + return `if (typeof ${modelCast}.${prop.name} === 'object') ${selfCase}.${prop.name} = Object.fromEntries( + Object.entries(${modelCast}.${propName}).map(([key, value]) => [key, new _${prop.type}(value)] ) );`; } }), ].filter((line): line is string => !!line?.trim()); const indexedProperty = hydratableProperties.find((p) => !p.name); if (indexedProperty && !indexedProperty.isAnonymous) { + const selfCase = !type.isUnion() ? 'self' : `(self as ${getTypeName(indexedProperty.parentType)})`; imports.push(indexedProperty.type); lines.push( `const knownProperties: string[] = [${[...constantProperties, ...namedProperties].map((p) => `'${p.name}'`).join(',')}];`, ); lines.push(`Object.entries(model).filter(([key]) => !knownProperties.includes(key)).forEach(([key, value]) => { - self[key] = new _${indexedProperty.type}(value); + ${selfCase}[key] = new _${indexedProperty.type}(value); });`); } const code = lines.join('\n'); From 9d4748c0967e42a6777ac60221a2cac6f3b5a5d8 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Fri, 9 Aug 2024 14:55:10 +0200 Subject: [PATCH 15/24] Fixed hydration for value type arrays and added support for yaml input in the tooling Signed-off-by: Jean-Baptiste Bianchi --- tools/1_download-schemas.ts | 21 +++++++++++---- tools/2_generate-definitions.ts | 35 ++++++++++++++++++++----- tools/3_generate-validation-pointers.ts | 5 ++-- tools/4_generate-classes.ts | 2 +- tools/reflection.ts | 4 ++- tools/utils.ts | 5 +++- 6 files changed, 56 insertions(+), 16 deletions(-) diff --git a/tools/1_download-schemas.ts b/tools/1_download-schemas.ts index 963f0194..f81f6020 100644 --- a/tools/1_download-schemas.ts +++ b/tools/1_download-schemas.ts @@ -17,7 +17,8 @@ import $RefParser from '@apidevtools/json-schema-ref-parser'; import { promises as fsPromises } from 'fs'; import * as path from 'path'; import { URL } from 'url'; -import { schemaDir, reset, schemaUrl } from './utils'; +import { schemaDir, reset, jsonSchemaUrl, yamlSchemaUrl } from './utils'; +import * as yaml from 'js-yaml'; const { writeFile, mkdir } = fsPromises; @@ -29,21 +30,27 @@ const { writeFile, mkdir } = fsPromises; */ const download = async (schemaUrl: URL, destDir: string): Promise => { try { - await reset(destDir); const fileName = path.basename(schemaUrl.pathname); + const isJson = fileName.endsWith('.json'); const urlBase = schemaUrl.href.replace(fileName, ''); const $refParser = new $RefParser(); await $refParser.resolve(schemaUrl.href); const externalSchemas = $refParser.$refs .paths() .filter((p, index, arr) => arr.indexOf(p) === index && p !== schemaUrl.href); - await writeFile(path.resolve(destDir, fileName), JSON.stringify($refParser.schema, null, 2)); + await writeFile( + path.resolve(destDir, fileName), + isJson ? JSON.stringify($refParser.schema, null, 2) : yaml.dump($refParser.schema), + ); externalSchemas.forEach(async (externalSchemaUrl: string) => { const externalSchema = $refParser.$refs.get(externalSchemaUrl); if (externalSchema) { const externalSchemaFileName = externalSchemaUrl.replace(urlBase, ''); await mkdir(path.resolve(destDir, path.dirname(externalSchemaFileName)), { recursive: true }); - await writeFile(path.resolve(destDir, externalSchemaFileName), JSON.stringify(externalSchema, null, 2)); + await writeFile( + path.resolve(destDir, externalSchemaFileName), + isJson ? JSON.stringify(externalSchema, null, 2) : yaml.dump(externalSchema), + ); } }); return Promise.resolve(); @@ -52,4 +59,8 @@ const download = async (schemaUrl: URL, destDir: string): Promise => { } }; -download(schemaUrl, schemaDir).then(console.log.bind(console)).catch(console.error.bind(console)); +reset(schemaDir) + .then(() => download(yamlSchemaUrl, schemaDir)) + .then(() => download(jsonSchemaUrl, schemaDir)) + .then(console.log.bind(console)) + .catch(console.error.bind(console)); diff --git a/tools/2_generate-definitions.ts b/tools/2_generate-definitions.ts index 0bdc8d63..14339032 100644 --- a/tools/2_generate-definitions.ts +++ b/tools/2_generate-definitions.ts @@ -19,6 +19,7 @@ import { promises as fsPromises } from 'fs'; import * as path from 'path'; import { fileHeader, inFileDisclaimer } from './consts'; import { definitionsDir, isObject, reset, schemaDir, toPascalCase } from './utils'; +import * as yaml from 'js-yaml'; const { writeFile, readFile } = fsPromises; @@ -60,6 +61,7 @@ const metadataProperties = ['title', 'description', 'default', 'type']; * Embellishes the provided schema to increase its compatibility with json-schema-to-typescript, the resulting schema should keep the validation properties as the input one (phase 1) * - adds missing type:object properties // not necessary ? * - adds missing titles to objects + * - removes extra titles on value types * @param schema The schema to embellish * @param path The current path of the schema relative to the original schema * @param parentTitle The title of the parent object, if any @@ -74,7 +76,7 @@ function prepareSchema(schema: any, path: string[] = ['#'], parentTitle: string } const newSchema = JSON.parse(JSON.stringify(schema)); const parent = path.slice(-1)[0]; - const schemaKeys = Object.keys(newSchema); + let schemaKeys = Object.keys(newSchema); const isItemWithAdditionalProperties = parent === 'additionalProperties' && path.slice(-2)[0] === 'items' && newSchema.properties; // only "useful" for SwitchTask.Switch.Cases if (!structuralObjectProperties.includes(parent) || isItemWithAdditionalProperties) { @@ -86,6 +88,16 @@ function prepareSchema(schema: any, path: string[] = ['#'], parentTitle: string if (newSchema.title) { parentTitle = newSchema.title; } + if ( + newSchema.title && + newSchema.type && + newSchema.type !== 'object' && + newSchema.type !== 'array' && + newSchema.title != 'RuntimeExpression' // RuntimeExpression is a string but used as its own type, we want to keep its title to build a JSON pointer later + ) { + delete newSchema.title; + schemaKeys = schemaKeys.filter((key) => key === 'title'); + } if ( !newSchema.title && (!newSchema.type || newSchema.type === 'object' || newSchema.type === 'array') && // only naming object or array types @@ -169,8 +181,16 @@ function mutateSchema(schema: any, path: string[] = ['#']): any { */ async function generate(srcFile: string, destFile: string): Promise { const options: Partial = { - customName: (schema: JSONSchema, keyNameFromDefinition: string | undefined) => - schema.$id?.includes('serverlessworkflow.io') ? 'Workflow' : keyNameFromDefinition, + customName: (schema: JSONSchema, keyNameFromDefinition: string | undefined) => { + if (schema.$id?.includes('serverlessworkflow.io')) { + return 'Workflow'; + } + if (keyNameFromDefinition === 'oauth2Token') { + // seems to ignore the title from this object, so forcing it... + return schema.title; + } + return keyNameFromDefinition; + }, bannerComment: `${fileHeader} ${inFileDisclaimer} @@ -181,8 +201,11 @@ ${inFileDisclaimer} //unreachableDefinitions: true, }; const schemaText = await readFile(srcFile, { encoding: 'utf-8' }); - let schema = prepareSchema(JSON.parse(schemaText)); - await writeFile(srcFile.replace('workflow', '__internal_workflow'), JSON.stringify(schema, null, 2)); + let schema = prepareSchema(yaml.load(schemaText)); + await writeFile( + srcFile.replace('workflow', '__internal_workflow').replace('.yaml', '.json'), + JSON.stringify(schema, null, 2).replace('workflow.yaml', 'workflow.json'), + ); schema = mutateSchema(schema); //await writeFile(srcFile.replace('workflow', '__mutated_workflow'), JSON.stringify(schema, null, 2)); const declarations = await compile(schema, 'Workflow', options); @@ -192,7 +215,7 @@ ${inFileDisclaimer} await writeFile(path.resolve(destDir, 'index.ts'), `${fileHeader}export * as Specification from './specification';`); } -const srcFile = path.resolve(schemaDir, 'workflow.json'); +const srcFile = path.resolve(schemaDir, 'workflow.yaml'); const destFile = path.resolve(definitionsDir, 'specification.ts'); generate(srcFile, destFile).then(console.log.bind(console)).catch(console.error.bind(console)); diff --git a/tools/3_generate-validation-pointers.ts b/tools/3_generate-validation-pointers.ts index 978f53c5..c9f7f4cb 100644 --- a/tools/3_generate-validation-pointers.ts +++ b/tools/3_generate-validation-pointers.ts @@ -20,6 +20,7 @@ import { fileHeader, inFileDisclaimer } from './consts'; import { definitionsDir, isObject, reset, schemaDir, vallidationDir } from './utils'; import { JSONSchema } from 'json-schema-to-typescript'; import { getExportedDeclarations } from './reflection'; +import * as yaml from 'js-yaml'; const { writeFile, readFile } = fsPromises; @@ -66,8 +67,8 @@ async function generate(schemaFile: string, definitionFile: string, destFile: st const declarations = Array.from(getExportedDeclarations(definitions).keys()) .filter((name) => name !== 'Workflow') .sort((a, b) => a.localeCompare(b)); - const schema = JSON.parse(schemaTxt) as JSONSchema; - const baseUri = schema.$id + '#'; + const schema = yaml.load(schemaTxt) as JSONSchema; + const baseUri = schema.$id.replace('.yaml', '.json') + '#'; const jsonPointers = [ ['Workflow', baseUri], ...declarations.map((name) => [name, getJsonPointer(schema, name, baseUri)]), diff --git a/tools/4_generate-classes.ts b/tools/4_generate-classes.ts index 56515ebd..7e9ef446 100644 --- a/tools/4_generate-classes.ts +++ b/tools/4_generate-classes.ts @@ -171,7 +171,7 @@ function getArrayLikeClassDeclaration(name: string, arrayTypeName: string, type: ${inFileDisclaimer} ${hydrationResult.imports.map((type) => `import { _${type} } from './${toKebabCase(normalizeKnownAllCaps(type))}';`)} -import { Specification } from '../definitions'; +${hydrationResult.imports.length ? `import { Specification } from '../definitions';` : ''} import { ArrayHydrator } from '../../hydrator'; import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; diff --git a/tools/reflection.ts b/tools/reflection.ts index df885eb8..a37835d0 100644 --- a/tools/reflection.ts +++ b/tools/reflection.ts @@ -282,7 +282,9 @@ export function getArrayHydration(type: Type): HydrationResult { const arrayType = type.getArrayElementType() || getUnderlyingTypes(type)[0]; const lines: string[] = ['if (model?.length) {', 'this.splice(0, this.length);']; const imports: string[] = []; - if (!arrayType.isAnonymous()) { + if (isValueType(arrayType)) { + lines.push(`model.forEach(item => this.push(item));`); + } else if (!arrayType.isAnonymous()) { const typeName = getTypeName(arrayType); imports.push(typeName); lines.push(`model.forEach(item => this.push(new _${typeName}(item)));`); diff --git a/tools/utils.ts b/tools/utils.ts index 2193364a..8978a9c2 100644 --- a/tools/utils.ts +++ b/tools/utils.ts @@ -95,6 +95,9 @@ const argv = yargs(process.argv.slice(2)) }) .parseSync(); /** The URL to download the schema from */ -export const schemaUrl: URL = new URL( +export const yamlSchemaUrl: URL = new URL( + argv.url || `https://serverlessworkflow.io/schemas/${schemaVersion}/workflow.yaml`, +); +export const jsonSchemaUrl: URL = new URL( argv.url || `https://serverlessworkflow.io/schemas/${schemaVersion}/workflow.json`, ); From cf1d42c92e043b93138d99742d72de522c570d2f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Fri, 30 Aug 2024 10:57:29 +0200 Subject: [PATCH 16/24] Fixed custom name function used when generating types Signed-off-by: Jean-Baptiste Bianchi --- package-lock.json | 192 +------------------------------- package.json | 2 +- tools/2_generate-definitions.ts | 8 +- 3 files changed, 7 insertions(+), 195 deletions(-) diff --git a/package-lock.json b/package-lock.json index 78ff0dd7..8eb2a778 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "eslint-plugin-prettier": "^5.1.3", "husky": "^9.0.11", "jest": "^29.7.0", - "json-schema-to-typescript": "^15.0.0", + "json-schema-to-typescript": "^15.0.1", "lint-staged": "^15.2.7", "node-fetch": "^3.3.2", "prettier": "^3.3.3", @@ -1692,12 +1692,6 @@ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, - "node_modules/@types/lodash": { - "version": "4.17.7", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.7.tgz", - "integrity": "sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==", - "dev": true - }, "node_modules/@types/node": { "version": "20.14.10", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.10.tgz", @@ -2415,22 +2409,6 @@ "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==", "dev": true }, - "node_modules/cli-color": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.4.tgz", - "integrity": "sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==", - "dev": true, - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.64", - "es6-iterator": "^2.0.3", - "memoizee": "^0.4.15", - "timers-ext": "^0.1.7" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/cli-cursor": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", @@ -2698,19 +2676,6 @@ "node": ">= 8" } }, - "node_modules/d": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", - "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", - "dev": true, - "dependencies": { - "es5-ext": "^0.10.64", - "type": "^2.7.2" - }, - "engines": { - "node": ">=0.12" - } - }, "node_modules/data-uri-to-buffer": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", @@ -2889,58 +2854,6 @@ "is-arrayish": "^0.2.1" } }, - "node_modules/es5-ext": { - "version": "0.10.64", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", - "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "esniff": "^2.0.1", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "dev": true, - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "node_modules/es6-symbol": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", - "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", - "dev": true, - "dependencies": { - "d": "^1.0.2", - "ext": "^1.7.0" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/es6-weak-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", - "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", - "dev": true, - "dependencies": { - "d": "1", - "es5-ext": "^0.10.46", - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.1" - } - }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -3131,21 +3044,6 @@ "node": "*" } }, - "node_modules/esniff": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", - "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", - "dev": true, - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.62", - "event-emitter": "^0.3.5", - "type": "^2.7.2" - }, - "engines": { - "node": ">=0.10" - } - }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -3224,16 +3122,6 @@ "node": ">=0.10.0" } }, - "node_modules/event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", - "dev": true, - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, "node_modules/eventemitter3": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", @@ -3294,15 +3182,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/ext": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", - "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", - "dev": true, - "dependencies": { - "type": "^2.7.2" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -4028,12 +3907,6 @@ "node": ">=8" } }, - "node_modules/is-promise": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", - "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", - "dev": true - }, "node_modules/is-reference": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", @@ -4865,22 +4738,18 @@ "dev": true }, "node_modules/json-schema-to-typescript": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-15.0.0.tgz", - "integrity": "sha512-gOX3cJB4eL1ztMc3WUh569ubRcKnr8MnYk++6+/WaaN4bufGHSR6EcbUbvLZgirPQOfvni5SSGkRx0pYloYU8A==", + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-15.0.1.tgz", + "integrity": "sha512-gSSg20skxv+ZQqR8Y8itZt+2iYFGNgneuTgf/Va0TBw+zo6JsykDG1bqhkhMs5g/vIdqmZx55oQJLbgOEuxPJw==", "dev": true, "dependencies": { "@apidevtools/json-schema-ref-parser": "^11.5.5", "@types/json-schema": "^7.0.15", - "@types/lodash": "^4.17.0", - "cli-color": "^2.0.4", "glob": "^10.3.12", "is-glob": "^4.0.3", "js-yaml": "^4.1.0", "lodash": "^4.17.21", "minimist": "^1.2.8", - "mkdirp": "^3.0.1", - "node-fetch": "^3.3.2", "prettier": "^3.2.5" }, "bin": { @@ -5423,15 +5292,6 @@ "yallist": "^3.0.2" } }, - "node_modules/lru-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", - "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", - "dev": true, - "dependencies": { - "es5-ext": "~0.10.2" - } - }, "node_modules/magic-string": { "version": "0.30.10", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", @@ -5471,25 +5331,6 @@ "tmpl": "1.0.5" } }, - "node_modules/memoizee": { - "version": "0.4.17", - "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.17.tgz", - "integrity": "sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA==", - "dev": true, - "dependencies": { - "d": "^1.0.2", - "es5-ext": "^0.10.64", - "es6-weak-map": "^2.0.3", - "event-emitter": "^0.3.5", - "is-promise": "^2.2.2", - "lru-queue": "^0.1.0", - "next-tick": "^1.1.0", - "timers-ext": "^0.1.7" - }, - "engines": { - "node": ">=0.12" - } - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -5608,12 +5449,6 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, - "node_modules/next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", - "dev": true - }, "node_modules/node-domexception": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", @@ -7018,19 +6853,6 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, - "node_modules/timers-ext": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.8.tgz", - "integrity": "sha512-wFH7+SEAcKfJpfLPkrgMPvvwnEtj8W4IurvEyrKsDleXnKLCDw71w8jltvfLa8Rm4qQxxT4jmDBYbJG/z7qoww==", - "dev": true, - "dependencies": { - "es5-ext": "^0.10.64", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.12" - } - }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -7183,12 +7005,6 @@ "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", "dev": true }, - "node_modules/type": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.3.tgz", - "integrity": "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==", - "dev": true - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/package.json b/package.json index ee7910a6..a33616a9 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "eslint-plugin-prettier": "^5.1.3", "husky": "^9.0.11", "jest": "^29.7.0", - "json-schema-to-typescript": "^15.0.0", + "json-schema-to-typescript": "^15.0.1", "lint-staged": "^15.2.7", "node-fetch": "^3.3.2", "prettier": "^3.3.3", diff --git a/tools/2_generate-definitions.ts b/tools/2_generate-definitions.ts index 14339032..2de6664b 100644 --- a/tools/2_generate-definitions.ts +++ b/tools/2_generate-definitions.ts @@ -181,15 +181,11 @@ function mutateSchema(schema: any, path: string[] = ['#']): any { */ async function generate(srcFile: string, destFile: string): Promise { const options: Partial = { - customName: (schema: JSONSchema, keyNameFromDefinition: string | undefined) => { + customName: (schema: JSONSchema) /*, keyNameFromDefinition: string | undefined)*/ => { if (schema.$id?.includes('serverlessworkflow.io')) { return 'Workflow'; } - if (keyNameFromDefinition === 'oauth2Token') { - // seems to ignore the title from this object, so forcing it... - return schema.title; - } - return keyNameFromDefinition; + // don't return anything to keep the default behavior }, bannerComment: `${fileHeader} ${inFileDisclaimer} From fe3bbee5300cce9ace1a26c707348ebd7bbd9430 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Wed, 4 Sep 2024 17:10:46 +0200 Subject: [PATCH 17/24] fixed timeout name collision Signed-off-by: Jean-Baptiste Bianchi --- tools/2_generate-definitions.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/2_generate-definitions.ts b/tools/2_generate-definitions.ts index 2de6664b..a0d8b25a 100644 --- a/tools/2_generate-definitions.ts +++ b/tools/2_generate-definitions.ts @@ -109,6 +109,9 @@ function prepareSchema(schema: any, path: string[] = ['#'], parentTitle: string if (parentTitle.trim()) { const title = !isItemWithAdditionalProperties ? parent : path.includes('switch') ? 'case' : 'item'; newSchema.title = toPascalCase(`${parentTitle} ${title}`); + } + if (path.join('/') == '#/properties/timeout') { + newSchema.title = 'WorkflowTimeout'; } else { newSchema.title = toPascalCase( path @@ -181,6 +184,7 @@ function mutateSchema(schema: any, path: string[] = ['#']): any { */ async function generate(srcFile: string, destFile: string): Promise { const options: Partial = { + // prefere `prepareSchema` to set a title rather than `customName` otherwise the next step (validation pointers generation) will fail customName: (schema: JSONSchema) /*, keyNameFromDefinition: string | undefined)*/ => { if (schema.$id?.includes('serverlessworkflow.io')) { return 'Workflow'; From f107cb61e6d4ee963fe03e17177e123648db7085 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Tue, 8 Oct 2024 18:45:43 +0200 Subject: [PATCH 18/24] Updated for v1.0.0-alpha3 Signed-off-by: Jean-Baptiste Bianchi --- package.json | 4 +- .../all-event-consumption-strategy-builder.ts | 49 + ...sumption-strategy-configuration-builder.ts | 50 + .../any-event-consumption-strategy-builder.ts | 49 + ...sumption-strategy-configuration-builder.ts | 50 + .../builders/async-api-arguments-builder.ts | 45 + ...uthentication-policy-reference-builder.ts} | 24 +- ...=> basic-authentication-policy-builder.ts} | 24 +- ...entication-policy-configuration-builder.ts | 49 + ...basic-authentication-properties-builder.ts | 49 + ...> bearer-authentication-policy-builder.ts} | 24 +- ...entication-policy-configuration-builder.ts | 49 + ...arer-authentication-properties-builder.ts} | 24 +- .../builders/catch-errors-builder.ts | 44 + ...builder.ts => constant-backoff-builder.ts} | 20 +- ...sk-for-builder.ts => container-builder.ts} | 18 +- ...er.ts => container-environment-builder.ts} | 22 +- ...-builder.ts => container-ports-builder.ts} | 20 +- ...uilder.ts => container-volumes-builder.ts} | 20 +- ...> digest-authentication-policy-builder.ts} | 24 +- ...entication-policy-configuration-builder.ts | 49 + ...gest-authentication-properties-builder.ts} | 24 +- .../builders/duration-inline-builder.ts | 45 + ...er.ts => emit-event-definition-builder.ts} | 22 +- .../builders/emit-event-with-builder.ts | 45 + ....ts => emit-task-configuration-builder.ts} | 22 +- .../endpoint-configuration-builder.ts | 48 + .../builders/endpoint-uri-builder.ts | 44 + .../builders/error-instance-builder.ts | 45 + ...k-run-builder.ts => error-type-builder.ts} | 18 +- ...builder.ts => event-dataschema-builder.ts} | 20 +- .../builders/event-source-builder.ts | 44 + ...k-set-builder.ts => event-time-builder.ts} | 18 +- ...der.ts => exponential-back-off-builder.ts} | 20 +- .../generated/builders/export-as-builder.ts | 44 + .../builders/extension-item-builder.ts | 45 + .../builders/external-script-builder.ts | 45 + ...r.ts => for-task-configuration-builder.ts} | 22 +- .../fork-task-configuration-builder.ts | 48 + .../builders/fork-task-fork-builder.ts | 44 - .../builders/function-arguments-builder.ts | 45 + .../builders/grpc-arguments-builder.ts | 45 + .../builders/http-arguments-builder.ts | 45 + src/lib/generated/builders/index.ts | 148 +- ...th-builder.ts => inline-script-builder.ts} | 18 +- .../generated/builders/input-from-builder.ts | 44 + .../builders/linear-backoff-builder.ts | 45 + ...s => listen-task-configuration-builder.ts} | 22 +- ...-autenthication-data-audiences-builder.ts} | 22 +- ... => oauth2-autenthication-data-builder.ts} | 24 +- ...th2-autenthication-data-client-builder.ts} | 24 +- ...th2-autenthication-data-scopes-builder.ts} | 22 +- ...> oauth2-authentication-policy-builder.ts} | 24 +- ...entication-policy-configuration-builder.ts | 49 + ...entication-properties-endpoints-builder.ts | 49 + ...nnect-authentication-properties-builder.ts | 49 + .../builders/oauth2-issuers-builder.ts | 44 + .../oauth2-token-definition-builder.ts | 48 + ...der.ts => oauth2-token-request-builder.ts} | 20 +- .../one-event-consumption-strategy-builder.ts | 49 + ...ilder.ts => open-api-arguments-builder.ts} | 20 +- ...-connect-authentication-policy-builder.ts} | 24 +- ...entication-policy-configuration-builder.ts | 51 + ...nnect-authentication-properties-builder.ts | 49 + .../generated/builders/output-as-builder.ts | 44 + ...ts => raise-task-configuration-builder.ts} | 22 +- ...r.ts => raise-task-raise-error-builder.ts} | 22 +- ...enceable-authentication-policy-builder.ts} | 24 +- ...it-builder.ts => retry-backoff-builder.ts} | 18 +- ...lder.ts => retry-limit-attempt-builder.ts} | 20 +- ...oken-builder.ts => retry-limit-builder.ts} | 18 +- ...th-builder.ts => run-container-builder.ts} | 18 +- .../generated/builders/run-script-builder.ts | 44 + .../generated/builders/run-shell-builder.ts | 44 + .../run-task-configuration-builder.ts | 48 + .../builders/run-task-run-script-builder.ts | 45 - .../builders/run-workflow-builder.ts | 44 + .../builders/runtime-expression-builder.ts | 45 + .../builders/schema-external-builder.ts | 45 + ...gs-builder.ts => schema-inline-builder.ts} | 18 +- src/lib/generated/builders/script-builder.ts | 44 + ...ret-based-authentication-policy-builder.ts | 49 + .../set-task-configuration-builder.ts | 48 + .../builders/shell-arguments-builder.ts | 45 + src/lib/generated/builders/shell-builder.ts | 44 + ...uilder.ts => shell-environment-builder.ts} | 20 +- .../builders/subflow-configuration-builder.ts | 48 + .../builders/subflow-input-builder.ts | 44 + .../generated/builders/switch-case-builder.ts | 44 + .../generated/builders/switch-item-builder.ts | 44 + ...s => switch-task-configuration-builder.ts} | 22 +- .../builders/switch-task-switch-builder.ts | 45 - .../builders/task-base-if-builder.ts | 44 + ...uilder.ts => task-base-timeout-builder.ts} | 20 +- .../generated/builders/task-item-builder.ts | 44 + .../generated/builders/task-list-builder.ts | 4 +- .../builders/task-metadata-builder.ts | 44 + .../builders/try-task-catch-retry-builder.ts | 45 + .../builders/use-extensions-builder.ts | 6 +- .../generated/builders/use-secrets-builder.ts | 44 + .../builders/use-timeouts-builder.ts | 44 + .../with-async-api-payload-builder.ts | 48 + .../generated/builders/with-event-builder.ts | 44 + .../builders/with-grpc-arguments-builder.ts | 45 + .../builders/with-grpc-service-builder.ts | 45 + .../builders/with-http-body-builder.ts | 44 + .../builders/with-http-headers-builder.ts | 45 + .../builders/with-http-query-builder.ts | 45 + .../with-open-api-parameters-builder.ts | 48 + ...uilder.ts => workflow-metadata-builder.ts} | 20 +- .../builders/workflow-tags-builder.ts | 44 + .../builders/workflow-timeout-builder.ts | 45 + ...ent-consumption-strategy-configuration.ts} | 28 +- .../classes/all-event-consumption-strategy.ts | 84 + ...ent-consumption-strategy-configuration.ts} | 28 +- .../classes/any-event-consumption-strategy.ts | 84 + .../generated/classes/async-api-arguments.ts | 88 + .../classes/authentication-policy-basic.ts | 78 - .../classes/authentication-policy-bearer.ts | 79 - .../authentication-policy-oauth2-client.ts | 80 - .../classes/authentication-policy-oauth2.ts | 87 - .../authentication-policy-reference.ts | 79 + .../classes/authentication-policy.ts | 54 +- ...sic-authentication-policy-configuration.ts | 86 + .../classes/basic-authentication-policy.ts | 83 + .../basic-authentication-properties.ts | 79 + ...rer-authentication-policy-configuration.ts | 86 + .../classes/bearer-authentication-policy.ts | 84 + .../bearer-authentication-properties.ts | 80 + .../call-async-api-with-authentication.ts | 108 - src/lib/generated/classes/call-async-api.ts | 10 +- src/lib/generated/classes/call-function.ts | 10 +- .../call-grpc-with-service-authentication.ts | 108 - src/lib/generated/classes/call-grpc-with.ts | 85 - src/lib/generated/classes/call-grpc.ts | 10 +- src/lib/generated/classes/call-http-with.ts | 83 - src/lib/generated/classes/call-http.ts | 10 +- .../call-open-api-with-authentication.ts | 107 - .../classes/call-open-api-with-parameters.ts | 78 - .../generated/classes/call-open-api-with.ts | 83 - src/lib/generated/classes/call-open-api.ts | 10 +- src/lib/generated/classes/call-task.ts | 11 +- .../{oauth2-token.ts => catch-errors.ts} | 42 +- ...ent-filter-with.ts => constant-backoff.ts} | 42 +- ...witch-case.ts => container-environment.ts} | 42 +- src/lib/generated/classes/container-ports.ts | 78 + ...-function-with.ts => container-volumes.ts} | 42 +- src/lib/generated/classes/container.ts | 87 + ...est-authentication-policy-configuration.ts | 86 + .../classes/digest-authentication-policy.ts | 84 + .../digest-authentication-properties.ts | 80 + src/lib/generated/classes/do-task.ts | 6 +- src/lib/generated/classes/document.ts | 6 +- src/lib/generated/classes/duration-inline.ts | 78 + .../classes/emit-event-definition.ts | 83 + src/lib/generated/classes/emit-event-with.ts | 78 + .../classes/emit-task-configuration.ts | 83 + src/lib/generated/classes/emit-task-emit.ts | 83 - src/lib/generated/classes/emit-task.ts | 10 +- .../classes/endpoint-authentication.ts | 106 - .../classes/endpoint-configuration.ts | 84 + src/lib/generated/classes/endpoint-uri.ts | 78 + src/lib/generated/classes/endpoint.ts | 11 +- src/lib/generated/classes/error-instance.ts | 78 + src/lib/generated/classes/error-type.ts | 78 + .../classes/event-consumption-strategy.ts | 32 +- src/lib/generated/classes/event-dataschema.ts | 78 + src/lib/generated/classes/event-filter.ts | 4 +- src/lib/generated/classes/event-source.ts | 78 + src/lib/generated/classes/event-time.ts | 78 + ...icy-backoff.ts => exponential-back-off.ts} | 42 +- src/lib/generated/classes/export-as.ts | 78 + src/lib/generated/classes/export.ts | 7 +- src/lib/generated/classes/extension-item.ts | 88 + .../external-resource-authentication.ts | 108 - .../generated/classes/external-resource.ts | 7 +- ...raise-task-raise.ts => external-script.ts} | 48 +- ...-endpoint.ts => for-task-configuration.ts} | 42 +- src/lib/generated/classes/for-task.ts | 10 +- .../classes/fork-task-configuration.ts | 83 + src/lib/generated/classes/fork-task.ts | 10 +- ...sk-emit-event.ts => function-arguments.ts} | 42 +- src/lib/generated/classes/grpc-arguments.ts | 87 + src/lib/generated/classes/http-arguments.ts | 89 + src/lib/generated/classes/index.ts | 296 ++- src/lib/generated/classes/inline-script.ts | 78 + src/lib/generated/classes/input-from.ts | 78 + src/lib/generated/classes/input.ts | 7 +- src/lib/generated/classes/linear-backoff.ts | 78 + .../classes/listen-task-configuration.ts | 83 + src/lib/generated/classes/listen-task.ts | 10 +- .../oauth2-autenthication-data-audiences.ts | 70 + .../oauth2-autenthication-data-client.ts | 80 + .../oauth2-autenthication-data-scopes.ts | 70 + .../classes/oauth2-autenthication-data.ts | 88 + ...th2-authentication-policy-configuration.ts | 119 ++ .../classes/oauth2-authentication-policy.ts | 84 + ...th2-authentication-properties-endpoints.ts | 86 + ...auth2-connect-authentication-properties.ts | 99 + src/lib/generated/classes/oauth2-issuers.ts | 70 + .../classes/oauth2-token-definition.ts | 78 + .../generated/classes/oauth2-token-request.ts | 78 + .../classes/one-event-consumption-strategy.ts | 84 + .../generated/classes/open-api-arguments.ts | 88 + ...ect-authentication-policy-configuration.ts | 110 + .../open-id-connect-authentication-policy.ts | 85 + ...en-id-connect-authentication-properties.ts | 96 + src/lib/generated/classes/output-as.ts | 78 + src/lib/generated/classes/output.ts | 7 +- .../classes/raise-task-configuration.ts | 83 + ...h-service.ts => raise-task-raise-error.ts} | 42 +- src/lib/generated/classes/raise-task.ts | 10 +- .../referenceable-authentication-policy.ts | 114 ++ src/lib/generated/classes/retry-backoff.ts | 78 + .../generated/classes/retry-limit-attempt.ts | 83 + .../{retry-policy-limit.ts => retry-limit.ts} | 48 +- .../classes/retry-policy-limit-attempt.ts | 83 - src/lib/generated/classes/retry-policy.ts | 6 +- .../{fork-task-fork.ts => run-container.ts} | 48 +- src/lib/generated/classes/run-script.ts | 83 + src/lib/generated/classes/run-shell.ts | 83 + .../classes/run-task-configuration.ts | 101 + .../generated/classes/run-task-run-script.ts | 78 - .../classes/run-task-run-shell-arguments.ts | 78 - .../classes/run-task-run-shell-environment.ts | 79 - .../generated/classes/run-task-run-shell.ts | 85 - .../classes/run-task-run-workflow-input.ts | 78 - .../classes/run-task-run-workflow.ts | 83 - src/lib/generated/classes/run-task-run.ts | 103 - src/lib/generated/classes/run-task.ts | 8 +- src/lib/generated/classes/run-workflow.ts | 83 + .../generated/classes/runtime-expression.ts | 78 + src/lib/generated/classes/schedule.ts | 2 + src/lib/generated/classes/schema-external.ts | 83 + src/lib/generated/classes/schema-inline.ts | 78 + src/lib/generated/classes/schema.ts | 10 +- src/lib/generated/classes/script.ts | 86 + .../secret-based-authentication-policy.ts | 80 + .../classes/set-task-configuration.ts | 78 + src/lib/generated/classes/set-task.ts | 10 +- src/lib/generated/classes/shell-arguments.ts | 78 + ...async-api-with.ts => shell-environment.ts} | 42 +- src/lib/generated/classes/shell.ts | 85 + .../classes/subflow-configuration.ts | 83 + src/lib/generated/classes/subflow-input.ts | 78 + .../{for-task-for.ts => switch-case.ts} | 42 +- src/lib/generated/classes/switch-item.ts | 88 + ...switch.ts => switch-task-configuration.ts} | 40 +- src/lib/generated/classes/switch-task.ts | 10 +- .../{set-task-set.ts => task-base-if.ts} | 42 +- .../generated/classes/task-base-timeout.ts | 86 + src/lib/generated/classes/task-base.ts | 6 +- src/lib/generated/classes/task-item.ts | 88 + src/lib/generated/classes/task-list.ts | 12 +- src/lib/generated/classes/task-metadata.ts | 78 + src/lib/generated/classes/task.ts | 111 +- .../generated/classes/try-task-catch-retry.ts | 101 + src/lib/generated/classes/try-task-catch.ts | 6 +- src/lib/generated/classes/try-task.ts | 6 +- .../generated/classes/use-authentications.ts | 12 +- src/lib/generated/classes/use-extensions.ts | 12 +- src/lib/generated/classes/use-secrets.ts | 70 + src/lib/generated/classes/use-timeouts.ts | 88 + src/lib/generated/classes/use.ts | 2 + src/lib/generated/classes/wait-task.ts | 6 +- ...container.ts => with-async-api-payload.ts} | 42 +- src/lib/generated/classes/with-event.ts | 78 + .../generated/classes/with-grpc-arguments.ts | 78 + .../generated/classes/with-grpc-service.ts | 84 + src/lib/generated/classes/with-http-body.ts | 78 + .../generated/classes/with-http-headers.ts | 78 + src/lib/generated/classes/with-http-query.ts | 78 + ...guments.ts => with-open-api-parameters.ts} | 42 +- ...en-task-listen.ts => workflow-metadata.ts} | 42 +- .../{document-tags.ts => workflow-tags.ts} | 42 +- src/lib/generated/classes/workflow-timeout.ts | 86 + src/lib/generated/classes/workflow.ts | 4 +- .../generated/definitions/specification.ts | 994 +++++---- .../generated/schema/__internal_workflow.json | 1647 +++++++++------ src/lib/generated/schema/workflow.json | 1466 ++++++++++---- src/lib/generated/schema/workflow.yaml | 1784 +++++++++++++++++ .../validation/validation-pointers.ts | 358 ++-- tests/classes/workflow.spec.ts | 2 +- tools/2_generate-definitions.ts | 6 + 284 files changed, 16267 insertions(+), 4706 deletions(-) create mode 100644 src/lib/generated/builders/all-event-consumption-strategy-builder.ts create mode 100644 src/lib/generated/builders/all-event-consumption-strategy-configuration-builder.ts create mode 100644 src/lib/generated/builders/any-event-consumption-strategy-builder.ts create mode 100644 src/lib/generated/builders/any-event-consumption-strategy-configuration-builder.ts create mode 100644 src/lib/generated/builders/async-api-arguments-builder.ts rename src/lib/generated/builders/{call-open-api-with-authentication-builder.ts => authentication-policy-reference-builder.ts} (66%) rename src/lib/generated/builders/{authentication-policy-basic-builder.ts => basic-authentication-policy-builder.ts} (67%) create mode 100644 src/lib/generated/builders/basic-authentication-policy-configuration-builder.ts create mode 100644 src/lib/generated/builders/basic-authentication-properties-builder.ts rename src/lib/generated/builders/{authentication-policy-bearer-builder.ts => bearer-authentication-policy-builder.ts} (67%) create mode 100644 src/lib/generated/builders/bearer-authentication-policy-configuration-builder.ts rename src/lib/generated/builders/{external-resource-authentication-builder.ts => bearer-authentication-properties-builder.ts} (66%) create mode 100644 src/lib/generated/builders/catch-errors-builder.ts rename src/lib/generated/builders/{call-open-api-with-builder.ts => constant-backoff-builder.ts} (68%) rename src/lib/generated/builders/{for-task-for-builder.ts => container-builder.ts} (71%) rename src/lib/generated/builders/{call-http-with-endpoint-builder.ts => container-environment-builder.ts} (69%) rename src/lib/generated/builders/{raise-task-raise-builder.ts => container-ports-builder.ts} (69%) rename src/lib/generated/builders/{listen-task-listen-builder.ts => container-volumes-builder.ts} (68%) rename src/lib/generated/builders/{authentication-policy-oauth2-builder.ts => digest-authentication-policy-builder.ts} (67%) create mode 100644 src/lib/generated/builders/digest-authentication-policy-configuration-builder.ts rename src/lib/generated/builders/{call-async-api-with-authentication-builder.ts => digest-authentication-properties-builder.ts} (66%) create mode 100644 src/lib/generated/builders/duration-inline-builder.ts rename src/lib/generated/builders/{run-task-run-container-builder.ts => emit-event-definition-builder.ts} (69%) create mode 100644 src/lib/generated/builders/emit-event-with-builder.ts rename src/lib/generated/builders/{call-grpc-with-arguments-builder.ts => emit-task-configuration-builder.ts} (68%) create mode 100644 src/lib/generated/builders/endpoint-configuration-builder.ts create mode 100644 src/lib/generated/builders/endpoint-uri-builder.ts create mode 100644 src/lib/generated/builders/error-instance-builder.ts rename src/lib/generated/builders/{run-task-run-builder.ts => error-type-builder.ts} (71%) rename src/lib/generated/builders/{event-filter-with-builder.ts => event-dataschema-builder.ts} (68%) create mode 100644 src/lib/generated/builders/event-source-builder.ts rename src/lib/generated/builders/{set-task-set-builder.ts => event-time-builder.ts} (71%) rename src/lib/generated/builders/{retry-policy-backoff-builder.ts => exponential-back-off-builder.ts} (67%) create mode 100644 src/lib/generated/builders/export-as-builder.ts create mode 100644 src/lib/generated/builders/extension-item-builder.ts create mode 100644 src/lib/generated/builders/external-script-builder.ts rename src/lib/generated/builders/{switch-task-switch-case-builder.ts => for-task-configuration-builder.ts} (69%) create mode 100644 src/lib/generated/builders/fork-task-configuration-builder.ts delete mode 100644 src/lib/generated/builders/fork-task-fork-builder.ts create mode 100644 src/lib/generated/builders/function-arguments-builder.ts create mode 100644 src/lib/generated/builders/grpc-arguments-builder.ts create mode 100644 src/lib/generated/builders/http-arguments-builder.ts rename src/lib/generated/builders/{call-grpc-with-builder.ts => inline-script-builder.ts} (70%) create mode 100644 src/lib/generated/builders/input-from-builder.ts create mode 100644 src/lib/generated/builders/linear-backoff-builder.ts rename src/lib/generated/builders/{retry-policy-limit-attempt-builder.ts => listen-task-configuration-builder.ts} (68%) rename src/lib/generated/builders/{event-consumption-strategy-any-builder.ts => oauth2-autenthication-data-audiences-builder.ts} (65%) rename src/lib/generated/builders/{run-task-run-shell-arguments-builder.ts => oauth2-autenthication-data-builder.ts} (67%) rename src/lib/generated/builders/{call-open-api-with-parameters-builder.ts => oauth2-autenthication-data-client-builder.ts} (64%) rename src/lib/generated/builders/{event-consumption-strategy-all-builder.ts => oauth2-autenthication-data-scopes-builder.ts} (66%) rename src/lib/generated/builders/{run-task-run-shell-environment-builder.ts => oauth2-authentication-policy-builder.ts} (67%) create mode 100644 src/lib/generated/builders/oauth2-authentication-policy-configuration-builder.ts create mode 100644 src/lib/generated/builders/oauth2-authentication-properties-endpoints-builder.ts create mode 100644 src/lib/generated/builders/oauth2-connect-authentication-properties-builder.ts create mode 100644 src/lib/generated/builders/oauth2-issuers-builder.ts create mode 100644 src/lib/generated/builders/oauth2-token-definition-builder.ts rename src/lib/generated/builders/{run-task-run-workflow-builder.ts => oauth2-token-request-builder.ts} (67%) create mode 100644 src/lib/generated/builders/one-event-consumption-strategy-builder.ts rename src/lib/generated/builders/{call-function-with-builder.ts => open-api-arguments-builder.ts} (68%) rename src/lib/generated/builders/{call-grpc-with-service-authentication-builder.ts => open-id-connect-authentication-policy-builder.ts} (66%) create mode 100644 src/lib/generated/builders/open-id-connect-authentication-policy-configuration-builder.ts create mode 100644 src/lib/generated/builders/open-id-connect-authentication-properties-builder.ts create mode 100644 src/lib/generated/builders/output-as-builder.ts rename src/lib/generated/builders/{endpoint-authentication-builder.ts => raise-task-configuration-builder.ts} (68%) rename src/lib/generated/builders/{call-grpc-with-service-builder.ts => raise-task-raise-error-builder.ts} (69%) rename src/lib/generated/builders/{authentication-policy-oauth2-client-builder.ts => referenceable-authentication-policy-builder.ts} (63%) rename src/lib/generated/builders/{emit-task-emit-builder.ts => retry-backoff-builder.ts} (70%) rename src/lib/generated/builders/{emit-task-emit-event-builder.ts => retry-limit-attempt-builder.ts} (69%) rename src/lib/generated/builders/{oauth2-token-builder.ts => retry-limit-builder.ts} (71%) rename src/lib/generated/builders/{call-http-with-builder.ts => run-container-builder.ts} (70%) create mode 100644 src/lib/generated/builders/run-script-builder.ts create mode 100644 src/lib/generated/builders/run-shell-builder.ts create mode 100644 src/lib/generated/builders/run-task-configuration-builder.ts delete mode 100644 src/lib/generated/builders/run-task-run-script-builder.ts create mode 100644 src/lib/generated/builders/run-workflow-builder.ts create mode 100644 src/lib/generated/builders/runtime-expression-builder.ts create mode 100644 src/lib/generated/builders/schema-external-builder.ts rename src/lib/generated/builders/{document-tags-builder.ts => schema-inline-builder.ts} (70%) create mode 100644 src/lib/generated/builders/script-builder.ts create mode 100644 src/lib/generated/builders/secret-based-authentication-policy-builder.ts create mode 100644 src/lib/generated/builders/set-task-configuration-builder.ts create mode 100644 src/lib/generated/builders/shell-arguments-builder.ts create mode 100644 src/lib/generated/builders/shell-builder.ts rename src/lib/generated/builders/{retry-policy-limit-builder.ts => shell-environment-builder.ts} (68%) create mode 100644 src/lib/generated/builders/subflow-configuration-builder.ts create mode 100644 src/lib/generated/builders/subflow-input-builder.ts create mode 100644 src/lib/generated/builders/switch-case-builder.ts create mode 100644 src/lib/generated/builders/switch-item-builder.ts rename src/lib/generated/builders/{run-task-run-workflow-input-builder.ts => switch-task-configuration-builder.ts} (67%) delete mode 100644 src/lib/generated/builders/switch-task-switch-builder.ts create mode 100644 src/lib/generated/builders/task-base-if-builder.ts rename src/lib/generated/builders/{run-task-run-shell-builder.ts => task-base-timeout-builder.ts} (68%) create mode 100644 src/lib/generated/builders/task-item-builder.ts create mode 100644 src/lib/generated/builders/task-metadata-builder.ts create mode 100644 src/lib/generated/builders/try-task-catch-retry-builder.ts create mode 100644 src/lib/generated/builders/use-secrets-builder.ts create mode 100644 src/lib/generated/builders/use-timeouts-builder.ts create mode 100644 src/lib/generated/builders/with-async-api-payload-builder.ts create mode 100644 src/lib/generated/builders/with-event-builder.ts create mode 100644 src/lib/generated/builders/with-grpc-arguments-builder.ts create mode 100644 src/lib/generated/builders/with-grpc-service-builder.ts create mode 100644 src/lib/generated/builders/with-http-body-builder.ts create mode 100644 src/lib/generated/builders/with-http-headers-builder.ts create mode 100644 src/lib/generated/builders/with-http-query-builder.ts create mode 100644 src/lib/generated/builders/with-open-api-parameters-builder.ts rename src/lib/generated/builders/{call-async-api-with-builder.ts => workflow-metadata-builder.ts} (68%) create mode 100644 src/lib/generated/builders/workflow-tags-builder.ts create mode 100644 src/lib/generated/builders/workflow-timeout-builder.ts rename src/lib/generated/classes/{event-consumption-strategy-any.ts => all-event-consumption-strategy-configuration.ts} (56%) create mode 100644 src/lib/generated/classes/all-event-consumption-strategy.ts rename src/lib/generated/classes/{event-consumption-strategy-all.ts => any-event-consumption-strategy-configuration.ts} (56%) create mode 100644 src/lib/generated/classes/any-event-consumption-strategy.ts create mode 100644 src/lib/generated/classes/async-api-arguments.ts delete mode 100644 src/lib/generated/classes/authentication-policy-basic.ts delete mode 100644 src/lib/generated/classes/authentication-policy-bearer.ts delete mode 100644 src/lib/generated/classes/authentication-policy-oauth2-client.ts delete mode 100644 src/lib/generated/classes/authentication-policy-oauth2.ts create mode 100644 src/lib/generated/classes/authentication-policy-reference.ts create mode 100644 src/lib/generated/classes/basic-authentication-policy-configuration.ts create mode 100644 src/lib/generated/classes/basic-authentication-policy.ts create mode 100644 src/lib/generated/classes/basic-authentication-properties.ts create mode 100644 src/lib/generated/classes/bearer-authentication-policy-configuration.ts create mode 100644 src/lib/generated/classes/bearer-authentication-policy.ts create mode 100644 src/lib/generated/classes/bearer-authentication-properties.ts delete mode 100644 src/lib/generated/classes/call-async-api-with-authentication.ts delete mode 100644 src/lib/generated/classes/call-grpc-with-service-authentication.ts delete mode 100644 src/lib/generated/classes/call-grpc-with.ts delete mode 100644 src/lib/generated/classes/call-http-with.ts delete mode 100644 src/lib/generated/classes/call-open-api-with-authentication.ts delete mode 100644 src/lib/generated/classes/call-open-api-with-parameters.ts delete mode 100644 src/lib/generated/classes/call-open-api-with.ts rename src/lib/generated/classes/{oauth2-token.ts => catch-errors.ts} (56%) rename src/lib/generated/classes/{event-filter-with.ts => constant-backoff.ts} (53%) rename src/lib/generated/classes/{switch-task-switch-case.ts => container-environment.ts} (52%) create mode 100644 src/lib/generated/classes/container-ports.ts rename src/lib/generated/classes/{call-function-with.ts => container-volumes.ts} (53%) create mode 100644 src/lib/generated/classes/container.ts create mode 100644 src/lib/generated/classes/digest-authentication-policy-configuration.ts create mode 100644 src/lib/generated/classes/digest-authentication-policy.ts create mode 100644 src/lib/generated/classes/digest-authentication-properties.ts create mode 100644 src/lib/generated/classes/duration-inline.ts create mode 100644 src/lib/generated/classes/emit-event-definition.ts create mode 100644 src/lib/generated/classes/emit-event-with.ts create mode 100644 src/lib/generated/classes/emit-task-configuration.ts delete mode 100644 src/lib/generated/classes/emit-task-emit.ts delete mode 100644 src/lib/generated/classes/endpoint-authentication.ts create mode 100644 src/lib/generated/classes/endpoint-configuration.ts create mode 100644 src/lib/generated/classes/endpoint-uri.ts create mode 100644 src/lib/generated/classes/error-instance.ts create mode 100644 src/lib/generated/classes/error-type.ts create mode 100644 src/lib/generated/classes/event-dataschema.ts create mode 100644 src/lib/generated/classes/event-source.ts create mode 100644 src/lib/generated/classes/event-time.ts rename src/lib/generated/classes/{retry-policy-backoff.ts => exponential-back-off.ts} (52%) create mode 100644 src/lib/generated/classes/export-as.ts create mode 100644 src/lib/generated/classes/extension-item.ts delete mode 100644 src/lib/generated/classes/external-resource-authentication.ts rename src/lib/generated/classes/{raise-task-raise.ts => external-script.ts} (51%) rename src/lib/generated/classes/{call-http-with-endpoint.ts => for-task-configuration.ts} (52%) create mode 100644 src/lib/generated/classes/fork-task-configuration.ts rename src/lib/generated/classes/{emit-task-emit-event.ts => function-arguments.ts} (52%) create mode 100644 src/lib/generated/classes/grpc-arguments.ts create mode 100644 src/lib/generated/classes/http-arguments.ts create mode 100644 src/lib/generated/classes/inline-script.ts create mode 100644 src/lib/generated/classes/input-from.ts create mode 100644 src/lib/generated/classes/linear-backoff.ts create mode 100644 src/lib/generated/classes/listen-task-configuration.ts create mode 100644 src/lib/generated/classes/oauth2-autenthication-data-audiences.ts create mode 100644 src/lib/generated/classes/oauth2-autenthication-data-client.ts create mode 100644 src/lib/generated/classes/oauth2-autenthication-data-scopes.ts create mode 100644 src/lib/generated/classes/oauth2-autenthication-data.ts create mode 100644 src/lib/generated/classes/oauth2-authentication-policy-configuration.ts create mode 100644 src/lib/generated/classes/oauth2-authentication-policy.ts create mode 100644 src/lib/generated/classes/oauth2-authentication-properties-endpoints.ts create mode 100644 src/lib/generated/classes/oauth2-connect-authentication-properties.ts create mode 100644 src/lib/generated/classes/oauth2-issuers.ts create mode 100644 src/lib/generated/classes/oauth2-token-definition.ts create mode 100644 src/lib/generated/classes/oauth2-token-request.ts create mode 100644 src/lib/generated/classes/one-event-consumption-strategy.ts create mode 100644 src/lib/generated/classes/open-api-arguments.ts create mode 100644 src/lib/generated/classes/open-id-connect-authentication-policy-configuration.ts create mode 100644 src/lib/generated/classes/open-id-connect-authentication-policy.ts create mode 100644 src/lib/generated/classes/open-id-connect-authentication-properties.ts create mode 100644 src/lib/generated/classes/output-as.ts create mode 100644 src/lib/generated/classes/raise-task-configuration.ts rename src/lib/generated/classes/{call-grpc-with-service.ts => raise-task-raise-error.ts} (52%) create mode 100644 src/lib/generated/classes/referenceable-authentication-policy.ts create mode 100644 src/lib/generated/classes/retry-backoff.ts create mode 100644 src/lib/generated/classes/retry-limit-attempt.ts rename src/lib/generated/classes/{retry-policy-limit.ts => retry-limit.ts} (50%) delete mode 100644 src/lib/generated/classes/retry-policy-limit-attempt.ts rename src/lib/generated/classes/{fork-task-fork.ts => run-container.ts} (53%) create mode 100644 src/lib/generated/classes/run-script.ts create mode 100644 src/lib/generated/classes/run-shell.ts create mode 100644 src/lib/generated/classes/run-task-configuration.ts delete mode 100644 src/lib/generated/classes/run-task-run-script.ts delete mode 100644 src/lib/generated/classes/run-task-run-shell-arguments.ts delete mode 100644 src/lib/generated/classes/run-task-run-shell-environment.ts delete mode 100644 src/lib/generated/classes/run-task-run-shell.ts delete mode 100644 src/lib/generated/classes/run-task-run-workflow-input.ts delete mode 100644 src/lib/generated/classes/run-task-run-workflow.ts delete mode 100644 src/lib/generated/classes/run-task-run.ts create mode 100644 src/lib/generated/classes/run-workflow.ts create mode 100644 src/lib/generated/classes/runtime-expression.ts create mode 100644 src/lib/generated/classes/schema-external.ts create mode 100644 src/lib/generated/classes/schema-inline.ts create mode 100644 src/lib/generated/classes/script.ts create mode 100644 src/lib/generated/classes/secret-based-authentication-policy.ts create mode 100644 src/lib/generated/classes/set-task-configuration.ts create mode 100644 src/lib/generated/classes/shell-arguments.ts rename src/lib/generated/classes/{call-async-api-with.ts => shell-environment.ts} (53%) create mode 100644 src/lib/generated/classes/shell.ts create mode 100644 src/lib/generated/classes/subflow-configuration.ts create mode 100644 src/lib/generated/classes/subflow-input.ts rename src/lib/generated/classes/{for-task-for.ts => switch-case.ts} (56%) create mode 100644 src/lib/generated/classes/switch-item.ts rename src/lib/generated/classes/{switch-task-switch.ts => switch-task-configuration.ts} (50%) rename src/lib/generated/classes/{set-task-set.ts => task-base-if.ts} (56%) create mode 100644 src/lib/generated/classes/task-base-timeout.ts create mode 100644 src/lib/generated/classes/task-item.ts create mode 100644 src/lib/generated/classes/task-metadata.ts create mode 100644 src/lib/generated/classes/try-task-catch-retry.ts create mode 100644 src/lib/generated/classes/use-secrets.ts create mode 100644 src/lib/generated/classes/use-timeouts.ts rename src/lib/generated/classes/{run-task-run-container.ts => with-async-api-payload.ts} (52%) create mode 100644 src/lib/generated/classes/with-event.ts create mode 100644 src/lib/generated/classes/with-grpc-arguments.ts create mode 100644 src/lib/generated/classes/with-grpc-service.ts create mode 100644 src/lib/generated/classes/with-http-body.ts create mode 100644 src/lib/generated/classes/with-http-headers.ts create mode 100644 src/lib/generated/classes/with-http-query.ts rename src/lib/generated/classes/{call-grpc-with-arguments.ts => with-open-api-parameters.ts} (52%) rename src/lib/generated/classes/{listen-task-listen.ts => workflow-metadata.ts} (53%) rename src/lib/generated/classes/{document-tags.ts => workflow-tags.ts} (56%) create mode 100644 src/lib/generated/classes/workflow-timeout.ts create mode 100644 src/lib/generated/schema/workflow.yaml diff --git a/package.json b/package.json index a33616a9..ab8501b7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverlessworkflow/sdk", - "version": "1.0.0-alpha2.0", - "schemaVersion": "1.0.0-alpha2", + "version": "1.0.0-alpha3.0", + "schemaVersion": "1.0.0-alpha3", "description": "Typescript SDK for Serverless Workflow Specification", "main": "umd/index.umd.min.js", "browser": "umd/index.umd.min.js", diff --git a/src/lib/generated/builders/all-event-consumption-strategy-builder.ts b/src/lib/generated/builders/all-event-consumption-strategy-builder.ts new file mode 100644 index 00000000..c5704c34 --- /dev/null +++ b/src/lib/generated/builders/all-event-consumption-strategy-builder.ts @@ -0,0 +1,49 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.AllEventConsumptionStrategy} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.AllEventConsumptionStrategy} The built object + */ +function buildingFn( + model: Specification.AllEventConsumptionStrategy, + options: BuildOptions, +): Specification.AllEventConsumptionStrategy { + const instance = new Classes.AllEventConsumptionStrategy(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.AllEventConsumptionStrategy; +} + +/** + * A factory to create a builder proxy for the type `Specification.AllEventConsumptionStrategy` + * @returns {Builder} A builder for `Specification.AllEventConsumptionStrategy` + */ +export const allEventConsumptionStrategyBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/all-event-consumption-strategy-configuration-builder.ts b/src/lib/generated/builders/all-event-consumption-strategy-configuration-builder.ts new file mode 100644 index 00000000..b278a2d0 --- /dev/null +++ b/src/lib/generated/builders/all-event-consumption-strategy-configuration-builder.ts @@ -0,0 +1,50 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying array + * @param {Specification.AllEventConsumptionStrategyConfiguration} model The proxied array + * @param {BuildOptions} options The build options to use + * @returns {Specification.AllEventConsumptionStrategyConfiguration} The built array + */ +function buildingFn( + model: Specification.AllEventConsumptionStrategyConfiguration, + options: BuildOptions, +): Specification.AllEventConsumptionStrategyConfiguration { + const instance = new Classes.AllEventConsumptionStrategyConfiguration(model); + if (options.validate) instance.validate(); + return ( + options.normalize ? instance.normalize() : instance + ) as Specification.AllEventConsumptionStrategyConfiguration; +} + +/** + * A factory to create a builder proxy for the type `Specification.AllEventConsumptionStrategyConfiguration` + * @returns {ArrayBuilder} A builder for `Specification.AllEventConsumptionStrategyConfiguration` + */ +export const allEventConsumptionStrategyConfigurationBuilder = ( + model?: Specification.AllEventConsumptionStrategyConfiguration, +): ArrayBuilder => arrayBuilder(model, buildingFn); diff --git a/src/lib/generated/builders/any-event-consumption-strategy-builder.ts b/src/lib/generated/builders/any-event-consumption-strategy-builder.ts new file mode 100644 index 00000000..dc00e1c6 --- /dev/null +++ b/src/lib/generated/builders/any-event-consumption-strategy-builder.ts @@ -0,0 +1,49 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.AnyEventConsumptionStrategy} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.AnyEventConsumptionStrategy} The built object + */ +function buildingFn( + model: Specification.AnyEventConsumptionStrategy, + options: BuildOptions, +): Specification.AnyEventConsumptionStrategy { + const instance = new Classes.AnyEventConsumptionStrategy(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.AnyEventConsumptionStrategy; +} + +/** + * A factory to create a builder proxy for the type `Specification.AnyEventConsumptionStrategy` + * @returns {Builder} A builder for `Specification.AnyEventConsumptionStrategy` + */ +export const anyEventConsumptionStrategyBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/any-event-consumption-strategy-configuration-builder.ts b/src/lib/generated/builders/any-event-consumption-strategy-configuration-builder.ts new file mode 100644 index 00000000..07585c3f --- /dev/null +++ b/src/lib/generated/builders/any-event-consumption-strategy-configuration-builder.ts @@ -0,0 +1,50 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying array + * @param {Specification.AnyEventConsumptionStrategyConfiguration} model The proxied array + * @param {BuildOptions} options The build options to use + * @returns {Specification.AnyEventConsumptionStrategyConfiguration} The built array + */ +function buildingFn( + model: Specification.AnyEventConsumptionStrategyConfiguration, + options: BuildOptions, +): Specification.AnyEventConsumptionStrategyConfiguration { + const instance = new Classes.AnyEventConsumptionStrategyConfiguration(model); + if (options.validate) instance.validate(); + return ( + options.normalize ? instance.normalize() : instance + ) as Specification.AnyEventConsumptionStrategyConfiguration; +} + +/** + * A factory to create a builder proxy for the type `Specification.AnyEventConsumptionStrategyConfiguration` + * @returns {ArrayBuilder} A builder for `Specification.AnyEventConsumptionStrategyConfiguration` + */ +export const anyEventConsumptionStrategyConfigurationBuilder = ( + model?: Specification.AnyEventConsumptionStrategyConfiguration, +): ArrayBuilder => arrayBuilder(model, buildingFn); diff --git a/src/lib/generated/builders/async-api-arguments-builder.ts b/src/lib/generated/builders/async-api-arguments-builder.ts new file mode 100644 index 00000000..2aff9a0c --- /dev/null +++ b/src/lib/generated/builders/async-api-arguments-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.AsyncApiArguments} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.AsyncApiArguments} The built object + */ +function buildingFn(model: Specification.AsyncApiArguments, options: BuildOptions): Specification.AsyncApiArguments { + const instance = new Classes.AsyncApiArguments(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.AsyncApiArguments; +} + +/** + * A factory to create a builder proxy for the type `Specification.AsyncApiArguments` + * @returns {Builder} A builder for `Specification.AsyncApiArguments` + */ +export const asyncApiArgumentsBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-open-api-with-authentication-builder.ts b/src/lib/generated/builders/authentication-policy-reference-builder.ts similarity index 66% rename from src/lib/generated/builders/call-open-api-with-authentication-builder.ts rename to src/lib/generated/builders/authentication-policy-reference-builder.ts index fe65a990..5b7750ed 100644 --- a/src/lib/generated/builders/call-open-api-with-authentication-builder.ts +++ b/src/lib/generated/builders/authentication-policy-reference-builder.ts @@ -26,24 +26,24 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallOpenAPIWithAuthentication} model The proxied object + * @param {Specification.AuthenticationPolicyReference} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.CallOpenAPIWithAuthentication} The built object + * @returns {Specification.AuthenticationPolicyReference} The built object */ function buildingFn( - model: Specification.CallOpenAPIWithAuthentication, + model: Specification.AuthenticationPolicyReference, options: BuildOptions, -): Specification.CallOpenAPIWithAuthentication { - const instance = new Classes.CallOpenAPIWithAuthentication(model); +): Specification.AuthenticationPolicyReference { + const instance = new Classes.AuthenticationPolicyReference(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.CallOpenAPIWithAuthentication; + return (options.normalize ? instance.normalize() : instance) as Specification.AuthenticationPolicyReference; } /** - * A factory to create a builder proxy for the type `Specification.CallOpenAPIWithAuthentication` - * @returns {Builder} A builder for `Specification.CallOpenAPIWithAuthentication` + * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyReference` + * @returns {Builder} A builder for `Specification.AuthenticationPolicyReference` */ -export const callOpenAPIWithAuthenticationBuilder = ( - model?: Partial, -): Builder => - builder(model, buildingFn); +export const authenticationPolicyReferenceBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/authentication-policy-basic-builder.ts b/src/lib/generated/builders/basic-authentication-policy-builder.ts similarity index 67% rename from src/lib/generated/builders/authentication-policy-basic-builder.ts rename to src/lib/generated/builders/basic-authentication-policy-builder.ts index ddcfa8ca..9ea54d3e 100644 --- a/src/lib/generated/builders/authentication-policy-basic-builder.ts +++ b/src/lib/generated/builders/basic-authentication-policy-builder.ts @@ -26,24 +26,24 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.AuthenticationPolicyBasic} model The proxied object + * @param {Specification.BasicAuthenticationPolicy} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.AuthenticationPolicyBasic} The built object + * @returns {Specification.BasicAuthenticationPolicy} The built object */ function buildingFn( - model: Specification.AuthenticationPolicyBasic, + model: Specification.BasicAuthenticationPolicy, options: BuildOptions, -): Specification.AuthenticationPolicyBasic { - const instance = new Classes.AuthenticationPolicyBasic(model); +): Specification.BasicAuthenticationPolicy { + const instance = new Classes.BasicAuthenticationPolicy(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.AuthenticationPolicyBasic; + return (options.normalize ? instance.normalize() : instance) as Specification.BasicAuthenticationPolicy; } /** - * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyBasic` - * @returns {Builder} A builder for `Specification.AuthenticationPolicyBasic` + * A factory to create a builder proxy for the type `Specification.BasicAuthenticationPolicy` + * @returns {Builder} A builder for `Specification.BasicAuthenticationPolicy` */ -export const authenticationPolicyBasicBuilder = ( - model?: Partial, -): Builder => - builder(model, buildingFn); +export const basicAuthenticationPolicyBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/basic-authentication-policy-configuration-builder.ts b/src/lib/generated/builders/basic-authentication-policy-configuration-builder.ts new file mode 100644 index 00000000..767e564a --- /dev/null +++ b/src/lib/generated/builders/basic-authentication-policy-configuration-builder.ts @@ -0,0 +1,49 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.BasicAuthenticationPolicyConfiguration} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.BasicAuthenticationPolicyConfiguration} The built object + */ +function buildingFn( + model: Specification.BasicAuthenticationPolicyConfiguration, + options: BuildOptions, +): Specification.BasicAuthenticationPolicyConfiguration { + const instance = new Classes.BasicAuthenticationPolicyConfiguration(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.BasicAuthenticationPolicyConfiguration; +} + +/** + * A factory to create a builder proxy for the type `Specification.BasicAuthenticationPolicyConfiguration` + * @returns {Builder} A builder for `Specification.BasicAuthenticationPolicyConfiguration` + */ +export const basicAuthenticationPolicyConfigurationBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/basic-authentication-properties-builder.ts b/src/lib/generated/builders/basic-authentication-properties-builder.ts new file mode 100644 index 00000000..1486bbc6 --- /dev/null +++ b/src/lib/generated/builders/basic-authentication-properties-builder.ts @@ -0,0 +1,49 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.BasicAuthenticationProperties} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.BasicAuthenticationProperties} The built object + */ +function buildingFn( + model: Specification.BasicAuthenticationProperties, + options: BuildOptions, +): Specification.BasicAuthenticationProperties { + const instance = new Classes.BasicAuthenticationProperties(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.BasicAuthenticationProperties; +} + +/** + * A factory to create a builder proxy for the type `Specification.BasicAuthenticationProperties` + * @returns {Builder} A builder for `Specification.BasicAuthenticationProperties` + */ +export const basicAuthenticationPropertiesBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/authentication-policy-bearer-builder.ts b/src/lib/generated/builders/bearer-authentication-policy-builder.ts similarity index 67% rename from src/lib/generated/builders/authentication-policy-bearer-builder.ts rename to src/lib/generated/builders/bearer-authentication-policy-builder.ts index dc70fef4..f6de3733 100644 --- a/src/lib/generated/builders/authentication-policy-bearer-builder.ts +++ b/src/lib/generated/builders/bearer-authentication-policy-builder.ts @@ -26,24 +26,24 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.AuthenticationPolicyBearer} model The proxied object + * @param {Specification.BearerAuthenticationPolicy} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.AuthenticationPolicyBearer} The built object + * @returns {Specification.BearerAuthenticationPolicy} The built object */ function buildingFn( - model: Specification.AuthenticationPolicyBearer, + model: Specification.BearerAuthenticationPolicy, options: BuildOptions, -): Specification.AuthenticationPolicyBearer { - const instance = new Classes.AuthenticationPolicyBearer(model); +): Specification.BearerAuthenticationPolicy { + const instance = new Classes.BearerAuthenticationPolicy(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.AuthenticationPolicyBearer; + return (options.normalize ? instance.normalize() : instance) as Specification.BearerAuthenticationPolicy; } /** - * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyBearer` - * @returns {Builder} A builder for `Specification.AuthenticationPolicyBearer` + * A factory to create a builder proxy for the type `Specification.BearerAuthenticationPolicy` + * @returns {Builder} A builder for `Specification.BearerAuthenticationPolicy` */ -export const authenticationPolicyBearerBuilder = ( - model?: Partial, -): Builder => - builder(model, buildingFn); +export const bearerAuthenticationPolicyBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/bearer-authentication-policy-configuration-builder.ts b/src/lib/generated/builders/bearer-authentication-policy-configuration-builder.ts new file mode 100644 index 00000000..adc638d4 --- /dev/null +++ b/src/lib/generated/builders/bearer-authentication-policy-configuration-builder.ts @@ -0,0 +1,49 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.BearerAuthenticationPolicyConfiguration} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.BearerAuthenticationPolicyConfiguration} The built object + */ +function buildingFn( + model: Specification.BearerAuthenticationPolicyConfiguration, + options: BuildOptions, +): Specification.BearerAuthenticationPolicyConfiguration { + const instance = new Classes.BearerAuthenticationPolicyConfiguration(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.BearerAuthenticationPolicyConfiguration; +} + +/** + * A factory to create a builder proxy for the type `Specification.BearerAuthenticationPolicyConfiguration` + * @returns {Builder} A builder for `Specification.BearerAuthenticationPolicyConfiguration` + */ +export const bearerAuthenticationPolicyConfigurationBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/external-resource-authentication-builder.ts b/src/lib/generated/builders/bearer-authentication-properties-builder.ts similarity index 66% rename from src/lib/generated/builders/external-resource-authentication-builder.ts rename to src/lib/generated/builders/bearer-authentication-properties-builder.ts index 2545d0f7..02d4b0aa 100644 --- a/src/lib/generated/builders/external-resource-authentication-builder.ts +++ b/src/lib/generated/builders/bearer-authentication-properties-builder.ts @@ -26,24 +26,24 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ExternalResourceAuthentication} model The proxied object + * @param {Specification.BearerAuthenticationProperties} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.ExternalResourceAuthentication} The built object + * @returns {Specification.BearerAuthenticationProperties} The built object */ function buildingFn( - model: Specification.ExternalResourceAuthentication, + model: Specification.BearerAuthenticationProperties, options: BuildOptions, -): Specification.ExternalResourceAuthentication { - const instance = new Classes.ExternalResourceAuthentication(model); +): Specification.BearerAuthenticationProperties { + const instance = new Classes.BearerAuthenticationProperties(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.ExternalResourceAuthentication; + return (options.normalize ? instance.normalize() : instance) as Specification.BearerAuthenticationProperties; } /** - * A factory to create a builder proxy for the type `Specification.ExternalResourceAuthentication` - * @returns {Builder} A builder for `Specification.ExternalResourceAuthentication` + * A factory to create a builder proxy for the type `Specification.BearerAuthenticationProperties` + * @returns {Builder} A builder for `Specification.BearerAuthenticationProperties` */ -export const externalResourceAuthenticationBuilder = ( - model?: Partial, -): Builder => - builder(model, buildingFn); +export const bearerAuthenticationPropertiesBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/catch-errors-builder.ts b/src/lib/generated/builders/catch-errors-builder.ts new file mode 100644 index 00000000..de5fd061 --- /dev/null +++ b/src/lib/generated/builders/catch-errors-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.CatchErrors} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.CatchErrors} The built object + */ +function buildingFn(model: Specification.CatchErrors, options: BuildOptions): Specification.CatchErrors { + const instance = new Classes.CatchErrors(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.CatchErrors; +} + +/** + * A factory to create a builder proxy for the type `Specification.CatchErrors` + * @returns {Builder} A builder for `Specification.CatchErrors` + */ +export const catchErrorsBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-open-api-with-builder.ts b/src/lib/generated/builders/constant-backoff-builder.ts similarity index 68% rename from src/lib/generated/builders/call-open-api-with-builder.ts rename to src/lib/generated/builders/constant-backoff-builder.ts index 7d2262fd..b6cbdc82 100644 --- a/src/lib/generated/builders/call-open-api-with-builder.ts +++ b/src/lib/generated/builders/constant-backoff-builder.ts @@ -26,20 +26,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallOpenAPIWith} model The proxied object + * @param {Specification.ConstantBackoff} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.CallOpenAPIWith} The built object + * @returns {Specification.ConstantBackoff} The built object */ -function buildingFn(model: Specification.CallOpenAPIWith, options: BuildOptions): Specification.CallOpenAPIWith { - const instance = new Classes.CallOpenAPIWith(model); +function buildingFn(model: Specification.ConstantBackoff, options: BuildOptions): Specification.ConstantBackoff { + const instance = new Classes.ConstantBackoff(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.CallOpenAPIWith; + return (options.normalize ? instance.normalize() : instance) as Specification.ConstantBackoff; } /** - * A factory to create a builder proxy for the type `Specification.CallOpenAPIWith` - * @returns {Builder} A builder for `Specification.CallOpenAPIWith` + * A factory to create a builder proxy for the type `Specification.ConstantBackoff` + * @returns {Builder} A builder for `Specification.ConstantBackoff` */ -export const callOpenAPIWithBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const constantBackoffBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/for-task-for-builder.ts b/src/lib/generated/builders/container-builder.ts similarity index 71% rename from src/lib/generated/builders/for-task-for-builder.ts rename to src/lib/generated/builders/container-builder.ts index 53b48436..104d8f9f 100644 --- a/src/lib/generated/builders/for-task-for-builder.ts +++ b/src/lib/generated/builders/container-builder.ts @@ -26,19 +26,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ForTaskFor} model The proxied object + * @param {Specification.Container} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.ForTaskFor} The built object + * @returns {Specification.Container} The built object */ -function buildingFn(model: Specification.ForTaskFor, options: BuildOptions): Specification.ForTaskFor { - const instance = new Classes.ForTaskFor(model); +function buildingFn(model: Specification.Container, options: BuildOptions): Specification.Container { + const instance = new Classes.Container(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.ForTaskFor; + return (options.normalize ? instance.normalize() : instance) as Specification.Container; } /** - * A factory to create a builder proxy for the type `Specification.ForTaskFor` - * @returns {Builder} A builder for `Specification.ForTaskFor` + * A factory to create a builder proxy for the type `Specification.Container` + * @returns {Builder} A builder for `Specification.Container` */ -export const forTaskForBuilder = (model?: Partial): Builder => - builder(model, buildingFn); +export const containerBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-http-with-endpoint-builder.ts b/src/lib/generated/builders/container-environment-builder.ts similarity index 69% rename from src/lib/generated/builders/call-http-with-endpoint-builder.ts rename to src/lib/generated/builders/container-environment-builder.ts index bb0433f5..57006638 100644 --- a/src/lib/generated/builders/call-http-with-endpoint-builder.ts +++ b/src/lib/generated/builders/container-environment-builder.ts @@ -26,23 +26,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallHTTPWithEndpoint} model The proxied object + * @param {Specification.ContainerEnvironment} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.CallHTTPWithEndpoint} The built object + * @returns {Specification.ContainerEnvironment} The built object */ function buildingFn( - model: Specification.CallHTTPWithEndpoint, + model: Specification.ContainerEnvironment, options: BuildOptions, -): Specification.CallHTTPWithEndpoint { - const instance = new Classes.CallHTTPWithEndpoint(model); +): Specification.ContainerEnvironment { + const instance = new Classes.ContainerEnvironment(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.CallHTTPWithEndpoint; + return (options.normalize ? instance.normalize() : instance) as Specification.ContainerEnvironment; } /** - * A factory to create a builder proxy for the type `Specification.CallHTTPWithEndpoint` - * @returns {Builder} A builder for `Specification.CallHTTPWithEndpoint` + * A factory to create a builder proxy for the type `Specification.ContainerEnvironment` + * @returns {Builder} A builder for `Specification.ContainerEnvironment` */ -export const callHTTPWithEndpointBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const containerEnvironmentBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/raise-task-raise-builder.ts b/src/lib/generated/builders/container-ports-builder.ts similarity index 69% rename from src/lib/generated/builders/raise-task-raise-builder.ts rename to src/lib/generated/builders/container-ports-builder.ts index aa2f49d8..49401398 100644 --- a/src/lib/generated/builders/raise-task-raise-builder.ts +++ b/src/lib/generated/builders/container-ports-builder.ts @@ -26,20 +26,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RaiseTaskRaise} model The proxied object + * @param {Specification.ContainerPorts} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.RaiseTaskRaise} The built object + * @returns {Specification.ContainerPorts} The built object */ -function buildingFn(model: Specification.RaiseTaskRaise, options: BuildOptions): Specification.RaiseTaskRaise { - const instance = new Classes.RaiseTaskRaise(model); +function buildingFn(model: Specification.ContainerPorts, options: BuildOptions): Specification.ContainerPorts { + const instance = new Classes.ContainerPorts(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.RaiseTaskRaise; + return (options.normalize ? instance.normalize() : instance) as Specification.ContainerPorts; } /** - * A factory to create a builder proxy for the type `Specification.RaiseTaskRaise` - * @returns {Builder} A builder for `Specification.RaiseTaskRaise` + * A factory to create a builder proxy for the type `Specification.ContainerPorts` + * @returns {Builder} A builder for `Specification.ContainerPorts` */ -export const raiseTaskRaiseBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const containerPortsBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/listen-task-listen-builder.ts b/src/lib/generated/builders/container-volumes-builder.ts similarity index 68% rename from src/lib/generated/builders/listen-task-listen-builder.ts rename to src/lib/generated/builders/container-volumes-builder.ts index d021bf51..4b7609fd 100644 --- a/src/lib/generated/builders/listen-task-listen-builder.ts +++ b/src/lib/generated/builders/container-volumes-builder.ts @@ -26,20 +26,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ListenTaskListen} model The proxied object + * @param {Specification.ContainerVolumes} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.ListenTaskListen} The built object + * @returns {Specification.ContainerVolumes} The built object */ -function buildingFn(model: Specification.ListenTaskListen, options: BuildOptions): Specification.ListenTaskListen { - const instance = new Classes.ListenTaskListen(model); +function buildingFn(model: Specification.ContainerVolumes, options: BuildOptions): Specification.ContainerVolumes { + const instance = new Classes.ContainerVolumes(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.ListenTaskListen; + return (options.normalize ? instance.normalize() : instance) as Specification.ContainerVolumes; } /** - * A factory to create a builder proxy for the type `Specification.ListenTaskListen` - * @returns {Builder} A builder for `Specification.ListenTaskListen` + * A factory to create a builder proxy for the type `Specification.ContainerVolumes` + * @returns {Builder} A builder for `Specification.ContainerVolumes` */ -export const listenTaskListenBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const containerVolumesBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/authentication-policy-oauth2-builder.ts b/src/lib/generated/builders/digest-authentication-policy-builder.ts similarity index 67% rename from src/lib/generated/builders/authentication-policy-oauth2-builder.ts rename to src/lib/generated/builders/digest-authentication-policy-builder.ts index 54141c9a..a3028e30 100644 --- a/src/lib/generated/builders/authentication-policy-oauth2-builder.ts +++ b/src/lib/generated/builders/digest-authentication-policy-builder.ts @@ -26,24 +26,24 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.AuthenticationPolicyOauth2} model The proxied object + * @param {Specification.DigestAuthenticationPolicy} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.AuthenticationPolicyOauth2} The built object + * @returns {Specification.DigestAuthenticationPolicy} The built object */ function buildingFn( - model: Specification.AuthenticationPolicyOauth2, + model: Specification.DigestAuthenticationPolicy, options: BuildOptions, -): Specification.AuthenticationPolicyOauth2 { - const instance = new Classes.AuthenticationPolicyOauth2(model); +): Specification.DigestAuthenticationPolicy { + const instance = new Classes.DigestAuthenticationPolicy(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.AuthenticationPolicyOauth2; + return (options.normalize ? instance.normalize() : instance) as Specification.DigestAuthenticationPolicy; } /** - * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyOauth2` - * @returns {Builder} A builder for `Specification.AuthenticationPolicyOauth2` + * A factory to create a builder proxy for the type `Specification.DigestAuthenticationPolicy` + * @returns {Builder} A builder for `Specification.DigestAuthenticationPolicy` */ -export const authenticationPolicyOauth2Builder = ( - model?: Partial, -): Builder => - builder(model, buildingFn); +export const digestAuthenticationPolicyBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/digest-authentication-policy-configuration-builder.ts b/src/lib/generated/builders/digest-authentication-policy-configuration-builder.ts new file mode 100644 index 00000000..d92eee59 --- /dev/null +++ b/src/lib/generated/builders/digest-authentication-policy-configuration-builder.ts @@ -0,0 +1,49 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.DigestAuthenticationPolicyConfiguration} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.DigestAuthenticationPolicyConfiguration} The built object + */ +function buildingFn( + model: Specification.DigestAuthenticationPolicyConfiguration, + options: BuildOptions, +): Specification.DigestAuthenticationPolicyConfiguration { + const instance = new Classes.DigestAuthenticationPolicyConfiguration(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.DigestAuthenticationPolicyConfiguration; +} + +/** + * A factory to create a builder proxy for the type `Specification.DigestAuthenticationPolicyConfiguration` + * @returns {Builder} A builder for `Specification.DigestAuthenticationPolicyConfiguration` + */ +export const digestAuthenticationPolicyConfigurationBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-async-api-with-authentication-builder.ts b/src/lib/generated/builders/digest-authentication-properties-builder.ts similarity index 66% rename from src/lib/generated/builders/call-async-api-with-authentication-builder.ts rename to src/lib/generated/builders/digest-authentication-properties-builder.ts index 81ddc798..9174057a 100644 --- a/src/lib/generated/builders/call-async-api-with-authentication-builder.ts +++ b/src/lib/generated/builders/digest-authentication-properties-builder.ts @@ -26,24 +26,24 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallAsyncAPIWithAuthentication} model The proxied object + * @param {Specification.DigestAuthenticationProperties} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.CallAsyncAPIWithAuthentication} The built object + * @returns {Specification.DigestAuthenticationProperties} The built object */ function buildingFn( - model: Specification.CallAsyncAPIWithAuthentication, + model: Specification.DigestAuthenticationProperties, options: BuildOptions, -): Specification.CallAsyncAPIWithAuthentication { - const instance = new Classes.CallAsyncAPIWithAuthentication(model); +): Specification.DigestAuthenticationProperties { + const instance = new Classes.DigestAuthenticationProperties(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.CallAsyncAPIWithAuthentication; + return (options.normalize ? instance.normalize() : instance) as Specification.DigestAuthenticationProperties; } /** - * A factory to create a builder proxy for the type `Specification.CallAsyncAPIWithAuthentication` - * @returns {Builder} A builder for `Specification.CallAsyncAPIWithAuthentication` + * A factory to create a builder proxy for the type `Specification.DigestAuthenticationProperties` + * @returns {Builder} A builder for `Specification.DigestAuthenticationProperties` */ -export const callAsyncAPIWithAuthenticationBuilder = ( - model?: Partial, -): Builder => - builder(model, buildingFn); +export const digestAuthenticationPropertiesBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/duration-inline-builder.ts b/src/lib/generated/builders/duration-inline-builder.ts new file mode 100644 index 00000000..709b6fa5 --- /dev/null +++ b/src/lib/generated/builders/duration-inline-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.DurationInline} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.DurationInline} The built object + */ +function buildingFn(model: Specification.DurationInline, options: BuildOptions): Specification.DurationInline { + const instance = new Classes.DurationInline(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.DurationInline; +} + +/** + * A factory to create a builder proxy for the type `Specification.DurationInline` + * @returns {Builder} A builder for `Specification.DurationInline` + */ +export const durationInlineBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-task-run-container-builder.ts b/src/lib/generated/builders/emit-event-definition-builder.ts similarity index 69% rename from src/lib/generated/builders/run-task-run-container-builder.ts rename to src/lib/generated/builders/emit-event-definition-builder.ts index 3202d9cd..ae8ca8ab 100644 --- a/src/lib/generated/builders/run-task-run-container-builder.ts +++ b/src/lib/generated/builders/emit-event-definition-builder.ts @@ -26,23 +26,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunContainer} model The proxied object + * @param {Specification.EmitEventDefinition} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.RunTaskRunContainer} The built object + * @returns {Specification.EmitEventDefinition} The built object */ function buildingFn( - model: Specification.RunTaskRunContainer, + model: Specification.EmitEventDefinition, options: BuildOptions, -): Specification.RunTaskRunContainer { - const instance = new Classes.RunTaskRunContainer(model); +): Specification.EmitEventDefinition { + const instance = new Classes.EmitEventDefinition(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.RunTaskRunContainer; + return (options.normalize ? instance.normalize() : instance) as Specification.EmitEventDefinition; } /** - * A factory to create a builder proxy for the type `Specification.RunTaskRunContainer` - * @returns {Builder} A builder for `Specification.RunTaskRunContainer` + * A factory to create a builder proxy for the type `Specification.EmitEventDefinition` + * @returns {Builder} A builder for `Specification.EmitEventDefinition` */ -export const runTaskRunContainerBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const emitEventDefinitionBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/emit-event-with-builder.ts b/src/lib/generated/builders/emit-event-with-builder.ts new file mode 100644 index 00000000..bc4e0c6b --- /dev/null +++ b/src/lib/generated/builders/emit-event-with-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.EmitEventWith} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.EmitEventWith} The built object + */ +function buildingFn(model: Specification.EmitEventWith, options: BuildOptions): Specification.EmitEventWith { + const instance = new Classes.EmitEventWith(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.EmitEventWith; +} + +/** + * A factory to create a builder proxy for the type `Specification.EmitEventWith` + * @returns {Builder} A builder for `Specification.EmitEventWith` + */ +export const emitEventWithBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-grpc-with-arguments-builder.ts b/src/lib/generated/builders/emit-task-configuration-builder.ts similarity index 68% rename from src/lib/generated/builders/call-grpc-with-arguments-builder.ts rename to src/lib/generated/builders/emit-task-configuration-builder.ts index 563ceef4..af232f1e 100644 --- a/src/lib/generated/builders/call-grpc-with-arguments-builder.ts +++ b/src/lib/generated/builders/emit-task-configuration-builder.ts @@ -26,23 +26,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallGRPCWithArguments} model The proxied object + * @param {Specification.EmitTaskConfiguration} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.CallGRPCWithArguments} The built object + * @returns {Specification.EmitTaskConfiguration} The built object */ function buildingFn( - model: Specification.CallGRPCWithArguments, + model: Specification.EmitTaskConfiguration, options: BuildOptions, -): Specification.CallGRPCWithArguments { - const instance = new Classes.CallGRPCWithArguments(model); +): Specification.EmitTaskConfiguration { + const instance = new Classes.EmitTaskConfiguration(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.CallGRPCWithArguments; + return (options.normalize ? instance.normalize() : instance) as Specification.EmitTaskConfiguration; } /** - * A factory to create a builder proxy for the type `Specification.CallGRPCWithArguments` - * @returns {Builder} A builder for `Specification.CallGRPCWithArguments` + * A factory to create a builder proxy for the type `Specification.EmitTaskConfiguration` + * @returns {Builder} A builder for `Specification.EmitTaskConfiguration` */ -export const callGRPCWithArgumentsBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const emitTaskConfigurationBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/endpoint-configuration-builder.ts b/src/lib/generated/builders/endpoint-configuration-builder.ts new file mode 100644 index 00000000..c47fe046 --- /dev/null +++ b/src/lib/generated/builders/endpoint-configuration-builder.ts @@ -0,0 +1,48 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.EndpointConfiguration} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.EndpointConfiguration} The built object + */ +function buildingFn( + model: Specification.EndpointConfiguration, + options: BuildOptions, +): Specification.EndpointConfiguration { + const instance = new Classes.EndpointConfiguration(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.EndpointConfiguration; +} + +/** + * A factory to create a builder proxy for the type `Specification.EndpointConfiguration` + * @returns {Builder} A builder for `Specification.EndpointConfiguration` + */ +export const endpointConfigurationBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/endpoint-uri-builder.ts b/src/lib/generated/builders/endpoint-uri-builder.ts new file mode 100644 index 00000000..e4e66124 --- /dev/null +++ b/src/lib/generated/builders/endpoint-uri-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.EndpointUri} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.EndpointUri} The built object + */ +function buildingFn(model: Specification.EndpointUri, options: BuildOptions): Specification.EndpointUri { + const instance = new Classes.EndpointUri(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.EndpointUri; +} + +/** + * A factory to create a builder proxy for the type `Specification.EndpointUri` + * @returns {Builder} A builder for `Specification.EndpointUri` + */ +export const endpointUriBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/error-instance-builder.ts b/src/lib/generated/builders/error-instance-builder.ts new file mode 100644 index 00000000..7f8d6667 --- /dev/null +++ b/src/lib/generated/builders/error-instance-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ErrorInstance} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.ErrorInstance} The built object + */ +function buildingFn(model: Specification.ErrorInstance, options: BuildOptions): Specification.ErrorInstance { + const instance = new Classes.ErrorInstance(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.ErrorInstance; +} + +/** + * A factory to create a builder proxy for the type `Specification.ErrorInstance` + * @returns {Builder} A builder for `Specification.ErrorInstance` + */ +export const errorInstanceBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-task-run-builder.ts b/src/lib/generated/builders/error-type-builder.ts similarity index 71% rename from src/lib/generated/builders/run-task-run-builder.ts rename to src/lib/generated/builders/error-type-builder.ts index 69a5f8c6..50cfc0d4 100644 --- a/src/lib/generated/builders/run-task-run-builder.ts +++ b/src/lib/generated/builders/error-type-builder.ts @@ -26,19 +26,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRun} model The proxied object + * @param {Specification.ErrorType} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.RunTaskRun} The built object + * @returns {Specification.ErrorType} The built object */ -function buildingFn(model: Specification.RunTaskRun, options: BuildOptions): Specification.RunTaskRun { - const instance = new Classes.RunTaskRun(model); +function buildingFn(model: Specification.ErrorType, options: BuildOptions): Specification.ErrorType { + const instance = new Classes.ErrorType(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.RunTaskRun; + return (options.normalize ? instance.normalize() : instance) as Specification.ErrorType; } /** - * A factory to create a builder proxy for the type `Specification.RunTaskRun` - * @returns {Builder} A builder for `Specification.RunTaskRun` + * A factory to create a builder proxy for the type `Specification.ErrorType` + * @returns {Builder} A builder for `Specification.ErrorType` */ -export const runTaskRunBuilder = (model?: Partial): Builder => - builder(model, buildingFn); +export const errorTypeBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/event-filter-with-builder.ts b/src/lib/generated/builders/event-dataschema-builder.ts similarity index 68% rename from src/lib/generated/builders/event-filter-with-builder.ts rename to src/lib/generated/builders/event-dataschema-builder.ts index 19c10d96..f2c270b5 100644 --- a/src/lib/generated/builders/event-filter-with-builder.ts +++ b/src/lib/generated/builders/event-dataschema-builder.ts @@ -26,20 +26,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EventFilterWith} model The proxied object + * @param {Specification.EventDataschema} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.EventFilterWith} The built object + * @returns {Specification.EventDataschema} The built object */ -function buildingFn(model: Specification.EventFilterWith, options: BuildOptions): Specification.EventFilterWith { - const instance = new Classes.EventFilterWith(model); +function buildingFn(model: Specification.EventDataschema, options: BuildOptions): Specification.EventDataschema { + const instance = new Classes.EventDataschema(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.EventFilterWith; + return (options.normalize ? instance.normalize() : instance) as Specification.EventDataschema; } /** - * A factory to create a builder proxy for the type `Specification.EventFilterWith` - * @returns {Builder} A builder for `Specification.EventFilterWith` + * A factory to create a builder proxy for the type `Specification.EventDataschema` + * @returns {Builder} A builder for `Specification.EventDataschema` */ -export const eventFilterWithBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const eventDataschemaBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/event-source-builder.ts b/src/lib/generated/builders/event-source-builder.ts new file mode 100644 index 00000000..bffe682c --- /dev/null +++ b/src/lib/generated/builders/event-source-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.EventSource} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.EventSource} The built object + */ +function buildingFn(model: Specification.EventSource, options: BuildOptions): Specification.EventSource { + const instance = new Classes.EventSource(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.EventSource; +} + +/** + * A factory to create a builder proxy for the type `Specification.EventSource` + * @returns {Builder} A builder for `Specification.EventSource` + */ +export const eventSourceBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/set-task-set-builder.ts b/src/lib/generated/builders/event-time-builder.ts similarity index 71% rename from src/lib/generated/builders/set-task-set-builder.ts rename to src/lib/generated/builders/event-time-builder.ts index cae7c67e..b4504de9 100644 --- a/src/lib/generated/builders/set-task-set-builder.ts +++ b/src/lib/generated/builders/event-time-builder.ts @@ -26,19 +26,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.SetTaskSet} model The proxied object + * @param {Specification.EventTime} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.SetTaskSet} The built object + * @returns {Specification.EventTime} The built object */ -function buildingFn(model: Specification.SetTaskSet, options: BuildOptions): Specification.SetTaskSet { - const instance = new Classes.SetTaskSet(model); +function buildingFn(model: Specification.EventTime, options: BuildOptions): Specification.EventTime { + const instance = new Classes.EventTime(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.SetTaskSet; + return (options.normalize ? instance.normalize() : instance) as Specification.EventTime; } /** - * A factory to create a builder proxy for the type `Specification.SetTaskSet` - * @returns {Builder} A builder for `Specification.SetTaskSet` + * A factory to create a builder proxy for the type `Specification.EventTime` + * @returns {Builder} A builder for `Specification.EventTime` */ -export const setTaskSetBuilder = (model?: Partial): Builder => - builder(model, buildingFn); +export const eventTimeBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/retry-policy-backoff-builder.ts b/src/lib/generated/builders/exponential-back-off-builder.ts similarity index 67% rename from src/lib/generated/builders/retry-policy-backoff-builder.ts rename to src/lib/generated/builders/exponential-back-off-builder.ts index 1b1745ff..af24cc13 100644 --- a/src/lib/generated/builders/retry-policy-backoff-builder.ts +++ b/src/lib/generated/builders/exponential-back-off-builder.ts @@ -26,20 +26,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RetryPolicyBackoff} model The proxied object + * @param {Specification.ExponentialBackOff} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.RetryPolicyBackoff} The built object + * @returns {Specification.ExponentialBackOff} The built object */ -function buildingFn(model: Specification.RetryPolicyBackoff, options: BuildOptions): Specification.RetryPolicyBackoff { - const instance = new Classes.RetryPolicyBackoff(model); +function buildingFn(model: Specification.ExponentialBackOff, options: BuildOptions): Specification.ExponentialBackOff { + const instance = new Classes.ExponentialBackOff(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.RetryPolicyBackoff; + return (options.normalize ? instance.normalize() : instance) as Specification.ExponentialBackOff; } /** - * A factory to create a builder proxy for the type `Specification.RetryPolicyBackoff` - * @returns {Builder} A builder for `Specification.RetryPolicyBackoff` + * A factory to create a builder proxy for the type `Specification.ExponentialBackOff` + * @returns {Builder} A builder for `Specification.ExponentialBackOff` */ -export const retryPolicyBackoffBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const exponentialBackOffBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/export-as-builder.ts b/src/lib/generated/builders/export-as-builder.ts new file mode 100644 index 00000000..5e15fd81 --- /dev/null +++ b/src/lib/generated/builders/export-as-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ExportAs} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.ExportAs} The built object + */ +function buildingFn(model: Specification.ExportAs, options: BuildOptions): Specification.ExportAs { + const instance = new Classes.ExportAs(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.ExportAs; +} + +/** + * A factory to create a builder proxy for the type `Specification.ExportAs` + * @returns {Builder} A builder for `Specification.ExportAs` + */ +export const exportAsBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/extension-item-builder.ts b/src/lib/generated/builders/extension-item-builder.ts new file mode 100644 index 00000000..4e1dc6d9 --- /dev/null +++ b/src/lib/generated/builders/extension-item-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ExtensionItem} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.ExtensionItem} The built object + */ +function buildingFn(model: Specification.ExtensionItem, options: BuildOptions): Specification.ExtensionItem { + const instance = new Classes.ExtensionItem(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.ExtensionItem; +} + +/** + * A factory to create a builder proxy for the type `Specification.ExtensionItem` + * @returns {Builder} A builder for `Specification.ExtensionItem` + */ +export const extensionItemBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/external-script-builder.ts b/src/lib/generated/builders/external-script-builder.ts new file mode 100644 index 00000000..28281b3e --- /dev/null +++ b/src/lib/generated/builders/external-script-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ExternalScript} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.ExternalScript} The built object + */ +function buildingFn(model: Specification.ExternalScript, options: BuildOptions): Specification.ExternalScript { + const instance = new Classes.ExternalScript(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.ExternalScript; +} + +/** + * A factory to create a builder proxy for the type `Specification.ExternalScript` + * @returns {Builder} A builder for `Specification.ExternalScript` + */ +export const externalScriptBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/switch-task-switch-case-builder.ts b/src/lib/generated/builders/for-task-configuration-builder.ts similarity index 69% rename from src/lib/generated/builders/switch-task-switch-case-builder.ts rename to src/lib/generated/builders/for-task-configuration-builder.ts index 7dd54788..4b011958 100644 --- a/src/lib/generated/builders/switch-task-switch-case-builder.ts +++ b/src/lib/generated/builders/for-task-configuration-builder.ts @@ -26,23 +26,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.SwitchTaskSwitchCase} model The proxied object + * @param {Specification.ForTaskConfiguration} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.SwitchTaskSwitchCase} The built object + * @returns {Specification.ForTaskConfiguration} The built object */ function buildingFn( - model: Specification.SwitchTaskSwitchCase, + model: Specification.ForTaskConfiguration, options: BuildOptions, -): Specification.SwitchTaskSwitchCase { - const instance = new Classes.SwitchTaskSwitchCase(model); +): Specification.ForTaskConfiguration { + const instance = new Classes.ForTaskConfiguration(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.SwitchTaskSwitchCase; + return (options.normalize ? instance.normalize() : instance) as Specification.ForTaskConfiguration; } /** - * A factory to create a builder proxy for the type `Specification.SwitchTaskSwitchCase` - * @returns {Builder} A builder for `Specification.SwitchTaskSwitchCase` + * A factory to create a builder proxy for the type `Specification.ForTaskConfiguration` + * @returns {Builder} A builder for `Specification.ForTaskConfiguration` */ -export const switchTaskSwitchCaseBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const forTaskConfigurationBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/fork-task-configuration-builder.ts b/src/lib/generated/builders/fork-task-configuration-builder.ts new file mode 100644 index 00000000..e9f5c732 --- /dev/null +++ b/src/lib/generated/builders/fork-task-configuration-builder.ts @@ -0,0 +1,48 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ForkTaskConfiguration} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.ForkTaskConfiguration} The built object + */ +function buildingFn( + model: Specification.ForkTaskConfiguration, + options: BuildOptions, +): Specification.ForkTaskConfiguration { + const instance = new Classes.ForkTaskConfiguration(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.ForkTaskConfiguration; +} + +/** + * A factory to create a builder proxy for the type `Specification.ForkTaskConfiguration` + * @returns {Builder} A builder for `Specification.ForkTaskConfiguration` + */ +export const forkTaskConfigurationBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/fork-task-fork-builder.ts b/src/lib/generated/builders/fork-task-fork-builder.ts deleted file mode 100644 index 48bd6f05..00000000 --- a/src/lib/generated/builders/fork-task-fork-builder.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { builder, Builder, BuildOptions } from '../../builder'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.ForkTaskFork} model The proxied object - * @param {BuildOptions} options The build options to use - * @returns {Specification.ForkTaskFork} The built object - */ -function buildingFn(model: Specification.ForkTaskFork, options: BuildOptions): Specification.ForkTaskFork { - const instance = new Classes.ForkTaskFork(model); - if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.ForkTaskFork; -} - -/** - * A factory to create a builder proxy for the type `Specification.ForkTaskFork` - * @returns {Builder} A builder for `Specification.ForkTaskFork` - */ -export const forkTaskForkBuilder = (model?: Partial): Builder => - builder(model, buildingFn); diff --git a/src/lib/generated/builders/function-arguments-builder.ts b/src/lib/generated/builders/function-arguments-builder.ts new file mode 100644 index 00000000..8cc6b538 --- /dev/null +++ b/src/lib/generated/builders/function-arguments-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.FunctionArguments} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.FunctionArguments} The built object + */ +function buildingFn(model: Specification.FunctionArguments, options: BuildOptions): Specification.FunctionArguments { + const instance = new Classes.FunctionArguments(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.FunctionArguments; +} + +/** + * A factory to create a builder proxy for the type `Specification.FunctionArguments` + * @returns {Builder} A builder for `Specification.FunctionArguments` + */ +export const functionArgumentsBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/grpc-arguments-builder.ts b/src/lib/generated/builders/grpc-arguments-builder.ts new file mode 100644 index 00000000..0b15d0a2 --- /dev/null +++ b/src/lib/generated/builders/grpc-arguments-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.GRPCArguments} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.GRPCArguments} The built object + */ +function buildingFn(model: Specification.GRPCArguments, options: BuildOptions): Specification.GRPCArguments { + const instance = new Classes.GRPCArguments(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.GRPCArguments; +} + +/** + * A factory to create a builder proxy for the type `Specification.GRPCArguments` + * @returns {Builder} A builder for `Specification.GRPCArguments` + */ +export const gRPCArgumentsBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/http-arguments-builder.ts b/src/lib/generated/builders/http-arguments-builder.ts new file mode 100644 index 00000000..8c7e1cae --- /dev/null +++ b/src/lib/generated/builders/http-arguments-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.HTTPArguments} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.HTTPArguments} The built object + */ +function buildingFn(model: Specification.HTTPArguments, options: BuildOptions): Specification.HTTPArguments { + const instance = new Classes.HTTPArguments(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.HTTPArguments; +} + +/** + * A factory to create a builder proxy for the type `Specification.HTTPArguments` + * @returns {Builder} A builder for `Specification.HTTPArguments` + */ +export const hTTPArgumentsBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/index.ts b/src/lib/generated/builders/index.ts index 48acdce0..335fe45c 100644 --- a/src/lib/generated/builders/index.ts +++ b/src/lib/generated/builders/index.ts @@ -14,93 +14,155 @@ * limitations under the License. */ +export * from './all-event-consumption-strategy-builder'; +export * from './all-event-consumption-strategy-configuration-builder'; +export * from './any-event-consumption-strategy-builder'; +export * from './any-event-consumption-strategy-configuration-builder'; +export * from './async-api-arguments-builder'; export * from './authentication-policy-builder'; -export * from './authentication-policy-basic-builder'; -export * from './authentication-policy-bearer-builder'; -export * from './authentication-policy-oauth2-builder'; -export * from './authentication-policy-oauth2-client-builder'; +export * from './authentication-policy-reference-builder'; +export * from './basic-authentication-policy-builder'; +export * from './basic-authentication-policy-configuration-builder'; +export * from './basic-authentication-properties-builder'; +export * from './bearer-authentication-policy-builder'; +export * from './bearer-authentication-policy-configuration-builder'; +export * from './bearer-authentication-properties-builder'; export * from './call-async-api-builder'; -export * from './call-async-api-with-builder'; -export * from './call-async-api-with-authentication-builder'; export * from './call-function-builder'; -export * from './call-function-with-builder'; export * from './call-grpc-builder'; -export * from './call-grpc-with-builder'; -export * from './call-grpc-with-arguments-builder'; -export * from './call-grpc-with-service-builder'; -export * from './call-grpc-with-service-authentication-builder'; export * from './call-http-builder'; -export * from './call-http-with-builder'; -export * from './call-http-with-endpoint-builder'; export * from './call-open-api-builder'; -export * from './call-open-api-with-builder'; -export * from './call-open-api-with-authentication-builder'; -export * from './call-open-api-with-parameters-builder'; export * from './call-task-builder'; +export * from './catch-errors-builder'; +export * from './constant-backoff-builder'; +export * from './container-builder'; +export * from './container-environment-builder'; +export * from './container-ports-builder'; +export * from './container-volumes-builder'; +export * from './digest-authentication-policy-builder'; +export * from './digest-authentication-policy-configuration-builder'; +export * from './digest-authentication-properties-builder'; export * from './document-builder'; -export * from './document-tags-builder'; export * from './do-task-builder'; export * from './duration-builder'; +export * from './duration-inline-builder'; +export * from './emit-event-definition-builder'; +export * from './emit-event-with-builder'; export * from './emit-task-builder'; -export * from './emit-task-emit-builder'; -export * from './emit-task-emit-event-builder'; +export * from './emit-task-configuration-builder'; export * from './endpoint-builder'; -export * from './endpoint-authentication-builder'; +export * from './endpoint-configuration-builder'; +export * from './endpoint-uri-builder'; export * from './error-builder'; +export * from './error-instance-builder'; +export * from './error-type-builder'; export * from './event-consumption-strategy-builder'; -export * from './event-consumption-strategy-all-builder'; -export * from './event-consumption-strategy-any-builder'; +export * from './event-dataschema-builder'; export * from './event-filter-builder'; export * from './event-filter-correlate-builder'; -export * from './event-filter-with-builder'; +export * from './event-source-builder'; +export * from './event-time-builder'; +export * from './exponential-back-off-builder'; export * from './export-builder'; +export * from './export-as-builder'; export * from './extension-builder'; +export * from './extension-item-builder'; export * from './external-resource-builder'; -export * from './external-resource-authentication-builder'; +export * from './external-script-builder'; export * from './flow-directive-builder'; export * from './fork-task-builder'; -export * from './fork-task-fork-builder'; +export * from './fork-task-configuration-builder'; export * from './for-task-builder'; -export * from './for-task-for-builder'; +export * from './for-task-configuration-builder'; +export * from './function-arguments-builder'; +export * from './grpc-arguments-builder'; +export * from './http-arguments-builder'; +export * from './inline-script-builder'; export * from './input-builder'; +export * from './input-from-builder'; +export * from './linear-backoff-builder'; export * from './listen-task-builder'; -export * from './listen-task-listen-builder'; -export * from './oauth2-token-builder'; +export * from './listen-task-configuration-builder'; +export * from './oauth2-autenthication-data-builder'; +export * from './oauth2-autenthication-data-audiences-builder'; +export * from './oauth2-autenthication-data-client-builder'; +export * from './oauth2-autenthication-data-scopes-builder'; +export * from './oauth2-authentication-policy-builder'; +export * from './oauth2-authentication-policy-configuration-builder'; +export * from './oauth2-authentication-properties-endpoints-builder'; +export * from './oauth2-connect-authentication-properties-builder'; +export * from './oauth2-issuers-builder'; +export * from './oauth2-token-definition-builder'; +export * from './oauth2-token-request-builder'; +export * from './one-event-consumption-strategy-builder'; +export * from './open-api-arguments-builder'; +export * from './open-id-connect-authentication-policy-builder'; +export * from './open-id-connect-authentication-policy-configuration-builder'; +export * from './open-id-connect-authentication-properties-builder'; export * from './output-builder'; +export * from './output-as-builder'; export * from './raise-task-builder'; -export * from './raise-task-raise-builder'; +export * from './raise-task-configuration-builder'; +export * from './raise-task-raise-error-builder'; +export * from './referenceable-authentication-policy-builder'; +export * from './retry-backoff-builder'; +export * from './retry-limit-builder'; +export * from './retry-limit-attempt-builder'; export * from './retry-policy-builder'; -export * from './retry-policy-backoff-builder'; export * from './retry-policy-jitter-builder'; -export * from './retry-policy-limit-builder'; -export * from './retry-policy-limit-attempt-builder'; +export * from './run-container-builder'; +export * from './run-script-builder'; +export * from './run-shell-builder'; export * from './run-task-builder'; -export * from './run-task-run-builder'; -export * from './run-task-run-container-builder'; -export * from './run-task-run-script-builder'; -export * from './run-task-run-shell-builder'; -export * from './run-task-run-shell-arguments-builder'; -export * from './run-task-run-shell-environment-builder'; -export * from './run-task-run-workflow-builder'; -export * from './run-task-run-workflow-input-builder'; +export * from './run-task-configuration-builder'; +export * from './runtime-expression-builder'; +export * from './run-workflow-builder'; export * from './schedule-builder'; export * from './schema-builder'; +export * from './schema-external-builder'; +export * from './schema-inline-builder'; +export * from './script-builder'; +export * from './secret-based-authentication-policy-builder'; export * from './set-task-builder'; -export * from './set-task-set-builder'; +export * from './set-task-configuration-builder'; +export * from './shell-builder'; +export * from './shell-arguments-builder'; +export * from './shell-environment-builder'; +export * from './subflow-configuration-builder'; +export * from './subflow-input-builder'; +export * from './switch-case-builder'; +export * from './switch-item-builder'; export * from './switch-task-builder'; -export * from './switch-task-switch-builder'; -export * from './switch-task-switch-case-builder'; +export * from './switch-task-configuration-builder'; export * from './task-builder'; export * from './task-base-builder'; +export * from './task-base-if-builder'; +export * from './task-base-timeout-builder'; +export * from './task-item-builder'; export * from './task-list-builder'; +export * from './task-metadata-builder'; export * from './timeout-builder'; export * from './try-task-builder'; export * from './try-task-catch-builder'; +export * from './try-task-catch-retry-builder'; export * from './use-builder'; export * from './use-authentications-builder'; export * from './use-errors-builder'; export * from './use-extensions-builder'; export * from './use-functions-builder'; export * from './use-retries-builder'; +export * from './use-secrets-builder'; +export * from './use-timeouts-builder'; export * from './wait-task-builder'; +export * from './with-async-api-payload-builder'; +export * from './with-event-builder'; +export * from './with-grpc-arguments-builder'; +export * from './with-grpc-service-builder'; +export * from './with-http-body-builder'; +export * from './with-http-headers-builder'; +export * from './with-http-query-builder'; +export * from './with-open-api-parameters-builder'; export * from './workflow-builder'; +export * from './workflow-metadata-builder'; +export * from './workflow-tags-builder'; +export * from './workflow-timeout-builder'; diff --git a/src/lib/generated/builders/call-grpc-with-builder.ts b/src/lib/generated/builders/inline-script-builder.ts similarity index 70% rename from src/lib/generated/builders/call-grpc-with-builder.ts rename to src/lib/generated/builders/inline-script-builder.ts index 001b91e2..feb5830f 100644 --- a/src/lib/generated/builders/call-grpc-with-builder.ts +++ b/src/lib/generated/builders/inline-script-builder.ts @@ -26,19 +26,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallGRPCWith} model The proxied object + * @param {Specification.InlineScript} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.CallGRPCWith} The built object + * @returns {Specification.InlineScript} The built object */ -function buildingFn(model: Specification.CallGRPCWith, options: BuildOptions): Specification.CallGRPCWith { - const instance = new Classes.CallGRPCWith(model); +function buildingFn(model: Specification.InlineScript, options: BuildOptions): Specification.InlineScript { + const instance = new Classes.InlineScript(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.CallGRPCWith; + return (options.normalize ? instance.normalize() : instance) as Specification.InlineScript; } /** - * A factory to create a builder proxy for the type `Specification.CallGRPCWith` - * @returns {Builder} A builder for `Specification.CallGRPCWith` + * A factory to create a builder proxy for the type `Specification.InlineScript` + * @returns {Builder} A builder for `Specification.InlineScript` */ -export const callGRPCWithBuilder = (model?: Partial): Builder => - builder(model, buildingFn); +export const inlineScriptBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/input-from-builder.ts b/src/lib/generated/builders/input-from-builder.ts new file mode 100644 index 00000000..3fb40b4d --- /dev/null +++ b/src/lib/generated/builders/input-from-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.InputFrom} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.InputFrom} The built object + */ +function buildingFn(model: Specification.InputFrom, options: BuildOptions): Specification.InputFrom { + const instance = new Classes.InputFrom(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.InputFrom; +} + +/** + * A factory to create a builder proxy for the type `Specification.InputFrom` + * @returns {Builder} A builder for `Specification.InputFrom` + */ +export const inputFromBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/linear-backoff-builder.ts b/src/lib/generated/builders/linear-backoff-builder.ts new file mode 100644 index 00000000..c28cf2b0 --- /dev/null +++ b/src/lib/generated/builders/linear-backoff-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.LinearBackoff} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.LinearBackoff} The built object + */ +function buildingFn(model: Specification.LinearBackoff, options: BuildOptions): Specification.LinearBackoff { + const instance = new Classes.LinearBackoff(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.LinearBackoff; +} + +/** + * A factory to create a builder proxy for the type `Specification.LinearBackoff` + * @returns {Builder} A builder for `Specification.LinearBackoff` + */ +export const linearBackoffBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts b/src/lib/generated/builders/listen-task-configuration-builder.ts similarity index 68% rename from src/lib/generated/builders/retry-policy-limit-attempt-builder.ts rename to src/lib/generated/builders/listen-task-configuration-builder.ts index 4666c778..7db2992b 100644 --- a/src/lib/generated/builders/retry-policy-limit-attempt-builder.ts +++ b/src/lib/generated/builders/listen-task-configuration-builder.ts @@ -26,23 +26,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RetryPolicyLimitAttempt} model The proxied object + * @param {Specification.ListenTaskConfiguration} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.RetryPolicyLimitAttempt} The built object + * @returns {Specification.ListenTaskConfiguration} The built object */ function buildingFn( - model: Specification.RetryPolicyLimitAttempt, + model: Specification.ListenTaskConfiguration, options: BuildOptions, -): Specification.RetryPolicyLimitAttempt { - const instance = new Classes.RetryPolicyLimitAttempt(model); +): Specification.ListenTaskConfiguration { + const instance = new Classes.ListenTaskConfiguration(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.RetryPolicyLimitAttempt; + return (options.normalize ? instance.normalize() : instance) as Specification.ListenTaskConfiguration; } /** - * A factory to create a builder proxy for the type `Specification.RetryPolicyLimitAttempt` - * @returns {Builder} A builder for `Specification.RetryPolicyLimitAttempt` + * A factory to create a builder proxy for the type `Specification.ListenTaskConfiguration` + * @returns {Builder} A builder for `Specification.ListenTaskConfiguration` */ -export const retryPolicyLimitAttemptBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const listenTaskConfigurationBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/event-consumption-strategy-any-builder.ts b/src/lib/generated/builders/oauth2-autenthication-data-audiences-builder.ts similarity index 65% rename from src/lib/generated/builders/event-consumption-strategy-any-builder.ts rename to src/lib/generated/builders/oauth2-autenthication-data-audiences-builder.ts index 13fca0ad..54839c89 100644 --- a/src/lib/generated/builders/event-consumption-strategy-any-builder.ts +++ b/src/lib/generated/builders/oauth2-autenthication-data-audiences-builder.ts @@ -26,23 +26,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying array - * @param {Specification.EventConsumptionStrategyAny} model The proxied array + * @param {Specification.OAuth2AutenthicationDataAudiences} model The proxied array * @param {BuildOptions} options The build options to use - * @returns {Specification.EventConsumptionStrategyAny} The built array + * @returns {Specification.OAuth2AutenthicationDataAudiences} The built array */ function buildingFn( - model: Specification.EventConsumptionStrategyAny, + model: Specification.OAuth2AutenthicationDataAudiences, options: BuildOptions, -): Specification.EventConsumptionStrategyAny { - const instance = new Classes.EventConsumptionStrategyAny(model); +): Specification.OAuth2AutenthicationDataAudiences { + const instance = new Classes.OAuth2AutenthicationDataAudiences(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.EventConsumptionStrategyAny; + return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2AutenthicationDataAudiences; } /** - * A factory to create a builder proxy for the type `Specification.EventConsumptionStrategyAny` - * @returns {ArrayBuilder} A builder for `Specification.EventConsumptionStrategyAny` + * A factory to create a builder proxy for the type `Specification.OAuth2AutenthicationDataAudiences` + * @returns {ArrayBuilder} A builder for `Specification.OAuth2AutenthicationDataAudiences` */ -export const eventConsumptionStrategyAnyBuilder = ( - model?: Specification.EventConsumptionStrategyAny, -): ArrayBuilder => arrayBuilder(model, buildingFn); +export const oAuth2AutenthicationDataAudiencesBuilder = ( + model?: Specification.OAuth2AutenthicationDataAudiences, +): ArrayBuilder => arrayBuilder(model, buildingFn); diff --git a/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts b/src/lib/generated/builders/oauth2-autenthication-data-builder.ts similarity index 67% rename from src/lib/generated/builders/run-task-run-shell-arguments-builder.ts rename to src/lib/generated/builders/oauth2-autenthication-data-builder.ts index 87c40e34..32147621 100644 --- a/src/lib/generated/builders/run-task-run-shell-arguments-builder.ts +++ b/src/lib/generated/builders/oauth2-autenthication-data-builder.ts @@ -26,24 +26,24 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunShellArguments} model The proxied object + * @param {Specification.OAuth2AutenthicationData} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.RunTaskRunShellArguments} The built object + * @returns {Specification.OAuth2AutenthicationData} The built object */ function buildingFn( - model: Specification.RunTaskRunShellArguments, + model: Specification.OAuth2AutenthicationData, options: BuildOptions, -): Specification.RunTaskRunShellArguments { - const instance = new Classes.RunTaskRunShellArguments(model); +): Specification.OAuth2AutenthicationData { + const instance = new Classes.OAuth2AutenthicationData(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.RunTaskRunShellArguments; + return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2AutenthicationData; } /** - * A factory to create a builder proxy for the type `Specification.RunTaskRunShellArguments` - * @returns {Builder} A builder for `Specification.RunTaskRunShellArguments` + * A factory to create a builder proxy for the type `Specification.OAuth2AutenthicationData` + * @returns {Builder} A builder for `Specification.OAuth2AutenthicationData` */ -export const runTaskRunShellArgumentsBuilder = ( - model?: Partial, -): Builder => - builder(model, buildingFn); +export const oAuth2AutenthicationDataBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-open-api-with-parameters-builder.ts b/src/lib/generated/builders/oauth2-autenthication-data-client-builder.ts similarity index 64% rename from src/lib/generated/builders/call-open-api-with-parameters-builder.ts rename to src/lib/generated/builders/oauth2-autenthication-data-client-builder.ts index 099032db..d460fef3 100644 --- a/src/lib/generated/builders/call-open-api-with-parameters-builder.ts +++ b/src/lib/generated/builders/oauth2-autenthication-data-client-builder.ts @@ -26,24 +26,24 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallOpenAPIWithParameters} model The proxied object + * @param {Specification.OAuth2AutenthicationDataClient} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.CallOpenAPIWithParameters} The built object + * @returns {Specification.OAuth2AutenthicationDataClient} The built object */ function buildingFn( - model: Specification.CallOpenAPIWithParameters, + model: Specification.OAuth2AutenthicationDataClient, options: BuildOptions, -): Specification.CallOpenAPIWithParameters { - const instance = new Classes.CallOpenAPIWithParameters(model); +): Specification.OAuth2AutenthicationDataClient { + const instance = new Classes.OAuth2AutenthicationDataClient(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.CallOpenAPIWithParameters; + return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2AutenthicationDataClient; } /** - * A factory to create a builder proxy for the type `Specification.CallOpenAPIWithParameters` - * @returns {Builder} A builder for `Specification.CallOpenAPIWithParameters` + * A factory to create a builder proxy for the type `Specification.OAuth2AutenthicationDataClient` + * @returns {Builder} A builder for `Specification.OAuth2AutenthicationDataClient` */ -export const callOpenAPIWithParametersBuilder = ( - model?: Partial, -): Builder => - builder(model, buildingFn); +export const oAuth2AutenthicationDataClientBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/event-consumption-strategy-all-builder.ts b/src/lib/generated/builders/oauth2-autenthication-data-scopes-builder.ts similarity index 66% rename from src/lib/generated/builders/event-consumption-strategy-all-builder.ts rename to src/lib/generated/builders/oauth2-autenthication-data-scopes-builder.ts index a3ba683c..bf38a980 100644 --- a/src/lib/generated/builders/event-consumption-strategy-all-builder.ts +++ b/src/lib/generated/builders/oauth2-autenthication-data-scopes-builder.ts @@ -26,23 +26,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying array - * @param {Specification.EventConsumptionStrategyAll} model The proxied array + * @param {Specification.OAuth2AutenthicationDataScopes} model The proxied array * @param {BuildOptions} options The build options to use - * @returns {Specification.EventConsumptionStrategyAll} The built array + * @returns {Specification.OAuth2AutenthicationDataScopes} The built array */ function buildingFn( - model: Specification.EventConsumptionStrategyAll, + model: Specification.OAuth2AutenthicationDataScopes, options: BuildOptions, -): Specification.EventConsumptionStrategyAll { - const instance = new Classes.EventConsumptionStrategyAll(model); +): Specification.OAuth2AutenthicationDataScopes { + const instance = new Classes.OAuth2AutenthicationDataScopes(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.EventConsumptionStrategyAll; + return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2AutenthicationDataScopes; } /** - * A factory to create a builder proxy for the type `Specification.EventConsumptionStrategyAll` - * @returns {ArrayBuilder} A builder for `Specification.EventConsumptionStrategyAll` + * A factory to create a builder proxy for the type `Specification.OAuth2AutenthicationDataScopes` + * @returns {ArrayBuilder} A builder for `Specification.OAuth2AutenthicationDataScopes` */ -export const eventConsumptionStrategyAllBuilder = ( - model?: Specification.EventConsumptionStrategyAll, -): ArrayBuilder => arrayBuilder(model, buildingFn); +export const oAuth2AutenthicationDataScopesBuilder = ( + model?: Specification.OAuth2AutenthicationDataScopes, +): ArrayBuilder => arrayBuilder(model, buildingFn); diff --git a/src/lib/generated/builders/run-task-run-shell-environment-builder.ts b/src/lib/generated/builders/oauth2-authentication-policy-builder.ts similarity index 67% rename from src/lib/generated/builders/run-task-run-shell-environment-builder.ts rename to src/lib/generated/builders/oauth2-authentication-policy-builder.ts index 8f903843..b31adac5 100644 --- a/src/lib/generated/builders/run-task-run-shell-environment-builder.ts +++ b/src/lib/generated/builders/oauth2-authentication-policy-builder.ts @@ -26,24 +26,24 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunShellEnvironment} model The proxied object + * @param {Specification.OAuth2AuthenticationPolicy} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.RunTaskRunShellEnvironment} The built object + * @returns {Specification.OAuth2AuthenticationPolicy} The built object */ function buildingFn( - model: Specification.RunTaskRunShellEnvironment, + model: Specification.OAuth2AuthenticationPolicy, options: BuildOptions, -): Specification.RunTaskRunShellEnvironment { - const instance = new Classes.RunTaskRunShellEnvironment(model); +): Specification.OAuth2AuthenticationPolicy { + const instance = new Classes.OAuth2AuthenticationPolicy(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.RunTaskRunShellEnvironment; + return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2AuthenticationPolicy; } /** - * A factory to create a builder proxy for the type `Specification.RunTaskRunShellEnvironment` - * @returns {Builder} A builder for `Specification.RunTaskRunShellEnvironment` + * A factory to create a builder proxy for the type `Specification.OAuth2AuthenticationPolicy` + * @returns {Builder} A builder for `Specification.OAuth2AuthenticationPolicy` */ -export const runTaskRunShellEnvironmentBuilder = ( - model?: Partial, -): Builder => - builder(model, buildingFn); +export const oAuth2AuthenticationPolicyBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/oauth2-authentication-policy-configuration-builder.ts b/src/lib/generated/builders/oauth2-authentication-policy-configuration-builder.ts new file mode 100644 index 00000000..d4053ca9 --- /dev/null +++ b/src/lib/generated/builders/oauth2-authentication-policy-configuration-builder.ts @@ -0,0 +1,49 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.OAuth2AuthenticationPolicyConfiguration} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.OAuth2AuthenticationPolicyConfiguration} The built object + */ +function buildingFn( + model: Specification.OAuth2AuthenticationPolicyConfiguration, + options: BuildOptions, +): Specification.OAuth2AuthenticationPolicyConfiguration { + const instance = new Classes.OAuth2AuthenticationPolicyConfiguration(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2AuthenticationPolicyConfiguration; +} + +/** + * A factory to create a builder proxy for the type `Specification.OAuth2AuthenticationPolicyConfiguration` + * @returns {Builder} A builder for `Specification.OAuth2AuthenticationPolicyConfiguration` + */ +export const oAuth2AuthenticationPolicyConfigurationBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/oauth2-authentication-properties-endpoints-builder.ts b/src/lib/generated/builders/oauth2-authentication-properties-endpoints-builder.ts new file mode 100644 index 00000000..9645fb2b --- /dev/null +++ b/src/lib/generated/builders/oauth2-authentication-properties-endpoints-builder.ts @@ -0,0 +1,49 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.OAuth2AuthenticationPropertiesEndpoints} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.OAuth2AuthenticationPropertiesEndpoints} The built object + */ +function buildingFn( + model: Specification.OAuth2AuthenticationPropertiesEndpoints, + options: BuildOptions, +): Specification.OAuth2AuthenticationPropertiesEndpoints { + const instance = new Classes.OAuth2AuthenticationPropertiesEndpoints(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2AuthenticationPropertiesEndpoints; +} + +/** + * A factory to create a builder proxy for the type `Specification.OAuth2AuthenticationPropertiesEndpoints` + * @returns {Builder} A builder for `Specification.OAuth2AuthenticationPropertiesEndpoints` + */ +export const oAuth2AuthenticationPropertiesEndpointsBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/oauth2-connect-authentication-properties-builder.ts b/src/lib/generated/builders/oauth2-connect-authentication-properties-builder.ts new file mode 100644 index 00000000..f483e6de --- /dev/null +++ b/src/lib/generated/builders/oauth2-connect-authentication-properties-builder.ts @@ -0,0 +1,49 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.OAuth2ConnectAuthenticationProperties} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.OAuth2ConnectAuthenticationProperties} The built object + */ +function buildingFn( + model: Specification.OAuth2ConnectAuthenticationProperties, + options: BuildOptions, +): Specification.OAuth2ConnectAuthenticationProperties { + const instance = new Classes.OAuth2ConnectAuthenticationProperties(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2ConnectAuthenticationProperties; +} + +/** + * A factory to create a builder proxy for the type `Specification.OAuth2ConnectAuthenticationProperties` + * @returns {Builder} A builder for `Specification.OAuth2ConnectAuthenticationProperties` + */ +export const oAuth2ConnectAuthenticationPropertiesBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/oauth2-issuers-builder.ts b/src/lib/generated/builders/oauth2-issuers-builder.ts new file mode 100644 index 00000000..4059e933 --- /dev/null +++ b/src/lib/generated/builders/oauth2-issuers-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying array + * @param {Specification.OAuth2Issuers} model The proxied array + * @param {BuildOptions} options The build options to use + * @returns {Specification.OAuth2Issuers} The built array + */ +function buildingFn(model: Specification.OAuth2Issuers, options: BuildOptions): Specification.OAuth2Issuers { + const instance = new Classes.OAuth2Issuers(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2Issuers; +} + +/** + * A factory to create a builder proxy for the type `Specification.OAuth2Issuers` + * @returns {ArrayBuilder} A builder for `Specification.OAuth2Issuers` + */ +export const oAuth2IssuersBuilder = (model?: Specification.OAuth2Issuers): ArrayBuilder => + arrayBuilder(model, buildingFn); diff --git a/src/lib/generated/builders/oauth2-token-definition-builder.ts b/src/lib/generated/builders/oauth2-token-definition-builder.ts new file mode 100644 index 00000000..2072b0e0 --- /dev/null +++ b/src/lib/generated/builders/oauth2-token-definition-builder.ts @@ -0,0 +1,48 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.OAuth2TokenDefinition} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.OAuth2TokenDefinition} The built object + */ +function buildingFn( + model: Specification.OAuth2TokenDefinition, + options: BuildOptions, +): Specification.OAuth2TokenDefinition { + const instance = new Classes.OAuth2TokenDefinition(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2TokenDefinition; +} + +/** + * A factory to create a builder proxy for the type `Specification.OAuth2TokenDefinition` + * @returns {Builder} A builder for `Specification.OAuth2TokenDefinition` + */ +export const oAuth2TokenDefinitionBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-task-run-workflow-builder.ts b/src/lib/generated/builders/oauth2-token-request-builder.ts similarity index 67% rename from src/lib/generated/builders/run-task-run-workflow-builder.ts rename to src/lib/generated/builders/oauth2-token-request-builder.ts index 1b7bcaed..b772d5cf 100644 --- a/src/lib/generated/builders/run-task-run-workflow-builder.ts +++ b/src/lib/generated/builders/oauth2-token-request-builder.ts @@ -26,20 +26,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunWorkflow} model The proxied object + * @param {Specification.OAuth2TokenRequest} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.RunTaskRunWorkflow} The built object + * @returns {Specification.OAuth2TokenRequest} The built object */ -function buildingFn(model: Specification.RunTaskRunWorkflow, options: BuildOptions): Specification.RunTaskRunWorkflow { - const instance = new Classes.RunTaskRunWorkflow(model); +function buildingFn(model: Specification.OAuth2TokenRequest, options: BuildOptions): Specification.OAuth2TokenRequest { + const instance = new Classes.OAuth2TokenRequest(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.RunTaskRunWorkflow; + return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2TokenRequest; } /** - * A factory to create a builder proxy for the type `Specification.RunTaskRunWorkflow` - * @returns {Builder} A builder for `Specification.RunTaskRunWorkflow` + * A factory to create a builder proxy for the type `Specification.OAuth2TokenRequest` + * @returns {Builder} A builder for `Specification.OAuth2TokenRequest` */ -export const runTaskRunWorkflowBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const oAuth2TokenRequestBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/one-event-consumption-strategy-builder.ts b/src/lib/generated/builders/one-event-consumption-strategy-builder.ts new file mode 100644 index 00000000..642b0825 --- /dev/null +++ b/src/lib/generated/builders/one-event-consumption-strategy-builder.ts @@ -0,0 +1,49 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.OneEventConsumptionStrategy} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.OneEventConsumptionStrategy} The built object + */ +function buildingFn( + model: Specification.OneEventConsumptionStrategy, + options: BuildOptions, +): Specification.OneEventConsumptionStrategy { + const instance = new Classes.OneEventConsumptionStrategy(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.OneEventConsumptionStrategy; +} + +/** + * A factory to create a builder proxy for the type `Specification.OneEventConsumptionStrategy` + * @returns {Builder} A builder for `Specification.OneEventConsumptionStrategy` + */ +export const oneEventConsumptionStrategyBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-function-with-builder.ts b/src/lib/generated/builders/open-api-arguments-builder.ts similarity index 68% rename from src/lib/generated/builders/call-function-with-builder.ts rename to src/lib/generated/builders/open-api-arguments-builder.ts index ea39a9cd..f8d6228e 100644 --- a/src/lib/generated/builders/call-function-with-builder.ts +++ b/src/lib/generated/builders/open-api-arguments-builder.ts @@ -26,20 +26,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallFunctionWith} model The proxied object + * @param {Specification.OpenAPIArguments} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.CallFunctionWith} The built object + * @returns {Specification.OpenAPIArguments} The built object */ -function buildingFn(model: Specification.CallFunctionWith, options: BuildOptions): Specification.CallFunctionWith { - const instance = new Classes.CallFunctionWith(model); +function buildingFn(model: Specification.OpenAPIArguments, options: BuildOptions): Specification.OpenAPIArguments { + const instance = new Classes.OpenAPIArguments(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.CallFunctionWith; + return (options.normalize ? instance.normalize() : instance) as Specification.OpenAPIArguments; } /** - * A factory to create a builder proxy for the type `Specification.CallFunctionWith` - * @returns {Builder} A builder for `Specification.CallFunctionWith` + * A factory to create a builder proxy for the type `Specification.OpenAPIArguments` + * @returns {Builder} A builder for `Specification.OpenAPIArguments` */ -export const callFunctionWithBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const openAPIArgumentsBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts b/src/lib/generated/builders/open-id-connect-authentication-policy-builder.ts similarity index 66% rename from src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts rename to src/lib/generated/builders/open-id-connect-authentication-policy-builder.ts index d69b90a2..4ff389bd 100644 --- a/src/lib/generated/builders/call-grpc-with-service-authentication-builder.ts +++ b/src/lib/generated/builders/open-id-connect-authentication-policy-builder.ts @@ -26,24 +26,24 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallGRPCWithServiceAuthentication} model The proxied object + * @param {Specification.OpenIdConnectAuthenticationPolicy} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.CallGRPCWithServiceAuthentication} The built object + * @returns {Specification.OpenIdConnectAuthenticationPolicy} The built object */ function buildingFn( - model: Specification.CallGRPCWithServiceAuthentication, + model: Specification.OpenIdConnectAuthenticationPolicy, options: BuildOptions, -): Specification.CallGRPCWithServiceAuthentication { - const instance = new Classes.CallGRPCWithServiceAuthentication(model); +): Specification.OpenIdConnectAuthenticationPolicy { + const instance = new Classes.OpenIdConnectAuthenticationPolicy(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.CallGRPCWithServiceAuthentication; + return (options.normalize ? instance.normalize() : instance) as Specification.OpenIdConnectAuthenticationPolicy; } /** - * A factory to create a builder proxy for the type `Specification.CallGRPCWithServiceAuthentication` - * @returns {Builder} A builder for `Specification.CallGRPCWithServiceAuthentication` + * A factory to create a builder proxy for the type `Specification.OpenIdConnectAuthenticationPolicy` + * @returns {Builder} A builder for `Specification.OpenIdConnectAuthenticationPolicy` */ -export const callGRPCWithServiceAuthenticationBuilder = ( - model?: Partial, -): Builder => - builder(model, buildingFn); +export const openIdConnectAuthenticationPolicyBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/open-id-connect-authentication-policy-configuration-builder.ts b/src/lib/generated/builders/open-id-connect-authentication-policy-configuration-builder.ts new file mode 100644 index 00000000..9f379eca --- /dev/null +++ b/src/lib/generated/builders/open-id-connect-authentication-policy-configuration-builder.ts @@ -0,0 +1,51 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.OpenIdConnectAuthenticationPolicyConfiguration} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.OpenIdConnectAuthenticationPolicyConfiguration} The built object + */ +function buildingFn( + model: Specification.OpenIdConnectAuthenticationPolicyConfiguration, + options: BuildOptions, +): Specification.OpenIdConnectAuthenticationPolicyConfiguration { + const instance = new Classes.OpenIdConnectAuthenticationPolicyConfiguration(model); + if (options.validate) instance.validate(); + return ( + options.normalize ? instance.normalize() : instance + ) as Specification.OpenIdConnectAuthenticationPolicyConfiguration; +} + +/** + * A factory to create a builder proxy for the type `Specification.OpenIdConnectAuthenticationPolicyConfiguration` + * @returns {Builder} A builder for `Specification.OpenIdConnectAuthenticationPolicyConfiguration` + */ +export const openIdConnectAuthenticationPolicyConfigurationBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/open-id-connect-authentication-properties-builder.ts b/src/lib/generated/builders/open-id-connect-authentication-properties-builder.ts new file mode 100644 index 00000000..c4ccf9ef --- /dev/null +++ b/src/lib/generated/builders/open-id-connect-authentication-properties-builder.ts @@ -0,0 +1,49 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.OpenIdConnectAuthenticationProperties} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.OpenIdConnectAuthenticationProperties} The built object + */ +function buildingFn( + model: Specification.OpenIdConnectAuthenticationProperties, + options: BuildOptions, +): Specification.OpenIdConnectAuthenticationProperties { + const instance = new Classes.OpenIdConnectAuthenticationProperties(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.OpenIdConnectAuthenticationProperties; +} + +/** + * A factory to create a builder proxy for the type `Specification.OpenIdConnectAuthenticationProperties` + * @returns {Builder} A builder for `Specification.OpenIdConnectAuthenticationProperties` + */ +export const openIdConnectAuthenticationPropertiesBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/output-as-builder.ts b/src/lib/generated/builders/output-as-builder.ts new file mode 100644 index 00000000..fe8015fe --- /dev/null +++ b/src/lib/generated/builders/output-as-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.OutputAs} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.OutputAs} The built object + */ +function buildingFn(model: Specification.OutputAs, options: BuildOptions): Specification.OutputAs { + const instance = new Classes.OutputAs(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.OutputAs; +} + +/** + * A factory to create a builder proxy for the type `Specification.OutputAs` + * @returns {Builder} A builder for `Specification.OutputAs` + */ +export const outputAsBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/endpoint-authentication-builder.ts b/src/lib/generated/builders/raise-task-configuration-builder.ts similarity index 68% rename from src/lib/generated/builders/endpoint-authentication-builder.ts rename to src/lib/generated/builders/raise-task-configuration-builder.ts index a356afbd..b0a6d7ee 100644 --- a/src/lib/generated/builders/endpoint-authentication-builder.ts +++ b/src/lib/generated/builders/raise-task-configuration-builder.ts @@ -26,23 +26,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EndpointAuthentication} model The proxied object + * @param {Specification.RaiseTaskConfiguration} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.EndpointAuthentication} The built object + * @returns {Specification.RaiseTaskConfiguration} The built object */ function buildingFn( - model: Specification.EndpointAuthentication, + model: Specification.RaiseTaskConfiguration, options: BuildOptions, -): Specification.EndpointAuthentication { - const instance = new Classes.EndpointAuthentication(model); +): Specification.RaiseTaskConfiguration { + const instance = new Classes.RaiseTaskConfiguration(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.EndpointAuthentication; + return (options.normalize ? instance.normalize() : instance) as Specification.RaiseTaskConfiguration; } /** - * A factory to create a builder proxy for the type `Specification.EndpointAuthentication` - * @returns {Builder} A builder for `Specification.EndpointAuthentication` + * A factory to create a builder proxy for the type `Specification.RaiseTaskConfiguration` + * @returns {Builder} A builder for `Specification.RaiseTaskConfiguration` */ -export const endpointAuthenticationBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const raiseTaskConfigurationBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-grpc-with-service-builder.ts b/src/lib/generated/builders/raise-task-raise-error-builder.ts similarity index 69% rename from src/lib/generated/builders/call-grpc-with-service-builder.ts rename to src/lib/generated/builders/raise-task-raise-error-builder.ts index 80b02313..912815de 100644 --- a/src/lib/generated/builders/call-grpc-with-service-builder.ts +++ b/src/lib/generated/builders/raise-task-raise-error-builder.ts @@ -26,23 +26,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallGRPCWithService} model The proxied object + * @param {Specification.RaiseTaskRaiseError} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.CallGRPCWithService} The built object + * @returns {Specification.RaiseTaskRaiseError} The built object */ function buildingFn( - model: Specification.CallGRPCWithService, + model: Specification.RaiseTaskRaiseError, options: BuildOptions, -): Specification.CallGRPCWithService { - const instance = new Classes.CallGRPCWithService(model); +): Specification.RaiseTaskRaiseError { + const instance = new Classes.RaiseTaskRaiseError(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.CallGRPCWithService; + return (options.normalize ? instance.normalize() : instance) as Specification.RaiseTaskRaiseError; } /** - * A factory to create a builder proxy for the type `Specification.CallGRPCWithService` - * @returns {Builder} A builder for `Specification.CallGRPCWithService` + * A factory to create a builder proxy for the type `Specification.RaiseTaskRaiseError` + * @returns {Builder} A builder for `Specification.RaiseTaskRaiseError` */ -export const callGRPCWithServiceBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const raiseTaskRaiseErrorBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts b/src/lib/generated/builders/referenceable-authentication-policy-builder.ts similarity index 63% rename from src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts rename to src/lib/generated/builders/referenceable-authentication-policy-builder.ts index e1ae989b..15e37d3a 100644 --- a/src/lib/generated/builders/authentication-policy-oauth2-client-builder.ts +++ b/src/lib/generated/builders/referenceable-authentication-policy-builder.ts @@ -26,24 +26,24 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.AuthenticationPolicyOauth2Client} model The proxied object + * @param {Specification.ReferenceableAuthenticationPolicy} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.AuthenticationPolicyOauth2Client} The built object + * @returns {Specification.ReferenceableAuthenticationPolicy} The built object */ function buildingFn( - model: Specification.AuthenticationPolicyOauth2Client, + model: Specification.ReferenceableAuthenticationPolicy, options: BuildOptions, -): Specification.AuthenticationPolicyOauth2Client { - const instance = new Classes.AuthenticationPolicyOauth2Client(model); +): Specification.ReferenceableAuthenticationPolicy { + const instance = new Classes.ReferenceableAuthenticationPolicy(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.AuthenticationPolicyOauth2Client; + return (options.normalize ? instance.normalize() : instance) as Specification.ReferenceableAuthenticationPolicy; } /** - * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyOauth2Client` - * @returns {Builder} A builder for `Specification.AuthenticationPolicyOauth2Client` + * A factory to create a builder proxy for the type `Specification.ReferenceableAuthenticationPolicy` + * @returns {Builder} A builder for `Specification.ReferenceableAuthenticationPolicy` */ -export const authenticationPolicyOauth2ClientBuilder = ( - model?: Partial, -): Builder => - builder(model, buildingFn); +export const referenceableAuthenticationPolicyBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/emit-task-emit-builder.ts b/src/lib/generated/builders/retry-backoff-builder.ts similarity index 70% rename from src/lib/generated/builders/emit-task-emit-builder.ts rename to src/lib/generated/builders/retry-backoff-builder.ts index 2217eab7..1edd8712 100644 --- a/src/lib/generated/builders/emit-task-emit-builder.ts +++ b/src/lib/generated/builders/retry-backoff-builder.ts @@ -26,19 +26,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EmitTaskEmit} model The proxied object + * @param {Specification.RetryBackoff} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.EmitTaskEmit} The built object + * @returns {Specification.RetryBackoff} The built object */ -function buildingFn(model: Specification.EmitTaskEmit, options: BuildOptions): Specification.EmitTaskEmit { - const instance = new Classes.EmitTaskEmit(model); +function buildingFn(model: Specification.RetryBackoff, options: BuildOptions): Specification.RetryBackoff { + const instance = new Classes.RetryBackoff(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.EmitTaskEmit; + return (options.normalize ? instance.normalize() : instance) as Specification.RetryBackoff; } /** - * A factory to create a builder proxy for the type `Specification.EmitTaskEmit` - * @returns {Builder} A builder for `Specification.EmitTaskEmit` + * A factory to create a builder proxy for the type `Specification.RetryBackoff` + * @returns {Builder} A builder for `Specification.RetryBackoff` */ -export const emitTaskEmitBuilder = (model?: Partial): Builder => - builder(model, buildingFn); +export const retryBackoffBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/emit-task-emit-event-builder.ts b/src/lib/generated/builders/retry-limit-attempt-builder.ts similarity index 69% rename from src/lib/generated/builders/emit-task-emit-event-builder.ts rename to src/lib/generated/builders/retry-limit-attempt-builder.ts index c5b21691..24f2ea06 100644 --- a/src/lib/generated/builders/emit-task-emit-event-builder.ts +++ b/src/lib/generated/builders/retry-limit-attempt-builder.ts @@ -26,20 +26,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.EmitTaskEmitEvent} model The proxied object + * @param {Specification.RetryLimitAttempt} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.EmitTaskEmitEvent} The built object + * @returns {Specification.RetryLimitAttempt} The built object */ -function buildingFn(model: Specification.EmitTaskEmitEvent, options: BuildOptions): Specification.EmitTaskEmitEvent { - const instance = new Classes.EmitTaskEmitEvent(model); +function buildingFn(model: Specification.RetryLimitAttempt, options: BuildOptions): Specification.RetryLimitAttempt { + const instance = new Classes.RetryLimitAttempt(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.EmitTaskEmitEvent; + return (options.normalize ? instance.normalize() : instance) as Specification.RetryLimitAttempt; } /** - * A factory to create a builder proxy for the type `Specification.EmitTaskEmitEvent` - * @returns {Builder} A builder for `Specification.EmitTaskEmitEvent` + * A factory to create a builder proxy for the type `Specification.RetryLimitAttempt` + * @returns {Builder} A builder for `Specification.RetryLimitAttempt` */ -export const emitTaskEmitEventBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const retryLimitAttemptBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/oauth2-token-builder.ts b/src/lib/generated/builders/retry-limit-builder.ts similarity index 71% rename from src/lib/generated/builders/oauth2-token-builder.ts rename to src/lib/generated/builders/retry-limit-builder.ts index f86d2c8a..0f20c395 100644 --- a/src/lib/generated/builders/oauth2-token-builder.ts +++ b/src/lib/generated/builders/retry-limit-builder.ts @@ -26,19 +26,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.Oauth2Token} model The proxied object + * @param {Specification.RetryLimit} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.Oauth2Token} The built object + * @returns {Specification.RetryLimit} The built object */ -function buildingFn(model: Specification.Oauth2Token, options: BuildOptions): Specification.Oauth2Token { - const instance = new Classes.Oauth2Token(model); +function buildingFn(model: Specification.RetryLimit, options: BuildOptions): Specification.RetryLimit { + const instance = new Classes.RetryLimit(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.Oauth2Token; + return (options.normalize ? instance.normalize() : instance) as Specification.RetryLimit; } /** - * A factory to create a builder proxy for the type `Specification.Oauth2Token` - * @returns {Builder} A builder for `Specification.Oauth2Token` + * A factory to create a builder proxy for the type `Specification.RetryLimit` + * @returns {Builder} A builder for `Specification.RetryLimit` */ -export const oauth2TokenBuilder = (model?: Partial): Builder => - builder(model, buildingFn); +export const retryLimitBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-http-with-builder.ts b/src/lib/generated/builders/run-container-builder.ts similarity index 70% rename from src/lib/generated/builders/call-http-with-builder.ts rename to src/lib/generated/builders/run-container-builder.ts index 9a6889e9..8702009e 100644 --- a/src/lib/generated/builders/call-http-with-builder.ts +++ b/src/lib/generated/builders/run-container-builder.ts @@ -26,19 +26,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallHTTPWith} model The proxied object + * @param {Specification.RunContainer} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.CallHTTPWith} The built object + * @returns {Specification.RunContainer} The built object */ -function buildingFn(model: Specification.CallHTTPWith, options: BuildOptions): Specification.CallHTTPWith { - const instance = new Classes.CallHTTPWith(model); +function buildingFn(model: Specification.RunContainer, options: BuildOptions): Specification.RunContainer { + const instance = new Classes.RunContainer(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.CallHTTPWith; + return (options.normalize ? instance.normalize() : instance) as Specification.RunContainer; } /** - * A factory to create a builder proxy for the type `Specification.CallHTTPWith` - * @returns {Builder} A builder for `Specification.CallHTTPWith` + * A factory to create a builder proxy for the type `Specification.RunContainer` + * @returns {Builder} A builder for `Specification.RunContainer` */ -export const callHTTPWithBuilder = (model?: Partial): Builder => - builder(model, buildingFn); +export const runContainerBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-script-builder.ts b/src/lib/generated/builders/run-script-builder.ts new file mode 100644 index 00000000..700e6c60 --- /dev/null +++ b/src/lib/generated/builders/run-script-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.RunScript} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RunScript} The built object + */ +function buildingFn(model: Specification.RunScript, options: BuildOptions): Specification.RunScript { + const instance = new Classes.RunScript(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RunScript; +} + +/** + * A factory to create a builder proxy for the type `Specification.RunScript` + * @returns {Builder} A builder for `Specification.RunScript` + */ +export const runScriptBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-shell-builder.ts b/src/lib/generated/builders/run-shell-builder.ts new file mode 100644 index 00000000..c77104ec --- /dev/null +++ b/src/lib/generated/builders/run-shell-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.RunShell} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RunShell} The built object + */ +function buildingFn(model: Specification.RunShell, options: BuildOptions): Specification.RunShell { + const instance = new Classes.RunShell(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RunShell; +} + +/** + * A factory to create a builder proxy for the type `Specification.RunShell` + * @returns {Builder} A builder for `Specification.RunShell` + */ +export const runShellBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-task-configuration-builder.ts b/src/lib/generated/builders/run-task-configuration-builder.ts new file mode 100644 index 00000000..48d9a4e7 --- /dev/null +++ b/src/lib/generated/builders/run-task-configuration-builder.ts @@ -0,0 +1,48 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.RunTaskConfiguration} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RunTaskConfiguration} The built object + */ +function buildingFn( + model: Specification.RunTaskConfiguration, + options: BuildOptions, +): Specification.RunTaskConfiguration { + const instance = new Classes.RunTaskConfiguration(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RunTaskConfiguration; +} + +/** + * A factory to create a builder proxy for the type `Specification.RunTaskConfiguration` + * @returns {Builder} A builder for `Specification.RunTaskConfiguration` + */ +export const runTaskConfigurationBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-task-run-script-builder.ts b/src/lib/generated/builders/run-task-run-script-builder.ts deleted file mode 100644 index 525fad7a..00000000 --- a/src/lib/generated/builders/run-task-run-script-builder.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { builder, Builder, BuildOptions } from '../../builder'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunScript} model The proxied object - * @param {BuildOptions} options The build options to use - * @returns {Specification.RunTaskRunScript} The built object - */ -function buildingFn(model: Specification.RunTaskRunScript, options: BuildOptions): Specification.RunTaskRunScript { - const instance = new Classes.RunTaskRunScript(model); - if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.RunTaskRunScript; -} - -/** - * A factory to create a builder proxy for the type `Specification.RunTaskRunScript` - * @returns {Builder} A builder for `Specification.RunTaskRunScript` - */ -export const runTaskRunScriptBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-workflow-builder.ts b/src/lib/generated/builders/run-workflow-builder.ts new file mode 100644 index 00000000..1be54b6e --- /dev/null +++ b/src/lib/generated/builders/run-workflow-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.RunWorkflow} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RunWorkflow} The built object + */ +function buildingFn(model: Specification.RunWorkflow, options: BuildOptions): Specification.RunWorkflow { + const instance = new Classes.RunWorkflow(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RunWorkflow; +} + +/** + * A factory to create a builder proxy for the type `Specification.RunWorkflow` + * @returns {Builder} A builder for `Specification.RunWorkflow` + */ +export const runWorkflowBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/runtime-expression-builder.ts b/src/lib/generated/builders/runtime-expression-builder.ts new file mode 100644 index 00000000..2640796d --- /dev/null +++ b/src/lib/generated/builders/runtime-expression-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.RuntimeExpression} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.RuntimeExpression} The built object + */ +function buildingFn(model: Specification.RuntimeExpression, options: BuildOptions): Specification.RuntimeExpression { + const instance = new Classes.RuntimeExpression(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.RuntimeExpression; +} + +/** + * A factory to create a builder proxy for the type `Specification.RuntimeExpression` + * @returns {Builder} A builder for `Specification.RuntimeExpression` + */ +export const runtimeExpressionBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/schema-external-builder.ts b/src/lib/generated/builders/schema-external-builder.ts new file mode 100644 index 00000000..870b27c2 --- /dev/null +++ b/src/lib/generated/builders/schema-external-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.SchemaExternal} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.SchemaExternal} The built object + */ +function buildingFn(model: Specification.SchemaExternal, options: BuildOptions): Specification.SchemaExternal { + const instance = new Classes.SchemaExternal(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.SchemaExternal; +} + +/** + * A factory to create a builder proxy for the type `Specification.SchemaExternal` + * @returns {Builder} A builder for `Specification.SchemaExternal` + */ +export const schemaExternalBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/document-tags-builder.ts b/src/lib/generated/builders/schema-inline-builder.ts similarity index 70% rename from src/lib/generated/builders/document-tags-builder.ts rename to src/lib/generated/builders/schema-inline-builder.ts index abbb8534..38e7e67a 100644 --- a/src/lib/generated/builders/document-tags-builder.ts +++ b/src/lib/generated/builders/schema-inline-builder.ts @@ -26,19 +26,19 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.DocumentTags} model The proxied object + * @param {Specification.SchemaInline} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.DocumentTags} The built object + * @returns {Specification.SchemaInline} The built object */ -function buildingFn(model: Specification.DocumentTags, options: BuildOptions): Specification.DocumentTags { - const instance = new Classes.DocumentTags(model); +function buildingFn(model: Specification.SchemaInline, options: BuildOptions): Specification.SchemaInline { + const instance = new Classes.SchemaInline(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.DocumentTags; + return (options.normalize ? instance.normalize() : instance) as Specification.SchemaInline; } /** - * A factory to create a builder proxy for the type `Specification.DocumentTags` - * @returns {Builder} A builder for `Specification.DocumentTags` + * A factory to create a builder proxy for the type `Specification.SchemaInline` + * @returns {Builder} A builder for `Specification.SchemaInline` */ -export const documentTagsBuilder = (model?: Partial): Builder => - builder(model, buildingFn); +export const schemaInlineBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/script-builder.ts b/src/lib/generated/builders/script-builder.ts new file mode 100644 index 00000000..c9a6300d --- /dev/null +++ b/src/lib/generated/builders/script-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Script} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.Script} The built object + */ +function buildingFn(model: Specification.Script, options: BuildOptions): Specification.Script { + const instance = new Classes.Script(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.Script; +} + +/** + * A factory to create a builder proxy for the type `Specification.Script` + * @returns {Builder} A builder for `Specification.Script` + */ +export const scriptBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/secret-based-authentication-policy-builder.ts b/src/lib/generated/builders/secret-based-authentication-policy-builder.ts new file mode 100644 index 00000000..f8960756 --- /dev/null +++ b/src/lib/generated/builders/secret-based-authentication-policy-builder.ts @@ -0,0 +1,49 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.SecretBasedAuthenticationPolicy} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.SecretBasedAuthenticationPolicy} The built object + */ +function buildingFn( + model: Specification.SecretBasedAuthenticationPolicy, + options: BuildOptions, +): Specification.SecretBasedAuthenticationPolicy { + const instance = new Classes.SecretBasedAuthenticationPolicy(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.SecretBasedAuthenticationPolicy; +} + +/** + * A factory to create a builder proxy for the type `Specification.SecretBasedAuthenticationPolicy` + * @returns {Builder} A builder for `Specification.SecretBasedAuthenticationPolicy` + */ +export const secretBasedAuthenticationPolicyBuilder = ( + model?: Partial, +): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/set-task-configuration-builder.ts b/src/lib/generated/builders/set-task-configuration-builder.ts new file mode 100644 index 00000000..ed02a6ff --- /dev/null +++ b/src/lib/generated/builders/set-task-configuration-builder.ts @@ -0,0 +1,48 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.SetTaskConfiguration} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.SetTaskConfiguration} The built object + */ +function buildingFn( + model: Specification.SetTaskConfiguration, + options: BuildOptions, +): Specification.SetTaskConfiguration { + const instance = new Classes.SetTaskConfiguration(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.SetTaskConfiguration; +} + +/** + * A factory to create a builder proxy for the type `Specification.SetTaskConfiguration` + * @returns {Builder} A builder for `Specification.SetTaskConfiguration` + */ +export const setTaskConfigurationBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/shell-arguments-builder.ts b/src/lib/generated/builders/shell-arguments-builder.ts new file mode 100644 index 00000000..21555fbb --- /dev/null +++ b/src/lib/generated/builders/shell-arguments-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.ShellArguments} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.ShellArguments} The built object + */ +function buildingFn(model: Specification.ShellArguments, options: BuildOptions): Specification.ShellArguments { + const instance = new Classes.ShellArguments(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.ShellArguments; +} + +/** + * A factory to create a builder proxy for the type `Specification.ShellArguments` + * @returns {Builder} A builder for `Specification.ShellArguments` + */ +export const shellArgumentsBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/shell-builder.ts b/src/lib/generated/builders/shell-builder.ts new file mode 100644 index 00000000..bdcc6e4b --- /dev/null +++ b/src/lib/generated/builders/shell-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Shell} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.Shell} The built object + */ +function buildingFn(model: Specification.Shell, options: BuildOptions): Specification.Shell { + const instance = new Classes.Shell(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.Shell; +} + +/** + * A factory to create a builder proxy for the type `Specification.Shell` + * @returns {Builder} A builder for `Specification.Shell` + */ +export const shellBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/retry-policy-limit-builder.ts b/src/lib/generated/builders/shell-environment-builder.ts similarity index 68% rename from src/lib/generated/builders/retry-policy-limit-builder.ts rename to src/lib/generated/builders/shell-environment-builder.ts index 3aec76a5..41ad8f66 100644 --- a/src/lib/generated/builders/retry-policy-limit-builder.ts +++ b/src/lib/generated/builders/shell-environment-builder.ts @@ -26,20 +26,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RetryPolicyLimit} model The proxied object + * @param {Specification.ShellEnvironment} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.RetryPolicyLimit} The built object + * @returns {Specification.ShellEnvironment} The built object */ -function buildingFn(model: Specification.RetryPolicyLimit, options: BuildOptions): Specification.RetryPolicyLimit { - const instance = new Classes.RetryPolicyLimit(model); +function buildingFn(model: Specification.ShellEnvironment, options: BuildOptions): Specification.ShellEnvironment { + const instance = new Classes.ShellEnvironment(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.RetryPolicyLimit; + return (options.normalize ? instance.normalize() : instance) as Specification.ShellEnvironment; } /** - * A factory to create a builder proxy for the type `Specification.RetryPolicyLimit` - * @returns {Builder} A builder for `Specification.RetryPolicyLimit` + * A factory to create a builder proxy for the type `Specification.ShellEnvironment` + * @returns {Builder} A builder for `Specification.ShellEnvironment` */ -export const retryPolicyLimitBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const shellEnvironmentBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/subflow-configuration-builder.ts b/src/lib/generated/builders/subflow-configuration-builder.ts new file mode 100644 index 00000000..6f174f72 --- /dev/null +++ b/src/lib/generated/builders/subflow-configuration-builder.ts @@ -0,0 +1,48 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.SubflowConfiguration} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.SubflowConfiguration} The built object + */ +function buildingFn( + model: Specification.SubflowConfiguration, + options: BuildOptions, +): Specification.SubflowConfiguration { + const instance = new Classes.SubflowConfiguration(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.SubflowConfiguration; +} + +/** + * A factory to create a builder proxy for the type `Specification.SubflowConfiguration` + * @returns {Builder} A builder for `Specification.SubflowConfiguration` + */ +export const subflowConfigurationBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/subflow-input-builder.ts b/src/lib/generated/builders/subflow-input-builder.ts new file mode 100644 index 00000000..4cfe328a --- /dev/null +++ b/src/lib/generated/builders/subflow-input-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.SubflowInput} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.SubflowInput} The built object + */ +function buildingFn(model: Specification.SubflowInput, options: BuildOptions): Specification.SubflowInput { + const instance = new Classes.SubflowInput(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.SubflowInput; +} + +/** + * A factory to create a builder proxy for the type `Specification.SubflowInput` + * @returns {Builder} A builder for `Specification.SubflowInput` + */ +export const subflowInputBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/switch-case-builder.ts b/src/lib/generated/builders/switch-case-builder.ts new file mode 100644 index 00000000..37d12500 --- /dev/null +++ b/src/lib/generated/builders/switch-case-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.SwitchCase} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.SwitchCase} The built object + */ +function buildingFn(model: Specification.SwitchCase, options: BuildOptions): Specification.SwitchCase { + const instance = new Classes.SwitchCase(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.SwitchCase; +} + +/** + * A factory to create a builder proxy for the type `Specification.SwitchCase` + * @returns {Builder} A builder for `Specification.SwitchCase` + */ +export const switchCaseBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/switch-item-builder.ts b/src/lib/generated/builders/switch-item-builder.ts new file mode 100644 index 00000000..8951a6ae --- /dev/null +++ b/src/lib/generated/builders/switch-item-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.SwitchItem} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.SwitchItem} The built object + */ +function buildingFn(model: Specification.SwitchItem, options: BuildOptions): Specification.SwitchItem { + const instance = new Classes.SwitchItem(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.SwitchItem; +} + +/** + * A factory to create a builder proxy for the type `Specification.SwitchItem` + * @returns {Builder} A builder for `Specification.SwitchItem` + */ +export const switchItemBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-task-run-workflow-input-builder.ts b/src/lib/generated/builders/switch-task-configuration-builder.ts similarity index 67% rename from src/lib/generated/builders/run-task-run-workflow-input-builder.ts rename to src/lib/generated/builders/switch-task-configuration-builder.ts index a01d0a71..3638ed0e 100644 --- a/src/lib/generated/builders/run-task-run-workflow-input-builder.ts +++ b/src/lib/generated/builders/switch-task-configuration-builder.ts @@ -26,23 +26,23 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunWorkflowInput} model The proxied object + * @param {Specification.SwitchTaskConfiguration} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.RunTaskRunWorkflowInput} The built object + * @returns {Specification.SwitchTaskConfiguration} The built object */ function buildingFn( - model: Specification.RunTaskRunWorkflowInput, + model: Specification.SwitchTaskConfiguration, options: BuildOptions, -): Specification.RunTaskRunWorkflowInput { - const instance = new Classes.RunTaskRunWorkflowInput(model); +): Specification.SwitchTaskConfiguration { + const instance = new Classes.SwitchTaskConfiguration(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.RunTaskRunWorkflowInput; + return (options.normalize ? instance.normalize() : instance) as unknown as Specification.SwitchTaskConfiguration; } /** - * A factory to create a builder proxy for the type `Specification.RunTaskRunWorkflowInput` - * @returns {Builder} A builder for `Specification.RunTaskRunWorkflowInput` + * A factory to create a builder proxy for the type `Specification.SwitchTaskConfiguration` + * @returns {Builder} A builder for `Specification.SwitchTaskConfiguration` */ -export const runTaskRunWorkflowInputBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const switchTaskConfigurationBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/switch-task-switch-builder.ts b/src/lib/generated/builders/switch-task-switch-builder.ts deleted file mode 100644 index 32381a8f..00000000 --- a/src/lib/generated/builders/switch-task-switch-builder.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { builder, Builder, BuildOptions } from '../../builder'; -import { Classes } from '../classes'; -import { Specification } from '../definitions'; - -/** - * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.SwitchTaskSwitch} model The proxied object - * @param {BuildOptions} options The build options to use - * @returns {Specification.SwitchTaskSwitch} The built object - */ -function buildingFn(model: Specification.SwitchTaskSwitch, options: BuildOptions): Specification.SwitchTaskSwitch { - const instance = new Classes.SwitchTaskSwitch(model); - if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as unknown as Specification.SwitchTaskSwitch; -} - -/** - * A factory to create a builder proxy for the type `Specification.SwitchTaskSwitch` - * @returns {Builder} A builder for `Specification.SwitchTaskSwitch` - */ -export const switchTaskSwitchBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/task-base-if-builder.ts b/src/lib/generated/builders/task-base-if-builder.ts new file mode 100644 index 00000000..2fba8d4c --- /dev/null +++ b/src/lib/generated/builders/task-base-if-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.TaskBaseIf} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.TaskBaseIf} The built object + */ +function buildingFn(model: Specification.TaskBaseIf, options: BuildOptions): Specification.TaskBaseIf { + const instance = new Classes.TaskBaseIf(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.TaskBaseIf; +} + +/** + * A factory to create a builder proxy for the type `Specification.TaskBaseIf` + * @returns {Builder} A builder for `Specification.TaskBaseIf` + */ +export const taskBaseIfBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/run-task-run-shell-builder.ts b/src/lib/generated/builders/task-base-timeout-builder.ts similarity index 68% rename from src/lib/generated/builders/run-task-run-shell-builder.ts rename to src/lib/generated/builders/task-base-timeout-builder.ts index 407830da..0b9484da 100644 --- a/src/lib/generated/builders/run-task-run-shell-builder.ts +++ b/src/lib/generated/builders/task-base-timeout-builder.ts @@ -26,20 +26,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.RunTaskRunShell} model The proxied object + * @param {Specification.TaskBaseTimeout} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.RunTaskRunShell} The built object + * @returns {Specification.TaskBaseTimeout} The built object */ -function buildingFn(model: Specification.RunTaskRunShell, options: BuildOptions): Specification.RunTaskRunShell { - const instance = new Classes.RunTaskRunShell(model); +function buildingFn(model: Specification.TaskBaseTimeout, options: BuildOptions): Specification.TaskBaseTimeout { + const instance = new Classes.TaskBaseTimeout(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.RunTaskRunShell; + return (options.normalize ? instance.normalize() : instance) as Specification.TaskBaseTimeout; } /** - * A factory to create a builder proxy for the type `Specification.RunTaskRunShell` - * @returns {Builder} A builder for `Specification.RunTaskRunShell` + * A factory to create a builder proxy for the type `Specification.TaskBaseTimeout` + * @returns {Builder} A builder for `Specification.TaskBaseTimeout` */ -export const runTaskRunShellBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const taskBaseTimeoutBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/task-item-builder.ts b/src/lib/generated/builders/task-item-builder.ts new file mode 100644 index 00000000..8b6a988b --- /dev/null +++ b/src/lib/generated/builders/task-item-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.TaskItem} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.TaskItem} The built object + */ +function buildingFn(model: Specification.TaskItem, options: BuildOptions): Specification.TaskItem { + const instance = new Classes.TaskItem(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.TaskItem; +} + +/** + * A factory to create a builder proxy for the type `Specification.TaskItem` + * @returns {Builder} A builder for `Specification.TaskItem` + */ +export const taskItemBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/task-list-builder.ts b/src/lib/generated/builders/task-list-builder.ts index b916447d..01a46f28 100644 --- a/src/lib/generated/builders/task-list-builder.ts +++ b/src/lib/generated/builders/task-list-builder.ts @@ -40,5 +40,5 @@ function buildingFn(model: Specification.TaskList, options: BuildOptions): Speci * A factory to create a builder proxy for the type `Specification.TaskList` * @returns {ArrayBuilder} A builder for `Specification.TaskList` */ -export const taskListBuilder = (model?: Specification.TaskList): ArrayBuilder<{ [k: string]: Specification.Task }> => - arrayBuilder<{ [k: string]: Specification.Task }>(model, buildingFn); +export const taskListBuilder = (model?: Specification.TaskList): ArrayBuilder => + arrayBuilder(model, buildingFn); diff --git a/src/lib/generated/builders/task-metadata-builder.ts b/src/lib/generated/builders/task-metadata-builder.ts new file mode 100644 index 00000000..e58f8a58 --- /dev/null +++ b/src/lib/generated/builders/task-metadata-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.TaskMetadata} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.TaskMetadata} The built object + */ +function buildingFn(model: Specification.TaskMetadata, options: BuildOptions): Specification.TaskMetadata { + const instance = new Classes.TaskMetadata(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.TaskMetadata; +} + +/** + * A factory to create a builder proxy for the type `Specification.TaskMetadata` + * @returns {Builder} A builder for `Specification.TaskMetadata` + */ +export const taskMetadataBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/try-task-catch-retry-builder.ts b/src/lib/generated/builders/try-task-catch-retry-builder.ts new file mode 100644 index 00000000..6ab4662a --- /dev/null +++ b/src/lib/generated/builders/try-task-catch-retry-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.TryTaskCatchRetry} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.TryTaskCatchRetry} The built object + */ +function buildingFn(model: Specification.TryTaskCatchRetry, options: BuildOptions): Specification.TryTaskCatchRetry { + const instance = new Classes.TryTaskCatchRetry(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.TryTaskCatchRetry; +} + +/** + * A factory to create a builder proxy for the type `Specification.TryTaskCatchRetry` + * @returns {Builder} A builder for `Specification.TryTaskCatchRetry` + */ +export const tryTaskCatchRetryBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/use-extensions-builder.ts b/src/lib/generated/builders/use-extensions-builder.ts index 40e64cc0..8519758e 100644 --- a/src/lib/generated/builders/use-extensions-builder.ts +++ b/src/lib/generated/builders/use-extensions-builder.ts @@ -40,7 +40,5 @@ function buildingFn(model: Specification.UseExtensions, options: BuildOptions): * A factory to create a builder proxy for the type `Specification.UseExtensions` * @returns {ArrayBuilder} A builder for `Specification.UseExtensions` */ -export const useExtensionsBuilder = ( - model?: Specification.UseExtensions, -): ArrayBuilder<{ [k: string]: Specification.Extension }> => - arrayBuilder<{ [k: string]: Specification.Extension }>(model, buildingFn); +export const useExtensionsBuilder = (model?: Specification.UseExtensions): ArrayBuilder => + arrayBuilder(model, buildingFn); diff --git a/src/lib/generated/builders/use-secrets-builder.ts b/src/lib/generated/builders/use-secrets-builder.ts new file mode 100644 index 00000000..7c618d89 --- /dev/null +++ b/src/lib/generated/builders/use-secrets-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying array + * @param {Specification.UseSecrets} model The proxied array + * @param {BuildOptions} options The build options to use + * @returns {Specification.UseSecrets} The built array + */ +function buildingFn(model: Specification.UseSecrets, options: BuildOptions): Specification.UseSecrets { + const instance = new Classes.UseSecrets(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.UseSecrets; +} + +/** + * A factory to create a builder proxy for the type `Specification.UseSecrets` + * @returns {ArrayBuilder} A builder for `Specification.UseSecrets` + */ +export const useSecretsBuilder = (model?: Specification.UseSecrets): ArrayBuilder => + arrayBuilder(model, buildingFn); diff --git a/src/lib/generated/builders/use-timeouts-builder.ts b/src/lib/generated/builders/use-timeouts-builder.ts new file mode 100644 index 00000000..89cb328d --- /dev/null +++ b/src/lib/generated/builders/use-timeouts-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.UseTimeouts} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.UseTimeouts} The built object + */ +function buildingFn(model: Specification.UseTimeouts, options: BuildOptions): Specification.UseTimeouts { + const instance = new Classes.UseTimeouts(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.UseTimeouts; +} + +/** + * A factory to create a builder proxy for the type `Specification.UseTimeouts` + * @returns {Builder} A builder for `Specification.UseTimeouts` + */ +export const useTimeoutsBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/with-async-api-payload-builder.ts b/src/lib/generated/builders/with-async-api-payload-builder.ts new file mode 100644 index 00000000..2717105c --- /dev/null +++ b/src/lib/generated/builders/with-async-api-payload-builder.ts @@ -0,0 +1,48 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WithAsyncAPIPayload} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.WithAsyncAPIPayload} The built object + */ +function buildingFn( + model: Specification.WithAsyncAPIPayload, + options: BuildOptions, +): Specification.WithAsyncAPIPayload { + const instance = new Classes.WithAsyncAPIPayload(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.WithAsyncAPIPayload; +} + +/** + * A factory to create a builder proxy for the type `Specification.WithAsyncAPIPayload` + * @returns {Builder} A builder for `Specification.WithAsyncAPIPayload` + */ +export const withAsyncAPIPayloadBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/with-event-builder.ts b/src/lib/generated/builders/with-event-builder.ts new file mode 100644 index 00000000..78d7466f --- /dev/null +++ b/src/lib/generated/builders/with-event-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WithEvent} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.WithEvent} The built object + */ +function buildingFn(model: Specification.WithEvent, options: BuildOptions): Specification.WithEvent { + const instance = new Classes.WithEvent(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.WithEvent; +} + +/** + * A factory to create a builder proxy for the type `Specification.WithEvent` + * @returns {Builder} A builder for `Specification.WithEvent` + */ +export const withEventBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/with-grpc-arguments-builder.ts b/src/lib/generated/builders/with-grpc-arguments-builder.ts new file mode 100644 index 00000000..54f09ef5 --- /dev/null +++ b/src/lib/generated/builders/with-grpc-arguments-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WithGRPCArguments} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.WithGRPCArguments} The built object + */ +function buildingFn(model: Specification.WithGRPCArguments, options: BuildOptions): Specification.WithGRPCArguments { + const instance = new Classes.WithGRPCArguments(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.WithGRPCArguments; +} + +/** + * A factory to create a builder proxy for the type `Specification.WithGRPCArguments` + * @returns {Builder} A builder for `Specification.WithGRPCArguments` + */ +export const withGRPCArgumentsBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/with-grpc-service-builder.ts b/src/lib/generated/builders/with-grpc-service-builder.ts new file mode 100644 index 00000000..965da7e9 --- /dev/null +++ b/src/lib/generated/builders/with-grpc-service-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WithGRPCService} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.WithGRPCService} The built object + */ +function buildingFn(model: Specification.WithGRPCService, options: BuildOptions): Specification.WithGRPCService { + const instance = new Classes.WithGRPCService(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.WithGRPCService; +} + +/** + * A factory to create a builder proxy for the type `Specification.WithGRPCService` + * @returns {Builder} A builder for `Specification.WithGRPCService` + */ +export const withGRPCServiceBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/with-http-body-builder.ts b/src/lib/generated/builders/with-http-body-builder.ts new file mode 100644 index 00000000..c9cfacc6 --- /dev/null +++ b/src/lib/generated/builders/with-http-body-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WithHTTPBody} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.WithHTTPBody} The built object + */ +function buildingFn(model: Specification.WithHTTPBody, options: BuildOptions): Specification.WithHTTPBody { + const instance = new Classes.WithHTTPBody(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.WithHTTPBody; +} + +/** + * A factory to create a builder proxy for the type `Specification.WithHTTPBody` + * @returns {Builder} A builder for `Specification.WithHTTPBody` + */ +export const withHTTPBodyBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/with-http-headers-builder.ts b/src/lib/generated/builders/with-http-headers-builder.ts new file mode 100644 index 00000000..5e834e5e --- /dev/null +++ b/src/lib/generated/builders/with-http-headers-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WithHTTPHeaders} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.WithHTTPHeaders} The built object + */ +function buildingFn(model: Specification.WithHTTPHeaders, options: BuildOptions): Specification.WithHTTPHeaders { + const instance = new Classes.WithHTTPHeaders(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.WithHTTPHeaders; +} + +/** + * A factory to create a builder proxy for the type `Specification.WithHTTPHeaders` + * @returns {Builder} A builder for `Specification.WithHTTPHeaders` + */ +export const withHTTPHeadersBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/with-http-query-builder.ts b/src/lib/generated/builders/with-http-query-builder.ts new file mode 100644 index 00000000..b08d6c26 --- /dev/null +++ b/src/lib/generated/builders/with-http-query-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WithHTTPQuery} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.WithHTTPQuery} The built object + */ +function buildingFn(model: Specification.WithHTTPQuery, options: BuildOptions): Specification.WithHTTPQuery { + const instance = new Classes.WithHTTPQuery(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.WithHTTPQuery; +} + +/** + * A factory to create a builder proxy for the type `Specification.WithHTTPQuery` + * @returns {Builder} A builder for `Specification.WithHTTPQuery` + */ +export const withHTTPQueryBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/with-open-api-parameters-builder.ts b/src/lib/generated/builders/with-open-api-parameters-builder.ts new file mode 100644 index 00000000..159a1df6 --- /dev/null +++ b/src/lib/generated/builders/with-open-api-parameters-builder.ts @@ -0,0 +1,48 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WithOpenAPIParameters} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.WithOpenAPIParameters} The built object + */ +function buildingFn( + model: Specification.WithOpenAPIParameters, + options: BuildOptions, +): Specification.WithOpenAPIParameters { + const instance = new Classes.WithOpenAPIParameters(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.WithOpenAPIParameters; +} + +/** + * A factory to create a builder proxy for the type `Specification.WithOpenAPIParameters` + * @returns {Builder} A builder for `Specification.WithOpenAPIParameters` + */ +export const withOpenAPIParametersBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/call-async-api-with-builder.ts b/src/lib/generated/builders/workflow-metadata-builder.ts similarity index 68% rename from src/lib/generated/builders/call-async-api-with-builder.ts rename to src/lib/generated/builders/workflow-metadata-builder.ts index 569333b4..9bdbc635 100644 --- a/src/lib/generated/builders/call-async-api-with-builder.ts +++ b/src/lib/generated/builders/workflow-metadata-builder.ts @@ -26,20 +26,20 @@ import { Specification } from '../definitions'; /** * The internal function used by the builder proxy to validate and return its underlying object - * @param {Specification.CallAsyncAPIWith} model The proxied object + * @param {Specification.WorkflowMetadata} model The proxied object * @param {BuildOptions} options The build options to use - * @returns {Specification.CallAsyncAPIWith} The built object + * @returns {Specification.WorkflowMetadata} The built object */ -function buildingFn(model: Specification.CallAsyncAPIWith, options: BuildOptions): Specification.CallAsyncAPIWith { - const instance = new Classes.CallAsyncAPIWith(model); +function buildingFn(model: Specification.WorkflowMetadata, options: BuildOptions): Specification.WorkflowMetadata { + const instance = new Classes.WorkflowMetadata(model); if (options.validate) instance.validate(); - return (options.normalize ? instance.normalize() : instance) as Specification.CallAsyncAPIWith; + return (options.normalize ? instance.normalize() : instance) as Specification.WorkflowMetadata; } /** - * A factory to create a builder proxy for the type `Specification.CallAsyncAPIWith` - * @returns {Builder} A builder for `Specification.CallAsyncAPIWith` + * A factory to create a builder proxy for the type `Specification.WorkflowMetadata` + * @returns {Builder} A builder for `Specification.WorkflowMetadata` */ -export const callAsyncAPIWithBuilder = ( - model?: Partial, -): Builder => builder(model, buildingFn); +export const workflowMetadataBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/builders/workflow-tags-builder.ts b/src/lib/generated/builders/workflow-tags-builder.ts new file mode 100644 index 00000000..91acb947 --- /dev/null +++ b/src/lib/generated/builders/workflow-tags-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WorkflowTags} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.WorkflowTags} The built object + */ +function buildingFn(model: Specification.WorkflowTags, options: BuildOptions): Specification.WorkflowTags { + const instance = new Classes.WorkflowTags(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.WorkflowTags; +} + +/** + * A factory to create a builder proxy for the type `Specification.WorkflowTags` + * @returns {Builder} A builder for `Specification.WorkflowTags` + */ +export const workflowTagsBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/workflow-timeout-builder.ts b/src/lib/generated/builders/workflow-timeout-builder.ts new file mode 100644 index 00000000..3292ca41 --- /dev/null +++ b/src/lib/generated/builders/workflow-timeout-builder.ts @@ -0,0 +1,45 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.WorkflowTimeout} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.WorkflowTimeout} The built object + */ +function buildingFn(model: Specification.WorkflowTimeout, options: BuildOptions): Specification.WorkflowTimeout { + const instance = new Classes.WorkflowTimeout(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.WorkflowTimeout; +} + +/** + * A factory to create a builder proxy for the type `Specification.WorkflowTimeout` + * @returns {Builder} A builder for `Specification.WorkflowTimeout` + */ +export const workflowTimeoutBuilder = ( + model?: Partial, +): Builder => builder(model, buildingFn); diff --git a/src/lib/generated/classes/event-consumption-strategy-any.ts b/src/lib/generated/classes/all-event-consumption-strategy-configuration.ts similarity index 56% rename from src/lib/generated/classes/event-consumption-strategy-any.ts rename to src/lib/generated/classes/all-event-consumption-strategy-configuration.ts index d76ddef9..5444a40c 100644 --- a/src/lib/generated/classes/event-consumption-strategy-any.ts +++ b/src/lib/generated/classes/all-event-consumption-strategy-configuration.ts @@ -30,9 +30,9 @@ import { validate } from '../../validation'; * Represents a collection of Specification.EventFilter. * Inherits from ArrayHydrator to handle array-specific hydration. */ -export class EventConsumptionStrategyAny extends ArrayHydrator { +export class AllEventConsumptionStrategyConfiguration extends ArrayHydrator { /** - * Constructs a new instance of the EventConsumptionStrategyAny class. + * Constructs a new instance of the AllEventConsumptionStrategyConfiguration class. * * @param model - Optional parameter which can be an array of objects or a number representing the array length. */ @@ -44,29 +44,29 @@ export class EventConsumptionStrategyAny extends ArrayHydrator this.push(new _EventFilter(item))); } } - Object.setPrototypeOf(this, Object.create(EventConsumptionStrategyAny.prototype)); - getLifecycleHooks('EventConsumptionStrategyAny')?.constructor?.(this); + Object.setPrototypeOf(this, Object.create(AllEventConsumptionStrategyConfiguration.prototype)); + getLifecycleHooks('AllEventConsumptionStrategyConfiguration')?.constructor?.(this); } /** - * Validates the current instance of the EventConsumptionStrategyAny. + * Validates the current instance of the AllEventConsumptionStrategyConfiguration. * Throws if invalid. */ validate() { - const copy = new EventConsumptionStrategyAny(this); - validate('EventConsumptionStrategyAny', copy); + const copy = new AllEventConsumptionStrategyConfiguration(this); + validate('AllEventConsumptionStrategyConfiguration', copy); } /** - * Normalizes the current instance of the EventConsumptionStrategyAny. - * Creates a copy of the EventConsumptionStrategyAny, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the AllEventConsumptionStrategyConfiguration. + * Creates a copy of the AllEventConsumptionStrategyConfiguration, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the EventConsumptionStrategyAny instance. + * @returns A normalized version of the AllEventConsumptionStrategyConfiguration instance. */ - normalize(): EventConsumptionStrategyAny { - const copy = new EventConsumptionStrategyAny(this); - return getLifecycleHooks('EventConsumptionStrategyAny')?.normalize?.(copy) || copy; + normalize(): AllEventConsumptionStrategyConfiguration { + const copy = new AllEventConsumptionStrategyConfiguration(this); + return getLifecycleHooks('AllEventConsumptionStrategyConfiguration')?.normalize?.(copy) || copy; } } -export const _EventConsumptionStrategyAny = EventConsumptionStrategyAny; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes +export const _AllEventConsumptionStrategyConfiguration = AllEventConsumptionStrategyConfiguration; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes diff --git a/src/lib/generated/classes/all-event-consumption-strategy.ts b/src/lib/generated/classes/all-event-consumption-strategy.ts new file mode 100644 index 00000000..3d8cbb1a --- /dev/null +++ b/src/lib/generated/classes/all-event-consumption-strategy.ts @@ -0,0 +1,84 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _AllEventConsumptionStrategyConfiguration } from './all-event-consumption-strategy-configuration'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the AllEventConsumptionStrategy class and type + */ +export type AllEventConsumptionStrategyIntersection = AllEventConsumptionStrategy & + Specification.AllEventConsumptionStrategy; + +/** + * Represents a constructor for the intersection of the AllEventConsumptionStrategy class and type + */ +export interface AllEventConsumptionStrategyConstructor { + new (model?: Partial): AllEventConsumptionStrategyIntersection; +} + +/** + * Represents a AllEventConsumptionStrategy with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class AllEventConsumptionStrategy extends ObjectHydrator { + /** + * Instanciates a new instance of the AllEventConsumptionStrategy class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the AllEventConsumptionStrategy. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.AllEventConsumptionStrategy & object; + if (isObject(model)) { + if (typeof model.all === 'object') self.all = new _AllEventConsumptionStrategyConfiguration(model.all); + } + getLifecycleHooks('AllEventConsumptionStrategy')?.constructor?.(this); + } + + /** + * Validates the current instance of the AllEventConsumptionStrategy. + * Throws if invalid. + */ + validate() { + const copy = new AllEventConsumptionStrategy(this as any) as AllEventConsumptionStrategyIntersection; + validate('AllEventConsumptionStrategy', copy); + } + + /** + * Normalizes the current instance of the AllEventConsumptionStrategy. + * Creates a copy of the AllEventConsumptionStrategy, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the AllEventConsumptionStrategy instance. + */ + normalize(): AllEventConsumptionStrategy & Specification.AllEventConsumptionStrategy { + const copy = new AllEventConsumptionStrategy(this as any) as AllEventConsumptionStrategyIntersection; + return getLifecycleHooks('AllEventConsumptionStrategy')?.normalize?.(copy) || copy; + } +} + +export const _AllEventConsumptionStrategy = AllEventConsumptionStrategy as AllEventConsumptionStrategyConstructor; diff --git a/src/lib/generated/classes/event-consumption-strategy-all.ts b/src/lib/generated/classes/any-event-consumption-strategy-configuration.ts similarity index 56% rename from src/lib/generated/classes/event-consumption-strategy-all.ts rename to src/lib/generated/classes/any-event-consumption-strategy-configuration.ts index de4b5b92..8fa5ad8a 100644 --- a/src/lib/generated/classes/event-consumption-strategy-all.ts +++ b/src/lib/generated/classes/any-event-consumption-strategy-configuration.ts @@ -30,9 +30,9 @@ import { validate } from '../../validation'; * Represents a collection of Specification.EventFilter. * Inherits from ArrayHydrator to handle array-specific hydration. */ -export class EventConsumptionStrategyAll extends ArrayHydrator { +export class AnyEventConsumptionStrategyConfiguration extends ArrayHydrator { /** - * Constructs a new instance of the EventConsumptionStrategyAll class. + * Constructs a new instance of the AnyEventConsumptionStrategyConfiguration class. * * @param model - Optional parameter which can be an array of objects or a number representing the array length. */ @@ -44,29 +44,29 @@ export class EventConsumptionStrategyAll extends ArrayHydrator this.push(new _EventFilter(item))); } } - Object.setPrototypeOf(this, Object.create(EventConsumptionStrategyAll.prototype)); - getLifecycleHooks('EventConsumptionStrategyAll')?.constructor?.(this); + Object.setPrototypeOf(this, Object.create(AnyEventConsumptionStrategyConfiguration.prototype)); + getLifecycleHooks('AnyEventConsumptionStrategyConfiguration')?.constructor?.(this); } /** - * Validates the current instance of the EventConsumptionStrategyAll. + * Validates the current instance of the AnyEventConsumptionStrategyConfiguration. * Throws if invalid. */ validate() { - const copy = new EventConsumptionStrategyAll(this); - validate('EventConsumptionStrategyAll', copy); + const copy = new AnyEventConsumptionStrategyConfiguration(this); + validate('AnyEventConsumptionStrategyConfiguration', copy); } /** - * Normalizes the current instance of the EventConsumptionStrategyAll. - * Creates a copy of the EventConsumptionStrategyAll, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the AnyEventConsumptionStrategyConfiguration. + * Creates a copy of the AnyEventConsumptionStrategyConfiguration, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the EventConsumptionStrategyAll instance. + * @returns A normalized version of the AnyEventConsumptionStrategyConfiguration instance. */ - normalize(): EventConsumptionStrategyAll { - const copy = new EventConsumptionStrategyAll(this); - return getLifecycleHooks('EventConsumptionStrategyAll')?.normalize?.(copy) || copy; + normalize(): AnyEventConsumptionStrategyConfiguration { + const copy = new AnyEventConsumptionStrategyConfiguration(this); + return getLifecycleHooks('AnyEventConsumptionStrategyConfiguration')?.normalize?.(copy) || copy; } } -export const _EventConsumptionStrategyAll = EventConsumptionStrategyAll; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes +export const _AnyEventConsumptionStrategyConfiguration = AnyEventConsumptionStrategyConfiguration; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes diff --git a/src/lib/generated/classes/any-event-consumption-strategy.ts b/src/lib/generated/classes/any-event-consumption-strategy.ts new file mode 100644 index 00000000..5e4191eb --- /dev/null +++ b/src/lib/generated/classes/any-event-consumption-strategy.ts @@ -0,0 +1,84 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _AnyEventConsumptionStrategyConfiguration } from './any-event-consumption-strategy-configuration'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the AnyEventConsumptionStrategy class and type + */ +export type AnyEventConsumptionStrategyIntersection = AnyEventConsumptionStrategy & + Specification.AnyEventConsumptionStrategy; + +/** + * Represents a constructor for the intersection of the AnyEventConsumptionStrategy class and type + */ +export interface AnyEventConsumptionStrategyConstructor { + new (model?: Partial): AnyEventConsumptionStrategyIntersection; +} + +/** + * Represents a AnyEventConsumptionStrategy with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class AnyEventConsumptionStrategy extends ObjectHydrator { + /** + * Instanciates a new instance of the AnyEventConsumptionStrategy class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the AnyEventConsumptionStrategy. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.AnyEventConsumptionStrategy & object; + if (isObject(model)) { + if (typeof model.any === 'object') self.any = new _AnyEventConsumptionStrategyConfiguration(model.any); + } + getLifecycleHooks('AnyEventConsumptionStrategy')?.constructor?.(this); + } + + /** + * Validates the current instance of the AnyEventConsumptionStrategy. + * Throws if invalid. + */ + validate() { + const copy = new AnyEventConsumptionStrategy(this as any) as AnyEventConsumptionStrategyIntersection; + validate('AnyEventConsumptionStrategy', copy); + } + + /** + * Normalizes the current instance of the AnyEventConsumptionStrategy. + * Creates a copy of the AnyEventConsumptionStrategy, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the AnyEventConsumptionStrategy instance. + */ + normalize(): AnyEventConsumptionStrategy & Specification.AnyEventConsumptionStrategy { + const copy = new AnyEventConsumptionStrategy(this as any) as AnyEventConsumptionStrategyIntersection; + return getLifecycleHooks('AnyEventConsumptionStrategy')?.normalize?.(copy) || copy; + } +} + +export const _AnyEventConsumptionStrategy = AnyEventConsumptionStrategy as AnyEventConsumptionStrategyConstructor; diff --git a/src/lib/generated/classes/async-api-arguments.ts b/src/lib/generated/classes/async-api-arguments.ts new file mode 100644 index 00000000..26139b60 --- /dev/null +++ b/src/lib/generated/classes/async-api-arguments.ts @@ -0,0 +1,88 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _ExternalResource } from './external-resource'; +import { _WithAsyncAPIPayload } from './with-async-api-payload'; +import { _ReferenceableAuthenticationPolicy } from './referenceable-authentication-policy'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the AsyncApiArguments class and type + */ +export type AsyncApiArgumentsIntersection = AsyncApiArguments & Specification.AsyncApiArguments; + +/** + * Represents a constructor for the intersection of the AsyncApiArguments class and type + */ +export interface AsyncApiArgumentsConstructor { + new (model?: Partial): AsyncApiArgumentsIntersection; +} + +/** + * Represents a AsyncApiArguments with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class AsyncApiArguments extends ObjectHydrator { + /** + * Instanciates a new instance of the AsyncApiArguments class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the AsyncApiArguments. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.AsyncApiArguments & object; + if (isObject(model)) { + if (typeof model.document === 'object') self.document = new _ExternalResource(model.document); + if (typeof model.payload === 'object') self.payload = new _WithAsyncAPIPayload(model.payload); + if (typeof model.authentication === 'object') + self.authentication = new _ReferenceableAuthenticationPolicy(model.authentication); + } + getLifecycleHooks('AsyncApiArguments')?.constructor?.(this); + } + + /** + * Validates the current instance of the AsyncApiArguments. + * Throws if invalid. + */ + validate() { + const copy = new AsyncApiArguments(this as any) as AsyncApiArgumentsIntersection; + validate('AsyncApiArguments', copy); + } + + /** + * Normalizes the current instance of the AsyncApiArguments. + * Creates a copy of the AsyncApiArguments, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the AsyncApiArguments instance. + */ + normalize(): AsyncApiArguments & Specification.AsyncApiArguments { + const copy = new AsyncApiArguments(this as any) as AsyncApiArgumentsIntersection; + return getLifecycleHooks('AsyncApiArguments')?.normalize?.(copy) || copy; + } +} + +export const _AsyncApiArguments = AsyncApiArguments as AsyncApiArgumentsConstructor; diff --git a/src/lib/generated/classes/authentication-policy-basic.ts b/src/lib/generated/classes/authentication-policy-basic.ts deleted file mode 100644 index 43033306..00000000 --- a/src/lib/generated/classes/authentication-policy-basic.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; - -/** - * Represents the intersection between the AuthenticationPolicyBasic class and type - */ -export type AuthenticationPolicyBasicIntersection = AuthenticationPolicyBasic & Specification.AuthenticationPolicyBasic; - -/** - * Represents a constructor for the intersection of the AuthenticationPolicyBasic class and type - */ -export interface AuthenticationPolicyBasicConstructor { - new (model?: Partial): AuthenticationPolicyBasicIntersection; -} - -/** - * Represents a AuthenticationPolicyBasic with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class AuthenticationPolicyBasic extends ObjectHydrator { - /** - * Instanciates a new instance of the AuthenticationPolicyBasic class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the AuthenticationPolicyBasic. - */ - constructor(model?: Partial) { - super(model); - - getLifecycleHooks('AuthenticationPolicyBasic')?.constructor?.(this); - } - - /** - * Validates the current instance of the AuthenticationPolicyBasic. - * Throws if invalid. - */ - validate() { - const copy = new AuthenticationPolicyBasic(this as any) as AuthenticationPolicyBasicIntersection; - validate('AuthenticationPolicyBasic', copy); - } - - /** - * Normalizes the current instance of the AuthenticationPolicyBasic. - * Creates a copy of the AuthenticationPolicyBasic, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the AuthenticationPolicyBasic instance. - */ - normalize(): AuthenticationPolicyBasic & Specification.AuthenticationPolicyBasic { - const copy = new AuthenticationPolicyBasic(this as any) as AuthenticationPolicyBasicIntersection; - return getLifecycleHooks('AuthenticationPolicyBasic')?.normalize?.(copy) || copy; - } -} - -export const _AuthenticationPolicyBasic = AuthenticationPolicyBasic as AuthenticationPolicyBasicConstructor; diff --git a/src/lib/generated/classes/authentication-policy-bearer.ts b/src/lib/generated/classes/authentication-policy-bearer.ts deleted file mode 100644 index 2cc5c450..00000000 --- a/src/lib/generated/classes/authentication-policy-bearer.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; - -/** - * Represents the intersection between the AuthenticationPolicyBearer class and type - */ -export type AuthenticationPolicyBearerIntersection = AuthenticationPolicyBearer & - Specification.AuthenticationPolicyBearer; - -/** - * Represents a constructor for the intersection of the AuthenticationPolicyBearer class and type - */ -export interface AuthenticationPolicyBearerConstructor { - new (model?: Partial): AuthenticationPolicyBearerIntersection; -} - -/** - * Represents a AuthenticationPolicyBearer with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class AuthenticationPolicyBearer extends ObjectHydrator { - /** - * Instanciates a new instance of the AuthenticationPolicyBearer class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the AuthenticationPolicyBearer. - */ - constructor(model?: Partial) { - super(model); - - getLifecycleHooks('AuthenticationPolicyBearer')?.constructor?.(this); - } - - /** - * Validates the current instance of the AuthenticationPolicyBearer. - * Throws if invalid. - */ - validate() { - const copy = new AuthenticationPolicyBearer(this as any) as AuthenticationPolicyBearerIntersection; - validate('AuthenticationPolicyBearer', copy); - } - - /** - * Normalizes the current instance of the AuthenticationPolicyBearer. - * Creates a copy of the AuthenticationPolicyBearer, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the AuthenticationPolicyBearer instance. - */ - normalize(): AuthenticationPolicyBearer & Specification.AuthenticationPolicyBearer { - const copy = new AuthenticationPolicyBearer(this as any) as AuthenticationPolicyBearerIntersection; - return getLifecycleHooks('AuthenticationPolicyBearer')?.normalize?.(copy) || copy; - } -} - -export const _AuthenticationPolicyBearer = AuthenticationPolicyBearer as AuthenticationPolicyBearerConstructor; diff --git a/src/lib/generated/classes/authentication-policy-oauth2-client.ts b/src/lib/generated/classes/authentication-policy-oauth2-client.ts deleted file mode 100644 index 890598ed..00000000 --- a/src/lib/generated/classes/authentication-policy-oauth2-client.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; - -/** - * Represents the intersection between the AuthenticationPolicyOauth2Client class and type - */ -export type AuthenticationPolicyOauth2ClientIntersection = AuthenticationPolicyOauth2Client & - Specification.AuthenticationPolicyOauth2Client; - -/** - * Represents a constructor for the intersection of the AuthenticationPolicyOauth2Client class and type - */ -export interface AuthenticationPolicyOauth2ClientConstructor { - new (model?: Partial): AuthenticationPolicyOauth2ClientIntersection; -} - -/** - * Represents a AuthenticationPolicyOauth2Client with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class AuthenticationPolicyOauth2Client extends ObjectHydrator { - /** - * Instanciates a new instance of the AuthenticationPolicyOauth2Client class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the AuthenticationPolicyOauth2Client. - */ - constructor(model?: Partial) { - super(model); - - getLifecycleHooks('AuthenticationPolicyOauth2Client')?.constructor?.(this); - } - - /** - * Validates the current instance of the AuthenticationPolicyOauth2Client. - * Throws if invalid. - */ - validate() { - const copy = new AuthenticationPolicyOauth2Client(this as any) as AuthenticationPolicyOauth2ClientIntersection; - validate('AuthenticationPolicyOauth2Client', copy); - } - - /** - * Normalizes the current instance of the AuthenticationPolicyOauth2Client. - * Creates a copy of the AuthenticationPolicyOauth2Client, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the AuthenticationPolicyOauth2Client instance. - */ - normalize(): AuthenticationPolicyOauth2Client & Specification.AuthenticationPolicyOauth2Client { - const copy = new AuthenticationPolicyOauth2Client(this as any) as AuthenticationPolicyOauth2ClientIntersection; - return getLifecycleHooks('AuthenticationPolicyOauth2Client')?.normalize?.(copy) || copy; - } -} - -export const _AuthenticationPolicyOauth2Client = - AuthenticationPolicyOauth2Client as AuthenticationPolicyOauth2ClientConstructor; diff --git a/src/lib/generated/classes/authentication-policy-oauth2.ts b/src/lib/generated/classes/authentication-policy-oauth2.ts deleted file mode 100644 index e6a69f42..00000000 --- a/src/lib/generated/classes/authentication-policy-oauth2.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { _AuthenticationPolicyOauth2Client } from './authentication-policy-oauth2-client'; -import { _Oauth2Token } from './oauth2-token'; -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; -import { isObject } from '../../utils'; - -/** - * Represents the intersection between the AuthenticationPolicyOauth2 class and type - */ -export type AuthenticationPolicyOauth2Intersection = AuthenticationPolicyOauth2 & - Specification.AuthenticationPolicyOauth2; - -/** - * Represents a constructor for the intersection of the AuthenticationPolicyOauth2 class and type - */ -export interface AuthenticationPolicyOauth2Constructor { - new (model?: Partial): AuthenticationPolicyOauth2Intersection; -} - -/** - * Represents a AuthenticationPolicyOauth2 with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class AuthenticationPolicyOauth2 extends ObjectHydrator { - /** - * Instanciates a new instance of the AuthenticationPolicyOauth2 class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the AuthenticationPolicyOauth2. - */ - constructor(model?: Partial) { - super(model); - const self = this as unknown as Specification.AuthenticationPolicyOauth2 & object; - if (isObject(model)) { - if (typeof model.client === 'object') self.client = new _AuthenticationPolicyOauth2Client(model.client); - if (typeof model.subject === 'object') self.subject = new _Oauth2Token(model.subject); - if (typeof model.actor === 'object') self.actor = new _Oauth2Token(model.actor); - } - getLifecycleHooks('AuthenticationPolicyOauth2')?.constructor?.(this); - } - - /** - * Validates the current instance of the AuthenticationPolicyOauth2. - * Throws if invalid. - */ - validate() { - const copy = new AuthenticationPolicyOauth2(this as any) as AuthenticationPolicyOauth2Intersection; - validate('AuthenticationPolicyOauth2', copy); - } - - /** - * Normalizes the current instance of the AuthenticationPolicyOauth2. - * Creates a copy of the AuthenticationPolicyOauth2, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the AuthenticationPolicyOauth2 instance. - */ - normalize(): AuthenticationPolicyOauth2 & Specification.AuthenticationPolicyOauth2 { - const copy = new AuthenticationPolicyOauth2(this as any) as AuthenticationPolicyOauth2Intersection; - return getLifecycleHooks('AuthenticationPolicyOauth2')?.normalize?.(copy) || copy; - } -} - -export const _AuthenticationPolicyOauth2 = AuthenticationPolicyOauth2 as AuthenticationPolicyOauth2Constructor; diff --git a/src/lib/generated/classes/authentication-policy-reference.ts b/src/lib/generated/classes/authentication-policy-reference.ts new file mode 100644 index 00000000..08d00456 --- /dev/null +++ b/src/lib/generated/classes/authentication-policy-reference.ts @@ -0,0 +1,79 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the AuthenticationPolicyReference class and type + */ +export type AuthenticationPolicyReferenceIntersection = AuthenticationPolicyReference & + Specification.AuthenticationPolicyReference; + +/** + * Represents a constructor for the intersection of the AuthenticationPolicyReference class and type + */ +export interface AuthenticationPolicyReferenceConstructor { + new (model?: Partial): AuthenticationPolicyReferenceIntersection; +} + +/** + * Represents a AuthenticationPolicyReference with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class AuthenticationPolicyReference extends ObjectHydrator { + /** + * Instanciates a new instance of the AuthenticationPolicyReference class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the AuthenticationPolicyReference. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('AuthenticationPolicyReference')?.constructor?.(this); + } + + /** + * Validates the current instance of the AuthenticationPolicyReference. + * Throws if invalid. + */ + validate() { + const copy = new AuthenticationPolicyReference(this as any) as AuthenticationPolicyReferenceIntersection; + validate('AuthenticationPolicyReference', copy); + } + + /** + * Normalizes the current instance of the AuthenticationPolicyReference. + * Creates a copy of the AuthenticationPolicyReference, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the AuthenticationPolicyReference instance. + */ + normalize(): AuthenticationPolicyReference & Specification.AuthenticationPolicyReference { + const copy = new AuthenticationPolicyReference(this as any) as AuthenticationPolicyReferenceIntersection; + return getLifecycleHooks('AuthenticationPolicyReference')?.normalize?.(copy) || copy; + } +} + +export const _AuthenticationPolicyReference = AuthenticationPolicyReference as AuthenticationPolicyReferenceConstructor; diff --git a/src/lib/generated/classes/authentication-policy.ts b/src/lib/generated/classes/authentication-policy.ts index 19fe078a..741b41e0 100644 --- a/src/lib/generated/classes/authentication-policy.ts +++ b/src/lib/generated/classes/authentication-policy.ts @@ -20,9 +20,11 @@ * *****************************************************************************************/ -import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; -import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; -import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; +import { _BasicAuthenticationPolicyConfiguration } from './basic-authentication-policy-configuration'; +import { _BearerAuthenticationPolicyConfiguration } from './bearer-authentication-policy-configuration'; +import { _DigestAuthenticationPolicyConfiguration } from './digest-authentication-policy-configuration'; +import { _OAuth2AuthenticationPolicyConfiguration } from './oauth2-authentication-policy-configuration'; +import { _OpenIdConnectAuthenticationPolicyConfiguration } from './open-id-connect-authentication-policy-configuration'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -56,27 +58,31 @@ export class AuthenticationPolicy extends ObjectHydrator, + ): BasicAuthenticationPolicyConfigurationIntersection; +} + +/** + * Represents a BasicAuthenticationPolicyConfiguration with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class BasicAuthenticationPolicyConfiguration extends ObjectHydrator { + /** + * Instanciates a new instance of the BasicAuthenticationPolicyConfiguration class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the BasicAuthenticationPolicyConfiguration. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('BasicAuthenticationPolicyConfiguration')?.constructor?.(this); + } + + /** + * Validates the current instance of the BasicAuthenticationPolicyConfiguration. + * Throws if invalid. + */ + validate() { + const copy = new BasicAuthenticationPolicyConfiguration( + this as any, + ) as BasicAuthenticationPolicyConfigurationIntersection; + validate('BasicAuthenticationPolicyConfiguration', copy); + } + + /** + * Normalizes the current instance of the BasicAuthenticationPolicyConfiguration. + * Creates a copy of the BasicAuthenticationPolicyConfiguration, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the BasicAuthenticationPolicyConfiguration instance. + */ + normalize(): BasicAuthenticationPolicyConfiguration & Specification.BasicAuthenticationPolicyConfiguration { + const copy = new BasicAuthenticationPolicyConfiguration( + this as any, + ) as BasicAuthenticationPolicyConfigurationIntersection; + return getLifecycleHooks('BasicAuthenticationPolicyConfiguration')?.normalize?.(copy) || copy; + } +} + +export const _BasicAuthenticationPolicyConfiguration = + BasicAuthenticationPolicyConfiguration as BasicAuthenticationPolicyConfigurationConstructor; diff --git a/src/lib/generated/classes/basic-authentication-policy.ts b/src/lib/generated/classes/basic-authentication-policy.ts new file mode 100644 index 00000000..42246c94 --- /dev/null +++ b/src/lib/generated/classes/basic-authentication-policy.ts @@ -0,0 +1,83 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _BasicAuthenticationPolicyConfiguration } from './basic-authentication-policy-configuration'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the BasicAuthenticationPolicy class and type + */ +export type BasicAuthenticationPolicyIntersection = BasicAuthenticationPolicy & Specification.BasicAuthenticationPolicy; + +/** + * Represents a constructor for the intersection of the BasicAuthenticationPolicy class and type + */ +export interface BasicAuthenticationPolicyConstructor { + new (model?: Partial): BasicAuthenticationPolicyIntersection; +} + +/** + * Represents a BasicAuthenticationPolicy with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class BasicAuthenticationPolicy extends ObjectHydrator { + /** + * Instanciates a new instance of the BasicAuthenticationPolicy class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the BasicAuthenticationPolicy. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.BasicAuthenticationPolicy & object; + if (isObject(model)) { + if (typeof model.basic === 'object') self.basic = new _BasicAuthenticationPolicyConfiguration(model.basic); + } + getLifecycleHooks('BasicAuthenticationPolicy')?.constructor?.(this); + } + + /** + * Validates the current instance of the BasicAuthenticationPolicy. + * Throws if invalid. + */ + validate() { + const copy = new BasicAuthenticationPolicy(this as any) as BasicAuthenticationPolicyIntersection; + validate('BasicAuthenticationPolicy', copy); + } + + /** + * Normalizes the current instance of the BasicAuthenticationPolicy. + * Creates a copy of the BasicAuthenticationPolicy, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the BasicAuthenticationPolicy instance. + */ + normalize(): BasicAuthenticationPolicy & Specification.BasicAuthenticationPolicy { + const copy = new BasicAuthenticationPolicy(this as any) as BasicAuthenticationPolicyIntersection; + return getLifecycleHooks('BasicAuthenticationPolicy')?.normalize?.(copy) || copy; + } +} + +export const _BasicAuthenticationPolicy = BasicAuthenticationPolicy as BasicAuthenticationPolicyConstructor; diff --git a/src/lib/generated/classes/basic-authentication-properties.ts b/src/lib/generated/classes/basic-authentication-properties.ts new file mode 100644 index 00000000..d3f0885c --- /dev/null +++ b/src/lib/generated/classes/basic-authentication-properties.ts @@ -0,0 +1,79 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the BasicAuthenticationProperties class and type + */ +export type BasicAuthenticationPropertiesIntersection = BasicAuthenticationProperties & + Specification.BasicAuthenticationProperties; + +/** + * Represents a constructor for the intersection of the BasicAuthenticationProperties class and type + */ +export interface BasicAuthenticationPropertiesConstructor { + new (model?: Partial): BasicAuthenticationPropertiesIntersection; +} + +/** + * Represents a BasicAuthenticationProperties with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class BasicAuthenticationProperties extends ObjectHydrator { + /** + * Instanciates a new instance of the BasicAuthenticationProperties class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the BasicAuthenticationProperties. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('BasicAuthenticationProperties')?.constructor?.(this); + } + + /** + * Validates the current instance of the BasicAuthenticationProperties. + * Throws if invalid. + */ + validate() { + const copy = new BasicAuthenticationProperties(this as any) as BasicAuthenticationPropertiesIntersection; + validate('BasicAuthenticationProperties', copy); + } + + /** + * Normalizes the current instance of the BasicAuthenticationProperties. + * Creates a copy of the BasicAuthenticationProperties, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the BasicAuthenticationProperties instance. + */ + normalize(): BasicAuthenticationProperties & Specification.BasicAuthenticationProperties { + const copy = new BasicAuthenticationProperties(this as any) as BasicAuthenticationPropertiesIntersection; + return getLifecycleHooks('BasicAuthenticationProperties')?.normalize?.(copy) || copy; + } +} + +export const _BasicAuthenticationProperties = BasicAuthenticationProperties as BasicAuthenticationPropertiesConstructor; diff --git a/src/lib/generated/classes/bearer-authentication-policy-configuration.ts b/src/lib/generated/classes/bearer-authentication-policy-configuration.ts new file mode 100644 index 00000000..52963ea3 --- /dev/null +++ b/src/lib/generated/classes/bearer-authentication-policy-configuration.ts @@ -0,0 +1,86 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the BearerAuthenticationPolicyConfiguration class and type + */ +export type BearerAuthenticationPolicyConfigurationIntersection = BearerAuthenticationPolicyConfiguration & + Specification.BearerAuthenticationPolicyConfiguration; + +/** + * Represents a constructor for the intersection of the BearerAuthenticationPolicyConfiguration class and type + */ +export interface BearerAuthenticationPolicyConfigurationConstructor { + new ( + model?: Partial, + ): BearerAuthenticationPolicyConfigurationIntersection; +} + +/** + * Represents a BearerAuthenticationPolicyConfiguration with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class BearerAuthenticationPolicyConfiguration extends ObjectHydrator { + /** + * Instanciates a new instance of the BearerAuthenticationPolicyConfiguration class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the BearerAuthenticationPolicyConfiguration. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('BearerAuthenticationPolicyConfiguration')?.constructor?.(this); + } + + /** + * Validates the current instance of the BearerAuthenticationPolicyConfiguration. + * Throws if invalid. + */ + validate() { + const copy = new BearerAuthenticationPolicyConfiguration( + this as any, + ) as BearerAuthenticationPolicyConfigurationIntersection; + validate('BearerAuthenticationPolicyConfiguration', copy); + } + + /** + * Normalizes the current instance of the BearerAuthenticationPolicyConfiguration. + * Creates a copy of the BearerAuthenticationPolicyConfiguration, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the BearerAuthenticationPolicyConfiguration instance. + */ + normalize(): BearerAuthenticationPolicyConfiguration & Specification.BearerAuthenticationPolicyConfiguration { + const copy = new BearerAuthenticationPolicyConfiguration( + this as any, + ) as BearerAuthenticationPolicyConfigurationIntersection; + return getLifecycleHooks('BearerAuthenticationPolicyConfiguration')?.normalize?.(copy) || copy; + } +} + +export const _BearerAuthenticationPolicyConfiguration = + BearerAuthenticationPolicyConfiguration as BearerAuthenticationPolicyConfigurationConstructor; diff --git a/src/lib/generated/classes/bearer-authentication-policy.ts b/src/lib/generated/classes/bearer-authentication-policy.ts new file mode 100644 index 00000000..0f22dafc --- /dev/null +++ b/src/lib/generated/classes/bearer-authentication-policy.ts @@ -0,0 +1,84 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _BearerAuthenticationPolicyConfiguration } from './bearer-authentication-policy-configuration'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the BearerAuthenticationPolicy class and type + */ +export type BearerAuthenticationPolicyIntersection = BearerAuthenticationPolicy & + Specification.BearerAuthenticationPolicy; + +/** + * Represents a constructor for the intersection of the BearerAuthenticationPolicy class and type + */ +export interface BearerAuthenticationPolicyConstructor { + new (model?: Partial): BearerAuthenticationPolicyIntersection; +} + +/** + * Represents a BearerAuthenticationPolicy with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class BearerAuthenticationPolicy extends ObjectHydrator { + /** + * Instanciates a new instance of the BearerAuthenticationPolicy class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the BearerAuthenticationPolicy. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.BearerAuthenticationPolicy & object; + if (isObject(model)) { + if (typeof model.bearer === 'object') self.bearer = new _BearerAuthenticationPolicyConfiguration(model.bearer); + } + getLifecycleHooks('BearerAuthenticationPolicy')?.constructor?.(this); + } + + /** + * Validates the current instance of the BearerAuthenticationPolicy. + * Throws if invalid. + */ + validate() { + const copy = new BearerAuthenticationPolicy(this as any) as BearerAuthenticationPolicyIntersection; + validate('BearerAuthenticationPolicy', copy); + } + + /** + * Normalizes the current instance of the BearerAuthenticationPolicy. + * Creates a copy of the BearerAuthenticationPolicy, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the BearerAuthenticationPolicy instance. + */ + normalize(): BearerAuthenticationPolicy & Specification.BearerAuthenticationPolicy { + const copy = new BearerAuthenticationPolicy(this as any) as BearerAuthenticationPolicyIntersection; + return getLifecycleHooks('BearerAuthenticationPolicy')?.normalize?.(copy) || copy; + } +} + +export const _BearerAuthenticationPolicy = BearerAuthenticationPolicy as BearerAuthenticationPolicyConstructor; diff --git a/src/lib/generated/classes/bearer-authentication-properties.ts b/src/lib/generated/classes/bearer-authentication-properties.ts new file mode 100644 index 00000000..66ce41ff --- /dev/null +++ b/src/lib/generated/classes/bearer-authentication-properties.ts @@ -0,0 +1,80 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the BearerAuthenticationProperties class and type + */ +export type BearerAuthenticationPropertiesIntersection = BearerAuthenticationProperties & + Specification.BearerAuthenticationProperties; + +/** + * Represents a constructor for the intersection of the BearerAuthenticationProperties class and type + */ +export interface BearerAuthenticationPropertiesConstructor { + new (model?: Partial): BearerAuthenticationPropertiesIntersection; +} + +/** + * Represents a BearerAuthenticationProperties with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class BearerAuthenticationProperties extends ObjectHydrator { + /** + * Instanciates a new instance of the BearerAuthenticationProperties class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the BearerAuthenticationProperties. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('BearerAuthenticationProperties')?.constructor?.(this); + } + + /** + * Validates the current instance of the BearerAuthenticationProperties. + * Throws if invalid. + */ + validate() { + const copy = new BearerAuthenticationProperties(this as any) as BearerAuthenticationPropertiesIntersection; + validate('BearerAuthenticationProperties', copy); + } + + /** + * Normalizes the current instance of the BearerAuthenticationProperties. + * Creates a copy of the BearerAuthenticationProperties, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the BearerAuthenticationProperties instance. + */ + normalize(): BearerAuthenticationProperties & Specification.BearerAuthenticationProperties { + const copy = new BearerAuthenticationProperties(this as any) as BearerAuthenticationPropertiesIntersection; + return getLifecycleHooks('BearerAuthenticationProperties')?.normalize?.(copy) || copy; + } +} + +export const _BearerAuthenticationProperties = + BearerAuthenticationProperties as BearerAuthenticationPropertiesConstructor; diff --git a/src/lib/generated/classes/call-async-api-with-authentication.ts b/src/lib/generated/classes/call-async-api-with-authentication.ts deleted file mode 100644 index 49daa205..00000000 --- a/src/lib/generated/classes/call-async-api-with-authentication.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; -import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; -import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; -import { isObject } from '../../utils'; - -/** - * Represents the intersection between the CallAsyncAPIWithAuthentication class and type - */ -export type CallAsyncAPIWithAuthenticationIntersection = CallAsyncAPIWithAuthentication & - Specification.CallAsyncAPIWithAuthentication; - -/** - * Represents a constructor for the intersection of the CallAsyncAPIWithAuthentication class and type - */ -export interface CallAsyncAPIWithAuthenticationConstructor { - new (model?: Partial): CallAsyncAPIWithAuthenticationIntersection; -} - -/** - * Represents a CallAsyncAPIWithAuthentication with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class CallAsyncAPIWithAuthentication extends ObjectHydrator { - /** - * Instanciates a new instance of the CallAsyncAPIWithAuthentication class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the CallAsyncAPIWithAuthentication. - */ - constructor(model?: Partial) { - super(model); - const self = this as unknown as Specification.CallAsyncAPIWithAuthentication & object; - if (isObject(model)) { - if (typeof (model as { [k: string]: unknown; basic: Specification.AuthenticationPolicyBasic }).basic === 'object') - (self as { [k: string]: unknown; basic: Specification.AuthenticationPolicyBasic }).basic = - new _AuthenticationPolicyBasic( - (model as { [k: string]: unknown; basic: Specification.AuthenticationPolicyBasic }) - .basic as Specification.AuthenticationPolicyBasic, - ); - if ( - typeof (model as { [k: string]: unknown; bearer: Specification.AuthenticationPolicyBearer }).bearer === 'object' - ) - (self as { [k: string]: unknown; bearer: Specification.AuthenticationPolicyBearer }).bearer = - new _AuthenticationPolicyBearer( - (model as { [k: string]: unknown; bearer: Specification.AuthenticationPolicyBearer }) - .bearer as Specification.AuthenticationPolicyBearer, - ); - if ( - typeof (model as { [k: string]: unknown; oauth2: Specification.AuthenticationPolicyOauth2 }).oauth2 === 'object' - ) - (self as { [k: string]: unknown; oauth2: Specification.AuthenticationPolicyOauth2 }).oauth2 = - new _AuthenticationPolicyOauth2( - (model as { [k: string]: unknown; oauth2: Specification.AuthenticationPolicyOauth2 }) - .oauth2 as Specification.AuthenticationPolicyOauth2, - ); - } - getLifecycleHooks('CallAsyncAPIWithAuthentication')?.constructor?.(this); - } - - /** - * Validates the current instance of the CallAsyncAPIWithAuthentication. - * Throws if invalid. - */ - validate() { - const copy = new CallAsyncAPIWithAuthentication(this as any) as CallAsyncAPIWithAuthenticationIntersection; - validate('CallAsyncAPIWithAuthentication', copy); - } - - /** - * Normalizes the current instance of the CallAsyncAPIWithAuthentication. - * Creates a copy of the CallAsyncAPIWithAuthentication, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the CallAsyncAPIWithAuthentication instance. - */ - normalize(): CallAsyncAPIWithAuthentication & Specification.CallAsyncAPIWithAuthentication { - const copy = new CallAsyncAPIWithAuthentication(this as any) as CallAsyncAPIWithAuthenticationIntersection; - return getLifecycleHooks('CallAsyncAPIWithAuthentication')?.normalize?.(copy) || copy; - } -} - -export const _CallAsyncAPIWithAuthentication = - CallAsyncAPIWithAuthentication as CallAsyncAPIWithAuthenticationConstructor; diff --git a/src/lib/generated/classes/call-async-api.ts b/src/lib/generated/classes/call-async-api.ts index e2695628..ae6c5238 100644 --- a/src/lib/generated/classes/call-async-api.ts +++ b/src/lib/generated/classes/call-async-api.ts @@ -23,8 +23,9 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; -import { _CallAsyncAPIWith } from './call-async-api-with'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; +import { _AsyncApiArguments } from './async-api-arguments'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -62,8 +63,9 @@ export class CallAsyncAPI extends _TaskBase { if (typeof model.input === 'object') self.input = new _Input(model.input); if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.export === 'object') self.export = new _Export(model.export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); - if (typeof model.with === 'object') self.with = new _CallAsyncAPIWith(model.with); + if (typeof model.timeout === 'object') self.timeout = new _TaskBaseTimeout(model.timeout); + if (typeof model.metadata === 'object') self.metadata = new _TaskMetadata(model.metadata); + if (typeof model.with === 'object') self.with = new _AsyncApiArguments(model.with); } getLifecycleHooks('CallAsyncAPI')?.constructor?.(this); } diff --git a/src/lib/generated/classes/call-function.ts b/src/lib/generated/classes/call-function.ts index 88df771f..52a395cb 100644 --- a/src/lib/generated/classes/call-function.ts +++ b/src/lib/generated/classes/call-function.ts @@ -23,8 +23,9 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; -import { _CallFunctionWith } from './call-function-with'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; +import { _FunctionArguments } from './function-arguments'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -61,8 +62,9 @@ export class CallFunction extends _TaskBase { if (typeof model.input === 'object') self.input = new _Input(model.input); if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.export === 'object') self.export = new _Export(model.export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); - if (typeof model.with === 'object') self.with = new _CallFunctionWith(model.with); + if (typeof model.timeout === 'object') self.timeout = new _TaskBaseTimeout(model.timeout); + if (typeof model.metadata === 'object') self.metadata = new _TaskMetadata(model.metadata); + if (typeof model.with === 'object') self.with = new _FunctionArguments(model.with); } getLifecycleHooks('CallFunction')?.constructor?.(this); } diff --git a/src/lib/generated/classes/call-grpc-with-service-authentication.ts b/src/lib/generated/classes/call-grpc-with-service-authentication.ts deleted file mode 100644 index 033de982..00000000 --- a/src/lib/generated/classes/call-grpc-with-service-authentication.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; -import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; -import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; -import { isObject } from '../../utils'; - -/** - * Represents the intersection between the CallGRPCWithServiceAuthentication class and type - */ -export type CallGRPCWithServiceAuthenticationIntersection = CallGRPCWithServiceAuthentication & - Specification.CallGRPCWithServiceAuthentication; - -/** - * Represents a constructor for the intersection of the CallGRPCWithServiceAuthentication class and type - */ -export interface CallGRPCWithServiceAuthenticationConstructor { - new (model?: Partial): CallGRPCWithServiceAuthenticationIntersection; -} - -/** - * Represents a CallGRPCWithServiceAuthentication with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class CallGRPCWithServiceAuthentication extends ObjectHydrator { - /** - * Instanciates a new instance of the CallGRPCWithServiceAuthentication class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the CallGRPCWithServiceAuthentication. - */ - constructor(model?: Partial) { - super(model); - const self = this as unknown as Specification.CallGRPCWithServiceAuthentication & object; - if (isObject(model)) { - if (typeof (model as { [k: string]: unknown; basic: Specification.AuthenticationPolicyBasic }).basic === 'object') - (self as { [k: string]: unknown; basic: Specification.AuthenticationPolicyBasic }).basic = - new _AuthenticationPolicyBasic( - (model as { [k: string]: unknown; basic: Specification.AuthenticationPolicyBasic }) - .basic as Specification.AuthenticationPolicyBasic, - ); - if ( - typeof (model as { [k: string]: unknown; bearer: Specification.AuthenticationPolicyBearer }).bearer === 'object' - ) - (self as { [k: string]: unknown; bearer: Specification.AuthenticationPolicyBearer }).bearer = - new _AuthenticationPolicyBearer( - (model as { [k: string]: unknown; bearer: Specification.AuthenticationPolicyBearer }) - .bearer as Specification.AuthenticationPolicyBearer, - ); - if ( - typeof (model as { [k: string]: unknown; oauth2: Specification.AuthenticationPolicyOauth2 }).oauth2 === 'object' - ) - (self as { [k: string]: unknown; oauth2: Specification.AuthenticationPolicyOauth2 }).oauth2 = - new _AuthenticationPolicyOauth2( - (model as { [k: string]: unknown; oauth2: Specification.AuthenticationPolicyOauth2 }) - .oauth2 as Specification.AuthenticationPolicyOauth2, - ); - } - getLifecycleHooks('CallGRPCWithServiceAuthentication')?.constructor?.(this); - } - - /** - * Validates the current instance of the CallGRPCWithServiceAuthentication. - * Throws if invalid. - */ - validate() { - const copy = new CallGRPCWithServiceAuthentication(this as any) as CallGRPCWithServiceAuthenticationIntersection; - validate('CallGRPCWithServiceAuthentication', copy); - } - - /** - * Normalizes the current instance of the CallGRPCWithServiceAuthentication. - * Creates a copy of the CallGRPCWithServiceAuthentication, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the CallGRPCWithServiceAuthentication instance. - */ - normalize(): CallGRPCWithServiceAuthentication & Specification.CallGRPCWithServiceAuthentication { - const copy = new CallGRPCWithServiceAuthentication(this as any) as CallGRPCWithServiceAuthenticationIntersection; - return getLifecycleHooks('CallGRPCWithServiceAuthentication')?.normalize?.(copy) || copy; - } -} - -export const _CallGRPCWithServiceAuthentication = - CallGRPCWithServiceAuthentication as CallGRPCWithServiceAuthenticationConstructor; diff --git a/src/lib/generated/classes/call-grpc-with.ts b/src/lib/generated/classes/call-grpc-with.ts deleted file mode 100644 index d7169a66..00000000 --- a/src/lib/generated/classes/call-grpc-with.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { _CallGRPCWithService } from './call-grpc-with-service'; -import { _CallGRPCWithArguments } from './call-grpc-with-arguments'; -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; -import { isObject } from '../../utils'; - -/** - * Represents the intersection between the CallGRPCWith class and type - */ -export type CallGRPCWithIntersection = CallGRPCWith & Specification.CallGRPCWith; - -/** - * Represents a constructor for the intersection of the CallGRPCWith class and type - */ -export interface CallGRPCWithConstructor { - new (model?: Partial): CallGRPCWithIntersection; -} - -/** - * Represents a CallGRPCWith with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class CallGRPCWith extends ObjectHydrator { - /** - * Instanciates a new instance of the CallGRPCWith class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the CallGRPCWith. - */ - constructor(model?: Partial) { - super(model); - const self = this as unknown as Specification.CallGRPCWith & object; - if (isObject(model)) { - if (typeof model.service === 'object') self.service = new _CallGRPCWithService(model.service); - if (typeof model.arguments === 'object') self.arguments = new _CallGRPCWithArguments(model.arguments); - } - getLifecycleHooks('CallGRPCWith')?.constructor?.(this); - } - - /** - * Validates the current instance of the CallGRPCWith. - * Throws if invalid. - */ - validate() { - const copy = new CallGRPCWith(this as any) as CallGRPCWithIntersection; - validate('CallGRPCWith', copy); - } - - /** - * Normalizes the current instance of the CallGRPCWith. - * Creates a copy of the CallGRPCWith, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the CallGRPCWith instance. - */ - normalize(): CallGRPCWith & Specification.CallGRPCWith { - const copy = new CallGRPCWith(this as any) as CallGRPCWithIntersection; - return getLifecycleHooks('CallGRPCWith')?.normalize?.(copy) || copy; - } -} - -export const _CallGRPCWith = CallGRPCWith as CallGRPCWithConstructor; diff --git a/src/lib/generated/classes/call-grpc.ts b/src/lib/generated/classes/call-grpc.ts index 306194f1..46a10752 100644 --- a/src/lib/generated/classes/call-grpc.ts +++ b/src/lib/generated/classes/call-grpc.ts @@ -23,8 +23,9 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; -import { _CallGRPCWith } from './call-grpc-with'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; +import { _GRPCArguments } from './grpc-arguments'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -62,8 +63,9 @@ export class CallGRPC extends _TaskBase { if (typeof model.input === 'object') self.input = new _Input(model.input); if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.export === 'object') self.export = new _Export(model.export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); - if (typeof model.with === 'object') self.with = new _CallGRPCWith(model.with); + if (typeof model.timeout === 'object') self.timeout = new _TaskBaseTimeout(model.timeout); + if (typeof model.metadata === 'object') self.metadata = new _TaskMetadata(model.metadata); + if (typeof model.with === 'object') self.with = new _GRPCArguments(model.with); } getLifecycleHooks('CallGRPC')?.constructor?.(this); } diff --git a/src/lib/generated/classes/call-http-with.ts b/src/lib/generated/classes/call-http-with.ts deleted file mode 100644 index d487d61a..00000000 --- a/src/lib/generated/classes/call-http-with.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { _CallHTTPWithEndpoint } from './call-http-with-endpoint'; -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; -import { isObject } from '../../utils'; - -/** - * Represents the intersection between the CallHTTPWith class and type - */ -export type CallHTTPWithIntersection = CallHTTPWith & Specification.CallHTTPWith; - -/** - * Represents a constructor for the intersection of the CallHTTPWith class and type - */ -export interface CallHTTPWithConstructor { - new (model?: Partial): CallHTTPWithIntersection; -} - -/** - * Represents a CallHTTPWith with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class CallHTTPWith extends ObjectHydrator { - /** - * Instanciates a new instance of the CallHTTPWith class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the CallHTTPWith. - */ - constructor(model?: Partial) { - super(model); - const self = this as unknown as Specification.CallHTTPWith & object; - if (isObject(model)) { - if (typeof model.endpoint === 'object') self.endpoint = new _CallHTTPWithEndpoint(model.endpoint); - } - getLifecycleHooks('CallHTTPWith')?.constructor?.(this); - } - - /** - * Validates the current instance of the CallHTTPWith. - * Throws if invalid. - */ - validate() { - const copy = new CallHTTPWith(this as any) as CallHTTPWithIntersection; - validate('CallHTTPWith', copy); - } - - /** - * Normalizes the current instance of the CallHTTPWith. - * Creates a copy of the CallHTTPWith, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the CallHTTPWith instance. - */ - normalize(): CallHTTPWith & Specification.CallHTTPWith { - const copy = new CallHTTPWith(this as any) as CallHTTPWithIntersection; - return getLifecycleHooks('CallHTTPWith')?.normalize?.(copy) || copy; - } -} - -export const _CallHTTPWith = CallHTTPWith as CallHTTPWithConstructor; diff --git a/src/lib/generated/classes/call-http.ts b/src/lib/generated/classes/call-http.ts index c63a5fa5..74eb3c83 100644 --- a/src/lib/generated/classes/call-http.ts +++ b/src/lib/generated/classes/call-http.ts @@ -23,8 +23,9 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; -import { _CallHTTPWith } from './call-http-with'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; +import { _HTTPArguments } from './http-arguments'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -62,8 +63,9 @@ export class CallHTTP extends _TaskBase { if (typeof model.input === 'object') self.input = new _Input(model.input); if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.export === 'object') self.export = new _Export(model.export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); - if (typeof model.with === 'object') self.with = new _CallHTTPWith(model.with); + if (typeof model.timeout === 'object') self.timeout = new _TaskBaseTimeout(model.timeout); + if (typeof model.metadata === 'object') self.metadata = new _TaskMetadata(model.metadata); + if (typeof model.with === 'object') self.with = new _HTTPArguments(model.with); } getLifecycleHooks('CallHTTP')?.constructor?.(this); } diff --git a/src/lib/generated/classes/call-open-api-with-authentication.ts b/src/lib/generated/classes/call-open-api-with-authentication.ts deleted file mode 100644 index 8d26ebb1..00000000 --- a/src/lib/generated/classes/call-open-api-with-authentication.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; -import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; -import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; -import { isObject } from '../../utils'; - -/** - * Represents the intersection between the CallOpenAPIWithAuthentication class and type - */ -export type CallOpenAPIWithAuthenticationIntersection = CallOpenAPIWithAuthentication & - Specification.CallOpenAPIWithAuthentication; - -/** - * Represents a constructor for the intersection of the CallOpenAPIWithAuthentication class and type - */ -export interface CallOpenAPIWithAuthenticationConstructor { - new (model?: Partial): CallOpenAPIWithAuthenticationIntersection; -} - -/** - * Represents a CallOpenAPIWithAuthentication with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class CallOpenAPIWithAuthentication extends ObjectHydrator { - /** - * Instanciates a new instance of the CallOpenAPIWithAuthentication class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the CallOpenAPIWithAuthentication. - */ - constructor(model?: Partial) { - super(model); - const self = this as unknown as Specification.CallOpenAPIWithAuthentication & object; - if (isObject(model)) { - if (typeof (model as { [k: string]: unknown; basic: Specification.AuthenticationPolicyBasic }).basic === 'object') - (self as { [k: string]: unknown; basic: Specification.AuthenticationPolicyBasic }).basic = - new _AuthenticationPolicyBasic( - (model as { [k: string]: unknown; basic: Specification.AuthenticationPolicyBasic }) - .basic as Specification.AuthenticationPolicyBasic, - ); - if ( - typeof (model as { [k: string]: unknown; bearer: Specification.AuthenticationPolicyBearer }).bearer === 'object' - ) - (self as { [k: string]: unknown; bearer: Specification.AuthenticationPolicyBearer }).bearer = - new _AuthenticationPolicyBearer( - (model as { [k: string]: unknown; bearer: Specification.AuthenticationPolicyBearer }) - .bearer as Specification.AuthenticationPolicyBearer, - ); - if ( - typeof (model as { [k: string]: unknown; oauth2: Specification.AuthenticationPolicyOauth2 }).oauth2 === 'object' - ) - (self as { [k: string]: unknown; oauth2: Specification.AuthenticationPolicyOauth2 }).oauth2 = - new _AuthenticationPolicyOauth2( - (model as { [k: string]: unknown; oauth2: Specification.AuthenticationPolicyOauth2 }) - .oauth2 as Specification.AuthenticationPolicyOauth2, - ); - } - getLifecycleHooks('CallOpenAPIWithAuthentication')?.constructor?.(this); - } - - /** - * Validates the current instance of the CallOpenAPIWithAuthentication. - * Throws if invalid. - */ - validate() { - const copy = new CallOpenAPIWithAuthentication(this as any) as CallOpenAPIWithAuthenticationIntersection; - validate('CallOpenAPIWithAuthentication', copy); - } - - /** - * Normalizes the current instance of the CallOpenAPIWithAuthentication. - * Creates a copy of the CallOpenAPIWithAuthentication, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the CallOpenAPIWithAuthentication instance. - */ - normalize(): CallOpenAPIWithAuthentication & Specification.CallOpenAPIWithAuthentication { - const copy = new CallOpenAPIWithAuthentication(this as any) as CallOpenAPIWithAuthenticationIntersection; - return getLifecycleHooks('CallOpenAPIWithAuthentication')?.normalize?.(copy) || copy; - } -} - -export const _CallOpenAPIWithAuthentication = CallOpenAPIWithAuthentication as CallOpenAPIWithAuthenticationConstructor; diff --git a/src/lib/generated/classes/call-open-api-with-parameters.ts b/src/lib/generated/classes/call-open-api-with-parameters.ts deleted file mode 100644 index 43b2829f..00000000 --- a/src/lib/generated/classes/call-open-api-with-parameters.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; - -/** - * Represents the intersection between the CallOpenAPIWithParameters class and type - */ -export type CallOpenAPIWithParametersIntersection = CallOpenAPIWithParameters & Specification.CallOpenAPIWithParameters; - -/** - * Represents a constructor for the intersection of the CallOpenAPIWithParameters class and type - */ -export interface CallOpenAPIWithParametersConstructor { - new (model?: Partial): CallOpenAPIWithParametersIntersection; -} - -/** - * Represents a CallOpenAPIWithParameters with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class CallOpenAPIWithParameters extends ObjectHydrator { - /** - * Instanciates a new instance of the CallOpenAPIWithParameters class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the CallOpenAPIWithParameters. - */ - constructor(model?: Partial) { - super(model); - - getLifecycleHooks('CallOpenAPIWithParameters')?.constructor?.(this); - } - - /** - * Validates the current instance of the CallOpenAPIWithParameters. - * Throws if invalid. - */ - validate() { - const copy = new CallOpenAPIWithParameters(this as any) as CallOpenAPIWithParametersIntersection; - validate('CallOpenAPIWithParameters', copy); - } - - /** - * Normalizes the current instance of the CallOpenAPIWithParameters. - * Creates a copy of the CallOpenAPIWithParameters, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the CallOpenAPIWithParameters instance. - */ - normalize(): CallOpenAPIWithParameters & Specification.CallOpenAPIWithParameters { - const copy = new CallOpenAPIWithParameters(this as any) as CallOpenAPIWithParametersIntersection; - return getLifecycleHooks('CallOpenAPIWithParameters')?.normalize?.(copy) || copy; - } -} - -export const _CallOpenAPIWithParameters = CallOpenAPIWithParameters as CallOpenAPIWithParametersConstructor; diff --git a/src/lib/generated/classes/call-open-api-with.ts b/src/lib/generated/classes/call-open-api-with.ts deleted file mode 100644 index c8e1058c..00000000 --- a/src/lib/generated/classes/call-open-api-with.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { _CallOpenAPIWithParameters } from './call-open-api-with-parameters'; -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; -import { isObject } from '../../utils'; - -/** - * Represents the intersection between the CallOpenAPIWith class and type - */ -export type CallOpenAPIWithIntersection = CallOpenAPIWith & Specification.CallOpenAPIWith; - -/** - * Represents a constructor for the intersection of the CallOpenAPIWith class and type - */ -export interface CallOpenAPIWithConstructor { - new (model?: Partial): CallOpenAPIWithIntersection; -} - -/** - * Represents a CallOpenAPIWith with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class CallOpenAPIWith extends ObjectHydrator { - /** - * Instanciates a new instance of the CallOpenAPIWith class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the CallOpenAPIWith. - */ - constructor(model?: Partial) { - super(model); - const self = this as unknown as Specification.CallOpenAPIWith & object; - if (isObject(model)) { - if (typeof model.parameters === 'object') self.parameters = new _CallOpenAPIWithParameters(model.parameters); - } - getLifecycleHooks('CallOpenAPIWith')?.constructor?.(this); - } - - /** - * Validates the current instance of the CallOpenAPIWith. - * Throws if invalid. - */ - validate() { - const copy = new CallOpenAPIWith(this as any) as CallOpenAPIWithIntersection; - validate('CallOpenAPIWith', copy); - } - - /** - * Normalizes the current instance of the CallOpenAPIWith. - * Creates a copy of the CallOpenAPIWith, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the CallOpenAPIWith instance. - */ - normalize(): CallOpenAPIWith & Specification.CallOpenAPIWith { - const copy = new CallOpenAPIWith(this as any) as CallOpenAPIWithIntersection; - return getLifecycleHooks('CallOpenAPIWith')?.normalize?.(copy) || copy; - } -} - -export const _CallOpenAPIWith = CallOpenAPIWith as CallOpenAPIWithConstructor; diff --git a/src/lib/generated/classes/call-open-api.ts b/src/lib/generated/classes/call-open-api.ts index 12481fa8..493b9801 100644 --- a/src/lib/generated/classes/call-open-api.ts +++ b/src/lib/generated/classes/call-open-api.ts @@ -23,8 +23,9 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; -import { _CallOpenAPIWith } from './call-open-api-with'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; +import { _OpenAPIArguments } from './open-api-arguments'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -62,8 +63,9 @@ export class CallOpenAPI extends _TaskBase { if (typeof model.input === 'object') self.input = new _Input(model.input); if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.export === 'object') self.export = new _Export(model.export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); - if (typeof model.with === 'object') self.with = new _CallOpenAPIWith(model.with); + if (typeof model.timeout === 'object') self.timeout = new _TaskBaseTimeout(model.timeout); + if (typeof model.metadata === 'object') self.metadata = new _TaskMetadata(model.metadata); + if (typeof model.with === 'object') self.with = new _OpenAPIArguments(model.with); } getLifecycleHooks('CallOpenAPI')?.constructor?.(this); } diff --git a/src/lib/generated/classes/call-task.ts b/src/lib/generated/classes/call-task.ts index 24ea4c42..2e4ef830 100644 --- a/src/lib/generated/classes/call-task.ts +++ b/src/lib/generated/classes/call-task.ts @@ -23,7 +23,8 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -70,8 +71,12 @@ export class CallTask extends ObjectHydrator { (model as Specification.TaskBase).export as Specification.Export, ); if (typeof (model as Specification.TaskBase).timeout === 'object') - (self as Specification.TaskBase).timeout = new _Timeout( - (model as Specification.TaskBase).timeout as Specification.Timeout, + (self as Specification.TaskBase).timeout = new _TaskBaseTimeout( + (model as Specification.TaskBase).timeout as Specification.TaskBaseTimeout, + ); + if (typeof (model as Specification.TaskBase).metadata === 'object') + (self as Specification.TaskBase).metadata = new _TaskMetadata( + (model as Specification.TaskBase).metadata as Specification.TaskMetadata, ); } getLifecycleHooks('CallTask')?.constructor?.(this); diff --git a/src/lib/generated/classes/oauth2-token.ts b/src/lib/generated/classes/catch-errors.ts similarity index 56% rename from src/lib/generated/classes/oauth2-token.ts rename to src/lib/generated/classes/catch-errors.ts index 8779e501..e1743753 100644 --- a/src/lib/generated/classes/oauth2-token.ts +++ b/src/lib/generated/classes/catch-errors.ts @@ -26,53 +26,53 @@ import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; /** - * Represents the intersection between the Oauth2Token class and type + * Represents the intersection between the CatchErrors class and type */ -export type Oauth2TokenIntersection = Oauth2Token & Specification.Oauth2Token; +export type CatchErrorsIntersection = CatchErrors & Specification.CatchErrors; /** - * Represents a constructor for the intersection of the Oauth2Token class and type + * Represents a constructor for the intersection of the CatchErrors class and type */ -export interface Oauth2TokenConstructor { - new (model?: Partial): Oauth2TokenIntersection; +export interface CatchErrorsConstructor { + new (model?: Partial): CatchErrorsIntersection; } /** - * Represents a Oauth2Token with methods for validation and normalization. + * Represents a CatchErrors with methods for validation and normalization. * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. */ -export class Oauth2Token extends ObjectHydrator { +export class CatchErrors extends ObjectHydrator { /** - * Instanciates a new instance of the Oauth2Token class. + * Instanciates a new instance of the CatchErrors class. * Initializes properties based on the provided model if it is an object. * - * @param model - Optional partial model object to initialize the Oauth2Token. + * @param model - Optional partial model object to initialize the CatchErrors. */ - constructor(model?: Partial) { + constructor(model?: Partial) { super(model); - getLifecycleHooks('Oauth2Token')?.constructor?.(this); + getLifecycleHooks('CatchErrors')?.constructor?.(this); } /** - * Validates the current instance of the Oauth2Token. + * Validates the current instance of the CatchErrors. * Throws if invalid. */ validate() { - const copy = new Oauth2Token(this as any) as Oauth2TokenIntersection; - validate('Oauth2Token', copy); + const copy = new CatchErrors(this as any) as CatchErrorsIntersection; + validate('CatchErrors', copy); } /** - * Normalizes the current instance of the Oauth2Token. - * Creates a copy of the Oauth2Token, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the CatchErrors. + * Creates a copy of the CatchErrors, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the Oauth2Token instance. + * @returns A normalized version of the CatchErrors instance. */ - normalize(): Oauth2Token & Specification.Oauth2Token { - const copy = new Oauth2Token(this as any) as Oauth2TokenIntersection; - return getLifecycleHooks('Oauth2Token')?.normalize?.(copy) || copy; + normalize(): CatchErrors & Specification.CatchErrors { + const copy = new CatchErrors(this as any) as CatchErrorsIntersection; + return getLifecycleHooks('CatchErrors')?.normalize?.(copy) || copy; } } -export const _Oauth2Token = Oauth2Token as Oauth2TokenConstructor; +export const _CatchErrors = CatchErrors as CatchErrorsConstructor; diff --git a/src/lib/generated/classes/event-filter-with.ts b/src/lib/generated/classes/constant-backoff.ts similarity index 53% rename from src/lib/generated/classes/event-filter-with.ts rename to src/lib/generated/classes/constant-backoff.ts index 20c61074..053fbc36 100644 --- a/src/lib/generated/classes/event-filter-with.ts +++ b/src/lib/generated/classes/constant-backoff.ts @@ -26,53 +26,53 @@ import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; /** - * Represents the intersection between the EventFilterWith class and type + * Represents the intersection between the ConstantBackoff class and type */ -export type EventFilterWithIntersection = EventFilterWith & Specification.EventFilterWith; +export type ConstantBackoffIntersection = ConstantBackoff & Specification.ConstantBackoff; /** - * Represents a constructor for the intersection of the EventFilterWith class and type + * Represents a constructor for the intersection of the ConstantBackoff class and type */ -export interface EventFilterWithConstructor { - new (model?: Partial): EventFilterWithIntersection; +export interface ConstantBackoffConstructor { + new (model?: Partial): ConstantBackoffIntersection; } /** - * Represents a EventFilterWith with methods for validation and normalization. + * Represents a ConstantBackoff with methods for validation and normalization. * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. */ -export class EventFilterWith extends ObjectHydrator { +export class ConstantBackoff extends ObjectHydrator { /** - * Instanciates a new instance of the EventFilterWith class. + * Instanciates a new instance of the ConstantBackoff class. * Initializes properties based on the provided model if it is an object. * - * @param model - Optional partial model object to initialize the EventFilterWith. + * @param model - Optional partial model object to initialize the ConstantBackoff. */ - constructor(model?: Partial) { + constructor(model?: Partial) { super(model); - getLifecycleHooks('EventFilterWith')?.constructor?.(this); + getLifecycleHooks('ConstantBackoff')?.constructor?.(this); } /** - * Validates the current instance of the EventFilterWith. + * Validates the current instance of the ConstantBackoff. * Throws if invalid. */ validate() { - const copy = new EventFilterWith(this as any) as EventFilterWithIntersection; - validate('EventFilterWith', copy); + const copy = new ConstantBackoff(this as any) as ConstantBackoffIntersection; + validate('ConstantBackoff', copy); } /** - * Normalizes the current instance of the EventFilterWith. - * Creates a copy of the EventFilterWith, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the ConstantBackoff. + * Creates a copy of the ConstantBackoff, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the EventFilterWith instance. + * @returns A normalized version of the ConstantBackoff instance. */ - normalize(): EventFilterWith & Specification.EventFilterWith { - const copy = new EventFilterWith(this as any) as EventFilterWithIntersection; - return getLifecycleHooks('EventFilterWith')?.normalize?.(copy) || copy; + normalize(): ConstantBackoff & Specification.ConstantBackoff { + const copy = new ConstantBackoff(this as any) as ConstantBackoffIntersection; + return getLifecycleHooks('ConstantBackoff')?.normalize?.(copy) || copy; } } -export const _EventFilterWith = EventFilterWith as EventFilterWithConstructor; +export const _ConstantBackoff = ConstantBackoff as ConstantBackoffConstructor; diff --git a/src/lib/generated/classes/switch-task-switch-case.ts b/src/lib/generated/classes/container-environment.ts similarity index 52% rename from src/lib/generated/classes/switch-task-switch-case.ts rename to src/lib/generated/classes/container-environment.ts index 8ee28cdd..9b3dcef7 100644 --- a/src/lib/generated/classes/switch-task-switch-case.ts +++ b/src/lib/generated/classes/container-environment.ts @@ -26,53 +26,53 @@ import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; /** - * Represents the intersection between the SwitchTaskSwitchCase class and type + * Represents the intersection between the ContainerEnvironment class and type */ -export type SwitchTaskSwitchCaseIntersection = SwitchTaskSwitchCase & Specification.SwitchTaskSwitchCase; +export type ContainerEnvironmentIntersection = ContainerEnvironment & Specification.ContainerEnvironment; /** - * Represents a constructor for the intersection of the SwitchTaskSwitchCase class and type + * Represents a constructor for the intersection of the ContainerEnvironment class and type */ -export interface SwitchTaskSwitchCaseConstructor { - new (model?: Partial): SwitchTaskSwitchCaseIntersection; +export interface ContainerEnvironmentConstructor { + new (model?: Partial): ContainerEnvironmentIntersection; } /** - * Represents a SwitchTaskSwitchCase with methods for validation and normalization. + * Represents a ContainerEnvironment with methods for validation and normalization. * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. */ -export class SwitchTaskSwitchCase extends ObjectHydrator { +export class ContainerEnvironment extends ObjectHydrator { /** - * Instanciates a new instance of the SwitchTaskSwitchCase class. + * Instanciates a new instance of the ContainerEnvironment class. * Initializes properties based on the provided model if it is an object. * - * @param model - Optional partial model object to initialize the SwitchTaskSwitchCase. + * @param model - Optional partial model object to initialize the ContainerEnvironment. */ - constructor(model?: Partial) { + constructor(model?: Partial) { super(model); - getLifecycleHooks('SwitchTaskSwitchCase')?.constructor?.(this); + getLifecycleHooks('ContainerEnvironment')?.constructor?.(this); } /** - * Validates the current instance of the SwitchTaskSwitchCase. + * Validates the current instance of the ContainerEnvironment. * Throws if invalid. */ validate() { - const copy = new SwitchTaskSwitchCase(this as any) as SwitchTaskSwitchCaseIntersection; - validate('SwitchTaskSwitchCase', copy); + const copy = new ContainerEnvironment(this as any) as ContainerEnvironmentIntersection; + validate('ContainerEnvironment', copy); } /** - * Normalizes the current instance of the SwitchTaskSwitchCase. - * Creates a copy of the SwitchTaskSwitchCase, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the ContainerEnvironment. + * Creates a copy of the ContainerEnvironment, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the SwitchTaskSwitchCase instance. + * @returns A normalized version of the ContainerEnvironment instance. */ - normalize(): SwitchTaskSwitchCase & Specification.SwitchTaskSwitchCase { - const copy = new SwitchTaskSwitchCase(this as any) as SwitchTaskSwitchCaseIntersection; - return getLifecycleHooks('SwitchTaskSwitchCase')?.normalize?.(copy) || copy; + normalize(): ContainerEnvironment & Specification.ContainerEnvironment { + const copy = new ContainerEnvironment(this as any) as ContainerEnvironmentIntersection; + return getLifecycleHooks('ContainerEnvironment')?.normalize?.(copy) || copy; } } -export const _SwitchTaskSwitchCase = SwitchTaskSwitchCase as SwitchTaskSwitchCaseConstructor; +export const _ContainerEnvironment = ContainerEnvironment as ContainerEnvironmentConstructor; diff --git a/src/lib/generated/classes/container-ports.ts b/src/lib/generated/classes/container-ports.ts new file mode 100644 index 00000000..b1ebfeb0 --- /dev/null +++ b/src/lib/generated/classes/container-ports.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the ContainerPorts class and type + */ +export type ContainerPortsIntersection = ContainerPorts & Specification.ContainerPorts; + +/** + * Represents a constructor for the intersection of the ContainerPorts class and type + */ +export interface ContainerPortsConstructor { + new (model?: Partial): ContainerPortsIntersection; +} + +/** + * Represents a ContainerPorts with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class ContainerPorts extends ObjectHydrator { + /** + * Instanciates a new instance of the ContainerPorts class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the ContainerPorts. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('ContainerPorts')?.constructor?.(this); + } + + /** + * Validates the current instance of the ContainerPorts. + * Throws if invalid. + */ + validate() { + const copy = new ContainerPorts(this as any) as ContainerPortsIntersection; + validate('ContainerPorts', copy); + } + + /** + * Normalizes the current instance of the ContainerPorts. + * Creates a copy of the ContainerPorts, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the ContainerPorts instance. + */ + normalize(): ContainerPorts & Specification.ContainerPorts { + const copy = new ContainerPorts(this as any) as ContainerPortsIntersection; + return getLifecycleHooks('ContainerPorts')?.normalize?.(copy) || copy; + } +} + +export const _ContainerPorts = ContainerPorts as ContainerPortsConstructor; diff --git a/src/lib/generated/classes/call-function-with.ts b/src/lib/generated/classes/container-volumes.ts similarity index 53% rename from src/lib/generated/classes/call-function-with.ts rename to src/lib/generated/classes/container-volumes.ts index 9bde3457..7026c16d 100644 --- a/src/lib/generated/classes/call-function-with.ts +++ b/src/lib/generated/classes/container-volumes.ts @@ -26,53 +26,53 @@ import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; /** - * Represents the intersection between the CallFunctionWith class and type + * Represents the intersection between the ContainerVolumes class and type */ -export type CallFunctionWithIntersection = CallFunctionWith & Specification.CallFunctionWith; +export type ContainerVolumesIntersection = ContainerVolumes & Specification.ContainerVolumes; /** - * Represents a constructor for the intersection of the CallFunctionWith class and type + * Represents a constructor for the intersection of the ContainerVolumes class and type */ -export interface CallFunctionWithConstructor { - new (model?: Partial): CallFunctionWithIntersection; +export interface ContainerVolumesConstructor { + new (model?: Partial): ContainerVolumesIntersection; } /** - * Represents a CallFunctionWith with methods for validation and normalization. + * Represents a ContainerVolumes with methods for validation and normalization. * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. */ -export class CallFunctionWith extends ObjectHydrator { +export class ContainerVolumes extends ObjectHydrator { /** - * Instanciates a new instance of the CallFunctionWith class. + * Instanciates a new instance of the ContainerVolumes class. * Initializes properties based on the provided model if it is an object. * - * @param model - Optional partial model object to initialize the CallFunctionWith. + * @param model - Optional partial model object to initialize the ContainerVolumes. */ - constructor(model?: Partial) { + constructor(model?: Partial) { super(model); - getLifecycleHooks('CallFunctionWith')?.constructor?.(this); + getLifecycleHooks('ContainerVolumes')?.constructor?.(this); } /** - * Validates the current instance of the CallFunctionWith. + * Validates the current instance of the ContainerVolumes. * Throws if invalid. */ validate() { - const copy = new CallFunctionWith(this as any) as CallFunctionWithIntersection; - validate('CallFunctionWith', copy); + const copy = new ContainerVolumes(this as any) as ContainerVolumesIntersection; + validate('ContainerVolumes', copy); } /** - * Normalizes the current instance of the CallFunctionWith. - * Creates a copy of the CallFunctionWith, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the ContainerVolumes. + * Creates a copy of the ContainerVolumes, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the CallFunctionWith instance. + * @returns A normalized version of the ContainerVolumes instance. */ - normalize(): CallFunctionWith & Specification.CallFunctionWith { - const copy = new CallFunctionWith(this as any) as CallFunctionWithIntersection; - return getLifecycleHooks('CallFunctionWith')?.normalize?.(copy) || copy; + normalize(): ContainerVolumes & Specification.ContainerVolumes { + const copy = new ContainerVolumes(this as any) as ContainerVolumesIntersection; + return getLifecycleHooks('ContainerVolumes')?.normalize?.(copy) || copy; } } -export const _CallFunctionWith = CallFunctionWith as CallFunctionWithConstructor; +export const _ContainerVolumes = ContainerVolumes as ContainerVolumesConstructor; diff --git a/src/lib/generated/classes/container.ts b/src/lib/generated/classes/container.ts new file mode 100644 index 00000000..22550d4c --- /dev/null +++ b/src/lib/generated/classes/container.ts @@ -0,0 +1,87 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _ContainerPorts } from './container-ports'; +import { _ContainerVolumes } from './container-volumes'; +import { _ContainerEnvironment } from './container-environment'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the Container class and type + */ +export type ContainerIntersection = Container & Specification.Container; + +/** + * Represents a constructor for the intersection of the Container class and type + */ +export interface ContainerConstructor { + new (model?: Partial): ContainerIntersection; +} + +/** + * Represents a Container with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Container extends ObjectHydrator { + /** + * Instanciates a new instance of the Container class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Container. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.Container & object; + if (isObject(model)) { + if (typeof model.ports === 'object') self.ports = new _ContainerPorts(model.ports); + if (typeof model.volumes === 'object') self.volumes = new _ContainerVolumes(model.volumes); + if (typeof model.environment === 'object') self.environment = new _ContainerEnvironment(model.environment); + } + getLifecycleHooks('Container')?.constructor?.(this); + } + + /** + * Validates the current instance of the Container. + * Throws if invalid. + */ + validate() { + const copy = new Container(this as any) as ContainerIntersection; + validate('Container', copy); + } + + /** + * Normalizes the current instance of the Container. + * Creates a copy of the Container, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Container instance. + */ + normalize(): Container & Specification.Container { + const copy = new Container(this as any) as ContainerIntersection; + return getLifecycleHooks('Container')?.normalize?.(copy) || copy; + } +} + +export const _Container = Container as ContainerConstructor; diff --git a/src/lib/generated/classes/digest-authentication-policy-configuration.ts b/src/lib/generated/classes/digest-authentication-policy-configuration.ts new file mode 100644 index 00000000..3888816e --- /dev/null +++ b/src/lib/generated/classes/digest-authentication-policy-configuration.ts @@ -0,0 +1,86 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the DigestAuthenticationPolicyConfiguration class and type + */ +export type DigestAuthenticationPolicyConfigurationIntersection = DigestAuthenticationPolicyConfiguration & + Specification.DigestAuthenticationPolicyConfiguration; + +/** + * Represents a constructor for the intersection of the DigestAuthenticationPolicyConfiguration class and type + */ +export interface DigestAuthenticationPolicyConfigurationConstructor { + new ( + model?: Partial, + ): DigestAuthenticationPolicyConfigurationIntersection; +} + +/** + * Represents a DigestAuthenticationPolicyConfiguration with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class DigestAuthenticationPolicyConfiguration extends ObjectHydrator { + /** + * Instanciates a new instance of the DigestAuthenticationPolicyConfiguration class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the DigestAuthenticationPolicyConfiguration. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('DigestAuthenticationPolicyConfiguration')?.constructor?.(this); + } + + /** + * Validates the current instance of the DigestAuthenticationPolicyConfiguration. + * Throws if invalid. + */ + validate() { + const copy = new DigestAuthenticationPolicyConfiguration( + this as any, + ) as DigestAuthenticationPolicyConfigurationIntersection; + validate('DigestAuthenticationPolicyConfiguration', copy); + } + + /** + * Normalizes the current instance of the DigestAuthenticationPolicyConfiguration. + * Creates a copy of the DigestAuthenticationPolicyConfiguration, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the DigestAuthenticationPolicyConfiguration instance. + */ + normalize(): DigestAuthenticationPolicyConfiguration & Specification.DigestAuthenticationPolicyConfiguration { + const copy = new DigestAuthenticationPolicyConfiguration( + this as any, + ) as DigestAuthenticationPolicyConfigurationIntersection; + return getLifecycleHooks('DigestAuthenticationPolicyConfiguration')?.normalize?.(copy) || copy; + } +} + +export const _DigestAuthenticationPolicyConfiguration = + DigestAuthenticationPolicyConfiguration as DigestAuthenticationPolicyConfigurationConstructor; diff --git a/src/lib/generated/classes/digest-authentication-policy.ts b/src/lib/generated/classes/digest-authentication-policy.ts new file mode 100644 index 00000000..58e1bac4 --- /dev/null +++ b/src/lib/generated/classes/digest-authentication-policy.ts @@ -0,0 +1,84 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _DigestAuthenticationPolicyConfiguration } from './digest-authentication-policy-configuration'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the DigestAuthenticationPolicy class and type + */ +export type DigestAuthenticationPolicyIntersection = DigestAuthenticationPolicy & + Specification.DigestAuthenticationPolicy; + +/** + * Represents a constructor for the intersection of the DigestAuthenticationPolicy class and type + */ +export interface DigestAuthenticationPolicyConstructor { + new (model?: Partial): DigestAuthenticationPolicyIntersection; +} + +/** + * Represents a DigestAuthenticationPolicy with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class DigestAuthenticationPolicy extends ObjectHydrator { + /** + * Instanciates a new instance of the DigestAuthenticationPolicy class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the DigestAuthenticationPolicy. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.DigestAuthenticationPolicy & object; + if (isObject(model)) { + if (typeof model.digest === 'object') self.digest = new _DigestAuthenticationPolicyConfiguration(model.digest); + } + getLifecycleHooks('DigestAuthenticationPolicy')?.constructor?.(this); + } + + /** + * Validates the current instance of the DigestAuthenticationPolicy. + * Throws if invalid. + */ + validate() { + const copy = new DigestAuthenticationPolicy(this as any) as DigestAuthenticationPolicyIntersection; + validate('DigestAuthenticationPolicy', copy); + } + + /** + * Normalizes the current instance of the DigestAuthenticationPolicy. + * Creates a copy of the DigestAuthenticationPolicy, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the DigestAuthenticationPolicy instance. + */ + normalize(): DigestAuthenticationPolicy & Specification.DigestAuthenticationPolicy { + const copy = new DigestAuthenticationPolicy(this as any) as DigestAuthenticationPolicyIntersection; + return getLifecycleHooks('DigestAuthenticationPolicy')?.normalize?.(copy) || copy; + } +} + +export const _DigestAuthenticationPolicy = DigestAuthenticationPolicy as DigestAuthenticationPolicyConstructor; diff --git a/src/lib/generated/classes/digest-authentication-properties.ts b/src/lib/generated/classes/digest-authentication-properties.ts new file mode 100644 index 00000000..62ba1a7d --- /dev/null +++ b/src/lib/generated/classes/digest-authentication-properties.ts @@ -0,0 +1,80 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the DigestAuthenticationProperties class and type + */ +export type DigestAuthenticationPropertiesIntersection = DigestAuthenticationProperties & + Specification.DigestAuthenticationProperties; + +/** + * Represents a constructor for the intersection of the DigestAuthenticationProperties class and type + */ +export interface DigestAuthenticationPropertiesConstructor { + new (model?: Partial): DigestAuthenticationPropertiesIntersection; +} + +/** + * Represents a DigestAuthenticationProperties with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class DigestAuthenticationProperties extends ObjectHydrator { + /** + * Instanciates a new instance of the DigestAuthenticationProperties class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the DigestAuthenticationProperties. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('DigestAuthenticationProperties')?.constructor?.(this); + } + + /** + * Validates the current instance of the DigestAuthenticationProperties. + * Throws if invalid. + */ + validate() { + const copy = new DigestAuthenticationProperties(this as any) as DigestAuthenticationPropertiesIntersection; + validate('DigestAuthenticationProperties', copy); + } + + /** + * Normalizes the current instance of the DigestAuthenticationProperties. + * Creates a copy of the DigestAuthenticationProperties, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the DigestAuthenticationProperties instance. + */ + normalize(): DigestAuthenticationProperties & Specification.DigestAuthenticationProperties { + const copy = new DigestAuthenticationProperties(this as any) as DigestAuthenticationPropertiesIntersection; + return getLifecycleHooks('DigestAuthenticationProperties')?.normalize?.(copy) || copy; + } +} + +export const _DigestAuthenticationProperties = + DigestAuthenticationProperties as DigestAuthenticationPropertiesConstructor; diff --git a/src/lib/generated/classes/do-task.ts b/src/lib/generated/classes/do-task.ts index 4032e917..1e2cf0ca 100644 --- a/src/lib/generated/classes/do-task.ts +++ b/src/lib/generated/classes/do-task.ts @@ -23,7 +23,8 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; import { _TaskList } from './task-list'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; @@ -61,7 +62,8 @@ export class DoTask extends _TaskBase { if (typeof model.input === 'object') self.input = new _Input(model.input); if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.export === 'object') self.export = new _Export(model.export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.timeout === 'object') self.timeout = new _TaskBaseTimeout(model.timeout); + if (typeof model.metadata === 'object') self.metadata = new _TaskMetadata(model.metadata); if (typeof model.do === 'object') self.do = new _TaskList(model.do); } getLifecycleHooks('DoTask')?.constructor?.(this); diff --git a/src/lib/generated/classes/document.ts b/src/lib/generated/classes/document.ts index 064e4229..a284757f 100644 --- a/src/lib/generated/classes/document.ts +++ b/src/lib/generated/classes/document.ts @@ -20,7 +20,8 @@ * *****************************************************************************************/ -import { _DocumentTags } from './document-tags'; +import { _WorkflowTags } from './workflow-tags'; +import { _WorkflowMetadata } from './workflow-metadata'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -54,7 +55,8 @@ export class Document extends ObjectHydrator { super(model); const self = this as unknown as Specification.Document & object; if (isObject(model)) { - if (typeof model.tags === 'object') self.tags = new _DocumentTags(model.tags); + if (typeof model.tags === 'object') self.tags = new _WorkflowTags(model.tags); + if (typeof model.metadata === 'object') self.metadata = new _WorkflowMetadata(model.metadata); } getLifecycleHooks('Document')?.constructor?.(this); } diff --git a/src/lib/generated/classes/duration-inline.ts b/src/lib/generated/classes/duration-inline.ts new file mode 100644 index 00000000..5e0c8fc7 --- /dev/null +++ b/src/lib/generated/classes/duration-inline.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the DurationInline class and type + */ +export type DurationInlineIntersection = DurationInline & Specification.DurationInline; + +/** + * Represents a constructor for the intersection of the DurationInline class and type + */ +export interface DurationInlineConstructor { + new (model?: Partial): DurationInlineIntersection; +} + +/** + * Represents a DurationInline with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class DurationInline extends ObjectHydrator { + /** + * Instanciates a new instance of the DurationInline class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the DurationInline. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('DurationInline')?.constructor?.(this); + } + + /** + * Validates the current instance of the DurationInline. + * Throws if invalid. + */ + validate() { + const copy = new DurationInline(this as any) as DurationInlineIntersection; + validate('DurationInline', copy); + } + + /** + * Normalizes the current instance of the DurationInline. + * Creates a copy of the DurationInline, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the DurationInline instance. + */ + normalize(): DurationInline & Specification.DurationInline { + const copy = new DurationInline(this as any) as DurationInlineIntersection; + return getLifecycleHooks('DurationInline')?.normalize?.(copy) || copy; + } +} + +export const _DurationInline = DurationInline as DurationInlineConstructor; diff --git a/src/lib/generated/classes/emit-event-definition.ts b/src/lib/generated/classes/emit-event-definition.ts new file mode 100644 index 00000000..5f040683 --- /dev/null +++ b/src/lib/generated/classes/emit-event-definition.ts @@ -0,0 +1,83 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _EmitEventWith } from './emit-event-with'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the EmitEventDefinition class and type + */ +export type EmitEventDefinitionIntersection = EmitEventDefinition & Specification.EmitEventDefinition; + +/** + * Represents a constructor for the intersection of the EmitEventDefinition class and type + */ +export interface EmitEventDefinitionConstructor { + new (model?: Partial): EmitEventDefinitionIntersection; +} + +/** + * Represents a EmitEventDefinition with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class EmitEventDefinition extends ObjectHydrator { + /** + * Instanciates a new instance of the EmitEventDefinition class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the EmitEventDefinition. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.EmitEventDefinition & object; + if (isObject(model)) { + if (typeof model.with === 'object') self.with = new _EmitEventWith(model.with); + } + getLifecycleHooks('EmitEventDefinition')?.constructor?.(this); + } + + /** + * Validates the current instance of the EmitEventDefinition. + * Throws if invalid. + */ + validate() { + const copy = new EmitEventDefinition(this as any) as EmitEventDefinitionIntersection; + validate('EmitEventDefinition', copy); + } + + /** + * Normalizes the current instance of the EmitEventDefinition. + * Creates a copy of the EmitEventDefinition, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the EmitEventDefinition instance. + */ + normalize(): EmitEventDefinition & Specification.EmitEventDefinition { + const copy = new EmitEventDefinition(this as any) as EmitEventDefinitionIntersection; + return getLifecycleHooks('EmitEventDefinition')?.normalize?.(copy) || copy; + } +} + +export const _EmitEventDefinition = EmitEventDefinition as EmitEventDefinitionConstructor; diff --git a/src/lib/generated/classes/emit-event-with.ts b/src/lib/generated/classes/emit-event-with.ts new file mode 100644 index 00000000..c67f3a94 --- /dev/null +++ b/src/lib/generated/classes/emit-event-with.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the EmitEventWith class and type + */ +export type EmitEventWithIntersection = EmitEventWith & Specification.EmitEventWith; + +/** + * Represents a constructor for the intersection of the EmitEventWith class and type + */ +export interface EmitEventWithConstructor { + new (model?: Partial): EmitEventWithIntersection; +} + +/** + * Represents a EmitEventWith with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class EmitEventWith extends ObjectHydrator { + /** + * Instanciates a new instance of the EmitEventWith class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the EmitEventWith. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('EmitEventWith')?.constructor?.(this); + } + + /** + * Validates the current instance of the EmitEventWith. + * Throws if invalid. + */ + validate() { + const copy = new EmitEventWith(this as any) as EmitEventWithIntersection; + validate('EmitEventWith', copy); + } + + /** + * Normalizes the current instance of the EmitEventWith. + * Creates a copy of the EmitEventWith, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the EmitEventWith instance. + */ + normalize(): EmitEventWith & Specification.EmitEventWith { + const copy = new EmitEventWith(this as any) as EmitEventWithIntersection; + return getLifecycleHooks('EmitEventWith')?.normalize?.(copy) || copy; + } +} + +export const _EmitEventWith = EmitEventWith as EmitEventWithConstructor; diff --git a/src/lib/generated/classes/emit-task-configuration.ts b/src/lib/generated/classes/emit-task-configuration.ts new file mode 100644 index 00000000..6d84d1d9 --- /dev/null +++ b/src/lib/generated/classes/emit-task-configuration.ts @@ -0,0 +1,83 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _EmitEventDefinition } from './emit-event-definition'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the EmitTaskConfiguration class and type + */ +export type EmitTaskConfigurationIntersection = EmitTaskConfiguration & Specification.EmitTaskConfiguration; + +/** + * Represents a constructor for the intersection of the EmitTaskConfiguration class and type + */ +export interface EmitTaskConfigurationConstructor { + new (model?: Partial): EmitTaskConfigurationIntersection; +} + +/** + * Represents a EmitTaskConfiguration with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class EmitTaskConfiguration extends ObjectHydrator { + /** + * Instanciates a new instance of the EmitTaskConfiguration class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the EmitTaskConfiguration. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.EmitTaskConfiguration & object; + if (isObject(model)) { + if (typeof model.event === 'object') self.event = new _EmitEventDefinition(model.event); + } + getLifecycleHooks('EmitTaskConfiguration')?.constructor?.(this); + } + + /** + * Validates the current instance of the EmitTaskConfiguration. + * Throws if invalid. + */ + validate() { + const copy = new EmitTaskConfiguration(this as any) as EmitTaskConfigurationIntersection; + validate('EmitTaskConfiguration', copy); + } + + /** + * Normalizes the current instance of the EmitTaskConfiguration. + * Creates a copy of the EmitTaskConfiguration, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the EmitTaskConfiguration instance. + */ + normalize(): EmitTaskConfiguration & Specification.EmitTaskConfiguration { + const copy = new EmitTaskConfiguration(this as any) as EmitTaskConfigurationIntersection; + return getLifecycleHooks('EmitTaskConfiguration')?.normalize?.(copy) || copy; + } +} + +export const _EmitTaskConfiguration = EmitTaskConfiguration as EmitTaskConfigurationConstructor; diff --git a/src/lib/generated/classes/emit-task-emit.ts b/src/lib/generated/classes/emit-task-emit.ts deleted file mode 100644 index 551d9617..00000000 --- a/src/lib/generated/classes/emit-task-emit.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { _EmitTaskEmitEvent } from './emit-task-emit-event'; -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; -import { isObject } from '../../utils'; - -/** - * Represents the intersection between the EmitTaskEmit class and type - */ -export type EmitTaskEmitIntersection = EmitTaskEmit & Specification.EmitTaskEmit; - -/** - * Represents a constructor for the intersection of the EmitTaskEmit class and type - */ -export interface EmitTaskEmitConstructor { - new (model?: Partial): EmitTaskEmitIntersection; -} - -/** - * Represents a EmitTaskEmit with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class EmitTaskEmit extends ObjectHydrator { - /** - * Instanciates a new instance of the EmitTaskEmit class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the EmitTaskEmit. - */ - constructor(model?: Partial) { - super(model); - const self = this as unknown as Specification.EmitTaskEmit & object; - if (isObject(model)) { - if (typeof model.event === 'object') self.event = new _EmitTaskEmitEvent(model.event); - } - getLifecycleHooks('EmitTaskEmit')?.constructor?.(this); - } - - /** - * Validates the current instance of the EmitTaskEmit. - * Throws if invalid. - */ - validate() { - const copy = new EmitTaskEmit(this as any) as EmitTaskEmitIntersection; - validate('EmitTaskEmit', copy); - } - - /** - * Normalizes the current instance of the EmitTaskEmit. - * Creates a copy of the EmitTaskEmit, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the EmitTaskEmit instance. - */ - normalize(): EmitTaskEmit & Specification.EmitTaskEmit { - const copy = new EmitTaskEmit(this as any) as EmitTaskEmitIntersection; - return getLifecycleHooks('EmitTaskEmit')?.normalize?.(copy) || copy; - } -} - -export const _EmitTaskEmit = EmitTaskEmit as EmitTaskEmitConstructor; diff --git a/src/lib/generated/classes/emit-task.ts b/src/lib/generated/classes/emit-task.ts index 5cd34c83..a4e4a748 100644 --- a/src/lib/generated/classes/emit-task.ts +++ b/src/lib/generated/classes/emit-task.ts @@ -23,8 +23,9 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; -import { _EmitTaskEmit } from './emit-task-emit'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; +import { _EmitTaskConfiguration } from './emit-task-configuration'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -61,8 +62,9 @@ export class EmitTask extends _TaskBase { if (typeof model.input === 'object') self.input = new _Input(model.input); if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.export === 'object') self.export = new _Export(model.export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); - if (typeof model.emit === 'object') self.emit = new _EmitTaskEmit(model.emit); + if (typeof model.timeout === 'object') self.timeout = new _TaskBaseTimeout(model.timeout); + if (typeof model.metadata === 'object') self.metadata = new _TaskMetadata(model.metadata); + if (typeof model.emit === 'object') self.emit = new _EmitTaskConfiguration(model.emit); } getLifecycleHooks('EmitTask')?.constructor?.(this); } diff --git a/src/lib/generated/classes/endpoint-authentication.ts b/src/lib/generated/classes/endpoint-authentication.ts deleted file mode 100644 index e9ff1a3a..00000000 --- a/src/lib/generated/classes/endpoint-authentication.ts +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; -import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; -import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; -import { isObject } from '../../utils'; - -/** - * Represents the intersection between the EndpointAuthentication class and type - */ -export type EndpointAuthenticationIntersection = EndpointAuthentication & Specification.EndpointAuthentication; - -/** - * Represents a constructor for the intersection of the EndpointAuthentication class and type - */ -export interface EndpointAuthenticationConstructor { - new (model?: Partial): EndpointAuthenticationIntersection; -} - -/** - * Represents a EndpointAuthentication with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class EndpointAuthentication extends ObjectHydrator { - /** - * Instanciates a new instance of the EndpointAuthentication class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the EndpointAuthentication. - */ - constructor(model?: Partial) { - super(model); - const self = this as unknown as Specification.EndpointAuthentication & object; - if (isObject(model)) { - if (typeof (model as { [k: string]: unknown; basic: Specification.AuthenticationPolicyBasic }).basic === 'object') - (self as { [k: string]: unknown; basic: Specification.AuthenticationPolicyBasic }).basic = - new _AuthenticationPolicyBasic( - (model as { [k: string]: unknown; basic: Specification.AuthenticationPolicyBasic }) - .basic as Specification.AuthenticationPolicyBasic, - ); - if ( - typeof (model as { [k: string]: unknown; bearer: Specification.AuthenticationPolicyBearer }).bearer === 'object' - ) - (self as { [k: string]: unknown; bearer: Specification.AuthenticationPolicyBearer }).bearer = - new _AuthenticationPolicyBearer( - (model as { [k: string]: unknown; bearer: Specification.AuthenticationPolicyBearer }) - .bearer as Specification.AuthenticationPolicyBearer, - ); - if ( - typeof (model as { [k: string]: unknown; oauth2: Specification.AuthenticationPolicyOauth2 }).oauth2 === 'object' - ) - (self as { [k: string]: unknown; oauth2: Specification.AuthenticationPolicyOauth2 }).oauth2 = - new _AuthenticationPolicyOauth2( - (model as { [k: string]: unknown; oauth2: Specification.AuthenticationPolicyOauth2 }) - .oauth2 as Specification.AuthenticationPolicyOauth2, - ); - } - getLifecycleHooks('EndpointAuthentication')?.constructor?.(this); - } - - /** - * Validates the current instance of the EndpointAuthentication. - * Throws if invalid. - */ - validate() { - const copy = new EndpointAuthentication(this as any) as EndpointAuthenticationIntersection; - validate('EndpointAuthentication', copy); - } - - /** - * Normalizes the current instance of the EndpointAuthentication. - * Creates a copy of the EndpointAuthentication, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the EndpointAuthentication instance. - */ - normalize(): EndpointAuthentication & Specification.EndpointAuthentication { - const copy = new EndpointAuthentication(this as any) as EndpointAuthenticationIntersection; - return getLifecycleHooks('EndpointAuthentication')?.normalize?.(copy) || copy; - } -} - -export const _EndpointAuthentication = EndpointAuthentication as EndpointAuthenticationConstructor; diff --git a/src/lib/generated/classes/endpoint-configuration.ts b/src/lib/generated/classes/endpoint-configuration.ts new file mode 100644 index 00000000..6fe13894 --- /dev/null +++ b/src/lib/generated/classes/endpoint-configuration.ts @@ -0,0 +1,84 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _ReferenceableAuthenticationPolicy } from './referenceable-authentication-policy'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the EndpointConfiguration class and type + */ +export type EndpointConfigurationIntersection = EndpointConfiguration & Specification.EndpointConfiguration; + +/** + * Represents a constructor for the intersection of the EndpointConfiguration class and type + */ +export interface EndpointConfigurationConstructor { + new (model?: Partial): EndpointConfigurationIntersection; +} + +/** + * Represents a EndpointConfiguration with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class EndpointConfiguration extends ObjectHydrator { + /** + * Instanciates a new instance of the EndpointConfiguration class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the EndpointConfiguration. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.EndpointConfiguration & object; + if (isObject(model)) { + if (typeof model.authentication === 'object') + self.authentication = new _ReferenceableAuthenticationPolicy(model.authentication); + } + getLifecycleHooks('EndpointConfiguration')?.constructor?.(this); + } + + /** + * Validates the current instance of the EndpointConfiguration. + * Throws if invalid. + */ + validate() { + const copy = new EndpointConfiguration(this as any) as EndpointConfigurationIntersection; + validate('EndpointConfiguration', copy); + } + + /** + * Normalizes the current instance of the EndpointConfiguration. + * Creates a copy of the EndpointConfiguration, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the EndpointConfiguration instance. + */ + normalize(): EndpointConfiguration & Specification.EndpointConfiguration { + const copy = new EndpointConfiguration(this as any) as EndpointConfigurationIntersection; + return getLifecycleHooks('EndpointConfiguration')?.normalize?.(copy) || copy; + } +} + +export const _EndpointConfiguration = EndpointConfiguration as EndpointConfigurationConstructor; diff --git a/src/lib/generated/classes/endpoint-uri.ts b/src/lib/generated/classes/endpoint-uri.ts new file mode 100644 index 00000000..be50280c --- /dev/null +++ b/src/lib/generated/classes/endpoint-uri.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the EndpointUri class and type + */ +export type EndpointUriIntersection = EndpointUri & Specification.EndpointUri; + +/** + * Represents a constructor for the intersection of the EndpointUri class and type + */ +export interface EndpointUriConstructor { + new (model?: Partial): EndpointUriIntersection; +} + +/** + * Represents a EndpointUri with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class EndpointUri extends ObjectHydrator { + /** + * Instanciates a new instance of the EndpointUri class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the EndpointUri. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('EndpointUri')?.constructor?.(this); + } + + /** + * Validates the current instance of the EndpointUri. + * Throws if invalid. + */ + validate() { + const copy = new EndpointUri(this as any) as EndpointUriIntersection; + validate('EndpointUri', copy); + } + + /** + * Normalizes the current instance of the EndpointUri. + * Creates a copy of the EndpointUri, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the EndpointUri instance. + */ + normalize(): EndpointUri & Specification.EndpointUri { + const copy = new EndpointUri(this as any) as EndpointUriIntersection; + return getLifecycleHooks('EndpointUri')?.normalize?.(copy) || copy; + } +} + +export const _EndpointUri = EndpointUri as EndpointUriConstructor; diff --git a/src/lib/generated/classes/endpoint.ts b/src/lib/generated/classes/endpoint.ts index c59b4d2d..353aaf99 100644 --- a/src/lib/generated/classes/endpoint.ts +++ b/src/lib/generated/classes/endpoint.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ +import { _ReferenceableAuthenticationPolicy } from './referenceable-authentication-policy'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; +import { isObject } from '../../utils'; /** * Represents the intersection between the Endpoint class and type @@ -50,7 +52,14 @@ export class Endpoint extends ObjectHydrator { */ constructor(model?: Partial) { super(model); - + const self = this as unknown as Specification.Endpoint & object; + if (isObject(model)) { + if (typeof (model as Specification.EndpointConfiguration).authentication === 'object') + (self as Specification.EndpointConfiguration).authentication = new _ReferenceableAuthenticationPolicy( + (model as Specification.EndpointConfiguration) + .authentication as Specification.ReferenceableAuthenticationPolicy, + ); + } getLifecycleHooks('Endpoint')?.constructor?.(this); } diff --git a/src/lib/generated/classes/error-instance.ts b/src/lib/generated/classes/error-instance.ts new file mode 100644 index 00000000..524011fd --- /dev/null +++ b/src/lib/generated/classes/error-instance.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the ErrorInstance class and type + */ +export type ErrorInstanceIntersection = ErrorInstance & Specification.ErrorInstance; + +/** + * Represents a constructor for the intersection of the ErrorInstance class and type + */ +export interface ErrorInstanceConstructor { + new (model?: Partial): ErrorInstanceIntersection; +} + +/** + * Represents a ErrorInstance with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class ErrorInstance extends ObjectHydrator { + /** + * Instanciates a new instance of the ErrorInstance class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the ErrorInstance. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('ErrorInstance')?.constructor?.(this); + } + + /** + * Validates the current instance of the ErrorInstance. + * Throws if invalid. + */ + validate() { + const copy = new ErrorInstance(this as any) as ErrorInstanceIntersection; + validate('ErrorInstance', copy); + } + + /** + * Normalizes the current instance of the ErrorInstance. + * Creates a copy of the ErrorInstance, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the ErrorInstance instance. + */ + normalize(): ErrorInstance & Specification.ErrorInstance { + const copy = new ErrorInstance(this as any) as ErrorInstanceIntersection; + return getLifecycleHooks('ErrorInstance')?.normalize?.(copy) || copy; + } +} + +export const _ErrorInstance = ErrorInstance as ErrorInstanceConstructor; diff --git a/src/lib/generated/classes/error-type.ts b/src/lib/generated/classes/error-type.ts new file mode 100644 index 00000000..04c64645 --- /dev/null +++ b/src/lib/generated/classes/error-type.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the ErrorType class and type + */ +export type ErrorTypeIntersection = ErrorType & Specification.ErrorType; + +/** + * Represents a constructor for the intersection of the ErrorType class and type + */ +export interface ErrorTypeConstructor { + new (model?: Partial): ErrorTypeIntersection; +} + +/** + * Represents a ErrorType with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class ErrorType extends ObjectHydrator { + /** + * Instanciates a new instance of the ErrorType class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the ErrorType. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('ErrorType')?.constructor?.(this); + } + + /** + * Validates the current instance of the ErrorType. + * Throws if invalid. + */ + validate() { + const copy = new ErrorType(this as any) as ErrorTypeIntersection; + validate('ErrorType', copy); + } + + /** + * Normalizes the current instance of the ErrorType. + * Creates a copy of the ErrorType, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the ErrorType instance. + */ + normalize(): ErrorType & Specification.ErrorType { + const copy = new ErrorType(this as any) as ErrorTypeIntersection; + return getLifecycleHooks('ErrorType')?.normalize?.(copy) || copy; + } +} + +export const _ErrorType = ErrorType as ErrorTypeConstructor; diff --git a/src/lib/generated/classes/event-consumption-strategy.ts b/src/lib/generated/classes/event-consumption-strategy.ts index 1ff9d596..25fee1db 100644 --- a/src/lib/generated/classes/event-consumption-strategy.ts +++ b/src/lib/generated/classes/event-consumption-strategy.ts @@ -20,8 +20,8 @@ * *****************************************************************************************/ -import { _EventConsumptionStrategyAll } from './event-consumption-strategy-all'; -import { _EventConsumptionStrategyAny } from './event-consumption-strategy-any'; +import { _AllEventConsumptionStrategyConfiguration } from './all-event-consumption-strategy-configuration'; +import { _AnyEventConsumptionStrategyConfiguration } from './any-event-consumption-strategy-configuration'; import { _EventFilter } from './event-filter'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; @@ -56,21 +56,19 @@ export class EventConsumptionStrategy extends ObjectHydrator): EventDataschemaIntersection; +} + +/** + * Represents a EventDataschema with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class EventDataschema extends ObjectHydrator { + /** + * Instanciates a new instance of the EventDataschema class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the EventDataschema. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('EventDataschema')?.constructor?.(this); + } + + /** + * Validates the current instance of the EventDataschema. + * Throws if invalid. + */ + validate() { + const copy = new EventDataschema(this as any) as EventDataschemaIntersection; + validate('EventDataschema', copy); + } + + /** + * Normalizes the current instance of the EventDataschema. + * Creates a copy of the EventDataschema, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the EventDataschema instance. + */ + normalize(): EventDataschema & Specification.EventDataschema { + const copy = new EventDataschema(this as any) as EventDataschemaIntersection; + return getLifecycleHooks('EventDataschema')?.normalize?.(copy) || copy; + } +} + +export const _EventDataschema = EventDataschema as EventDataschemaConstructor; diff --git a/src/lib/generated/classes/event-filter.ts b/src/lib/generated/classes/event-filter.ts index 9b31d750..fda3c5aa 100644 --- a/src/lib/generated/classes/event-filter.ts +++ b/src/lib/generated/classes/event-filter.ts @@ -20,7 +20,7 @@ * *****************************************************************************************/ -import { _EventFilterWith } from './event-filter-with'; +import { _WithEvent } from './with-event'; import { _EventFilterCorrelate } from './event-filter-correlate'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; @@ -55,7 +55,7 @@ export class EventFilter extends ObjectHydrator { super(model); const self = this as unknown as Specification.EventFilter & object; if (isObject(model)) { - if (typeof model.with === 'object') self.with = new _EventFilterWith(model.with); + if (typeof model.with === 'object') self.with = new _WithEvent(model.with); if (typeof model.correlate === 'object') self.correlate = new _EventFilterCorrelate(model.correlate); } getLifecycleHooks('EventFilter')?.constructor?.(this); diff --git a/src/lib/generated/classes/event-source.ts b/src/lib/generated/classes/event-source.ts new file mode 100644 index 00000000..c5e48bec --- /dev/null +++ b/src/lib/generated/classes/event-source.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the EventSource class and type + */ +export type EventSourceIntersection = EventSource & Specification.EventSource; + +/** + * Represents a constructor for the intersection of the EventSource class and type + */ +export interface EventSourceConstructor { + new (model?: Partial): EventSourceIntersection; +} + +/** + * Represents a EventSource with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class EventSource extends ObjectHydrator { + /** + * Instanciates a new instance of the EventSource class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the EventSource. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('EventSource')?.constructor?.(this); + } + + /** + * Validates the current instance of the EventSource. + * Throws if invalid. + */ + validate() { + const copy = new EventSource(this as any) as EventSourceIntersection; + validate('EventSource', copy); + } + + /** + * Normalizes the current instance of the EventSource. + * Creates a copy of the EventSource, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the EventSource instance. + */ + normalize(): EventSource & Specification.EventSource { + const copy = new EventSource(this as any) as EventSourceIntersection; + return getLifecycleHooks('EventSource')?.normalize?.(copy) || copy; + } +} + +export const _EventSource = EventSource as EventSourceConstructor; diff --git a/src/lib/generated/classes/event-time.ts b/src/lib/generated/classes/event-time.ts new file mode 100644 index 00000000..4626b4e2 --- /dev/null +++ b/src/lib/generated/classes/event-time.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the EventTime class and type + */ +export type EventTimeIntersection = EventTime & Specification.EventTime; + +/** + * Represents a constructor for the intersection of the EventTime class and type + */ +export interface EventTimeConstructor { + new (model?: Partial): EventTimeIntersection; +} + +/** + * Represents a EventTime with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class EventTime extends ObjectHydrator { + /** + * Instanciates a new instance of the EventTime class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the EventTime. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('EventTime')?.constructor?.(this); + } + + /** + * Validates the current instance of the EventTime. + * Throws if invalid. + */ + validate() { + const copy = new EventTime(this as any) as EventTimeIntersection; + validate('EventTime', copy); + } + + /** + * Normalizes the current instance of the EventTime. + * Creates a copy of the EventTime, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the EventTime instance. + */ + normalize(): EventTime & Specification.EventTime { + const copy = new EventTime(this as any) as EventTimeIntersection; + return getLifecycleHooks('EventTime')?.normalize?.(copy) || copy; + } +} + +export const _EventTime = EventTime as EventTimeConstructor; diff --git a/src/lib/generated/classes/retry-policy-backoff.ts b/src/lib/generated/classes/exponential-back-off.ts similarity index 52% rename from src/lib/generated/classes/retry-policy-backoff.ts rename to src/lib/generated/classes/exponential-back-off.ts index aa2107eb..28f0e9df 100644 --- a/src/lib/generated/classes/retry-policy-backoff.ts +++ b/src/lib/generated/classes/exponential-back-off.ts @@ -26,53 +26,53 @@ import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; /** - * Represents the intersection between the RetryPolicyBackoff class and type + * Represents the intersection between the ExponentialBackOff class and type */ -export type RetryPolicyBackoffIntersection = RetryPolicyBackoff & Specification.RetryPolicyBackoff; +export type ExponentialBackOffIntersection = ExponentialBackOff & Specification.ExponentialBackOff; /** - * Represents a constructor for the intersection of the RetryPolicyBackoff class and type + * Represents a constructor for the intersection of the ExponentialBackOff class and type */ -export interface RetryPolicyBackoffConstructor { - new (model?: Partial): RetryPolicyBackoffIntersection; +export interface ExponentialBackOffConstructor { + new (model?: Partial): ExponentialBackOffIntersection; } /** - * Represents a RetryPolicyBackoff with methods for validation and normalization. + * Represents a ExponentialBackOff with methods for validation and normalization. * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. */ -export class RetryPolicyBackoff extends ObjectHydrator { +export class ExponentialBackOff extends ObjectHydrator { /** - * Instanciates a new instance of the RetryPolicyBackoff class. + * Instanciates a new instance of the ExponentialBackOff class. * Initializes properties based on the provided model if it is an object. * - * @param model - Optional partial model object to initialize the RetryPolicyBackoff. + * @param model - Optional partial model object to initialize the ExponentialBackOff. */ - constructor(model?: Partial) { + constructor(model?: Partial) { super(model); - getLifecycleHooks('RetryPolicyBackoff')?.constructor?.(this); + getLifecycleHooks('ExponentialBackOff')?.constructor?.(this); } /** - * Validates the current instance of the RetryPolicyBackoff. + * Validates the current instance of the ExponentialBackOff. * Throws if invalid. */ validate() { - const copy = new RetryPolicyBackoff(this as any) as RetryPolicyBackoffIntersection; - validate('RetryPolicyBackoff', copy); + const copy = new ExponentialBackOff(this as any) as ExponentialBackOffIntersection; + validate('ExponentialBackOff', copy); } /** - * Normalizes the current instance of the RetryPolicyBackoff. - * Creates a copy of the RetryPolicyBackoff, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the ExponentialBackOff. + * Creates a copy of the ExponentialBackOff, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the RetryPolicyBackoff instance. + * @returns A normalized version of the ExponentialBackOff instance. */ - normalize(): RetryPolicyBackoff & Specification.RetryPolicyBackoff { - const copy = new RetryPolicyBackoff(this as any) as RetryPolicyBackoffIntersection; - return getLifecycleHooks('RetryPolicyBackoff')?.normalize?.(copy) || copy; + normalize(): ExponentialBackOff & Specification.ExponentialBackOff { + const copy = new ExponentialBackOff(this as any) as ExponentialBackOffIntersection; + return getLifecycleHooks('ExponentialBackOff')?.normalize?.(copy) || copy; } } -export const _RetryPolicyBackoff = RetryPolicyBackoff as RetryPolicyBackoffConstructor; +export const _ExponentialBackOff = ExponentialBackOff as ExponentialBackOffConstructor; diff --git a/src/lib/generated/classes/export-as.ts b/src/lib/generated/classes/export-as.ts new file mode 100644 index 00000000..87b45498 --- /dev/null +++ b/src/lib/generated/classes/export-as.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the ExportAs class and type + */ +export type ExportAsIntersection = ExportAs & Specification.ExportAs; + +/** + * Represents a constructor for the intersection of the ExportAs class and type + */ +export interface ExportAsConstructor { + new (model?: Partial): ExportAsIntersection; +} + +/** + * Represents a ExportAs with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class ExportAs extends ObjectHydrator { + /** + * Instanciates a new instance of the ExportAs class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the ExportAs. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('ExportAs')?.constructor?.(this); + } + + /** + * Validates the current instance of the ExportAs. + * Throws if invalid. + */ + validate() { + const copy = new ExportAs(this as any) as ExportAsIntersection; + validate('ExportAs', copy); + } + + /** + * Normalizes the current instance of the ExportAs. + * Creates a copy of the ExportAs, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the ExportAs instance. + */ + normalize(): ExportAs & Specification.ExportAs { + const copy = new ExportAs(this as any) as ExportAsIntersection; + return getLifecycleHooks('ExportAs')?.normalize?.(copy) || copy; + } +} + +export const _ExportAs = ExportAs as ExportAsConstructor; diff --git a/src/lib/generated/classes/export.ts b/src/lib/generated/classes/export.ts index 280605c2..47370b14 100644 --- a/src/lib/generated/classes/export.ts +++ b/src/lib/generated/classes/export.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ +import { _Schema } from './schema'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; +import { isObject } from '../../utils'; /** * Represents the intersection between the Export class and type @@ -50,7 +52,10 @@ export class Export extends ObjectHydrator { */ constructor(model?: Partial) { super(model); - + const self = this as unknown as Specification.Export & object; + if (isObject(model)) { + if (typeof model.schema === 'object') self.schema = new _Schema(model.schema); + } getLifecycleHooks('Export')?.constructor?.(this); } diff --git a/src/lib/generated/classes/extension-item.ts b/src/lib/generated/classes/extension-item.ts new file mode 100644 index 00000000..bbe0acee --- /dev/null +++ b/src/lib/generated/classes/extension-item.ts @@ -0,0 +1,88 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _Extension } from './extension'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the ExtensionItem class and type + */ +export type ExtensionItemIntersection = ExtensionItem & Specification.ExtensionItem; + +/** + * Represents a constructor for the intersection of the ExtensionItem class and type + */ +export interface ExtensionItemConstructor { + new (model?: Partial): ExtensionItemIntersection; +} + +/** + * Represents a ExtensionItem with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class ExtensionItem extends ObjectHydrator { + /** + * Instanciates a new instance of the ExtensionItem class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the ExtensionItem. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.ExtensionItem & object; + if (isObject(model)) { + const knownProperties: string[] = []; + Object.entries(model) + .filter(([key]) => !knownProperties.includes(key)) + .forEach(([key, value]) => { + self[key] = new _Extension(value); + }); + } + getLifecycleHooks('ExtensionItem')?.constructor?.(this); + } + + /** + * Validates the current instance of the ExtensionItem. + * Throws if invalid. + */ + validate() { + const copy = new ExtensionItem(this as any) as ExtensionItemIntersection; + validate('ExtensionItem', copy); + } + + /** + * Normalizes the current instance of the ExtensionItem. + * Creates a copy of the ExtensionItem, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the ExtensionItem instance. + */ + normalize(): ExtensionItem & Specification.ExtensionItem { + const copy = new ExtensionItem(this as any) as ExtensionItemIntersection; + return getLifecycleHooks('ExtensionItem')?.normalize?.(copy) || copy; + } +} + +export const _ExtensionItem = ExtensionItem as ExtensionItemConstructor; diff --git a/src/lib/generated/classes/external-resource-authentication.ts b/src/lib/generated/classes/external-resource-authentication.ts deleted file mode 100644 index 061cfb3a..00000000 --- a/src/lib/generated/classes/external-resource-authentication.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; -import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; -import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; -import { isObject } from '../../utils'; - -/** - * Represents the intersection between the ExternalResourceAuthentication class and type - */ -export type ExternalResourceAuthenticationIntersection = ExternalResourceAuthentication & - Specification.ExternalResourceAuthentication; - -/** - * Represents a constructor for the intersection of the ExternalResourceAuthentication class and type - */ -export interface ExternalResourceAuthenticationConstructor { - new (model?: Partial): ExternalResourceAuthenticationIntersection; -} - -/** - * Represents a ExternalResourceAuthentication with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class ExternalResourceAuthentication extends ObjectHydrator { - /** - * Instanciates a new instance of the ExternalResourceAuthentication class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the ExternalResourceAuthentication. - */ - constructor(model?: Partial) { - super(model); - const self = this as unknown as Specification.ExternalResourceAuthentication & object; - if (isObject(model)) { - if (typeof (model as { [k: string]: unknown; basic: Specification.AuthenticationPolicyBasic }).basic === 'object') - (self as { [k: string]: unknown; basic: Specification.AuthenticationPolicyBasic }).basic = - new _AuthenticationPolicyBasic( - (model as { [k: string]: unknown; basic: Specification.AuthenticationPolicyBasic }) - .basic as Specification.AuthenticationPolicyBasic, - ); - if ( - typeof (model as { [k: string]: unknown; bearer: Specification.AuthenticationPolicyBearer }).bearer === 'object' - ) - (self as { [k: string]: unknown; bearer: Specification.AuthenticationPolicyBearer }).bearer = - new _AuthenticationPolicyBearer( - (model as { [k: string]: unknown; bearer: Specification.AuthenticationPolicyBearer }) - .bearer as Specification.AuthenticationPolicyBearer, - ); - if ( - typeof (model as { [k: string]: unknown; oauth2: Specification.AuthenticationPolicyOauth2 }).oauth2 === 'object' - ) - (self as { [k: string]: unknown; oauth2: Specification.AuthenticationPolicyOauth2 }).oauth2 = - new _AuthenticationPolicyOauth2( - (model as { [k: string]: unknown; oauth2: Specification.AuthenticationPolicyOauth2 }) - .oauth2 as Specification.AuthenticationPolicyOauth2, - ); - } - getLifecycleHooks('ExternalResourceAuthentication')?.constructor?.(this); - } - - /** - * Validates the current instance of the ExternalResourceAuthentication. - * Throws if invalid. - */ - validate() { - const copy = new ExternalResourceAuthentication(this as any) as ExternalResourceAuthenticationIntersection; - validate('ExternalResourceAuthentication', copy); - } - - /** - * Normalizes the current instance of the ExternalResourceAuthentication. - * Creates a copy of the ExternalResourceAuthentication, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the ExternalResourceAuthentication instance. - */ - normalize(): ExternalResourceAuthentication & Specification.ExternalResourceAuthentication { - const copy = new ExternalResourceAuthentication(this as any) as ExternalResourceAuthenticationIntersection; - return getLifecycleHooks('ExternalResourceAuthentication')?.normalize?.(copy) || copy; - } -} - -export const _ExternalResourceAuthentication = - ExternalResourceAuthentication as ExternalResourceAuthenticationConstructor; diff --git a/src/lib/generated/classes/external-resource.ts b/src/lib/generated/classes/external-resource.ts index 400cde81..ae728865 100644 --- a/src/lib/generated/classes/external-resource.ts +++ b/src/lib/generated/classes/external-resource.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ +import { _Endpoint } from './endpoint'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; +import { isObject } from '../../utils'; /** * Represents the intersection between the ExternalResource class and type @@ -50,7 +52,10 @@ export class ExternalResource extends ObjectHydrator) { super(model); - + const self = this as unknown as Specification.ExternalResource & object; + if (isObject(model)) { + if (typeof model.endpoint === 'object') self.endpoint = new _Endpoint(model.endpoint); + } getLifecycleHooks('ExternalResource')?.constructor?.(this); } diff --git a/src/lib/generated/classes/raise-task-raise.ts b/src/lib/generated/classes/external-script.ts similarity index 51% rename from src/lib/generated/classes/raise-task-raise.ts rename to src/lib/generated/classes/external-script.ts index 34b52efb..5bb40705 100644 --- a/src/lib/generated/classes/raise-task-raise.ts +++ b/src/lib/generated/classes/external-script.ts @@ -20,7 +20,7 @@ * *****************************************************************************************/ -import { _Error } from './error'; +import { _ExternalResource } from './external-resource'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -28,56 +28,56 @@ import { validate } from '../../validation'; import { isObject } from '../../utils'; /** - * Represents the intersection between the RaiseTaskRaise class and type + * Represents the intersection between the ExternalScript class and type */ -export type RaiseTaskRaiseIntersection = RaiseTaskRaise & Specification.RaiseTaskRaise; +export type ExternalScriptIntersection = ExternalScript & Specification.ExternalScript; /** - * Represents a constructor for the intersection of the RaiseTaskRaise class and type + * Represents a constructor for the intersection of the ExternalScript class and type */ -export interface RaiseTaskRaiseConstructor { - new (model?: Partial): RaiseTaskRaiseIntersection; +export interface ExternalScriptConstructor { + new (model?: Partial): ExternalScriptIntersection; } /** - * Represents a RaiseTaskRaise with methods for validation and normalization. + * Represents a ExternalScript with methods for validation and normalization. * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. */ -export class RaiseTaskRaise extends ObjectHydrator { +export class ExternalScript extends ObjectHydrator { /** - * Instanciates a new instance of the RaiseTaskRaise class. + * Instanciates a new instance of the ExternalScript class. * Initializes properties based on the provided model if it is an object. * - * @param model - Optional partial model object to initialize the RaiseTaskRaise. + * @param model - Optional partial model object to initialize the ExternalScript. */ - constructor(model?: Partial) { + constructor(model?: Partial) { super(model); - const self = this as unknown as Specification.RaiseTaskRaise & object; + const self = this as unknown as Specification.ExternalScript & object; if (isObject(model)) { - if (typeof model.error === 'object') self.error = new _Error(model.error); + if (typeof model.source === 'object') self.source = new _ExternalResource(model.source); } - getLifecycleHooks('RaiseTaskRaise')?.constructor?.(this); + getLifecycleHooks('ExternalScript')?.constructor?.(this); } /** - * Validates the current instance of the RaiseTaskRaise. + * Validates the current instance of the ExternalScript. * Throws if invalid. */ validate() { - const copy = new RaiseTaskRaise(this as any) as RaiseTaskRaiseIntersection; - validate('RaiseTaskRaise', copy); + const copy = new ExternalScript(this as any) as ExternalScriptIntersection; + validate('ExternalScript', copy); } /** - * Normalizes the current instance of the RaiseTaskRaise. - * Creates a copy of the RaiseTaskRaise, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the ExternalScript. + * Creates a copy of the ExternalScript, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the RaiseTaskRaise instance. + * @returns A normalized version of the ExternalScript instance. */ - normalize(): RaiseTaskRaise & Specification.RaiseTaskRaise { - const copy = new RaiseTaskRaise(this as any) as RaiseTaskRaiseIntersection; - return getLifecycleHooks('RaiseTaskRaise')?.normalize?.(copy) || copy; + normalize(): ExternalScript & Specification.ExternalScript { + const copy = new ExternalScript(this as any) as ExternalScriptIntersection; + return getLifecycleHooks('ExternalScript')?.normalize?.(copy) || copy; } } -export const _RaiseTaskRaise = RaiseTaskRaise as RaiseTaskRaiseConstructor; +export const _ExternalScript = ExternalScript as ExternalScriptConstructor; diff --git a/src/lib/generated/classes/call-http-with-endpoint.ts b/src/lib/generated/classes/for-task-configuration.ts similarity index 52% rename from src/lib/generated/classes/call-http-with-endpoint.ts rename to src/lib/generated/classes/for-task-configuration.ts index 565de721..4f4594ad 100644 --- a/src/lib/generated/classes/call-http-with-endpoint.ts +++ b/src/lib/generated/classes/for-task-configuration.ts @@ -26,53 +26,53 @@ import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; /** - * Represents the intersection between the CallHTTPWithEndpoint class and type + * Represents the intersection between the ForTaskConfiguration class and type */ -export type CallHTTPWithEndpointIntersection = CallHTTPWithEndpoint & Specification.CallHTTPWithEndpoint; +export type ForTaskConfigurationIntersection = ForTaskConfiguration & Specification.ForTaskConfiguration; /** - * Represents a constructor for the intersection of the CallHTTPWithEndpoint class and type + * Represents a constructor for the intersection of the ForTaskConfiguration class and type */ -export interface CallHTTPWithEndpointConstructor { - new (model?: Partial): CallHTTPWithEndpointIntersection; +export interface ForTaskConfigurationConstructor { + new (model?: Partial): ForTaskConfigurationIntersection; } /** - * Represents a CallHTTPWithEndpoint with methods for validation and normalization. + * Represents a ForTaskConfiguration with methods for validation and normalization. * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. */ -export class CallHTTPWithEndpoint extends ObjectHydrator { +export class ForTaskConfiguration extends ObjectHydrator { /** - * Instanciates a new instance of the CallHTTPWithEndpoint class. + * Instanciates a new instance of the ForTaskConfiguration class. * Initializes properties based on the provided model if it is an object. * - * @param model - Optional partial model object to initialize the CallHTTPWithEndpoint. + * @param model - Optional partial model object to initialize the ForTaskConfiguration. */ - constructor(model?: Partial) { + constructor(model?: Partial) { super(model); - getLifecycleHooks('CallHTTPWithEndpoint')?.constructor?.(this); + getLifecycleHooks('ForTaskConfiguration')?.constructor?.(this); } /** - * Validates the current instance of the CallHTTPWithEndpoint. + * Validates the current instance of the ForTaskConfiguration. * Throws if invalid. */ validate() { - const copy = new CallHTTPWithEndpoint(this as any) as CallHTTPWithEndpointIntersection; - validate('CallHTTPWithEndpoint', copy); + const copy = new ForTaskConfiguration(this as any) as ForTaskConfigurationIntersection; + validate('ForTaskConfiguration', copy); } /** - * Normalizes the current instance of the CallHTTPWithEndpoint. - * Creates a copy of the CallHTTPWithEndpoint, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the ForTaskConfiguration. + * Creates a copy of the ForTaskConfiguration, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the CallHTTPWithEndpoint instance. + * @returns A normalized version of the ForTaskConfiguration instance. */ - normalize(): CallHTTPWithEndpoint & Specification.CallHTTPWithEndpoint { - const copy = new CallHTTPWithEndpoint(this as any) as CallHTTPWithEndpointIntersection; - return getLifecycleHooks('CallHTTPWithEndpoint')?.normalize?.(copy) || copy; + normalize(): ForTaskConfiguration & Specification.ForTaskConfiguration { + const copy = new ForTaskConfiguration(this as any) as ForTaskConfigurationIntersection; + return getLifecycleHooks('ForTaskConfiguration')?.normalize?.(copy) || copy; } } -export const _CallHTTPWithEndpoint = CallHTTPWithEndpoint as CallHTTPWithEndpointConstructor; +export const _ForTaskConfiguration = ForTaskConfiguration as ForTaskConfigurationConstructor; diff --git a/src/lib/generated/classes/for-task.ts b/src/lib/generated/classes/for-task.ts index 8a639b8f..00543076 100644 --- a/src/lib/generated/classes/for-task.ts +++ b/src/lib/generated/classes/for-task.ts @@ -23,8 +23,9 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; -import { _ForTaskFor } from './for-task-for'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; +import { _ForTaskConfiguration } from './for-task-configuration'; import { _TaskList } from './task-list'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; @@ -62,8 +63,9 @@ export class ForTask extends _TaskBase { if (typeof model.input === 'object') self.input = new _Input(model.input); if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.export === 'object') self.export = new _Export(model.export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); - if (typeof model.for === 'object') self.for = new _ForTaskFor(model.for); + if (typeof model.timeout === 'object') self.timeout = new _TaskBaseTimeout(model.timeout); + if (typeof model.metadata === 'object') self.metadata = new _TaskMetadata(model.metadata); + if (typeof model.for === 'object') self.for = new _ForTaskConfiguration(model.for); if (typeof model.do === 'object') self.do = new _TaskList(model.do); } getLifecycleHooks('ForTask')?.constructor?.(this); diff --git a/src/lib/generated/classes/fork-task-configuration.ts b/src/lib/generated/classes/fork-task-configuration.ts new file mode 100644 index 00000000..4cd1cbb5 --- /dev/null +++ b/src/lib/generated/classes/fork-task-configuration.ts @@ -0,0 +1,83 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _TaskList } from './task-list'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the ForkTaskConfiguration class and type + */ +export type ForkTaskConfigurationIntersection = ForkTaskConfiguration & Specification.ForkTaskConfiguration; + +/** + * Represents a constructor for the intersection of the ForkTaskConfiguration class and type + */ +export interface ForkTaskConfigurationConstructor { + new (model?: Partial): ForkTaskConfigurationIntersection; +} + +/** + * Represents a ForkTaskConfiguration with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class ForkTaskConfiguration extends ObjectHydrator { + /** + * Instanciates a new instance of the ForkTaskConfiguration class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the ForkTaskConfiguration. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.ForkTaskConfiguration & object; + if (isObject(model)) { + if (typeof model.branches === 'object') self.branches = new _TaskList(model.branches); + } + getLifecycleHooks('ForkTaskConfiguration')?.constructor?.(this); + } + + /** + * Validates the current instance of the ForkTaskConfiguration. + * Throws if invalid. + */ + validate() { + const copy = new ForkTaskConfiguration(this as any) as ForkTaskConfigurationIntersection; + validate('ForkTaskConfiguration', copy); + } + + /** + * Normalizes the current instance of the ForkTaskConfiguration. + * Creates a copy of the ForkTaskConfiguration, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the ForkTaskConfiguration instance. + */ + normalize(): ForkTaskConfiguration & Specification.ForkTaskConfiguration { + const copy = new ForkTaskConfiguration(this as any) as ForkTaskConfigurationIntersection; + return getLifecycleHooks('ForkTaskConfiguration')?.normalize?.(copy) || copy; + } +} + +export const _ForkTaskConfiguration = ForkTaskConfiguration as ForkTaskConfigurationConstructor; diff --git a/src/lib/generated/classes/fork-task.ts b/src/lib/generated/classes/fork-task.ts index 6667c8a6..a2606d6a 100644 --- a/src/lib/generated/classes/fork-task.ts +++ b/src/lib/generated/classes/fork-task.ts @@ -23,8 +23,9 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; -import { _ForkTaskFork } from './fork-task-fork'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; +import { _ForkTaskConfiguration } from './fork-task-configuration'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -61,8 +62,9 @@ export class ForkTask extends _TaskBase { if (typeof model.input === 'object') self.input = new _Input(model.input); if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.export === 'object') self.export = new _Export(model.export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); - if (typeof model.fork === 'object') self.fork = new _ForkTaskFork(model.fork); + if (typeof model.timeout === 'object') self.timeout = new _TaskBaseTimeout(model.timeout); + if (typeof model.metadata === 'object') self.metadata = new _TaskMetadata(model.metadata); + if (typeof model.fork === 'object') self.fork = new _ForkTaskConfiguration(model.fork); } getLifecycleHooks('ForkTask')?.constructor?.(this); } diff --git a/src/lib/generated/classes/emit-task-emit-event.ts b/src/lib/generated/classes/function-arguments.ts similarity index 52% rename from src/lib/generated/classes/emit-task-emit-event.ts rename to src/lib/generated/classes/function-arguments.ts index 22f1b45d..43ec5750 100644 --- a/src/lib/generated/classes/emit-task-emit-event.ts +++ b/src/lib/generated/classes/function-arguments.ts @@ -26,53 +26,53 @@ import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; /** - * Represents the intersection between the EmitTaskEmitEvent class and type + * Represents the intersection between the FunctionArguments class and type */ -export type EmitTaskEmitEventIntersection = EmitTaskEmitEvent & Specification.EmitTaskEmitEvent; +export type FunctionArgumentsIntersection = FunctionArguments & Specification.FunctionArguments; /** - * Represents a constructor for the intersection of the EmitTaskEmitEvent class and type + * Represents a constructor for the intersection of the FunctionArguments class and type */ -export interface EmitTaskEmitEventConstructor { - new (model?: Partial): EmitTaskEmitEventIntersection; +export interface FunctionArgumentsConstructor { + new (model?: Partial): FunctionArgumentsIntersection; } /** - * Represents a EmitTaskEmitEvent with methods for validation and normalization. + * Represents a FunctionArguments with methods for validation and normalization. * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. */ -export class EmitTaskEmitEvent extends ObjectHydrator { +export class FunctionArguments extends ObjectHydrator { /** - * Instanciates a new instance of the EmitTaskEmitEvent class. + * Instanciates a new instance of the FunctionArguments class. * Initializes properties based on the provided model if it is an object. * - * @param model - Optional partial model object to initialize the EmitTaskEmitEvent. + * @param model - Optional partial model object to initialize the FunctionArguments. */ - constructor(model?: Partial) { + constructor(model?: Partial) { super(model); - getLifecycleHooks('EmitTaskEmitEvent')?.constructor?.(this); + getLifecycleHooks('FunctionArguments')?.constructor?.(this); } /** - * Validates the current instance of the EmitTaskEmitEvent. + * Validates the current instance of the FunctionArguments. * Throws if invalid. */ validate() { - const copy = new EmitTaskEmitEvent(this as any) as EmitTaskEmitEventIntersection; - validate('EmitTaskEmitEvent', copy); + const copy = new FunctionArguments(this as any) as FunctionArgumentsIntersection; + validate('FunctionArguments', copy); } /** - * Normalizes the current instance of the EmitTaskEmitEvent. - * Creates a copy of the EmitTaskEmitEvent, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the FunctionArguments. + * Creates a copy of the FunctionArguments, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the EmitTaskEmitEvent instance. + * @returns A normalized version of the FunctionArguments instance. */ - normalize(): EmitTaskEmitEvent & Specification.EmitTaskEmitEvent { - const copy = new EmitTaskEmitEvent(this as any) as EmitTaskEmitEventIntersection; - return getLifecycleHooks('EmitTaskEmitEvent')?.normalize?.(copy) || copy; + normalize(): FunctionArguments & Specification.FunctionArguments { + const copy = new FunctionArguments(this as any) as FunctionArgumentsIntersection; + return getLifecycleHooks('FunctionArguments')?.normalize?.(copy) || copy; } } -export const _EmitTaskEmitEvent = EmitTaskEmitEvent as EmitTaskEmitEventConstructor; +export const _FunctionArguments = FunctionArguments as FunctionArgumentsConstructor; diff --git a/src/lib/generated/classes/grpc-arguments.ts b/src/lib/generated/classes/grpc-arguments.ts new file mode 100644 index 00000000..d5f26bdb --- /dev/null +++ b/src/lib/generated/classes/grpc-arguments.ts @@ -0,0 +1,87 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _ExternalResource } from './external-resource'; +import { _WithGRPCService } from './with-grpc-service'; +import { _WithGRPCArguments } from './with-grpc-arguments'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the GRPCArguments class and type + */ +export type GRPCArgumentsIntersection = GRPCArguments & Specification.GRPCArguments; + +/** + * Represents a constructor for the intersection of the GRPCArguments class and type + */ +export interface GRPCArgumentsConstructor { + new (model?: Partial): GRPCArgumentsIntersection; +} + +/** + * Represents a GRPCArguments with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class GRPCArguments extends ObjectHydrator { + /** + * Instanciates a new instance of the GRPCArguments class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the GRPCArguments. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.GRPCArguments & object; + if (isObject(model)) { + if (typeof model.proto === 'object') self.proto = new _ExternalResource(model.proto); + if (typeof model.service === 'object') self.service = new _WithGRPCService(model.service); + if (typeof model.arguments === 'object') self.arguments = new _WithGRPCArguments(model.arguments); + } + getLifecycleHooks('GRPCArguments')?.constructor?.(this); + } + + /** + * Validates the current instance of the GRPCArguments. + * Throws if invalid. + */ + validate() { + const copy = new GRPCArguments(this as any) as GRPCArgumentsIntersection; + validate('GRPCArguments', copy); + } + + /** + * Normalizes the current instance of the GRPCArguments. + * Creates a copy of the GRPCArguments, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the GRPCArguments instance. + */ + normalize(): GRPCArguments & Specification.GRPCArguments { + const copy = new GRPCArguments(this as any) as GRPCArgumentsIntersection; + return getLifecycleHooks('GRPCArguments')?.normalize?.(copy) || copy; + } +} + +export const _GRPCArguments = GRPCArguments as GRPCArgumentsConstructor; diff --git a/src/lib/generated/classes/http-arguments.ts b/src/lib/generated/classes/http-arguments.ts new file mode 100644 index 00000000..ad58154e --- /dev/null +++ b/src/lib/generated/classes/http-arguments.ts @@ -0,0 +1,89 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _Endpoint } from './endpoint'; +import { _WithHTTPHeaders } from './with-http-headers'; +import { _WithHTTPBody } from './with-http-body'; +import { _WithHTTPQuery } from './with-http-query'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the HTTPArguments class and type + */ +export type HTTPArgumentsIntersection = HTTPArguments & Specification.HTTPArguments; + +/** + * Represents a constructor for the intersection of the HTTPArguments class and type + */ +export interface HTTPArgumentsConstructor { + new (model?: Partial): HTTPArgumentsIntersection; +} + +/** + * Represents a HTTPArguments with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class HTTPArguments extends ObjectHydrator { + /** + * Instanciates a new instance of the HTTPArguments class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the HTTPArguments. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.HTTPArguments & object; + if (isObject(model)) { + if (typeof model.endpoint === 'object') self.endpoint = new _Endpoint(model.endpoint); + if (typeof model.headers === 'object') self.headers = new _WithHTTPHeaders(model.headers); + if (typeof model.body === 'object') self.body = new _WithHTTPBody(model.body); + if (typeof model.query === 'object') self.query = new _WithHTTPQuery(model.query); + } + getLifecycleHooks('HTTPArguments')?.constructor?.(this); + } + + /** + * Validates the current instance of the HTTPArguments. + * Throws if invalid. + */ + validate() { + const copy = new HTTPArguments(this as any) as HTTPArgumentsIntersection; + validate('HTTPArguments', copy); + } + + /** + * Normalizes the current instance of the HTTPArguments. + * Creates a copy of the HTTPArguments, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the HTTPArguments instance. + */ + normalize(): HTTPArguments & Specification.HTTPArguments { + const copy = new HTTPArguments(this as any) as HTTPArgumentsIntersection; + return getLifecycleHooks('HTTPArguments')?.normalize?.(copy) || copy; + } +} + +export const _HTTPArguments = HTTPArguments as HTTPArgumentsConstructor; diff --git a/src/lib/generated/classes/index.ts b/src/lib/generated/classes/index.ts index 5e88cdf1..9ae9d61f 100644 --- a/src/lib/generated/classes/index.ts +++ b/src/lib/generated/classes/index.ts @@ -14,186 +14,310 @@ * limitations under the License. */ +import { _AllEventConsumptionStrategy } from './all-event-consumption-strategy'; +import { _AllEventConsumptionStrategyConfiguration } from './all-event-consumption-strategy-configuration'; +import { _AnyEventConsumptionStrategy } from './any-event-consumption-strategy'; +import { _AnyEventConsumptionStrategyConfiguration } from './any-event-consumption-strategy-configuration'; +import { _AsyncApiArguments } from './async-api-arguments'; import { _AuthenticationPolicy } from './authentication-policy'; -import { _AuthenticationPolicyBasic } from './authentication-policy-basic'; -import { _AuthenticationPolicyBearer } from './authentication-policy-bearer'; -import { _AuthenticationPolicyOauth2 } from './authentication-policy-oauth2'; -import { _AuthenticationPolicyOauth2Client } from './authentication-policy-oauth2-client'; +import { _AuthenticationPolicyReference } from './authentication-policy-reference'; +import { _BasicAuthenticationPolicy } from './basic-authentication-policy'; +import { _BasicAuthenticationPolicyConfiguration } from './basic-authentication-policy-configuration'; +import { _BasicAuthenticationProperties } from './basic-authentication-properties'; +import { _BearerAuthenticationPolicy } from './bearer-authentication-policy'; +import { _BearerAuthenticationPolicyConfiguration } from './bearer-authentication-policy-configuration'; +import { _BearerAuthenticationProperties } from './bearer-authentication-properties'; import { _CallAsyncAPI } from './call-async-api'; -import { _CallAsyncAPIWith } from './call-async-api-with'; -import { _CallAsyncAPIWithAuthentication } from './call-async-api-with-authentication'; import { _CallFunction } from './call-function'; -import { _CallFunctionWith } from './call-function-with'; import { _CallGRPC } from './call-grpc'; -import { _CallGRPCWith } from './call-grpc-with'; -import { _CallGRPCWithArguments } from './call-grpc-with-arguments'; -import { _CallGRPCWithService } from './call-grpc-with-service'; -import { _CallGRPCWithServiceAuthentication } from './call-grpc-with-service-authentication'; import { _CallHTTP } from './call-http'; -import { _CallHTTPWith } from './call-http-with'; -import { _CallHTTPWithEndpoint } from './call-http-with-endpoint'; import { _CallOpenAPI } from './call-open-api'; -import { _CallOpenAPIWith } from './call-open-api-with'; -import { _CallOpenAPIWithAuthentication } from './call-open-api-with-authentication'; -import { _CallOpenAPIWithParameters } from './call-open-api-with-parameters'; import { _CallTask } from './call-task'; +import { _CatchErrors } from './catch-errors'; +import { _ConstantBackoff } from './constant-backoff'; +import { _Container } from './container'; +import { _ContainerEnvironment } from './container-environment'; +import { _ContainerPorts } from './container-ports'; +import { _ContainerVolumes } from './container-volumes'; +import { _DigestAuthenticationPolicy } from './digest-authentication-policy'; +import { _DigestAuthenticationPolicyConfiguration } from './digest-authentication-policy-configuration'; +import { _DigestAuthenticationProperties } from './digest-authentication-properties'; import { _Document } from './document'; -import { _DocumentTags } from './document-tags'; import { _DoTask } from './do-task'; import { _Duration } from './duration'; +import { _DurationInline } from './duration-inline'; +import { _EmitEventDefinition } from './emit-event-definition'; +import { _EmitEventWith } from './emit-event-with'; import { _EmitTask } from './emit-task'; -import { _EmitTaskEmit } from './emit-task-emit'; -import { _EmitTaskEmitEvent } from './emit-task-emit-event'; +import { _EmitTaskConfiguration } from './emit-task-configuration'; import { _Endpoint } from './endpoint'; -import { _EndpointAuthentication } from './endpoint-authentication'; +import { _EndpointConfiguration } from './endpoint-configuration'; +import { _EndpointUri } from './endpoint-uri'; import { _Error } from './error'; +import { _ErrorInstance } from './error-instance'; +import { _ErrorType } from './error-type'; import { _EventConsumptionStrategy } from './event-consumption-strategy'; -import { _EventConsumptionStrategyAll } from './event-consumption-strategy-all'; -import { _EventConsumptionStrategyAny } from './event-consumption-strategy-any'; +import { _EventDataschema } from './event-dataschema'; import { _EventFilter } from './event-filter'; import { _EventFilterCorrelate } from './event-filter-correlate'; -import { _EventFilterWith } from './event-filter-with'; +import { _EventSource } from './event-source'; +import { _EventTime } from './event-time'; +import { _ExponentialBackOff } from './exponential-back-off'; import { _Export } from './export'; +import { _ExportAs } from './export-as'; import { _Extension } from './extension'; +import { _ExtensionItem } from './extension-item'; import { _ExternalResource } from './external-resource'; -import { _ExternalResourceAuthentication } from './external-resource-authentication'; +import { _ExternalScript } from './external-script'; import { _FlowDirective } from './flow-directive'; import { _ForkTask } from './fork-task'; -import { _ForkTaskFork } from './fork-task-fork'; +import { _ForkTaskConfiguration } from './fork-task-configuration'; import { _ForTask } from './for-task'; -import { _ForTaskFor } from './for-task-for'; +import { _ForTaskConfiguration } from './for-task-configuration'; +import { _FunctionArguments } from './function-arguments'; +import { _GRPCArguments } from './grpc-arguments'; +import { _HTTPArguments } from './http-arguments'; +import { _InlineScript } from './inline-script'; import { _Input } from './input'; +import { _InputFrom } from './input-from'; +import { _LinearBackoff } from './linear-backoff'; import { _ListenTask } from './listen-task'; -import { _ListenTaskListen } from './listen-task-listen'; -import { _Oauth2Token } from './oauth2-token'; +import { _ListenTaskConfiguration } from './listen-task-configuration'; +import { _OAuth2AutenthicationData } from './oauth2-autenthication-data'; +import { _OAuth2AutenthicationDataAudiences } from './oauth2-autenthication-data-audiences'; +import { _OAuth2AutenthicationDataClient } from './oauth2-autenthication-data-client'; +import { _OAuth2AutenthicationDataScopes } from './oauth2-autenthication-data-scopes'; +import { _OAuth2AuthenticationPolicy } from './oauth2-authentication-policy'; +import { _OAuth2AuthenticationPolicyConfiguration } from './oauth2-authentication-policy-configuration'; +import { _OAuth2AuthenticationPropertiesEndpoints } from './oauth2-authentication-properties-endpoints'; +import { _OAuth2ConnectAuthenticationProperties } from './oauth2-connect-authentication-properties'; +import { _OAuth2Issuers } from './oauth2-issuers'; +import { _OAuth2TokenDefinition } from './oauth2-token-definition'; +import { _OAuth2TokenRequest } from './oauth2-token-request'; +import { _OneEventConsumptionStrategy } from './one-event-consumption-strategy'; +import { _OpenAPIArguments } from './open-api-arguments'; +import { _OpenIdConnectAuthenticationPolicy } from './open-id-connect-authentication-policy'; +import { _OpenIdConnectAuthenticationPolicyConfiguration } from './open-id-connect-authentication-policy-configuration'; +import { _OpenIdConnectAuthenticationProperties } from './open-id-connect-authentication-properties'; import { _Output } from './output'; +import { _OutputAs } from './output-as'; import { _RaiseTask } from './raise-task'; -import { _RaiseTaskRaise } from './raise-task-raise'; +import { _RaiseTaskConfiguration } from './raise-task-configuration'; +import { _RaiseTaskRaiseError } from './raise-task-raise-error'; +import { _ReferenceableAuthenticationPolicy } from './referenceable-authentication-policy'; +import { _RetryBackoff } from './retry-backoff'; +import { _RetryLimit } from './retry-limit'; +import { _RetryLimitAttempt } from './retry-limit-attempt'; import { _RetryPolicy } from './retry-policy'; -import { _RetryPolicyBackoff } from './retry-policy-backoff'; import { _RetryPolicyJitter } from './retry-policy-jitter'; -import { _RetryPolicyLimit } from './retry-policy-limit'; -import { _RetryPolicyLimitAttempt } from './retry-policy-limit-attempt'; +import { _RunContainer } from './run-container'; +import { _RunScript } from './run-script'; +import { _RunShell } from './run-shell'; import { _RunTask } from './run-task'; -import { _RunTaskRun } from './run-task-run'; -import { _RunTaskRunContainer } from './run-task-run-container'; -import { _RunTaskRunScript } from './run-task-run-script'; -import { _RunTaskRunShell } from './run-task-run-shell'; -import { _RunTaskRunShellArguments } from './run-task-run-shell-arguments'; -import { _RunTaskRunShellEnvironment } from './run-task-run-shell-environment'; -import { _RunTaskRunWorkflow } from './run-task-run-workflow'; -import { _RunTaskRunWorkflowInput } from './run-task-run-workflow-input'; +import { _RunTaskConfiguration } from './run-task-configuration'; +import { _RuntimeExpression } from './runtime-expression'; +import { _RunWorkflow } from './run-workflow'; import { _Schedule } from './schedule'; import { _Schema } from './schema'; +import { _SchemaExternal } from './schema-external'; +import { _SchemaInline } from './schema-inline'; +import { _Script } from './script'; +import { _SecretBasedAuthenticationPolicy } from './secret-based-authentication-policy'; import { _SetTask } from './set-task'; -import { _SetTaskSet } from './set-task-set'; +import { _SetTaskConfiguration } from './set-task-configuration'; +import { _Shell } from './shell'; +import { _ShellArguments } from './shell-arguments'; +import { _ShellEnvironment } from './shell-environment'; +import { _SubflowConfiguration } from './subflow-configuration'; +import { _SubflowInput } from './subflow-input'; +import { _SwitchCase } from './switch-case'; +import { _SwitchItem } from './switch-item'; import { _SwitchTask } from './switch-task'; -import { _SwitchTaskSwitch } from './switch-task-switch'; -import { _SwitchTaskSwitchCase } from './switch-task-switch-case'; +import { _SwitchTaskConfiguration } from './switch-task-configuration'; import { _Task } from './task'; import { _TaskBase } from './task-base'; +import { _TaskBaseIf } from './task-base-if'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskItem } from './task-item'; import { _TaskList } from './task-list'; +import { _TaskMetadata } from './task-metadata'; import { _Timeout } from './timeout'; import { _TryTask } from './try-task'; import { _TryTaskCatch } from './try-task-catch'; +import { _TryTaskCatchRetry } from './try-task-catch-retry'; import { _Use } from './use'; import { _UseAuthentications } from './use-authentications'; import { _UseErrors } from './use-errors'; import { _UseExtensions } from './use-extensions'; import { _UseFunctions } from './use-functions'; import { _UseRetries } from './use-retries'; +import { _UseSecrets } from './use-secrets'; +import { _UseTimeouts } from './use-timeouts'; import { _WaitTask } from './wait-task'; +import { _WithAsyncAPIPayload } from './with-async-api-payload'; +import { _WithEvent } from './with-event'; +import { _WithGRPCArguments } from './with-grpc-arguments'; +import { _WithGRPCService } from './with-grpc-service'; +import { _WithHTTPBody } from './with-http-body'; +import { _WithHTTPHeaders } from './with-http-headers'; +import { _WithHTTPQuery } from './with-http-query'; +import { _WithOpenAPIParameters } from './with-open-api-parameters'; import { _Workflow } from './workflow'; +import { _WorkflowMetadata } from './workflow-metadata'; +import { _WorkflowTags } from './workflow-tags'; +import { _WorkflowTimeout } from './workflow-timeout'; export const Classes = { + AllEventConsumptionStrategy: _AllEventConsumptionStrategy, + AllEventConsumptionStrategyConfiguration: _AllEventConsumptionStrategyConfiguration, + AnyEventConsumptionStrategy: _AnyEventConsumptionStrategy, + AnyEventConsumptionStrategyConfiguration: _AnyEventConsumptionStrategyConfiguration, + AsyncApiArguments: _AsyncApiArguments, AuthenticationPolicy: _AuthenticationPolicy, - AuthenticationPolicyBasic: _AuthenticationPolicyBasic, - AuthenticationPolicyBearer: _AuthenticationPolicyBearer, - AuthenticationPolicyOauth2: _AuthenticationPolicyOauth2, - AuthenticationPolicyOauth2Client: _AuthenticationPolicyOauth2Client, + AuthenticationPolicyReference: _AuthenticationPolicyReference, + BasicAuthenticationPolicy: _BasicAuthenticationPolicy, + BasicAuthenticationPolicyConfiguration: _BasicAuthenticationPolicyConfiguration, + BasicAuthenticationProperties: _BasicAuthenticationProperties, + BearerAuthenticationPolicy: _BearerAuthenticationPolicy, + BearerAuthenticationPolicyConfiguration: _BearerAuthenticationPolicyConfiguration, + BearerAuthenticationProperties: _BearerAuthenticationProperties, CallAsyncAPI: _CallAsyncAPI, - CallAsyncAPIWith: _CallAsyncAPIWith, - CallAsyncAPIWithAuthentication: _CallAsyncAPIWithAuthentication, CallFunction: _CallFunction, - CallFunctionWith: _CallFunctionWith, CallGRPC: _CallGRPC, - CallGRPCWith: _CallGRPCWith, - CallGRPCWithArguments: _CallGRPCWithArguments, - CallGRPCWithService: _CallGRPCWithService, - CallGRPCWithServiceAuthentication: _CallGRPCWithServiceAuthentication, CallHTTP: _CallHTTP, - CallHTTPWith: _CallHTTPWith, - CallHTTPWithEndpoint: _CallHTTPWithEndpoint, CallOpenAPI: _CallOpenAPI, - CallOpenAPIWith: _CallOpenAPIWith, - CallOpenAPIWithAuthentication: _CallOpenAPIWithAuthentication, - CallOpenAPIWithParameters: _CallOpenAPIWithParameters, CallTask: _CallTask, + CatchErrors: _CatchErrors, + ConstantBackoff: _ConstantBackoff, + Container: _Container, + ContainerEnvironment: _ContainerEnvironment, + ContainerPorts: _ContainerPorts, + ContainerVolumes: _ContainerVolumes, + DigestAuthenticationPolicy: _DigestAuthenticationPolicy, + DigestAuthenticationPolicyConfiguration: _DigestAuthenticationPolicyConfiguration, + DigestAuthenticationProperties: _DigestAuthenticationProperties, Document: _Document, - DocumentTags: _DocumentTags, DoTask: _DoTask, Duration: _Duration, + DurationInline: _DurationInline, + EmitEventDefinition: _EmitEventDefinition, + EmitEventWith: _EmitEventWith, EmitTask: _EmitTask, - EmitTaskEmit: _EmitTaskEmit, - EmitTaskEmitEvent: _EmitTaskEmitEvent, + EmitTaskConfiguration: _EmitTaskConfiguration, Endpoint: _Endpoint, - EndpointAuthentication: _EndpointAuthentication, + EndpointConfiguration: _EndpointConfiguration, + EndpointUri: _EndpointUri, Error: _Error, + ErrorInstance: _ErrorInstance, + ErrorType: _ErrorType, EventConsumptionStrategy: _EventConsumptionStrategy, - EventConsumptionStrategyAll: _EventConsumptionStrategyAll, - EventConsumptionStrategyAny: _EventConsumptionStrategyAny, + EventDataschema: _EventDataschema, EventFilter: _EventFilter, EventFilterCorrelate: _EventFilterCorrelate, - EventFilterWith: _EventFilterWith, + EventSource: _EventSource, + EventTime: _EventTime, + ExponentialBackOff: _ExponentialBackOff, Export: _Export, + ExportAs: _ExportAs, Extension: _Extension, + ExtensionItem: _ExtensionItem, ExternalResource: _ExternalResource, - ExternalResourceAuthentication: _ExternalResourceAuthentication, + ExternalScript: _ExternalScript, FlowDirective: _FlowDirective, ForkTask: _ForkTask, - ForkTaskFork: _ForkTaskFork, + ForkTaskConfiguration: _ForkTaskConfiguration, ForTask: _ForTask, - ForTaskFor: _ForTaskFor, + ForTaskConfiguration: _ForTaskConfiguration, + FunctionArguments: _FunctionArguments, + GRPCArguments: _GRPCArguments, + HTTPArguments: _HTTPArguments, + InlineScript: _InlineScript, Input: _Input, + InputFrom: _InputFrom, + LinearBackoff: _LinearBackoff, ListenTask: _ListenTask, - ListenTaskListen: _ListenTaskListen, - Oauth2Token: _Oauth2Token, + ListenTaskConfiguration: _ListenTaskConfiguration, + OAuth2AutenthicationData: _OAuth2AutenthicationData, + OAuth2AutenthicationDataAudiences: _OAuth2AutenthicationDataAudiences, + OAuth2AutenthicationDataClient: _OAuth2AutenthicationDataClient, + OAuth2AutenthicationDataScopes: _OAuth2AutenthicationDataScopes, + OAuth2AuthenticationPolicy: _OAuth2AuthenticationPolicy, + OAuth2AuthenticationPolicyConfiguration: _OAuth2AuthenticationPolicyConfiguration, + OAuth2AuthenticationPropertiesEndpoints: _OAuth2AuthenticationPropertiesEndpoints, + OAuth2ConnectAuthenticationProperties: _OAuth2ConnectAuthenticationProperties, + OAuth2Issuers: _OAuth2Issuers, + OAuth2TokenDefinition: _OAuth2TokenDefinition, + OAuth2TokenRequest: _OAuth2TokenRequest, + OneEventConsumptionStrategy: _OneEventConsumptionStrategy, + OpenAPIArguments: _OpenAPIArguments, + OpenIdConnectAuthenticationPolicy: _OpenIdConnectAuthenticationPolicy, + OpenIdConnectAuthenticationPolicyConfiguration: _OpenIdConnectAuthenticationPolicyConfiguration, + OpenIdConnectAuthenticationProperties: _OpenIdConnectAuthenticationProperties, Output: _Output, + OutputAs: _OutputAs, RaiseTask: _RaiseTask, - RaiseTaskRaise: _RaiseTaskRaise, + RaiseTaskConfiguration: _RaiseTaskConfiguration, + RaiseTaskRaiseError: _RaiseTaskRaiseError, + ReferenceableAuthenticationPolicy: _ReferenceableAuthenticationPolicy, + RetryBackoff: _RetryBackoff, + RetryLimit: _RetryLimit, + RetryLimitAttempt: _RetryLimitAttempt, RetryPolicy: _RetryPolicy, - RetryPolicyBackoff: _RetryPolicyBackoff, RetryPolicyJitter: _RetryPolicyJitter, - RetryPolicyLimit: _RetryPolicyLimit, - RetryPolicyLimitAttempt: _RetryPolicyLimitAttempt, + RunContainer: _RunContainer, + RunScript: _RunScript, + RunShell: _RunShell, RunTask: _RunTask, - RunTaskRun: _RunTaskRun, - RunTaskRunContainer: _RunTaskRunContainer, - RunTaskRunScript: _RunTaskRunScript, - RunTaskRunShell: _RunTaskRunShell, - RunTaskRunShellArguments: _RunTaskRunShellArguments, - RunTaskRunShellEnvironment: _RunTaskRunShellEnvironment, - RunTaskRunWorkflow: _RunTaskRunWorkflow, - RunTaskRunWorkflowInput: _RunTaskRunWorkflowInput, + RunTaskConfiguration: _RunTaskConfiguration, + RuntimeExpression: _RuntimeExpression, + RunWorkflow: _RunWorkflow, Schedule: _Schedule, Schema: _Schema, + SchemaExternal: _SchemaExternal, + SchemaInline: _SchemaInline, + Script: _Script, + SecretBasedAuthenticationPolicy: _SecretBasedAuthenticationPolicy, SetTask: _SetTask, - SetTaskSet: _SetTaskSet, + SetTaskConfiguration: _SetTaskConfiguration, + Shell: _Shell, + ShellArguments: _ShellArguments, + ShellEnvironment: _ShellEnvironment, + SubflowConfiguration: _SubflowConfiguration, + SubflowInput: _SubflowInput, + SwitchCase: _SwitchCase, + SwitchItem: _SwitchItem, SwitchTask: _SwitchTask, - SwitchTaskSwitch: _SwitchTaskSwitch, - SwitchTaskSwitchCase: _SwitchTaskSwitchCase, + SwitchTaskConfiguration: _SwitchTaskConfiguration, Task: _Task, TaskBase: _TaskBase, + TaskBaseIf: _TaskBaseIf, + TaskBaseTimeout: _TaskBaseTimeout, + TaskItem: _TaskItem, TaskList: _TaskList, + TaskMetadata: _TaskMetadata, Timeout: _Timeout, TryTask: _TryTask, TryTaskCatch: _TryTaskCatch, + TryTaskCatchRetry: _TryTaskCatchRetry, Use: _Use, UseAuthentications: _UseAuthentications, UseErrors: _UseErrors, UseExtensions: _UseExtensions, UseFunctions: _UseFunctions, UseRetries: _UseRetries, + UseSecrets: _UseSecrets, + UseTimeouts: _UseTimeouts, WaitTask: _WaitTask, + WithAsyncAPIPayload: _WithAsyncAPIPayload, + WithEvent: _WithEvent, + WithGRPCArguments: _WithGRPCArguments, + WithGRPCService: _WithGRPCService, + WithHTTPBody: _WithHTTPBody, + WithHTTPHeaders: _WithHTTPHeaders, + WithHTTPQuery: _WithHTTPQuery, + WithOpenAPIParameters: _WithOpenAPIParameters, Workflow: _Workflow, + WorkflowMetadata: _WorkflowMetadata, + WorkflowTags: _WorkflowTags, + WorkflowTimeout: _WorkflowTimeout, }; diff --git a/src/lib/generated/classes/inline-script.ts b/src/lib/generated/classes/inline-script.ts new file mode 100644 index 00000000..82a660a0 --- /dev/null +++ b/src/lib/generated/classes/inline-script.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the InlineScript class and type + */ +export type InlineScriptIntersection = InlineScript & Specification.InlineScript; + +/** + * Represents a constructor for the intersection of the InlineScript class and type + */ +export interface InlineScriptConstructor { + new (model?: Partial): InlineScriptIntersection; +} + +/** + * Represents a InlineScript with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class InlineScript extends ObjectHydrator { + /** + * Instanciates a new instance of the InlineScript class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the InlineScript. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('InlineScript')?.constructor?.(this); + } + + /** + * Validates the current instance of the InlineScript. + * Throws if invalid. + */ + validate() { + const copy = new InlineScript(this as any) as InlineScriptIntersection; + validate('InlineScript', copy); + } + + /** + * Normalizes the current instance of the InlineScript. + * Creates a copy of the InlineScript, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the InlineScript instance. + */ + normalize(): InlineScript & Specification.InlineScript { + const copy = new InlineScript(this as any) as InlineScriptIntersection; + return getLifecycleHooks('InlineScript')?.normalize?.(copy) || copy; + } +} + +export const _InlineScript = InlineScript as InlineScriptConstructor; diff --git a/src/lib/generated/classes/input-from.ts b/src/lib/generated/classes/input-from.ts new file mode 100644 index 00000000..d4bed3ac --- /dev/null +++ b/src/lib/generated/classes/input-from.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the InputFrom class and type + */ +export type InputFromIntersection = InputFrom & Specification.InputFrom; + +/** + * Represents a constructor for the intersection of the InputFrom class and type + */ +export interface InputFromConstructor { + new (model?: Partial): InputFromIntersection; +} + +/** + * Represents a InputFrom with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class InputFrom extends ObjectHydrator { + /** + * Instanciates a new instance of the InputFrom class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the InputFrom. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('InputFrom')?.constructor?.(this); + } + + /** + * Validates the current instance of the InputFrom. + * Throws if invalid. + */ + validate() { + const copy = new InputFrom(this as any) as InputFromIntersection; + validate('InputFrom', copy); + } + + /** + * Normalizes the current instance of the InputFrom. + * Creates a copy of the InputFrom, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the InputFrom instance. + */ + normalize(): InputFrom & Specification.InputFrom { + const copy = new InputFrom(this as any) as InputFromIntersection; + return getLifecycleHooks('InputFrom')?.normalize?.(copy) || copy; + } +} + +export const _InputFrom = InputFrom as InputFromConstructor; diff --git a/src/lib/generated/classes/input.ts b/src/lib/generated/classes/input.ts index fe9269b7..33da49e6 100644 --- a/src/lib/generated/classes/input.ts +++ b/src/lib/generated/classes/input.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ +import { _Schema } from './schema'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; +import { isObject } from '../../utils'; /** * Represents the intersection between the Input class and type @@ -50,7 +52,10 @@ export class Input extends ObjectHydrator { */ constructor(model?: Partial) { super(model); - + const self = this as unknown as Specification.Input & object; + if (isObject(model)) { + if (typeof model.schema === 'object') self.schema = new _Schema(model.schema); + } getLifecycleHooks('Input')?.constructor?.(this); } diff --git a/src/lib/generated/classes/linear-backoff.ts b/src/lib/generated/classes/linear-backoff.ts new file mode 100644 index 00000000..c93102c8 --- /dev/null +++ b/src/lib/generated/classes/linear-backoff.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the LinearBackoff class and type + */ +export type LinearBackoffIntersection = LinearBackoff & Specification.LinearBackoff; + +/** + * Represents a constructor for the intersection of the LinearBackoff class and type + */ +export interface LinearBackoffConstructor { + new (model?: Partial): LinearBackoffIntersection; +} + +/** + * Represents a LinearBackoff with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class LinearBackoff extends ObjectHydrator { + /** + * Instanciates a new instance of the LinearBackoff class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the LinearBackoff. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('LinearBackoff')?.constructor?.(this); + } + + /** + * Validates the current instance of the LinearBackoff. + * Throws if invalid. + */ + validate() { + const copy = new LinearBackoff(this as any) as LinearBackoffIntersection; + validate('LinearBackoff', copy); + } + + /** + * Normalizes the current instance of the LinearBackoff. + * Creates a copy of the LinearBackoff, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the LinearBackoff instance. + */ + normalize(): LinearBackoff & Specification.LinearBackoff { + const copy = new LinearBackoff(this as any) as LinearBackoffIntersection; + return getLifecycleHooks('LinearBackoff')?.normalize?.(copy) || copy; + } +} + +export const _LinearBackoff = LinearBackoff as LinearBackoffConstructor; diff --git a/src/lib/generated/classes/listen-task-configuration.ts b/src/lib/generated/classes/listen-task-configuration.ts new file mode 100644 index 00000000..1dd689f4 --- /dev/null +++ b/src/lib/generated/classes/listen-task-configuration.ts @@ -0,0 +1,83 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _EventConsumptionStrategy } from './event-consumption-strategy'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the ListenTaskConfiguration class and type + */ +export type ListenTaskConfigurationIntersection = ListenTaskConfiguration & Specification.ListenTaskConfiguration; + +/** + * Represents a constructor for the intersection of the ListenTaskConfiguration class and type + */ +export interface ListenTaskConfigurationConstructor { + new (model?: Partial): ListenTaskConfigurationIntersection; +} + +/** + * Represents a ListenTaskConfiguration with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class ListenTaskConfiguration extends ObjectHydrator { + /** + * Instanciates a new instance of the ListenTaskConfiguration class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the ListenTaskConfiguration. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.ListenTaskConfiguration & object; + if (isObject(model)) { + if (typeof model.to === 'object') self.to = new _EventConsumptionStrategy(model.to); + } + getLifecycleHooks('ListenTaskConfiguration')?.constructor?.(this); + } + + /** + * Validates the current instance of the ListenTaskConfiguration. + * Throws if invalid. + */ + validate() { + const copy = new ListenTaskConfiguration(this as any) as ListenTaskConfigurationIntersection; + validate('ListenTaskConfiguration', copy); + } + + /** + * Normalizes the current instance of the ListenTaskConfiguration. + * Creates a copy of the ListenTaskConfiguration, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the ListenTaskConfiguration instance. + */ + normalize(): ListenTaskConfiguration & Specification.ListenTaskConfiguration { + const copy = new ListenTaskConfiguration(this as any) as ListenTaskConfigurationIntersection; + return getLifecycleHooks('ListenTaskConfiguration')?.normalize?.(copy) || copy; + } +} + +export const _ListenTaskConfiguration = ListenTaskConfiguration as ListenTaskConfigurationConstructor; diff --git a/src/lib/generated/classes/listen-task.ts b/src/lib/generated/classes/listen-task.ts index c4bea543..daa5e04d 100644 --- a/src/lib/generated/classes/listen-task.ts +++ b/src/lib/generated/classes/listen-task.ts @@ -23,8 +23,9 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; -import { _ListenTaskListen } from './listen-task-listen'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; +import { _ListenTaskConfiguration } from './listen-task-configuration'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -61,8 +62,9 @@ export class ListenTask extends _TaskBase { if (typeof model.input === 'object') self.input = new _Input(model.input); if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.export === 'object') self.export = new _Export(model.export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); - if (typeof model.listen === 'object') self.listen = new _ListenTaskListen(model.listen); + if (typeof model.timeout === 'object') self.timeout = new _TaskBaseTimeout(model.timeout); + if (typeof model.metadata === 'object') self.metadata = new _TaskMetadata(model.metadata); + if (typeof model.listen === 'object') self.listen = new _ListenTaskConfiguration(model.listen); } getLifecycleHooks('ListenTask')?.constructor?.(this); } diff --git a/src/lib/generated/classes/oauth2-autenthication-data-audiences.ts b/src/lib/generated/classes/oauth2-autenthication-data-audiences.ts new file mode 100644 index 00000000..5753d426 --- /dev/null +++ b/src/lib/generated/classes/oauth2-autenthication-data-audiences.ts @@ -0,0 +1,70 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ArrayHydrator } from '../../hydrator'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents a collection of string. + * Inherits from ArrayHydrator to handle array-specific hydration. + */ +export class OAuth2AutenthicationDataAudiences extends ArrayHydrator { + /** + * Constructs a new instance of the OAuth2AutenthicationDataAudiences class. + * + * @param model - Optional parameter which can be an array of objects or a number representing the array length. + */ + constructor(model?: Array | number) { + super(model); + if (Array.isArray(model)) { + if (model?.length) { + this.splice(0, this.length); + model.forEach((item) => this.push(item)); + } + } + Object.setPrototypeOf(this, Object.create(OAuth2AutenthicationDataAudiences.prototype)); + getLifecycleHooks('OAuth2AutenthicationDataAudiences')?.constructor?.(this); + } + + /** + * Validates the current instance of the OAuth2AutenthicationDataAudiences. + * Throws if invalid. + */ + validate() { + const copy = new OAuth2AutenthicationDataAudiences(this); + validate('OAuth2AutenthicationDataAudiences', copy); + } + + /** + * Normalizes the current instance of the OAuth2AutenthicationDataAudiences. + * Creates a copy of the OAuth2AutenthicationDataAudiences, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the OAuth2AutenthicationDataAudiences instance. + */ + normalize(): OAuth2AutenthicationDataAudiences { + const copy = new OAuth2AutenthicationDataAudiences(this); + return getLifecycleHooks('OAuth2AutenthicationDataAudiences')?.normalize?.(copy) || copy; + } +} + +export const _OAuth2AutenthicationDataAudiences = OAuth2AutenthicationDataAudiences; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes diff --git a/src/lib/generated/classes/oauth2-autenthication-data-client.ts b/src/lib/generated/classes/oauth2-autenthication-data-client.ts new file mode 100644 index 00000000..41f18128 --- /dev/null +++ b/src/lib/generated/classes/oauth2-autenthication-data-client.ts @@ -0,0 +1,80 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the OAuth2AutenthicationDataClient class and type + */ +export type OAuth2AutenthicationDataClientIntersection = OAuth2AutenthicationDataClient & + Specification.OAuth2AutenthicationDataClient; + +/** + * Represents a constructor for the intersection of the OAuth2AutenthicationDataClient class and type + */ +export interface OAuth2AutenthicationDataClientConstructor { + new (model?: Partial): OAuth2AutenthicationDataClientIntersection; +} + +/** + * Represents a OAuth2AutenthicationDataClient with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class OAuth2AutenthicationDataClient extends ObjectHydrator { + /** + * Instanciates a new instance of the OAuth2AutenthicationDataClient class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the OAuth2AutenthicationDataClient. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('OAuth2AutenthicationDataClient')?.constructor?.(this); + } + + /** + * Validates the current instance of the OAuth2AutenthicationDataClient. + * Throws if invalid. + */ + validate() { + const copy = new OAuth2AutenthicationDataClient(this as any) as OAuth2AutenthicationDataClientIntersection; + validate('OAuth2AutenthicationDataClient', copy); + } + + /** + * Normalizes the current instance of the OAuth2AutenthicationDataClient. + * Creates a copy of the OAuth2AutenthicationDataClient, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the OAuth2AutenthicationDataClient instance. + */ + normalize(): OAuth2AutenthicationDataClient & Specification.OAuth2AutenthicationDataClient { + const copy = new OAuth2AutenthicationDataClient(this as any) as OAuth2AutenthicationDataClientIntersection; + return getLifecycleHooks('OAuth2AutenthicationDataClient')?.normalize?.(copy) || copy; + } +} + +export const _OAuth2AutenthicationDataClient = + OAuth2AutenthicationDataClient as OAuth2AutenthicationDataClientConstructor; diff --git a/src/lib/generated/classes/oauth2-autenthication-data-scopes.ts b/src/lib/generated/classes/oauth2-autenthication-data-scopes.ts new file mode 100644 index 00000000..7c2fa98d --- /dev/null +++ b/src/lib/generated/classes/oauth2-autenthication-data-scopes.ts @@ -0,0 +1,70 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ArrayHydrator } from '../../hydrator'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents a collection of string. + * Inherits from ArrayHydrator to handle array-specific hydration. + */ +export class OAuth2AutenthicationDataScopes extends ArrayHydrator { + /** + * Constructs a new instance of the OAuth2AutenthicationDataScopes class. + * + * @param model - Optional parameter which can be an array of objects or a number representing the array length. + */ + constructor(model?: Array | number) { + super(model); + if (Array.isArray(model)) { + if (model?.length) { + this.splice(0, this.length); + model.forEach((item) => this.push(item)); + } + } + Object.setPrototypeOf(this, Object.create(OAuth2AutenthicationDataScopes.prototype)); + getLifecycleHooks('OAuth2AutenthicationDataScopes')?.constructor?.(this); + } + + /** + * Validates the current instance of the OAuth2AutenthicationDataScopes. + * Throws if invalid. + */ + validate() { + const copy = new OAuth2AutenthicationDataScopes(this); + validate('OAuth2AutenthicationDataScopes', copy); + } + + /** + * Normalizes the current instance of the OAuth2AutenthicationDataScopes. + * Creates a copy of the OAuth2AutenthicationDataScopes, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the OAuth2AutenthicationDataScopes instance. + */ + normalize(): OAuth2AutenthicationDataScopes { + const copy = new OAuth2AutenthicationDataScopes(this); + return getLifecycleHooks('OAuth2AutenthicationDataScopes')?.normalize?.(copy) || copy; + } +} + +export const _OAuth2AutenthicationDataScopes = OAuth2AutenthicationDataScopes; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes diff --git a/src/lib/generated/classes/oauth2-autenthication-data.ts b/src/lib/generated/classes/oauth2-autenthication-data.ts new file mode 100644 index 00000000..8d79ae21 --- /dev/null +++ b/src/lib/generated/classes/oauth2-autenthication-data.ts @@ -0,0 +1,88 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _OAuth2AutenthicationDataClient } from './oauth2-autenthication-data-client'; +import { _OAuth2TokenRequest } from './oauth2-token-request'; +import { _OAuth2TokenDefinition } from './oauth2-token-definition'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the OAuth2AutenthicationData class and type + */ +export type OAuth2AutenthicationDataIntersection = OAuth2AutenthicationData & Specification.OAuth2AutenthicationData; + +/** + * Represents a constructor for the intersection of the OAuth2AutenthicationData class and type + */ +export interface OAuth2AutenthicationDataConstructor { + new (model?: Partial): OAuth2AutenthicationDataIntersection; +} + +/** + * Represents a OAuth2AutenthicationData with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class OAuth2AutenthicationData extends ObjectHydrator { + /** + * Instanciates a new instance of the OAuth2AutenthicationData class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the OAuth2AutenthicationData. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.OAuth2AutenthicationData & object; + if (isObject(model)) { + if (typeof model.client === 'object') self.client = new _OAuth2AutenthicationDataClient(model.client); + if (typeof model.request === 'object') self.request = new _OAuth2TokenRequest(model.request); + if (typeof model.subject === 'object') self.subject = new _OAuth2TokenDefinition(model.subject); + if (typeof model.actor === 'object') self.actor = new _OAuth2TokenDefinition(model.actor); + } + getLifecycleHooks('OAuth2AutenthicationData')?.constructor?.(this); + } + + /** + * Validates the current instance of the OAuth2AutenthicationData. + * Throws if invalid. + */ + validate() { + const copy = new OAuth2AutenthicationData(this as any) as OAuth2AutenthicationDataIntersection; + validate('OAuth2AutenthicationData', copy); + } + + /** + * Normalizes the current instance of the OAuth2AutenthicationData. + * Creates a copy of the OAuth2AutenthicationData, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the OAuth2AutenthicationData instance. + */ + normalize(): OAuth2AutenthicationData & Specification.OAuth2AutenthicationData { + const copy = new OAuth2AutenthicationData(this as any) as OAuth2AutenthicationDataIntersection; + return getLifecycleHooks('OAuth2AutenthicationData')?.normalize?.(copy) || copy; + } +} + +export const _OAuth2AutenthicationData = OAuth2AutenthicationData as OAuth2AutenthicationDataConstructor; diff --git a/src/lib/generated/classes/oauth2-authentication-policy-configuration.ts b/src/lib/generated/classes/oauth2-authentication-policy-configuration.ts new file mode 100644 index 00000000..b59e81ef --- /dev/null +++ b/src/lib/generated/classes/oauth2-authentication-policy-configuration.ts @@ -0,0 +1,119 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _OAuth2AutenthicationDataClient } from './oauth2-autenthication-data-client'; +import { _OAuth2TokenRequest } from './oauth2-token-request'; +import { _OAuth2TokenDefinition } from './oauth2-token-definition'; +import { _OAuth2AuthenticationPropertiesEndpoints } from './oauth2-authentication-properties-endpoints'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the OAuth2AuthenticationPolicyConfiguration class and type + */ +export type OAuth2AuthenticationPolicyConfigurationIntersection = OAuth2AuthenticationPolicyConfiguration & + Specification.OAuth2AuthenticationPolicyConfiguration; + +/** + * Represents a constructor for the intersection of the OAuth2AuthenticationPolicyConfiguration class and type + */ +export interface OAuth2AuthenticationPolicyConfigurationConstructor { + new ( + model?: Partial, + ): OAuth2AuthenticationPolicyConfigurationIntersection; +} + +/** + * Represents a OAuth2AuthenticationPolicyConfiguration with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class OAuth2AuthenticationPolicyConfiguration extends ObjectHydrator { + /** + * Instanciates a new instance of the OAuth2AuthenticationPolicyConfiguration class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the OAuth2AuthenticationPolicyConfiguration. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.OAuth2AuthenticationPolicyConfiguration & object; + if (isObject(model)) { + if (typeof (model as Specification.OAuth2AutenthicationData).client === 'object') + (self as Specification.OAuth2AutenthicationData).client = new _OAuth2AutenthicationDataClient( + (model as Specification.OAuth2AutenthicationData).client as Specification.OAuth2AutenthicationDataClient, + ); + if (typeof (model as Specification.OAuth2AutenthicationData).request === 'object') + (self as Specification.OAuth2AutenthicationData).request = new _OAuth2TokenRequest( + (model as Specification.OAuth2AutenthicationData).request as Specification.OAuth2TokenRequest, + ); + if (typeof (model as Specification.OAuth2AutenthicationData).subject === 'object') + (self as Specification.OAuth2AutenthicationData).subject = new _OAuth2TokenDefinition( + (model as Specification.OAuth2AutenthicationData).subject as Specification.OAuth2TokenDefinition, + ); + if (typeof (model as Specification.OAuth2AutenthicationData).actor === 'object') + (self as Specification.OAuth2AutenthicationData).actor = new _OAuth2TokenDefinition( + (model as Specification.OAuth2AutenthicationData).actor as Specification.OAuth2TokenDefinition, + ); + if ( + typeof (model as { [k: string]: unknown; endpoints?: Specification.OAuth2AuthenticationPropertiesEndpoints }) + .endpoints === 'object' + ) + ( + self as { [k: string]: unknown; endpoints?: Specification.OAuth2AuthenticationPropertiesEndpoints } + ).endpoints = new _OAuth2AuthenticationPropertiesEndpoints( + (model as { [k: string]: unknown; endpoints?: Specification.OAuth2AuthenticationPropertiesEndpoints }) + .endpoints as Specification.OAuth2AuthenticationPropertiesEndpoints, + ); + } + getLifecycleHooks('OAuth2AuthenticationPolicyConfiguration')?.constructor?.(this); + } + + /** + * Validates the current instance of the OAuth2AuthenticationPolicyConfiguration. + * Throws if invalid. + */ + validate() { + const copy = new OAuth2AuthenticationPolicyConfiguration( + this as any, + ) as OAuth2AuthenticationPolicyConfigurationIntersection; + validate('OAuth2AuthenticationPolicyConfiguration', copy); + } + + /** + * Normalizes the current instance of the OAuth2AuthenticationPolicyConfiguration. + * Creates a copy of the OAuth2AuthenticationPolicyConfiguration, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the OAuth2AuthenticationPolicyConfiguration instance. + */ + normalize(): OAuth2AuthenticationPolicyConfiguration & Specification.OAuth2AuthenticationPolicyConfiguration { + const copy = new OAuth2AuthenticationPolicyConfiguration( + this as any, + ) as OAuth2AuthenticationPolicyConfigurationIntersection; + return getLifecycleHooks('OAuth2AuthenticationPolicyConfiguration')?.normalize?.(copy) || copy; + } +} + +export const _OAuth2AuthenticationPolicyConfiguration = + OAuth2AuthenticationPolicyConfiguration as OAuth2AuthenticationPolicyConfigurationConstructor; diff --git a/src/lib/generated/classes/oauth2-authentication-policy.ts b/src/lib/generated/classes/oauth2-authentication-policy.ts new file mode 100644 index 00000000..a4cbdbce --- /dev/null +++ b/src/lib/generated/classes/oauth2-authentication-policy.ts @@ -0,0 +1,84 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _OAuth2AuthenticationPolicyConfiguration } from './oauth2-authentication-policy-configuration'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the OAuth2AuthenticationPolicy class and type + */ +export type OAuth2AuthenticationPolicyIntersection = OAuth2AuthenticationPolicy & + Specification.OAuth2AuthenticationPolicy; + +/** + * Represents a constructor for the intersection of the OAuth2AuthenticationPolicy class and type + */ +export interface OAuth2AuthenticationPolicyConstructor { + new (model?: Partial): OAuth2AuthenticationPolicyIntersection; +} + +/** + * Represents a OAuth2AuthenticationPolicy with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class OAuth2AuthenticationPolicy extends ObjectHydrator { + /** + * Instanciates a new instance of the OAuth2AuthenticationPolicy class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the OAuth2AuthenticationPolicy. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.OAuth2AuthenticationPolicy & object; + if (isObject(model)) { + if (typeof model.oauth2 === 'object') self.oauth2 = new _OAuth2AuthenticationPolicyConfiguration(model.oauth2); + } + getLifecycleHooks('OAuth2AuthenticationPolicy')?.constructor?.(this); + } + + /** + * Validates the current instance of the OAuth2AuthenticationPolicy. + * Throws if invalid. + */ + validate() { + const copy = new OAuth2AuthenticationPolicy(this as any) as OAuth2AuthenticationPolicyIntersection; + validate('OAuth2AuthenticationPolicy', copy); + } + + /** + * Normalizes the current instance of the OAuth2AuthenticationPolicy. + * Creates a copy of the OAuth2AuthenticationPolicy, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the OAuth2AuthenticationPolicy instance. + */ + normalize(): OAuth2AuthenticationPolicy & Specification.OAuth2AuthenticationPolicy { + const copy = new OAuth2AuthenticationPolicy(this as any) as OAuth2AuthenticationPolicyIntersection; + return getLifecycleHooks('OAuth2AuthenticationPolicy')?.normalize?.(copy) || copy; + } +} + +export const _OAuth2AuthenticationPolicy = OAuth2AuthenticationPolicy as OAuth2AuthenticationPolicyConstructor; diff --git a/src/lib/generated/classes/oauth2-authentication-properties-endpoints.ts b/src/lib/generated/classes/oauth2-authentication-properties-endpoints.ts new file mode 100644 index 00000000..d19edfd7 --- /dev/null +++ b/src/lib/generated/classes/oauth2-authentication-properties-endpoints.ts @@ -0,0 +1,86 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the OAuth2AuthenticationPropertiesEndpoints class and type + */ +export type OAuth2AuthenticationPropertiesEndpointsIntersection = OAuth2AuthenticationPropertiesEndpoints & + Specification.OAuth2AuthenticationPropertiesEndpoints; + +/** + * Represents a constructor for the intersection of the OAuth2AuthenticationPropertiesEndpoints class and type + */ +export interface OAuth2AuthenticationPropertiesEndpointsConstructor { + new ( + model?: Partial, + ): OAuth2AuthenticationPropertiesEndpointsIntersection; +} + +/** + * Represents a OAuth2AuthenticationPropertiesEndpoints with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class OAuth2AuthenticationPropertiesEndpoints extends ObjectHydrator { + /** + * Instanciates a new instance of the OAuth2AuthenticationPropertiesEndpoints class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the OAuth2AuthenticationPropertiesEndpoints. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('OAuth2AuthenticationPropertiesEndpoints')?.constructor?.(this); + } + + /** + * Validates the current instance of the OAuth2AuthenticationPropertiesEndpoints. + * Throws if invalid. + */ + validate() { + const copy = new OAuth2AuthenticationPropertiesEndpoints( + this as any, + ) as OAuth2AuthenticationPropertiesEndpointsIntersection; + validate('OAuth2AuthenticationPropertiesEndpoints', copy); + } + + /** + * Normalizes the current instance of the OAuth2AuthenticationPropertiesEndpoints. + * Creates a copy of the OAuth2AuthenticationPropertiesEndpoints, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the OAuth2AuthenticationPropertiesEndpoints instance. + */ + normalize(): OAuth2AuthenticationPropertiesEndpoints & Specification.OAuth2AuthenticationPropertiesEndpoints { + const copy = new OAuth2AuthenticationPropertiesEndpoints( + this as any, + ) as OAuth2AuthenticationPropertiesEndpointsIntersection; + return getLifecycleHooks('OAuth2AuthenticationPropertiesEndpoints')?.normalize?.(copy) || copy; + } +} + +export const _OAuth2AuthenticationPropertiesEndpoints = + OAuth2AuthenticationPropertiesEndpoints as OAuth2AuthenticationPropertiesEndpointsConstructor; diff --git a/src/lib/generated/classes/oauth2-connect-authentication-properties.ts b/src/lib/generated/classes/oauth2-connect-authentication-properties.ts new file mode 100644 index 00000000..ed775211 --- /dev/null +++ b/src/lib/generated/classes/oauth2-connect-authentication-properties.ts @@ -0,0 +1,99 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _OAuth2AutenthicationDataClient } from './oauth2-autenthication-data-client'; +import { _OAuth2TokenRequest } from './oauth2-token-request'; +import { _OAuth2TokenDefinition } from './oauth2-token-definition'; +import { _OAuth2AuthenticationPropertiesEndpoints } from './oauth2-authentication-properties-endpoints'; +import { _OAuth2AutenthicationData } from './oauth2-autenthication-data'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the OAuth2ConnectAuthenticationProperties class and type + */ +export type OAuth2ConnectAuthenticationPropertiesIntersection = OAuth2ConnectAuthenticationProperties & + Specification.OAuth2ConnectAuthenticationProperties; + +/** + * Represents a constructor for the intersection of the OAuth2ConnectAuthenticationProperties class and type + */ +export interface OAuth2ConnectAuthenticationPropertiesConstructor { + new ( + model?: Partial, + ): OAuth2ConnectAuthenticationPropertiesIntersection; +} + +/** + * Represents a OAuth2ConnectAuthenticationProperties with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class OAuth2ConnectAuthenticationProperties extends _OAuth2AutenthicationData { + /** + * Instanciates a new instance of the OAuth2ConnectAuthenticationProperties class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the OAuth2ConnectAuthenticationProperties. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.OAuth2ConnectAuthenticationProperties & object; + if (isObject(model)) { + if (typeof model.client === 'object') self.client = new _OAuth2AutenthicationDataClient(model.client); + if (typeof model.request === 'object') self.request = new _OAuth2TokenRequest(model.request); + if (typeof model.subject === 'object') self.subject = new _OAuth2TokenDefinition(model.subject); + if (typeof model.actor === 'object') self.actor = new _OAuth2TokenDefinition(model.actor); + if (typeof model.endpoints === 'object') + self.endpoints = new _OAuth2AuthenticationPropertiesEndpoints(model.endpoints); + } + getLifecycleHooks('OAuth2ConnectAuthenticationProperties')?.constructor?.(this); + } + + /** + * Validates the current instance of the OAuth2ConnectAuthenticationProperties. + * Throws if invalid. + */ + validate() { + const copy = new OAuth2ConnectAuthenticationProperties( + this as any, + ) as OAuth2ConnectAuthenticationPropertiesIntersection; + validate('OAuth2ConnectAuthenticationProperties', copy); + } + + /** + * Normalizes the current instance of the OAuth2ConnectAuthenticationProperties. + * Creates a copy of the OAuth2ConnectAuthenticationProperties, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the OAuth2ConnectAuthenticationProperties instance. + */ + normalize(): OAuth2ConnectAuthenticationProperties & Specification.OAuth2ConnectAuthenticationProperties { + const copy = new OAuth2ConnectAuthenticationProperties( + this as any, + ) as OAuth2ConnectAuthenticationPropertiesIntersection; + return getLifecycleHooks('OAuth2ConnectAuthenticationProperties')?.normalize?.(copy) || copy; + } +} + +export const _OAuth2ConnectAuthenticationProperties = + OAuth2ConnectAuthenticationProperties as OAuth2ConnectAuthenticationPropertiesConstructor; diff --git a/src/lib/generated/classes/oauth2-issuers.ts b/src/lib/generated/classes/oauth2-issuers.ts new file mode 100644 index 00000000..1fea5bd5 --- /dev/null +++ b/src/lib/generated/classes/oauth2-issuers.ts @@ -0,0 +1,70 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ArrayHydrator } from '../../hydrator'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents a collection of string. + * Inherits from ArrayHydrator to handle array-specific hydration. + */ +export class OAuth2Issuers extends ArrayHydrator { + /** + * Constructs a new instance of the OAuth2Issuers class. + * + * @param model - Optional parameter which can be an array of objects or a number representing the array length. + */ + constructor(model?: Array | number) { + super(model); + if (Array.isArray(model)) { + if (model?.length) { + this.splice(0, this.length); + model.forEach((item) => this.push(item)); + } + } + Object.setPrototypeOf(this, Object.create(OAuth2Issuers.prototype)); + getLifecycleHooks('OAuth2Issuers')?.constructor?.(this); + } + + /** + * Validates the current instance of the OAuth2Issuers. + * Throws if invalid. + */ + validate() { + const copy = new OAuth2Issuers(this); + validate('OAuth2Issuers', copy); + } + + /** + * Normalizes the current instance of the OAuth2Issuers. + * Creates a copy of the OAuth2Issuers, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the OAuth2Issuers instance. + */ + normalize(): OAuth2Issuers { + const copy = new OAuth2Issuers(this); + return getLifecycleHooks('OAuth2Issuers')?.normalize?.(copy) || copy; + } +} + +export const _OAuth2Issuers = OAuth2Issuers; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes diff --git a/src/lib/generated/classes/oauth2-token-definition.ts b/src/lib/generated/classes/oauth2-token-definition.ts new file mode 100644 index 00000000..da84b85c --- /dev/null +++ b/src/lib/generated/classes/oauth2-token-definition.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the OAuth2TokenDefinition class and type + */ +export type OAuth2TokenDefinitionIntersection = OAuth2TokenDefinition & Specification.OAuth2TokenDefinition; + +/** + * Represents a constructor for the intersection of the OAuth2TokenDefinition class and type + */ +export interface OAuth2TokenDefinitionConstructor { + new (model?: Partial): OAuth2TokenDefinitionIntersection; +} + +/** + * Represents a OAuth2TokenDefinition with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class OAuth2TokenDefinition extends ObjectHydrator { + /** + * Instanciates a new instance of the OAuth2TokenDefinition class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the OAuth2TokenDefinition. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('OAuth2TokenDefinition')?.constructor?.(this); + } + + /** + * Validates the current instance of the OAuth2TokenDefinition. + * Throws if invalid. + */ + validate() { + const copy = new OAuth2TokenDefinition(this as any) as OAuth2TokenDefinitionIntersection; + validate('OAuth2TokenDefinition', copy); + } + + /** + * Normalizes the current instance of the OAuth2TokenDefinition. + * Creates a copy of the OAuth2TokenDefinition, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the OAuth2TokenDefinition instance. + */ + normalize(): OAuth2TokenDefinition & Specification.OAuth2TokenDefinition { + const copy = new OAuth2TokenDefinition(this as any) as OAuth2TokenDefinitionIntersection; + return getLifecycleHooks('OAuth2TokenDefinition')?.normalize?.(copy) || copy; + } +} + +export const _OAuth2TokenDefinition = OAuth2TokenDefinition as OAuth2TokenDefinitionConstructor; diff --git a/src/lib/generated/classes/oauth2-token-request.ts b/src/lib/generated/classes/oauth2-token-request.ts new file mode 100644 index 00000000..b423c9c6 --- /dev/null +++ b/src/lib/generated/classes/oauth2-token-request.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the OAuth2TokenRequest class and type + */ +export type OAuth2TokenRequestIntersection = OAuth2TokenRequest & Specification.OAuth2TokenRequest; + +/** + * Represents a constructor for the intersection of the OAuth2TokenRequest class and type + */ +export interface OAuth2TokenRequestConstructor { + new (model?: Partial): OAuth2TokenRequestIntersection; +} + +/** + * Represents a OAuth2TokenRequest with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class OAuth2TokenRequest extends ObjectHydrator { + /** + * Instanciates a new instance of the OAuth2TokenRequest class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the OAuth2TokenRequest. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('OAuth2TokenRequest')?.constructor?.(this); + } + + /** + * Validates the current instance of the OAuth2TokenRequest. + * Throws if invalid. + */ + validate() { + const copy = new OAuth2TokenRequest(this as any) as OAuth2TokenRequestIntersection; + validate('OAuth2TokenRequest', copy); + } + + /** + * Normalizes the current instance of the OAuth2TokenRequest. + * Creates a copy of the OAuth2TokenRequest, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the OAuth2TokenRequest instance. + */ + normalize(): OAuth2TokenRequest & Specification.OAuth2TokenRequest { + const copy = new OAuth2TokenRequest(this as any) as OAuth2TokenRequestIntersection; + return getLifecycleHooks('OAuth2TokenRequest')?.normalize?.(copy) || copy; + } +} + +export const _OAuth2TokenRequest = OAuth2TokenRequest as OAuth2TokenRequestConstructor; diff --git a/src/lib/generated/classes/one-event-consumption-strategy.ts b/src/lib/generated/classes/one-event-consumption-strategy.ts new file mode 100644 index 00000000..73246a4d --- /dev/null +++ b/src/lib/generated/classes/one-event-consumption-strategy.ts @@ -0,0 +1,84 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _EventFilter } from './event-filter'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the OneEventConsumptionStrategy class and type + */ +export type OneEventConsumptionStrategyIntersection = OneEventConsumptionStrategy & + Specification.OneEventConsumptionStrategy; + +/** + * Represents a constructor for the intersection of the OneEventConsumptionStrategy class and type + */ +export interface OneEventConsumptionStrategyConstructor { + new (model?: Partial): OneEventConsumptionStrategyIntersection; +} + +/** + * Represents a OneEventConsumptionStrategy with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class OneEventConsumptionStrategy extends ObjectHydrator { + /** + * Instanciates a new instance of the OneEventConsumptionStrategy class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the OneEventConsumptionStrategy. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.OneEventConsumptionStrategy & object; + if (isObject(model)) { + if (typeof model.one === 'object') self.one = new _EventFilter(model.one); + } + getLifecycleHooks('OneEventConsumptionStrategy')?.constructor?.(this); + } + + /** + * Validates the current instance of the OneEventConsumptionStrategy. + * Throws if invalid. + */ + validate() { + const copy = new OneEventConsumptionStrategy(this as any) as OneEventConsumptionStrategyIntersection; + validate('OneEventConsumptionStrategy', copy); + } + + /** + * Normalizes the current instance of the OneEventConsumptionStrategy. + * Creates a copy of the OneEventConsumptionStrategy, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the OneEventConsumptionStrategy instance. + */ + normalize(): OneEventConsumptionStrategy & Specification.OneEventConsumptionStrategy { + const copy = new OneEventConsumptionStrategy(this as any) as OneEventConsumptionStrategyIntersection; + return getLifecycleHooks('OneEventConsumptionStrategy')?.normalize?.(copy) || copy; + } +} + +export const _OneEventConsumptionStrategy = OneEventConsumptionStrategy as OneEventConsumptionStrategyConstructor; diff --git a/src/lib/generated/classes/open-api-arguments.ts b/src/lib/generated/classes/open-api-arguments.ts new file mode 100644 index 00000000..a7bcfaf4 --- /dev/null +++ b/src/lib/generated/classes/open-api-arguments.ts @@ -0,0 +1,88 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _ExternalResource } from './external-resource'; +import { _WithOpenAPIParameters } from './with-open-api-parameters'; +import { _ReferenceableAuthenticationPolicy } from './referenceable-authentication-policy'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the OpenAPIArguments class and type + */ +export type OpenAPIArgumentsIntersection = OpenAPIArguments & Specification.OpenAPIArguments; + +/** + * Represents a constructor for the intersection of the OpenAPIArguments class and type + */ +export interface OpenAPIArgumentsConstructor { + new (model?: Partial): OpenAPIArgumentsIntersection; +} + +/** + * Represents a OpenAPIArguments with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class OpenAPIArguments extends ObjectHydrator { + /** + * Instanciates a new instance of the OpenAPIArguments class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the OpenAPIArguments. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.OpenAPIArguments & object; + if (isObject(model)) { + if (typeof model.document === 'object') self.document = new _ExternalResource(model.document); + if (typeof model.parameters === 'object') self.parameters = new _WithOpenAPIParameters(model.parameters); + if (typeof model.authentication === 'object') + self.authentication = new _ReferenceableAuthenticationPolicy(model.authentication); + } + getLifecycleHooks('OpenAPIArguments')?.constructor?.(this); + } + + /** + * Validates the current instance of the OpenAPIArguments. + * Throws if invalid. + */ + validate() { + const copy = new OpenAPIArguments(this as any) as OpenAPIArgumentsIntersection; + validate('OpenAPIArguments', copy); + } + + /** + * Normalizes the current instance of the OpenAPIArguments. + * Creates a copy of the OpenAPIArguments, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the OpenAPIArguments instance. + */ + normalize(): OpenAPIArguments & Specification.OpenAPIArguments { + const copy = new OpenAPIArguments(this as any) as OpenAPIArgumentsIntersection; + return getLifecycleHooks('OpenAPIArguments')?.normalize?.(copy) || copy; + } +} + +export const _OpenAPIArguments = OpenAPIArguments as OpenAPIArgumentsConstructor; diff --git a/src/lib/generated/classes/open-id-connect-authentication-policy-configuration.ts b/src/lib/generated/classes/open-id-connect-authentication-policy-configuration.ts new file mode 100644 index 00000000..21c2d55e --- /dev/null +++ b/src/lib/generated/classes/open-id-connect-authentication-policy-configuration.ts @@ -0,0 +1,110 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _OAuth2AutenthicationDataClient } from './oauth2-autenthication-data-client'; +import { _OAuth2TokenRequest } from './oauth2-token-request'; +import { _OAuth2TokenDefinition } from './oauth2-token-definition'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the OpenIdConnectAuthenticationPolicyConfiguration class and type + */ +export type OpenIdConnectAuthenticationPolicyConfigurationIntersection = + OpenIdConnectAuthenticationPolicyConfiguration & Specification.OpenIdConnectAuthenticationPolicyConfiguration; + +/** + * Represents a constructor for the intersection of the OpenIdConnectAuthenticationPolicyConfiguration class and type + */ +export interface OpenIdConnectAuthenticationPolicyConfigurationConstructor { + new ( + model?: Partial, + ): OpenIdConnectAuthenticationPolicyConfigurationIntersection; +} + +/** + * Represents a OpenIdConnectAuthenticationPolicyConfiguration with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class OpenIdConnectAuthenticationPolicyConfiguration extends ObjectHydrator { + /** + * Instanciates a new instance of the OpenIdConnectAuthenticationPolicyConfiguration class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the OpenIdConnectAuthenticationPolicyConfiguration. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.OpenIdConnectAuthenticationPolicyConfiguration & object; + if (isObject(model)) { + if (typeof (model as Specification.OpenIdConnectAuthenticationProperties).client === 'object') + (self as Specification.OpenIdConnectAuthenticationProperties).client = new _OAuth2AutenthicationDataClient( + (model as Specification.OpenIdConnectAuthenticationProperties) + .client as Specification.OAuth2AutenthicationDataClient, + ); + if (typeof (model as Specification.OpenIdConnectAuthenticationProperties).request === 'object') + (self as Specification.OpenIdConnectAuthenticationProperties).request = new _OAuth2TokenRequest( + (model as Specification.OpenIdConnectAuthenticationProperties).request as Specification.OAuth2TokenRequest, + ); + if (typeof (model as Specification.OpenIdConnectAuthenticationProperties).subject === 'object') + (self as Specification.OpenIdConnectAuthenticationProperties).subject = new _OAuth2TokenDefinition( + (model as Specification.OpenIdConnectAuthenticationProperties).subject as Specification.OAuth2TokenDefinition, + ); + if (typeof (model as Specification.OpenIdConnectAuthenticationProperties).actor === 'object') + (self as Specification.OpenIdConnectAuthenticationProperties).actor = new _OAuth2TokenDefinition( + (model as Specification.OpenIdConnectAuthenticationProperties).actor as Specification.OAuth2TokenDefinition, + ); + } + getLifecycleHooks('OpenIdConnectAuthenticationPolicyConfiguration')?.constructor?.(this); + } + + /** + * Validates the current instance of the OpenIdConnectAuthenticationPolicyConfiguration. + * Throws if invalid. + */ + validate() { + const copy = new OpenIdConnectAuthenticationPolicyConfiguration( + this as any, + ) as OpenIdConnectAuthenticationPolicyConfigurationIntersection; + validate('OpenIdConnectAuthenticationPolicyConfiguration', copy); + } + + /** + * Normalizes the current instance of the OpenIdConnectAuthenticationPolicyConfiguration. + * Creates a copy of the OpenIdConnectAuthenticationPolicyConfiguration, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the OpenIdConnectAuthenticationPolicyConfiguration instance. + */ + normalize(): OpenIdConnectAuthenticationPolicyConfiguration & + Specification.OpenIdConnectAuthenticationPolicyConfiguration { + const copy = new OpenIdConnectAuthenticationPolicyConfiguration( + this as any, + ) as OpenIdConnectAuthenticationPolicyConfigurationIntersection; + return getLifecycleHooks('OpenIdConnectAuthenticationPolicyConfiguration')?.normalize?.(copy) || copy; + } +} + +export const _OpenIdConnectAuthenticationPolicyConfiguration = + OpenIdConnectAuthenticationPolicyConfiguration as OpenIdConnectAuthenticationPolicyConfigurationConstructor; diff --git a/src/lib/generated/classes/open-id-connect-authentication-policy.ts b/src/lib/generated/classes/open-id-connect-authentication-policy.ts new file mode 100644 index 00000000..7347322f --- /dev/null +++ b/src/lib/generated/classes/open-id-connect-authentication-policy.ts @@ -0,0 +1,85 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _OpenIdConnectAuthenticationPolicyConfiguration } from './open-id-connect-authentication-policy-configuration'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the OpenIdConnectAuthenticationPolicy class and type + */ +export type OpenIdConnectAuthenticationPolicyIntersection = OpenIdConnectAuthenticationPolicy & + Specification.OpenIdConnectAuthenticationPolicy; + +/** + * Represents a constructor for the intersection of the OpenIdConnectAuthenticationPolicy class and type + */ +export interface OpenIdConnectAuthenticationPolicyConstructor { + new (model?: Partial): OpenIdConnectAuthenticationPolicyIntersection; +} + +/** + * Represents a OpenIdConnectAuthenticationPolicy with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class OpenIdConnectAuthenticationPolicy extends ObjectHydrator { + /** + * Instanciates a new instance of the OpenIdConnectAuthenticationPolicy class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the OpenIdConnectAuthenticationPolicy. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.OpenIdConnectAuthenticationPolicy & object; + if (isObject(model)) { + if (typeof model.oidc === 'object') self.oidc = new _OpenIdConnectAuthenticationPolicyConfiguration(model.oidc); + } + getLifecycleHooks('OpenIdConnectAuthenticationPolicy')?.constructor?.(this); + } + + /** + * Validates the current instance of the OpenIdConnectAuthenticationPolicy. + * Throws if invalid. + */ + validate() { + const copy = new OpenIdConnectAuthenticationPolicy(this as any) as OpenIdConnectAuthenticationPolicyIntersection; + validate('OpenIdConnectAuthenticationPolicy', copy); + } + + /** + * Normalizes the current instance of the OpenIdConnectAuthenticationPolicy. + * Creates a copy of the OpenIdConnectAuthenticationPolicy, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the OpenIdConnectAuthenticationPolicy instance. + */ + normalize(): OpenIdConnectAuthenticationPolicy & Specification.OpenIdConnectAuthenticationPolicy { + const copy = new OpenIdConnectAuthenticationPolicy(this as any) as OpenIdConnectAuthenticationPolicyIntersection; + return getLifecycleHooks('OpenIdConnectAuthenticationPolicy')?.normalize?.(copy) || copy; + } +} + +export const _OpenIdConnectAuthenticationPolicy = + OpenIdConnectAuthenticationPolicy as OpenIdConnectAuthenticationPolicyConstructor; diff --git a/src/lib/generated/classes/open-id-connect-authentication-properties.ts b/src/lib/generated/classes/open-id-connect-authentication-properties.ts new file mode 100644 index 00000000..dbedf195 --- /dev/null +++ b/src/lib/generated/classes/open-id-connect-authentication-properties.ts @@ -0,0 +1,96 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _OAuth2AutenthicationDataClient } from './oauth2-autenthication-data-client'; +import { _OAuth2TokenRequest } from './oauth2-token-request'; +import { _OAuth2TokenDefinition } from './oauth2-token-definition'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the OpenIdConnectAuthenticationProperties class and type + */ +export type OpenIdConnectAuthenticationPropertiesIntersection = OpenIdConnectAuthenticationProperties & + Specification.OpenIdConnectAuthenticationProperties; + +/** + * Represents a constructor for the intersection of the OpenIdConnectAuthenticationProperties class and type + */ +export interface OpenIdConnectAuthenticationPropertiesConstructor { + new ( + model?: Partial, + ): OpenIdConnectAuthenticationPropertiesIntersection; +} + +/** + * Represents a OpenIdConnectAuthenticationProperties with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class OpenIdConnectAuthenticationProperties extends ObjectHydrator { + /** + * Instanciates a new instance of the OpenIdConnectAuthenticationProperties class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the OpenIdConnectAuthenticationProperties. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.OpenIdConnectAuthenticationProperties & object; + if (isObject(model)) { + if (typeof model.client === 'object') self.client = new _OAuth2AutenthicationDataClient(model.client); + if (typeof model.request === 'object') self.request = new _OAuth2TokenRequest(model.request); + if (typeof model.subject === 'object') self.subject = new _OAuth2TokenDefinition(model.subject); + if (typeof model.actor === 'object') self.actor = new _OAuth2TokenDefinition(model.actor); + } + getLifecycleHooks('OpenIdConnectAuthenticationProperties')?.constructor?.(this); + } + + /** + * Validates the current instance of the OpenIdConnectAuthenticationProperties. + * Throws if invalid. + */ + validate() { + const copy = new OpenIdConnectAuthenticationProperties( + this as any, + ) as OpenIdConnectAuthenticationPropertiesIntersection; + validate('OpenIdConnectAuthenticationProperties', copy); + } + + /** + * Normalizes the current instance of the OpenIdConnectAuthenticationProperties. + * Creates a copy of the OpenIdConnectAuthenticationProperties, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the OpenIdConnectAuthenticationProperties instance. + */ + normalize(): OpenIdConnectAuthenticationProperties & Specification.OpenIdConnectAuthenticationProperties { + const copy = new OpenIdConnectAuthenticationProperties( + this as any, + ) as OpenIdConnectAuthenticationPropertiesIntersection; + return getLifecycleHooks('OpenIdConnectAuthenticationProperties')?.normalize?.(copy) || copy; + } +} + +export const _OpenIdConnectAuthenticationProperties = + OpenIdConnectAuthenticationProperties as OpenIdConnectAuthenticationPropertiesConstructor; diff --git a/src/lib/generated/classes/output-as.ts b/src/lib/generated/classes/output-as.ts new file mode 100644 index 00000000..2c55a969 --- /dev/null +++ b/src/lib/generated/classes/output-as.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the OutputAs class and type + */ +export type OutputAsIntersection = OutputAs & Specification.OutputAs; + +/** + * Represents a constructor for the intersection of the OutputAs class and type + */ +export interface OutputAsConstructor { + new (model?: Partial): OutputAsIntersection; +} + +/** + * Represents a OutputAs with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class OutputAs extends ObjectHydrator { + /** + * Instanciates a new instance of the OutputAs class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the OutputAs. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('OutputAs')?.constructor?.(this); + } + + /** + * Validates the current instance of the OutputAs. + * Throws if invalid. + */ + validate() { + const copy = new OutputAs(this as any) as OutputAsIntersection; + validate('OutputAs', copy); + } + + /** + * Normalizes the current instance of the OutputAs. + * Creates a copy of the OutputAs, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the OutputAs instance. + */ + normalize(): OutputAs & Specification.OutputAs { + const copy = new OutputAs(this as any) as OutputAsIntersection; + return getLifecycleHooks('OutputAs')?.normalize?.(copy) || copy; + } +} + +export const _OutputAs = OutputAs as OutputAsConstructor; diff --git a/src/lib/generated/classes/output.ts b/src/lib/generated/classes/output.ts index 89885248..b86e580f 100644 --- a/src/lib/generated/classes/output.ts +++ b/src/lib/generated/classes/output.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ +import { _Schema } from './schema'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; +import { isObject } from '../../utils'; /** * Represents the intersection between the Output class and type @@ -50,7 +52,10 @@ export class Output extends ObjectHydrator { */ constructor(model?: Partial) { super(model); - + const self = this as unknown as Specification.Output & object; + if (isObject(model)) { + if (typeof model.schema === 'object') self.schema = new _Schema(model.schema); + } getLifecycleHooks('Output')?.constructor?.(this); } diff --git a/src/lib/generated/classes/raise-task-configuration.ts b/src/lib/generated/classes/raise-task-configuration.ts new file mode 100644 index 00000000..ae61ee56 --- /dev/null +++ b/src/lib/generated/classes/raise-task-configuration.ts @@ -0,0 +1,83 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _RaiseTaskRaiseError } from './raise-task-raise-error'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the RaiseTaskConfiguration class and type + */ +export type RaiseTaskConfigurationIntersection = RaiseTaskConfiguration & Specification.RaiseTaskConfiguration; + +/** + * Represents a constructor for the intersection of the RaiseTaskConfiguration class and type + */ +export interface RaiseTaskConfigurationConstructor { + new (model?: Partial): RaiseTaskConfigurationIntersection; +} + +/** + * Represents a RaiseTaskConfiguration with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RaiseTaskConfiguration extends ObjectHydrator { + /** + * Instanciates a new instance of the RaiseTaskConfiguration class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RaiseTaskConfiguration. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.RaiseTaskConfiguration & object; + if (isObject(model)) { + if (typeof model.error === 'object') self.error = new _RaiseTaskRaiseError(model.error); + } + getLifecycleHooks('RaiseTaskConfiguration')?.constructor?.(this); + } + + /** + * Validates the current instance of the RaiseTaskConfiguration. + * Throws if invalid. + */ + validate() { + const copy = new RaiseTaskConfiguration(this as any) as RaiseTaskConfigurationIntersection; + validate('RaiseTaskConfiguration', copy); + } + + /** + * Normalizes the current instance of the RaiseTaskConfiguration. + * Creates a copy of the RaiseTaskConfiguration, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RaiseTaskConfiguration instance. + */ + normalize(): RaiseTaskConfiguration & Specification.RaiseTaskConfiguration { + const copy = new RaiseTaskConfiguration(this as any) as RaiseTaskConfigurationIntersection; + return getLifecycleHooks('RaiseTaskConfiguration')?.normalize?.(copy) || copy; + } +} + +export const _RaiseTaskConfiguration = RaiseTaskConfiguration as RaiseTaskConfigurationConstructor; diff --git a/src/lib/generated/classes/call-grpc-with-service.ts b/src/lib/generated/classes/raise-task-raise-error.ts similarity index 52% rename from src/lib/generated/classes/call-grpc-with-service.ts rename to src/lib/generated/classes/raise-task-raise-error.ts index 7fee4d79..2e26b48d 100644 --- a/src/lib/generated/classes/call-grpc-with-service.ts +++ b/src/lib/generated/classes/raise-task-raise-error.ts @@ -26,53 +26,53 @@ import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; /** - * Represents the intersection between the CallGRPCWithService class and type + * Represents the intersection between the RaiseTaskRaiseError class and type */ -export type CallGRPCWithServiceIntersection = CallGRPCWithService & Specification.CallGRPCWithService; +export type RaiseTaskRaiseErrorIntersection = RaiseTaskRaiseError & Specification.RaiseTaskRaiseError; /** - * Represents a constructor for the intersection of the CallGRPCWithService class and type + * Represents a constructor for the intersection of the RaiseTaskRaiseError class and type */ -export interface CallGRPCWithServiceConstructor { - new (model?: Partial): CallGRPCWithServiceIntersection; +export interface RaiseTaskRaiseErrorConstructor { + new (model?: Partial): RaiseTaskRaiseErrorIntersection; } /** - * Represents a CallGRPCWithService with methods for validation and normalization. + * Represents a RaiseTaskRaiseError with methods for validation and normalization. * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. */ -export class CallGRPCWithService extends ObjectHydrator { +export class RaiseTaskRaiseError extends ObjectHydrator { /** - * Instanciates a new instance of the CallGRPCWithService class. + * Instanciates a new instance of the RaiseTaskRaiseError class. * Initializes properties based on the provided model if it is an object. * - * @param model - Optional partial model object to initialize the CallGRPCWithService. + * @param model - Optional partial model object to initialize the RaiseTaskRaiseError. */ - constructor(model?: Partial) { + constructor(model?: Partial) { super(model); - getLifecycleHooks('CallGRPCWithService')?.constructor?.(this); + getLifecycleHooks('RaiseTaskRaiseError')?.constructor?.(this); } /** - * Validates the current instance of the CallGRPCWithService. + * Validates the current instance of the RaiseTaskRaiseError. * Throws if invalid. */ validate() { - const copy = new CallGRPCWithService(this as any) as CallGRPCWithServiceIntersection; - validate('CallGRPCWithService', copy); + const copy = new RaiseTaskRaiseError(this as any) as RaiseTaskRaiseErrorIntersection; + validate('RaiseTaskRaiseError', copy); } /** - * Normalizes the current instance of the CallGRPCWithService. - * Creates a copy of the CallGRPCWithService, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the RaiseTaskRaiseError. + * Creates a copy of the RaiseTaskRaiseError, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the CallGRPCWithService instance. + * @returns A normalized version of the RaiseTaskRaiseError instance. */ - normalize(): CallGRPCWithService & Specification.CallGRPCWithService { - const copy = new CallGRPCWithService(this as any) as CallGRPCWithServiceIntersection; - return getLifecycleHooks('CallGRPCWithService')?.normalize?.(copy) || copy; + normalize(): RaiseTaskRaiseError & Specification.RaiseTaskRaiseError { + const copy = new RaiseTaskRaiseError(this as any) as RaiseTaskRaiseErrorIntersection; + return getLifecycleHooks('RaiseTaskRaiseError')?.normalize?.(copy) || copy; } } -export const _CallGRPCWithService = CallGRPCWithService as CallGRPCWithServiceConstructor; +export const _RaiseTaskRaiseError = RaiseTaskRaiseError as RaiseTaskRaiseErrorConstructor; diff --git a/src/lib/generated/classes/raise-task.ts b/src/lib/generated/classes/raise-task.ts index 71da255a..11434444 100644 --- a/src/lib/generated/classes/raise-task.ts +++ b/src/lib/generated/classes/raise-task.ts @@ -23,8 +23,9 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; -import { _RaiseTaskRaise } from './raise-task-raise'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; +import { _RaiseTaskConfiguration } from './raise-task-configuration'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -61,8 +62,9 @@ export class RaiseTask extends _TaskBase { if (typeof model.input === 'object') self.input = new _Input(model.input); if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.export === 'object') self.export = new _Export(model.export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); - if (typeof model.raise === 'object') self.raise = new _RaiseTaskRaise(model.raise); + if (typeof model.timeout === 'object') self.timeout = new _TaskBaseTimeout(model.timeout); + if (typeof model.metadata === 'object') self.metadata = new _TaskMetadata(model.metadata); + if (typeof model.raise === 'object') self.raise = new _RaiseTaskConfiguration(model.raise); } getLifecycleHooks('RaiseTask')?.constructor?.(this); } diff --git a/src/lib/generated/classes/referenceable-authentication-policy.ts b/src/lib/generated/classes/referenceable-authentication-policy.ts new file mode 100644 index 00000000..1cf797e9 --- /dev/null +++ b/src/lib/generated/classes/referenceable-authentication-policy.ts @@ -0,0 +1,114 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _BasicAuthenticationPolicyConfiguration } from './basic-authentication-policy-configuration'; +import { _BearerAuthenticationPolicyConfiguration } from './bearer-authentication-policy-configuration'; +import { _DigestAuthenticationPolicyConfiguration } from './digest-authentication-policy-configuration'; +import { _OAuth2AuthenticationPolicyConfiguration } from './oauth2-authentication-policy-configuration'; +import { _OpenIdConnectAuthenticationPolicyConfiguration } from './open-id-connect-authentication-policy-configuration'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the ReferenceableAuthenticationPolicy class and type + */ +export type ReferenceableAuthenticationPolicyIntersection = ReferenceableAuthenticationPolicy & + Specification.ReferenceableAuthenticationPolicy; + +/** + * Represents a constructor for the intersection of the ReferenceableAuthenticationPolicy class and type + */ +export interface ReferenceableAuthenticationPolicyConstructor { + new (model?: Partial): ReferenceableAuthenticationPolicyIntersection; +} + +/** + * Represents a ReferenceableAuthenticationPolicy with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class ReferenceableAuthenticationPolicy extends ObjectHydrator { + /** + * Instanciates a new instance of the ReferenceableAuthenticationPolicy class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the ReferenceableAuthenticationPolicy. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.ReferenceableAuthenticationPolicy & object; + if (isObject(model)) { + if (typeof (model as Specification.BasicAuthenticationPolicy).basic === 'object') + (self as Specification.BasicAuthenticationPolicy).basic = new _BasicAuthenticationPolicyConfiguration( + (model as Specification.BasicAuthenticationPolicy) + .basic as Specification.BasicAuthenticationPolicyConfiguration, + ); + if (typeof (model as Specification.BearerAuthenticationPolicy).bearer === 'object') + (self as Specification.BearerAuthenticationPolicy).bearer = new _BearerAuthenticationPolicyConfiguration( + (model as Specification.BearerAuthenticationPolicy) + .bearer as Specification.BearerAuthenticationPolicyConfiguration, + ); + if (typeof (model as Specification.DigestAuthenticationPolicy).digest === 'object') + (self as Specification.DigestAuthenticationPolicy).digest = new _DigestAuthenticationPolicyConfiguration( + (model as Specification.DigestAuthenticationPolicy) + .digest as Specification.DigestAuthenticationPolicyConfiguration, + ); + if (typeof (model as Specification.OAuth2AuthenticationPolicy).oauth2 === 'object') + (self as Specification.OAuth2AuthenticationPolicy).oauth2 = new _OAuth2AuthenticationPolicyConfiguration( + (model as Specification.OAuth2AuthenticationPolicy) + .oauth2 as Specification.OAuth2AuthenticationPolicyConfiguration, + ); + if (typeof (model as Specification.OpenIdConnectAuthenticationPolicy).oidc === 'object') + (self as Specification.OpenIdConnectAuthenticationPolicy).oidc = + new _OpenIdConnectAuthenticationPolicyConfiguration( + (model as Specification.OpenIdConnectAuthenticationPolicy) + .oidc as Specification.OpenIdConnectAuthenticationPolicyConfiguration, + ); + } + getLifecycleHooks('ReferenceableAuthenticationPolicy')?.constructor?.(this); + } + + /** + * Validates the current instance of the ReferenceableAuthenticationPolicy. + * Throws if invalid. + */ + validate() { + const copy = new ReferenceableAuthenticationPolicy(this as any) as ReferenceableAuthenticationPolicyIntersection; + validate('ReferenceableAuthenticationPolicy', copy); + } + + /** + * Normalizes the current instance of the ReferenceableAuthenticationPolicy. + * Creates a copy of the ReferenceableAuthenticationPolicy, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the ReferenceableAuthenticationPolicy instance. + */ + normalize(): ReferenceableAuthenticationPolicy & Specification.ReferenceableAuthenticationPolicy { + const copy = new ReferenceableAuthenticationPolicy(this as any) as ReferenceableAuthenticationPolicyIntersection; + return getLifecycleHooks('ReferenceableAuthenticationPolicy')?.normalize?.(copy) || copy; + } +} + +export const _ReferenceableAuthenticationPolicy = + ReferenceableAuthenticationPolicy as ReferenceableAuthenticationPolicyConstructor; diff --git a/src/lib/generated/classes/retry-backoff.ts b/src/lib/generated/classes/retry-backoff.ts new file mode 100644 index 00000000..cb29d15b --- /dev/null +++ b/src/lib/generated/classes/retry-backoff.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the RetryBackoff class and type + */ +export type RetryBackoffIntersection = RetryBackoff & Specification.RetryBackoff; + +/** + * Represents a constructor for the intersection of the RetryBackoff class and type + */ +export interface RetryBackoffConstructor { + new (model?: Partial): RetryBackoffIntersection; +} + +/** + * Represents a RetryBackoff with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RetryBackoff extends ObjectHydrator { + /** + * Instanciates a new instance of the RetryBackoff class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RetryBackoff. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('RetryBackoff')?.constructor?.(this); + } + + /** + * Validates the current instance of the RetryBackoff. + * Throws if invalid. + */ + validate() { + const copy = new RetryBackoff(this as any) as RetryBackoffIntersection; + validate('RetryBackoff', copy); + } + + /** + * Normalizes the current instance of the RetryBackoff. + * Creates a copy of the RetryBackoff, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RetryBackoff instance. + */ + normalize(): RetryBackoff & Specification.RetryBackoff { + const copy = new RetryBackoff(this as any) as RetryBackoffIntersection; + return getLifecycleHooks('RetryBackoff')?.normalize?.(copy) || copy; + } +} + +export const _RetryBackoff = RetryBackoff as RetryBackoffConstructor; diff --git a/src/lib/generated/classes/retry-limit-attempt.ts b/src/lib/generated/classes/retry-limit-attempt.ts new file mode 100644 index 00000000..67b04719 --- /dev/null +++ b/src/lib/generated/classes/retry-limit-attempt.ts @@ -0,0 +1,83 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _Duration } from './duration'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the RetryLimitAttempt class and type + */ +export type RetryLimitAttemptIntersection = RetryLimitAttempt & Specification.RetryLimitAttempt; + +/** + * Represents a constructor for the intersection of the RetryLimitAttempt class and type + */ +export interface RetryLimitAttemptConstructor { + new (model?: Partial): RetryLimitAttemptIntersection; +} + +/** + * Represents a RetryLimitAttempt with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RetryLimitAttempt extends ObjectHydrator { + /** + * Instanciates a new instance of the RetryLimitAttempt class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RetryLimitAttempt. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.RetryLimitAttempt & object; + if (isObject(model)) { + if (typeof model.duration === 'object') self.duration = new _Duration(model.duration); + } + getLifecycleHooks('RetryLimitAttempt')?.constructor?.(this); + } + + /** + * Validates the current instance of the RetryLimitAttempt. + * Throws if invalid. + */ + validate() { + const copy = new RetryLimitAttempt(this as any) as RetryLimitAttemptIntersection; + validate('RetryLimitAttempt', copy); + } + + /** + * Normalizes the current instance of the RetryLimitAttempt. + * Creates a copy of the RetryLimitAttempt, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RetryLimitAttempt instance. + */ + normalize(): RetryLimitAttempt & Specification.RetryLimitAttempt { + const copy = new RetryLimitAttempt(this as any) as RetryLimitAttemptIntersection; + return getLifecycleHooks('RetryLimitAttempt')?.normalize?.(copy) || copy; + } +} + +export const _RetryLimitAttempt = RetryLimitAttempt as RetryLimitAttemptConstructor; diff --git a/src/lib/generated/classes/retry-policy-limit.ts b/src/lib/generated/classes/retry-limit.ts similarity index 50% rename from src/lib/generated/classes/retry-policy-limit.ts rename to src/lib/generated/classes/retry-limit.ts index 7f349abe..b0864cb5 100644 --- a/src/lib/generated/classes/retry-policy-limit.ts +++ b/src/lib/generated/classes/retry-limit.ts @@ -20,7 +20,7 @@ * *****************************************************************************************/ -import { _RetryPolicyLimitAttempt } from './retry-policy-limit-attempt'; +import { _RetryLimitAttempt } from './retry-limit-attempt'; import { _Duration } from './duration'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; @@ -29,57 +29,57 @@ import { validate } from '../../validation'; import { isObject } from '../../utils'; /** - * Represents the intersection between the RetryPolicyLimit class and type + * Represents the intersection between the RetryLimit class and type */ -export type RetryPolicyLimitIntersection = RetryPolicyLimit & Specification.RetryPolicyLimit; +export type RetryLimitIntersection = RetryLimit & Specification.RetryLimit; /** - * Represents a constructor for the intersection of the RetryPolicyLimit class and type + * Represents a constructor for the intersection of the RetryLimit class and type */ -export interface RetryPolicyLimitConstructor { - new (model?: Partial): RetryPolicyLimitIntersection; +export interface RetryLimitConstructor { + new (model?: Partial): RetryLimitIntersection; } /** - * Represents a RetryPolicyLimit with methods for validation and normalization. + * Represents a RetryLimit with methods for validation and normalization. * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. */ -export class RetryPolicyLimit extends ObjectHydrator { +export class RetryLimit extends ObjectHydrator { /** - * Instanciates a new instance of the RetryPolicyLimit class. + * Instanciates a new instance of the RetryLimit class. * Initializes properties based on the provided model if it is an object. * - * @param model - Optional partial model object to initialize the RetryPolicyLimit. + * @param model - Optional partial model object to initialize the RetryLimit. */ - constructor(model?: Partial) { + constructor(model?: Partial) { super(model); - const self = this as unknown as Specification.RetryPolicyLimit & object; + const self = this as unknown as Specification.RetryLimit & object; if (isObject(model)) { - if (typeof model.attempt === 'object') self.attempt = new _RetryPolicyLimitAttempt(model.attempt); + if (typeof model.attempt === 'object') self.attempt = new _RetryLimitAttempt(model.attempt); if (typeof model.duration === 'object') self.duration = new _Duration(model.duration); } - getLifecycleHooks('RetryPolicyLimit')?.constructor?.(this); + getLifecycleHooks('RetryLimit')?.constructor?.(this); } /** - * Validates the current instance of the RetryPolicyLimit. + * Validates the current instance of the RetryLimit. * Throws if invalid. */ validate() { - const copy = new RetryPolicyLimit(this as any) as RetryPolicyLimitIntersection; - validate('RetryPolicyLimit', copy); + const copy = new RetryLimit(this as any) as RetryLimitIntersection; + validate('RetryLimit', copy); } /** - * Normalizes the current instance of the RetryPolicyLimit. - * Creates a copy of the RetryPolicyLimit, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the RetryLimit. + * Creates a copy of the RetryLimit, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the RetryPolicyLimit instance. + * @returns A normalized version of the RetryLimit instance. */ - normalize(): RetryPolicyLimit & Specification.RetryPolicyLimit { - const copy = new RetryPolicyLimit(this as any) as RetryPolicyLimitIntersection; - return getLifecycleHooks('RetryPolicyLimit')?.normalize?.(copy) || copy; + normalize(): RetryLimit & Specification.RetryLimit { + const copy = new RetryLimit(this as any) as RetryLimitIntersection; + return getLifecycleHooks('RetryLimit')?.normalize?.(copy) || copy; } } -export const _RetryPolicyLimit = RetryPolicyLimit as RetryPolicyLimitConstructor; +export const _RetryLimit = RetryLimit as RetryLimitConstructor; diff --git a/src/lib/generated/classes/retry-policy-limit-attempt.ts b/src/lib/generated/classes/retry-policy-limit-attempt.ts deleted file mode 100644 index c828d7cc..00000000 --- a/src/lib/generated/classes/retry-policy-limit-attempt.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { _Duration } from './duration'; -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; -import { isObject } from '../../utils'; - -/** - * Represents the intersection between the RetryPolicyLimitAttempt class and type - */ -export type RetryPolicyLimitAttemptIntersection = RetryPolicyLimitAttempt & Specification.RetryPolicyLimitAttempt; - -/** - * Represents a constructor for the intersection of the RetryPolicyLimitAttempt class and type - */ -export interface RetryPolicyLimitAttemptConstructor { - new (model?: Partial): RetryPolicyLimitAttemptIntersection; -} - -/** - * Represents a RetryPolicyLimitAttempt with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class RetryPolicyLimitAttempt extends ObjectHydrator { - /** - * Instanciates a new instance of the RetryPolicyLimitAttempt class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the RetryPolicyLimitAttempt. - */ - constructor(model?: Partial) { - super(model); - const self = this as unknown as Specification.RetryPolicyLimitAttempt & object; - if (isObject(model)) { - if (typeof model.duration === 'object') self.duration = new _Duration(model.duration); - } - getLifecycleHooks('RetryPolicyLimitAttempt')?.constructor?.(this); - } - - /** - * Validates the current instance of the RetryPolicyLimitAttempt. - * Throws if invalid. - */ - validate() { - const copy = new RetryPolicyLimitAttempt(this as any) as RetryPolicyLimitAttemptIntersection; - validate('RetryPolicyLimitAttempt', copy); - } - - /** - * Normalizes the current instance of the RetryPolicyLimitAttempt. - * Creates a copy of the RetryPolicyLimitAttempt, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the RetryPolicyLimitAttempt instance. - */ - normalize(): RetryPolicyLimitAttempt & Specification.RetryPolicyLimitAttempt { - const copy = new RetryPolicyLimitAttempt(this as any) as RetryPolicyLimitAttemptIntersection; - return getLifecycleHooks('RetryPolicyLimitAttempt')?.normalize?.(copy) || copy; - } -} - -export const _RetryPolicyLimitAttempt = RetryPolicyLimitAttempt as RetryPolicyLimitAttemptConstructor; diff --git a/src/lib/generated/classes/retry-policy.ts b/src/lib/generated/classes/retry-policy.ts index dee6fd4d..894c54e1 100644 --- a/src/lib/generated/classes/retry-policy.ts +++ b/src/lib/generated/classes/retry-policy.ts @@ -21,7 +21,8 @@ *****************************************************************************************/ import { _Duration } from './duration'; -import { _RetryPolicyLimit } from './retry-policy-limit'; +import { _RetryBackoff } from './retry-backoff'; +import { _RetryLimit } from './retry-limit'; import { _RetryPolicyJitter } from './retry-policy-jitter'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; @@ -57,7 +58,8 @@ export class RetryPolicy extends ObjectHydrator { const self = this as unknown as Specification.RetryPolicy & object; if (isObject(model)) { if (typeof model.delay === 'object') self.delay = new _Duration(model.delay); - if (typeof model.limit === 'object') self.limit = new _RetryPolicyLimit(model.limit); + if (typeof model.backoff === 'object') self.backoff = new _RetryBackoff(model.backoff); + if (typeof model.limit === 'object') self.limit = new _RetryLimit(model.limit); if (typeof model.jitter === 'object') self.jitter = new _RetryPolicyJitter(model.jitter); } getLifecycleHooks('RetryPolicy')?.constructor?.(this); diff --git a/src/lib/generated/classes/fork-task-fork.ts b/src/lib/generated/classes/run-container.ts similarity index 53% rename from src/lib/generated/classes/fork-task-fork.ts rename to src/lib/generated/classes/run-container.ts index 79e0c02c..bbf010e3 100644 --- a/src/lib/generated/classes/fork-task-fork.ts +++ b/src/lib/generated/classes/run-container.ts @@ -20,7 +20,7 @@ * *****************************************************************************************/ -import { _TaskList } from './task-list'; +import { _Container } from './container'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -28,56 +28,56 @@ import { validate } from '../../validation'; import { isObject } from '../../utils'; /** - * Represents the intersection between the ForkTaskFork class and type + * Represents the intersection between the RunContainer class and type */ -export type ForkTaskForkIntersection = ForkTaskFork & Specification.ForkTaskFork; +export type RunContainerIntersection = RunContainer & Specification.RunContainer; /** - * Represents a constructor for the intersection of the ForkTaskFork class and type + * Represents a constructor for the intersection of the RunContainer class and type */ -export interface ForkTaskForkConstructor { - new (model?: Partial): ForkTaskForkIntersection; +export interface RunContainerConstructor { + new (model?: Partial): RunContainerIntersection; } /** - * Represents a ForkTaskFork with methods for validation and normalization. + * Represents a RunContainer with methods for validation and normalization. * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. */ -export class ForkTaskFork extends ObjectHydrator { +export class RunContainer extends ObjectHydrator { /** - * Instanciates a new instance of the ForkTaskFork class. + * Instanciates a new instance of the RunContainer class. * Initializes properties based on the provided model if it is an object. * - * @param model - Optional partial model object to initialize the ForkTaskFork. + * @param model - Optional partial model object to initialize the RunContainer. */ - constructor(model?: Partial) { + constructor(model?: Partial) { super(model); - const self = this as unknown as Specification.ForkTaskFork & object; + const self = this as unknown as Specification.RunContainer & object; if (isObject(model)) { - if (typeof model.branches === 'object') self.branches = new _TaskList(model.branches); + if (typeof model.container === 'object') self.container = new _Container(model.container); } - getLifecycleHooks('ForkTaskFork')?.constructor?.(this); + getLifecycleHooks('RunContainer')?.constructor?.(this); } /** - * Validates the current instance of the ForkTaskFork. + * Validates the current instance of the RunContainer. * Throws if invalid. */ validate() { - const copy = new ForkTaskFork(this as any) as ForkTaskForkIntersection; - validate('ForkTaskFork', copy); + const copy = new RunContainer(this as any) as RunContainerIntersection; + validate('RunContainer', copy); } /** - * Normalizes the current instance of the ForkTaskFork. - * Creates a copy of the ForkTaskFork, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the RunContainer. + * Creates a copy of the RunContainer, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the ForkTaskFork instance. + * @returns A normalized version of the RunContainer instance. */ - normalize(): ForkTaskFork & Specification.ForkTaskFork { - const copy = new ForkTaskFork(this as any) as ForkTaskForkIntersection; - return getLifecycleHooks('ForkTaskFork')?.normalize?.(copy) || copy; + normalize(): RunContainer & Specification.RunContainer { + const copy = new RunContainer(this as any) as RunContainerIntersection; + return getLifecycleHooks('RunContainer')?.normalize?.(copy) || copy; } } -export const _ForkTaskFork = ForkTaskFork as ForkTaskForkConstructor; +export const _RunContainer = RunContainer as RunContainerConstructor; diff --git a/src/lib/generated/classes/run-script.ts b/src/lib/generated/classes/run-script.ts new file mode 100644 index 00000000..e2d4a4c4 --- /dev/null +++ b/src/lib/generated/classes/run-script.ts @@ -0,0 +1,83 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _Script } from './script'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the RunScript class and type + */ +export type RunScriptIntersection = RunScript & Specification.RunScript; + +/** + * Represents a constructor for the intersection of the RunScript class and type + */ +export interface RunScriptConstructor { + new (model?: Partial): RunScriptIntersection; +} + +/** + * Represents a RunScript with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RunScript extends ObjectHydrator { + /** + * Instanciates a new instance of the RunScript class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RunScript. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.RunScript & object; + if (isObject(model)) { + if (typeof model.script === 'object') self.script = new _Script(model.script); + } + getLifecycleHooks('RunScript')?.constructor?.(this); + } + + /** + * Validates the current instance of the RunScript. + * Throws if invalid. + */ + validate() { + const copy = new RunScript(this as any) as RunScriptIntersection; + validate('RunScript', copy); + } + + /** + * Normalizes the current instance of the RunScript. + * Creates a copy of the RunScript, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RunScript instance. + */ + normalize(): RunScript & Specification.RunScript { + const copy = new RunScript(this as any) as RunScriptIntersection; + return getLifecycleHooks('RunScript')?.normalize?.(copy) || copy; + } +} + +export const _RunScript = RunScript as RunScriptConstructor; diff --git a/src/lib/generated/classes/run-shell.ts b/src/lib/generated/classes/run-shell.ts new file mode 100644 index 00000000..a08b0145 --- /dev/null +++ b/src/lib/generated/classes/run-shell.ts @@ -0,0 +1,83 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _Shell } from './shell'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the RunShell class and type + */ +export type RunShellIntersection = RunShell & Specification.RunShell; + +/** + * Represents a constructor for the intersection of the RunShell class and type + */ +export interface RunShellConstructor { + new (model?: Partial): RunShellIntersection; +} + +/** + * Represents a RunShell with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RunShell extends ObjectHydrator { + /** + * Instanciates a new instance of the RunShell class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RunShell. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.RunShell & object; + if (isObject(model)) { + if (typeof model.shell === 'object') self.shell = new _Shell(model.shell); + } + getLifecycleHooks('RunShell')?.constructor?.(this); + } + + /** + * Validates the current instance of the RunShell. + * Throws if invalid. + */ + validate() { + const copy = new RunShell(this as any) as RunShellIntersection; + validate('RunShell', copy); + } + + /** + * Normalizes the current instance of the RunShell. + * Creates a copy of the RunShell, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RunShell instance. + */ + normalize(): RunShell & Specification.RunShell { + const copy = new RunShell(this as any) as RunShellIntersection; + return getLifecycleHooks('RunShell')?.normalize?.(copy) || copy; + } +} + +export const _RunShell = RunShell as RunShellConstructor; diff --git a/src/lib/generated/classes/run-task-configuration.ts b/src/lib/generated/classes/run-task-configuration.ts new file mode 100644 index 00000000..9d2ed080 --- /dev/null +++ b/src/lib/generated/classes/run-task-configuration.ts @@ -0,0 +1,101 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _Container } from './container'; +import { _Script } from './script'; +import { _Shell } from './shell'; +import { _SubflowConfiguration } from './subflow-configuration'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the RunTaskConfiguration class and type + */ +export type RunTaskConfigurationIntersection = RunTaskConfiguration & Specification.RunTaskConfiguration; + +/** + * Represents a constructor for the intersection of the RunTaskConfiguration class and type + */ +export interface RunTaskConfigurationConstructor { + new (model?: Partial): RunTaskConfigurationIntersection; +} + +/** + * Represents a RunTaskConfiguration with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RunTaskConfiguration extends ObjectHydrator { + /** + * Instanciates a new instance of the RunTaskConfiguration class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RunTaskConfiguration. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.RunTaskConfiguration & object; + if (isObject(model)) { + if (typeof (model as Specification.RunContainer).container === 'object') + (self as Specification.RunContainer).container = new _Container( + (model as Specification.RunContainer).container as Specification.Container, + ); + if (typeof (model as Specification.RunScript).script === 'object') + (self as Specification.RunScript).script = new _Script( + (model as Specification.RunScript).script as Specification.Script, + ); + if (typeof (model as Specification.RunShell).shell === 'object') + (self as Specification.RunShell).shell = new _Shell( + (model as Specification.RunShell).shell as Specification.Shell, + ); + if (typeof (model as Specification.RunWorkflow).workflow === 'object') + (self as Specification.RunWorkflow).workflow = new _SubflowConfiguration( + (model as Specification.RunWorkflow).workflow as Specification.SubflowConfiguration, + ); + } + getLifecycleHooks('RunTaskConfiguration')?.constructor?.(this); + } + + /** + * Validates the current instance of the RunTaskConfiguration. + * Throws if invalid. + */ + validate() { + const copy = new RunTaskConfiguration(this as any) as RunTaskConfigurationIntersection; + validate('RunTaskConfiguration', copy); + } + + /** + * Normalizes the current instance of the RunTaskConfiguration. + * Creates a copy of the RunTaskConfiguration, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RunTaskConfiguration instance. + */ + normalize(): RunTaskConfiguration & Specification.RunTaskConfiguration { + const copy = new RunTaskConfiguration(this as any) as RunTaskConfigurationIntersection; + return getLifecycleHooks('RunTaskConfiguration')?.normalize?.(copy) || copy; + } +} + +export const _RunTaskConfiguration = RunTaskConfiguration as RunTaskConfigurationConstructor; diff --git a/src/lib/generated/classes/run-task-run-script.ts b/src/lib/generated/classes/run-task-run-script.ts deleted file mode 100644 index 4833706b..00000000 --- a/src/lib/generated/classes/run-task-run-script.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; - -/** - * Represents the intersection between the RunTaskRunScript class and type - */ -export type RunTaskRunScriptIntersection = RunTaskRunScript & Specification.RunTaskRunScript; - -/** - * Represents a constructor for the intersection of the RunTaskRunScript class and type - */ -export interface RunTaskRunScriptConstructor { - new (model?: Partial): RunTaskRunScriptIntersection; -} - -/** - * Represents a RunTaskRunScript with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class RunTaskRunScript extends ObjectHydrator { - /** - * Instanciates a new instance of the RunTaskRunScript class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the RunTaskRunScript. - */ - constructor(model?: Partial) { - super(model); - - getLifecycleHooks('RunTaskRunScript')?.constructor?.(this); - } - - /** - * Validates the current instance of the RunTaskRunScript. - * Throws if invalid. - */ - validate() { - const copy = new RunTaskRunScript(this as any) as RunTaskRunScriptIntersection; - validate('RunTaskRunScript', copy); - } - - /** - * Normalizes the current instance of the RunTaskRunScript. - * Creates a copy of the RunTaskRunScript, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the RunTaskRunScript instance. - */ - normalize(): RunTaskRunScript & Specification.RunTaskRunScript { - const copy = new RunTaskRunScript(this as any) as RunTaskRunScriptIntersection; - return getLifecycleHooks('RunTaskRunScript')?.normalize?.(copy) || copy; - } -} - -export const _RunTaskRunScript = RunTaskRunScript as RunTaskRunScriptConstructor; diff --git a/src/lib/generated/classes/run-task-run-shell-arguments.ts b/src/lib/generated/classes/run-task-run-shell-arguments.ts deleted file mode 100644 index 0b7142f1..00000000 --- a/src/lib/generated/classes/run-task-run-shell-arguments.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; - -/** - * Represents the intersection between the RunTaskRunShellArguments class and type - */ -export type RunTaskRunShellArgumentsIntersection = RunTaskRunShellArguments & Specification.RunTaskRunShellArguments; - -/** - * Represents a constructor for the intersection of the RunTaskRunShellArguments class and type - */ -export interface RunTaskRunShellArgumentsConstructor { - new (model?: Partial): RunTaskRunShellArgumentsIntersection; -} - -/** - * Represents a RunTaskRunShellArguments with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class RunTaskRunShellArguments extends ObjectHydrator { - /** - * Instanciates a new instance of the RunTaskRunShellArguments class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the RunTaskRunShellArguments. - */ - constructor(model?: Partial) { - super(model); - - getLifecycleHooks('RunTaskRunShellArguments')?.constructor?.(this); - } - - /** - * Validates the current instance of the RunTaskRunShellArguments. - * Throws if invalid. - */ - validate() { - const copy = new RunTaskRunShellArguments(this as any) as RunTaskRunShellArgumentsIntersection; - validate('RunTaskRunShellArguments', copy); - } - - /** - * Normalizes the current instance of the RunTaskRunShellArguments. - * Creates a copy of the RunTaskRunShellArguments, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the RunTaskRunShellArguments instance. - */ - normalize(): RunTaskRunShellArguments & Specification.RunTaskRunShellArguments { - const copy = new RunTaskRunShellArguments(this as any) as RunTaskRunShellArgumentsIntersection; - return getLifecycleHooks('RunTaskRunShellArguments')?.normalize?.(copy) || copy; - } -} - -export const _RunTaskRunShellArguments = RunTaskRunShellArguments as RunTaskRunShellArgumentsConstructor; diff --git a/src/lib/generated/classes/run-task-run-shell-environment.ts b/src/lib/generated/classes/run-task-run-shell-environment.ts deleted file mode 100644 index 68e3db7a..00000000 --- a/src/lib/generated/classes/run-task-run-shell-environment.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; - -/** - * Represents the intersection between the RunTaskRunShellEnvironment class and type - */ -export type RunTaskRunShellEnvironmentIntersection = RunTaskRunShellEnvironment & - Specification.RunTaskRunShellEnvironment; - -/** - * Represents a constructor for the intersection of the RunTaskRunShellEnvironment class and type - */ -export interface RunTaskRunShellEnvironmentConstructor { - new (model?: Partial): RunTaskRunShellEnvironmentIntersection; -} - -/** - * Represents a RunTaskRunShellEnvironment with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class RunTaskRunShellEnvironment extends ObjectHydrator { - /** - * Instanciates a new instance of the RunTaskRunShellEnvironment class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the RunTaskRunShellEnvironment. - */ - constructor(model?: Partial) { - super(model); - - getLifecycleHooks('RunTaskRunShellEnvironment')?.constructor?.(this); - } - - /** - * Validates the current instance of the RunTaskRunShellEnvironment. - * Throws if invalid. - */ - validate() { - const copy = new RunTaskRunShellEnvironment(this as any) as RunTaskRunShellEnvironmentIntersection; - validate('RunTaskRunShellEnvironment', copy); - } - - /** - * Normalizes the current instance of the RunTaskRunShellEnvironment. - * Creates a copy of the RunTaskRunShellEnvironment, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the RunTaskRunShellEnvironment instance. - */ - normalize(): RunTaskRunShellEnvironment & Specification.RunTaskRunShellEnvironment { - const copy = new RunTaskRunShellEnvironment(this as any) as RunTaskRunShellEnvironmentIntersection; - return getLifecycleHooks('RunTaskRunShellEnvironment')?.normalize?.(copy) || copy; - } -} - -export const _RunTaskRunShellEnvironment = RunTaskRunShellEnvironment as RunTaskRunShellEnvironmentConstructor; diff --git a/src/lib/generated/classes/run-task-run-shell.ts b/src/lib/generated/classes/run-task-run-shell.ts deleted file mode 100644 index fb35dd6f..00000000 --- a/src/lib/generated/classes/run-task-run-shell.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { _RunTaskRunShellArguments } from './run-task-run-shell-arguments'; -import { _RunTaskRunShellEnvironment } from './run-task-run-shell-environment'; -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; -import { isObject } from '../../utils'; - -/** - * Represents the intersection between the RunTaskRunShell class and type - */ -export type RunTaskRunShellIntersection = RunTaskRunShell & Specification.RunTaskRunShell; - -/** - * Represents a constructor for the intersection of the RunTaskRunShell class and type - */ -export interface RunTaskRunShellConstructor { - new (model?: Partial): RunTaskRunShellIntersection; -} - -/** - * Represents a RunTaskRunShell with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class RunTaskRunShell extends ObjectHydrator { - /** - * Instanciates a new instance of the RunTaskRunShell class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the RunTaskRunShell. - */ - constructor(model?: Partial) { - super(model); - const self = this as unknown as Specification.RunTaskRunShell & object; - if (isObject(model)) { - if (typeof model.arguments === 'object') self.arguments = new _RunTaskRunShellArguments(model.arguments); - if (typeof model.environment === 'object') self.environment = new _RunTaskRunShellEnvironment(model.environment); - } - getLifecycleHooks('RunTaskRunShell')?.constructor?.(this); - } - - /** - * Validates the current instance of the RunTaskRunShell. - * Throws if invalid. - */ - validate() { - const copy = new RunTaskRunShell(this as any) as RunTaskRunShellIntersection; - validate('RunTaskRunShell', copy); - } - - /** - * Normalizes the current instance of the RunTaskRunShell. - * Creates a copy of the RunTaskRunShell, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the RunTaskRunShell instance. - */ - normalize(): RunTaskRunShell & Specification.RunTaskRunShell { - const copy = new RunTaskRunShell(this as any) as RunTaskRunShellIntersection; - return getLifecycleHooks('RunTaskRunShell')?.normalize?.(copy) || copy; - } -} - -export const _RunTaskRunShell = RunTaskRunShell as RunTaskRunShellConstructor; diff --git a/src/lib/generated/classes/run-task-run-workflow-input.ts b/src/lib/generated/classes/run-task-run-workflow-input.ts deleted file mode 100644 index 9b04812d..00000000 --- a/src/lib/generated/classes/run-task-run-workflow-input.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; - -/** - * Represents the intersection between the RunTaskRunWorkflowInput class and type - */ -export type RunTaskRunWorkflowInputIntersection = RunTaskRunWorkflowInput & Specification.RunTaskRunWorkflowInput; - -/** - * Represents a constructor for the intersection of the RunTaskRunWorkflowInput class and type - */ -export interface RunTaskRunWorkflowInputConstructor { - new (model?: Partial): RunTaskRunWorkflowInputIntersection; -} - -/** - * Represents a RunTaskRunWorkflowInput with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class RunTaskRunWorkflowInput extends ObjectHydrator { - /** - * Instanciates a new instance of the RunTaskRunWorkflowInput class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the RunTaskRunWorkflowInput. - */ - constructor(model?: Partial) { - super(model); - - getLifecycleHooks('RunTaskRunWorkflowInput')?.constructor?.(this); - } - - /** - * Validates the current instance of the RunTaskRunWorkflowInput. - * Throws if invalid. - */ - validate() { - const copy = new RunTaskRunWorkflowInput(this as any) as RunTaskRunWorkflowInputIntersection; - validate('RunTaskRunWorkflowInput', copy); - } - - /** - * Normalizes the current instance of the RunTaskRunWorkflowInput. - * Creates a copy of the RunTaskRunWorkflowInput, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the RunTaskRunWorkflowInput instance. - */ - normalize(): RunTaskRunWorkflowInput & Specification.RunTaskRunWorkflowInput { - const copy = new RunTaskRunWorkflowInput(this as any) as RunTaskRunWorkflowInputIntersection; - return getLifecycleHooks('RunTaskRunWorkflowInput')?.normalize?.(copy) || copy; - } -} - -export const _RunTaskRunWorkflowInput = RunTaskRunWorkflowInput as RunTaskRunWorkflowInputConstructor; diff --git a/src/lib/generated/classes/run-task-run-workflow.ts b/src/lib/generated/classes/run-task-run-workflow.ts deleted file mode 100644 index 817bd914..00000000 --- a/src/lib/generated/classes/run-task-run-workflow.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { _RunTaskRunWorkflowInput } from './run-task-run-workflow-input'; -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; -import { isObject } from '../../utils'; - -/** - * Represents the intersection between the RunTaskRunWorkflow class and type - */ -export type RunTaskRunWorkflowIntersection = RunTaskRunWorkflow & Specification.RunTaskRunWorkflow; - -/** - * Represents a constructor for the intersection of the RunTaskRunWorkflow class and type - */ -export interface RunTaskRunWorkflowConstructor { - new (model?: Partial): RunTaskRunWorkflowIntersection; -} - -/** - * Represents a RunTaskRunWorkflow with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class RunTaskRunWorkflow extends ObjectHydrator { - /** - * Instanciates a new instance of the RunTaskRunWorkflow class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the RunTaskRunWorkflow. - */ - constructor(model?: Partial) { - super(model); - const self = this as unknown as Specification.RunTaskRunWorkflow & object; - if (isObject(model)) { - if (typeof model.input === 'object') self.input = new _RunTaskRunWorkflowInput(model.input); - } - getLifecycleHooks('RunTaskRunWorkflow')?.constructor?.(this); - } - - /** - * Validates the current instance of the RunTaskRunWorkflow. - * Throws if invalid. - */ - validate() { - const copy = new RunTaskRunWorkflow(this as any) as RunTaskRunWorkflowIntersection; - validate('RunTaskRunWorkflow', copy); - } - - /** - * Normalizes the current instance of the RunTaskRunWorkflow. - * Creates a copy of the RunTaskRunWorkflow, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the RunTaskRunWorkflow instance. - */ - normalize(): RunTaskRunWorkflow & Specification.RunTaskRunWorkflow { - const copy = new RunTaskRunWorkflow(this as any) as RunTaskRunWorkflowIntersection; - return getLifecycleHooks('RunTaskRunWorkflow')?.normalize?.(copy) || copy; - } -} - -export const _RunTaskRunWorkflow = RunTaskRunWorkflow as RunTaskRunWorkflowConstructor; diff --git a/src/lib/generated/classes/run-task-run.ts b/src/lib/generated/classes/run-task-run.ts deleted file mode 100644 index 88e34913..00000000 --- a/src/lib/generated/classes/run-task-run.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2021-Present The Serverless Workflow Specification Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/***************************************************************************************** - * - * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ - * - *****************************************************************************************/ - -import { _RunTaskRunContainer } from './run-task-run-container'; -import { _RunTaskRunShell } from './run-task-run-shell'; -import { _RunTaskRunWorkflow } from './run-task-run-workflow'; -import { ObjectHydrator } from '../../hydrator'; -import { Specification } from '../definitions'; -import { getLifecycleHooks } from '../../lifecycle-hooks'; -import { validate } from '../../validation'; -import { isObject } from '../../utils'; - -/** - * Represents the intersection between the RunTaskRun class and type - */ -export type RunTaskRunIntersection = RunTaskRun & Specification.RunTaskRun; - -/** - * Represents a constructor for the intersection of the RunTaskRun class and type - */ -export interface RunTaskRunConstructor { - new (model?: Partial): RunTaskRunIntersection; -} - -/** - * Represents a RunTaskRun with methods for validation and normalization. - * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. - */ -export class RunTaskRun extends ObjectHydrator { - /** - * Instanciates a new instance of the RunTaskRun class. - * Initializes properties based on the provided model if it is an object. - * - * @param model - Optional partial model object to initialize the RunTaskRun. - */ - constructor(model?: Partial) { - super(model); - const self = this as unknown as Specification.RunTaskRun & object; - if (isObject(model)) { - if ( - typeof (model as { [k: string]: unknown; container: Specification.RunTaskRunContainer }).container === 'object' - ) - (self as { [k: string]: unknown; container: Specification.RunTaskRunContainer }).container = - new _RunTaskRunContainer( - (model as { [k: string]: unknown; container: Specification.RunTaskRunContainer }) - .container as Specification.RunTaskRunContainer, - ); - if (typeof (model as { [k: string]: unknown; shell: Specification.RunTaskRunShell }).shell === 'object') - (self as { [k: string]: unknown; shell: Specification.RunTaskRunShell }).shell = new _RunTaskRunShell( - (model as { [k: string]: unknown; shell: Specification.RunTaskRunShell }) - .shell as Specification.RunTaskRunShell, - ); - if (typeof (model as { [k: string]: unknown; workflow: Specification.RunTaskRunWorkflow }).workflow === 'object') - (self as { [k: string]: unknown; workflow: Specification.RunTaskRunWorkflow }).workflow = - new _RunTaskRunWorkflow( - (model as { [k: string]: unknown; workflow: Specification.RunTaskRunWorkflow }) - .workflow as Specification.RunTaskRunWorkflow, - ); - } - getLifecycleHooks('RunTaskRun')?.constructor?.(this); - } - - /** - * Validates the current instance of the RunTaskRun. - * Throws if invalid. - */ - validate() { - const copy = new RunTaskRun(this as any) as RunTaskRunIntersection; - validate('RunTaskRun', copy); - } - - /** - * Normalizes the current instance of the RunTaskRun. - * Creates a copy of the RunTaskRun, invokes normalization hooks if available, and returns the normalized copy. - * - * @returns A normalized version of the RunTaskRun instance. - */ - normalize(): RunTaskRun & Specification.RunTaskRun { - const copy = new RunTaskRun(this as any) as RunTaskRunIntersection; - return getLifecycleHooks('RunTaskRun')?.normalize?.(copy) || copy; - } -} - -export const _RunTaskRun = RunTaskRun as RunTaskRunConstructor; diff --git a/src/lib/generated/classes/run-task.ts b/src/lib/generated/classes/run-task.ts index e4945747..95b0b41e 100644 --- a/src/lib/generated/classes/run-task.ts +++ b/src/lib/generated/classes/run-task.ts @@ -23,7 +23,9 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; +import { _RunTaskConfiguration } from './run-task-configuration'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -60,7 +62,9 @@ export class RunTask extends _TaskBase { if (typeof model.input === 'object') self.input = new _Input(model.input); if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.export === 'object') self.export = new _Export(model.export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.timeout === 'object') self.timeout = new _TaskBaseTimeout(model.timeout); + if (typeof model.metadata === 'object') self.metadata = new _TaskMetadata(model.metadata); + if (typeof model.run === 'object') self.run = new _RunTaskConfiguration(model.run); } getLifecycleHooks('RunTask')?.constructor?.(this); } diff --git a/src/lib/generated/classes/run-workflow.ts b/src/lib/generated/classes/run-workflow.ts new file mode 100644 index 00000000..9c12c719 --- /dev/null +++ b/src/lib/generated/classes/run-workflow.ts @@ -0,0 +1,83 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _SubflowConfiguration } from './subflow-configuration'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the RunWorkflow class and type + */ +export type RunWorkflowIntersection = RunWorkflow & Specification.RunWorkflow; + +/** + * Represents a constructor for the intersection of the RunWorkflow class and type + */ +export interface RunWorkflowConstructor { + new (model?: Partial): RunWorkflowIntersection; +} + +/** + * Represents a RunWorkflow with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RunWorkflow extends ObjectHydrator { + /** + * Instanciates a new instance of the RunWorkflow class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RunWorkflow. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.RunWorkflow & object; + if (isObject(model)) { + if (typeof model.workflow === 'object') self.workflow = new _SubflowConfiguration(model.workflow); + } + getLifecycleHooks('RunWorkflow')?.constructor?.(this); + } + + /** + * Validates the current instance of the RunWorkflow. + * Throws if invalid. + */ + validate() { + const copy = new RunWorkflow(this as any) as RunWorkflowIntersection; + validate('RunWorkflow', copy); + } + + /** + * Normalizes the current instance of the RunWorkflow. + * Creates a copy of the RunWorkflow, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RunWorkflow instance. + */ + normalize(): RunWorkflow & Specification.RunWorkflow { + const copy = new RunWorkflow(this as any) as RunWorkflowIntersection; + return getLifecycleHooks('RunWorkflow')?.normalize?.(copy) || copy; + } +} + +export const _RunWorkflow = RunWorkflow as RunWorkflowConstructor; diff --git a/src/lib/generated/classes/runtime-expression.ts b/src/lib/generated/classes/runtime-expression.ts new file mode 100644 index 00000000..c7dff28d --- /dev/null +++ b/src/lib/generated/classes/runtime-expression.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the RuntimeExpression class and type + */ +export type RuntimeExpressionIntersection = RuntimeExpression & Specification.RuntimeExpression; + +/** + * Represents a constructor for the intersection of the RuntimeExpression class and type + */ +export interface RuntimeExpressionConstructor { + new (model?: Partial): RuntimeExpressionIntersection; +} + +/** + * Represents a RuntimeExpression with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class RuntimeExpression extends ObjectHydrator { + /** + * Instanciates a new instance of the RuntimeExpression class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the RuntimeExpression. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('RuntimeExpression')?.constructor?.(this); + } + + /** + * Validates the current instance of the RuntimeExpression. + * Throws if invalid. + */ + validate() { + const copy = new RuntimeExpression(this as any) as RuntimeExpressionIntersection; + validate('RuntimeExpression', copy); + } + + /** + * Normalizes the current instance of the RuntimeExpression. + * Creates a copy of the RuntimeExpression, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the RuntimeExpression instance. + */ + normalize(): RuntimeExpression & Specification.RuntimeExpression { + const copy = new RuntimeExpression(this as any) as RuntimeExpressionIntersection; + return getLifecycleHooks('RuntimeExpression')?.normalize?.(copy) || copy; + } +} + +export const _RuntimeExpression = RuntimeExpression as RuntimeExpressionConstructor; diff --git a/src/lib/generated/classes/schedule.ts b/src/lib/generated/classes/schedule.ts index 3d9a4bc4..c9b5f08f 100644 --- a/src/lib/generated/classes/schedule.ts +++ b/src/lib/generated/classes/schedule.ts @@ -21,6 +21,7 @@ *****************************************************************************************/ import { _Duration } from './duration'; +import { _EventConsumptionStrategy } from './event-consumption-strategy'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -56,6 +57,7 @@ export class Schedule extends ObjectHydrator { if (isObject(model)) { if (typeof model.every === 'object') self.every = new _Duration(model.every); if (typeof model.after === 'object') self.after = new _Duration(model.after); + if (typeof model.on === 'object') self.on = new _EventConsumptionStrategy(model.on); } getLifecycleHooks('Schedule')?.constructor?.(this); } diff --git a/src/lib/generated/classes/schema-external.ts b/src/lib/generated/classes/schema-external.ts new file mode 100644 index 00000000..26b91477 --- /dev/null +++ b/src/lib/generated/classes/schema-external.ts @@ -0,0 +1,83 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _ExternalResource } from './external-resource'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the SchemaExternal class and type + */ +export type SchemaExternalIntersection = SchemaExternal & Specification.SchemaExternal; + +/** + * Represents a constructor for the intersection of the SchemaExternal class and type + */ +export interface SchemaExternalConstructor { + new (model?: Partial): SchemaExternalIntersection; +} + +/** + * Represents a SchemaExternal with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class SchemaExternal extends ObjectHydrator { + /** + * Instanciates a new instance of the SchemaExternal class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the SchemaExternal. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.SchemaExternal & object; + if (isObject(model)) { + if (typeof model.resource === 'object') self.resource = new _ExternalResource(model.resource); + } + getLifecycleHooks('SchemaExternal')?.constructor?.(this); + } + + /** + * Validates the current instance of the SchemaExternal. + * Throws if invalid. + */ + validate() { + const copy = new SchemaExternal(this as any) as SchemaExternalIntersection; + validate('SchemaExternal', copy); + } + + /** + * Normalizes the current instance of the SchemaExternal. + * Creates a copy of the SchemaExternal, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the SchemaExternal instance. + */ + normalize(): SchemaExternal & Specification.SchemaExternal { + const copy = new SchemaExternal(this as any) as SchemaExternalIntersection; + return getLifecycleHooks('SchemaExternal')?.normalize?.(copy) || copy; + } +} + +export const _SchemaExternal = SchemaExternal as SchemaExternalConstructor; diff --git a/src/lib/generated/classes/schema-inline.ts b/src/lib/generated/classes/schema-inline.ts new file mode 100644 index 00000000..21c91018 --- /dev/null +++ b/src/lib/generated/classes/schema-inline.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the SchemaInline class and type + */ +export type SchemaInlineIntersection = SchemaInline & Specification.SchemaInline; + +/** + * Represents a constructor for the intersection of the SchemaInline class and type + */ +export interface SchemaInlineConstructor { + new (model?: Partial): SchemaInlineIntersection; +} + +/** + * Represents a SchemaInline with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class SchemaInline extends ObjectHydrator { + /** + * Instanciates a new instance of the SchemaInline class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the SchemaInline. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('SchemaInline')?.constructor?.(this); + } + + /** + * Validates the current instance of the SchemaInline. + * Throws if invalid. + */ + validate() { + const copy = new SchemaInline(this as any) as SchemaInlineIntersection; + validate('SchemaInline', copy); + } + + /** + * Normalizes the current instance of the SchemaInline. + * Creates a copy of the SchemaInline, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the SchemaInline instance. + */ + normalize(): SchemaInline & Specification.SchemaInline { + const copy = new SchemaInline(this as any) as SchemaInlineIntersection; + return getLifecycleHooks('SchemaInline')?.normalize?.(copy) || copy; + } +} + +export const _SchemaInline = SchemaInline as SchemaInlineConstructor; diff --git a/src/lib/generated/classes/schema.ts b/src/lib/generated/classes/schema.ts index 6c88ad7b..f7b85885 100644 --- a/src/lib/generated/classes/schema.ts +++ b/src/lib/generated/classes/schema.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ +import { _ExternalResource } from './external-resource'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; +import { isObject } from '../../utils'; /** * Represents the intersection between the Schema class and type @@ -50,7 +52,13 @@ export class Schema extends ObjectHydrator { */ constructor(model?: Partial) { super(model); - + const self = this as unknown as Specification.Schema & object; + if (isObject(model)) { + if (typeof (model as Specification.SchemaExternal).resource === 'object') + (self as Specification.SchemaExternal).resource = new _ExternalResource( + (model as Specification.SchemaExternal).resource as Specification.ExternalResource, + ); + } getLifecycleHooks('Schema')?.constructor?.(this); } diff --git a/src/lib/generated/classes/script.ts b/src/lib/generated/classes/script.ts new file mode 100644 index 00000000..29522a10 --- /dev/null +++ b/src/lib/generated/classes/script.ts @@ -0,0 +1,86 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _ExternalResource } from './external-resource'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the Script class and type + */ +export type ScriptIntersection = Script & Specification.Script; + +/** + * Represents a constructor for the intersection of the Script class and type + */ +export interface ScriptConstructor { + new (model?: Partial): ScriptIntersection; +} + +/** + * Represents a Script with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Script extends ObjectHydrator { + /** + * Instanciates a new instance of the Script class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Script. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.Script & object; + if (isObject(model)) { + if (typeof (model as Specification.ExternalScript).source === 'object') + (self as Specification.ExternalScript).source = new _ExternalResource( + (model as Specification.ExternalScript).source as Specification.ExternalResource, + ); + } + getLifecycleHooks('Script')?.constructor?.(this); + } + + /** + * Validates the current instance of the Script. + * Throws if invalid. + */ + validate() { + const copy = new Script(this as any) as ScriptIntersection; + validate('Script', copy); + } + + /** + * Normalizes the current instance of the Script. + * Creates a copy of the Script, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Script instance. + */ + normalize(): Script & Specification.Script { + const copy = new Script(this as any) as ScriptIntersection; + return getLifecycleHooks('Script')?.normalize?.(copy) || copy; + } +} + +export const _Script = Script as ScriptConstructor; diff --git a/src/lib/generated/classes/secret-based-authentication-policy.ts b/src/lib/generated/classes/secret-based-authentication-policy.ts new file mode 100644 index 00000000..89e68a2a --- /dev/null +++ b/src/lib/generated/classes/secret-based-authentication-policy.ts @@ -0,0 +1,80 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the SecretBasedAuthenticationPolicy class and type + */ +export type SecretBasedAuthenticationPolicyIntersection = SecretBasedAuthenticationPolicy & + Specification.SecretBasedAuthenticationPolicy; + +/** + * Represents a constructor for the intersection of the SecretBasedAuthenticationPolicy class and type + */ +export interface SecretBasedAuthenticationPolicyConstructor { + new (model?: Partial): SecretBasedAuthenticationPolicyIntersection; +} + +/** + * Represents a SecretBasedAuthenticationPolicy with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class SecretBasedAuthenticationPolicy extends ObjectHydrator { + /** + * Instanciates a new instance of the SecretBasedAuthenticationPolicy class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the SecretBasedAuthenticationPolicy. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('SecretBasedAuthenticationPolicy')?.constructor?.(this); + } + + /** + * Validates the current instance of the SecretBasedAuthenticationPolicy. + * Throws if invalid. + */ + validate() { + const copy = new SecretBasedAuthenticationPolicy(this as any) as SecretBasedAuthenticationPolicyIntersection; + validate('SecretBasedAuthenticationPolicy', copy); + } + + /** + * Normalizes the current instance of the SecretBasedAuthenticationPolicy. + * Creates a copy of the SecretBasedAuthenticationPolicy, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the SecretBasedAuthenticationPolicy instance. + */ + normalize(): SecretBasedAuthenticationPolicy & Specification.SecretBasedAuthenticationPolicy { + const copy = new SecretBasedAuthenticationPolicy(this as any) as SecretBasedAuthenticationPolicyIntersection; + return getLifecycleHooks('SecretBasedAuthenticationPolicy')?.normalize?.(copy) || copy; + } +} + +export const _SecretBasedAuthenticationPolicy = + SecretBasedAuthenticationPolicy as SecretBasedAuthenticationPolicyConstructor; diff --git a/src/lib/generated/classes/set-task-configuration.ts b/src/lib/generated/classes/set-task-configuration.ts new file mode 100644 index 00000000..042832d1 --- /dev/null +++ b/src/lib/generated/classes/set-task-configuration.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the SetTaskConfiguration class and type + */ +export type SetTaskConfigurationIntersection = SetTaskConfiguration & Specification.SetTaskConfiguration; + +/** + * Represents a constructor for the intersection of the SetTaskConfiguration class and type + */ +export interface SetTaskConfigurationConstructor { + new (model?: Partial): SetTaskConfigurationIntersection; +} + +/** + * Represents a SetTaskConfiguration with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class SetTaskConfiguration extends ObjectHydrator { + /** + * Instanciates a new instance of the SetTaskConfiguration class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the SetTaskConfiguration. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('SetTaskConfiguration')?.constructor?.(this); + } + + /** + * Validates the current instance of the SetTaskConfiguration. + * Throws if invalid. + */ + validate() { + const copy = new SetTaskConfiguration(this as any) as SetTaskConfigurationIntersection; + validate('SetTaskConfiguration', copy); + } + + /** + * Normalizes the current instance of the SetTaskConfiguration. + * Creates a copy of the SetTaskConfiguration, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the SetTaskConfiguration instance. + */ + normalize(): SetTaskConfiguration & Specification.SetTaskConfiguration { + const copy = new SetTaskConfiguration(this as any) as SetTaskConfigurationIntersection; + return getLifecycleHooks('SetTaskConfiguration')?.normalize?.(copy) || copy; + } +} + +export const _SetTaskConfiguration = SetTaskConfiguration as SetTaskConfigurationConstructor; diff --git a/src/lib/generated/classes/set-task.ts b/src/lib/generated/classes/set-task.ts index a82a6b1b..8fd559ff 100644 --- a/src/lib/generated/classes/set-task.ts +++ b/src/lib/generated/classes/set-task.ts @@ -23,8 +23,9 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; -import { _SetTaskSet } from './set-task-set'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; +import { _SetTaskConfiguration } from './set-task-configuration'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -61,8 +62,9 @@ export class SetTask extends _TaskBase { if (typeof model.input === 'object') self.input = new _Input(model.input); if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.export === 'object') self.export = new _Export(model.export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); - if (typeof model.set === 'object') self.set = new _SetTaskSet(model.set); + if (typeof model.timeout === 'object') self.timeout = new _TaskBaseTimeout(model.timeout); + if (typeof model.metadata === 'object') self.metadata = new _TaskMetadata(model.metadata); + if (typeof model.set === 'object') self.set = new _SetTaskConfiguration(model.set); } getLifecycleHooks('SetTask')?.constructor?.(this); } diff --git a/src/lib/generated/classes/shell-arguments.ts b/src/lib/generated/classes/shell-arguments.ts new file mode 100644 index 00000000..7792d936 --- /dev/null +++ b/src/lib/generated/classes/shell-arguments.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the ShellArguments class and type + */ +export type ShellArgumentsIntersection = ShellArguments & Specification.ShellArguments; + +/** + * Represents a constructor for the intersection of the ShellArguments class and type + */ +export interface ShellArgumentsConstructor { + new (model?: Partial): ShellArgumentsIntersection; +} + +/** + * Represents a ShellArguments with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class ShellArguments extends ObjectHydrator { + /** + * Instanciates a new instance of the ShellArguments class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the ShellArguments. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('ShellArguments')?.constructor?.(this); + } + + /** + * Validates the current instance of the ShellArguments. + * Throws if invalid. + */ + validate() { + const copy = new ShellArguments(this as any) as ShellArgumentsIntersection; + validate('ShellArguments', copy); + } + + /** + * Normalizes the current instance of the ShellArguments. + * Creates a copy of the ShellArguments, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the ShellArguments instance. + */ + normalize(): ShellArguments & Specification.ShellArguments { + const copy = new ShellArguments(this as any) as ShellArgumentsIntersection; + return getLifecycleHooks('ShellArguments')?.normalize?.(copy) || copy; + } +} + +export const _ShellArguments = ShellArguments as ShellArgumentsConstructor; diff --git a/src/lib/generated/classes/call-async-api-with.ts b/src/lib/generated/classes/shell-environment.ts similarity index 53% rename from src/lib/generated/classes/call-async-api-with.ts rename to src/lib/generated/classes/shell-environment.ts index 5f5bf036..37b70dd9 100644 --- a/src/lib/generated/classes/call-async-api-with.ts +++ b/src/lib/generated/classes/shell-environment.ts @@ -26,53 +26,53 @@ import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; /** - * Represents the intersection between the CallAsyncAPIWith class and type + * Represents the intersection between the ShellEnvironment class and type */ -export type CallAsyncAPIWithIntersection = CallAsyncAPIWith & Specification.CallAsyncAPIWith; +export type ShellEnvironmentIntersection = ShellEnvironment & Specification.ShellEnvironment; /** - * Represents a constructor for the intersection of the CallAsyncAPIWith class and type + * Represents a constructor for the intersection of the ShellEnvironment class and type */ -export interface CallAsyncAPIWithConstructor { - new (model?: Partial): CallAsyncAPIWithIntersection; +export interface ShellEnvironmentConstructor { + new (model?: Partial): ShellEnvironmentIntersection; } /** - * Represents a CallAsyncAPIWith with methods for validation and normalization. + * Represents a ShellEnvironment with methods for validation and normalization. * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. */ -export class CallAsyncAPIWith extends ObjectHydrator { +export class ShellEnvironment extends ObjectHydrator { /** - * Instanciates a new instance of the CallAsyncAPIWith class. + * Instanciates a new instance of the ShellEnvironment class. * Initializes properties based on the provided model if it is an object. * - * @param model - Optional partial model object to initialize the CallAsyncAPIWith. + * @param model - Optional partial model object to initialize the ShellEnvironment. */ - constructor(model?: Partial) { + constructor(model?: Partial) { super(model); - getLifecycleHooks('CallAsyncAPIWith')?.constructor?.(this); + getLifecycleHooks('ShellEnvironment')?.constructor?.(this); } /** - * Validates the current instance of the CallAsyncAPIWith. + * Validates the current instance of the ShellEnvironment. * Throws if invalid. */ validate() { - const copy = new CallAsyncAPIWith(this as any) as CallAsyncAPIWithIntersection; - validate('CallAsyncAPIWith', copy); + const copy = new ShellEnvironment(this as any) as ShellEnvironmentIntersection; + validate('ShellEnvironment', copy); } /** - * Normalizes the current instance of the CallAsyncAPIWith. - * Creates a copy of the CallAsyncAPIWith, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the ShellEnvironment. + * Creates a copy of the ShellEnvironment, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the CallAsyncAPIWith instance. + * @returns A normalized version of the ShellEnvironment instance. */ - normalize(): CallAsyncAPIWith & Specification.CallAsyncAPIWith { - const copy = new CallAsyncAPIWith(this as any) as CallAsyncAPIWithIntersection; - return getLifecycleHooks('CallAsyncAPIWith')?.normalize?.(copy) || copy; + normalize(): ShellEnvironment & Specification.ShellEnvironment { + const copy = new ShellEnvironment(this as any) as ShellEnvironmentIntersection; + return getLifecycleHooks('ShellEnvironment')?.normalize?.(copy) || copy; } } -export const _CallAsyncAPIWith = CallAsyncAPIWith as CallAsyncAPIWithConstructor; +export const _ShellEnvironment = ShellEnvironment as ShellEnvironmentConstructor; diff --git a/src/lib/generated/classes/shell.ts b/src/lib/generated/classes/shell.ts new file mode 100644 index 00000000..0372c544 --- /dev/null +++ b/src/lib/generated/classes/shell.ts @@ -0,0 +1,85 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _ShellArguments } from './shell-arguments'; +import { _ShellEnvironment } from './shell-environment'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the Shell class and type + */ +export type ShellIntersection = Shell & Specification.Shell; + +/** + * Represents a constructor for the intersection of the Shell class and type + */ +export interface ShellConstructor { + new (model?: Partial): ShellIntersection; +} + +/** + * Represents a Shell with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Shell extends ObjectHydrator { + /** + * Instanciates a new instance of the Shell class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Shell. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.Shell & object; + if (isObject(model)) { + if (typeof model.arguments === 'object') self.arguments = new _ShellArguments(model.arguments); + if (typeof model.environment === 'object') self.environment = new _ShellEnvironment(model.environment); + } + getLifecycleHooks('Shell')?.constructor?.(this); + } + + /** + * Validates the current instance of the Shell. + * Throws if invalid. + */ + validate() { + const copy = new Shell(this as any) as ShellIntersection; + validate('Shell', copy); + } + + /** + * Normalizes the current instance of the Shell. + * Creates a copy of the Shell, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Shell instance. + */ + normalize(): Shell & Specification.Shell { + const copy = new Shell(this as any) as ShellIntersection; + return getLifecycleHooks('Shell')?.normalize?.(copy) || copy; + } +} + +export const _Shell = Shell as ShellConstructor; diff --git a/src/lib/generated/classes/subflow-configuration.ts b/src/lib/generated/classes/subflow-configuration.ts new file mode 100644 index 00000000..ba6dd6c2 --- /dev/null +++ b/src/lib/generated/classes/subflow-configuration.ts @@ -0,0 +1,83 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _SubflowInput } from './subflow-input'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the SubflowConfiguration class and type + */ +export type SubflowConfigurationIntersection = SubflowConfiguration & Specification.SubflowConfiguration; + +/** + * Represents a constructor for the intersection of the SubflowConfiguration class and type + */ +export interface SubflowConfigurationConstructor { + new (model?: Partial): SubflowConfigurationIntersection; +} + +/** + * Represents a SubflowConfiguration with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class SubflowConfiguration extends ObjectHydrator { + /** + * Instanciates a new instance of the SubflowConfiguration class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the SubflowConfiguration. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.SubflowConfiguration & object; + if (isObject(model)) { + if (typeof model.input === 'object') self.input = new _SubflowInput(model.input); + } + getLifecycleHooks('SubflowConfiguration')?.constructor?.(this); + } + + /** + * Validates the current instance of the SubflowConfiguration. + * Throws if invalid. + */ + validate() { + const copy = new SubflowConfiguration(this as any) as SubflowConfigurationIntersection; + validate('SubflowConfiguration', copy); + } + + /** + * Normalizes the current instance of the SubflowConfiguration. + * Creates a copy of the SubflowConfiguration, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the SubflowConfiguration instance. + */ + normalize(): SubflowConfiguration & Specification.SubflowConfiguration { + const copy = new SubflowConfiguration(this as any) as SubflowConfigurationIntersection; + return getLifecycleHooks('SubflowConfiguration')?.normalize?.(copy) || copy; + } +} + +export const _SubflowConfiguration = SubflowConfiguration as SubflowConfigurationConstructor; diff --git a/src/lib/generated/classes/subflow-input.ts b/src/lib/generated/classes/subflow-input.ts new file mode 100644 index 00000000..596d4e64 --- /dev/null +++ b/src/lib/generated/classes/subflow-input.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the SubflowInput class and type + */ +export type SubflowInputIntersection = SubflowInput & Specification.SubflowInput; + +/** + * Represents a constructor for the intersection of the SubflowInput class and type + */ +export interface SubflowInputConstructor { + new (model?: Partial): SubflowInputIntersection; +} + +/** + * Represents a SubflowInput with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class SubflowInput extends ObjectHydrator { + /** + * Instanciates a new instance of the SubflowInput class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the SubflowInput. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('SubflowInput')?.constructor?.(this); + } + + /** + * Validates the current instance of the SubflowInput. + * Throws if invalid. + */ + validate() { + const copy = new SubflowInput(this as any) as SubflowInputIntersection; + validate('SubflowInput', copy); + } + + /** + * Normalizes the current instance of the SubflowInput. + * Creates a copy of the SubflowInput, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the SubflowInput instance. + */ + normalize(): SubflowInput & Specification.SubflowInput { + const copy = new SubflowInput(this as any) as SubflowInputIntersection; + return getLifecycleHooks('SubflowInput')?.normalize?.(copy) || copy; + } +} + +export const _SubflowInput = SubflowInput as SubflowInputConstructor; diff --git a/src/lib/generated/classes/for-task-for.ts b/src/lib/generated/classes/switch-case.ts similarity index 56% rename from src/lib/generated/classes/for-task-for.ts rename to src/lib/generated/classes/switch-case.ts index c41d6acb..fe467af5 100644 --- a/src/lib/generated/classes/for-task-for.ts +++ b/src/lib/generated/classes/switch-case.ts @@ -26,53 +26,53 @@ import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; /** - * Represents the intersection between the ForTaskFor class and type + * Represents the intersection between the SwitchCase class and type */ -export type ForTaskForIntersection = ForTaskFor & Specification.ForTaskFor; +export type SwitchCaseIntersection = SwitchCase & Specification.SwitchCase; /** - * Represents a constructor for the intersection of the ForTaskFor class and type + * Represents a constructor for the intersection of the SwitchCase class and type */ -export interface ForTaskForConstructor { - new (model?: Partial): ForTaskForIntersection; +export interface SwitchCaseConstructor { + new (model?: Partial): SwitchCaseIntersection; } /** - * Represents a ForTaskFor with methods for validation and normalization. + * Represents a SwitchCase with methods for validation and normalization. * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. */ -export class ForTaskFor extends ObjectHydrator { +export class SwitchCase extends ObjectHydrator { /** - * Instanciates a new instance of the ForTaskFor class. + * Instanciates a new instance of the SwitchCase class. * Initializes properties based on the provided model if it is an object. * - * @param model - Optional partial model object to initialize the ForTaskFor. + * @param model - Optional partial model object to initialize the SwitchCase. */ - constructor(model?: Partial) { + constructor(model?: Partial) { super(model); - getLifecycleHooks('ForTaskFor')?.constructor?.(this); + getLifecycleHooks('SwitchCase')?.constructor?.(this); } /** - * Validates the current instance of the ForTaskFor. + * Validates the current instance of the SwitchCase. * Throws if invalid. */ validate() { - const copy = new ForTaskFor(this as any) as ForTaskForIntersection; - validate('ForTaskFor', copy); + const copy = new SwitchCase(this as any) as SwitchCaseIntersection; + validate('SwitchCase', copy); } /** - * Normalizes the current instance of the ForTaskFor. - * Creates a copy of the ForTaskFor, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the SwitchCase. + * Creates a copy of the SwitchCase, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the ForTaskFor instance. + * @returns A normalized version of the SwitchCase instance. */ - normalize(): ForTaskFor & Specification.ForTaskFor { - const copy = new ForTaskFor(this as any) as ForTaskForIntersection; - return getLifecycleHooks('ForTaskFor')?.normalize?.(copy) || copy; + normalize(): SwitchCase & Specification.SwitchCase { + const copy = new SwitchCase(this as any) as SwitchCaseIntersection; + return getLifecycleHooks('SwitchCase')?.normalize?.(copy) || copy; } } -export const _ForTaskFor = ForTaskFor as ForTaskForConstructor; +export const _SwitchCase = SwitchCase as SwitchCaseConstructor; diff --git a/src/lib/generated/classes/switch-item.ts b/src/lib/generated/classes/switch-item.ts new file mode 100644 index 00000000..f9f97a50 --- /dev/null +++ b/src/lib/generated/classes/switch-item.ts @@ -0,0 +1,88 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _SwitchCase } from './switch-case'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the SwitchItem class and type + */ +export type SwitchItemIntersection = SwitchItem & Specification.SwitchItem; + +/** + * Represents a constructor for the intersection of the SwitchItem class and type + */ +export interface SwitchItemConstructor { + new (model?: Partial): SwitchItemIntersection; +} + +/** + * Represents a SwitchItem with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class SwitchItem extends ObjectHydrator { + /** + * Instanciates a new instance of the SwitchItem class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the SwitchItem. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.SwitchItem & object; + if (isObject(model)) { + const knownProperties: string[] = []; + Object.entries(model) + .filter(([key]) => !knownProperties.includes(key)) + .forEach(([key, value]) => { + self[key] = new _SwitchCase(value); + }); + } + getLifecycleHooks('SwitchItem')?.constructor?.(this); + } + + /** + * Validates the current instance of the SwitchItem. + * Throws if invalid. + */ + validate() { + const copy = new SwitchItem(this as any) as SwitchItemIntersection; + validate('SwitchItem', copy); + } + + /** + * Normalizes the current instance of the SwitchItem. + * Creates a copy of the SwitchItem, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the SwitchItem instance. + */ + normalize(): SwitchItem & Specification.SwitchItem { + const copy = new SwitchItem(this as any) as SwitchItemIntersection; + return getLifecycleHooks('SwitchItem')?.normalize?.(copy) || copy; + } +} + +export const _SwitchItem = SwitchItem as SwitchItemConstructor; diff --git a/src/lib/generated/classes/switch-task-switch.ts b/src/lib/generated/classes/switch-task-configuration.ts similarity index 50% rename from src/lib/generated/classes/switch-task-switch.ts rename to src/lib/generated/classes/switch-task-configuration.ts index ffe23bea..acb19270 100644 --- a/src/lib/generated/classes/switch-task-switch.ts +++ b/src/lib/generated/classes/switch-task-configuration.ts @@ -20,57 +20,53 @@ * *****************************************************************************************/ -import { _SwitchTaskSwitchCase } from './switch-task-switch-case'; +import { _SwitchItem } from './switch-item'; import { Specification } from '../definitions'; import { ArrayHydrator } from '../../hydrator'; import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; /** - * Represents a collection of { [k: string]: Specification.SwitchTaskSwitchCase; }. + * Represents a collection of Specification.SwitchItem. * Inherits from ArrayHydrator to handle array-specific hydration. */ -export class SwitchTaskSwitch extends ArrayHydrator<{ [k: string]: Specification.SwitchTaskSwitchCase }> { +export class SwitchTaskConfiguration extends ArrayHydrator { /** - * Constructs a new instance of the SwitchTaskSwitch class. + * Constructs a new instance of the SwitchTaskConfiguration class. * * @param model - Optional parameter which can be an array of objects or a number representing the array length. */ - constructor(model?: Array<{ [k: string]: Specification.SwitchTaskSwitchCase }> | number) { + constructor(model?: Array | number) { super(model); if (Array.isArray(model)) { if (model?.length) { this.splice(0, this.length); - model.forEach((item) => - this.push( - Object.fromEntries(Object.entries(item).map(([key, value]) => [key, new _SwitchTaskSwitchCase(value)])), - ), - ); + model.forEach((item) => this.push(new _SwitchItem(item))); } } - Object.setPrototypeOf(this, Object.create(SwitchTaskSwitch.prototype)); - getLifecycleHooks('SwitchTaskSwitch')?.constructor?.(this); + Object.setPrototypeOf(this, Object.create(SwitchTaskConfiguration.prototype)); + getLifecycleHooks('SwitchTaskConfiguration')?.constructor?.(this); } /** - * Validates the current instance of the SwitchTaskSwitch. + * Validates the current instance of the SwitchTaskConfiguration. * Throws if invalid. */ validate() { - const copy = new SwitchTaskSwitch(this); - validate('SwitchTaskSwitch', copy); + const copy = new SwitchTaskConfiguration(this); + validate('SwitchTaskConfiguration', copy); } /** - * Normalizes the current instance of the SwitchTaskSwitch. - * Creates a copy of the SwitchTaskSwitch, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the SwitchTaskConfiguration. + * Creates a copy of the SwitchTaskConfiguration, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the SwitchTaskSwitch instance. + * @returns A normalized version of the SwitchTaskConfiguration instance. */ - normalize(): SwitchTaskSwitch { - const copy = new SwitchTaskSwitch(this); - return getLifecycleHooks('SwitchTaskSwitch')?.normalize?.(copy) || copy; + normalize(): SwitchTaskConfiguration { + const copy = new SwitchTaskConfiguration(this); + return getLifecycleHooks('SwitchTaskConfiguration')?.normalize?.(copy) || copy; } } -export const _SwitchTaskSwitch = SwitchTaskSwitch; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes +export const _SwitchTaskConfiguration = SwitchTaskConfiguration; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes diff --git a/src/lib/generated/classes/switch-task.ts b/src/lib/generated/classes/switch-task.ts index 12becff0..49db068f 100644 --- a/src/lib/generated/classes/switch-task.ts +++ b/src/lib/generated/classes/switch-task.ts @@ -23,8 +23,9 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; -import { _SwitchTaskSwitch } from './switch-task-switch'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; +import { _SwitchTaskConfiguration } from './switch-task-configuration'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -61,9 +62,10 @@ export class SwitchTask extends _TaskBase { if (typeof model.input === 'object') self.input = new _Input(model.input); if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.export === 'object') self.export = new _Export(model.export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.timeout === 'object') self.timeout = new _TaskBaseTimeout(model.timeout); + if (typeof model.metadata === 'object') self.metadata = new _TaskMetadata(model.metadata); if (typeof model.switch === 'object') - self.switch = new _SwitchTaskSwitch(model.switch) as unknown as Specification.SwitchTaskSwitch; + self.switch = new _SwitchTaskConfiguration(model.switch) as unknown as Specification.SwitchTaskConfiguration; } getLifecycleHooks('SwitchTask')?.constructor?.(this); } diff --git a/src/lib/generated/classes/set-task-set.ts b/src/lib/generated/classes/task-base-if.ts similarity index 56% rename from src/lib/generated/classes/set-task-set.ts rename to src/lib/generated/classes/task-base-if.ts index dd494903..03b59d1e 100644 --- a/src/lib/generated/classes/set-task-set.ts +++ b/src/lib/generated/classes/task-base-if.ts @@ -26,53 +26,53 @@ import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; /** - * Represents the intersection between the SetTaskSet class and type + * Represents the intersection between the TaskBaseIf class and type */ -export type SetTaskSetIntersection = SetTaskSet & Specification.SetTaskSet; +export type TaskBaseIfIntersection = TaskBaseIf & Specification.TaskBaseIf; /** - * Represents a constructor for the intersection of the SetTaskSet class and type + * Represents a constructor for the intersection of the TaskBaseIf class and type */ -export interface SetTaskSetConstructor { - new (model?: Partial): SetTaskSetIntersection; +export interface TaskBaseIfConstructor { + new (model?: Partial): TaskBaseIfIntersection; } /** - * Represents a SetTaskSet with methods for validation and normalization. + * Represents a TaskBaseIf with methods for validation and normalization. * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. */ -export class SetTaskSet extends ObjectHydrator { +export class TaskBaseIf extends ObjectHydrator { /** - * Instanciates a new instance of the SetTaskSet class. + * Instanciates a new instance of the TaskBaseIf class. * Initializes properties based on the provided model if it is an object. * - * @param model - Optional partial model object to initialize the SetTaskSet. + * @param model - Optional partial model object to initialize the TaskBaseIf. */ - constructor(model?: Partial) { + constructor(model?: Partial) { super(model); - getLifecycleHooks('SetTaskSet')?.constructor?.(this); + getLifecycleHooks('TaskBaseIf')?.constructor?.(this); } /** - * Validates the current instance of the SetTaskSet. + * Validates the current instance of the TaskBaseIf. * Throws if invalid. */ validate() { - const copy = new SetTaskSet(this as any) as SetTaskSetIntersection; - validate('SetTaskSet', copy); + const copy = new TaskBaseIf(this as any) as TaskBaseIfIntersection; + validate('TaskBaseIf', copy); } /** - * Normalizes the current instance of the SetTaskSet. - * Creates a copy of the SetTaskSet, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the TaskBaseIf. + * Creates a copy of the TaskBaseIf, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the SetTaskSet instance. + * @returns A normalized version of the TaskBaseIf instance. */ - normalize(): SetTaskSet & Specification.SetTaskSet { - const copy = new SetTaskSet(this as any) as SetTaskSetIntersection; - return getLifecycleHooks('SetTaskSet')?.normalize?.(copy) || copy; + normalize(): TaskBaseIf & Specification.TaskBaseIf { + const copy = new TaskBaseIf(this as any) as TaskBaseIfIntersection; + return getLifecycleHooks('TaskBaseIf')?.normalize?.(copy) || copy; } } -export const _SetTaskSet = SetTaskSet as SetTaskSetConstructor; +export const _TaskBaseIf = TaskBaseIf as TaskBaseIfConstructor; diff --git a/src/lib/generated/classes/task-base-timeout.ts b/src/lib/generated/classes/task-base-timeout.ts new file mode 100644 index 00000000..fac8faff --- /dev/null +++ b/src/lib/generated/classes/task-base-timeout.ts @@ -0,0 +1,86 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _Duration } from './duration'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the TaskBaseTimeout class and type + */ +export type TaskBaseTimeoutIntersection = TaskBaseTimeout & Specification.TaskBaseTimeout; + +/** + * Represents a constructor for the intersection of the TaskBaseTimeout class and type + */ +export interface TaskBaseTimeoutConstructor { + new (model?: Partial): TaskBaseTimeoutIntersection; +} + +/** + * Represents a TaskBaseTimeout with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class TaskBaseTimeout extends ObjectHydrator { + /** + * Instanciates a new instance of the TaskBaseTimeout class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the TaskBaseTimeout. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.TaskBaseTimeout & object; + if (isObject(model)) { + if (typeof (model as Specification.Timeout).after === 'object') + (self as Specification.Timeout).after = new _Duration( + (model as Specification.Timeout).after as Specification.Duration, + ); + } + getLifecycleHooks('TaskBaseTimeout')?.constructor?.(this); + } + + /** + * Validates the current instance of the TaskBaseTimeout. + * Throws if invalid. + */ + validate() { + const copy = new TaskBaseTimeout(this as any) as TaskBaseTimeoutIntersection; + validate('TaskBaseTimeout', copy); + } + + /** + * Normalizes the current instance of the TaskBaseTimeout. + * Creates a copy of the TaskBaseTimeout, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the TaskBaseTimeout instance. + */ + normalize(): TaskBaseTimeout & Specification.TaskBaseTimeout { + const copy = new TaskBaseTimeout(this as any) as TaskBaseTimeoutIntersection; + return getLifecycleHooks('TaskBaseTimeout')?.normalize?.(copy) || copy; + } +} + +export const _TaskBaseTimeout = TaskBaseTimeout as TaskBaseTimeoutConstructor; diff --git a/src/lib/generated/classes/task-base.ts b/src/lib/generated/classes/task-base.ts index 5059c163..a94724e2 100644 --- a/src/lib/generated/classes/task-base.ts +++ b/src/lib/generated/classes/task-base.ts @@ -23,7 +23,8 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -60,7 +61,8 @@ export class TaskBase extends ObjectHydrator { if (typeof model.input === 'object') self.input = new _Input(model.input); if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.export === 'object') self.export = new _Export(model.export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.timeout === 'object') self.timeout = new _TaskBaseTimeout(model.timeout); + if (typeof model.metadata === 'object') self.metadata = new _TaskMetadata(model.metadata); } getLifecycleHooks('TaskBase')?.constructor?.(this); } diff --git a/src/lib/generated/classes/task-item.ts b/src/lib/generated/classes/task-item.ts new file mode 100644 index 00000000..f34ea66b --- /dev/null +++ b/src/lib/generated/classes/task-item.ts @@ -0,0 +1,88 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _Task } from './task'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the TaskItem class and type + */ +export type TaskItemIntersection = TaskItem & Specification.TaskItem; + +/** + * Represents a constructor for the intersection of the TaskItem class and type + */ +export interface TaskItemConstructor { + new (model?: Partial): TaskItemIntersection; +} + +/** + * Represents a TaskItem with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class TaskItem extends ObjectHydrator { + /** + * Instanciates a new instance of the TaskItem class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the TaskItem. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.TaskItem & object; + if (isObject(model)) { + const knownProperties: string[] = []; + Object.entries(model) + .filter(([key]) => !knownProperties.includes(key)) + .forEach(([key, value]) => { + self[key] = new _Task(value); + }); + } + getLifecycleHooks('TaskItem')?.constructor?.(this); + } + + /** + * Validates the current instance of the TaskItem. + * Throws if invalid. + */ + validate() { + const copy = new TaskItem(this as any) as TaskItemIntersection; + validate('TaskItem', copy); + } + + /** + * Normalizes the current instance of the TaskItem. + * Creates a copy of the TaskItem, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the TaskItem instance. + */ + normalize(): TaskItem & Specification.TaskItem { + const copy = new TaskItem(this as any) as TaskItemIntersection; + return getLifecycleHooks('TaskItem')?.normalize?.(copy) || copy; + } +} + +export const _TaskItem = TaskItem as TaskItemConstructor; diff --git a/src/lib/generated/classes/task-list.ts b/src/lib/generated/classes/task-list.ts index 36fe5c36..69ef9ac0 100644 --- a/src/lib/generated/classes/task-list.ts +++ b/src/lib/generated/classes/task-list.ts @@ -20,30 +20,28 @@ * *****************************************************************************************/ -import { _Task } from './task'; +import { _TaskItem } from './task-item'; import { Specification } from '../definitions'; import { ArrayHydrator } from '../../hydrator'; import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; /** - * Represents a collection of { [k: string]: Specification.Task; }. + * Represents a collection of Specification.TaskItem. * Inherits from ArrayHydrator to handle array-specific hydration. */ -export class TaskList extends ArrayHydrator<{ [k: string]: Specification.Task }> { +export class TaskList extends ArrayHydrator { /** * Constructs a new instance of the TaskList class. * * @param model - Optional parameter which can be an array of objects or a number representing the array length. */ - constructor(model?: Array<{ [k: string]: Specification.Task }> | number) { + constructor(model?: Array | number) { super(model); if (Array.isArray(model)) { if (model?.length) { this.splice(0, this.length); - model.forEach((item) => - this.push(Object.fromEntries(Object.entries(item).map(([key, value]) => [key, new _Task(value)]))), - ); + model.forEach((item) => this.push(new _TaskItem(item))); } } Object.setPrototypeOf(this, Object.create(TaskList.prototype)); diff --git a/src/lib/generated/classes/task-metadata.ts b/src/lib/generated/classes/task-metadata.ts new file mode 100644 index 00000000..9da2b651 --- /dev/null +++ b/src/lib/generated/classes/task-metadata.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the TaskMetadata class and type + */ +export type TaskMetadataIntersection = TaskMetadata & Specification.TaskMetadata; + +/** + * Represents a constructor for the intersection of the TaskMetadata class and type + */ +export interface TaskMetadataConstructor { + new (model?: Partial): TaskMetadataIntersection; +} + +/** + * Represents a TaskMetadata with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class TaskMetadata extends ObjectHydrator { + /** + * Instanciates a new instance of the TaskMetadata class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the TaskMetadata. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('TaskMetadata')?.constructor?.(this); + } + + /** + * Validates the current instance of the TaskMetadata. + * Throws if invalid. + */ + validate() { + const copy = new TaskMetadata(this as any) as TaskMetadataIntersection; + validate('TaskMetadata', copy); + } + + /** + * Normalizes the current instance of the TaskMetadata. + * Creates a copy of the TaskMetadata, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the TaskMetadata instance. + */ + normalize(): TaskMetadata & Specification.TaskMetadata { + const copy = new TaskMetadata(this as any) as TaskMetadataIntersection; + return getLifecycleHooks('TaskMetadata')?.normalize?.(copy) || copy; + } +} + +export const _TaskMetadata = TaskMetadata as TaskMetadataConstructor; diff --git a/src/lib/generated/classes/task.ts b/src/lib/generated/classes/task.ts index 02682444..3c4ef3ab 100644 --- a/src/lib/generated/classes/task.ts +++ b/src/lib/generated/classes/task.ts @@ -23,14 +23,16 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; -import { _ForkTaskFork } from './fork-task-fork'; -import { _EmitTaskEmit } from './emit-task-emit'; -import { _ForTaskFor } from './for-task-for'; -import { _ListenTaskListen } from './listen-task-listen'; -import { _RaiseTaskRaise } from './raise-task-raise'; -import { _SetTaskSet } from './set-task-set'; -import { _SwitchTaskSwitch } from './switch-task-switch'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; +import { _ForkTaskConfiguration } from './fork-task-configuration'; +import { _EmitTaskConfiguration } from './emit-task-configuration'; +import { _ForTaskConfiguration } from './for-task-configuration'; +import { _ListenTaskConfiguration } from './listen-task-configuration'; +import { _RaiseTaskConfiguration } from './raise-task-configuration'; +import { _RunTaskConfiguration } from './run-task-configuration'; +import { _SetTaskConfiguration } from './set-task-configuration'; +import { _SwitchTaskConfiguration } from './switch-task-configuration'; import { _TaskList } from './task-list'; import { _TryTaskCatch } from './try-task-catch'; import { _Duration } from './duration'; @@ -80,53 +82,84 @@ export class Task extends ObjectHydrator { (model as Specification.TaskBase).export as Specification.Export, ); if (typeof (model as Specification.TaskBase).timeout === 'object') - (self as Specification.TaskBase).timeout = new _Timeout( - (model as Specification.TaskBase).timeout as Specification.Timeout, + (self as Specification.TaskBase).timeout = new _TaskBaseTimeout( + (model as Specification.TaskBase).timeout as Specification.TaskBaseTimeout, ); - if (typeof (model as { [k: string]: unknown; fork?: Specification.ForkTaskFork }).fork === 'object') - (self as { [k: string]: unknown; fork?: Specification.ForkTaskFork }).fork = new _ForkTaskFork( - (model as { [k: string]: unknown; fork?: Specification.ForkTaskFork }).fork as Specification.ForkTaskFork, - ); - if (typeof (model as { [k: string]: unknown; emit?: Specification.EmitTaskEmit }).emit === 'object') - (self as { [k: string]: unknown; emit?: Specification.EmitTaskEmit }).emit = new _EmitTaskEmit( - (model as { [k: string]: unknown; emit?: Specification.EmitTaskEmit }).emit as Specification.EmitTaskEmit, + if (typeof (model as Specification.TaskBase).metadata === 'object') + (self as Specification.TaskBase).metadata = new _TaskMetadata( + (model as Specification.TaskBase).metadata as Specification.TaskMetadata, ); + if (typeof (model as { [k: string]: unknown; fork?: Specification.ForkTaskConfiguration }).fork === 'object') + (self as { [k: string]: unknown; fork?: Specification.ForkTaskConfiguration }).fork = + new _ForkTaskConfiguration( + (model as { [k: string]: unknown; fork?: Specification.ForkTaskConfiguration }) + .fork as Specification.ForkTaskConfiguration, + ); + if (typeof (model as { [k: string]: unknown; emit?: Specification.EmitTaskConfiguration }).emit === 'object') + (self as { [k: string]: unknown; emit?: Specification.EmitTaskConfiguration }).emit = + new _EmitTaskConfiguration( + (model as { [k: string]: unknown; emit?: Specification.EmitTaskConfiguration }) + .emit as Specification.EmitTaskConfiguration, + ); if ( typeof ( - model as { [k: string]: unknown; for?: Specification.ForTaskFor; while?: string; do?: Specification.TaskList } + model as { + [k: string]: unknown; + for?: Specification.ForTaskConfiguration; + while?: string; + do?: Specification.TaskList; + } ).for === 'object' ) ( - self as { [k: string]: unknown; for?: Specification.ForTaskFor; while?: string; do?: Specification.TaskList } - ).for = new _ForTaskFor( + self as { + [k: string]: unknown; + for?: Specification.ForTaskConfiguration; + while?: string; + do?: Specification.TaskList; + } + ).for = new _ForTaskConfiguration( ( model as { [k: string]: unknown; - for?: Specification.ForTaskFor; + for?: Specification.ForTaskConfiguration; while?: string; do?: Specification.TaskList; } - ).for as Specification.ForTaskFor, + ).for as Specification.ForTaskConfiguration, ); - if (typeof (model as { [k: string]: unknown; listen?: Specification.ListenTaskListen }).listen === 'object') - (self as { [k: string]: unknown; listen?: Specification.ListenTaskListen }).listen = new _ListenTaskListen( - (model as { [k: string]: unknown; listen?: Specification.ListenTaskListen }) - .listen as Specification.ListenTaskListen, - ); - if (typeof (model as { [k: string]: unknown; raise?: Specification.RaiseTaskRaise }).raise === 'object') - (self as { [k: string]: unknown; raise?: Specification.RaiseTaskRaise }).raise = new _RaiseTaskRaise( - (model as { [k: string]: unknown; raise?: Specification.RaiseTaskRaise }) - .raise as Specification.RaiseTaskRaise, + if ( + typeof (model as { [k: string]: unknown; listen?: Specification.ListenTaskConfiguration }).listen === 'object' + ) + (self as { [k: string]: unknown; listen?: Specification.ListenTaskConfiguration }).listen = + new _ListenTaskConfiguration( + (model as { [k: string]: unknown; listen?: Specification.ListenTaskConfiguration }) + .listen as Specification.ListenTaskConfiguration, + ); + if (typeof (model as { [k: string]: unknown; raise?: Specification.RaiseTaskConfiguration }).raise === 'object') + (self as { [k: string]: unknown; raise?: Specification.RaiseTaskConfiguration }).raise = + new _RaiseTaskConfiguration( + (model as { [k: string]: unknown; raise?: Specification.RaiseTaskConfiguration }) + .raise as Specification.RaiseTaskConfiguration, + ); + if (typeof (model as { [k: string]: unknown; run?: Specification.RunTaskConfiguration }).run === 'object') + (self as { [k: string]: unknown; run?: Specification.RunTaskConfiguration }).run = new _RunTaskConfiguration( + (model as { [k: string]: unknown; run?: Specification.RunTaskConfiguration }) + .run as Specification.RunTaskConfiguration, ); - if (typeof (model as { [k: string]: unknown; set?: Specification.SetTaskSet }).set === 'object') - (self as { [k: string]: unknown; set?: Specification.SetTaskSet }).set = new _SetTaskSet( - (model as { [k: string]: unknown; set?: Specification.SetTaskSet }).set as Specification.SetTaskSet, + if (typeof (model as { [k: string]: unknown; set?: Specification.SetTaskConfiguration }).set === 'object') + (self as { [k: string]: unknown; set?: Specification.SetTaskConfiguration }).set = new _SetTaskConfiguration( + (model as { [k: string]: unknown; set?: Specification.SetTaskConfiguration }) + .set as Specification.SetTaskConfiguration, ); - if (typeof (model as { [k: string]: unknown; switch?: Specification.SwitchTaskSwitch }).switch === 'object') - (self as { [k: string]: unknown; switch?: Specification.SwitchTaskSwitch }).switch = new _SwitchTaskSwitch( - (model as { [k: string]: unknown; switch?: Specification.SwitchTaskSwitch }) - .switch as Specification.SwitchTaskSwitch, - ) as unknown as Specification.SwitchTaskSwitch; + if ( + typeof (model as { [k: string]: unknown; switch?: Specification.SwitchTaskConfiguration }).switch === 'object' + ) + (self as { [k: string]: unknown; switch?: Specification.SwitchTaskConfiguration }).switch = + new _SwitchTaskConfiguration( + (model as { [k: string]: unknown; switch?: Specification.SwitchTaskConfiguration }) + .switch as Specification.SwitchTaskConfiguration, + ) as unknown as Specification.SwitchTaskConfiguration; if ( typeof (model as { [k: string]: unknown; try?: Specification.TaskList; catch?: Specification.TryTaskCatch }) .try === 'object' diff --git a/src/lib/generated/classes/try-task-catch-retry.ts b/src/lib/generated/classes/try-task-catch-retry.ts new file mode 100644 index 00000000..f1c73073 --- /dev/null +++ b/src/lib/generated/classes/try-task-catch-retry.ts @@ -0,0 +1,101 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _Duration } from './duration'; +import { _RetryBackoff } from './retry-backoff'; +import { _RetryLimit } from './retry-limit'; +import { _RetryPolicyJitter } from './retry-policy-jitter'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the TryTaskCatchRetry class and type + */ +export type TryTaskCatchRetryIntersection = TryTaskCatchRetry & Specification.TryTaskCatchRetry; + +/** + * Represents a constructor for the intersection of the TryTaskCatchRetry class and type + */ +export interface TryTaskCatchRetryConstructor { + new (model?: Partial): TryTaskCatchRetryIntersection; +} + +/** + * Represents a TryTaskCatchRetry with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class TryTaskCatchRetry extends ObjectHydrator { + /** + * Instanciates a new instance of the TryTaskCatchRetry class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the TryTaskCatchRetry. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.TryTaskCatchRetry & object; + if (isObject(model)) { + if (typeof (model as Specification.RetryPolicy).delay === 'object') + (self as Specification.RetryPolicy).delay = new _Duration( + (model as Specification.RetryPolicy).delay as Specification.Duration, + ); + if (typeof (model as Specification.RetryPolicy).backoff === 'object') + (self as Specification.RetryPolicy).backoff = new _RetryBackoff( + (model as Specification.RetryPolicy).backoff as Specification.RetryBackoff, + ); + if (typeof (model as Specification.RetryPolicy).limit === 'object') + (self as Specification.RetryPolicy).limit = new _RetryLimit( + (model as Specification.RetryPolicy).limit as Specification.RetryLimit, + ); + if (typeof (model as Specification.RetryPolicy).jitter === 'object') + (self as Specification.RetryPolicy).jitter = new _RetryPolicyJitter( + (model as Specification.RetryPolicy).jitter as Specification.RetryPolicyJitter, + ); + } + getLifecycleHooks('TryTaskCatchRetry')?.constructor?.(this); + } + + /** + * Validates the current instance of the TryTaskCatchRetry. + * Throws if invalid. + */ + validate() { + const copy = new TryTaskCatchRetry(this as any) as TryTaskCatchRetryIntersection; + validate('TryTaskCatchRetry', copy); + } + + /** + * Normalizes the current instance of the TryTaskCatchRetry. + * Creates a copy of the TryTaskCatchRetry, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the TryTaskCatchRetry instance. + */ + normalize(): TryTaskCatchRetry & Specification.TryTaskCatchRetry { + const copy = new TryTaskCatchRetry(this as any) as TryTaskCatchRetryIntersection; + return getLifecycleHooks('TryTaskCatchRetry')?.normalize?.(copy) || copy; + } +} + +export const _TryTaskCatchRetry = TryTaskCatchRetry as TryTaskCatchRetryConstructor; diff --git a/src/lib/generated/classes/try-task-catch.ts b/src/lib/generated/classes/try-task-catch.ts index 0a121aa7..6a551304 100644 --- a/src/lib/generated/classes/try-task-catch.ts +++ b/src/lib/generated/classes/try-task-catch.ts @@ -20,7 +20,8 @@ * *****************************************************************************************/ -import { _RetryPolicy } from './retry-policy'; +import { _CatchErrors } from './catch-errors'; +import { _TryTaskCatchRetry } from './try-task-catch-retry'; import { _TaskList } from './task-list'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; @@ -55,7 +56,8 @@ export class TryTaskCatch extends ObjectHydrator { super(model); const self = this as unknown as Specification.TryTaskCatch & object; if (isObject(model)) { - if (typeof model.retry === 'object') self.retry = new _RetryPolicy(model.retry); + if (typeof model.errors === 'object') self.errors = new _CatchErrors(model.errors); + if (typeof model.retry === 'object') self.retry = new _TryTaskCatchRetry(model.retry); if (typeof model.do === 'object') self.do = new _TaskList(model.do); } getLifecycleHooks('TryTaskCatch')?.constructor?.(this); diff --git a/src/lib/generated/classes/try-task.ts b/src/lib/generated/classes/try-task.ts index c2231e54..7d7d1067 100644 --- a/src/lib/generated/classes/try-task.ts +++ b/src/lib/generated/classes/try-task.ts @@ -23,7 +23,8 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; import { _TaskList } from './task-list'; import { _TryTaskCatch } from './try-task-catch'; import { _TaskBase } from './task-base'; @@ -62,7 +63,8 @@ export class TryTask extends _TaskBase { if (typeof model.input === 'object') self.input = new _Input(model.input); if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.export === 'object') self.export = new _Export(model.export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.timeout === 'object') self.timeout = new _TaskBaseTimeout(model.timeout); + if (typeof model.metadata === 'object') self.metadata = new _TaskMetadata(model.metadata); if (typeof model.try === 'object') self.try = new _TaskList(model.try); if (typeof model.catch === 'object') self.catch = new _TryTaskCatch(model.catch); } diff --git a/src/lib/generated/classes/use-authentications.ts b/src/lib/generated/classes/use-authentications.ts index 99b4c6b5..136a8381 100644 --- a/src/lib/generated/classes/use-authentications.ts +++ b/src/lib/generated/classes/use-authentications.ts @@ -20,10 +20,12 @@ * *****************************************************************************************/ +import { _AuthenticationPolicy } from './authentication-policy'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; +import { isObject } from '../../utils'; /** * Represents the intersection between the UseAuthentications class and type @@ -50,7 +52,15 @@ export class UseAuthentications extends ObjectHydrator) { super(model); - + const self = this as unknown as Specification.UseAuthentications & object; + if (isObject(model)) { + const knownProperties: string[] = []; + Object.entries(model) + .filter(([key]) => !knownProperties.includes(key)) + .forEach(([key, value]) => { + self[key] = new _AuthenticationPolicy(value); + }); + } getLifecycleHooks('UseAuthentications')?.constructor?.(this); } diff --git a/src/lib/generated/classes/use-extensions.ts b/src/lib/generated/classes/use-extensions.ts index 485985ae..4ae483b5 100644 --- a/src/lib/generated/classes/use-extensions.ts +++ b/src/lib/generated/classes/use-extensions.ts @@ -20,30 +20,28 @@ * *****************************************************************************************/ -import { _Extension } from './extension'; +import { _ExtensionItem } from './extension-item'; import { Specification } from '../definitions'; import { ArrayHydrator } from '../../hydrator'; import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; /** - * Represents a collection of { [k: string]: Specification.Extension; }. + * Represents a collection of Specification.ExtensionItem. * Inherits from ArrayHydrator to handle array-specific hydration. */ -export class UseExtensions extends ArrayHydrator<{ [k: string]: Specification.Extension }> { +export class UseExtensions extends ArrayHydrator { /** * Constructs a new instance of the UseExtensions class. * * @param model - Optional parameter which can be an array of objects or a number representing the array length. */ - constructor(model?: Array<{ [k: string]: Specification.Extension }> | number) { + constructor(model?: Array | number) { super(model); if (Array.isArray(model)) { if (model?.length) { this.splice(0, this.length); - model.forEach((item) => - this.push(Object.fromEntries(Object.entries(item).map(([key, value]) => [key, new _Extension(value)]))), - ); + model.forEach((item) => this.push(new _ExtensionItem(item))); } } Object.setPrototypeOf(this, Object.create(UseExtensions.prototype)); diff --git a/src/lib/generated/classes/use-secrets.ts b/src/lib/generated/classes/use-secrets.ts new file mode 100644 index 00000000..02d311de --- /dev/null +++ b/src/lib/generated/classes/use-secrets.ts @@ -0,0 +1,70 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ArrayHydrator } from '../../hydrator'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents a collection of string. + * Inherits from ArrayHydrator to handle array-specific hydration. + */ +export class UseSecrets extends ArrayHydrator { + /** + * Constructs a new instance of the UseSecrets class. + * + * @param model - Optional parameter which can be an array of objects or a number representing the array length. + */ + constructor(model?: Array | number) { + super(model); + if (Array.isArray(model)) { + if (model?.length) { + this.splice(0, this.length); + model.forEach((item) => this.push(item)); + } + } + Object.setPrototypeOf(this, Object.create(UseSecrets.prototype)); + getLifecycleHooks('UseSecrets')?.constructor?.(this); + } + + /** + * Validates the current instance of the UseSecrets. + * Throws if invalid. + */ + validate() { + const copy = new UseSecrets(this); + validate('UseSecrets', copy); + } + + /** + * Normalizes the current instance of the UseSecrets. + * Creates a copy of the UseSecrets, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the UseSecrets instance. + */ + normalize(): UseSecrets { + const copy = new UseSecrets(this); + return getLifecycleHooks('UseSecrets')?.normalize?.(copy) || copy; + } +} + +export const _UseSecrets = UseSecrets; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes diff --git a/src/lib/generated/classes/use-timeouts.ts b/src/lib/generated/classes/use-timeouts.ts new file mode 100644 index 00000000..99227e95 --- /dev/null +++ b/src/lib/generated/classes/use-timeouts.ts @@ -0,0 +1,88 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _Timeout } from './timeout'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the UseTimeouts class and type + */ +export type UseTimeoutsIntersection = UseTimeouts & Specification.UseTimeouts; + +/** + * Represents a constructor for the intersection of the UseTimeouts class and type + */ +export interface UseTimeoutsConstructor { + new (model?: Partial): UseTimeoutsIntersection; +} + +/** + * Represents a UseTimeouts with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class UseTimeouts extends ObjectHydrator { + /** + * Instanciates a new instance of the UseTimeouts class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the UseTimeouts. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.UseTimeouts & object; + if (isObject(model)) { + const knownProperties: string[] = []; + Object.entries(model) + .filter(([key]) => !knownProperties.includes(key)) + .forEach(([key, value]) => { + self[key] = new _Timeout(value); + }); + } + getLifecycleHooks('UseTimeouts')?.constructor?.(this); + } + + /** + * Validates the current instance of the UseTimeouts. + * Throws if invalid. + */ + validate() { + const copy = new UseTimeouts(this as any) as UseTimeoutsIntersection; + validate('UseTimeouts', copy); + } + + /** + * Normalizes the current instance of the UseTimeouts. + * Creates a copy of the UseTimeouts, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the UseTimeouts instance. + */ + normalize(): UseTimeouts & Specification.UseTimeouts { + const copy = new UseTimeouts(this as any) as UseTimeoutsIntersection; + return getLifecycleHooks('UseTimeouts')?.normalize?.(copy) || copy; + } +} + +export const _UseTimeouts = UseTimeouts as UseTimeoutsConstructor; diff --git a/src/lib/generated/classes/use.ts b/src/lib/generated/classes/use.ts index 9e43524d..e638ec7e 100644 --- a/src/lib/generated/classes/use.ts +++ b/src/lib/generated/classes/use.ts @@ -25,6 +25,7 @@ import { _UseErrors } from './use-errors'; import { _UseExtensions } from './use-extensions'; import { _UseFunctions } from './use-functions'; import { _UseRetries } from './use-retries'; +import { _UseTimeouts } from './use-timeouts'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -64,6 +65,7 @@ export class Use extends ObjectHydrator { if (typeof model.extensions === 'object') self.extensions = new _UseExtensions(model.extensions); if (typeof model.functions === 'object') self.functions = new _UseFunctions(model.functions); if (typeof model.retries === 'object') self.retries = new _UseRetries(model.retries); + if (typeof model.timeouts === 'object') self.timeouts = new _UseTimeouts(model.timeouts); } getLifecycleHooks('Use')?.constructor?.(this); } diff --git a/src/lib/generated/classes/wait-task.ts b/src/lib/generated/classes/wait-task.ts index 72a7e18e..99b8d708 100644 --- a/src/lib/generated/classes/wait-task.ts +++ b/src/lib/generated/classes/wait-task.ts @@ -23,7 +23,8 @@ import { _Input } from './input'; import { _Output } from './output'; import { _Export } from './export'; -import { _Timeout } from './timeout'; +import { _TaskBaseTimeout } from './task-base-timeout'; +import { _TaskMetadata } from './task-metadata'; import { _Duration } from './duration'; import { _TaskBase } from './task-base'; import { Specification } from '../definitions'; @@ -61,7 +62,8 @@ export class WaitTask extends _TaskBase { if (typeof model.input === 'object') self.input = new _Input(model.input); if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.export === 'object') self.export = new _Export(model.export); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.timeout === 'object') self.timeout = new _TaskBaseTimeout(model.timeout); + if (typeof model.metadata === 'object') self.metadata = new _TaskMetadata(model.metadata); if (typeof model.wait === 'object') self.wait = new _Duration(model.wait); } getLifecycleHooks('WaitTask')?.constructor?.(this); diff --git a/src/lib/generated/classes/run-task-run-container.ts b/src/lib/generated/classes/with-async-api-payload.ts similarity index 52% rename from src/lib/generated/classes/run-task-run-container.ts rename to src/lib/generated/classes/with-async-api-payload.ts index 41946689..8eea626c 100644 --- a/src/lib/generated/classes/run-task-run-container.ts +++ b/src/lib/generated/classes/with-async-api-payload.ts @@ -26,53 +26,53 @@ import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; /** - * Represents the intersection between the RunTaskRunContainer class and type + * Represents the intersection between the WithAsyncAPIPayload class and type */ -export type RunTaskRunContainerIntersection = RunTaskRunContainer & Specification.RunTaskRunContainer; +export type WithAsyncAPIPayloadIntersection = WithAsyncAPIPayload & Specification.WithAsyncAPIPayload; /** - * Represents a constructor for the intersection of the RunTaskRunContainer class and type + * Represents a constructor for the intersection of the WithAsyncAPIPayload class and type */ -export interface RunTaskRunContainerConstructor { - new (model?: Partial): RunTaskRunContainerIntersection; +export interface WithAsyncAPIPayloadConstructor { + new (model?: Partial): WithAsyncAPIPayloadIntersection; } /** - * Represents a RunTaskRunContainer with methods for validation and normalization. + * Represents a WithAsyncAPIPayload with methods for validation and normalization. * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. */ -export class RunTaskRunContainer extends ObjectHydrator { +export class WithAsyncAPIPayload extends ObjectHydrator { /** - * Instanciates a new instance of the RunTaskRunContainer class. + * Instanciates a new instance of the WithAsyncAPIPayload class. * Initializes properties based on the provided model if it is an object. * - * @param model - Optional partial model object to initialize the RunTaskRunContainer. + * @param model - Optional partial model object to initialize the WithAsyncAPIPayload. */ - constructor(model?: Partial) { + constructor(model?: Partial) { super(model); - getLifecycleHooks('RunTaskRunContainer')?.constructor?.(this); + getLifecycleHooks('WithAsyncAPIPayload')?.constructor?.(this); } /** - * Validates the current instance of the RunTaskRunContainer. + * Validates the current instance of the WithAsyncAPIPayload. * Throws if invalid. */ validate() { - const copy = new RunTaskRunContainer(this as any) as RunTaskRunContainerIntersection; - validate('RunTaskRunContainer', copy); + const copy = new WithAsyncAPIPayload(this as any) as WithAsyncAPIPayloadIntersection; + validate('WithAsyncAPIPayload', copy); } /** - * Normalizes the current instance of the RunTaskRunContainer. - * Creates a copy of the RunTaskRunContainer, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the WithAsyncAPIPayload. + * Creates a copy of the WithAsyncAPIPayload, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the RunTaskRunContainer instance. + * @returns A normalized version of the WithAsyncAPIPayload instance. */ - normalize(): RunTaskRunContainer & Specification.RunTaskRunContainer { - const copy = new RunTaskRunContainer(this as any) as RunTaskRunContainerIntersection; - return getLifecycleHooks('RunTaskRunContainer')?.normalize?.(copy) || copy; + normalize(): WithAsyncAPIPayload & Specification.WithAsyncAPIPayload { + const copy = new WithAsyncAPIPayload(this as any) as WithAsyncAPIPayloadIntersection; + return getLifecycleHooks('WithAsyncAPIPayload')?.normalize?.(copy) || copy; } } -export const _RunTaskRunContainer = RunTaskRunContainer as RunTaskRunContainerConstructor; +export const _WithAsyncAPIPayload = WithAsyncAPIPayload as WithAsyncAPIPayloadConstructor; diff --git a/src/lib/generated/classes/with-event.ts b/src/lib/generated/classes/with-event.ts new file mode 100644 index 00000000..cd90a833 --- /dev/null +++ b/src/lib/generated/classes/with-event.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the WithEvent class and type + */ +export type WithEventIntersection = WithEvent & Specification.WithEvent; + +/** + * Represents a constructor for the intersection of the WithEvent class and type + */ +export interface WithEventConstructor { + new (model?: Partial): WithEventIntersection; +} + +/** + * Represents a WithEvent with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class WithEvent extends ObjectHydrator { + /** + * Instanciates a new instance of the WithEvent class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the WithEvent. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('WithEvent')?.constructor?.(this); + } + + /** + * Validates the current instance of the WithEvent. + * Throws if invalid. + */ + validate() { + const copy = new WithEvent(this as any) as WithEventIntersection; + validate('WithEvent', copy); + } + + /** + * Normalizes the current instance of the WithEvent. + * Creates a copy of the WithEvent, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the WithEvent instance. + */ + normalize(): WithEvent & Specification.WithEvent { + const copy = new WithEvent(this as any) as WithEventIntersection; + return getLifecycleHooks('WithEvent')?.normalize?.(copy) || copy; + } +} + +export const _WithEvent = WithEvent as WithEventConstructor; diff --git a/src/lib/generated/classes/with-grpc-arguments.ts b/src/lib/generated/classes/with-grpc-arguments.ts new file mode 100644 index 00000000..90881a48 --- /dev/null +++ b/src/lib/generated/classes/with-grpc-arguments.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the WithGRPCArguments class and type + */ +export type WithGRPCArgumentsIntersection = WithGRPCArguments & Specification.WithGRPCArguments; + +/** + * Represents a constructor for the intersection of the WithGRPCArguments class and type + */ +export interface WithGRPCArgumentsConstructor { + new (model?: Partial): WithGRPCArgumentsIntersection; +} + +/** + * Represents a WithGRPCArguments with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class WithGRPCArguments extends ObjectHydrator { + /** + * Instanciates a new instance of the WithGRPCArguments class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the WithGRPCArguments. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('WithGRPCArguments')?.constructor?.(this); + } + + /** + * Validates the current instance of the WithGRPCArguments. + * Throws if invalid. + */ + validate() { + const copy = new WithGRPCArguments(this as any) as WithGRPCArgumentsIntersection; + validate('WithGRPCArguments', copy); + } + + /** + * Normalizes the current instance of the WithGRPCArguments. + * Creates a copy of the WithGRPCArguments, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the WithGRPCArguments instance. + */ + normalize(): WithGRPCArguments & Specification.WithGRPCArguments { + const copy = new WithGRPCArguments(this as any) as WithGRPCArgumentsIntersection; + return getLifecycleHooks('WithGRPCArguments')?.normalize?.(copy) || copy; + } +} + +export const _WithGRPCArguments = WithGRPCArguments as WithGRPCArgumentsConstructor; diff --git a/src/lib/generated/classes/with-grpc-service.ts b/src/lib/generated/classes/with-grpc-service.ts new file mode 100644 index 00000000..f0438a55 --- /dev/null +++ b/src/lib/generated/classes/with-grpc-service.ts @@ -0,0 +1,84 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _ReferenceableAuthenticationPolicy } from './referenceable-authentication-policy'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the WithGRPCService class and type + */ +export type WithGRPCServiceIntersection = WithGRPCService & Specification.WithGRPCService; + +/** + * Represents a constructor for the intersection of the WithGRPCService class and type + */ +export interface WithGRPCServiceConstructor { + new (model?: Partial): WithGRPCServiceIntersection; +} + +/** + * Represents a WithGRPCService with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class WithGRPCService extends ObjectHydrator { + /** + * Instanciates a new instance of the WithGRPCService class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the WithGRPCService. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.WithGRPCService & object; + if (isObject(model)) { + if (typeof model.authentication === 'object') + self.authentication = new _ReferenceableAuthenticationPolicy(model.authentication); + } + getLifecycleHooks('WithGRPCService')?.constructor?.(this); + } + + /** + * Validates the current instance of the WithGRPCService. + * Throws if invalid. + */ + validate() { + const copy = new WithGRPCService(this as any) as WithGRPCServiceIntersection; + validate('WithGRPCService', copy); + } + + /** + * Normalizes the current instance of the WithGRPCService. + * Creates a copy of the WithGRPCService, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the WithGRPCService instance. + */ + normalize(): WithGRPCService & Specification.WithGRPCService { + const copy = new WithGRPCService(this as any) as WithGRPCServiceIntersection; + return getLifecycleHooks('WithGRPCService')?.normalize?.(copy) || copy; + } +} + +export const _WithGRPCService = WithGRPCService as WithGRPCServiceConstructor; diff --git a/src/lib/generated/classes/with-http-body.ts b/src/lib/generated/classes/with-http-body.ts new file mode 100644 index 00000000..817773b2 --- /dev/null +++ b/src/lib/generated/classes/with-http-body.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the WithHTTPBody class and type + */ +export type WithHTTPBodyIntersection = WithHTTPBody & Specification.WithHTTPBody; + +/** + * Represents a constructor for the intersection of the WithHTTPBody class and type + */ +export interface WithHTTPBodyConstructor { + new (model?: Partial): WithHTTPBodyIntersection; +} + +/** + * Represents a WithHTTPBody with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class WithHTTPBody extends ObjectHydrator { + /** + * Instanciates a new instance of the WithHTTPBody class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the WithHTTPBody. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('WithHTTPBody')?.constructor?.(this); + } + + /** + * Validates the current instance of the WithHTTPBody. + * Throws if invalid. + */ + validate() { + const copy = new WithHTTPBody(this as any) as WithHTTPBodyIntersection; + validate('WithHTTPBody', copy); + } + + /** + * Normalizes the current instance of the WithHTTPBody. + * Creates a copy of the WithHTTPBody, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the WithHTTPBody instance. + */ + normalize(): WithHTTPBody & Specification.WithHTTPBody { + const copy = new WithHTTPBody(this as any) as WithHTTPBodyIntersection; + return getLifecycleHooks('WithHTTPBody')?.normalize?.(copy) || copy; + } +} + +export const _WithHTTPBody = WithHTTPBody as WithHTTPBodyConstructor; diff --git a/src/lib/generated/classes/with-http-headers.ts b/src/lib/generated/classes/with-http-headers.ts new file mode 100644 index 00000000..1f12c56d --- /dev/null +++ b/src/lib/generated/classes/with-http-headers.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the WithHTTPHeaders class and type + */ +export type WithHTTPHeadersIntersection = WithHTTPHeaders & Specification.WithHTTPHeaders; + +/** + * Represents a constructor for the intersection of the WithHTTPHeaders class and type + */ +export interface WithHTTPHeadersConstructor { + new (model?: Partial): WithHTTPHeadersIntersection; +} + +/** + * Represents a WithHTTPHeaders with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class WithHTTPHeaders extends ObjectHydrator { + /** + * Instanciates a new instance of the WithHTTPHeaders class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the WithHTTPHeaders. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('WithHTTPHeaders')?.constructor?.(this); + } + + /** + * Validates the current instance of the WithHTTPHeaders. + * Throws if invalid. + */ + validate() { + const copy = new WithHTTPHeaders(this as any) as WithHTTPHeadersIntersection; + validate('WithHTTPHeaders', copy); + } + + /** + * Normalizes the current instance of the WithHTTPHeaders. + * Creates a copy of the WithHTTPHeaders, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the WithHTTPHeaders instance. + */ + normalize(): WithHTTPHeaders & Specification.WithHTTPHeaders { + const copy = new WithHTTPHeaders(this as any) as WithHTTPHeadersIntersection; + return getLifecycleHooks('WithHTTPHeaders')?.normalize?.(copy) || copy; + } +} + +export const _WithHTTPHeaders = WithHTTPHeaders as WithHTTPHeadersConstructor; diff --git a/src/lib/generated/classes/with-http-query.ts b/src/lib/generated/classes/with-http-query.ts new file mode 100644 index 00000000..e84c7c46 --- /dev/null +++ b/src/lib/generated/classes/with-http-query.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the WithHTTPQuery class and type + */ +export type WithHTTPQueryIntersection = WithHTTPQuery & Specification.WithHTTPQuery; + +/** + * Represents a constructor for the intersection of the WithHTTPQuery class and type + */ +export interface WithHTTPQueryConstructor { + new (model?: Partial): WithHTTPQueryIntersection; +} + +/** + * Represents a WithHTTPQuery with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class WithHTTPQuery extends ObjectHydrator { + /** + * Instanciates a new instance of the WithHTTPQuery class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the WithHTTPQuery. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('WithHTTPQuery')?.constructor?.(this); + } + + /** + * Validates the current instance of the WithHTTPQuery. + * Throws if invalid. + */ + validate() { + const copy = new WithHTTPQuery(this as any) as WithHTTPQueryIntersection; + validate('WithHTTPQuery', copy); + } + + /** + * Normalizes the current instance of the WithHTTPQuery. + * Creates a copy of the WithHTTPQuery, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the WithHTTPQuery instance. + */ + normalize(): WithHTTPQuery & Specification.WithHTTPQuery { + const copy = new WithHTTPQuery(this as any) as WithHTTPQueryIntersection; + return getLifecycleHooks('WithHTTPQuery')?.normalize?.(copy) || copy; + } +} + +export const _WithHTTPQuery = WithHTTPQuery as WithHTTPQueryConstructor; diff --git a/src/lib/generated/classes/call-grpc-with-arguments.ts b/src/lib/generated/classes/with-open-api-parameters.ts similarity index 52% rename from src/lib/generated/classes/call-grpc-with-arguments.ts rename to src/lib/generated/classes/with-open-api-parameters.ts index 05adfb06..2366d6fb 100644 --- a/src/lib/generated/classes/call-grpc-with-arguments.ts +++ b/src/lib/generated/classes/with-open-api-parameters.ts @@ -26,53 +26,53 @@ import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; /** - * Represents the intersection between the CallGRPCWithArguments class and type + * Represents the intersection between the WithOpenAPIParameters class and type */ -export type CallGRPCWithArgumentsIntersection = CallGRPCWithArguments & Specification.CallGRPCWithArguments; +export type WithOpenAPIParametersIntersection = WithOpenAPIParameters & Specification.WithOpenAPIParameters; /** - * Represents a constructor for the intersection of the CallGRPCWithArguments class and type + * Represents a constructor for the intersection of the WithOpenAPIParameters class and type */ -export interface CallGRPCWithArgumentsConstructor { - new (model?: Partial): CallGRPCWithArgumentsIntersection; +export interface WithOpenAPIParametersConstructor { + new (model?: Partial): WithOpenAPIParametersIntersection; } /** - * Represents a CallGRPCWithArguments with methods for validation and normalization. + * Represents a WithOpenAPIParameters with methods for validation and normalization. * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. */ -export class CallGRPCWithArguments extends ObjectHydrator { +export class WithOpenAPIParameters extends ObjectHydrator { /** - * Instanciates a new instance of the CallGRPCWithArguments class. + * Instanciates a new instance of the WithOpenAPIParameters class. * Initializes properties based on the provided model if it is an object. * - * @param model - Optional partial model object to initialize the CallGRPCWithArguments. + * @param model - Optional partial model object to initialize the WithOpenAPIParameters. */ - constructor(model?: Partial) { + constructor(model?: Partial) { super(model); - getLifecycleHooks('CallGRPCWithArguments')?.constructor?.(this); + getLifecycleHooks('WithOpenAPIParameters')?.constructor?.(this); } /** - * Validates the current instance of the CallGRPCWithArguments. + * Validates the current instance of the WithOpenAPIParameters. * Throws if invalid. */ validate() { - const copy = new CallGRPCWithArguments(this as any) as CallGRPCWithArgumentsIntersection; - validate('CallGRPCWithArguments', copy); + const copy = new WithOpenAPIParameters(this as any) as WithOpenAPIParametersIntersection; + validate('WithOpenAPIParameters', copy); } /** - * Normalizes the current instance of the CallGRPCWithArguments. - * Creates a copy of the CallGRPCWithArguments, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the WithOpenAPIParameters. + * Creates a copy of the WithOpenAPIParameters, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the CallGRPCWithArguments instance. + * @returns A normalized version of the WithOpenAPIParameters instance. */ - normalize(): CallGRPCWithArguments & Specification.CallGRPCWithArguments { - const copy = new CallGRPCWithArguments(this as any) as CallGRPCWithArgumentsIntersection; - return getLifecycleHooks('CallGRPCWithArguments')?.normalize?.(copy) || copy; + normalize(): WithOpenAPIParameters & Specification.WithOpenAPIParameters { + const copy = new WithOpenAPIParameters(this as any) as WithOpenAPIParametersIntersection; + return getLifecycleHooks('WithOpenAPIParameters')?.normalize?.(copy) || copy; } } -export const _CallGRPCWithArguments = CallGRPCWithArguments as CallGRPCWithArgumentsConstructor; +export const _WithOpenAPIParameters = WithOpenAPIParameters as WithOpenAPIParametersConstructor; diff --git a/src/lib/generated/classes/listen-task-listen.ts b/src/lib/generated/classes/workflow-metadata.ts similarity index 53% rename from src/lib/generated/classes/listen-task-listen.ts rename to src/lib/generated/classes/workflow-metadata.ts index 5d94f36c..f290fd90 100644 --- a/src/lib/generated/classes/listen-task-listen.ts +++ b/src/lib/generated/classes/workflow-metadata.ts @@ -26,53 +26,53 @@ import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; /** - * Represents the intersection between the ListenTaskListen class and type + * Represents the intersection between the WorkflowMetadata class and type */ -export type ListenTaskListenIntersection = ListenTaskListen & Specification.ListenTaskListen; +export type WorkflowMetadataIntersection = WorkflowMetadata & Specification.WorkflowMetadata; /** - * Represents a constructor for the intersection of the ListenTaskListen class and type + * Represents a constructor for the intersection of the WorkflowMetadata class and type */ -export interface ListenTaskListenConstructor { - new (model?: Partial): ListenTaskListenIntersection; +export interface WorkflowMetadataConstructor { + new (model?: Partial): WorkflowMetadataIntersection; } /** - * Represents a ListenTaskListen with methods for validation and normalization. + * Represents a WorkflowMetadata with methods for validation and normalization. * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. */ -export class ListenTaskListen extends ObjectHydrator { +export class WorkflowMetadata extends ObjectHydrator { /** - * Instanciates a new instance of the ListenTaskListen class. + * Instanciates a new instance of the WorkflowMetadata class. * Initializes properties based on the provided model if it is an object. * - * @param model - Optional partial model object to initialize the ListenTaskListen. + * @param model - Optional partial model object to initialize the WorkflowMetadata. */ - constructor(model?: Partial) { + constructor(model?: Partial) { super(model); - getLifecycleHooks('ListenTaskListen')?.constructor?.(this); + getLifecycleHooks('WorkflowMetadata')?.constructor?.(this); } /** - * Validates the current instance of the ListenTaskListen. + * Validates the current instance of the WorkflowMetadata. * Throws if invalid. */ validate() { - const copy = new ListenTaskListen(this as any) as ListenTaskListenIntersection; - validate('ListenTaskListen', copy); + const copy = new WorkflowMetadata(this as any) as WorkflowMetadataIntersection; + validate('WorkflowMetadata', copy); } /** - * Normalizes the current instance of the ListenTaskListen. - * Creates a copy of the ListenTaskListen, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the WorkflowMetadata. + * Creates a copy of the WorkflowMetadata, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the ListenTaskListen instance. + * @returns A normalized version of the WorkflowMetadata instance. */ - normalize(): ListenTaskListen & Specification.ListenTaskListen { - const copy = new ListenTaskListen(this as any) as ListenTaskListenIntersection; - return getLifecycleHooks('ListenTaskListen')?.normalize?.(copy) || copy; + normalize(): WorkflowMetadata & Specification.WorkflowMetadata { + const copy = new WorkflowMetadata(this as any) as WorkflowMetadataIntersection; + return getLifecycleHooks('WorkflowMetadata')?.normalize?.(copy) || copy; } } -export const _ListenTaskListen = ListenTaskListen as ListenTaskListenConstructor; +export const _WorkflowMetadata = WorkflowMetadata as WorkflowMetadataConstructor; diff --git a/src/lib/generated/classes/document-tags.ts b/src/lib/generated/classes/workflow-tags.ts similarity index 56% rename from src/lib/generated/classes/document-tags.ts rename to src/lib/generated/classes/workflow-tags.ts index a876196a..5c00bab5 100644 --- a/src/lib/generated/classes/document-tags.ts +++ b/src/lib/generated/classes/workflow-tags.ts @@ -26,53 +26,53 @@ import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; /** - * Represents the intersection between the DocumentTags class and type + * Represents the intersection between the WorkflowTags class and type */ -export type DocumentTagsIntersection = DocumentTags & Specification.DocumentTags; +export type WorkflowTagsIntersection = WorkflowTags & Specification.WorkflowTags; /** - * Represents a constructor for the intersection of the DocumentTags class and type + * Represents a constructor for the intersection of the WorkflowTags class and type */ -export interface DocumentTagsConstructor { - new (model?: Partial): DocumentTagsIntersection; +export interface WorkflowTagsConstructor { + new (model?: Partial): WorkflowTagsIntersection; } /** - * Represents a DocumentTags with methods for validation and normalization. + * Represents a WorkflowTags with methods for validation and normalization. * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. */ -export class DocumentTags extends ObjectHydrator { +export class WorkflowTags extends ObjectHydrator { /** - * Instanciates a new instance of the DocumentTags class. + * Instanciates a new instance of the WorkflowTags class. * Initializes properties based on the provided model if it is an object. * - * @param model - Optional partial model object to initialize the DocumentTags. + * @param model - Optional partial model object to initialize the WorkflowTags. */ - constructor(model?: Partial) { + constructor(model?: Partial) { super(model); - getLifecycleHooks('DocumentTags')?.constructor?.(this); + getLifecycleHooks('WorkflowTags')?.constructor?.(this); } /** - * Validates the current instance of the DocumentTags. + * Validates the current instance of the WorkflowTags. * Throws if invalid. */ validate() { - const copy = new DocumentTags(this as any) as DocumentTagsIntersection; - validate('DocumentTags', copy); + const copy = new WorkflowTags(this as any) as WorkflowTagsIntersection; + validate('WorkflowTags', copy); } /** - * Normalizes the current instance of the DocumentTags. - * Creates a copy of the DocumentTags, invokes normalization hooks if available, and returns the normalized copy. + * Normalizes the current instance of the WorkflowTags. + * Creates a copy of the WorkflowTags, invokes normalization hooks if available, and returns the normalized copy. * - * @returns A normalized version of the DocumentTags instance. + * @returns A normalized version of the WorkflowTags instance. */ - normalize(): DocumentTags & Specification.DocumentTags { - const copy = new DocumentTags(this as any) as DocumentTagsIntersection; - return getLifecycleHooks('DocumentTags')?.normalize?.(copy) || copy; + normalize(): WorkflowTags & Specification.WorkflowTags { + const copy = new WorkflowTags(this as any) as WorkflowTagsIntersection; + return getLifecycleHooks('WorkflowTags')?.normalize?.(copy) || copy; } } -export const _DocumentTags = DocumentTags as DocumentTagsConstructor; +export const _WorkflowTags = WorkflowTags as WorkflowTagsConstructor; diff --git a/src/lib/generated/classes/workflow-timeout.ts b/src/lib/generated/classes/workflow-timeout.ts new file mode 100644 index 00000000..ae0bbdfc --- /dev/null +++ b/src/lib/generated/classes/workflow-timeout.ts @@ -0,0 +1,86 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _Duration } from './duration'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the WorkflowTimeout class and type + */ +export type WorkflowTimeoutIntersection = WorkflowTimeout & Specification.WorkflowTimeout; + +/** + * Represents a constructor for the intersection of the WorkflowTimeout class and type + */ +export interface WorkflowTimeoutConstructor { + new (model?: Partial): WorkflowTimeoutIntersection; +} + +/** + * Represents a WorkflowTimeout with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class WorkflowTimeout extends ObjectHydrator { + /** + * Instanciates a new instance of the WorkflowTimeout class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the WorkflowTimeout. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.WorkflowTimeout & object; + if (isObject(model)) { + if (typeof (model as Specification.Timeout).after === 'object') + (self as Specification.Timeout).after = new _Duration( + (model as Specification.Timeout).after as Specification.Duration, + ); + } + getLifecycleHooks('WorkflowTimeout')?.constructor?.(this); + } + + /** + * Validates the current instance of the WorkflowTimeout. + * Throws if invalid. + */ + validate() { + const copy = new WorkflowTimeout(this as any) as WorkflowTimeoutIntersection; + validate('WorkflowTimeout', copy); + } + + /** + * Normalizes the current instance of the WorkflowTimeout. + * Creates a copy of the WorkflowTimeout, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the WorkflowTimeout instance. + */ + normalize(): WorkflowTimeout & Specification.WorkflowTimeout { + const copy = new WorkflowTimeout(this as any) as WorkflowTimeoutIntersection; + return getLifecycleHooks('WorkflowTimeout')?.normalize?.(copy) || copy; + } +} + +export const _WorkflowTimeout = WorkflowTimeout as WorkflowTimeoutConstructor; diff --git a/src/lib/generated/classes/workflow.ts b/src/lib/generated/classes/workflow.ts index 62c5b56e..3adbfee7 100644 --- a/src/lib/generated/classes/workflow.ts +++ b/src/lib/generated/classes/workflow.ts @@ -24,7 +24,7 @@ import { _Document } from './document'; import { _Input } from './input'; import { _Use } from './use'; import { _TaskList } from './task-list'; -import { _Timeout } from './timeout'; +import { _WorkflowTimeout } from './workflow-timeout'; import { _Output } from './output'; import { _Schedule } from './schedule'; import { ObjectHydrator } from '../../hydrator'; @@ -65,7 +65,7 @@ export class Workflow extends ObjectHydrator { if (typeof model.input === 'object') self.input = new _Input(model.input); if (typeof model.use === 'object') self.use = new _Use(model.use); if (typeof model.do === 'object') self.do = new _TaskList(model.do); - if (typeof model.timeout === 'object') self.timeout = new _Timeout(model.timeout); + if (typeof model.timeout === 'object') self.timeout = new _WorkflowTimeout(model.timeout); if (typeof model.output === 'object') self.output = new _Output(model.output); if (typeof model.schedule === 'object') self.schedule = new _Schedule(model.schedule); } diff --git a/src/lib/generated/definitions/specification.ts b/src/lib/generated/definitions/specification.ts index 63724ccb..d913605a 100644 --- a/src/lib/generated/definitions/specification.ts +++ b/src/lib/generated/definitions/specification.ts @@ -23,54 +23,94 @@ /** * Represents the definition of a schema. */ -export type Schema = - | { - /** - * The schema's inline definition. - */ - document: { - [k: string]: unknown; - }; - [k: string]: unknown; - } - | { - resource: ExternalResource; - [k: string]: unknown; - }; -export type ExternalResource = - | string - | { - /** - * The endpoint's URI. - */ - uri: string; - authentication?: ExternalResourceAuthentication; - /** - * The external resource's name, if any. - */ - name?: string; - [k: string]: unknown; - }; +export type Schema = SchemaInline | SchemaExternal; +/** + * Represents an endpoint. + */ +export type Endpoint = RuntimeExpression | string | EndpointConfiguration; +/** + * A runtime expression. + */ +export type RuntimeExpression = string; /** - * The authentication policy to use. + * The endpoint's URI. */ -export type ExternalResourceAuthentication = AuthenticationPolicy | string; +export type EndpointUri = RuntimeExpression; +/** + * Represents a referenceable authentication policy. + */ +export type ReferenceableAuthenticationPolicy = AuthenticationPolicyReference | AuthenticationPolicy; /** * Defines an authentication policy. */ export type AuthenticationPolicy = + | BasicAuthenticationPolicy + | BearerAuthenticationPolicy + | DigestAuthenticationPolicy + | OAuth2AuthenticationPolicy + | OpenIdConnectAuthenticationPolicy; +/** + * The configuration of the basic authentication policy. + */ +export type BasicAuthenticationPolicyConfiguration = BasicAuthenticationProperties | SecretBasedAuthenticationPolicy; +/** + * The configuration of the bearer authentication policy. + */ +export type BearerAuthenticationPolicyConfiguration = BearerAuthenticationProperties | SecretBasedAuthenticationPolicy; +/** + * The configuration of the digest authentication policy. + */ +export type DigestAuthenticationPolicyConfiguration = DigestAuthenticationProperties | SecretBasedAuthenticationPolicy; +/** + * The configuration of the OAuth2 authentication policy. + */ +export type OAuth2AuthenticationPolicyConfiguration = + | OAuth2ConnectAuthenticationProperties + | SecretBasedAuthenticationPolicy; +/** + * The inline configuration of the OAuth2 authentication policy. + */ +export type OAuth2ConnectAuthenticationProperties = OAuth2AutenthicationData & { + endpoints?: OAuth2AuthenticationPropertiesEndpoints; + [k: string]: unknown; +}; +/** + * A list that contains that contains valid issuers that will be used to check against the issuer of generated tokens. + */ +export type OAuth2Issuers = string[]; +/** + * The scopes, if any, to request the token for. + */ +export type OAuth2AutenthicationDataScopes = string[]; +/** + * The audiences, if any, to request the token for. + */ +export type OAuth2AutenthicationDataAudiences = string[]; +/** + * The configuration of the OpenIdConnect authentication policy. + */ +export type OpenIdConnectAuthenticationPolicyConfiguration = + | OpenIdConnectAuthenticationProperties + | SecretBasedAuthenticationPolicy; +/** + * A runtime expression, if any, used to mutate and/or filter the input of the workflow or task. + */ +export type InputFrom = + | string | { - basic: AuthenticationPolicyBasic; - [k: string]: unknown; - } - | { - bearer: AuthenticationPolicyBearer; - [k: string]: unknown; - } - | { - oauth2: AuthenticationPolicyOauth2; [k: string]: unknown; }; +/** + * A URI reference that identifies the error type. + */ +export type ErrorType = RuntimeExpression; +/** + * A JSON Pointer used to reference the component the error originates from. + */ +export type ErrorInstance = RuntimeExpression; +/** + * A discrete unit of work that contributes to achieving the overall objectives defined by the workflow. + */ export type Task = | CallTask | DoTask @@ -84,58 +124,81 @@ export type Task = | SwitchTask | TryTask | WaitTask; +/** + * Defines the call to perform. + */ export type CallTask = CallAsyncAPI | CallGRPC | CallHTTP | CallOpenAPI | CallFunction; +/** + * Defines the AsyncAPI call to perform. + */ export type CallAsyncAPI = TaskBase & { call?: 'asyncapi'; - with?: CallAsyncAPIWith; + with?: AsyncApiArguments; [k: string]: unknown; }; +/** + * A runtime expression, if any, used to determine whether or not the task should be run. + */ +export type TaskBaseIf = string; +/** + * A runtime expression, if any, used to mutate and/or filter the output of the workflow or task. + */ +export type OutputAs = + | string + | { + [k: string]: unknown; + }; +/** + * A runtime expression, if any, used to export the output data to the context. + */ +export type ExportAs = + | string + | { + [k: string]: unknown; + }; +export type TaskBaseTimeout = Timeout | string; +export type Duration = DurationInline | string; +/** + * Represents different transition options for a workflow. + */ export type FlowDirective = ('continue' | 'exit' | 'end') | string; /** - * The authentication policy, if any, to use when calling the AsyncAPI operation. + * Defines the GRPC call to perform. */ -export type CallAsyncAPIWithAuthentication = AuthenticationPolicy | string; export type CallGRPC = TaskBase & { call?: 'grpc'; - with?: CallGRPCWith; + with?: GRPCArguments; [k: string]: unknown; }; /** - * The endpoint's authentication policy, if any. + * Defines the HTTP call to perform. */ -export type CallGRPCWithServiceAuthentication = AuthenticationPolicy | string; export type CallHTTP = TaskBase & { call?: 'http'; - with?: CallHTTPWith; + with?: HTTPArguments; [k: string]: unknown; }; /** - * The HTTP endpoint to send the request to. - */ -export type CallHTTPWithEndpoint = Endpoint | string; -/** - * The authentication policy to use. + * Defines the OpenAPI call to perform. */ -export type EndpointAuthentication = AuthenticationPolicy | string; export type CallOpenAPI = TaskBase & { call?: 'openapi'; - with?: CallOpenAPIWith; + with?: OpenAPIArguments; [k: string]: unknown; }; /** - * The authentication policy, if any, to use when calling the OpenAPI operation. + * Defines the function call to perform. */ -export type CallOpenAPIWithAuthentication = AuthenticationPolicy | string; export type CallFunction = TaskBase & { /** * The name of the function to call. */ call?: string; - with?: CallFunctionWith; + with?: FunctionArguments; [k: string]: unknown; }; /** - * Allows to execute a list of tasks in sequence + * Allows to execute a list of tasks in sequence. */ export type DoTask = TaskBase & { do?: TaskList; @@ -145,21 +208,33 @@ export type DoTask = TaskBase & { * Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output. */ export type ForkTask = TaskBase & { - fork?: ForkTaskFork; + fork?: ForkTaskConfiguration; [k: string]: unknown; }; /** * Allows workflows to publish events to event brokers or messaging systems, facilitating communication and coordination between different components and services. */ export type EmitTask = TaskBase & { - emit?: EmitTaskEmit; + emit?: EmitTaskConfiguration; [k: string]: unknown; }; +/** + * Identifies the context in which an event happened. + */ +export type EventSource = RuntimeExpression; +/** + * When the event occured. + */ +export type EventTime = RuntimeExpression; +/** + * The schema describing the event format. + */ +export type EventDataschema = RuntimeExpression; /** * Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets. */ export type ForTask = TaskBase & { - for?: ForTaskFor; + for?: ForTaskConfiguration; /** * A runtime expression that represents the condition, if any, that must be met for the iteration to continue. */ @@ -171,95 +246,67 @@ export type ForTask = TaskBase & { * Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems. */ export type ListenTask = TaskBase & { - listen?: ListenTaskListen; + listen?: ListenTaskConfiguration; [k: string]: unknown; }; +/** + * Describe the event consumption strategy to adopt. + */ export type EventConsumptionStrategy = - | { - all: EventConsumptionStrategyAll; - [k: string]: unknown; - } - | { - any: EventConsumptionStrategyAny; - [k: string]: unknown; - } - | { - one: EventFilter; - [k: string]: unknown; - }; + | AllEventConsumptionStrategy + | AnyEventConsumptionStrategy + | OneEventConsumptionStrategy; /** * A list containing all the events that must be consumed. */ -export type EventConsumptionStrategyAll = EventFilter[]; +export type AllEventConsumptionStrategyConfiguration = EventFilter[]; /** * A list containing any of the events to consume. */ -export type EventConsumptionStrategyAny = EventFilter[]; +export type AnyEventConsumptionStrategyConfiguration = EventFilter[]; /** * Intentionally triggers and propagates errors. */ export type RaiseTask = TaskBase & { - raise?: RaiseTaskRaise; + raise?: RaiseTaskConfiguration; [k: string]: unknown; }; +export type RaiseTaskRaiseError = Error | string; /** * Provides the capability to execute external containers, shell commands, scripts, or workflows. */ export type RunTask = TaskBase & { - run?: RunTaskRun; + run?: RunTaskConfiguration; [k: string]: unknown; }; -export type RunTaskRun = - | { - container: RunTaskRunContainer; - [k: string]: unknown; - } - | { - script: RunTaskRunScript; - [k: string]: unknown; - } - | { - shell: RunTaskRunShell; - [k: string]: unknown; - } - | { - workflow: RunTaskRunWorkflow; - [k: string]: unknown; - }; -export type RunTaskRunScript = - | { - code: string; - [k: string]: unknown; - } - | { - source: ExternalResource; - [k: string]: unknown; - }; /** - * A task used to set data + * The configuration of the process to execute. + */ +export type RunTaskConfiguration = RunContainer | RunScript | RunShell | RunWorkflow; +/** + * The configuration of the script to run. + */ +export type Script = InlineScript | ExternalScript; +/** + * A task used to set data. */ export type SetTask = TaskBase & { - set?: SetTaskSet; + set?: SetTaskConfiguration; [k: string]: unknown; }; /** - * Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria + * Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria. */ export type SwitchTask = TaskBase & { - switch?: SwitchTaskSwitch; + switch?: SwitchTaskConfiguration; [k: string]: unknown; }; /** + * The definition of the switch to use. + * * @minItems 1 */ -export type SwitchTaskSwitch = [ - { - [k: string]: SwitchTaskSwitchCase; - }, - ...{ - [k: string]: SwitchTaskSwitchCase; - }[], -]; +export type SwitchTaskConfiguration = [SwitchItem, ...SwitchItem[]]; /** * Serves as a mechanism within workflows to handle errors gracefully, potentially retrying failed tasks before proceeding with alternate ones. */ @@ -268,37 +315,11 @@ export type TryTask = TaskBase & { catch?: TryTaskCatch; [k: string]: unknown; }; +export type TryTaskCatchRetry = RetryPolicy | string; /** * The retry duration backoff. */ -export type RetryPolicyBackoff = - | { - /** - * The definition of the constant backoff to use, if any. - */ - constant: { - [k: string]: unknown; - }; - [k: string]: unknown; - } - | { - /** - * The definition of the exponential backoff to use, if any. - */ - exponential: { - [k: string]: unknown; - }; - [k: string]: unknown; - } - | { - /** - * The definition of the linear backoff to use, if any. - */ - linear: { - [k: string]: unknown; - }; - [k: string]: unknown; - }; +export type RetryBackoff = ConstantBackoff | ExponentialBackOff | LinearBackoff; /** * Allows workflows to pause or delay their execution for a specified period of time. */ @@ -306,31 +327,35 @@ export type WaitTask = TaskBase & { wait?: Duration; [k: string]: unknown; }; -export type TaskList = { - [k: string]: Task; -}[]; +/** + * List of named tasks to perform. + */ +export type TaskList = TaskItem[]; /** * The workflow's extensions. */ -export type UseExtensions = { - [k: string]: Extension; -}[]; +export type UseExtensions = ExtensionItem[]; +/** + * The workflow's reusable secrets. + */ +export type UseSecrets = string[]; +export type WorkflowTimeout = Timeout | string; /** - * Serverless Workflow DSL - Workflow Schema + * Serverless Workflow DSL - Workflow Schema. */ export interface Workflow { document: Document; input?: Input; use?: Use; do: TaskList; - timeout?: Timeout; + timeout?: WorkflowTimeout; output?: Output; schedule?: Schedule; [k: string]: unknown; } /** - * Documents the workflow + * Documents the workflow. */ export interface Document { /** @@ -357,13 +382,19 @@ export interface Document { * The workflow's Markdown summary. */ summary?: string; - tags?: DocumentTags; - [k: string]: unknown; + tags?: WorkflowTags; + metadata?: WorkflowMetadata; } /** * A key/value mapping of the workflow's tags, if any. */ -export interface DocumentTags { +export interface WorkflowTags { + [k: string]: unknown; +} +/** + * Holds additional information about the workflow. + */ +export interface WorkflowMetadata { [k: string]: unknown; } /** @@ -371,13 +402,56 @@ export interface DocumentTags { */ export interface Input { schema?: Schema; + from?: InputFrom; +} +export interface SchemaInline { + /** + * The schema's inline definition. + */ + document: { + [k: string]: unknown; + }; + [k: string]: unknown; +} +export interface SchemaExternal { + resource: ExternalResource; + [k: string]: unknown; +} +/** + * Represents an external resource. + */ +export interface ExternalResource { + /** + * The name of the external resource, if any. + */ + name?: string; + endpoint: Endpoint; +} +export interface EndpointConfiguration { + uri: EndpointUri; + authentication?: ReferenceableAuthenticationPolicy; +} +/** + * The reference of the authentication policy to use. + */ +export interface AuthenticationPolicyReference { /** - * A runtime expression, if any, used to mutate and/or filter the input of the workflow or task. + * The name of the authentication policy to use. */ - from?: string; + use: string; [k: string]: unknown; } -export interface AuthenticationPolicyBasic { +/** + * Use basic authentication. + */ +export interface BasicAuthenticationPolicy { + basic: BasicAuthenticationPolicyConfiguration; + [k: string]: unknown; +} +/** + * Inline configuration of the basic authentication policy. + */ +export interface BasicAuthenticationProperties { /** * The username to use. */ @@ -388,31 +462,82 @@ export interface AuthenticationPolicyBasic { password: string; [k: string]: unknown; } -export interface AuthenticationPolicyBearer { +/** + * Represents an authentication policy based on secrets. + */ +export interface SecretBasedAuthenticationPolicy { + /** + * The name of the authentication policy to use. + */ + use: string; +} +/** + * Use bearer authentication. + */ +export interface BearerAuthenticationPolicy { + bearer: BearerAuthenticationPolicyConfiguration; + [k: string]: unknown; +} +/** + * Inline configuration of the bearer authentication policy. + */ +export interface BearerAuthenticationProperties { /** * The bearer token to use. */ token: string; [k: string]: unknown; } -export interface AuthenticationPolicyOauth2 { +/** + * Use digest authentication. + */ +export interface DigestAuthenticationPolicy { + digest: DigestAuthenticationPolicyConfiguration; + [k: string]: unknown; +} +/** + * Inline configuration of the digest authentication policy. + */ +export interface DigestAuthenticationProperties { /** - * The URI that references the OAuth2 authority to use. + * The username to use. */ - authority: string; + username: string; /** - * The grant type to use. + * The password to use. */ - grant: string; - client: AuthenticationPolicyOauth2Client; + password: string; + [k: string]: unknown; +} +/** + * Use OAuth2 authentication. + */ +export interface OAuth2AuthenticationPolicy { + oauth2: OAuth2AuthenticationPolicyConfiguration; + [k: string]: unknown; +} +/** + * Inline configuration of the OAuth2 authentication policy. + */ +export interface OAuth2AutenthicationData { /** - * The scopes, if any, to request the token for. + * The URI that references the OAuth2 authority to use. */ - scopes?: string[]; + authority?: string; /** - * The audiences, if any, to request the token for. + * The grant type to use. */ - audiences?: string[]; + grant?: + | 'authorization_code' + | 'client_credentials' + | 'password' + | 'refresh_token' + | 'urn:ietf:params:oauth:grant-type:token-exchange'; + client?: OAuth2AutenthicationDataClient; + request?: OAuth2TokenRequest; + issuers?: OAuth2Issuers; + scopes?: OAuth2AutenthicationDataScopes; + audiences?: OAuth2AutenthicationDataAudiences; /** * The username to use. Used only if the grant type is Password. */ @@ -421,32 +546,109 @@ export interface AuthenticationPolicyOauth2 { * The password to use. Used only if the grant type is Password. */ password?: string; - subject?: Oauth2Token; - actor?: Oauth2Token; + subject?: OAuth2TokenDefinition; + actor?: OAuth2TokenDefinition; [k: string]: unknown; } -export interface AuthenticationPolicyOauth2Client { +/** + * The definition of an OAuth2 client. + */ +export interface OAuth2AutenthicationDataClient { /** * The client id to use. */ - id: string; + id?: string; /** * The client secret to use, if any. */ secret?: string; + /** + * A JWT containing a signed assertion with your application credentials. + */ + assertion?: string; + /** + * The authentication method to use to authenticate the client. + */ + authentication?: 'client_secret_basic' | 'client_secret_post' | 'client_secret_jwt' | 'private_key_jwt' | 'none'; +} +/** + * The configuration of an OAuth2 token request + */ +export interface OAuth2TokenRequest { + encoding?: 'application/x-www-form-urlencoded' | 'application/json'; [k: string]: unknown; } -export interface Oauth2Token { +/** + * Represents an OAuth2 token. + */ +export interface OAuth2TokenDefinition { /** - * The security token to use to use. + * The security token to use. */ token: string; /** - * The type of the security token to use to use. + * The type of the security token to use. */ type: string; +} +/** + * The endpoint configurations for OAuth2. + */ +export interface OAuth2AuthenticationPropertiesEndpoints { + /** + * The relative path to the token endpoint. Defaults to `/oauth2/token`. + */ + token?: string; + /** + * The relative path to the revocation endpoint. Defaults to `/oauth2/revoke`. + */ + revocation?: string; + /** + * The relative path to the introspection endpoint. Defaults to `/oauth2/introspect`. + */ + introspection?: string; + [k: string]: unknown; +} +/** + * Use OpenIdConnect authentication. + */ +export interface OpenIdConnectAuthenticationPolicy { + oidc: OpenIdConnectAuthenticationPolicyConfiguration; [k: string]: unknown; } +/** + * Inline configuration of the OAuth2 authentication policy. + */ +export interface OpenIdConnectAuthenticationProperties { + /** + * The URI that references the OAuth2 authority to use. + */ + authority?: string; + /** + * The grant type to use. + */ + grant?: + | 'authorization_code' + | 'client_credentials' + | 'password' + | 'refresh_token' + | 'urn:ietf:params:oauth:grant-type:token-exchange'; + client?: OAuth2AutenthicationDataClient; + request?: OAuth2TokenRequest; + issuers?: OAuth2Issuers; + scopes?: OAuth2AutenthicationDataScopes; + audiences?: OAuth2AutenthicationDataAudiences; + /** + * The username to use. Used only if the grant type is Password. + */ + username?: string; + /** + * The password to use. Used only if the grant type is Password. + */ + password?: string; + subject?: OAuth2TokenDefinition; + actor?: OAuth2TokenDefinition; +} /** * Defines the workflow's reusable components. */ @@ -456,11 +658,8 @@ export interface Use { extensions?: UseExtensions; functions?: UseFunctions; retries?: UseRetries; - /** - * The workflow's secrets. - */ - secrets?: string[]; - [k: string]: unknown; + secrets?: UseSecrets; + timeouts?: UseTimeouts; } /** * The workflow's reusable authentication policies. @@ -474,19 +673,16 @@ export interface UseAuthentications { export interface UseErrors { [k: string]: Error; } +/** + * Represents an error. + */ export interface Error { - /** - * A URI reference that identifies the error type. - */ - type: string; + type: ErrorType; /** * The status code generated by the origin for this occurrence of the error. */ status: number; - /** - * A JSON Pointer used to reference the component the error originates from. - */ - instance: string; + instance?: ErrorInstance; /** * A short, human-readable summary of the error. */ @@ -495,10 +691,12 @@ export interface Error { * A human-readable explanation specific to this occurrence of the error. */ detail?: string; - [k: string]: unknown; +} +export interface ExtensionItem { + [k: string]: Extension; } /** - * The definition of a an extension. + * The definition of an extension. */ export interface Extension { /** @@ -523,18 +721,21 @@ export interface Extension { when?: string; before?: TaskList; after?: TaskList; - [k: string]: unknown; } +export interface TaskItem { + [k: string]: Task; +} +/** + * An object inherited by all tasks. + */ export interface TaskBase { - /** - * A runtime expression, if any, used to determine whether or not the task should be run. - */ - if?: string; + if?: TaskBaseIf; input?: Input; output?: Output; export?: Export; - timeout?: Timeout; + timeout?: TaskBaseTimeout; then?: FlowDirective; + metadata?: TaskMetadata; [k: string]: unknown; } /** @@ -542,34 +743,25 @@ export interface TaskBase { */ export interface Output { schema?: Schema; - /** - * A runtime expression, if any, used to mutate and/or filter the output of the workflow or task. - */ - as?: string; - [k: string]: unknown; + as?: OutputAs; } /** - * Set the content of the context. + * Set the content of the context. . */ export interface Export { schema?: Schema; - /** - * A runtime expression, if any, used to export the output data to the context. - */ - as?: string; - [k: string]: unknown; + as?: ExportAs; } /** * The definition of a timeout. */ export interface Timeout { after: Duration; - [k: string]: unknown; } /** - * The definition of a duration. + * The inline definition of a duration. */ -export interface Duration { +export interface DurationInline { /** * Number of days, if any. */ @@ -590,12 +782,17 @@ export interface Duration { * Number of milliseconds, if any. */ milliseconds?: number; +} +/** + * Holds additional information about the task. + */ +export interface TaskMetadata { [k: string]: unknown; } /** - * Defines the AsyncAPI call to perform. + * The Async API call arguments. */ -export interface CallAsyncAPIWith { +export interface AsyncApiArguments { document: ExternalResource; /** * A reference to the AsyncAPI operation to call. @@ -613,27 +810,28 @@ export interface CallAsyncAPIWith { * The name of the binding to use. If not set, defaults to the first binding defined by the operation. */ binding?: string; - /** - * The payload to call the AsyncAPI operation with, if any. - */ - payload?: { - [k: string]: unknown; - }; - authentication?: CallAsyncAPIWithAuthentication; + payload?: WithAsyncAPIPayload; + authentication?: ReferenceableAuthenticationPolicy; } /** - * Defines the GRPC call to perform. + * The payload to call the AsyncAPI operation with, if any. */ -export interface CallGRPCWith { +export interface WithAsyncAPIPayload { + [k: string]: unknown; +} +/** + * The GRPC call arguments. + */ +export interface GRPCArguments { proto: ExternalResource; - service: CallGRPCWithService; + service: WithGRPCService; /** * The name of the method to call on the defined GRPC service. */ method: string; - arguments?: CallGRPCWithArguments; + arguments?: WithGRPCArguments; } -export interface CallGRPCWithService { +export interface WithGRPCService { /** * The name of the GRPC service to call. */ @@ -646,60 +844,60 @@ export interface CallGRPCWithService { * The port number of the GRPC service to call. */ port?: number; - authentication?: CallGRPCWithServiceAuthentication; - [k: string]: unknown; + authentication?: ReferenceableAuthenticationPolicy; } /** * The arguments, if any, to call the method with. */ -export interface CallGRPCWithArguments { +export interface WithGRPCArguments { [k: string]: unknown; } /** - * Defines the HTTP call to perform. + * The HTTP call arguments. */ -export interface CallHTTPWith { +export interface HTTPArguments { /** * The HTTP method of the HTTP request to perform. */ method: string; - endpoint: CallHTTPWithEndpoint; - /** - * A name/value mapping of the headers, if any, of the HTTP request to perform. - */ - headers?: { - [k: string]: unknown; - }; - /** - * The body, if any, of the HTTP request to perform. - */ - body?: { - [k: string]: unknown; - }; + endpoint: Endpoint; + headers?: WithHTTPHeaders; + body?: WithHTTPBody; + query?: WithHTTPQuery; /** * The http call output format. Defaults to 'content'. */ output?: 'raw' | 'content' | 'response'; } -export interface Endpoint { - /** - * The endpoint's URI. - */ - uri: string; - authentication?: EndpointAuthentication; +/** + * A name/value mapping of the headers, if any, of the HTTP request to perform. + */ +export interface WithHTTPHeaders { [k: string]: unknown; } /** - * Defines the OpenAPI call to perform. + * The body, if any, of the HTTP request to perform. + */ +export interface WithHTTPBody { + [k: string]: unknown; +} +/** + * A name/value mapping of the query parameters, if any, of the HTTP request to perform. */ -export interface CallOpenAPIWith { +export interface WithHTTPQuery { + [k: string]: unknown; +} +/** + * The OpenAPI call arguments. + */ +export interface OpenAPIArguments { document: ExternalResource; /** * The id of the OpenAPI operation to call. */ operationId: string; - parameters?: CallOpenAPIWithParameters; - authentication?: CallOpenAPIWithAuthentication; + parameters?: WithOpenAPIParameters; + authentication?: ReferenceableAuthenticationPolicy; /** * The http call output format. Defaults to 'content'. */ @@ -708,50 +906,67 @@ export interface CallOpenAPIWith { /** * A name/value mapping of the parameters of the OpenAPI operation to call. */ -export interface CallOpenAPIWithParameters { +export interface WithOpenAPIParameters { [k: string]: unknown; } /** * A name/value mapping of the parameters, if any, to call the function with. */ -export interface CallFunctionWith { +export interface FunctionArguments { [k: string]: unknown; } -export interface ForkTaskFork { +/** + * The configuration of the branches to perform concurrently. + */ +export interface ForkTaskConfiguration { branches: TaskList; /** * Indicates whether or not the concurrent tasks are racing against each other, with a single possible winner, which sets the composite task's output. */ compete?: boolean; - [k: string]: unknown; } -export interface EmitTaskEmit { - event: EmitTaskEmitEvent; +/** + * The configuration of an event's emission. + */ +export interface EmitTaskConfiguration { + event: EmitEventDefinition; +} +/** + * The definition of the event to emit. + */ +export interface EmitEventDefinition { + with?: EmitEventWith; [k: string]: unknown; } -export interface EmitTaskEmitEvent { +/** + * Defines the properties of event to emit. + */ +export interface EmitEventWith { /** - * The event's unique identifier + * The event's unique identifier. */ id?: string; - /** - * Identifies the context in which an event happened - */ - source: string; + source: EventSource; /** * This attribute contains a value describing the type of event related to the originating occurrence. */ type: string; - time?: string; + time?: EventTime; + /** + * The subject of the event. + */ subject?: string; /** * Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format. */ datacontenttype?: string; - dataschema?: string; + dataschema?: EventDataschema; [k: string]: unknown; } -export interface ForTaskFor { +/** + * The definition of the loop that iterates over a range of values. + */ +export interface ForTaskConfiguration { /** * The name of the variable used to store the current item being enumerated. */ @@ -764,43 +979,47 @@ export interface ForTaskFor { * The name of the variable used to store the index of the current item being enumerated. */ at?: string; - [k: string]: unknown; } -export interface ListenTaskListen { +/** + * The configuration of the listener to use. + */ +export interface ListenTaskConfiguration { to: EventConsumptionStrategy; +} +export interface AllEventConsumptionStrategy { + all: AllEventConsumptionStrategyConfiguration; [k: string]: unknown; } /** * An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes. */ export interface EventFilter { - with: EventFilterWith; + with: WithEvent; correlate?: EventFilterCorrelate; - [k: string]: unknown; } /** * An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes. */ -export interface EventFilterWith { +export interface WithEvent { /** - * The event's unique identifier + * The event's unique identifier. */ id?: string; - /** - * Identifies the context in which an event happened - */ - source?: string; + source?: EventSource; /** * This attribute contains a value describing the type of event related to the originating occurrence. */ type?: string; - time?: string; + time?: EventTime; + /** + * The subject of the event. + */ subject?: string; /** * Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format. */ datacontenttype?: string; - dataschema?: string; + dataschema?: EventDataschema; [k: string]: unknown; } /** @@ -819,61 +1038,123 @@ export interface EventFilterCorrelate { [k: string]: unknown; }; } -export interface RaiseTaskRaise { - error: Error; +export interface AnyEventConsumptionStrategy { + any: AnyEventConsumptionStrategyConfiguration; + [k: string]: unknown; +} +export interface OneEventConsumptionStrategy { + one: EventFilter; + [k: string]: unknown; +} +/** + * The definition of the error to raise. + */ +export interface RaiseTaskConfiguration { + error: RaiseTaskRaiseError; +} +/** + * Enables the execution of external processes encapsulated within a containerized environment. + */ +export interface RunContainer { + container: Container; [k: string]: unknown; } -export interface RunTaskRunContainer { +/** + * The configuration of the container to run. + */ +export interface Container { /** * The name of the container image to run. */ image: string; /** - * The command, if any, to execute on the container + * The command, if any, to execute on the container. */ command?: string; - /** - * The container's port mappings, if any. - */ - ports?: { - [k: string]: unknown; - }; - /** - * The container's volume mappings, if any. - */ - volumes?: { - [k: string]: unknown; - }; - /** - * A key/value mapping of the environment variables, if any, to use when running the configured process. - */ - environment?: { - [k: string]: unknown; - }; + ports?: ContainerPorts; + volumes?: ContainerVolumes; + environment?: ContainerEnvironment; +} +/** + * The container's port mappings, if any. + */ +export interface ContainerPorts { + [k: string]: unknown; +} +/** + * The container's volume mappings, if any. + */ +export interface ContainerVolumes { + [k: string]: unknown; +} +/** + * A key/value mapping of the environment variables, if any, to use when running the configured process. + */ +export interface ContainerEnvironment { [k: string]: unknown; } -export interface RunTaskRunShell { +/** + * Enables the execution of custom scripts or code within a workflow, empowering workflows to perform specialized logic, data processing, or integration tasks by executing user-defined scripts written in various programming languages. + */ +export interface RunScript { + script: Script; + [k: string]: unknown; +} +/** + * The script's code. + */ +export interface InlineScript { + code: string; + [k: string]: unknown; +} +/** + * The script's resource. + */ +export interface ExternalScript { + source: ExternalResource; + [k: string]: unknown; +} +/** + * Enables the execution of shell commands within a workflow, enabling workflows to interact with the underlying operating system and perform system-level operations, such as file manipulation, environment configuration, or system administration tasks. + */ +export interface RunShell { + shell: Shell; + [k: string]: unknown; +} +/** + * The configuration of the shell command to run. + */ +export interface Shell { /** * The shell command to run. */ command: string; - arguments?: RunTaskRunShellArguments; - environment?: RunTaskRunShellEnvironment; - [k: string]: unknown; + arguments?: ShellArguments; + environment?: ShellEnvironment; } /** * A list of the arguments of the shell command to run. */ -export interface RunTaskRunShellArguments { +export interface ShellArguments { [k: string]: unknown; } /** * A key/value mapping of the environment variables, if any, to use when running the configured process. */ -export interface RunTaskRunShellEnvironment { +export interface ShellEnvironment { [k: string]: unknown; } -export interface RunTaskRunWorkflow { +/** + * Enables the invocation and execution of nested workflows within a parent workflow, facilitating modularization, reusability, and abstraction of complex logic or business processes by encapsulating them into standalone workflow units. + */ +export interface RunWorkflow { + workflow: SubflowConfiguration; + [k: string]: unknown; +} +/** + * The configuration of the workflow to run. + */ +export interface SubflowConfiguration { /** * The namespace the workflow to run belongs to. */ @@ -883,54 +1164,61 @@ export interface RunTaskRunWorkflow { */ name: string; /** - * The version of the workflow to run. Defaults to latest + * The version of the workflow to run. Defaults to latest. */ version: string; - input?: RunTaskRunWorkflowInput; - [k: string]: unknown; + input?: SubflowInput; } /** * The data, if any, to pass as input to the workflow to execute. The value should be validated against the target workflow's input schema, if specified. */ -export interface RunTaskRunWorkflowInput { +export interface SubflowInput { [k: string]: unknown; } /** - * The data to set + * The data to set. */ -export interface SetTaskSet { +export interface SetTaskConfiguration { [k: string]: unknown; } -export interface SwitchTaskSwitchCase { - /** - * The case's name. - */ - name?: string; +export interface SwitchItem { + [k: string]: SwitchCase; +} +/** + * The definition of a case within a switch task, defining a condition and corresponding tasks to execute if the condition is met. + */ +export interface SwitchCase { /** * A runtime expression used to determine whether or not the case matches. */ when?: string; - then?: FlowDirective; + then: FlowDirective; [k: string]: unknown; } +/** + * The object used to define the errors to catch. + */ export interface TryTaskCatch { - errors?: { - [k: string]: unknown; - }; + errors?: CatchErrors; /** * The name of the runtime expression variable to save the error as. Defaults to 'error'. */ as?: string; /** - * A runtime expression used to determine whether or not to catch the filtered error + * A runtime expression used to determine whether or not to catch the filtered error. */ when?: string; /** - * A runtime expression used to determine whether or not to catch the filtered error + * A runtime expression used to determine whether or not to catch the filtered error. */ exceptWhen?: string; - retry?: RetryPolicy; + retry?: TryTaskCatchRetry; do?: TaskList; +} +/** + * The configuration of a concept used to catch errors. + */ +export interface CatchErrors { [k: string]: unknown; } /** @@ -946,26 +1234,50 @@ export interface RetryPolicy { */ exceptWhen?: string; delay?: Duration; - backoff?: RetryPolicyBackoff; - limit?: RetryPolicyLimit; + backoff?: RetryBackoff; + limit?: RetryLimit; jitter?: RetryPolicyJitter; +} +export interface ConstantBackoff { + /** + * The definition of the constant backoff to use, if any. + */ + constant: { + [k: string]: unknown; + }; + [k: string]: unknown; +} +export interface ExponentialBackOff { + /** + * The definition of the exponential backoff to use, if any. + */ + exponential: { + [k: string]: unknown; + }; + [k: string]: unknown; +} +export interface LinearBackoff { + /** + * The definition of the linear backoff to use, if any. + */ + linear: { + [k: string]: unknown; + }; [k: string]: unknown; } /** - * The retry limit, if any + * The retry limit, if any. */ -export interface RetryPolicyLimit { - attempt?: RetryPolicyLimitAttempt; +export interface RetryLimit { + attempt?: RetryLimitAttempt; duration?: Duration; - [k: string]: unknown; } -export interface RetryPolicyLimitAttempt { +export interface RetryLimitAttempt { /** * The maximum amount of retry attempts, if any. */ count?: number; duration?: Duration; - [k: string]: unknown; } /** * The parameters, if any, that control the randomness or variability of the delay between retry attempts. @@ -973,7 +1285,6 @@ export interface RetryPolicyLimitAttempt { export interface RetryPolicyJitter { from: Duration; to: Duration; - [k: string]: unknown; } /** * The workflow's reusable functions. @@ -988,15 +1299,20 @@ export interface UseRetries { [k: string]: RetryPolicy; } /** - * Schedules the workflow + * The workflow's reusable timeouts. + */ +export interface UseTimeouts { + [k: string]: Timeout; +} +/** + * Schedules the workflow. */ export interface Schedule { every?: Duration; /** - * Specifies the schedule using a cron expression, e.g., '0 0 * * *' for daily at midnight." + * Specifies the schedule using a cron expression, e.g., '0 0 * * *' for daily at midnight. */ cron?: string; after?: Duration; on?: EventConsumptionStrategy; - [k: string]: unknown; } diff --git a/src/lib/generated/schema/__internal_workflow.json b/src/lib/generated/schema/__internal_workflow.json index b6179138..e01dbe07 100644 --- a/src/lib/generated/schema/__internal_workflow.json +++ b/src/lib/generated/schema/__internal_workflow.json @@ -1,11 +1,18 @@ { - "$id": "https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json", + "$id": "https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json", "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "Serverless Workflow DSL - Workflow Schema", + "description": "Serverless Workflow DSL - Workflow Schema.", "type": "object", + "required": [ + "document", + "do" + ], "properties": { "document": { "type": "object", + "title": "Document", + "description": "Documents the workflow.", + "unevaluatedProperties": false, "properties": { "dsl": { "type": "string", @@ -37,9 +44,15 @@ }, "tags": { "type": "object", + "title": "WorkflowTags", "description": "A key/value mapping of the workflow's tags, if any.", - "additionalProperties": true, - "title": "DocumentTags" + "additionalProperties": true + }, + "metadata": { + "type": "object", + "title": "WorkflowMetadata", + "description": "Holds additional information about the workflow.", + "additionalProperties": true } }, "required": [ @@ -47,177 +60,218 @@ "namespace", "name", "version" - ], - "description": "Documents the workflow", - "title": "Document" + ] }, "input": { "$ref": "#/$defs/input", + "title": "Input", "description": "Configures the workflow's input.", - "type": "object", - "title": "Input" + "type": "object" }, "use": { "type": "object", + "title": "Use", + "description": "Defines the workflow's reusable components.", + "unevaluatedProperties": false, "properties": { "authentications": { "type": "object", + "title": "UseAuthentications", + "description": "The workflow's reusable authentication policies.", "additionalProperties": { "$ref": "#/$defs/authenticationPolicy" - }, - "description": "The workflow's reusable authentication policies.", - "title": "UseAuthentications" + } }, "errors": { "type": "object", + "title": "UseErrors", + "description": "The workflow's reusable errors.", "additionalProperties": { "$ref": "#/$defs/error" - }, - "description": "The workflow's reusable errors.", - "title": "UseErrors" + } }, "extensions": { "type": "array", + "title": "UseExtensions", + "description": "The workflow's extensions.", "items": { "type": "object", + "title": "ExtensionItem", "minProperties": 1, "maxProperties": 1, "additionalProperties": { "$ref": "#/$defs/extension" } - }, - "description": "The workflow's extensions.", - "title": "UseExtensions" + } }, "functions": { "type": "object", + "title": "UseFunctions", + "description": "The workflow's reusable functions.", "additionalProperties": { "$ref": "#/$defs/task" - }, - "description": "The workflow's reusable functions.", - "title": "UseFunctions" + } }, "retries": { "type": "object", + "title": "UseRetries", + "description": "The workflow's reusable retry policies.", "additionalProperties": { "$ref": "#/$defs/retryPolicy" - }, - "description": "The workflow's reusable retry policies.", - "title": "UseRetries" + } }, "secrets": { "type": "array", + "title": "UseSecrets", + "description": "The workflow's reusable secrets.", "items": { - "type": "string" - }, - "description": "The workflow's secrets." + "type": "string", + "description": "The workflow's secrets." + } + }, + "timeouts": { + "type": "object", + "title": "UseTimeouts", + "description": "The workflow's reusable timeouts.", + "additionalProperties": { + "$ref": "#/$defs/timeout" + } } - }, - "description": "Defines the workflow's reusable components.", - "title": "Use" + } }, "do": { - "description": "Defines the task(s) the workflow must perform", "$ref": "#/$defs/taskList", - "type": "object", - "title": "Do" + "title": "Do", + "description": "Defines the task(s) the workflow must perform.", + "type": "object" }, "timeout": { - "$ref": "#/$defs/timeout", - "description": "The workflow's timeout configuration, if any.", - "type": "object", - "title": "Timeout" + "oneOf": [ + { + "$ref": "#/$defs/timeout", + "title": "TimeoutDefinition", + "description": "The workflow's timeout configuration, if any.", + "type": "object" + }, + { + "type": "string", + "description": "The name of the workflow's timeout, if any." + } + ], + "title": "WorkflowTimeout" }, "output": { "$ref": "#/$defs/output", + "title": "Output", "description": "Configures the workflow's output.", - "type": "object", - "title": "Output" + "type": "object" }, "schedule": { "type": "object", + "title": "Schedule", + "description": "Schedules the workflow.", + "unevaluatedProperties": false, "properties": { "every": { "$ref": "#/$defs/duration", + "title": "ScheduleEvery", "description": "Specifies the duration of the interval at which the workflow should be executed.", - "type": "object", - "title": "ScheduleEvery" + "type": "object" }, "cron": { "type": "string", - "description": "Specifies the schedule using a cron expression, e.g., '0 0 * * *' for daily at midnight.\"" + "description": "Specifies the schedule using a cron expression, e.g., '0 0 * * *' for daily at midnight." }, "after": { "$ref": "#/$defs/duration", + "title": "ScheduleAfter", "description": "Specifies a delay duration that the workflow must wait before starting again after it completes.", - "type": "object", - "title": "ScheduleAfter" + "type": "object" }, "on": { "$ref": "#/$defs/eventConsumptionStrategy", + "title": "ScheduleOn", "description": "Specifies the events that trigger the workflow execution.", - "type": "object", - "title": "ScheduleOn" + "type": "object" } - }, - "description": "Schedules the workflow", - "title": "Schedule" + } } }, "$defs": { "taskList": { + "title": "TaskList", + "description": "List of named tasks to perform.", "type": "array", "items": { "type": "object", + "title": "TaskItem", "minProperties": 1, "maxProperties": 1, "additionalProperties": { "$ref": "#/$defs/task" } - }, - "title": "TaskList" + } }, "taskBase": { "type": "object", + "title": "TaskBase", + "description": "An object inherited by all tasks.", "properties": { "if": { "type": "string", + "title": "TaskBaseIf", "description": "A runtime expression, if any, used to determine whether or not the task should be run." }, "input": { "$ref": "#/$defs/input", + "title": "TaskBaseInput", "description": "Configure the task's input.", - "type": "object", - "title": "TaskBaseInput" + "type": "object" }, "output": { "$ref": "#/$defs/output", + "title": "TaskBaseOutput", "description": "Configure the task's output.", - "type": "object", - "title": "TaskBaseOutput" + "type": "object" }, "export": { "$ref": "#/$defs/export", + "title": "TaskBaseExport", "description": "Export task output to context.", - "type": "object", - "title": "TaskBaseExport" + "type": "object" }, "timeout": { - "$ref": "#/$defs/timeout", - "description": "The task's timeout configuration, if any.", - "type": "object", + "oneOf": [ + { + "$ref": "#/$defs/timeout", + "title": "TaskTimeoutDefinition", + "description": "The task's timeout configuration, if any.", + "type": "object" + }, + { + "type": "string", + "description": "The name of the task's timeout, if any." + } + ], "title": "TaskBaseTimeout" }, "then": { "$ref": "#/$defs/flowDirective", + "title": "TaskBaseThen", "description": "The flow directive to be performed upon completion of the task.", + "type": "object" + }, + "metadata": { "type": "object", - "title": "TaskBaseThen" + "title": "TaskMetadata", + "description": "Holds additional information about the task.", + "additionalProperties": true } - }, - "title": "TaskBase" + } }, "task": { + "title": "Task", + "description": "A discrete unit of work that contributes to achieving the overall objectives defined by the workflow.", "unevaluatedProperties": false, "oneOf": [ { @@ -268,13 +322,15 @@ "$ref": "#/$defs/waitTask", "type": "object" } - ], - "title": "Task" + ] }, "callTask": { + "title": "CallTask", + "description": "Defines the call to perform.", "oneOf": [ { "title": "CallAsyncAPI", + "description": "Defines the AsyncAPI call to perform.", "$ref": "#/$defs/taskBase", "type": "object", "required": [ @@ -289,12 +345,14 @@ }, "with": { "type": "object", + "title": "AsyncApiArguments", + "description": "The Async API call arguments.", "properties": { "document": { "$ref": "#/$defs/externalResource", + "title": "WithAsyncAPIDocument", "description": "The document that defines the AsyncAPI operation to call.", - "type": "object", - "title": "CallAsyncAPIWithDocument" + "type": "object" }, "operationRef": { "type": "string", @@ -314,34 +372,27 @@ }, "payload": { "type": "object", + "title": "WithAsyncAPIPayload", "description": "The payload to call the AsyncAPI operation with, if any." }, "authentication": { + "$ref": "#/$defs/referenceableAuthenticationPolicy", + "title": "WithAsyncAPIAuthentication", "description": "The authentication policy, if any, to use when calling the AsyncAPI operation.", - "oneOf": [ - { - "$ref": "#/$defs/authenticationPolicy", - "type": "object" - }, - { - "type": "string" - } - ], - "title": "CallAsyncAPIWithAuthentication" + "type": "object" } }, "required": [ "document", "operationRef" ], - "additionalProperties": false, - "description": "Defines the AsyncAPI call to perform.", - "title": "CallAsyncAPIWith" + "unevaluatedProperties": false } } }, { "title": "CallGRPC", + "description": "Defines the GRPC call to perform.", "$ref": "#/$defs/taskBase", "type": "object", "unevaluatedProperties": false, @@ -356,15 +407,19 @@ }, "with": { "type": "object", + "title": "GRPCArguments", + "description": "The GRPC call arguments.", "properties": { "proto": { "$ref": "#/$defs/externalResource", + "title": "WithGRPCProto", "description": "The proto resource that describes the GRPC service to call.", - "type": "object", - "title": "CallGRPCWithProto" + "type": "object" }, "service": { "type": "object", + "title": "WithGRPCService", + "unevaluatedProperties": false, "properties": { "name": { "type": "string", @@ -372,34 +427,26 @@ }, "host": { "type": "string", - "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$", - "description": "The hostname of the GRPC service to call." + "description": "The hostname of the GRPC service to call.", + "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$" }, "port": { "type": "integer", - "min": 0, - "max": 65535, - "description": "The port number of the GRPC service to call." + "description": "The port number of the GRPC service to call.", + "minimum": 0, + "maximum": 65535 }, "authentication": { + "$ref": "#/$defs/referenceableAuthenticationPolicy", + "title": "WithGRPCServiceAuthentication", "description": "The endpoint's authentication policy, if any.", - "oneOf": [ - { - "$ref": "#/$defs/authenticationPolicy", - "type": "object" - }, - { - "type": "string" - } - ], - "title": "CallGRPCWithServiceAuthentication" + "type": "object" } }, "required": [ "name", "host" - ], - "title": "CallGRPCWithService" + ] }, "method": { "type": "string", @@ -407,9 +454,9 @@ }, "arguments": { "type": "object", - "additionalProperties": true, + "title": "WithGRPCArguments", "description": "The arguments, if any, to call the method with.", - "title": "CallGRPCWithArguments" + "additionalProperties": true } }, "required": [ @@ -417,14 +464,13 @@ "service", "method" ], - "additionalProperties": false, - "description": "Defines the GRPC call to perform.", - "title": "CallGRPCWith" + "unevaluatedProperties": false } } }, { "title": "CallHTTP", + "description": "Defines the HTTP call to perform.", "$ref": "#/$defs/taskBase", "type": "object", "unevaluatedProperties": false, @@ -439,55 +485,56 @@ }, "with": { "type": "object", + "title": "HTTPArguments", + "description": "The HTTP call arguments.", "properties": { "method": { "type": "string", "description": "The HTTP method of the HTTP request to perform." }, "endpoint": { + "title": "WithHTTPEndpoint", "description": "The HTTP endpoint to send the request to.", - "oneOf": [ - { - "$ref": "#/$defs/endpoint", - "type": "object" - }, - { - "type": "string", - "format": "uri-template" - } - ], - "title": "CallHTTPWithEndpoint" + "$ref": "#/$defs/endpoint", + "type": "object" }, "headers": { "type": "object", + "title": "WithHTTPHeaders", "description": "A name/value mapping of the headers, if any, of the HTTP request to perform." }, "body": { + "title": "WithHTTPBody", "description": "The body, if any, of the HTTP request to perform.", "type": "object" }, + "query": { + "type": "object", + "title": "WithHTTPQuery", + "description": "A name/value mapping of the query parameters, if any, of the HTTP request to perform.", + "additionalProperties": true + }, "output": { "type": "string", + "description": "The http call output format. Defaults to 'content'.", "enum": [ "raw", "content", "response" - ], - "description": "The http call output format. Defaults to 'content'." + ] } }, "required": [ "method", "endpoint" ], - "additionalProperties": false, - "description": "Defines the HTTP call to perform.", - "title": "CallHTTPWith" + "unevaluatedProperties": false } } }, { "title": "CallOpenAPI", + "description": "Defines the OpenAPI call to perform.", "$ref": "#/$defs/taskBase", "type": "object", "unevaluatedProperties": false, @@ -502,12 +549,14 @@ }, "with": { "type": "object", + "title": "OpenAPIArguments", + "description": "The OpenAPI call arguments.", "properties": { "document": { "$ref": "#/$defs/externalResource", + "title": "WithOpenAPIDocument", "description": "The document that defines the OpenAPI operation to call.", - "type": "object", - "title": "CallOpenAPIWithDocument" + "type": "object" }, "operationId": { "type": "string", @@ -515,22 +564,15 @@ }, "parameters": { "type": "object", - "additionalProperties": true, + "title": "WithOpenAPIParameters", "description": "A name/value mapping of the parameters of the OpenAPI operation to call.", - "title": "CallOpenAPIWithParameters" + "additionalProperties": true }, "authentication": { + "$ref": "#/$defs/referenceableAuthenticationPolicy", + "title": "WithOpenAPIAuthentication", "description": "The authentication policy, if any, to use when calling the OpenAPI operation.", - "oneOf": [ - { - "$ref": "#/$defs/authenticationPolicy", - "type": "object" - }, - { - "type": "string" - } - ], - "title": "CallOpenAPIWithAuthentication" + "type": "object" }, "output": { "type": "string", @@ -546,14 +588,13 @@ "document", "operationId" ], - "additionalProperties": false, - "description": "Defines the OpenAPI call to perform.", - "title": "CallOpenAPIWith" + "unevaluatedProperties": false } } }, { "title": "CallFunction", + "description": "Defines the function call to perform.", "$ref": "#/$defs/taskBase", "type": "object", "unevaluatedProperties": false, @@ -575,19 +616,19 @@ }, "with": { "type": "object", - "additionalProperties": true, + "title": "FunctionArguments", "description": "A name/value mapping of the parameters, if any, to call the function with.", - "title": "CallFunctionWith" + "additionalProperties": true } } } - ], - "title": "CallTask" + ] }, "forkTask": { - "description": "Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output.", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "ForkTask", + "description": "Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output.", "unevaluatedProperties": false, "required": [ "fork" @@ -595,30 +636,32 @@ "properties": { "fork": { "type": "object", + "title": "ForkTaskConfiguration", + "description": "The configuration of the branches to perform concurrently.", + "unevaluatedProperties": false, "required": [ "branches" ], "properties": { "branches": { "$ref": "#/$defs/taskList", - "type": "object", - "title": "ForkTaskForkBranches" + "title": "ForkBranches", + "type": "object" }, "compete": { - "description": "Indicates whether or not the concurrent tasks are racing against each other, with a single possible winner, which sets the composite task's output.", "type": "boolean", + "description": "Indicates whether or not the concurrent tasks are racing against each other, with a single possible winner, which sets the composite task's output.", "default": false } - }, - "title": "ForkTaskFork" + } } - }, - "title": "ForkTask" + } }, "doTask": { - "description": "Allows to execute a list of tasks in sequence", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "DoTask", + "description": "Allows to execute a list of tasks in sequence.", "unevaluatedProperties": false, "required": [ "do" @@ -626,16 +669,17 @@ "properties": { "do": { "$ref": "#/$defs/taskList", - "type": "object", - "title": "DoTaskDo" + "title": "DoTaskConfiguration", + "description": "The configuration of the tasks to perform sequentially.", + "type": "object" } - }, - "title": "DoTask" + } }, "emitTask": { - "description": "Allows workflows to publish events to event brokers or messaging systems, facilitating communication and coordination between different components and services.", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "EmitTask", + "description": "Allows workflows to publish events to event brokers or messaging systems, facilitating communication and coordination between different components and services.", "required": [ "emit" ], @@ -643,59 +687,40 @@ "properties": { "emit": { "type": "object", + "title": "EmitTaskConfiguration", + "description": "The configuration of an event's emission.", + "unevaluatedProperties": false, "properties": { "event": { "type": "object", + "title": "EmitEventDefinition", + "description": "The definition of the event to emit.", "properties": { - "id": { - "type": "string", - "description": "The event's unique identifier" - }, - "source": { - "type": "string", - "format": "uri", - "description": "Identifies the context in which an event happened" - }, - "type": { - "type": "string", - "description": "This attribute contains a value describing the type of event related to the originating occurrence." - }, - "time": { - "type": "string", - "format": "date-time" - }, - "subject": { - "type": "string" - }, - "datacontenttype": { - "type": "string", - "description": "Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format." - }, - "dataschema": { - "type": "string", - "format": "uri" + "with": { + "$ref": "#/$defs/eventProperties", + "title": "EmitEventWith", + "description": "Defines the properties of event to emit.", + "required": [ + "source", + "type" + ], + "type": "object" } }, - "required": [ - "source", - "type" - ], - "additionalProperties": true, - "title": "EmitTaskEmitEvent" + "additionalProperties": true } }, "required": [ "event" - ], - "title": "EmitTaskEmit" + ] } - }, - "title": "EmitTask" + } }, "forTask": { - "description": "Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets.", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "ForTask", + "description": "Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets.", "required": [ "for", "do" @@ -704,6 +729,9 @@ "properties": { "for": { "type": "object", + "title": "ForTaskConfiguration", + "description": "The definition of the loop that iterates over a range of values.", + "unevaluatedProperties": false, "properties": { "each": { "type": "string", @@ -722,8 +750,7 @@ }, "required": [ "in" - ], - "title": "ForTaskFor" + ] }, "while": { "type": "string", @@ -731,16 +758,16 @@ }, "do": { "$ref": "#/$defs/taskList", - "type": "object", - "title": "ForTaskDo" + "title": "ForTaskDo", + "type": "object" } - }, - "title": "ForTask" + } }, "listenTask": { - "description": "Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems.", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "ListenTask", + "description": "Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems.", "required": [ "listen" ], @@ -748,26 +775,28 @@ "properties": { "listen": { "type": "object", + "title": "ListenTaskConfiguration", + "description": "The configuration of the listener to use.", + "unevaluatedProperties": false, "properties": { "to": { "$ref": "#/$defs/eventConsumptionStrategy", + "title": "ListenTo", "description": "Defines the event(s) to listen to.", - "type": "object", - "title": "ListenTaskListenTo" + "type": "object" } }, "required": [ "to" - ], - "title": "ListenTaskListen" + ] } - }, - "title": "ListenTask" + } }, "raiseTask": { - "description": "Intentionally triggers and propagates errors.", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "RaiseTask", + "description": "Intentionally triggers and propagates errors.", "required": [ "raise" ], @@ -775,26 +804,37 @@ "properties": { "raise": { "type": "object", + "title": "RaiseTaskConfiguration", + "description": "The definition of the error to raise.", + "unevaluatedProperties": false, "properties": { "error": { - "$ref": "#/$defs/error", - "description": "Defines the error to raise.", - "type": "object", + "oneOf": [ + { + "$ref": "#/$defs/error", + "title": "RaiseErrorDefinition", + "description": "Defines the error to raise.", + "type": "object" + }, + { + "type": "string", + "description": "The name of the error to raise" + } + ], "title": "RaiseTaskRaiseError" } }, "required": [ "error" - ], - "title": "RaiseTaskRaise" + ] } - }, - "title": "RaiseTask" + } }, "runTask": { - "description": "Provides the capability to execute external containers, shell commands, scripts, or workflows.", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "RunTask", + "description": "Provides the capability to execute external containers, shell commands, scripts, or workflows.", "required": [ "run" ], @@ -802,11 +842,26 @@ "properties": { "run": { "type": "object", + "title": "RunTaskConfiguration", + "description": "The configuration of the process to execute.", + "unevaluatedProperties": false, + "properties": { + "await": { + "type": "boolean", + "default": true, + "description": "Whether to await the process completion before continuing." + } + }, "oneOf": [ { + "title": "RunContainer", + "description": "Enables the execution of external processes encapsulated within a containerized environment.", "properties": { "container": { "type": "object", + "title": "Container", + "description": "The configuration of the container to run.", + "unevaluatedProperties": false, "properties": { "image": { "type": "string", @@ -814,51 +869,66 @@ }, "command": { "type": "string", - "description": "The command, if any, to execute on the container" + "description": "The command, if any, to execute on the container." }, "ports": { "type": "object", + "title": "ContainerPorts", "description": "The container's port mappings, if any." }, "volumes": { "type": "object", + "title": "ContainerVolumes", "description": "The container's volume mappings, if any." }, "environment": { "type": "object", + "title": "ContainerEnvironment", "description": "A key/value mapping of the environment variables, if any, to use when running the configured process." } }, "required": [ "image" - ], - "title": "RunTaskRunContainer" + ] } }, "required": [ "container" ], - "description": "Enables the execution of external processes encapsulated within a containerized environment.", "type": "object" }, { + "title": "RunScript", + "description": "Enables the execution of custom scripts or code within a workflow, empowering workflows to perform specialized logic, data processing, or integration tasks by executing user-defined scripts written in various programming languages.", "properties": { "script": { "type": "object", + "title": "Script", + "description": "The configuration of the script to run.", + "unevaluatedProperties": false, "properties": { "language": { "type": "string", "description": "The language of the script to run." }, + "arguments": { + "type": "object", + "title": "ScriptArguments", + "description": "A key/value mapping of the arguments, if any, to use when running the configured script.", + "additionalProperties": true + }, "environment": { "type": "object", - "additionalProperties": true, - "description": "A key/value mapping of the environment variables, if any, to use when running the configured process.", - "title": "RunTaskRunScriptEnvironment" + "title": "ScriptEnvironment", + "description": "A key/value mapping of the environment variables, if any, to use when running the configured script process.", + "additionalProperties": true } }, "oneOf": [ { + "title": "InlineScript", + "type": "object", + "description": "The script's code.", "properties": { "code": { "type": "string" @@ -866,41 +936,43 @@ }, "required": [ "code" - ], - "description": "The script's code.", - "type": "object" + ] }, { + "title": "ExternalScript", + "type": "object", + "description": "The script's resource.", "properties": { "source": { "$ref": "#/$defs/externalResource", - "type": "object", - "title": "RunTaskRunScriptSource" + "title": "ExternalScriptResource", + "type": "object" } }, - "description": "The script's resource.", "required": [ "source" - ], - "type": "object" + ] } ], "required": [ "language" - ], - "title": "RunTaskRunScript" + ] } }, "required": [ "script" ], - "description": "Enables the execution of custom scripts or code within a workflow, empowering workflows to perform specialized logic, data processing, or integration tasks by executing user-defined scripts written in various programming languages.", "type": "object" }, { + "title": "RunShell", + "description": "Enables the execution of shell commands within a workflow, enabling workflows to interact with the underlying operating system and perform system-level operations, such as file manipulation, environment configuration, or system administration tasks.", "properties": { "shell": { "type": "object", + "title": "Shell", + "description": "The configuration of the shell command to run.", + "unevaluatedProperties": false, "properties": { "command": { "type": "string", @@ -908,33 +980,36 @@ }, "arguments": { "type": "object", - "additionalProperties": true, + "title": "ShellArguments", "description": "A list of the arguments of the shell command to run.", - "title": "RunTaskRunShellArguments" + "additionalProperties": true }, "environment": { "type": "object", - "additionalProperties": true, + "title": "ShellEnvironment", "description": "A key/value mapping of the environment variables, if any, to use when running the configured process.", - "title": "RunTaskRunShellEnvironment" + "additionalProperties": true } }, "required": [ "command" - ], - "title": "RunTaskRunShell" + ] } }, "required": [ "shell" ], - "description": "Enables the execution of shell commands within a workflow, enabling workflows to interact with the underlying operating system and perform system-level operations, such as file manipulation, environment configuration, or system administration tasks.", "type": "object" }, { + "title": "RunWorkflow", + "description": "Enables the invocation and execution of nested workflows within a parent workflow, facilitating modularization, reusability, and abstraction of complex logic or business processes by encapsulating them into standalone workflow units.", "properties": { "workflow": { "type": "object", + "title": "SubflowConfiguration", + "description": "The configuration of the workflow to run.", + "unevaluatedProperties": false, "properties": { "namespace": { "type": "string", @@ -947,39 +1022,36 @@ "version": { "type": "string", "default": "latest", - "description": "The version of the workflow to run. Defaults to latest" + "description": "The version of the workflow to run. Defaults to latest." }, "input": { "type": "object", - "additionalProperties": true, + "title": "SubflowInput", "description": "The data, if any, to pass as input to the workflow to execute. The value should be validated against the target workflow's input schema, if specified.", - "title": "RunTaskRunWorkflowInput" + "additionalProperties": true } }, "required": [ "namespace", "name", "version" - ], - "title": "RunTaskRunWorkflow" + ] } }, "required": [ "workflow" ], - "description": "Enables the invocation and execution of nested workflows within a parent workflow, facilitating modularization, reusability, and abstraction of complex logic or business processes by encapsulating them into standalone workflow units.", "type": "object" } - ], - "title": "RunTaskRun" + ] } - }, - "title": "RunTask" + } }, "setTask": { - "description": "A task used to set data", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "SetTask", + "description": "A task used to set data.", "required": [ "set" ], @@ -987,18 +1059,18 @@ "properties": { "set": { "type": "object", + "title": "SetTaskConfiguration", + "description": "The data to set.", "minProperties": 1, - "additionalProperties": true, - "description": "The data to set", - "title": "SetTaskSet" + "additionalProperties": true } - }, - "title": "SetTask" + } }, "switchTask": { - "description": "Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "SwitchTask", + "description": "Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria.", "required": [ "switch" ], @@ -1006,41 +1078,44 @@ "properties": { "switch": { "type": "array", + "title": "SwitchTaskConfiguration", + "description": "The definition of the switch to use.", "minItems": 1, "items": { "type": "object", + "title": "SwitchItem", "minProperties": 1, "maxProperties": 1, "additionalProperties": { "type": "object", + "title": "SwitchCase", + "description": "The definition of a case within a switch task, defining a condition and corresponding tasks to execute if the condition is met.", + "unevaluatedProperties": false, + "required": [ + "then" + ], "properties": { - "name": { - "type": "string", - "description": "The case's name." - }, "when": { "type": "string", "description": "A runtime expression used to determine whether or not the case matches." }, "then": { "$ref": "#/$defs/flowDirective", + "title": "SwitchCaseOutcome", "description": "The flow directive to execute when the case matches.", - "type": "object", - "title": "SwitchTaskSwitchCaseThen" + "type": "object" } - }, - "title": "SwitchTaskSwitchCase" + } } - }, - "title": "SwitchTaskSwitch" + } } - }, - "title": "SwitchTask" + } }, "tryTask": { - "description": "Serves as a mechanism within workflows to handle errors gracefully, potentially retrying failed tasks before proceeding with alternate ones.", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "TryTask", + "description": "Serves as a mechanism within workflows to handle errors gracefully, potentially retrying failed tasks before proceeding with alternate ones.", "required": [ "try", "catch" @@ -1048,16 +1123,21 @@ "unevaluatedProperties": false, "properties": { "try": { - "description": "The task(s) to perform.", "$ref": "#/$defs/taskList", - "type": "object", - "title": "TryTaskTry" + "title": "TryTaskConfiguration", + "description": "The task(s) to perform.", + "type": "object" }, "catch": { "type": "object", + "title": "TryTaskCatch", + "description": "The object used to define the errors to catch.", + "unevaluatedProperties": false, "properties": { "errors": { - "type": "object" + "type": "object", + "title": "CatchErrors", + "description": "The configuration of a concept used to catch errors." }, "as": { "type": "string", @@ -1065,50 +1145,58 @@ }, "when": { "type": "string", - "description": "A runtime expression used to determine whether or not to catch the filtered error" + "description": "A runtime expression used to determine whether or not to catch the filtered error." }, "exceptWhen": { "type": "string", - "description": "A runtime expression used to determine whether or not to catch the filtered error" + "description": "A runtime expression used to determine whether or not to catch the filtered error." }, "retry": { - "$ref": "#/$defs/retryPolicy", - "description": "The retry policy to use, if any, when catching errors.", - "type": "object", + "oneOf": [ + { + "$ref": "#/$defs/retryPolicy", + "title": "RetryPolicyDefinition", + "description": "The retry policy to use, if any, when catching errors.", + "type": "object" + }, + { + "type": "string", + "description": "The name of the retry policy to use, if any, when catching errors." + } + ], "title": "TryTaskCatchRetry" }, "do": { - "description": "The definition of the task(s) to run when catching an error.", "$ref": "#/$defs/taskList", - "type": "object", - "title": "TryTaskCatchDo" + "title": "TryTaskCatchDo", + "description": "The definition of the task(s) to run when catching an error.", + "type": "object" } - }, - "title": "TryTaskCatch" + } } - }, - "title": "TryTask" + } }, "waitTask": { - "description": "Allows workflows to pause or delay their execution for a specified period of time.", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "WaitTask", + "description": "Allows workflows to pause or delay their execution for a specified period of time.", "required": [ "wait" ], "unevaluatedProperties": false, "properties": { "wait": { - "description": "The amount of time to wait.", "$ref": "#/$defs/duration", - "type": "object", - "title": "WaitTaskWait" + "title": "WaitTaskConfiguration", + "description": "The amount of time to wait.", + "type": "object" } - }, - "title": "WaitTask" + } }, "flowDirective": { - "additionalProperties": false, + "title": "FlowDirective", + "description": "Represents different transition options for a workflow.", "anyOf": [ { "type": "string", @@ -1122,207 +1210,496 @@ { "type": "string" } - ], - "title": "FlowDirective" + ] + }, + "referenceableAuthenticationPolicy": { + "type": "object", + "title": "ReferenceableAuthenticationPolicy", + "description": "Represents a referenceable authentication policy.", + "unevaluatedProperties": false, + "oneOf": [ + { + "title": "AuthenticationPolicyReference", + "description": "The reference of the authentication policy to use.", + "properties": { + "use": { + "type": "string", + "minLength": 1, + "description": "The name of the authentication policy to use." + } + }, + "required": [ + "use" + ], + "type": "object" + }, + { + "$ref": "#/$defs/authenticationPolicy", + "type": "object" + } + ] + }, + "secretBasedAuthenticationPolicy": { + "type": "object", + "title": "SecretBasedAuthenticationPolicy", + "description": "Represents an authentication policy based on secrets.", + "unevaluatedProperties": false, + "properties": { + "use": { + "type": "string", + "minLength": 1, + "description": "The name of the authentication policy to use." + } + }, + "required": [ + "use" + ] }, "authenticationPolicy": { "type": "object", + "title": "AuthenticationPolicy", + "description": "Defines an authentication policy.", "oneOf": [ { + "title": "BasicAuthenticationPolicy", + "description": "Use basic authentication.", "properties": { "basic": { "type": "object", - "properties": { - "username": { - "type": "string", - "description": "The username to use." + "title": "BasicAuthenticationPolicyConfiguration", + "description": "The configuration of the basic authentication policy.", + "unevaluatedProperties": false, + "oneOf": [ + { + "title": "BasicAuthenticationProperties", + "description": "Inline configuration of the basic authentication policy.", + "properties": { + "username": { + "type": "string", + "description": "The username to use." + }, + "password": { + "type": "string", + "description": "The password to use." + } + }, + "required": [ + "username", + "password" + ], + "type": "object" }, - "password": { - "type": "string", - "description": "The password to use." + { + "$ref": "#/$defs/secretBasedAuthenticationPolicy", + "title": "BasicAuthenticationPolicySecret", + "description": "Secret based configuration of the basic authentication policy.", + "type": "object" } - }, - "required": [ - "username", - "password" - ], - "title": "AuthenticationPolicyBasic" + ] } }, "required": [ "basic" ], - "description": "Use basic authentication.", "type": "object" }, { + "title": "BearerAuthenticationPolicy", + "description": "Use bearer authentication.", "properties": { "bearer": { "type": "object", - "properties": { - "token": { - "type": "string", - "description": "The bearer token to use." + "title": "BearerAuthenticationPolicyConfiguration", + "description": "The configuration of the bearer authentication policy.", + "unevaluatedProperties": false, + "oneOf": [ + { + "title": "BearerAuthenticationProperties", + "description": "Inline configuration of the bearer authentication policy.", + "properties": { + "token": { + "type": "string", + "description": "The bearer token to use." + } + }, + "required": [ + "token" + ], + "type": "object" + }, + { + "$ref": "#/$defs/secretBasedAuthenticationPolicy", + "title": "BearerAuthenticationPolicySecret", + "description": "Secret based configuration of the bearer authentication policy.", + "type": "object" } - }, - "required": [ - "token" - ], - "title": "AuthenticationPolicyBearer" + ] } }, "required": [ "bearer" ], - "description": "Use bearer authentication.", "type": "object" }, { + "title": "DigestAuthenticationPolicy", + "description": "Use digest authentication.", "properties": { - "oauth2": { + "digest": { "type": "object", - "properties": { - "authority": { - "type": "string", - "format": "uri", - "description": "The URI that references the OAuth2 authority to use." - }, - "grant": { - "type": "string", - "description": "The grant type to use." - }, - "client": { - "type": "object", + "title": "DigestAuthenticationPolicyConfiguration", + "description": "The configuration of the digest authentication policy.", + "unevaluatedProperties": false, + "oneOf": [ + { + "title": "DigestAuthenticationProperties", + "description": "Inline configuration of the digest authentication policy.", "properties": { - "id": { + "username": { "type": "string", - "description": "The client id to use." + "description": "The username to use." }, - "secret": { + "password": { "type": "string", - "description": "The client secret to use, if any." + "description": "The password to use." } }, "required": [ - "id" + "username", + "password" ], - "title": "AuthenticationPolicyOauth2Client" - }, - "scopes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The scopes, if any, to request the token for." - }, - "audiences": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The audiences, if any, to request the token for." - }, - "username": { - "type": "string", - "description": "The username to use. Used only if the grant type is Password." - }, - "password": { - "type": "string", - "description": "The password to use. Used only if the grant type is Password." + "type": "object" }, - "subject": { - "$ref": "#/$defs/oauth2Token", - "description": "The security token that represents the identity of the party on behalf of whom the request is being made.", + { + "$ref": "#/$defs/secretBasedAuthenticationPolicy", + "title": "DigestAuthenticationPolicySecret", + "description": "Secret based configuration of the digest authentication policy.", + "type": "object" + } + ] + } + }, + "required": [ + "digest" + ], + "type": "object" + }, + { + "title": "OAuth2AuthenticationPolicy", + "description": "Use OAuth2 authentication.", + "properties": { + "oauth2": { + "type": "object", + "title": "OAuth2AuthenticationPolicyConfiguration", + "description": "The configuration of the OAuth2 authentication policy.", + "unevaluatedProperties": false, + "oneOf": [ + { "type": "object", - "title": "AuthenticationPolicyOauth2Subject" + "title": "OAuth2ConnectAuthenticationProperties", + "description": "The inline configuration of the OAuth2 authentication policy.", + "unevaluatedProperties": false, + "allOf": [ + { + "$ref": "#/$defs/oauth2AuthenticationProperties", + "type": "object" + }, + { + "type": "object", + "properties": { + "endpoints": { + "type": "object", + "title": "OAuth2AuthenticationPropertiesEndpoints", + "description": "The endpoint configurations for OAuth2.", + "properties": { + "token": { + "type": "string", + "format": "uri-template", + "default": "/oauth2/token", + "description": "The relative path to the token endpoint. Defaults to `/oauth2/token`." + }, + "revocation": { + "type": "string", + "format": "uri-template", + "default": "/oauth2/revoke", + "description": "The relative path to the revocation endpoint. Defaults to `/oauth2/revoke`." + }, + "introspection": { + "type": "string", + "format": "uri-template", + "default": "/oauth2/introspect", + "description": "The relative path to the introspection endpoint. Defaults to `/oauth2/introspect`." + } + } + } + } + } + ] }, - "actor": { - "$ref": "#/$defs/oauth2Token", - "description": "The security token that represents the identity of the acting party.", - "type": "object", - "title": "AuthenticationPolicyOauth2Actor" + { + "$ref": "#/$defs/secretBasedAuthenticationPolicy", + "title": "OAuth2AuthenticationPolicySecret", + "description": "Secret based configuration of the OAuth2 authentication policy.", + "type": "object" } - }, - "required": [ - "authority", - "grant", - "client" - ], - "title": "AuthenticationPolicyOauth2" + ] } }, "required": [ "oauth2" ], - "description": "Use OAUTH2 authentication.", + "type": "object" + }, + { + "title": "OpenIdConnectAuthenticationPolicy", + "description": "Use OpenIdConnect authentication.", + "properties": { + "oidc": { + "type": "object", + "title": "OpenIdConnectAuthenticationPolicyConfiguration", + "description": "The configuration of the OpenIdConnect authentication policy.", + "unevaluatedProperties": false, + "oneOf": [ + { + "$ref": "#/$defs/oauth2AuthenticationProperties", + "title": "OpenIdConnectAuthenticationProperties", + "description": "The inline configuration of the OpenIdConnect authentication policy.", + "unevaluatedProperties": false, + "type": "object", + "$id": "OpenIdConnectAuthenticationProperties" + }, + { + "$ref": "#/$defs/secretBasedAuthenticationPolicy", + "title": "OpenIdConnectAuthenticationPolicySecret", + "description": "Secret based configuration of the OpenIdConnect authentication policy.", + "type": "object" + } + ] + } + }, + "required": [ + "oidc" + ], "type": "object" } - ], - "description": "Defines an authentication policy.", - "title": "AuthenticationPolicy" + ] + }, + "oauth2AuthenticationProperties": { + "type": "object", + "title": "OAuth2AutenthicationData", + "description": "Inline configuration of the OAuth2 authentication policy.", + "properties": { + "authority": { + "type": "string", + "format": "uri-template", + "description": "The URI that references the OAuth2 authority to use." + }, + "grant": { + "type": "string", + "enum": [ + "authorization_code", + "client_credentials", + "password", + "refresh_token", + "urn:ietf:params:oauth:grant-type:token-exchange" + ], + "description": "The grant type to use." + }, + "client": { + "type": "object", + "title": "OAuth2AutenthicationDataClient", + "description": "The definition of an OAuth2 client.", + "unevaluatedProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The client id to use." + }, + "secret": { + "type": "string", + "description": "The client secret to use, if any." + }, + "assertion": { + "type": "string", + "description": "A JWT containing a signed assertion with your application credentials." + }, + "authentication": { + "type": "string", + "enum": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "none" + ], + "default": "client_secret_post", + "description": "The authentication method to use to authenticate the client." + } + } + }, + "request": { + "type": "object", + "title": "OAuth2TokenRequest", + "description": "The configuration of an OAuth2 token request", + "properties": { + "encoding": { + "type": "string", + "enum": [ + "application/x-www-form-urlencoded", + "application/json" + ], + "default": "application/x-www-form-urlencoded" + } + } + }, + "issuers": { + "type": "array", + "title": "OAuth2Issuers", + "description": "A list that contains that contains valid issuers that will be used to check against the issuer of generated tokens.", + "items": { + "type": "string" + } + }, + "scopes": { + "type": "array", + "title": "OAuth2AutenthicationDataScopes", + "description": "The scopes, if any, to request the token for.", + "items": { + "type": "string" + } + }, + "audiences": { + "type": "array", + "title": "OAuth2AutenthicationDataAudiences", + "description": "The audiences, if any, to request the token for.", + "items": { + "type": "string" + } + }, + "username": { + "type": "string", + "description": "The username to use. Used only if the grant type is Password." + }, + "password": { + "type": "string", + "description": "The password to use. Used only if the grant type is Password." + }, + "subject": { + "$ref": "#/$defs/oauth2Token", + "title": "OAuth2AutenthicationDataSubject", + "description": "The security token that represents the identity of the party on behalf of whom the request is being made.", + "type": "object" + }, + "actor": { + "$ref": "#/$defs/oauth2Token", + "title": "OAuth2AutenthicationDataActor", + "description": "The security token that represents the identity of the acting party.", + "type": "object" + } + } }, "oauth2Token": { "type": "object", + "title": "OAuth2TokenDefinition", + "description": "Represents an OAuth2 token.", + "unevaluatedProperties": false, "properties": { "token": { "type": "string", - "description": "The security token to use to use." + "description": "The security token to use." }, "type": { "type": "string", - "description": "The type of the security token to use to use." + "description": "The type of the security token to use." } }, "required": [ "token", "type" - ], - "title": "Oauth2Token" + ] }, "duration": { - "type": "object", - "minProperties": 1, - "properties": { - "days": { - "type": "integer", - "description": "Number of days, if any." - }, - "hours": { - "type": "integer", - "description": "Number of days, if any." - }, - "minutes": { - "type": "integer", - "description": "Number of minutes, if any." - }, - "seconds": { - "type": "integer", - "description": "Number of seconds, if any." + "oneOf": [ + { + "type": "object", + "minProperties": 1, + "unevaluatedProperties": false, + "properties": { + "days": { + "type": "integer", + "description": "Number of days, if any." + }, + "hours": { + "type": "integer", + "description": "Number of days, if any." + }, + "minutes": { + "type": "integer", + "description": "Number of minutes, if any." + }, + "seconds": { + "type": "integer", + "description": "Number of seconds, if any." + }, + "milliseconds": { + "type": "integer", + "description": "Number of milliseconds, if any." + } + }, + "title": "DurationInline", + "description": "The inline definition of a duration." }, - "milliseconds": { - "type": "integer", - "description": "Number of milliseconds, if any." + { + "type": "string", + "pattern": "^P(?!$)(\\d+(?:\\.\\d+)?Y)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?W)?(\\d+(?:\\.\\d+)?D)?(T(?=\\d)(\\d+(?:\\.\\d+)?H)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?S)?)?$", + "description": "The ISO 8601 expression of a duration." } - }, - "description": "The definition of a duration.", + ], "title": "Duration" }, "error": { "type": "object", + "title": "Error", + "description": "Represents an error.", + "unevaluatedProperties": false, "properties": { "type": { - "type": "string", - "format": "uri", - "description": "A URI reference that identifies the error type." + "title": "ErrorType", + "description": "A URI reference that identifies the error type.", + "oneOf": [ + { + "description": "The literal error type.", + "type": "string", + "format": "uri-template" + }, + { + "$ref": "#/$defs/runtimeExpression", + "title": "ExpressionErrorType", + "description": "An expression based error type.", + "type": "object" + } + ] }, "status": { "type": "integer", "description": "The status code generated by the origin for this occurrence of the error." }, "instance": { - "type": "string", - "format": "json-pointer", - "description": "A JSON Pointer used to reference the component the error originates from." + "title": "ErrorInstance", + "description": "A JSON Pointer used to reference the component the error originates from.", + "oneOf": [ + { + "description": "The literal error instance.", + "type": "string", + "format": "json-pointer" + }, + { + "$ref": "#/$defs/runtimeExpression", + "title": "ExpressionErrorInstance", + "description": "An expression based error instance.", + "type": "object" + } + ] }, "title": { "type": "string", @@ -1335,50 +1712,141 @@ }, "required": [ "type", - "status", - "instance" - ], - "title": "Error" + "status" + ] }, "endpoint": { + "title": "Endpoint", + "description": "Represents an endpoint.", + "oneOf": [ + { + "$ref": "#/$defs/runtimeExpression", + "type": "object" + }, + { + "type": "string", + "format": "uri-template" + }, + { + "title": "EndpointConfiguration", + "type": "object", + "unevaluatedProperties": false, + "properties": { + "uri": { + "title": "EndpointUri", + "description": "The endpoint's URI.", + "oneOf": [ + { + "description": "The literal endpoint's URI.", + "type": "string", + "format": "uri-template" + }, + { + "$ref": "#/$defs/runtimeExpression", + "title": "ExpressionEndpointURI", + "description": "An expression based endpoint's URI.", + "type": "object" + } + ] + }, + "authentication": { + "$ref": "#/$defs/referenceableAuthenticationPolicy", + "title": "EndpointAuthentication", + "description": "The authentication policy to use.", + "type": "object" + } + }, + "required": [ + "uri" + ] + } + ] + }, + "eventProperties": { "type": "object", + "title": "EventProperties", + "description": "Describes the properties of an event.", "properties": { - "uri": { + "id": { "type": "string", - "format": "uri-template", - "description": "The endpoint's URI." + "description": "The event's unique identifier." }, - "authentication": { - "description": "The authentication policy to use.", + "source": { + "title": "EventSource", + "description": "Identifies the context in which an event happened.", "oneOf": [ { - "$ref": "#/$defs/authenticationPolicy", + "type": "string", + "format": "uri-template" + }, + { + "$ref": "#/$defs/runtimeExpression", "type": "object" + } + ] + }, + "type": { + "type": "string", + "description": "This attribute contains a value describing the type of event related to the originating occurrence." + }, + "time": { + "title": "EventTime", + "description": "When the event occured.", + "oneOf": [ + { + "type": "string", + "format": "date-time" }, { - "type": "string" + "$ref": "#/$defs/runtimeExpression", + "type": "object" } - ], - "title": "EndpointAuthentication" + ] + }, + "subject": { + "type": "string", + "description": "The subject of the event." + }, + "datacontenttype": { + "type": "string", + "description": "Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format." + }, + "dataschema": { + "title": "EventDataschema", + "description": "The schema describing the event format.", + "oneOf": [ + { + "description": "The literal event data schema.", + "type": "string", + "format": "uri-template" + }, + { + "$ref": "#/$defs/runtimeExpression", + "title": "ExpressionDataSchema", + "description": "An expression based event data schema.", + "type": "object" + } + ] } }, - "required": [ - "uri" - ], - "title": "Endpoint" + "additionalProperties": true }, "eventConsumptionStrategy": { "type": "object", + "title": "EventConsumptionStrategy", + "description": "Describe the event consumption strategy to adopt.", + "unevaluatedProperties": false, "oneOf": [ { + "title": "AllEventConsumptionStrategy", "properties": { "all": { "type": "array", + "title": "AllEventConsumptionStrategyConfiguration", + "description": "A list containing all the events that must be consumed.", "items": { "$ref": "#/$defs/eventFilter" - }, - "description": "A list containing all the events that must be consumed.", - "title": "EventConsumptionStrategyAll" + } } }, "required": [ @@ -1387,14 +1855,15 @@ "type": "object" }, { + "title": "AnyEventConsumptionStrategy", "properties": { "any": { "type": "array", + "title": "AnyEventConsumptionStrategyConfiguration", + "description": "A list containing any of the events to consume.", "items": { "$ref": "#/$defs/eventFilter" - }, - "description": "A list containing any of the events to consume.", - "title": "EventConsumptionStrategyAny" + } } }, "required": [ @@ -1403,12 +1872,13 @@ "type": "object" }, { + "title": "OneEventConsumptionStrategy", "properties": { "one": { "$ref": "#/$defs/eventFilter", + "title": "OneEventConsumptionStrategyConfiguration", "description": "The single event to consume.", - "type": "object", - "title": "EventConsumptionStrategyOne" + "type": "object" } }, "required": [ @@ -1416,48 +1886,25 @@ ], "type": "object" } - ], - "title": "EventConsumptionStrategy" + ] }, "eventFilter": { "type": "object", + "title": "EventFilter", + "description": "An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes.", + "unevaluatedProperties": false, "properties": { "with": { - "type": "object", + "$ref": "#/$defs/eventProperties", "minProperties": 1, - "properties": { - "id": { - "type": "string", - "description": "The event's unique identifier" - }, - "source": { - "type": "string", - "description": "Identifies the context in which an event happened" - }, - "type": { - "type": "string", - "description": "This attribute contains a value describing the type of event related to the originating occurrence." - }, - "time": { - "type": "string" - }, - "subject": { - "type": "string" - }, - "datacontenttype": { - "type": "string", - "description": "Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format." - }, - "dataschema": { - "type": "string" - } - }, - "additionalProperties": true, + "title": "WithEvent", "description": "An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes.", - "title": "EventFilterWith" + "type": "object" }, "correlate": { "type": "object", + "title": "EventFilterCorrelate", + "description": "A correlation is a link between events and data, established by mapping event attributes to specific data attributes, allowing for coordinated processing or handling based on event characteristics.", "additionalProperties": { "type": "object", "properties": { @@ -1473,19 +1920,18 @@ "required": [ "from" ] - }, - "description": "A correlation is a link between events and data, established by mapping event attributes to specific data attributes, allowing for coordinated processing or handling based on event characteristics.", - "title": "EventFilterCorrelate" + } } }, "required": [ "with" - ], - "description": "An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes.", - "title": "EventFilter" + ] }, "extension": { "type": "object", + "title": "Extension", + "description": "The definition of an extension.", + "unevaluatedProperties": false, "properties": { "extend": { "type": "string", @@ -1510,116 +1956,126 @@ "description": "A runtime expression, if any, used to determine whether or not the extension should apply in the specified context." }, "before": { - "description": "The task(s) to execute before the extended task, if any.", "$ref": "#/$defs/taskList", - "type": "object", - "title": "ExtensionBefore" + "title": "ExtensionDoBefore", + "description": "The task(s) to execute before the extended task, if any.", + "type": "object" }, "after": { - "description": "The task(s) to execute after the extended task, if any.", "$ref": "#/$defs/taskList", - "type": "object", - "title": "ExtensionAfter" + "title": "ExtensionDoAfter", + "description": "The task(s) to execute after the extended task, if any.", + "type": "object" } }, "required": [ "extend" - ], - "description": "The definition of a an extension.", - "title": "Extension" + ] }, "externalResource": { - "oneOf": [ - { + "type": "object", + "title": "ExternalResource", + "description": "Represents an external resource.", + "unevaluatedProperties": false, + "properties": { + "name": { "type": "string", - "format": "uri" + "description": "The name of the external resource, if any." }, - { - "type": "object", - "properties": { - "uri": { - "type": "string", - "format": "uri", - "description": "The endpoint's URI." - }, - "authentication": { - "description": "The authentication policy to use.", - "oneOf": [ - { - "$ref": "#/$defs/authenticationPolicy", - "type": "object" - }, - { - "type": "string" - } - ], - "title": "ExternalResourceAuthentication" - }, - "name": { - "type": "string", - "description": "The external resource's name, if any." - } - }, - "required": [ - "uri" - ] + "endpoint": { + "$ref": "#/$defs/endpoint", + "title": "ExternalResourceEndpoint", + "description": "The endpoint of the external resource.", + "type": "object" } - ], - "title": "ExternalResource" + }, + "required": [ + "endpoint" + ] }, "input": { "type": "object", + "title": "Input", + "description": "Configures the input of a workflow or task.", + "unevaluatedProperties": false, "properties": { "schema": { "$ref": "#/$defs/schema", + "title": "InputSchema", "description": "The schema used to describe and validate the input of the workflow or task.", - "type": "object", - "title": "InputSchema" + "type": "object" }, "from": { - "type": "string", - "description": "A runtime expression, if any, used to mutate and/or filter the input of the workflow or task." + "title": "InputFrom", + "description": "A runtime expression, if any, used to mutate and/or filter the input of the workflow or task.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "object" + } + ] } - }, - "description": "Configures the input of a workflow or task.", - "title": "Input" + } }, "output": { "type": "object", + "title": "Output", + "description": "Configures the output of a workflow or task.", + "unevaluatedProperties": false, "properties": { "schema": { "$ref": "#/$defs/schema", + "title": "OutputSchema", "description": "The schema used to describe and validate the output of the workflow or task.", - "type": "object", - "title": "OutputSchema" + "type": "object" }, "as": { - "type": "string", - "description": "A runtime expression, if any, used to mutate and/or filter the output of the workflow or task." + "title": "OutputAs", + "description": "A runtime expression, if any, used to mutate and/or filter the output of the workflow or task.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "object" + } + ] } - }, - "description": "Configures the output of a workflow or task.", - "title": "Output" + } }, "export": { "type": "object", + "title": "Export", + "description": "Set the content of the context. .", + "unevaluatedProperties": false, "properties": { "schema": { "$ref": "#/$defs/schema", + "title": "ExportSchema", "description": "The schema used to describe and validate the workflow context.", - "type": "object", - "title": "ExportSchema" + "type": "object" }, "as": { - "type": "string", - "description": "A runtime expression, if any, used to export the output data to the context." + "title": "ExportAs", + "description": "A runtime expression, if any, used to export the output data to the context.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "object" + } + ] } - }, - "description": "Set the content of the context.", - "title": "Export" + } }, "retryPolicy": { "type": "object", + "title": "RetryPolicy", + "description": "Defines a retry policy.", + "unevaluatedProperties": false, "properties": { "when": { "type": "string", @@ -1631,14 +2087,18 @@ }, "delay": { "$ref": "#/$defs/duration", + "title": "RetryDelay", "description": "The duration to wait between retry attempts.", - "type": "object", - "title": "RetryPolicyDelay" + "type": "object" }, "backoff": { "type": "object", + "title": "RetryBackoff", + "description": "The retry duration backoff.", + "unevaluatedProperties": false, "oneOf": [ { + "title": "ConstantBackoff", "properties": { "constant": { "type": "object", @@ -1651,6 +2111,7 @@ "type": "object" }, { + "title": "ExponentialBackOff", "properties": { "exponential": { "type": "object", @@ -1663,6 +2124,7 @@ "type": "object" }, { + "title": "LinearBackoff", "properties": { "linear": { "type": "object", @@ -1674,15 +2136,17 @@ ], "type": "object" } - ], - "description": "The retry duration backoff.", - "title": "RetryPolicyBackoff" + ] }, "limit": { "type": "object", + "title": "RetryLimit", + "unevaluatedProperties": false, "properties": { "attempt": { "type": "object", + "title": "RetryLimitAttempt", + "unevaluatedProperties": false, "properties": { "count": { "type": "integer", @@ -1690,52 +2154,52 @@ }, "duration": { "$ref": "#/$defs/duration", + "title": "RetryLimitAttemptDuration", "description": "The maximum duration for each retry attempt.", - "type": "object", - "title": "RetryPolicyLimitAttemptDuration" + "type": "object" } - }, - "title": "RetryPolicyLimitAttempt" + } }, "duration": { "$ref": "#/$defs/duration", + "title": "RetryLimitDuration", "description": "The duration limit, if any, for all retry attempts.", - "type": "object", - "title": "RetryPolicyLimitDuration" + "type": "object" } }, - "description": "The retry limit, if any", - "title": "RetryPolicyLimit" + "description": "The retry limit, if any." }, "jitter": { "type": "object", + "title": "RetryPolicyJitter", + "description": "The parameters, if any, that control the randomness or variability of the delay between retry attempts.", + "unevaluatedProperties": false, "properties": { "from": { "$ref": "#/$defs/duration", - "description": "The minimum duration of the jitter range", - "type": "object", - "title": "RetryPolicyJitterFrom" + "title": "RetryPolicyJitterFrom", + "description": "The minimum duration of the jitter range.", + "type": "object" }, "to": { "$ref": "#/$defs/duration", - "description": "The maximum duration of the jitter range", - "type": "object", - "title": "RetryPolicyJitterTo" + "title": "RetryPolicyJitterTo", + "description": "The maximum duration of the jitter range.", + "type": "object" } }, "required": [ "from", "to" - ], - "description": "The parameters, if any, that control the randomness or variability of the delay between retry attempts.", - "title": "RetryPolicyJitter" + ] } - }, - "description": "Defines a retry policy.", - "title": "RetryPolicy" + } }, "schema": { "type": "object", + "title": "Schema", + "description": "Represents the definition of a schema.", + "unevaluatedProperties": false, "properties": { "format": { "type": "string", @@ -1745,6 +2209,7 @@ }, "oneOf": [ { + "title": "SchemaInline", "properties": { "document": { "description": "The schema's inline definition.", @@ -1757,12 +2222,13 @@ "type": "object" }, { + "title": "SchemaExternal", "properties": { "resource": { "$ref": "#/$defs/externalResource", + "title": "SchemaExternalResource", "description": "The schema's external resource.", - "type": "object", - "title": "SchemaResource" + "type": "object" } }, "required": [ @@ -1770,30 +2236,31 @@ ], "type": "object" } - ], - "description": "Represents the definition of a schema.", - "title": "Schema" + ] }, "timeout": { "type": "object", + "title": "Timeout", + "description": "The definition of a timeout.", + "unevaluatedProperties": false, "properties": { "after": { "$ref": "#/$defs/duration", + "title": "TimeoutAfter", "description": "The duration after which to timeout.", - "type": "object", - "title": "TimeoutAfter" + "type": "object" } }, "required": [ "after" - ], - "description": "The definition of a timeout.", - "title": "Timeout" + ] + }, + "runtimeExpression": { + "type": "string", + "title": "RuntimeExpression", + "description": "A runtime expression.", + "pattern": "^\\s*\\$\\{.+\\}\\s*$" } }, - "required": [ - "document", - "do" - ], "title": "" } \ No newline at end of file diff --git a/src/lib/generated/schema/workflow.json b/src/lib/generated/schema/workflow.json index 86500495..6599050d 100644 --- a/src/lib/generated/schema/workflow.json +++ b/src/lib/generated/schema/workflow.json @@ -1,44 +1,64 @@ { - "$id": "https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json", + "$id": "https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json", "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "Serverless Workflow DSL - Workflow Schema", + "description": "Serverless Workflow DSL - Workflow Schema.", "type": "object", + "required": [ + "document", + "do" + ], "properties": { "document": { "type": "object", + "title": "Document", + "description": "Documents the workflow.", + "unevaluatedProperties": false, "properties": { "dsl": { "type": "string", "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", + "title": "WorkflowDSL", "description": "The version of the DSL used by the workflow." }, "namespace": { "type": "string", "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$", + "title": "WorkflowNamespace", "description": "The workflow's namespace." }, "name": { "type": "string", "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$", + "title": "WorkflowName", "description": "The workflow's name." }, "version": { "type": "string", "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", + "title": "WorkflowVersion", "description": "The workflow's semantic version." }, "title": { "type": "string", + "title": "WorkflowTitle", "description": "The workflow's title." }, "summary": { "type": "string", + "title": "WorkflowSummary", "description": "The workflow's Markdown summary." }, "tags": { "type": "object", + "title": "WorkflowTags", "description": "A key/value mapping of the workflow's tags, if any.", "additionalProperties": true + }, + "metadata": { + "type": "object", + "title": "WorkflowMetadata", + "description": "Holds additional information about the workflow.", + "additionalProperties": true } }, "required": [ @@ -46,106 +66,145 @@ "namespace", "name", "version" - ], - "description": "Documents the workflow" + ] }, "input": { "$ref": "#/$defs/input", + "title": "Input", "description": "Configures the workflow's input." }, "use": { "type": "object", + "title": "Use", + "description": "Defines the workflow's reusable components.", + "unevaluatedProperties": false, "properties": { "authentications": { "type": "object", + "title": "UseAuthentications", + "description": "The workflow's reusable authentication policies.", "additionalProperties": { "$ref": "#/$defs/authenticationPolicy" - }, - "description": "The workflow's reusable authentication policies." + } }, "errors": { "type": "object", + "title": "UseErrors", + "description": "The workflow's reusable errors.", "additionalProperties": { "$ref": "#/$defs/error" - }, - "description": "The workflow's reusable errors." + } }, "extensions": { "type": "array", + "title": "UseExtensions", + "description": "The workflow's extensions.", "items": { "type": "object", + "title": "ExtensionItem", "minProperties": 1, "maxProperties": 1, "additionalProperties": { "$ref": "#/$defs/extension" } - }, - "description": "The workflow's extensions." + } }, "functions": { "type": "object", + "title": "UseFunctions", + "description": "The workflow's reusable functions.", "additionalProperties": { "$ref": "#/$defs/task" - }, - "description": "The workflow's reusable functions." + } }, "retries": { "type": "object", + "title": "UseRetries", + "description": "The workflow's reusable retry policies.", "additionalProperties": { "$ref": "#/$defs/retryPolicy" - }, - "description": "The workflow's reusable retry policies." + } }, "secrets": { "type": "array", + "title": "UseSecrets", + "description": "The workflow's reusable secrets.", "items": { - "type": "string" - }, - "description": "The workflow's secrets." + "type": "string", + "description": "The workflow's secrets." + } + }, + "timeouts": { + "type": "object", + "title": "UseTimeouts", + "description": "The workflow's reusable timeouts.", + "additionalProperties": { + "$ref": "#/$defs/timeout" + } } - }, - "description": "Defines the workflow's reusable components." + } }, "do": { - "description": "Defines the task(s) the workflow must perform", - "$ref": "#/$defs/taskList" + "$ref": "#/$defs/taskList", + "title": "Do", + "description": "Defines the task(s) the workflow must perform." }, "timeout": { - "$ref": "#/$defs/timeout", - "description": "The workflow's timeout configuration, if any." + "oneOf": [ + { + "$ref": "#/$defs/timeout", + "title": "TimeoutDefinition", + "description": "The workflow's timeout configuration, if any." + }, + { + "type": "string", + "title": "TimeoutReference", + "description": "The name of the workflow's timeout, if any." + } + ] }, "output": { "$ref": "#/$defs/output", + "title": "Output", "description": "Configures the workflow's output." }, "schedule": { "type": "object", + "title": "Schedule", + "description": "Schedules the workflow.", + "unevaluatedProperties": false, "properties": { "every": { "$ref": "#/$defs/duration", + "title": "ScheduleEvery", "description": "Specifies the duration of the interval at which the workflow should be executed." }, "cron": { "type": "string", - "description": "Specifies the schedule using a cron expression, e.g., '0 0 * * *' for daily at midnight.\"" + "title": "ScheduleCron", + "description": "Specifies the schedule using a cron expression, e.g., '0 0 * * *' for daily at midnight." }, "after": { "$ref": "#/$defs/duration", + "title": "ScheduleAfter", "description": "Specifies a delay duration that the workflow must wait before starting again after it completes." }, "on": { "$ref": "#/$defs/eventConsumptionStrategy", + "title": "ScheduleOn", "description": "Specifies the events that trigger the workflow execution." } - }, - "description": "Schedules the workflow" + } } }, "$defs": { "taskList": { + "title": "TaskList", + "description": "List of named tasks to perform.", "type": "array", "items": { "type": "object", + "title": "TaskItem", "minProperties": 1, "maxProperties": 1, "additionalProperties": { @@ -155,34 +214,59 @@ }, "taskBase": { "type": "object", + "title": "TaskBase", + "description": "An object inherited by all tasks.", "properties": { "if": { "type": "string", + "title": "TaskBaseIf", "description": "A runtime expression, if any, used to determine whether or not the task should be run." }, "input": { "$ref": "#/$defs/input", + "title": "TaskBaseInput", "description": "Configure the task's input." }, "output": { "$ref": "#/$defs/output", + "title": "TaskBaseOutput", "description": "Configure the task's output." }, "export": { "$ref": "#/$defs/export", + "title": "TaskBaseExport", "description": "Export task output to context." }, "timeout": { - "$ref": "#/$defs/timeout", - "description": "The task's timeout configuration, if any." + "oneOf": [ + { + "$ref": "#/$defs/timeout", + "title": "TaskTimeoutDefinition", + "description": "The task's timeout configuration, if any." + }, + { + "type": "string", + "title": "TaskTimeoutReference", + "description": "The name of the task's timeout, if any." + } + ] }, "then": { "$ref": "#/$defs/flowDirective", + "title": "TaskBaseThen", "description": "The flow directive to be performed upon completion of the task." + }, + "metadata": { + "type": "object", + "title": "TaskMetadata", + "description": "Holds additional information about the task.", + "additionalProperties": true } } }, "task": { + "title": "Task", + "description": "A discrete unit of work that contributes to achieving the overall objectives defined by the workflow.", "unevaluatedProperties": false, "oneOf": [ { @@ -224,9 +308,12 @@ ] }, "callTask": { + "title": "CallTask", + "description": "Defines the call to perform.", "oneOf": [ { "title": "CallAsyncAPI", + "description": "Defines the AsyncAPI call to perform.", "$ref": "#/$defs/taskBase", "type": "object", "required": [ @@ -241,54 +328,56 @@ }, "with": { "type": "object", + "title": "AsyncApiArguments", + "description": "The Async API call arguments.", "properties": { "document": { "$ref": "#/$defs/externalResource", + "title": "WithAsyncAPIDocument", "description": "The document that defines the AsyncAPI operation to call." }, "operationRef": { "type": "string", + "title": "WithAsyncAPIOperation", "description": "A reference to the AsyncAPI operation to call." }, "server": { "type": "string", + "title": "WithAsyncAPIServer", "description": "A a reference to the server to call the specified AsyncAPI operation on. If not set, default to the first server matching the operation's channel." }, "message": { "type": "string", + "title": "WithAsyncAPIMessage", "description": "The name of the message to use. If not set, defaults to the first message defined by the operation." }, "binding": { "type": "string", + "title": "WithAsyncAPIBinding", "description": "The name of the binding to use. If not set, defaults to the first binding defined by the operation." }, "payload": { "type": "object", + "title": "WithAsyncAPIPayload", "description": "The payload to call the AsyncAPI operation with, if any." }, "authentication": { - "description": "The authentication policy, if any, to use when calling the AsyncAPI operation.", - "oneOf": [ - { - "$ref": "#/$defs/authenticationPolicy" - }, - { - "type": "string" - } - ] + "$ref": "#/$defs/referenceableAuthenticationPolicy", + "title": "WithAsyncAPIAuthentication", + "description": "The authentication policy, if any, to use when calling the AsyncAPI operation." } }, "required": [ "document", "operationRef" ], - "additionalProperties": false, - "description": "Defines the AsyncAPI call to perform." + "unevaluatedProperties": false } } }, { "title": "CallGRPC", + "description": "Defines the GRPC call to perform.", "$ref": "#/$defs/taskBase", "type": "object", "unevaluatedProperties": false, @@ -303,39 +392,41 @@ }, "with": { "type": "object", + "title": "GRPCArguments", + "description": "The GRPC call arguments.", "properties": { "proto": { "$ref": "#/$defs/externalResource", + "title": "WithGRPCProto", "description": "The proto resource that describes the GRPC service to call." }, "service": { "type": "object", + "title": "WithGRPCService", + "unevaluatedProperties": false, "properties": { "name": { "type": "string", + "title": "WithGRPCServiceName", "description": "The name of the GRPC service to call." }, "host": { "type": "string", - "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$", - "description": "The hostname of the GRPC service to call." + "title": "WithGRPCServiceHost", + "description": "The hostname of the GRPC service to call.", + "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$" }, "port": { "type": "integer", - "min": 0, - "max": 65535, - "description": "The port number of the GRPC service to call." + "title": "WithGRPCServicePost", + "description": "The port number of the GRPC service to call.", + "minimum": 0, + "maximum": 65535 }, "authentication": { - "description": "The endpoint's authentication policy, if any.", - "oneOf": [ - { - "$ref": "#/$defs/authenticationPolicy" - }, - { - "type": "string" - } - ] + "$ref": "#/$defs/referenceableAuthenticationPolicy", + "title": "WithGRPCServiceAuthentication", + "description": "The endpoint's authentication policy, if any." } }, "required": [ @@ -345,12 +436,14 @@ }, "method": { "type": "string", + "title": "WithGRPCMethod", "description": "The name of the method to call on the defined GRPC service." }, "arguments": { "type": "object", - "additionalProperties": true, - "description": "The arguments, if any, to call the method with." + "title": "WithGRPCArguments", + "description": "The arguments, if any, to call the method with.", + "additionalProperties": true } }, "required": [ @@ -358,13 +451,13 @@ "service", "method" ], - "additionalProperties": false, - "description": "Defines the GRPC call to perform." + "unevaluatedProperties": false } } }, { "title": "CallHTTP", + "description": "Defines the HTTP call to perform.", "$ref": "#/$defs/taskBase", "type": "object", "unevaluatedProperties": false, @@ -379,51 +472,56 @@ }, "with": { "type": "object", + "title": "HTTPArguments", + "description": "The HTTP call arguments.", "properties": { "method": { "type": "string", + "title": "WithHTTPMethod", "description": "The HTTP method of the HTTP request to perform." }, "endpoint": { + "title": "WithHTTPEndpoint", "description": "The HTTP endpoint to send the request to.", - "oneOf": [ - { - "$ref": "#/$defs/endpoint" - }, - { - "type": "string", - "format": "uri-template" - } - ] + "$ref": "#/$defs/endpoint" }, "headers": { "type": "object", + "title": "WithHTTPHeaders", "description": "A name/value mapping of the headers, if any, of the HTTP request to perform." }, "body": { + "title": "WithHTTPBody", "description": "The body, if any, of the HTTP request to perform." }, + "query": { + "type": "object", + "title": "WithHTTPQuery", + "description": "A name/value mapping of the query parameters, if any, of the HTTP request to perform.", + "additionalProperties": true + }, "output": { "type": "string", + "title": "WithHTTPOutput", + "description": "The http call output format. Defaults to 'content'.", "enum": [ "raw", "content", "response" - ], - "description": "The http call output format. Defaults to 'content'." + ] } }, "required": [ "method", "endpoint" ], - "additionalProperties": false, - "description": "Defines the HTTP call to perform." + "unevaluatedProperties": false } } }, { "title": "CallOpenAPI", + "description": "Defines the OpenAPI call to perform.", "$ref": "#/$defs/taskBase", "type": "object", "unevaluatedProperties": false, @@ -438,30 +536,29 @@ }, "with": { "type": "object", + "title": "OpenAPIArguments", + "description": "The OpenAPI call arguments.", "properties": { "document": { "$ref": "#/$defs/externalResource", + "title": "WithOpenAPIDocument", "description": "The document that defines the OpenAPI operation to call." }, "operationId": { "type": "string", + "title": "WithOpenAPIOperation", "description": "The id of the OpenAPI operation to call." }, "parameters": { "type": "object", - "additionalProperties": true, - "description": "A name/value mapping of the parameters of the OpenAPI operation to call." + "title": "WithOpenAPIParameters", + "description": "A name/value mapping of the parameters of the OpenAPI operation to call.", + "additionalProperties": true }, "authentication": { - "description": "The authentication policy, if any, to use when calling the OpenAPI operation.", - "oneOf": [ - { - "$ref": "#/$defs/authenticationPolicy" - }, - { - "type": "string" - } - ] + "$ref": "#/$defs/referenceableAuthenticationPolicy", + "title": "WithOpenAPIAuthentication", + "description": "The authentication policy, if any, to use when calling the OpenAPI operation." }, "output": { "type": "string", @@ -470,6 +567,7 @@ "content", "response" ], + "title": "WithOpenAPIOutput", "description": "The http call output format. Defaults to 'content'." } }, @@ -477,13 +575,13 @@ "document", "operationId" ], - "additionalProperties": false, - "description": "Defines the OpenAPI call to perform." + "unevaluatedProperties": false } } }, { "title": "CallFunction", + "description": "Defines the function call to perform.", "$ref": "#/$defs/taskBase", "type": "object", "unevaluatedProperties": false, @@ -505,17 +603,19 @@ }, "with": { "type": "object", - "additionalProperties": true, - "description": "A name/value mapping of the parameters, if any, to call the function with." + "title": "FunctionArguments", + "description": "A name/value mapping of the parameters, if any, to call the function with.", + "additionalProperties": true } } } ] }, "forkTask": { - "description": "Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output.", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "ForkTask", + "description": "Allows workflows to execute multiple tasks concurrently and optionally race them against each other, with a single possible winner, which sets the task's output.", "unevaluatedProperties": false, "required": [ "fork" @@ -523,16 +623,21 @@ "properties": { "fork": { "type": "object", + "title": "ForkTaskConfiguration", + "description": "The configuration of the branches to perform concurrently.", + "unevaluatedProperties": false, "required": [ "branches" ], "properties": { "branches": { - "$ref": "#/$defs/taskList" + "$ref": "#/$defs/taskList", + "title": "ForkBranches" }, "compete": { - "description": "Indicates whether or not the concurrent tasks are racing against each other, with a single possible winner, which sets the composite task's output.", "type": "boolean", + "title": "ForkCompete", + "description": "Indicates whether or not the concurrent tasks are racing against each other, with a single possible winner, which sets the composite task's output.", "default": false } } @@ -540,23 +645,27 @@ } }, "doTask": { - "description": "Allows to execute a list of tasks in sequence", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "DoTask", + "description": "Allows to execute a list of tasks in sequence.", "unevaluatedProperties": false, "required": [ "do" ], "properties": { "do": { - "$ref": "#/$defs/taskList" + "$ref": "#/$defs/taskList", + "title": "DoTaskConfiguration", + "description": "The configuration of the tasks to perform sequentially." } } }, "emitTask": { - "description": "Allows workflows to publish events to event brokers or messaging systems, facilitating communication and coordination between different components and services.", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "EmitTask", + "description": "Allows workflows to publish events to event brokers or messaging systems, facilitating communication and coordination between different components and services.", "required": [ "emit" ], @@ -564,43 +673,25 @@ "properties": { "emit": { "type": "object", + "title": "EmitTaskConfiguration", + "description": "The configuration of an event's emission.", + "unevaluatedProperties": false, "properties": { "event": { "type": "object", + "title": "EmitEventDefinition", + "description": "The definition of the event to emit.", "properties": { - "id": { - "type": "string", - "description": "The event's unique identifier" - }, - "source": { - "type": "string", - "format": "uri", - "description": "Identifies the context in which an event happened" - }, - "type": { - "type": "string", - "description": "This attribute contains a value describing the type of event related to the originating occurrence." - }, - "time": { - "type": "string", - "format": "date-time" - }, - "subject": { - "type": "string" - }, - "datacontenttype": { - "type": "string", - "description": "Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format." - }, - "dataschema": { - "type": "string", - "format": "uri" + "with": { + "$ref": "#/$defs/eventProperties", + "title": "EmitEventWith", + "description": "Defines the properties of event to emit.", + "required": [ + "source", + "type" + ] } }, - "required": [ - "source", - "type" - ], "additionalProperties": true } }, @@ -611,9 +702,10 @@ } }, "forTask": { - "description": "Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets.", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "ForTask", + "description": "Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets.", "required": [ "for", "do" @@ -622,18 +714,24 @@ "properties": { "for": { "type": "object", + "title": "ForTaskConfiguration", + "description": "The definition of the loop that iterates over a range of values.", + "unevaluatedProperties": false, "properties": { "each": { "type": "string", + "title": "ForEach", "description": "The name of the variable used to store the current item being enumerated.", "default": "item" }, "in": { "type": "string", + "title": "ForIn", "description": "A runtime expression used to get the collection to enumerate." }, "at": { "type": "string", + "title": "ForAt", "description": "The name of the variable used to store the index of the current item being enumerated.", "default": "index" } @@ -644,17 +742,20 @@ }, "while": { "type": "string", + "title": "While", "description": "A runtime expression that represents the condition, if any, that must be met for the iteration to continue." }, "do": { - "$ref": "#/$defs/taskList" + "$ref": "#/$defs/taskList", + "title": "ForTaskDo" } } }, "listenTask": { - "description": "Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems.", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "ListenTask", + "description": "Provides a mechanism for workflows to await and react to external events, enabling event-driven behavior within workflow systems.", "required": [ "listen" ], @@ -662,9 +763,13 @@ "properties": { "listen": { "type": "object", + "title": "ListenTaskConfiguration", + "description": "The configuration of the listener to use.", + "unevaluatedProperties": false, "properties": { "to": { "$ref": "#/$defs/eventConsumptionStrategy", + "title": "ListenTo", "description": "Defines the event(s) to listen to." } }, @@ -675,9 +780,10 @@ } }, "raiseTask": { - "description": "Intentionally triggers and propagates errors.", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "RaiseTask", + "description": "Intentionally triggers and propagates errors.", "required": [ "raise" ], @@ -685,10 +791,23 @@ "properties": { "raise": { "type": "object", + "title": "RaiseTaskConfiguration", + "description": "The definition of the error to raise.", + "unevaluatedProperties": false, "properties": { "error": { - "$ref": "#/$defs/error", - "description": "Defines the error to raise." + "oneOf": [ + { + "$ref": "#/$defs/error", + "title": "RaiseErrorDefinition", + "description": "Defines the error to raise." + }, + { + "type": "string", + "title": "RaiseErrorReference", + "description": "The name of the error to raise" + } + ] } }, "required": [ @@ -698,9 +817,10 @@ } }, "runTask": { - "description": "Provides the capability to execute external containers, shell commands, scripts, or workflows.", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "RunTask", + "description": "Provides the capability to execute external containers, shell commands, scripts, or workflows.", "required": [ "run" ], @@ -708,30 +828,51 @@ "properties": { "run": { "type": "object", + "title": "RunTaskConfiguration", + "description": "The configuration of the process to execute.", + "unevaluatedProperties": false, + "properties": { + "await": { + "type": "boolean", + "default": true, + "title": "AwaitProcessCompletion", + "description": "Whether to await the process completion before continuing." + } + }, "oneOf": [ { + "title": "RunContainer", + "description": "Enables the execution of external processes encapsulated within a containerized environment.", "properties": { "container": { "type": "object", + "title": "Container", + "description": "The configuration of the container to run.", + "unevaluatedProperties": false, "properties": { "image": { "type": "string", + "title": "ContainerImage", "description": "The name of the container image to run." }, "command": { "type": "string", - "description": "The command, if any, to execute on the container" + "title": "ContainerCommand", + "description": "The command, if any, to execute on the container." }, "ports": { "type": "object", + "title": "ContainerPorts", "description": "The container's port mappings, if any." }, "volumes": { "type": "object", + "title": "ContainerVolumes", "description": "The container's volume mappings, if any." }, "environment": { "type": "object", + "title": "ContainerEnvironment", "description": "A key/value mapping of the environment variables, if any, to use when running the configured process." } }, @@ -742,43 +883,61 @@ }, "required": [ "container" - ], - "description": "Enables the execution of external processes encapsulated within a containerized environment." + ] }, { + "title": "RunScript", + "description": "Enables the execution of custom scripts or code within a workflow, empowering workflows to perform specialized logic, data processing, or integration tasks by executing user-defined scripts written in various programming languages.", "properties": { "script": { "type": "object", + "title": "Script", + "description": "The configuration of the script to run.", + "unevaluatedProperties": false, "properties": { "language": { "type": "string", + "title": "ScriptLanguage", "description": "The language of the script to run." }, + "arguments": { + "type": "object", + "title": "ScriptArguments", + "description": "A key/value mapping of the arguments, if any, to use when running the configured script.", + "additionalProperties": true + }, "environment": { "type": "object", - "additionalProperties": true, - "description": "A key/value mapping of the environment variables, if any, to use when running the configured process." + "title": "ScriptEnvironment", + "description": "A key/value mapping of the environment variables, if any, to use when running the configured script process.", + "additionalProperties": true } }, "oneOf": [ { + "title": "InlineScript", + "type": "object", + "description": "The script's code.", "properties": { "code": { - "type": "string" + "type": "string", + "title": "InlineScriptCode" } }, "required": [ "code" - ], - "description": "The script's code." + ] }, { + "title": "ExternalScript", + "type": "object", + "description": "The script's resource.", "properties": { "source": { - "$ref": "#/$defs/externalResource" + "$ref": "#/$defs/externalResource", + "title": "ExternalScriptResource" } }, - "description": "The script's resource.", "required": [ "source" ] @@ -791,27 +950,34 @@ }, "required": [ "script" - ], - "description": "Enables the execution of custom scripts or code within a workflow, empowering workflows to perform specialized logic, data processing, or integration tasks by executing user-defined scripts written in various programming languages." + ] }, { + "title": "RunShell", + "description": "Enables the execution of shell commands within a workflow, enabling workflows to interact with the underlying operating system and perform system-level operations, such as file manipulation, environment configuration, or system administration tasks.", "properties": { "shell": { "type": "object", + "title": "Shell", + "description": "The configuration of the shell command to run.", + "unevaluatedProperties": false, "properties": { "command": { "type": "string", + "title": "ShellCommand", "description": "The shell command to run." }, "arguments": { "type": "object", - "additionalProperties": true, - "description": "A list of the arguments of the shell command to run." + "title": "ShellArguments", + "description": "A list of the arguments of the shell command to run.", + "additionalProperties": true }, "environment": { "type": "object", - "additionalProperties": true, - "description": "A key/value mapping of the environment variables, if any, to use when running the configured process." + "title": "ShellEnvironment", + "description": "A key/value mapping of the environment variables, if any, to use when running the configured process.", + "additionalProperties": true } }, "required": [ @@ -821,31 +987,39 @@ }, "required": [ "shell" - ], - "description": "Enables the execution of shell commands within a workflow, enabling workflows to interact with the underlying operating system and perform system-level operations, such as file manipulation, environment configuration, or system administration tasks." + ] }, { + "title": "RunWorkflow", + "description": "Enables the invocation and execution of nested workflows within a parent workflow, facilitating modularization, reusability, and abstraction of complex logic or business processes by encapsulating them into standalone workflow units.", "properties": { "workflow": { "type": "object", + "title": "SubflowConfiguration", + "description": "The configuration of the workflow to run.", + "unevaluatedProperties": false, "properties": { "namespace": { "type": "string", + "title": "SubflowNamespace", "description": "The namespace the workflow to run belongs to." }, "name": { "type": "string", + "title": "SubflowName", "description": "The name of the workflow to run." }, "version": { "type": "string", "default": "latest", - "description": "The version of the workflow to run. Defaults to latest" + "title": "SubflowVersion", + "description": "The version of the workflow to run. Defaults to latest." }, "input": { "type": "object", - "additionalProperties": true, - "description": "The data, if any, to pass as input to the workflow to execute. The value should be validated against the target workflow's input schema, if specified." + "title": "SubflowInput", + "description": "The data, if any, to pass as input to the workflow to execute. The value should be validated against the target workflow's input schema, if specified.", + "additionalProperties": true } }, "required": [ @@ -857,17 +1031,17 @@ }, "required": [ "workflow" - ], - "description": "Enables the invocation and execution of nested workflows within a parent workflow, facilitating modularization, reusability, and abstraction of complex logic or business processes by encapsulating them into standalone workflow units." + ] } ] } } }, "setTask": { - "description": "A task used to set data", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "SetTask", + "description": "A task used to set data.", "required": [ "set" ], @@ -875,16 +1049,18 @@ "properties": { "set": { "type": "object", + "title": "SetTaskConfiguration", + "description": "The data to set.", "minProperties": 1, - "additionalProperties": true, - "description": "The data to set" + "additionalProperties": true } } }, "switchTask": { - "description": "Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "SwitchTask", + "description": "Enables conditional branching within workflows, allowing them to dynamically select different paths based on specified conditions or criteria.", "required": [ "switch" ], @@ -892,24 +1068,31 @@ "properties": { "switch": { "type": "array", + "title": "SwitchTaskConfiguration", + "description": "The definition of the switch to use.", "minItems": 1, "items": { "type": "object", + "title": "SwitchItem", "minProperties": 1, "maxProperties": 1, "additionalProperties": { "type": "object", + "title": "SwitchCase", + "description": "The definition of a case within a switch task, defining a condition and corresponding tasks to execute if the condition is met.", + "unevaluatedProperties": false, + "required": [ + "then" + ], "properties": { - "name": { - "type": "string", - "description": "The case's name." - }, "when": { "type": "string", + "title": "SwitchCaseCondition", "description": "A runtime expression used to determine whether or not the case matches." }, "then": { "$ref": "#/$defs/flowDirective", + "title": "SwitchCaseOutcome", "description": "The flow directive to execute when the case matches." } } @@ -919,9 +1102,10 @@ } }, "tryTask": { - "description": "Serves as a mechanism within workflows to handle errors gracefully, potentially retrying failed tasks before proceeding with alternate ones.", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "TryTask", + "description": "Serves as a mechanism within workflows to handle errors gracefully, potentially retrying failed tasks before proceeding with alternate ones.", "required": [ "try", "catch" @@ -929,56 +1113,79 @@ "unevaluatedProperties": false, "properties": { "try": { - "description": "The task(s) to perform.", - "$ref": "#/$defs/taskList" + "$ref": "#/$defs/taskList", + "title": "TryTaskConfiguration", + "description": "The task(s) to perform." }, "catch": { "type": "object", + "title": "TryTaskCatch", + "description": "The object used to define the errors to catch.", + "unevaluatedProperties": false, "properties": { "errors": { - "type": "object" + "type": "object", + "title": "CatchErrors", + "description": "The configuration of a concept used to catch errors." }, "as": { "type": "string", + "title": "CatchAs", "description": "The name of the runtime expression variable to save the error as. Defaults to 'error'." }, "when": { "type": "string", - "description": "A runtime expression used to determine whether or not to catch the filtered error" + "title": "CatchWhen", + "description": "A runtime expression used to determine whether or not to catch the filtered error." }, "exceptWhen": { "type": "string", - "description": "A runtime expression used to determine whether or not to catch the filtered error" + "title": "CatchExceptWhen", + "description": "A runtime expression used to determine whether or not to catch the filtered error." }, "retry": { - "$ref": "#/$defs/retryPolicy", - "description": "The retry policy to use, if any, when catching errors." + "oneOf": [ + { + "$ref": "#/$defs/retryPolicy", + "title": "RetryPolicyDefinition", + "description": "The retry policy to use, if any, when catching errors." + }, + { + "type": "string", + "title": "RetryPolicyReference", + "description": "The name of the retry policy to use, if any, when catching errors." + } + ] }, "do": { - "description": "The definition of the task(s) to run when catching an error.", - "$ref": "#/$defs/taskList" + "$ref": "#/$defs/taskList", + "title": "TryTaskCatchDo", + "description": "The definition of the task(s) to run when catching an error." } } } } }, "waitTask": { - "description": "Allows workflows to pause or delay their execution for a specified period of time.", - "$ref": "#/$defs/taskBase", "type": "object", + "$ref": "#/$defs/taskBase", + "title": "WaitTask", + "description": "Allows workflows to pause or delay their execution for a specified period of time.", "required": [ "wait" ], "unevaluatedProperties": false, "properties": { "wait": { - "description": "The amount of time to wait.", - "$ref": "#/$defs/duration" + "$ref": "#/$defs/duration", + "title": "WaitTaskConfiguration", + "description": "The amount of time to wait." } } }, "flowDirective": { - "additionalProperties": false, + "title": "FlowDirective", + "description": "Represents different transition options for a workflow.", "anyOf": [ { "type": "string", @@ -994,140 +1201,401 @@ } ] }, + "referenceableAuthenticationPolicy": { + "type": "object", + "title": "ReferenceableAuthenticationPolicy", + "description": "Represents a referenceable authentication policy.", + "unevaluatedProperties": false, + "oneOf": [ + { + "title": "AuthenticationPolicyReference", + "description": "The reference of the authentication policy to use.", + "properties": { + "use": { + "type": "string", + "minLength": 1, + "title": "ReferenceableAuthenticationPolicyName", + "description": "The name of the authentication policy to use." + } + }, + "required": [ + "use" + ] + }, + { + "$ref": "#/$defs/authenticationPolicy" + } + ] + }, + "secretBasedAuthenticationPolicy": { + "type": "object", + "title": "SecretBasedAuthenticationPolicy", + "description": "Represents an authentication policy based on secrets.", + "unevaluatedProperties": false, + "properties": { + "use": { + "type": "string", + "minLength": 1, + "title": "SecretBasedAuthenticationPolicyName", + "description": "The name of the authentication policy to use." + } + }, + "required": [ + "use" + ] + }, "authenticationPolicy": { "type": "object", + "title": "AuthenticationPolicy", + "description": "Defines an authentication policy.", "oneOf": [ { + "title": "BasicAuthenticationPolicy", + "description": "Use basic authentication.", "properties": { "basic": { "type": "object", - "properties": { - "username": { - "type": "string", - "description": "The username to use." + "title": "BasicAuthenticationPolicyConfiguration", + "description": "The configuration of the basic authentication policy.", + "unevaluatedProperties": false, + "oneOf": [ + { + "title": "BasicAuthenticationProperties", + "description": "Inline configuration of the basic authentication policy.", + "properties": { + "username": { + "type": "string", + "description": "The username to use." + }, + "password": { + "type": "string", + "description": "The password to use." + } + }, + "required": [ + "username", + "password" + ] }, - "password": { - "type": "string", - "description": "The password to use." + { + "$ref": "#/$defs/secretBasedAuthenticationPolicy", + "title": "BasicAuthenticationPolicySecret", + "description": "Secret based configuration of the basic authentication policy." } - }, - "required": [ - "username", - "password" ] } }, "required": [ "basic" - ], - "description": "Use basic authentication." + ] }, { + "title": "BearerAuthenticationPolicy", + "description": "Use bearer authentication.", "properties": { "bearer": { "type": "object", - "properties": { - "token": { - "type": "string", - "description": "The bearer token to use." + "title": "BearerAuthenticationPolicyConfiguration", + "description": "The configuration of the bearer authentication policy.", + "unevaluatedProperties": false, + "oneOf": [ + { + "title": "BearerAuthenticationProperties", + "description": "Inline configuration of the bearer authentication policy.", + "properties": { + "token": { + "type": "string", + "description": "The bearer token to use." + } + }, + "required": [ + "token" + ] + }, + { + "$ref": "#/$defs/secretBasedAuthenticationPolicy", + "title": "BearerAuthenticationPolicySecret", + "description": "Secret based configuration of the bearer authentication policy." } - }, - "required": [ - "token" ] } }, "required": [ "bearer" - ], - "description": "Use bearer authentication." + ] }, { + "title": "DigestAuthenticationPolicy", + "description": "Use digest authentication.", "properties": { - "oauth2": { + "digest": { "type": "object", - "properties": { - "authority": { - "type": "string", - "format": "uri", - "description": "The URI that references the OAuth2 authority to use." - }, - "grant": { - "type": "string", - "description": "The grant type to use." - }, - "client": { - "type": "object", + "title": "DigestAuthenticationPolicyConfiguration", + "description": "The configuration of the digest authentication policy.", + "unevaluatedProperties": false, + "oneOf": [ + { + "title": "DigestAuthenticationProperties", + "description": "Inline configuration of the digest authentication policy.", "properties": { - "id": { + "username": { "type": "string", - "description": "The client id to use." + "description": "The username to use." }, - "secret": { + "password": { "type": "string", - "description": "The client secret to use, if any." + "description": "The password to use." } }, "required": [ - "id" + "username", + "password" ] }, - "scopes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The scopes, if any, to request the token for." - }, - "audiences": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The audiences, if any, to request the token for." - }, - "username": { - "type": "string", - "description": "The username to use. Used only if the grant type is Password." - }, - "password": { - "type": "string", - "description": "The password to use. Used only if the grant type is Password." - }, - "subject": { - "$ref": "#/$defs/oauth2Token", - "description": "The security token that represents the identity of the party on behalf of whom the request is being made." + { + "$ref": "#/$defs/secretBasedAuthenticationPolicy", + "title": "DigestAuthenticationPolicySecret", + "description": "Secret based configuration of the digest authentication policy." + } + ] + } + }, + "required": [ + "digest" + ] + }, + { + "title": "OAuth2AuthenticationPolicy", + "description": "Use OAuth2 authentication.", + "properties": { + "oauth2": { + "type": "object", + "title": "OAuth2AuthenticationPolicyConfiguration", + "description": "The configuration of the OAuth2 authentication policy.", + "unevaluatedProperties": false, + "oneOf": [ + { + "type": "object", + "title": "OAuth2ConnectAuthenticationProperties", + "description": "The inline configuration of the OAuth2 authentication policy.", + "unevaluatedProperties": false, + "allOf": [ + { + "$ref": "#/$defs/oauth2AuthenticationProperties" + }, + { + "type": "object", + "properties": { + "endpoints": { + "type": "object", + "title": "OAuth2AuthenticationPropertiesEndpoints", + "description": "The endpoint configurations for OAuth2.", + "properties": { + "token": { + "type": "string", + "format": "uri-template", + "default": "/oauth2/token", + "title": "OAuth2TokenEndpoint", + "description": "The relative path to the token endpoint. Defaults to `/oauth2/token`." + }, + "revocation": { + "type": "string", + "format": "uri-template", + "default": "/oauth2/revoke", + "title": "OAuth2RevocationEndpoint", + "description": "The relative path to the revocation endpoint. Defaults to `/oauth2/revoke`." + }, + "introspection": { + "type": "string", + "format": "uri-template", + "default": "/oauth2/introspect", + "title": "OAuth2IntrospectionEndpoint", + "description": "The relative path to the introspection endpoint. Defaults to `/oauth2/introspect`." + } + } + } + } + } + ] }, - "actor": { - "$ref": "#/$defs/oauth2Token", - "description": "The security token that represents the identity of the acting party." + { + "$ref": "#/$defs/secretBasedAuthenticationPolicy", + "title": "OAuth2AuthenticationPolicySecret", + "description": "Secret based configuration of the OAuth2 authentication policy." } - }, - "required": [ - "authority", - "grant", - "client" ] } }, "required": [ "oauth2" + ] + }, + { + "title": "OpenIdConnectAuthenticationPolicy", + "description": "Use OpenIdConnect authentication.", + "properties": { + "oidc": { + "type": "object", + "title": "OpenIdConnectAuthenticationPolicyConfiguration", + "description": "The configuration of the OpenIdConnect authentication policy.", + "unevaluatedProperties": false, + "oneOf": [ + { + "$ref": "#/$defs/oauth2AuthenticationProperties", + "title": "OpenIdConnectAuthenticationProperties", + "description": "The inline configuration of the OpenIdConnect authentication policy.", + "unevaluatedProperties": false + }, + { + "$ref": "#/$defs/secretBasedAuthenticationPolicy", + "title": "OpenIdConnectAuthenticationPolicySecret", + "description": "Secret based configuration of the OpenIdConnect authentication policy." + } + ] + } + }, + "required": [ + "oidc" + ] + } + ] + }, + "oauth2AuthenticationProperties": { + "type": "object", + "title": "OAuth2AutenthicationData", + "description": "Inline configuration of the OAuth2 authentication policy.", + "properties": { + "authority": { + "type": "string", + "format": "uri-template", + "title": "OAuth2AutenthicationDataAuthority", + "description": "The URI that references the OAuth2 authority to use." + }, + "grant": { + "type": "string", + "enum": [ + "authorization_code", + "client_credentials", + "password", + "refresh_token", + "urn:ietf:params:oauth:grant-type:token-exchange" ], - "description": "Use OAUTH2 authentication." + "title": "OAuth2AutenthicationDataGrant", + "description": "The grant type to use." + }, + "client": { + "type": "object", + "title": "OAuth2AutenthicationDataClient", + "description": "The definition of an OAuth2 client.", + "unevaluatedProperties": false, + "properties": { + "id": { + "type": "string", + "title": "ClientId", + "description": "The client id to use." + }, + "secret": { + "type": "string", + "title": "ClientSecret", + "description": "The client secret to use, if any." + }, + "assertion": { + "type": "string", + "title": "ClientAssertion", + "description": "A JWT containing a signed assertion with your application credentials." + }, + "authentication": { + "type": "string", + "enum": [ + "client_secret_basic", + "client_secret_post", + "client_secret_jwt", + "private_key_jwt", + "none" + ], + "default": "client_secret_post", + "title": "ClientAuthentication", + "description": "The authentication method to use to authenticate the client." + } + } + }, + "request": { + "type": "object", + "title": "OAuth2TokenRequest", + "description": "The configuration of an OAuth2 token request", + "properties": { + "encoding": { + "type": "string", + "enum": [ + "application/x-www-form-urlencoded", + "application/json" + ], + "default": "application/x-www-form-urlencoded", + "title": "Oauth2TokenRequestEncoding" + } + } + }, + "issuers": { + "type": "array", + "title": "OAuth2Issuers", + "description": "A list that contains that contains valid issuers that will be used to check against the issuer of generated tokens.", + "items": { + "type": "string" + } + }, + "scopes": { + "type": "array", + "title": "OAuth2AutenthicationDataScopes", + "description": "The scopes, if any, to request the token for.", + "items": { + "type": "string" + } + }, + "audiences": { + "type": "array", + "title": "OAuth2AutenthicationDataAudiences", + "description": "The audiences, if any, to request the token for.", + "items": { + "type": "string" + } + }, + "username": { + "type": "string", + "title": "OAuth2AutenthicationDataUsername", + "description": "The username to use. Used only if the grant type is Password." + }, + "password": { + "type": "string", + "title": "OAuth2AutenthicationDataPassword", + "description": "The password to use. Used only if the grant type is Password." + }, + "subject": { + "$ref": "#/$defs/oauth2Token", + "title": "OAuth2AutenthicationDataSubject", + "description": "The security token that represents the identity of the party on behalf of whom the request is being made." + }, + "actor": { + "$ref": "#/$defs/oauth2Token", + "title": "OAuth2AutenthicationDataActor", + "description": "The security token that represents the identity of the acting party." } - ], - "description": "Defines an authentication policy." + } }, "oauth2Token": { "type": "object", + "title": "OAuth2TokenDefinition", + "description": "Represents an OAuth2 token.", + "unevaluatedProperties": false, "properties": { "token": { "type": "string", - "description": "The security token to use to use." + "title": "OAuth2Token", + "description": "The security token to use." }, "type": { "type": "string", - "description": "The type of the security token to use to use." + "title": "OAuth2TokenType", + "description": "The type of the security token to use." } }, "required": [ @@ -1136,99 +1604,245 @@ ] }, "duration": { - "type": "object", - "minProperties": 1, - "properties": { - "days": { - "type": "integer", - "description": "Number of days, if any." - }, - "hours": { - "type": "integer", - "description": "Number of days, if any." - }, - "minutes": { - "type": "integer", - "description": "Number of minutes, if any." - }, - "seconds": { - "type": "integer", - "description": "Number of seconds, if any." + "oneOf": [ + { + "type": "object", + "minProperties": 1, + "unevaluatedProperties": false, + "properties": { + "days": { + "type": "integer", + "title": "DurationDays", + "description": "Number of days, if any." + }, + "hours": { + "type": "integer", + "title": "DurationHours", + "description": "Number of days, if any." + }, + "minutes": { + "type": "integer", + "title": "DurationMinutes", + "description": "Number of minutes, if any." + }, + "seconds": { + "type": "integer", + "title": "DurationSeconds", + "description": "Number of seconds, if any." + }, + "milliseconds": { + "type": "integer", + "title": "DurationMilliseconds", + "description": "Number of milliseconds, if any." + } + }, + "title": "DurationInline", + "description": "The inline definition of a duration." }, - "milliseconds": { - "type": "integer", - "description": "Number of milliseconds, if any." + { + "type": "string", + "pattern": "^P(?!$)(\\d+(?:\\.\\d+)?Y)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?W)?(\\d+(?:\\.\\d+)?D)?(T(?=\\d)(\\d+(?:\\.\\d+)?H)?(\\d+(?:\\.\\d+)?M)?(\\d+(?:\\.\\d+)?S)?)?$", + "title": "DurationExpression", + "description": "The ISO 8601 expression of a duration." } - }, - "description": "The definition of a duration." + ] }, "error": { "type": "object", + "title": "Error", + "description": "Represents an error.", + "unevaluatedProperties": false, "properties": { "type": { - "type": "string", - "format": "uri", - "description": "A URI reference that identifies the error type." + "title": "ErrorType", + "description": "A URI reference that identifies the error type.", + "oneOf": [ + { + "title": "LiteralErrorType", + "description": "The literal error type.", + "type": "string", + "format": "uri-template" + }, + { + "$ref": "#/$defs/runtimeExpression", + "title": "ExpressionErrorType", + "description": "An expression based error type." + } + ] }, "status": { "type": "integer", + "title": "ErrorStatus", "description": "The status code generated by the origin for this occurrence of the error." }, "instance": { - "type": "string", - "format": "json-pointer", - "description": "A JSON Pointer used to reference the component the error originates from." + "title": "ErrorInstance", + "description": "A JSON Pointer used to reference the component the error originates from.", + "oneOf": [ + { + "title": "LiteralErrorInstance", + "description": "The literal error instance.", + "type": "string", + "format": "json-pointer" + }, + { + "$ref": "#/$defs/runtimeExpression", + "title": "ExpressionErrorInstance", + "description": "An expression based error instance." + } + ] }, "title": { "type": "string", + "title": "ErrorTitle", "description": "A short, human-readable summary of the error." }, "detail": { "type": "string", + "title": "ErrorDetails", "description": "A human-readable explanation specific to this occurrence of the error." } }, "required": [ "type", - "status", - "instance" + "status" ] }, "endpoint": { + "title": "Endpoint", + "description": "Represents an endpoint.", + "oneOf": [ + { + "$ref": "#/$defs/runtimeExpression" + }, + { + "title": "LiteralEndpoint", + "type": "string", + "format": "uri-template" + }, + { + "title": "EndpointConfiguration", + "type": "object", + "unevaluatedProperties": false, + "properties": { + "uri": { + "title": "EndpointUri", + "description": "The endpoint's URI.", + "oneOf": [ + { + "title": "LiteralEndpointURI", + "description": "The literal endpoint's URI.", + "type": "string", + "format": "uri-template" + }, + { + "$ref": "#/$defs/runtimeExpression", + "title": "ExpressionEndpointURI", + "description": "An expression based endpoint's URI." + } + ] + }, + "authentication": { + "$ref": "#/$defs/referenceableAuthenticationPolicy", + "title": "EndpointAuthentication", + "description": "The authentication policy to use." + } + }, + "required": [ + "uri" + ] + } + ] + }, + "eventProperties": { "type": "object", + "title": "EventProperties", + "description": "Describes the properties of an event.", "properties": { - "uri": { + "id": { "type": "string", - "format": "uri-template", - "description": "The endpoint's URI." + "title": "EventId", + "description": "The event's unique identifier." }, - "authentication": { - "description": "The authentication policy to use.", + "source": { + "title": "EventSource", + "description": "Identifies the context in which an event happened.", "oneOf": [ { - "$ref": "#/$defs/authenticationPolicy" + "title": "LiteralSource", + "type": "string", + "format": "uri-template" }, { - "type": "string" + "$ref": "#/$defs/runtimeExpression" + } + ] + }, + "type": { + "type": "string", + "title": "EventType", + "description": "This attribute contains a value describing the type of event related to the originating occurrence." + }, + "time": { + "title": "EventTime", + "description": "When the event occured.", + "oneOf": [ + { + "title": "LiteralTime", + "type": "string", + "format": "date-time" + }, + { + "$ref": "#/$defs/runtimeExpression" + } + ] + }, + "subject": { + "type": "string", + "title": "EventSubject", + "description": "The subject of the event." + }, + "datacontenttype": { + "type": "string", + "title": "EventDataContentType", + "description": "Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format." + }, + "dataschema": { + "title": "EventDataschema", + "description": "The schema describing the event format.", + "oneOf": [ + { + "title": "LiteralDataSchema", + "description": "The literal event data schema.", + "type": "string", + "format": "uri-template" + }, + { + "$ref": "#/$defs/runtimeExpression", + "title": "ExpressionDataSchema", + "description": "An expression based event data schema." } ] } }, - "required": [ - "uri" - ] + "additionalProperties": true }, "eventConsumptionStrategy": { "type": "object", + "title": "EventConsumptionStrategy", + "description": "Describe the event consumption strategy to adopt.", + "unevaluatedProperties": false, "oneOf": [ { + "title": "AllEventConsumptionStrategy", "properties": { "all": { "type": "array", + "title": "AllEventConsumptionStrategyConfiguration", + "description": "A list containing all the events that must be consumed.", "items": { "$ref": "#/$defs/eventFilter" - }, - "description": "A list containing all the events that must be consumed." + } } }, "required": [ @@ -1236,13 +1850,15 @@ ] }, { + "title": "AnyEventConsumptionStrategy", "properties": { "any": { "type": "array", + "title": "AnyEventConsumptionStrategyConfiguration", + "description": "A list containing any of the events to consume.", "items": { "$ref": "#/$defs/eventFilter" - }, - "description": "A list containing any of the events to consume." + } } }, "required": [ @@ -1250,9 +1866,11 @@ ] }, { + "title": "OneEventConsumptionStrategy", "properties": { "one": { "$ref": "#/$defs/eventFilter", + "title": "OneEventConsumptionStrategyConfiguration", "description": "The single event to consume." } }, @@ -1264,68 +1882,49 @@ }, "eventFilter": { "type": "object", + "title": "EventFilter", + "description": "An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes.", + "unevaluatedProperties": false, "properties": { "with": { - "type": "object", + "$ref": "#/$defs/eventProperties", "minProperties": 1, - "properties": { - "id": { - "type": "string", - "description": "The event's unique identifier" - }, - "source": { - "type": "string", - "description": "Identifies the context in which an event happened" - }, - "type": { - "type": "string", - "description": "This attribute contains a value describing the type of event related to the originating occurrence." - }, - "time": { - "type": "string" - }, - "subject": { - "type": "string" - }, - "datacontenttype": { - "type": "string", - "description": "Content type of data value. This attribute enables data to carry any type of content, whereby format and encoding might differ from that of the chosen event format." - }, - "dataschema": { - "type": "string" - } - }, - "additionalProperties": true, + "title": "WithEvent", "description": "An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes." }, "correlate": { "type": "object", + "title": "EventFilterCorrelate", + "description": "A correlation is a link between events and data, established by mapping event attributes to specific data attributes, allowing for coordinated processing or handling based on event characteristics.", "additionalProperties": { "type": "object", "properties": { "from": { "type": "string", + "title": "CorrelateFrom", "description": "A runtime expression used to extract the correlation value from the filtered event." }, "expect": { "type": "string", + "title": "CorrelateExpect", "description": "A constant or a runtime expression, if any, used to determine whether or not the extracted correlation value matches expectations. If not set, the first extracted value will be used as the correlation's expectation." } }, "required": [ "from" ] - }, - "description": "A correlation is a link between events and data, established by mapping event attributes to specific data attributes, allowing for coordinated processing or handling based on event characteristics." + } } }, "required": [ "with" - ], - "description": "An event filter is a mechanism used to selectively process or handle events based on predefined criteria, such as event type, source, or specific attributes." + ] }, "extension": { "type": "object", + "title": "Extension", + "description": "The definition of an extension.", + "unevaluatedProperties": false, "properties": { "extend": { "type": "string", @@ -1343,123 +1942,154 @@ "wait", "all" ], + "title": "ExtensionTarget", "description": "The type of task to extend." }, "when": { "type": "string", + "title": "ExtensionCondition", "description": "A runtime expression, if any, used to determine whether or not the extension should apply in the specified context." }, "before": { - "description": "The task(s) to execute before the extended task, if any.", - "$ref": "#/$defs/taskList" + "$ref": "#/$defs/taskList", + "title": "ExtensionDoBefore", + "description": "The task(s) to execute before the extended task, if any." }, "after": { - "description": "The task(s) to execute after the extended task, if any.", - "$ref": "#/$defs/taskList" + "$ref": "#/$defs/taskList", + "title": "ExtensionDoAfter", + "description": "The task(s) to execute after the extended task, if any." } }, "required": [ "extend" - ], - "description": "The definition of a an extension." + ] }, "externalResource": { - "oneOf": [ - { + "type": "object", + "title": "ExternalResource", + "description": "Represents an external resource.", + "unevaluatedProperties": false, + "properties": { + "name": { "type": "string", - "format": "uri" + "title": "ExternalResourceName", + "description": "The name of the external resource, if any." }, - { - "type": "object", - "properties": { - "uri": { - "type": "string", - "format": "uri", - "description": "The endpoint's URI." - }, - "authentication": { - "description": "The authentication policy to use.", - "oneOf": [ - { - "$ref": "#/$defs/authenticationPolicy" - }, - { - "type": "string" - } - ] - }, - "name": { - "type": "string", - "description": "The external resource's name, if any." - } - }, - "required": [ - "uri" - ] + "endpoint": { + "$ref": "#/$defs/endpoint", + "title": "ExternalResourceEndpoint", + "description": "The endpoint of the external resource." } + }, + "required": [ + "endpoint" ] }, "input": { "type": "object", + "title": "Input", + "description": "Configures the input of a workflow or task.", + "unevaluatedProperties": false, "properties": { "schema": { "$ref": "#/$defs/schema", + "title": "InputSchema", "description": "The schema used to describe and validate the input of the workflow or task." }, "from": { - "type": "string", - "description": "A runtime expression, if any, used to mutate and/or filter the input of the workflow or task." + "title": "InputFrom", + "description": "A runtime expression, if any, used to mutate and/or filter the input of the workflow or task.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "object" + } + ] } - }, - "description": "Configures the input of a workflow or task." + } }, "output": { "type": "object", + "title": "Output", + "description": "Configures the output of a workflow or task.", + "unevaluatedProperties": false, "properties": { "schema": { "$ref": "#/$defs/schema", + "title": "OutputSchema", "description": "The schema used to describe and validate the output of the workflow or task." }, "as": { - "type": "string", - "description": "A runtime expression, if any, used to mutate and/or filter the output of the workflow or task." + "title": "OutputAs", + "description": "A runtime expression, if any, used to mutate and/or filter the output of the workflow or task.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "object" + } + ] } - }, - "description": "Configures the output of a workflow or task." + } }, "export": { "type": "object", + "title": "Export", + "description": "Set the content of the context. .", + "unevaluatedProperties": false, "properties": { "schema": { "$ref": "#/$defs/schema", + "title": "ExportSchema", "description": "The schema used to describe and validate the workflow context." }, "as": { - "type": "string", - "description": "A runtime expression, if any, used to export the output data to the context." + "title": "ExportAs", + "description": "A runtime expression, if any, used to export the output data to the context.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "object" + } + ] } - }, - "description": "Set the content of the context." + } }, "retryPolicy": { "type": "object", + "title": "RetryPolicy", + "description": "Defines a retry policy.", + "unevaluatedProperties": false, "properties": { "when": { "type": "string", + "title": "RetryWhen", "description": "A runtime expression, if any, used to determine whether or not to retry running the task, in a given context." }, "exceptWhen": { "type": "string", + "title": "RetryExcepWhen", "description": "A runtime expression used to determine whether or not to retry running the task, in a given context." }, "delay": { "$ref": "#/$defs/duration", + "title": "RetryDelay", "description": "The duration to wait between retry attempts." }, "backoff": { "type": "object", + "title": "RetryBackoff", + "description": "The retry duration backoff.", + "unevaluatedProperties": false, "oneOf": [ { + "title": "ConstantBackoff", "properties": { "constant": { "type": "object", @@ -1471,6 +2101,7 @@ ] }, { + "title": "ExponentialBackOff", "properties": { "exponential": { "type": "object", @@ -1482,6 +2113,7 @@ ] }, { + "title": "LinearBackoff", "properties": { "linear": { "type": "object", @@ -1492,64 +2124,78 @@ "linear" ] } - ], - "description": "The retry duration backoff." + ] }, "limit": { "type": "object", + "title": "RetryLimit", + "unevaluatedProperties": false, "properties": { "attempt": { "type": "object", + "title": "RetryLimitAttempt", + "unevaluatedProperties": false, "properties": { "count": { "type": "integer", + "title": "RetryLimitAttemptCount", "description": "The maximum amount of retry attempts, if any." }, "duration": { "$ref": "#/$defs/duration", + "title": "RetryLimitAttemptDuration", "description": "The maximum duration for each retry attempt." } } }, "duration": { "$ref": "#/$defs/duration", + "title": "RetryLimitDuration", "description": "The duration limit, if any, for all retry attempts." } }, - "description": "The retry limit, if any" + "description": "The retry limit, if any." }, "jitter": { "type": "object", + "title": "RetryPolicyJitter", + "description": "The parameters, if any, that control the randomness or variability of the delay between retry attempts.", + "unevaluatedProperties": false, "properties": { "from": { "$ref": "#/$defs/duration", - "description": "The minimum duration of the jitter range" + "title": "RetryPolicyJitterFrom", + "description": "The minimum duration of the jitter range." }, "to": { "$ref": "#/$defs/duration", - "description": "The maximum duration of the jitter range" + "title": "RetryPolicyJitterTo", + "description": "The maximum duration of the jitter range." } }, "required": [ "from", "to" - ], - "description": "The parameters, if any, that control the randomness or variability of the delay between retry attempts." + ] } - }, - "description": "Defines a retry policy." + } }, "schema": { "type": "object", + "title": "Schema", + "description": "Represents the definition of a schema.", + "unevaluatedProperties": false, "properties": { "format": { "type": "string", "default": "json", + "title": "SchemaFormat", "description": "The schema's format. Defaults to 'json'. The (optional) version of the format can be set using `{format}:{version}`." } }, "oneOf": [ { + "title": "SchemaInline", "properties": { "document": { "description": "The schema's inline definition." @@ -1560,9 +2206,11 @@ ] }, { + "title": "SchemaExternal", "properties": { "resource": { "$ref": "#/$defs/externalResource", + "title": "SchemaExternalResource", "description": "The schema's external resource." } }, @@ -1570,25 +2218,29 @@ "resource" ] } - ], - "description": "Represents the definition of a schema." + ] }, "timeout": { "type": "object", + "title": "Timeout", + "description": "The definition of a timeout.", + "unevaluatedProperties": false, "properties": { "after": { "$ref": "#/$defs/duration", + "title": "TimeoutAfter", "description": "The duration after which to timeout." } }, "required": [ "after" - ], - "description": "The definition of a timeout." + ] + }, + "runtimeExpression": { + "type": "string", + "title": "RuntimeExpression", + "description": "A runtime expression.", + "pattern": "^\\s*\\$\\{.+\\}\\s*$" } - }, - "required": [ - "document", - "do" - ] + } } \ No newline at end of file diff --git a/src/lib/generated/schema/workflow.yaml b/src/lib/generated/schema/workflow.yaml new file mode 100644 index 00000000..0c396fbf --- /dev/null +++ b/src/lib/generated/schema/workflow.yaml @@ -0,0 +1,1784 @@ +$id: https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.yaml +$schema: https://json-schema.org/draft/2020-12/schema +description: Serverless Workflow DSL - Workflow Schema. +type: object +required: + - document + - do +properties: + document: + type: object + title: Document + description: Documents the workflow. + unevaluatedProperties: false + properties: + dsl: + type: string + pattern: >- + ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ + title: WorkflowDSL + description: The version of the DSL used by the workflow. + namespace: + type: string + pattern: ^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$ + title: WorkflowNamespace + description: The workflow's namespace. + name: + type: string + pattern: ^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$ + title: WorkflowName + description: The workflow's name. + version: + type: string + pattern: >- + ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ + title: WorkflowVersion + description: The workflow's semantic version. + title: + type: string + title: WorkflowTitle + description: The workflow's title. + summary: + type: string + title: WorkflowSummary + description: The workflow's Markdown summary. + tags: + type: object + title: WorkflowTags + description: A key/value mapping of the workflow's tags, if any. + additionalProperties: true + metadata: + type: object + title: WorkflowMetadata + description: Holds additional information about the workflow. + additionalProperties: true + required: + - dsl + - namespace + - name + - version + input: + $ref: '#/$defs/input' + title: Input + description: Configures the workflow's input. + use: + type: object + title: Use + description: Defines the workflow's reusable components. + unevaluatedProperties: false + properties: + authentications: + type: object + title: UseAuthentications + description: The workflow's reusable authentication policies. + additionalProperties: + $ref: '#/$defs/authenticationPolicy' + errors: + type: object + title: UseErrors + description: The workflow's reusable errors. + additionalProperties: + $ref: '#/$defs/error' + extensions: + type: array + title: UseExtensions + description: The workflow's extensions. + items: + type: object + title: ExtensionItem + minProperties: 1 + maxProperties: 1 + additionalProperties: + $ref: '#/$defs/extension' + functions: + type: object + title: UseFunctions + description: The workflow's reusable functions. + additionalProperties: + $ref: '#/$defs/task' + retries: + type: object + title: UseRetries + description: The workflow's reusable retry policies. + additionalProperties: + $ref: '#/$defs/retryPolicy' + secrets: + type: array + title: UseSecrets + description: The workflow's reusable secrets. + items: + type: string + description: The workflow's secrets. + timeouts: + type: object + title: UseTimeouts + description: The workflow's reusable timeouts. + additionalProperties: + $ref: '#/$defs/timeout' + do: + $ref: '#/$defs/taskList' + title: Do + description: Defines the task(s) the workflow must perform. + timeout: + oneOf: + - $ref: '#/$defs/timeout' + title: TimeoutDefinition + description: The workflow's timeout configuration, if any. + - type: string + title: TimeoutReference + description: The name of the workflow's timeout, if any. + output: + $ref: '#/$defs/output' + title: Output + description: Configures the workflow's output. + schedule: + type: object + title: Schedule + description: Schedules the workflow. + unevaluatedProperties: false + properties: + every: + $ref: '#/$defs/duration' + title: ScheduleEvery + description: >- + Specifies the duration of the interval at which the workflow should be + executed. + cron: + type: string + title: ScheduleCron + description: >- + Specifies the schedule using a cron expression, e.g., '0 0 * * *' for + daily at midnight. + after: + $ref: '#/$defs/duration' + title: ScheduleAfter + description: >- + Specifies a delay duration that the workflow must wait before starting + again after it completes. + 'on': + $ref: '#/$defs/eventConsumptionStrategy' + title: ScheduleOn + description: Specifies the events that trigger the workflow execution. +$defs: + taskList: + title: TaskList + description: List of named tasks to perform. + type: array + items: + type: object + title: TaskItem + minProperties: 1 + maxProperties: 1 + additionalProperties: + $ref: '#/$defs/task' + taskBase: + type: object + title: TaskBase + description: An object inherited by all tasks. + properties: + if: + type: string + title: TaskBaseIf + description: >- + A runtime expression, if any, used to determine whether or not the + task should be run. + input: + $ref: '#/$defs/input' + title: TaskBaseInput + description: Configure the task's input. + output: + $ref: '#/$defs/output' + title: TaskBaseOutput + description: Configure the task's output. + export: + $ref: '#/$defs/export' + title: TaskBaseExport + description: Export task output to context. + timeout: + oneOf: + - $ref: '#/$defs/timeout' + title: TaskTimeoutDefinition + description: The task's timeout configuration, if any. + - type: string + title: TaskTimeoutReference + description: The name of the task's timeout, if any. + then: + $ref: '#/$defs/flowDirective' + title: TaskBaseThen + description: The flow directive to be performed upon completion of the task. + metadata: + type: object + title: TaskMetadata + description: Holds additional information about the task. + additionalProperties: true + task: + title: Task + description: >- + A discrete unit of work that contributes to achieving the overall + objectives defined by the workflow. + unevaluatedProperties: false + oneOf: + - $ref: '#/$defs/callTask' + - $ref: '#/$defs/doTask' + - $ref: '#/$defs/forkTask' + - $ref: '#/$defs/emitTask' + - $ref: '#/$defs/forTask' + - $ref: '#/$defs/listenTask' + - $ref: '#/$defs/raiseTask' + - $ref: '#/$defs/runTask' + - $ref: '#/$defs/setTask' + - $ref: '#/$defs/switchTask' + - $ref: '#/$defs/tryTask' + - $ref: '#/$defs/waitTask' + callTask: + title: CallTask + description: Defines the call to perform. + oneOf: + - title: CallAsyncAPI + description: Defines the AsyncAPI call to perform. + $ref: '#/$defs/taskBase' + type: object + required: + - call + - with + unevaluatedProperties: false + properties: + call: + type: string + const: asyncapi + with: + type: object + title: AsyncApiArguments + description: The Async API call arguments. + properties: + document: + $ref: '#/$defs/externalResource' + title: WithAsyncAPIDocument + description: The document that defines the AsyncAPI operation to call. + operationRef: + type: string + title: WithAsyncAPIOperation + description: A reference to the AsyncAPI operation to call. + server: + type: string + title: WithAsyncAPIServer + description: >- + A a reference to the server to call the specified AsyncAPI + operation on. If not set, default to the first server matching + the operation's channel. + message: + type: string + title: WithAsyncAPIMessage + description: >- + The name of the message to use. If not set, defaults to the + first message defined by the operation. + binding: + type: string + title: WithAsyncAPIBinding + description: >- + The name of the binding to use. If not set, defaults to the + first binding defined by the operation. + payload: + type: object + title: WithAsyncAPIPayload + description: The payload to call the AsyncAPI operation with, if any. + authentication: + $ref: '#/$defs/referenceableAuthenticationPolicy' + title: WithAsyncAPIAuthentication + description: >- + The authentication policy, if any, to use when calling the + AsyncAPI operation. + required: + - document + - operationRef + unevaluatedProperties: false + - title: CallGRPC + description: Defines the GRPC call to perform. + $ref: '#/$defs/taskBase' + type: object + unevaluatedProperties: false + required: + - call + - with + properties: + call: + type: string + const: grpc + with: + type: object + title: GRPCArguments + description: The GRPC call arguments. + properties: + proto: + $ref: '#/$defs/externalResource' + title: WithGRPCProto + description: The proto resource that describes the GRPC service to call. + service: + type: object + title: WithGRPCService + unevaluatedProperties: false + properties: + name: + type: string + title: WithGRPCServiceName + description: The name of the GRPC service to call. + host: + type: string + title: WithGRPCServiceHost + description: The hostname of the GRPC service to call. + pattern: ^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$ + port: + type: integer + title: WithGRPCServicePost + description: The port number of the GRPC service to call. + minimum: 0 + maximum: 65535 + authentication: + $ref: '#/$defs/referenceableAuthenticationPolicy' + title: WithGRPCServiceAuthentication + description: The endpoint's authentication policy, if any. + required: + - name + - host + method: + type: string + title: WithGRPCMethod + description: The name of the method to call on the defined GRPC service. + arguments: + type: object + title: WithGRPCArguments + description: The arguments, if any, to call the method with. + additionalProperties: true + required: + - proto + - service + - method + unevaluatedProperties: false + - title: CallHTTP + description: Defines the HTTP call to perform. + $ref: '#/$defs/taskBase' + type: object + unevaluatedProperties: false + required: + - call + - with + properties: + call: + type: string + const: http + with: + type: object + title: HTTPArguments + description: The HTTP call arguments. + properties: + method: + type: string + title: WithHTTPMethod + description: The HTTP method of the HTTP request to perform. + endpoint: + title: WithHTTPEndpoint + description: The HTTP endpoint to send the request to. + $ref: '#/$defs/endpoint' + headers: + type: object + title: WithHTTPHeaders + description: >- + A name/value mapping of the headers, if any, of the HTTP + request to perform. + body: + title: WithHTTPBody + description: The body, if any, of the HTTP request to perform. + query: + type: object + title: WithHTTPQuery + description: >- + A name/value mapping of the query parameters, if any, of the + HTTP request to perform. + additionalProperties: true + output: + type: string + title: WithHTTPOutput + description: The http call output format. Defaults to 'content'. + enum: + - raw + - content + - response + required: + - method + - endpoint + unevaluatedProperties: false + - title: CallOpenAPI + description: Defines the OpenAPI call to perform. + $ref: '#/$defs/taskBase' + type: object + unevaluatedProperties: false + required: + - call + - with + properties: + call: + type: string + const: openapi + with: + type: object + title: OpenAPIArguments + description: The OpenAPI call arguments. + properties: + document: + $ref: '#/$defs/externalResource' + title: WithOpenAPIDocument + description: The document that defines the OpenAPI operation to call. + operationId: + type: string + title: WithOpenAPIOperation + description: The id of the OpenAPI operation to call. + parameters: + type: object + title: WithOpenAPIParameters + description: >- + A name/value mapping of the parameters of the OpenAPI + operation to call. + additionalProperties: true + authentication: + $ref: '#/$defs/referenceableAuthenticationPolicy' + title: WithOpenAPIAuthentication + description: >- + The authentication policy, if any, to use when calling the + OpenAPI operation. + output: + type: string + enum: + - raw + - content + - response + title: WithOpenAPIOutput + description: The http call output format. Defaults to 'content'. + required: + - document + - operationId + unevaluatedProperties: false + - title: CallFunction + description: Defines the function call to perform. + $ref: '#/$defs/taskBase' + type: object + unevaluatedProperties: false + required: + - call + properties: + call: + type: string + not: + enum: + - asyncapi + - grpc + - http + - openapi + description: The name of the function to call. + with: + type: object + title: FunctionArguments + description: >- + A name/value mapping of the parameters, if any, to call the + function with. + additionalProperties: true + forkTask: + type: object + $ref: '#/$defs/taskBase' + title: ForkTask + description: >- + Allows workflows to execute multiple tasks concurrently and optionally + race them against each other, with a single possible winner, which sets + the task's output. + unevaluatedProperties: false + required: + - fork + properties: + fork: + type: object + title: ForkTaskConfiguration + description: The configuration of the branches to perform concurrently. + unevaluatedProperties: false + required: + - branches + properties: + branches: + $ref: '#/$defs/taskList' + title: ForkBranches + compete: + type: boolean + title: ForkCompete + description: >- + Indicates whether or not the concurrent tasks are racing against + each other, with a single possible winner, which sets the + composite task's output. + default: false + doTask: + type: object + $ref: '#/$defs/taskBase' + title: DoTask + description: Allows to execute a list of tasks in sequence. + unevaluatedProperties: false + required: + - do + properties: + do: + $ref: '#/$defs/taskList' + title: DoTaskConfiguration + description: The configuration of the tasks to perform sequentially. + emitTask: + type: object + $ref: '#/$defs/taskBase' + title: EmitTask + description: >- + Allows workflows to publish events to event brokers or messaging systems, + facilitating communication and coordination between different components + and services. + required: + - emit + unevaluatedProperties: false + properties: + emit: + type: object + title: EmitTaskConfiguration + description: The configuration of an event's emission. + unevaluatedProperties: false + properties: + event: + type: object + title: EmitEventDefinition + description: The definition of the event to emit. + properties: + with: + $ref: '#/$defs/eventProperties' + title: EmitEventWith + description: Defines the properties of event to emit. + required: + - source + - type + additionalProperties: true + required: + - event + forTask: + type: object + $ref: '#/$defs/taskBase' + title: ForTask + description: >- + Allows workflows to iterate over a collection of items, executing a + defined set of subtasks for each item in the collection. This task type is + instrumental in handling scenarios such as batch processing, data + transformation, and repetitive operations across datasets. + required: + - for + - do + unevaluatedProperties: false + properties: + for: + type: object + title: ForTaskConfiguration + description: The definition of the loop that iterates over a range of values. + unevaluatedProperties: false + properties: + each: + type: string + title: ForEach + description: >- + The name of the variable used to store the current item being + enumerated. + default: item + in: + type: string + title: ForIn + description: A runtime expression used to get the collection to enumerate. + at: + type: string + title: ForAt + description: >- + The name of the variable used to store the index of the current + item being enumerated. + default: index + required: + - in + while: + type: string + title: While + description: >- + A runtime expression that represents the condition, if any, that must + be met for the iteration to continue. + do: + $ref: '#/$defs/taskList' + title: ForTaskDo + listenTask: + type: object + $ref: '#/$defs/taskBase' + title: ListenTask + description: >- + Provides a mechanism for workflows to await and react to external events, + enabling event-driven behavior within workflow systems. + required: + - listen + unevaluatedProperties: false + properties: + listen: + type: object + title: ListenTaskConfiguration + description: The configuration of the listener to use. + unevaluatedProperties: false + properties: + to: + $ref: '#/$defs/eventConsumptionStrategy' + title: ListenTo + description: Defines the event(s) to listen to. + required: + - to + raiseTask: + type: object + $ref: '#/$defs/taskBase' + title: RaiseTask + description: Intentionally triggers and propagates errors. + required: + - raise + unevaluatedProperties: false + properties: + raise: + type: object + title: RaiseTaskConfiguration + description: The definition of the error to raise. + unevaluatedProperties: false + properties: + error: + oneOf: + - $ref: '#/$defs/error' + title: RaiseErrorDefinition + description: Defines the error to raise. + - type: string + title: RaiseErrorReference + description: The name of the error to raise + required: + - error + runTask: + type: object + $ref: '#/$defs/taskBase' + title: RunTask + description: >- + Provides the capability to execute external containers, shell commands, + scripts, or workflows. + required: + - run + unevaluatedProperties: false + properties: + run: + type: object + title: RunTaskConfiguration + description: The configuration of the process to execute. + unevaluatedProperties: false + properties: + await: + type: boolean + default: true + title: AwaitProcessCompletion + description: Whether to await the process completion before continuing. + oneOf: + - title: RunContainer + description: >- + Enables the execution of external processes encapsulated within a + containerized environment. + properties: + container: + type: object + title: Container + description: The configuration of the container to run. + unevaluatedProperties: false + properties: + image: + type: string + title: ContainerImage + description: The name of the container image to run. + command: + type: string + title: ContainerCommand + description: The command, if any, to execute on the container. + ports: + type: object + title: ContainerPorts + description: The container's port mappings, if any. + volumes: + type: object + title: ContainerVolumes + description: The container's volume mappings, if any. + environment: + type: object + title: ContainerEnvironment + description: >- + A key/value mapping of the environment variables, if any, + to use when running the configured process. + required: + - image + required: + - container + - title: RunScript + description: >- + Enables the execution of custom scripts or code within a workflow, + empowering workflows to perform specialized logic, data + processing, or integration tasks by executing user-defined scripts + written in various programming languages. + properties: + script: + type: object + title: Script + description: The configuration of the script to run. + unevaluatedProperties: false + properties: + language: + type: string + title: ScriptLanguage + description: The language of the script to run. + arguments: + type: object + title: ScriptArguments + description: >- + A key/value mapping of the arguments, if any, to use when + running the configured script. + additionalProperties: true + environment: + type: object + title: ScriptEnvironment + description: >- + A key/value mapping of the environment variables, if any, + to use when running the configured script process. + additionalProperties: true + oneOf: + - title: InlineScript + type: object + description: The script's code. + properties: + code: + type: string + title: InlineScriptCode + required: + - code + - title: ExternalScript + type: object + description: The script's resource. + properties: + source: + $ref: '#/$defs/externalResource' + title: ExternalScriptResource + required: + - source + required: + - language + required: + - script + - title: RunShell + description: >- + Enables the execution of shell commands within a workflow, + enabling workflows to interact with the underlying operating + system and perform system-level operations, such as file + manipulation, environment configuration, or system administration + tasks. + properties: + shell: + type: object + title: Shell + description: The configuration of the shell command to run. + unevaluatedProperties: false + properties: + command: + type: string + title: ShellCommand + description: The shell command to run. + arguments: + type: object + title: ShellArguments + description: A list of the arguments of the shell command to run. + additionalProperties: true + environment: + type: object + title: ShellEnvironment + description: >- + A key/value mapping of the environment variables, if any, + to use when running the configured process. + additionalProperties: true + required: + - command + required: + - shell + - title: RunWorkflow + description: >- + Enables the invocation and execution of nested workflows within a + parent workflow, facilitating modularization, reusability, and + abstraction of complex logic or business processes by + encapsulating them into standalone workflow units. + properties: + workflow: + type: object + title: SubflowConfiguration + description: The configuration of the workflow to run. + unevaluatedProperties: false + properties: + namespace: + type: string + title: SubflowNamespace + description: The namespace the workflow to run belongs to. + name: + type: string + title: SubflowName + description: The name of the workflow to run. + version: + type: string + default: latest + title: SubflowVersion + description: The version of the workflow to run. Defaults to latest. + input: + type: object + title: SubflowInput + description: >- + The data, if any, to pass as input to the workflow to + execute. The value should be validated against the target + workflow's input schema, if specified. + additionalProperties: true + required: + - namespace + - name + - version + required: + - workflow + setTask: + type: object + $ref: '#/$defs/taskBase' + title: SetTask + description: A task used to set data. + required: + - set + unevaluatedProperties: false + properties: + set: + type: object + title: SetTaskConfiguration + description: The data to set. + minProperties: 1 + additionalProperties: true + switchTask: + type: object + $ref: '#/$defs/taskBase' + title: SwitchTask + description: >- + Enables conditional branching within workflows, allowing them to + dynamically select different paths based on specified conditions or + criteria. + required: + - switch + unevaluatedProperties: false + properties: + switch: + type: array + title: SwitchTaskConfiguration + description: The definition of the switch to use. + minItems: 1 + items: + type: object + title: SwitchItem + minProperties: 1 + maxProperties: 1 + additionalProperties: + type: object + title: SwitchCase + description: >- + The definition of a case within a switch task, defining a + condition and corresponding tasks to execute if the condition is + met. + unevaluatedProperties: false + required: + - then + properties: + when: + type: string + title: SwitchCaseCondition + description: >- + A runtime expression used to determine whether or not the case + matches. + then: + $ref: '#/$defs/flowDirective' + title: SwitchCaseOutcome + description: The flow directive to execute when the case matches. + tryTask: + type: object + $ref: '#/$defs/taskBase' + title: TryTask + description: >- + Serves as a mechanism within workflows to handle errors gracefully, + potentially retrying failed tasks before proceeding with alternate ones. + required: + - try + - catch + unevaluatedProperties: false + properties: + try: + $ref: '#/$defs/taskList' + title: TryTaskConfiguration + description: The task(s) to perform. + catch: + type: object + title: TryTaskCatch + description: The object used to define the errors to catch. + unevaluatedProperties: false + properties: + errors: + type: object + title: CatchErrors + description: The configuration of a concept used to catch errors. + as: + type: string + title: CatchAs + description: >- + The name of the runtime expression variable to save the error as. + Defaults to 'error'. + when: + type: string + title: CatchWhen + description: >- + A runtime expression used to determine whether or not to catch the + filtered error. + exceptWhen: + type: string + title: CatchExceptWhen + description: >- + A runtime expression used to determine whether or not to catch the + filtered error. + retry: + oneOf: + - $ref: '#/$defs/retryPolicy' + title: RetryPolicyDefinition + description: The retry policy to use, if any, when catching errors. + - type: string + title: RetryPolicyReference + description: >- + The name of the retry policy to use, if any, when catching + errors. + do: + $ref: '#/$defs/taskList' + title: TryTaskCatchDo + description: The definition of the task(s) to run when catching an error. + waitTask: + type: object + $ref: '#/$defs/taskBase' + title: WaitTask + description: >- + Allows workflows to pause or delay their execution for a specified period + of time. + required: + - wait + unevaluatedProperties: false + properties: + wait: + $ref: '#/$defs/duration' + title: WaitTaskConfiguration + description: The amount of time to wait. + flowDirective: + title: FlowDirective + description: Represents different transition options for a workflow. + anyOf: + - type: string + enum: + - continue + - exit + - end + default: continue + - type: string + referenceableAuthenticationPolicy: + type: object + title: ReferenceableAuthenticationPolicy + description: Represents a referenceable authentication policy. + unevaluatedProperties: false + oneOf: + - title: AuthenticationPolicyReference + description: The reference of the authentication policy to use. + properties: + use: + type: string + minLength: 1 + title: ReferenceableAuthenticationPolicyName + description: The name of the authentication policy to use. + required: + - use + - $ref: '#/$defs/authenticationPolicy' + secretBasedAuthenticationPolicy: + type: object + title: SecretBasedAuthenticationPolicy + description: Represents an authentication policy based on secrets. + unevaluatedProperties: false + properties: + use: + type: string + minLength: 1 + title: SecretBasedAuthenticationPolicyName + description: The name of the authentication policy to use. + required: + - use + authenticationPolicy: + type: object + title: AuthenticationPolicy + description: Defines an authentication policy. + oneOf: + - title: BasicAuthenticationPolicy + description: Use basic authentication. + properties: + basic: + type: object + title: BasicAuthenticationPolicyConfiguration + description: The configuration of the basic authentication policy. + unevaluatedProperties: false + oneOf: + - title: BasicAuthenticationProperties + description: Inline configuration of the basic authentication policy. + properties: + username: + type: string + description: The username to use. + password: + type: string + description: The password to use. + required: + - username + - password + - $ref: '#/$defs/secretBasedAuthenticationPolicy' + title: BasicAuthenticationPolicySecret + description: Secret based configuration of the basic authentication policy. + required: + - basic + - title: BearerAuthenticationPolicy + description: Use bearer authentication. + properties: + bearer: + type: object + title: BearerAuthenticationPolicyConfiguration + description: The configuration of the bearer authentication policy. + unevaluatedProperties: false + oneOf: + - title: BearerAuthenticationProperties + description: Inline configuration of the bearer authentication policy. + properties: + token: + type: string + description: The bearer token to use. + required: + - token + - $ref: '#/$defs/secretBasedAuthenticationPolicy' + title: BearerAuthenticationPolicySecret + description: >- + Secret based configuration of the bearer authentication + policy. + required: + - bearer + - title: DigestAuthenticationPolicy + description: Use digest authentication. + properties: + digest: + type: object + title: DigestAuthenticationPolicyConfiguration + description: The configuration of the digest authentication policy. + unevaluatedProperties: false + oneOf: + - title: DigestAuthenticationProperties + description: Inline configuration of the digest authentication policy. + properties: + username: + type: string + description: The username to use. + password: + type: string + description: The password to use. + required: + - username + - password + - $ref: '#/$defs/secretBasedAuthenticationPolicy' + title: DigestAuthenticationPolicySecret + description: >- + Secret based configuration of the digest authentication + policy. + required: + - digest + - title: OAuth2AuthenticationPolicy + description: Use OAuth2 authentication. + properties: + oauth2: + type: object + title: OAuth2AuthenticationPolicyConfiguration + description: The configuration of the OAuth2 authentication policy. + unevaluatedProperties: false + oneOf: + - type: object + title: OAuth2ConnectAuthenticationProperties + description: The inline configuration of the OAuth2 authentication policy. + unevaluatedProperties: false + allOf: + - $ref: '#/$defs/oauth2AuthenticationProperties' + - type: object + properties: + endpoints: + type: object + title: OAuth2AuthenticationPropertiesEndpoints + description: The endpoint configurations for OAuth2. + properties: + token: + type: string + format: uri-template + default: /oauth2/token + title: OAuth2TokenEndpoint + description: >- + The relative path to the token endpoint. Defaults + to `/oauth2/token`. + revocation: + type: string + format: uri-template + default: /oauth2/revoke + title: OAuth2RevocationEndpoint + description: >- + The relative path to the revocation endpoint. + Defaults to `/oauth2/revoke`. + introspection: + type: string + format: uri-template + default: /oauth2/introspect + title: OAuth2IntrospectionEndpoint + description: >- + The relative path to the introspection endpoint. + Defaults to `/oauth2/introspect`. + - $ref: '#/$defs/secretBasedAuthenticationPolicy' + title: OAuth2AuthenticationPolicySecret + description: >- + Secret based configuration of the OAuth2 authentication + policy. + required: + - oauth2 + - title: OpenIdConnectAuthenticationPolicy + description: Use OpenIdConnect authentication. + properties: + oidc: + type: object + title: OpenIdConnectAuthenticationPolicyConfiguration + description: The configuration of the OpenIdConnect authentication policy. + unevaluatedProperties: false + oneOf: + - $ref: '#/$defs/oauth2AuthenticationProperties' + title: OpenIdConnectAuthenticationProperties + description: >- + The inline configuration of the OpenIdConnect authentication + policy. + unevaluatedProperties: false + - $ref: '#/$defs/secretBasedAuthenticationPolicy' + title: OpenIdConnectAuthenticationPolicySecret + description: >- + Secret based configuration of the OpenIdConnect authentication + policy. + required: + - oidc + oauth2AuthenticationProperties: + type: object + title: OAuth2AutenthicationData + description: Inline configuration of the OAuth2 authentication policy. + properties: + authority: + type: string + format: uri-template + title: OAuth2AutenthicationDataAuthority + description: The URI that references the OAuth2 authority to use. + grant: + type: string + enum: + - authorization_code + - client_credentials + - password + - refresh_token + - urn:ietf:params:oauth:grant-type:token-exchange + title: OAuth2AutenthicationDataGrant + description: The grant type to use. + client: + type: object + title: OAuth2AutenthicationDataClient + description: The definition of an OAuth2 client. + unevaluatedProperties: false + properties: + id: + type: string + title: ClientId + description: The client id to use. + secret: + type: string + title: ClientSecret + description: The client secret to use, if any. + assertion: + type: string + title: ClientAssertion + description: >- + A JWT containing a signed assertion with your application + credentials. + authentication: + type: string + enum: + - client_secret_basic + - client_secret_post + - client_secret_jwt + - private_key_jwt + - none + default: client_secret_post + title: ClientAuthentication + description: The authentication method to use to authenticate the client. + request: + type: object + title: OAuth2TokenRequest + description: The configuration of an OAuth2 token request + properties: + encoding: + type: string + enum: + - application/x-www-form-urlencoded + - application/json + default: application/x-www-form-urlencoded + title: Oauth2TokenRequestEncoding + issuers: + type: array + title: OAuth2Issuers + description: >- + A list that contains that contains valid issuers that will be used to + check against the issuer of generated tokens. + items: + type: string + scopes: + type: array + title: OAuth2AutenthicationDataScopes + description: The scopes, if any, to request the token for. + items: + type: string + audiences: + type: array + title: OAuth2AutenthicationDataAudiences + description: The audiences, if any, to request the token for. + items: + type: string + username: + type: string + title: OAuth2AutenthicationDataUsername + description: The username to use. Used only if the grant type is Password. + password: + type: string + title: OAuth2AutenthicationDataPassword + description: The password to use. Used only if the grant type is Password. + subject: + $ref: '#/$defs/oauth2Token' + title: OAuth2AutenthicationDataSubject + description: >- + The security token that represents the identity of the party on behalf + of whom the request is being made. + actor: + $ref: '#/$defs/oauth2Token' + title: OAuth2AutenthicationDataActor + description: The security token that represents the identity of the acting party. + oauth2Token: + type: object + title: OAuth2TokenDefinition + description: Represents an OAuth2 token. + unevaluatedProperties: false + properties: + token: + type: string + title: OAuth2Token + description: The security token to use. + type: + type: string + title: OAuth2TokenType + description: The type of the security token to use. + required: + - token + - type + duration: + oneOf: + - type: object + minProperties: 1 + unevaluatedProperties: false + properties: + days: + type: integer + title: DurationDays + description: Number of days, if any. + hours: + type: integer + title: DurationHours + description: Number of days, if any. + minutes: + type: integer + title: DurationMinutes + description: Number of minutes, if any. + seconds: + type: integer + title: DurationSeconds + description: Number of seconds, if any. + milliseconds: + type: integer + title: DurationMilliseconds + description: Number of milliseconds, if any. + title: DurationInline + description: The inline definition of a duration. + - type: string + pattern: >- + ^P(?!$)(\d+(?:\.\d+)?Y)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?W)?(\d+(?:\.\d+)?D)?(T(?=\d)(\d+(?:\.\d+)?H)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?S)?)?$ + title: DurationExpression + description: The ISO 8601 expression of a duration. + error: + type: object + title: Error + description: Represents an error. + unevaluatedProperties: false + properties: + type: + title: ErrorType + description: A URI reference that identifies the error type. + oneOf: + - title: LiteralErrorType + description: The literal error type. + type: string + format: uri-template + - $ref: '#/$defs/runtimeExpression' + title: ExpressionErrorType + description: An expression based error type. + status: + type: integer + title: ErrorStatus + description: >- + The status code generated by the origin for this occurrence of the + error. + instance: + title: ErrorInstance + description: >- + A JSON Pointer used to reference the component the error originates + from. + oneOf: + - title: LiteralErrorInstance + description: The literal error instance. + type: string + format: json-pointer + - $ref: '#/$defs/runtimeExpression' + title: ExpressionErrorInstance + description: An expression based error instance. + title: + type: string + title: ErrorTitle + description: A short, human-readable summary of the error. + detail: + type: string + title: ErrorDetails + description: A human-readable explanation specific to this occurrence of the error. + required: + - type + - status + endpoint: + title: Endpoint + description: Represents an endpoint. + oneOf: + - $ref: '#/$defs/runtimeExpression' + - title: LiteralEndpoint + type: string + format: uri-template + - title: EndpointConfiguration + type: object + unevaluatedProperties: false + properties: + uri: + title: EndpointUri + description: The endpoint's URI. + oneOf: + - title: LiteralEndpointURI + description: The literal endpoint's URI. + type: string + format: uri-template + - $ref: '#/$defs/runtimeExpression' + title: ExpressionEndpointURI + description: An expression based endpoint's URI. + authentication: + $ref: '#/$defs/referenceableAuthenticationPolicy' + title: EndpointAuthentication + description: The authentication policy to use. + required: + - uri + eventProperties: + type: object + title: EventProperties + description: Describes the properties of an event. + properties: + id: + type: string + title: EventId + description: The event's unique identifier. + source: + title: EventSource + description: Identifies the context in which an event happened. + oneOf: + - title: LiteralSource + type: string + format: uri-template + - $ref: '#/$defs/runtimeExpression' + type: + type: string + title: EventType + description: >- + This attribute contains a value describing the type of event related + to the originating occurrence. + time: + title: EventTime + description: When the event occured. + oneOf: + - title: LiteralTime + type: string + format: date-time + - $ref: '#/$defs/runtimeExpression' + subject: + type: string + title: EventSubject + description: The subject of the event. + datacontenttype: + type: string + title: EventDataContentType + description: >- + Content type of data value. This attribute enables data to carry any + type of content, whereby format and encoding might differ from that of + the chosen event format. + dataschema: + title: EventDataschema + description: The schema describing the event format. + oneOf: + - title: LiteralDataSchema + description: The literal event data schema. + type: string + format: uri-template + - $ref: '#/$defs/runtimeExpression' + title: ExpressionDataSchema + description: An expression based event data schema. + additionalProperties: true + eventConsumptionStrategy: + type: object + title: EventConsumptionStrategy + description: Describe the event consumption strategy to adopt. + unevaluatedProperties: false + oneOf: + - title: AllEventConsumptionStrategy + properties: + all: + type: array + title: AllEventConsumptionStrategyConfiguration + description: A list containing all the events that must be consumed. + items: + $ref: '#/$defs/eventFilter' + required: + - all + - title: AnyEventConsumptionStrategy + properties: + any: + type: array + title: AnyEventConsumptionStrategyConfiguration + description: A list containing any of the events to consume. + items: + $ref: '#/$defs/eventFilter' + required: + - any + - title: OneEventConsumptionStrategy + properties: + one: + $ref: '#/$defs/eventFilter' + title: OneEventConsumptionStrategyConfiguration + description: The single event to consume. + required: + - one + eventFilter: + type: object + title: EventFilter + description: >- + An event filter is a mechanism used to selectively process or handle + events based on predefined criteria, such as event type, source, or + specific attributes. + unevaluatedProperties: false + properties: + with: + $ref: '#/$defs/eventProperties' + minProperties: 1 + title: WithEvent + description: >- + An event filter is a mechanism used to selectively process or handle + events based on predefined criteria, such as event type, source, or + specific attributes. + correlate: + type: object + title: EventFilterCorrelate + description: >- + A correlation is a link between events and data, established by + mapping event attributes to specific data attributes, allowing for + coordinated processing or handling based on event characteristics. + additionalProperties: + type: object + properties: + from: + type: string + title: CorrelateFrom + description: >- + A runtime expression used to extract the correlation value from + the filtered event. + expect: + type: string + title: CorrelateExpect + description: >- + A constant or a runtime expression, if any, used to determine + whether or not the extracted correlation value matches + expectations. If not set, the first extracted value will be used + as the correlation's expectation. + required: + - from + required: + - with + extension: + type: object + title: Extension + description: The definition of an extension. + unevaluatedProperties: false + properties: + extend: + type: string + enum: + - call + - composite + - emit + - for + - listen + - raise + - run + - set + - switch + - try + - wait + - all + title: ExtensionTarget + description: The type of task to extend. + when: + type: string + title: ExtensionCondition + description: >- + A runtime expression, if any, used to determine whether or not the + extension should apply in the specified context. + before: + $ref: '#/$defs/taskList' + title: ExtensionDoBefore + description: The task(s) to execute before the extended task, if any. + after: + $ref: '#/$defs/taskList' + title: ExtensionDoAfter + description: The task(s) to execute after the extended task, if any. + required: + - extend + externalResource: + type: object + title: ExternalResource + description: Represents an external resource. + unevaluatedProperties: false + properties: + name: + type: string + title: ExternalResourceName + description: The name of the external resource, if any. + endpoint: + $ref: '#/$defs/endpoint' + title: ExternalResourceEndpoint + description: The endpoint of the external resource. + required: + - endpoint + input: + type: object + title: Input + description: Configures the input of a workflow or task. + unevaluatedProperties: false + properties: + schema: + $ref: '#/$defs/schema' + title: InputSchema + description: >- + The schema used to describe and validate the input of the workflow or + task. + from: + title: InputFrom + description: >- + A runtime expression, if any, used to mutate and/or filter the input + of the workflow or task. + oneOf: + - type: string + - type: object + output: + type: object + title: Output + description: Configures the output of a workflow or task. + unevaluatedProperties: false + properties: + schema: + $ref: '#/$defs/schema' + title: OutputSchema + description: >- + The schema used to describe and validate the output of the workflow or + task. + as: + title: OutputAs + description: >- + A runtime expression, if any, used to mutate and/or filter the output + of the workflow or task. + oneOf: + - type: string + - type: object + export: + type: object + title: Export + description: Set the content of the context. . + unevaluatedProperties: false + properties: + schema: + $ref: '#/$defs/schema' + title: ExportSchema + description: The schema used to describe and validate the workflow context. + as: + title: ExportAs + description: >- + A runtime expression, if any, used to export the output data to the + context. + oneOf: + - type: string + - type: object + retryPolicy: + type: object + title: RetryPolicy + description: Defines a retry policy. + unevaluatedProperties: false + properties: + when: + type: string + title: RetryWhen + description: >- + A runtime expression, if any, used to determine whether or not to + retry running the task, in a given context. + exceptWhen: + type: string + title: RetryExcepWhen + description: >- + A runtime expression used to determine whether or not to retry running + the task, in a given context. + delay: + $ref: '#/$defs/duration' + title: RetryDelay + description: The duration to wait between retry attempts. + backoff: + type: object + title: RetryBackoff + description: The retry duration backoff. + unevaluatedProperties: false + oneOf: + - title: ConstantBackoff + properties: + constant: + type: object + description: The definition of the constant backoff to use, if any. + required: + - constant + - title: ExponentialBackOff + properties: + exponential: + type: object + description: The definition of the exponential backoff to use, if any. + required: + - exponential + - title: LinearBackoff + properties: + linear: + type: object + description: The definition of the linear backoff to use, if any. + required: + - linear + limit: + type: object + title: RetryLimit + unevaluatedProperties: false + properties: + attempt: + type: object + title: RetryLimitAttempt + unevaluatedProperties: false + properties: + count: + type: integer + title: RetryLimitAttemptCount + description: The maximum amount of retry attempts, if any. + duration: + $ref: '#/$defs/duration' + title: RetryLimitAttemptDuration + description: The maximum duration for each retry attempt. + duration: + $ref: '#/$defs/duration' + title: RetryLimitDuration + description: The duration limit, if any, for all retry attempts. + description: The retry limit, if any. + jitter: + type: object + title: RetryPolicyJitter + description: >- + The parameters, if any, that control the randomness or variability of + the delay between retry attempts. + unevaluatedProperties: false + properties: + from: + $ref: '#/$defs/duration' + title: RetryPolicyJitterFrom + description: The minimum duration of the jitter range. + to: + $ref: '#/$defs/duration' + title: RetryPolicyJitterTo + description: The maximum duration of the jitter range. + required: + - from + - to + schema: + type: object + title: Schema + description: Represents the definition of a schema. + unevaluatedProperties: false + properties: + format: + type: string + default: json + title: SchemaFormat + description: >- + The schema's format. Defaults to 'json'. The (optional) version of the + format can be set using `{format}:{version}`. + oneOf: + - title: SchemaInline + properties: + document: + description: The schema's inline definition. + required: + - document + - title: SchemaExternal + properties: + resource: + $ref: '#/$defs/externalResource' + title: SchemaExternalResource + description: The schema's external resource. + required: + - resource + timeout: + type: object + title: Timeout + description: The definition of a timeout. + unevaluatedProperties: false + properties: + after: + $ref: '#/$defs/duration' + title: TimeoutAfter + description: The duration after which to timeout. + required: + - after + runtimeExpression: + type: string + title: RuntimeExpression + description: A runtime expression. + pattern: ^\s*\$\{.+\}\s*$ diff --git a/src/lib/generated/validation/validation-pointers.ts b/src/lib/generated/validation/validation-pointers.ts index 867ad5e6..ebbc0e90 100644 --- a/src/lib/generated/validation/validation-pointers.ts +++ b/src/lib/generated/validation/validation-pointers.ts @@ -24,134 +24,242 @@ * A map of type names and their corresponding schema */ export const validationPointers = { - Workflow: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#', - AuthenticationPolicy: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/authenticationPolicy', - AuthenticationPolicyBasic: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/authenticationPolicy/oneOf/0/properties/basic', - AuthenticationPolicyBearer: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/authenticationPolicy/oneOf/1/properties/bearer', - AuthenticationPolicyOauth2: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/authenticationPolicy/oneOf/2/properties/oauth2', - AuthenticationPolicyOauth2Client: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/authenticationPolicy/oneOf/2/properties/oauth2/properties/client', - CallAsyncAPI: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/0', - CallAsyncAPIWith: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/0/properties/with', - CallAsyncAPIWithAuthentication: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/0/properties/with/properties/authentication', - CallFunction: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/4', - CallFunctionWith: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/4/properties/with', - CallGRPC: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1', - CallGRPCWith: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1/properties/with', - CallGRPCWithArguments: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1/properties/with/properties/arguments', - CallGRPCWithService: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1/properties/with/properties/service', - CallGRPCWithServiceAuthentication: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/1/properties/with/properties/service/properties/authentication', - CallHTTP: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/2', - CallHTTPWith: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/2/properties/with', - CallHTTPWithEndpoint: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/2/properties/with/properties/endpoint', - CallOpenAPI: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/3', - CallOpenAPIWith: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/3/properties/with', - CallOpenAPIWithAuthentication: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/3/properties/with/properties/authentication', - CallOpenAPIWithParameters: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask/oneOf/3/properties/with/properties/parameters', - CallTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/callTask', - Document: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/document', - DocumentTags: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/document/properties/tags', - DoTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/doTask', - Duration: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/duration', - EmitTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/emitTask', - EmitTaskEmit: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/emitTask/properties/emit', - EmitTaskEmitEvent: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/emitTask/properties/emit/properties/event', - Endpoint: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/endpoint', - EndpointAuthentication: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/endpoint/properties/authentication', - Error: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/error', + Workflow: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#', + AllEventConsumptionStrategy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventConsumptionStrategy/oneOf/0', + AllEventConsumptionStrategyConfiguration: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventConsumptionStrategy/oneOf/0/properties/all', + AnyEventConsumptionStrategy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventConsumptionStrategy/oneOf/1', + AnyEventConsumptionStrategyConfiguration: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventConsumptionStrategy/oneOf/1/properties/any', + AsyncApiArguments: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/0/properties/with', + AuthenticationPolicy: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy', + AuthenticationPolicyReference: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/referenceableAuthenticationPolicy/oneOf/0', + BasicAuthenticationPolicy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/0', + BasicAuthenticationPolicyConfiguration: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/0/properties/basic', + BasicAuthenticationProperties: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/0/properties/basic/oneOf/0', + BearerAuthenticationPolicy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/1', + BearerAuthenticationPolicyConfiguration: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/1/properties/bearer', + BearerAuthenticationProperties: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/1/properties/bearer/oneOf/0', + CallAsyncAPI: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/0', + CallFunction: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/4', + CallGRPC: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/1', + CallHTTP: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/2', + CallOpenAPI: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/3', + CallTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask', + CatchErrors: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/tryTask/properties/catch/properties/errors', + ConstantBackoff: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/retryPolicy/properties/backoff/oneOf/0', + Container: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/0/properties/container', + ContainerEnvironment: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/0/properties/container/properties/environment', + ContainerPorts: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/0/properties/container/properties/ports', + ContainerVolumes: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/0/properties/container/properties/volumes', + DigestAuthenticationPolicy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/2', + DigestAuthenticationPolicyConfiguration: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/2/properties/digest', + DigestAuthenticationProperties: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/2/properties/digest/oneOf/0', + Document: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/document', + DoTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/doTask', + Duration: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/duration', + DurationInline: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/duration/oneOf/0', + EmitEventDefinition: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/emitTask/properties/emit/properties/event', + EmitEventWith: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/emitTask/properties/emit/properties/event/properties/with', + EmitTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/emitTask', + EmitTaskConfiguration: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/emitTask/properties/emit', + Endpoint: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/endpoint', + EndpointConfiguration: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/endpoint/oneOf/2', + EndpointUri: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/endpoint/oneOf/2/properties/uri', + Error: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/error', + ErrorInstance: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/error/properties/instance', + ErrorType: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/error/properties/type', EventConsumptionStrategy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/eventConsumptionStrategy', - EventConsumptionStrategyAll: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/eventConsumptionStrategy/oneOf/0/properties/all', - EventConsumptionStrategyAny: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/eventConsumptionStrategy/oneOf/1/properties/any', - EventFilter: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/eventFilter', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventConsumptionStrategy', + EventDataschema: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventProperties/properties/dataschema', + EventFilter: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventFilter', EventFilterCorrelate: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/eventFilter/properties/correlate', - EventFilterWith: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/eventFilter/properties/with', - Export: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/export', - Extension: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/extension', - ExternalResource: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/externalResource', - ExternalResourceAuthentication: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/externalResource/oneOf/1/properties/authentication', - FlowDirective: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/flowDirective', - ForkTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/forkTask', - ForkTaskFork: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/forkTask/properties/fork', - ForTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/forTask', - ForTaskFor: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/forTask/properties/for', - Input: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/input', - ListenTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/listenTask', - ListenTaskListen: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/listenTask/properties/listen', - Oauth2Token: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/oauth2Token', - Output: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/output', - RaiseTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/raiseTask', - RaiseTaskRaise: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/raiseTask/properties/raise', - RetryPolicy: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/retryPolicy', - RetryPolicyBackoff: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/retryPolicy/properties/backoff', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventFilter/properties/correlate', + EventSource: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventProperties/properties/source', + EventTime: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventProperties/properties/time', + ExponentialBackOff: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/retryPolicy/properties/backoff/oneOf/1', + Export: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/export', + ExportAs: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/export/properties/as', + Extension: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/extension', + ExtensionItem: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/use/properties/extensions/items', + ExternalResource: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/externalResource', + ExternalScript: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/1/properties/script/oneOf/1', + FlowDirective: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/flowDirective', + ForkTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/forkTask', + ForkTaskConfiguration: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/forkTask/properties/fork', + ForTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/forTask', + ForTaskConfiguration: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/forTask/properties/for', + FunctionArguments: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/4/properties/with', + GRPCArguments: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/1/properties/with', + HTTPArguments: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/2/properties/with', + InlineScript: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/1/properties/script/oneOf/0', + Input: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/input', + InputFrom: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/input/properties/from', + LinearBackoff: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/retryPolicy/properties/backoff/oneOf/2', + ListenTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/listenTask', + ListenTaskConfiguration: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/listenTask/properties/listen', + OAuth2AutenthicationData: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/oauth2AuthenticationProperties', + OAuth2AutenthicationDataAudiences: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/oauth2AuthenticationProperties/properties/audiences', + OAuth2AutenthicationDataClient: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/oauth2AuthenticationProperties/properties/client', + OAuth2AutenthicationDataScopes: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/oauth2AuthenticationProperties/properties/scopes', + OAuth2AuthenticationPolicy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/3', + OAuth2AuthenticationPolicyConfiguration: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/3/properties/oauth2', + OAuth2AuthenticationPropertiesEndpoints: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/3/properties/oauth2/oneOf/0/allOf/1/properties/endpoints', + OAuth2ConnectAuthenticationProperties: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/3/properties/oauth2/oneOf/0', + OAuth2Issuers: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/oauth2AuthenticationProperties/properties/issuers', + OAuth2TokenDefinition: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/oauth2Token', + OAuth2TokenRequest: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/oauth2AuthenticationProperties/properties/request', + OneEventConsumptionStrategy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventConsumptionStrategy/oneOf/2', + OpenAPIArguments: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/3/properties/with', + OpenIdConnectAuthenticationPolicy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/4', + OpenIdConnectAuthenticationPolicyConfiguration: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/4/properties/oidc', + OpenIdConnectAuthenticationProperties: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/4/properties/oidc/oneOf/0', + Output: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/output', + OutputAs: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/output/properties/as', + RaiseTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/raiseTask', + RaiseTaskConfiguration: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/raiseTask/properties/raise', + RaiseTaskRaiseError: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/raiseTask/properties/raise/properties/error', + ReferenceableAuthenticationPolicy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/referenceableAuthenticationPolicy', + RetryBackoff: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/retryPolicy/properties/backoff', + RetryLimit: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/retryPolicy/properties/limit', + RetryLimitAttempt: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/retryPolicy/properties/limit/properties/attempt', + RetryPolicy: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/retryPolicy', RetryPolicyJitter: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/retryPolicy/properties/jitter', - RetryPolicyLimit: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/retryPolicy/properties/limit', - RetryPolicyLimitAttempt: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/retryPolicy/properties/limit/properties/attempt', - RunTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask', - RunTaskRun: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/properties/run', - RunTaskRunContainer: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/properties/run/oneOf/0/properties/container', - RunTaskRunScript: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/properties/run/oneOf/1/properties/script', - RunTaskRunShell: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/properties/run/oneOf/2/properties/shell', - RunTaskRunShellArguments: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/properties/run/oneOf/2/properties/shell/properties/arguments', - RunTaskRunShellEnvironment: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/properties/run/oneOf/2/properties/shell/properties/environment', - RunTaskRunWorkflow: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/properties/run/oneOf/3/properties/workflow', - RunTaskRunWorkflowInput: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/runTask/properties/run/oneOf/3/properties/workflow/properties/input', - Schedule: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/schedule', - Schema: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/schema', - SetTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/setTask', - SetTaskSet: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/setTask/properties/set', - SwitchTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/switchTask', - SwitchTaskSwitch: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/switchTask/properties/switch', - SwitchTaskSwitchCase: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/switchTask/properties/switch/items/additionalProperties', - Task: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/task', - TaskBase: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/taskBase', - TaskList: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/taskList', - Timeout: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/timeout', - TryTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/tryTask', - TryTaskCatch: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/tryTask/properties/catch', - Use: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/use', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/retryPolicy/properties/jitter', + RunContainer: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/0', + RunScript: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/1', + RunShell: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/2', + RunTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask', + RunTaskConfiguration: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run', + RuntimeExpression: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runtimeExpression', + RunWorkflow: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/3', + Schedule: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/schedule', + Schema: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/schema', + SchemaExternal: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/schema/oneOf/1', + SchemaInline: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/schema/oneOf/0', + Script: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/1/properties/script', + SecretBasedAuthenticationPolicy: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/secretBasedAuthenticationPolicy', + SetTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/setTask', + SetTaskConfiguration: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/setTask/properties/set', + Shell: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/2/properties/shell', + ShellArguments: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/2/properties/shell/properties/arguments', + ShellEnvironment: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/2/properties/shell/properties/environment', + SubflowConfiguration: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/3/properties/workflow', + SubflowInput: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/3/properties/workflow/properties/input', + SwitchCase: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/switchTask/properties/switch/items/additionalProperties', + SwitchItem: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/switchTask/properties/switch/items', + SwitchTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/switchTask', + SwitchTaskConfiguration: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/switchTask/properties/switch', + Task: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/task', + TaskBase: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/taskBase', + TaskBaseIf: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/taskBase/properties/if', + TaskBaseTimeout: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/taskBase/properties/timeout', + TaskItem: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/taskList/items', + TaskList: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/taskList', + TaskMetadata: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/taskBase/properties/metadata', + Timeout: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/timeout', + TryTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/tryTask', + TryTaskCatch: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/tryTask/properties/catch', + TryTaskCatchRetry: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/tryTask/properties/catch/properties/retry', + Use: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/use', UseAuthentications: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/use/properties/authentications', - UseErrors: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/use/properties/errors', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/use/properties/authentications', + UseErrors: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/use/properties/errors', UseExtensions: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/use/properties/extensions', - UseFunctions: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/use/properties/functions', - UseRetries: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/properties/use/properties/retries', - WaitTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha2/workflow.json#/$defs/waitTask', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/use/properties/extensions', + UseFunctions: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/use/properties/functions', + UseRetries: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/use/properties/retries', + UseSecrets: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/use/properties/secrets', + UseTimeouts: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/use/properties/timeouts', + WaitTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/waitTask', + WithAsyncAPIPayload: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/0/properties/with/properties/payload', + WithEvent: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventFilter/properties/with', + WithGRPCArguments: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/1/properties/with/properties/arguments', + WithGRPCService: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/1/properties/with/properties/service', + WithHTTPBody: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/2/properties/with/properties/body', + WithHTTPHeaders: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/2/properties/with/properties/headers', + WithHTTPQuery: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/2/properties/with/properties/query', + WithOpenAPIParameters: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/3/properties/with/properties/parameters', + WorkflowMetadata: + 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/document/properties/metadata', + WorkflowTags: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/document/properties/tags', + WorkflowTimeout: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/timeout', }; diff --git a/tests/classes/workflow.spec.ts b/tests/classes/workflow.spec.ts index 5a5fe2e3..d02a61c0 100644 --- a/tests/classes/workflow.spec.ts +++ b/tests/classes/workflow.spec.ts @@ -27,7 +27,7 @@ describe('Workflow class', () => { expect(type(workflow.input).is(true)).toBe(true); expect(type(workflow.use).is(true)).toBe(true); expect(type(workflow.do).is(true)).toBe(true); - expect(type(workflow.timeout).is(true)).toBe(true); + expect(type(workflow.timeout).is(true)).toBe(true); expect(type(workflow.output).is(true)).toBe(true); expect(type(workflow.schedule).is(true)).toBe(true); expect(type(workflow.foobar).is(true)).toBe(true); diff --git a/tools/2_generate-definitions.ts b/tools/2_generate-definitions.ts index a0d8b25a..d237cce9 100644 --- a/tools/2_generate-definitions.ts +++ b/tools/2_generate-definitions.ts @@ -124,6 +124,9 @@ function prepareSchema(schema: any, path: string[] = ['#'], parentTitle: string parentTitle = newSchema.title; } } + if (schema.title === 'OpenIdConnectAuthenticationProperties') { + newSchema['$id'] = 'OpenIdConnectAuthenticationProperties'; // forces json-schema-to-typescript to declare it as such instead of "OAuth2AutenthicationData1" + } return Object.entries(newSchema).reduce((outputSchema, [key, value]: [string, any]) => { outputSchema[key] = prepareSchema(value, [...path, key], parentTitle); return outputSchema; @@ -189,6 +192,9 @@ async function generate(srcFile: string, destFile: string): Promise { if (schema.$id?.includes('serverlessworkflow.io')) { return 'Workflow'; } + if (schema.$id == 'OpenIdConnectAuthenticationProperties') { + return schema.$id; + } // don't return anything to keep the default behavior }, bannerComment: `${fileHeader} From 5dd02fc46a75a661f06c477be4100c5ee3af2e9e Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Wed, 9 Oct 2024 17:57:30 +0200 Subject: [PATCH 19/24] Added workflow param when validating Allows to validate an item against the workflow, for instance a transition, the use of a a function, ... Signed-off-by: Jean-Baptiste Bianchi --- .../all-event-consumption-strategy-configuration.ts | 4 ++-- .../classes/all-event-consumption-strategy.ts | 4 ++-- .../any-event-consumption-strategy-configuration.ts | 4 ++-- .../classes/any-event-consumption-strategy.ts | 4 ++-- src/lib/generated/classes/async-api-arguments.ts | 4 ++-- .../classes/authentication-policy-reference.ts | 4 ++-- src/lib/generated/classes/authentication-policy.ts | 4 ++-- .../basic-authentication-policy-configuration.ts | 4 ++-- .../generated/classes/basic-authentication-policy.ts | 4 ++-- .../classes/basic-authentication-properties.ts | 4 ++-- .../bearer-authentication-policy-configuration.ts | 4 ++-- .../generated/classes/bearer-authentication-policy.ts | 4 ++-- .../classes/bearer-authentication-properties.ts | 4 ++-- src/lib/generated/classes/call-async-api.ts | 4 ++-- src/lib/generated/classes/call-function.ts | 4 ++-- src/lib/generated/classes/call-grpc.ts | 4 ++-- src/lib/generated/classes/call-http.ts | 4 ++-- src/lib/generated/classes/call-open-api.ts | 4 ++-- src/lib/generated/classes/call-task.ts | 4 ++-- src/lib/generated/classes/catch-errors.ts | 4 ++-- src/lib/generated/classes/constant-backoff.ts | 4 ++-- src/lib/generated/classes/container-environment.ts | 4 ++-- src/lib/generated/classes/container-ports.ts | 4 ++-- src/lib/generated/classes/container-volumes.ts | 4 ++-- src/lib/generated/classes/container.ts | 4 ++-- .../digest-authentication-policy-configuration.ts | 4 ++-- .../generated/classes/digest-authentication-policy.ts | 4 ++-- .../classes/digest-authentication-properties.ts | 4 ++-- src/lib/generated/classes/do-task.ts | 4 ++-- src/lib/generated/classes/document.ts | 4 ++-- src/lib/generated/classes/duration-inline.ts | 4 ++-- src/lib/generated/classes/duration.ts | 4 ++-- src/lib/generated/classes/emit-event-definition.ts | 4 ++-- src/lib/generated/classes/emit-event-with.ts | 4 ++-- src/lib/generated/classes/emit-task-configuration.ts | 4 ++-- src/lib/generated/classes/emit-task.ts | 4 ++-- src/lib/generated/classes/endpoint-configuration.ts | 4 ++-- src/lib/generated/classes/endpoint-uri.ts | 4 ++-- src/lib/generated/classes/endpoint.ts | 4 ++-- src/lib/generated/classes/error-instance.ts | 4 ++-- src/lib/generated/classes/error-type.ts | 4 ++-- src/lib/generated/classes/error.ts | 4 ++-- .../generated/classes/event-consumption-strategy.ts | 4 ++-- src/lib/generated/classes/event-dataschema.ts | 4 ++-- src/lib/generated/classes/event-filter-correlate.ts | 4 ++-- src/lib/generated/classes/event-filter.ts | 4 ++-- src/lib/generated/classes/event-source.ts | 4 ++-- src/lib/generated/classes/event-time.ts | 4 ++-- src/lib/generated/classes/exponential-back-off.ts | 4 ++-- src/lib/generated/classes/export-as.ts | 4 ++-- src/lib/generated/classes/export.ts | 4 ++-- src/lib/generated/classes/extension-item.ts | 4 ++-- src/lib/generated/classes/extension.ts | 4 ++-- src/lib/generated/classes/external-resource.ts | 4 ++-- src/lib/generated/classes/external-script.ts | 4 ++-- src/lib/generated/classes/flow-directive.ts | 4 ++-- src/lib/generated/classes/for-task-configuration.ts | 4 ++-- src/lib/generated/classes/for-task.ts | 4 ++-- src/lib/generated/classes/fork-task-configuration.ts | 4 ++-- src/lib/generated/classes/fork-task.ts | 4 ++-- src/lib/generated/classes/function-arguments.ts | 4 ++-- src/lib/generated/classes/grpc-arguments.ts | 4 ++-- src/lib/generated/classes/http-arguments.ts | 4 ++-- src/lib/generated/classes/inline-script.ts | 4 ++-- src/lib/generated/classes/input-from.ts | 4 ++-- src/lib/generated/classes/input.ts | 4 ++-- src/lib/generated/classes/linear-backoff.ts | 4 ++-- src/lib/generated/classes/listen-task-configuration.ts | 4 ++-- src/lib/generated/classes/listen-task.ts | 4 ++-- .../classes/oauth2-autenthication-data-audiences.ts | 5 +++-- .../classes/oauth2-autenthication-data-client.ts | 4 ++-- .../classes/oauth2-autenthication-data-scopes.ts | 5 +++-- .../generated/classes/oauth2-autenthication-data.ts | 4 ++-- .../oauth2-authentication-policy-configuration.ts | 4 ++-- .../generated/classes/oauth2-authentication-policy.ts | 4 ++-- .../oauth2-authentication-properties-endpoints.ts | 4 ++-- .../oauth2-connect-authentication-properties.ts | 4 ++-- src/lib/generated/classes/oauth2-issuers.ts | 5 +++-- src/lib/generated/classes/oauth2-token-definition.ts | 4 ++-- src/lib/generated/classes/oauth2-token-request.ts | 4 ++-- .../classes/one-event-consumption-strategy.ts | 4 ++-- src/lib/generated/classes/open-api-arguments.ts | 4 ++-- ...n-id-connect-authentication-policy-configuration.ts | 4 ++-- .../classes/open-id-connect-authentication-policy.ts | 4 ++-- .../open-id-connect-authentication-properties.ts | 4 ++-- src/lib/generated/classes/output-as.ts | 4 ++-- src/lib/generated/classes/output.ts | 4 ++-- src/lib/generated/classes/raise-task-configuration.ts | 4 ++-- src/lib/generated/classes/raise-task-raise-error.ts | 4 ++-- src/lib/generated/classes/raise-task.ts | 4 ++-- .../classes/referenceable-authentication-policy.ts | 4 ++-- src/lib/generated/classes/retry-backoff.ts | 4 ++-- src/lib/generated/classes/retry-limit-attempt.ts | 4 ++-- src/lib/generated/classes/retry-limit.ts | 4 ++-- src/lib/generated/classes/retry-policy-jitter.ts | 4 ++-- src/lib/generated/classes/retry-policy.ts | 4 ++-- src/lib/generated/classes/run-container.ts | 4 ++-- src/lib/generated/classes/run-script.ts | 4 ++-- src/lib/generated/classes/run-shell.ts | 4 ++-- src/lib/generated/classes/run-task-configuration.ts | 4 ++-- src/lib/generated/classes/run-task.ts | 4 ++-- src/lib/generated/classes/run-workflow.ts | 4 ++-- src/lib/generated/classes/runtime-expression.ts | 4 ++-- src/lib/generated/classes/schedule.ts | 4 ++-- src/lib/generated/classes/schema-external.ts | 4 ++-- src/lib/generated/classes/schema-inline.ts | 4 ++-- src/lib/generated/classes/schema.ts | 4 ++-- src/lib/generated/classes/script.ts | 4 ++-- .../classes/secret-based-authentication-policy.ts | 4 ++-- src/lib/generated/classes/set-task-configuration.ts | 4 ++-- src/lib/generated/classes/set-task.ts | 4 ++-- src/lib/generated/classes/shell-arguments.ts | 4 ++-- src/lib/generated/classes/shell-environment.ts | 4 ++-- src/lib/generated/classes/shell.ts | 4 ++-- src/lib/generated/classes/subflow-configuration.ts | 4 ++-- src/lib/generated/classes/subflow-input.ts | 4 ++-- src/lib/generated/classes/switch-case.ts | 4 ++-- src/lib/generated/classes/switch-item.ts | 4 ++-- src/lib/generated/classes/switch-task-configuration.ts | 4 ++-- src/lib/generated/classes/switch-task.ts | 4 ++-- src/lib/generated/classes/task-base-if.ts | 4 ++-- src/lib/generated/classes/task-base-timeout.ts | 4 ++-- src/lib/generated/classes/task-base.ts | 4 ++-- src/lib/generated/classes/task-item.ts | 4 ++-- src/lib/generated/classes/task-list.ts | 4 ++-- src/lib/generated/classes/task-metadata.ts | 4 ++-- src/lib/generated/classes/task.ts | 4 ++-- src/lib/generated/classes/timeout.ts | 4 ++-- src/lib/generated/classes/try-task-catch-retry.ts | 4 ++-- src/lib/generated/classes/try-task-catch.ts | 4 ++-- src/lib/generated/classes/try-task.ts | 4 ++-- src/lib/generated/classes/use-authentications.ts | 4 ++-- src/lib/generated/classes/use-errors.ts | 4 ++-- src/lib/generated/classes/use-extensions.ts | 4 ++-- src/lib/generated/classes/use-functions.ts | 4 ++-- src/lib/generated/classes/use-retries.ts | 4 ++-- src/lib/generated/classes/use-secrets.ts | 5 +++-- src/lib/generated/classes/use-timeouts.ts | 4 ++-- src/lib/generated/classes/use.ts | 4 ++-- src/lib/generated/classes/wait-task.ts | 4 ++-- src/lib/generated/classes/with-async-api-payload.ts | 4 ++-- src/lib/generated/classes/with-event.ts | 4 ++-- src/lib/generated/classes/with-grpc-arguments.ts | 4 ++-- src/lib/generated/classes/with-grpc-service.ts | 4 ++-- src/lib/generated/classes/with-http-body.ts | 4 ++-- src/lib/generated/classes/with-http-headers.ts | 4 ++-- src/lib/generated/classes/with-http-query.ts | 4 ++-- src/lib/generated/classes/with-open-api-parameters.ts | 4 ++-- src/lib/generated/classes/workflow-metadata.ts | 4 ++-- src/lib/generated/classes/workflow-tags.ts | 4 ++-- src/lib/generated/classes/workflow-timeout.ts | 4 ++-- src/lib/generated/classes/workflow.ts | 4 ++-- src/lib/lifecycle-hooks.ts | 7 +++++-- src/lib/validation.ts | 8 +++++--- tools/4_generate-classes.ts | 10 +++++----- 155 files changed, 323 insertions(+), 314 deletions(-) diff --git a/src/lib/generated/classes/all-event-consumption-strategy-configuration.ts b/src/lib/generated/classes/all-event-consumption-strategy-configuration.ts index 5444a40c..fe9e2c7d 100644 --- a/src/lib/generated/classes/all-event-consumption-strategy-configuration.ts +++ b/src/lib/generated/classes/all-event-consumption-strategy-configuration.ts @@ -52,9 +52,9 @@ export class AllEventConsumptionStrategyConfiguration extends ArrayHydrator) { const copy = new AllEventConsumptionStrategyConfiguration(this); - validate('AllEventConsumptionStrategyConfiguration', copy); + validate('AllEventConsumptionStrategyConfiguration', copy, workflow); } /** diff --git a/src/lib/generated/classes/all-event-consumption-strategy.ts b/src/lib/generated/classes/all-event-consumption-strategy.ts index 3d8cbb1a..028ca07a 100644 --- a/src/lib/generated/classes/all-event-consumption-strategy.ts +++ b/src/lib/generated/classes/all-event-consumption-strategy.ts @@ -64,9 +64,9 @@ export class AllEventConsumptionStrategy extends ObjectHydrator) { const copy = new AllEventConsumptionStrategy(this as any) as AllEventConsumptionStrategyIntersection; - validate('AllEventConsumptionStrategy', copy); + validate('AllEventConsumptionStrategy', copy, workflow); } /** diff --git a/src/lib/generated/classes/any-event-consumption-strategy-configuration.ts b/src/lib/generated/classes/any-event-consumption-strategy-configuration.ts index 8fa5ad8a..583066ac 100644 --- a/src/lib/generated/classes/any-event-consumption-strategy-configuration.ts +++ b/src/lib/generated/classes/any-event-consumption-strategy-configuration.ts @@ -52,9 +52,9 @@ export class AnyEventConsumptionStrategyConfiguration extends ArrayHydrator) { const copy = new AnyEventConsumptionStrategyConfiguration(this); - validate('AnyEventConsumptionStrategyConfiguration', copy); + validate('AnyEventConsumptionStrategyConfiguration', copy, workflow); } /** diff --git a/src/lib/generated/classes/any-event-consumption-strategy.ts b/src/lib/generated/classes/any-event-consumption-strategy.ts index 5e4191eb..827f4b9d 100644 --- a/src/lib/generated/classes/any-event-consumption-strategy.ts +++ b/src/lib/generated/classes/any-event-consumption-strategy.ts @@ -64,9 +64,9 @@ export class AnyEventConsumptionStrategy extends ObjectHydrator) { const copy = new AnyEventConsumptionStrategy(this as any) as AnyEventConsumptionStrategyIntersection; - validate('AnyEventConsumptionStrategy', copy); + validate('AnyEventConsumptionStrategy', copy, workflow); } /** diff --git a/src/lib/generated/classes/async-api-arguments.ts b/src/lib/generated/classes/async-api-arguments.ts index 26139b60..bb6f514e 100644 --- a/src/lib/generated/classes/async-api-arguments.ts +++ b/src/lib/generated/classes/async-api-arguments.ts @@ -68,9 +68,9 @@ export class AsyncApiArguments extends ObjectHydrator) { const copy = new AsyncApiArguments(this as any) as AsyncApiArgumentsIntersection; - validate('AsyncApiArguments', copy); + validate('AsyncApiArguments', copy, workflow); } /** diff --git a/src/lib/generated/classes/authentication-policy-reference.ts b/src/lib/generated/classes/authentication-policy-reference.ts index 08d00456..45467770 100644 --- a/src/lib/generated/classes/authentication-policy-reference.ts +++ b/src/lib/generated/classes/authentication-policy-reference.ts @@ -59,9 +59,9 @@ export class AuthenticationPolicyReference extends ObjectHydrator) { const copy = new AuthenticationPolicyReference(this as any) as AuthenticationPolicyReferenceIntersection; - validate('AuthenticationPolicyReference', copy); + validate('AuthenticationPolicyReference', copy, workflow); } /** diff --git a/src/lib/generated/classes/authentication-policy.ts b/src/lib/generated/classes/authentication-policy.ts index 741b41e0..939df061 100644 --- a/src/lib/generated/classes/authentication-policy.ts +++ b/src/lib/generated/classes/authentication-policy.ts @@ -92,9 +92,9 @@ export class AuthenticationPolicy extends ObjectHydrator) { const copy = new AuthenticationPolicy(this as any) as AuthenticationPolicyIntersection; - validate('AuthenticationPolicy', copy); + validate('AuthenticationPolicy', copy, workflow); } /** diff --git a/src/lib/generated/classes/basic-authentication-policy-configuration.ts b/src/lib/generated/classes/basic-authentication-policy-configuration.ts index 5716a0cc..991e82de 100644 --- a/src/lib/generated/classes/basic-authentication-policy-configuration.ts +++ b/src/lib/generated/classes/basic-authentication-policy-configuration.ts @@ -61,11 +61,11 @@ export class BasicAuthenticationPolicyConfiguration extends ObjectHydrator) { const copy = new BasicAuthenticationPolicyConfiguration( this as any, ) as BasicAuthenticationPolicyConfigurationIntersection; - validate('BasicAuthenticationPolicyConfiguration', copy); + validate('BasicAuthenticationPolicyConfiguration', copy, workflow); } /** diff --git a/src/lib/generated/classes/basic-authentication-policy.ts b/src/lib/generated/classes/basic-authentication-policy.ts index 42246c94..932b1e0d 100644 --- a/src/lib/generated/classes/basic-authentication-policy.ts +++ b/src/lib/generated/classes/basic-authentication-policy.ts @@ -63,9 +63,9 @@ export class BasicAuthenticationPolicy extends ObjectHydrator) { const copy = new BasicAuthenticationPolicy(this as any) as BasicAuthenticationPolicyIntersection; - validate('BasicAuthenticationPolicy', copy); + validate('BasicAuthenticationPolicy', copy, workflow); } /** diff --git a/src/lib/generated/classes/basic-authentication-properties.ts b/src/lib/generated/classes/basic-authentication-properties.ts index d3f0885c..32a740b0 100644 --- a/src/lib/generated/classes/basic-authentication-properties.ts +++ b/src/lib/generated/classes/basic-authentication-properties.ts @@ -59,9 +59,9 @@ export class BasicAuthenticationProperties extends ObjectHydrator) { const copy = new BasicAuthenticationProperties(this as any) as BasicAuthenticationPropertiesIntersection; - validate('BasicAuthenticationProperties', copy); + validate('BasicAuthenticationProperties', copy, workflow); } /** diff --git a/src/lib/generated/classes/bearer-authentication-policy-configuration.ts b/src/lib/generated/classes/bearer-authentication-policy-configuration.ts index 52963ea3..a142b1ed 100644 --- a/src/lib/generated/classes/bearer-authentication-policy-configuration.ts +++ b/src/lib/generated/classes/bearer-authentication-policy-configuration.ts @@ -61,11 +61,11 @@ export class BearerAuthenticationPolicyConfiguration extends ObjectHydrator) { const copy = new BearerAuthenticationPolicyConfiguration( this as any, ) as BearerAuthenticationPolicyConfigurationIntersection; - validate('BearerAuthenticationPolicyConfiguration', copy); + validate('BearerAuthenticationPolicyConfiguration', copy, workflow); } /** diff --git a/src/lib/generated/classes/bearer-authentication-policy.ts b/src/lib/generated/classes/bearer-authentication-policy.ts index 0f22dafc..0cf59409 100644 --- a/src/lib/generated/classes/bearer-authentication-policy.ts +++ b/src/lib/generated/classes/bearer-authentication-policy.ts @@ -64,9 +64,9 @@ export class BearerAuthenticationPolicy extends ObjectHydrator) { const copy = new BearerAuthenticationPolicy(this as any) as BearerAuthenticationPolicyIntersection; - validate('BearerAuthenticationPolicy', copy); + validate('BearerAuthenticationPolicy', copy, workflow); } /** diff --git a/src/lib/generated/classes/bearer-authentication-properties.ts b/src/lib/generated/classes/bearer-authentication-properties.ts index 66ce41ff..6283395b 100644 --- a/src/lib/generated/classes/bearer-authentication-properties.ts +++ b/src/lib/generated/classes/bearer-authentication-properties.ts @@ -59,9 +59,9 @@ export class BearerAuthenticationProperties extends ObjectHydrator) { const copy = new BearerAuthenticationProperties(this as any) as BearerAuthenticationPropertiesIntersection; - validate('BearerAuthenticationProperties', copy); + validate('BearerAuthenticationProperties', copy, workflow); } /** diff --git a/src/lib/generated/classes/call-async-api.ts b/src/lib/generated/classes/call-async-api.ts index ae6c5238..d0105d35 100644 --- a/src/lib/generated/classes/call-async-api.ts +++ b/src/lib/generated/classes/call-async-api.ts @@ -74,9 +74,9 @@ export class CallAsyncAPI extends _TaskBase { * Validates the current instance of the CallAsyncAPI. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new CallAsyncAPI(this as any) as CallAsyncAPIIntersection; - validate('CallAsyncAPI', copy); + validate('CallAsyncAPI', copy, workflow); } /** diff --git a/src/lib/generated/classes/call-function.ts b/src/lib/generated/classes/call-function.ts index 52a395cb..802bd49e 100644 --- a/src/lib/generated/classes/call-function.ts +++ b/src/lib/generated/classes/call-function.ts @@ -73,9 +73,9 @@ export class CallFunction extends _TaskBase { * Validates the current instance of the CallFunction. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new CallFunction(this as any) as CallFunctionIntersection; - validate('CallFunction', copy); + validate('CallFunction', copy, workflow); } /** diff --git a/src/lib/generated/classes/call-grpc.ts b/src/lib/generated/classes/call-grpc.ts index 46a10752..8bbaa13f 100644 --- a/src/lib/generated/classes/call-grpc.ts +++ b/src/lib/generated/classes/call-grpc.ts @@ -74,9 +74,9 @@ export class CallGRPC extends _TaskBase { * Validates the current instance of the CallGRPC. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new CallGRPC(this as any) as CallGRPCIntersection; - validate('CallGRPC', copy); + validate('CallGRPC', copy, workflow); } /** diff --git a/src/lib/generated/classes/call-http.ts b/src/lib/generated/classes/call-http.ts index 74eb3c83..1c11b37d 100644 --- a/src/lib/generated/classes/call-http.ts +++ b/src/lib/generated/classes/call-http.ts @@ -74,9 +74,9 @@ export class CallHTTP extends _TaskBase { * Validates the current instance of the CallHTTP. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new CallHTTP(this as any) as CallHTTPIntersection; - validate('CallHTTP', copy); + validate('CallHTTP', copy, workflow); } /** diff --git a/src/lib/generated/classes/call-open-api.ts b/src/lib/generated/classes/call-open-api.ts index 493b9801..2c89f677 100644 --- a/src/lib/generated/classes/call-open-api.ts +++ b/src/lib/generated/classes/call-open-api.ts @@ -74,9 +74,9 @@ export class CallOpenAPI extends _TaskBase { * Validates the current instance of the CallOpenAPI. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new CallOpenAPI(this as any) as CallOpenAPIIntersection; - validate('CallOpenAPI', copy); + validate('CallOpenAPI', copy, workflow); } /** diff --git a/src/lib/generated/classes/call-task.ts b/src/lib/generated/classes/call-task.ts index 2e4ef830..cc1cc3c3 100644 --- a/src/lib/generated/classes/call-task.ts +++ b/src/lib/generated/classes/call-task.ts @@ -86,9 +86,9 @@ export class CallTask extends ObjectHydrator { * Validates the current instance of the CallTask. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new CallTask(this as any) as CallTaskIntersection; - validate('CallTask', copy); + validate('CallTask', copy, workflow); } /** diff --git a/src/lib/generated/classes/catch-errors.ts b/src/lib/generated/classes/catch-errors.ts index e1743753..2d43eaa7 100644 --- a/src/lib/generated/classes/catch-errors.ts +++ b/src/lib/generated/classes/catch-errors.ts @@ -58,9 +58,9 @@ export class CatchErrors extends ObjectHydrator { * Validates the current instance of the CatchErrors. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new CatchErrors(this as any) as CatchErrorsIntersection; - validate('CatchErrors', copy); + validate('CatchErrors', copy, workflow); } /** diff --git a/src/lib/generated/classes/constant-backoff.ts b/src/lib/generated/classes/constant-backoff.ts index 053fbc36..0d0ce022 100644 --- a/src/lib/generated/classes/constant-backoff.ts +++ b/src/lib/generated/classes/constant-backoff.ts @@ -58,9 +58,9 @@ export class ConstantBackoff extends ObjectHydrator) { const copy = new ConstantBackoff(this as any) as ConstantBackoffIntersection; - validate('ConstantBackoff', copy); + validate('ConstantBackoff', copy, workflow); } /** diff --git a/src/lib/generated/classes/container-environment.ts b/src/lib/generated/classes/container-environment.ts index 9b3dcef7..664daa3e 100644 --- a/src/lib/generated/classes/container-environment.ts +++ b/src/lib/generated/classes/container-environment.ts @@ -58,9 +58,9 @@ export class ContainerEnvironment extends ObjectHydrator) { const copy = new ContainerEnvironment(this as any) as ContainerEnvironmentIntersection; - validate('ContainerEnvironment', copy); + validate('ContainerEnvironment', copy, workflow); } /** diff --git a/src/lib/generated/classes/container-ports.ts b/src/lib/generated/classes/container-ports.ts index b1ebfeb0..fd9615b1 100644 --- a/src/lib/generated/classes/container-ports.ts +++ b/src/lib/generated/classes/container-ports.ts @@ -58,9 +58,9 @@ export class ContainerPorts extends ObjectHydrator * Validates the current instance of the ContainerPorts. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new ContainerPorts(this as any) as ContainerPortsIntersection; - validate('ContainerPorts', copy); + validate('ContainerPorts', copy, workflow); } /** diff --git a/src/lib/generated/classes/container-volumes.ts b/src/lib/generated/classes/container-volumes.ts index 7026c16d..14636b53 100644 --- a/src/lib/generated/classes/container-volumes.ts +++ b/src/lib/generated/classes/container-volumes.ts @@ -58,9 +58,9 @@ export class ContainerVolumes extends ObjectHydrator) { const copy = new ContainerVolumes(this as any) as ContainerVolumesIntersection; - validate('ContainerVolumes', copy); + validate('ContainerVolumes', copy, workflow); } /** diff --git a/src/lib/generated/classes/container.ts b/src/lib/generated/classes/container.ts index 22550d4c..000b05da 100644 --- a/src/lib/generated/classes/container.ts +++ b/src/lib/generated/classes/container.ts @@ -67,9 +67,9 @@ export class Container extends ObjectHydrator { * Validates the current instance of the Container. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new Container(this as any) as ContainerIntersection; - validate('Container', copy); + validate('Container', copy, workflow); } /** diff --git a/src/lib/generated/classes/digest-authentication-policy-configuration.ts b/src/lib/generated/classes/digest-authentication-policy-configuration.ts index 3888816e..5b3de79e 100644 --- a/src/lib/generated/classes/digest-authentication-policy-configuration.ts +++ b/src/lib/generated/classes/digest-authentication-policy-configuration.ts @@ -61,11 +61,11 @@ export class DigestAuthenticationPolicyConfiguration extends ObjectHydrator) { const copy = new DigestAuthenticationPolicyConfiguration( this as any, ) as DigestAuthenticationPolicyConfigurationIntersection; - validate('DigestAuthenticationPolicyConfiguration', copy); + validate('DigestAuthenticationPolicyConfiguration', copy, workflow); } /** diff --git a/src/lib/generated/classes/digest-authentication-policy.ts b/src/lib/generated/classes/digest-authentication-policy.ts index 58e1bac4..60ca2ad1 100644 --- a/src/lib/generated/classes/digest-authentication-policy.ts +++ b/src/lib/generated/classes/digest-authentication-policy.ts @@ -64,9 +64,9 @@ export class DigestAuthenticationPolicy extends ObjectHydrator) { const copy = new DigestAuthenticationPolicy(this as any) as DigestAuthenticationPolicyIntersection; - validate('DigestAuthenticationPolicy', copy); + validate('DigestAuthenticationPolicy', copy, workflow); } /** diff --git a/src/lib/generated/classes/digest-authentication-properties.ts b/src/lib/generated/classes/digest-authentication-properties.ts index 62ba1a7d..c0529b42 100644 --- a/src/lib/generated/classes/digest-authentication-properties.ts +++ b/src/lib/generated/classes/digest-authentication-properties.ts @@ -59,9 +59,9 @@ export class DigestAuthenticationProperties extends ObjectHydrator) { const copy = new DigestAuthenticationProperties(this as any) as DigestAuthenticationPropertiesIntersection; - validate('DigestAuthenticationProperties', copy); + validate('DigestAuthenticationProperties', copy, workflow); } /** diff --git a/src/lib/generated/classes/do-task.ts b/src/lib/generated/classes/do-task.ts index 1e2cf0ca..2568b0e7 100644 --- a/src/lib/generated/classes/do-task.ts +++ b/src/lib/generated/classes/do-task.ts @@ -73,9 +73,9 @@ export class DoTask extends _TaskBase { * Validates the current instance of the DoTask. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new DoTask(this as any) as DoTaskIntersection; - validate('DoTask', copy); + validate('DoTask', copy, workflow); } /** diff --git a/src/lib/generated/classes/document.ts b/src/lib/generated/classes/document.ts index a284757f..f7f773c2 100644 --- a/src/lib/generated/classes/document.ts +++ b/src/lib/generated/classes/document.ts @@ -65,9 +65,9 @@ export class Document extends ObjectHydrator { * Validates the current instance of the Document. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new Document(this as any) as DocumentIntersection; - validate('Document', copy); + validate('Document', copy, workflow); } /** diff --git a/src/lib/generated/classes/duration-inline.ts b/src/lib/generated/classes/duration-inline.ts index 5e0c8fc7..14d16e61 100644 --- a/src/lib/generated/classes/duration-inline.ts +++ b/src/lib/generated/classes/duration-inline.ts @@ -58,9 +58,9 @@ export class DurationInline extends ObjectHydrator * Validates the current instance of the DurationInline. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new DurationInline(this as any) as DurationInlineIntersection; - validate('DurationInline', copy); + validate('DurationInline', copy, workflow); } /** diff --git a/src/lib/generated/classes/duration.ts b/src/lib/generated/classes/duration.ts index c3d71cdd..0df55911 100644 --- a/src/lib/generated/classes/duration.ts +++ b/src/lib/generated/classes/duration.ts @@ -58,9 +58,9 @@ export class Duration extends ObjectHydrator { * Validates the current instance of the Duration. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new Duration(this as any) as DurationIntersection; - validate('Duration', copy); + validate('Duration', copy, workflow); } /** diff --git a/src/lib/generated/classes/emit-event-definition.ts b/src/lib/generated/classes/emit-event-definition.ts index 5f040683..d388f3de 100644 --- a/src/lib/generated/classes/emit-event-definition.ts +++ b/src/lib/generated/classes/emit-event-definition.ts @@ -63,9 +63,9 @@ export class EmitEventDefinition extends ObjectHydrator) { const copy = new EmitEventDefinition(this as any) as EmitEventDefinitionIntersection; - validate('EmitEventDefinition', copy); + validate('EmitEventDefinition', copy, workflow); } /** diff --git a/src/lib/generated/classes/emit-event-with.ts b/src/lib/generated/classes/emit-event-with.ts index c67f3a94..45ccbf66 100644 --- a/src/lib/generated/classes/emit-event-with.ts +++ b/src/lib/generated/classes/emit-event-with.ts @@ -58,9 +58,9 @@ export class EmitEventWith extends ObjectHydrator { * Validates the current instance of the EmitEventWith. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new EmitEventWith(this as any) as EmitEventWithIntersection; - validate('EmitEventWith', copy); + validate('EmitEventWith', copy, workflow); } /** diff --git a/src/lib/generated/classes/emit-task-configuration.ts b/src/lib/generated/classes/emit-task-configuration.ts index 6d84d1d9..c0815885 100644 --- a/src/lib/generated/classes/emit-task-configuration.ts +++ b/src/lib/generated/classes/emit-task-configuration.ts @@ -63,9 +63,9 @@ export class EmitTaskConfiguration extends ObjectHydrator) { const copy = new EmitTaskConfiguration(this as any) as EmitTaskConfigurationIntersection; - validate('EmitTaskConfiguration', copy); + validate('EmitTaskConfiguration', copy, workflow); } /** diff --git a/src/lib/generated/classes/emit-task.ts b/src/lib/generated/classes/emit-task.ts index a4e4a748..48903341 100644 --- a/src/lib/generated/classes/emit-task.ts +++ b/src/lib/generated/classes/emit-task.ts @@ -73,9 +73,9 @@ export class EmitTask extends _TaskBase { * Validates the current instance of the EmitTask. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new EmitTask(this as any) as EmitTaskIntersection; - validate('EmitTask', copy); + validate('EmitTask', copy, workflow); } /** diff --git a/src/lib/generated/classes/endpoint-configuration.ts b/src/lib/generated/classes/endpoint-configuration.ts index 6fe13894..401f12c6 100644 --- a/src/lib/generated/classes/endpoint-configuration.ts +++ b/src/lib/generated/classes/endpoint-configuration.ts @@ -64,9 +64,9 @@ export class EndpointConfiguration extends ObjectHydrator) { const copy = new EndpointConfiguration(this as any) as EndpointConfigurationIntersection; - validate('EndpointConfiguration', copy); + validate('EndpointConfiguration', copy, workflow); } /** diff --git a/src/lib/generated/classes/endpoint-uri.ts b/src/lib/generated/classes/endpoint-uri.ts index be50280c..ab7a36f0 100644 --- a/src/lib/generated/classes/endpoint-uri.ts +++ b/src/lib/generated/classes/endpoint-uri.ts @@ -58,9 +58,9 @@ export class EndpointUri extends ObjectHydrator { * Validates the current instance of the EndpointUri. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new EndpointUri(this as any) as EndpointUriIntersection; - validate('EndpointUri', copy); + validate('EndpointUri', copy, workflow); } /** diff --git a/src/lib/generated/classes/endpoint.ts b/src/lib/generated/classes/endpoint.ts index 353aaf99..84af5d58 100644 --- a/src/lib/generated/classes/endpoint.ts +++ b/src/lib/generated/classes/endpoint.ts @@ -67,9 +67,9 @@ export class Endpoint extends ObjectHydrator { * Validates the current instance of the Endpoint. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new Endpoint(this as any) as EndpointIntersection; - validate('Endpoint', copy); + validate('Endpoint', copy, workflow); } /** diff --git a/src/lib/generated/classes/error-instance.ts b/src/lib/generated/classes/error-instance.ts index 524011fd..0a704322 100644 --- a/src/lib/generated/classes/error-instance.ts +++ b/src/lib/generated/classes/error-instance.ts @@ -58,9 +58,9 @@ export class ErrorInstance extends ObjectHydrator { * Validates the current instance of the ErrorInstance. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new ErrorInstance(this as any) as ErrorInstanceIntersection; - validate('ErrorInstance', copy); + validate('ErrorInstance', copy, workflow); } /** diff --git a/src/lib/generated/classes/error-type.ts b/src/lib/generated/classes/error-type.ts index 04c64645..ba3e72d7 100644 --- a/src/lib/generated/classes/error-type.ts +++ b/src/lib/generated/classes/error-type.ts @@ -58,9 +58,9 @@ export class ErrorType extends ObjectHydrator { * Validates the current instance of the ErrorType. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new ErrorType(this as any) as ErrorTypeIntersection; - validate('ErrorType', copy); + validate('ErrorType', copy, workflow); } /** diff --git a/src/lib/generated/classes/error.ts b/src/lib/generated/classes/error.ts index a191f57c..19e1fbb4 100644 --- a/src/lib/generated/classes/error.ts +++ b/src/lib/generated/classes/error.ts @@ -58,9 +58,9 @@ export class Error extends ObjectHydrator { * Validates the current instance of the Error. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new Error(this as any) as ErrorIntersection; - validate('Error', copy); + validate('Error', copy, workflow); } /** diff --git a/src/lib/generated/classes/event-consumption-strategy.ts b/src/lib/generated/classes/event-consumption-strategy.ts index 25fee1db..798e3280 100644 --- a/src/lib/generated/classes/event-consumption-strategy.ts +++ b/src/lib/generated/classes/event-consumption-strategy.ts @@ -78,9 +78,9 @@ export class EventConsumptionStrategy extends ObjectHydrator) { const copy = new EventConsumptionStrategy(this as any) as EventConsumptionStrategyIntersection; - validate('EventConsumptionStrategy', copy); + validate('EventConsumptionStrategy', copy, workflow); } /** diff --git a/src/lib/generated/classes/event-dataschema.ts b/src/lib/generated/classes/event-dataschema.ts index efb6e408..20d0f62e 100644 --- a/src/lib/generated/classes/event-dataschema.ts +++ b/src/lib/generated/classes/event-dataschema.ts @@ -58,9 +58,9 @@ export class EventDataschema extends ObjectHydrator) { const copy = new EventDataschema(this as any) as EventDataschemaIntersection; - validate('EventDataschema', copy); + validate('EventDataschema', copy, workflow); } /** diff --git a/src/lib/generated/classes/event-filter-correlate.ts b/src/lib/generated/classes/event-filter-correlate.ts index f4ccc331..b03b20ed 100644 --- a/src/lib/generated/classes/event-filter-correlate.ts +++ b/src/lib/generated/classes/event-filter-correlate.ts @@ -58,9 +58,9 @@ export class EventFilterCorrelate extends ObjectHydrator) { const copy = new EventFilterCorrelate(this as any) as EventFilterCorrelateIntersection; - validate('EventFilterCorrelate', copy); + validate('EventFilterCorrelate', copy, workflow); } /** diff --git a/src/lib/generated/classes/event-filter.ts b/src/lib/generated/classes/event-filter.ts index fda3c5aa..1427b768 100644 --- a/src/lib/generated/classes/event-filter.ts +++ b/src/lib/generated/classes/event-filter.ts @@ -65,9 +65,9 @@ export class EventFilter extends ObjectHydrator { * Validates the current instance of the EventFilter. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new EventFilter(this as any) as EventFilterIntersection; - validate('EventFilter', copy); + validate('EventFilter', copy, workflow); } /** diff --git a/src/lib/generated/classes/event-source.ts b/src/lib/generated/classes/event-source.ts index c5e48bec..595ee33f 100644 --- a/src/lib/generated/classes/event-source.ts +++ b/src/lib/generated/classes/event-source.ts @@ -58,9 +58,9 @@ export class EventSource extends ObjectHydrator { * Validates the current instance of the EventSource. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new EventSource(this as any) as EventSourceIntersection; - validate('EventSource', copy); + validate('EventSource', copy, workflow); } /** diff --git a/src/lib/generated/classes/event-time.ts b/src/lib/generated/classes/event-time.ts index 4626b4e2..114daa36 100644 --- a/src/lib/generated/classes/event-time.ts +++ b/src/lib/generated/classes/event-time.ts @@ -58,9 +58,9 @@ export class EventTime extends ObjectHydrator { * Validates the current instance of the EventTime. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new EventTime(this as any) as EventTimeIntersection; - validate('EventTime', copy); + validate('EventTime', copy, workflow); } /** diff --git a/src/lib/generated/classes/exponential-back-off.ts b/src/lib/generated/classes/exponential-back-off.ts index 28f0e9df..a83adade 100644 --- a/src/lib/generated/classes/exponential-back-off.ts +++ b/src/lib/generated/classes/exponential-back-off.ts @@ -58,9 +58,9 @@ export class ExponentialBackOff extends ObjectHydrator) { const copy = new ExponentialBackOff(this as any) as ExponentialBackOffIntersection; - validate('ExponentialBackOff', copy); + validate('ExponentialBackOff', copy, workflow); } /** diff --git a/src/lib/generated/classes/export-as.ts b/src/lib/generated/classes/export-as.ts index 87b45498..64d67d36 100644 --- a/src/lib/generated/classes/export-as.ts +++ b/src/lib/generated/classes/export-as.ts @@ -58,9 +58,9 @@ export class ExportAs extends ObjectHydrator { * Validates the current instance of the ExportAs. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new ExportAs(this as any) as ExportAsIntersection; - validate('ExportAs', copy); + validate('ExportAs', copy, workflow); } /** diff --git a/src/lib/generated/classes/export.ts b/src/lib/generated/classes/export.ts index 47370b14..fc645f61 100644 --- a/src/lib/generated/classes/export.ts +++ b/src/lib/generated/classes/export.ts @@ -63,9 +63,9 @@ export class Export extends ObjectHydrator { * Validates the current instance of the Export. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new Export(this as any) as ExportIntersection; - validate('Export', copy); + validate('Export', copy, workflow); } /** diff --git a/src/lib/generated/classes/extension-item.ts b/src/lib/generated/classes/extension-item.ts index bbe0acee..8fb07d68 100644 --- a/src/lib/generated/classes/extension-item.ts +++ b/src/lib/generated/classes/extension-item.ts @@ -68,9 +68,9 @@ export class ExtensionItem extends ObjectHydrator { * Validates the current instance of the ExtensionItem. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new ExtensionItem(this as any) as ExtensionItemIntersection; - validate('ExtensionItem', copy); + validate('ExtensionItem', copy, workflow); } /** diff --git a/src/lib/generated/classes/extension.ts b/src/lib/generated/classes/extension.ts index a1919c67..c742e43f 100644 --- a/src/lib/generated/classes/extension.ts +++ b/src/lib/generated/classes/extension.ts @@ -64,9 +64,9 @@ export class Extension extends ObjectHydrator { * Validates the current instance of the Extension. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new Extension(this as any) as ExtensionIntersection; - validate('Extension', copy); + validate('Extension', copy, workflow); } /** diff --git a/src/lib/generated/classes/external-resource.ts b/src/lib/generated/classes/external-resource.ts index ae728865..0cc08f38 100644 --- a/src/lib/generated/classes/external-resource.ts +++ b/src/lib/generated/classes/external-resource.ts @@ -63,9 +63,9 @@ export class ExternalResource extends ObjectHydrator) { const copy = new ExternalResource(this as any) as ExternalResourceIntersection; - validate('ExternalResource', copy); + validate('ExternalResource', copy, workflow); } /** diff --git a/src/lib/generated/classes/external-script.ts b/src/lib/generated/classes/external-script.ts index 5bb40705..71bfdcba 100644 --- a/src/lib/generated/classes/external-script.ts +++ b/src/lib/generated/classes/external-script.ts @@ -63,9 +63,9 @@ export class ExternalScript extends ObjectHydrator * Validates the current instance of the ExternalScript. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new ExternalScript(this as any) as ExternalScriptIntersection; - validate('ExternalScript', copy); + validate('ExternalScript', copy, workflow); } /** diff --git a/src/lib/generated/classes/flow-directive.ts b/src/lib/generated/classes/flow-directive.ts index 273086f0..6366f156 100644 --- a/src/lib/generated/classes/flow-directive.ts +++ b/src/lib/generated/classes/flow-directive.ts @@ -58,9 +58,9 @@ export class FlowDirective extends ObjectHydrator { * Validates the current instance of the FlowDirective. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new FlowDirective(this as any) as FlowDirectiveIntersection; - validate('FlowDirective', copy); + validate('FlowDirective', copy, workflow); } /** diff --git a/src/lib/generated/classes/for-task-configuration.ts b/src/lib/generated/classes/for-task-configuration.ts index 4f4594ad..3588b7f5 100644 --- a/src/lib/generated/classes/for-task-configuration.ts +++ b/src/lib/generated/classes/for-task-configuration.ts @@ -58,9 +58,9 @@ export class ForTaskConfiguration extends ObjectHydrator) { const copy = new ForTaskConfiguration(this as any) as ForTaskConfigurationIntersection; - validate('ForTaskConfiguration', copy); + validate('ForTaskConfiguration', copy, workflow); } /** diff --git a/src/lib/generated/classes/for-task.ts b/src/lib/generated/classes/for-task.ts index 00543076..d86ac773 100644 --- a/src/lib/generated/classes/for-task.ts +++ b/src/lib/generated/classes/for-task.ts @@ -75,9 +75,9 @@ export class ForTask extends _TaskBase { * Validates the current instance of the ForTask. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new ForTask(this as any) as ForTaskIntersection; - validate('ForTask', copy); + validate('ForTask', copy, workflow); } /** diff --git a/src/lib/generated/classes/fork-task-configuration.ts b/src/lib/generated/classes/fork-task-configuration.ts index 4cd1cbb5..3f78d588 100644 --- a/src/lib/generated/classes/fork-task-configuration.ts +++ b/src/lib/generated/classes/fork-task-configuration.ts @@ -63,9 +63,9 @@ export class ForkTaskConfiguration extends ObjectHydrator) { const copy = new ForkTaskConfiguration(this as any) as ForkTaskConfigurationIntersection; - validate('ForkTaskConfiguration', copy); + validate('ForkTaskConfiguration', copy, workflow); } /** diff --git a/src/lib/generated/classes/fork-task.ts b/src/lib/generated/classes/fork-task.ts index a2606d6a..652ba64c 100644 --- a/src/lib/generated/classes/fork-task.ts +++ b/src/lib/generated/classes/fork-task.ts @@ -73,9 +73,9 @@ export class ForkTask extends _TaskBase { * Validates the current instance of the ForkTask. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new ForkTask(this as any) as ForkTaskIntersection; - validate('ForkTask', copy); + validate('ForkTask', copy, workflow); } /** diff --git a/src/lib/generated/classes/function-arguments.ts b/src/lib/generated/classes/function-arguments.ts index 43ec5750..7e676229 100644 --- a/src/lib/generated/classes/function-arguments.ts +++ b/src/lib/generated/classes/function-arguments.ts @@ -58,9 +58,9 @@ export class FunctionArguments extends ObjectHydrator) { const copy = new FunctionArguments(this as any) as FunctionArgumentsIntersection; - validate('FunctionArguments', copy); + validate('FunctionArguments', copy, workflow); } /** diff --git a/src/lib/generated/classes/grpc-arguments.ts b/src/lib/generated/classes/grpc-arguments.ts index d5f26bdb..86de5bf2 100644 --- a/src/lib/generated/classes/grpc-arguments.ts +++ b/src/lib/generated/classes/grpc-arguments.ts @@ -67,9 +67,9 @@ export class GRPCArguments extends ObjectHydrator { * Validates the current instance of the GRPCArguments. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new GRPCArguments(this as any) as GRPCArgumentsIntersection; - validate('GRPCArguments', copy); + validate('GRPCArguments', copy, workflow); } /** diff --git a/src/lib/generated/classes/http-arguments.ts b/src/lib/generated/classes/http-arguments.ts index ad58154e..1b873480 100644 --- a/src/lib/generated/classes/http-arguments.ts +++ b/src/lib/generated/classes/http-arguments.ts @@ -69,9 +69,9 @@ export class HTTPArguments extends ObjectHydrator { * Validates the current instance of the HTTPArguments. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new HTTPArguments(this as any) as HTTPArgumentsIntersection; - validate('HTTPArguments', copy); + validate('HTTPArguments', copy, workflow); } /** diff --git a/src/lib/generated/classes/inline-script.ts b/src/lib/generated/classes/inline-script.ts index 82a660a0..ea52b319 100644 --- a/src/lib/generated/classes/inline-script.ts +++ b/src/lib/generated/classes/inline-script.ts @@ -58,9 +58,9 @@ export class InlineScript extends ObjectHydrator { * Validates the current instance of the InlineScript. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new InlineScript(this as any) as InlineScriptIntersection; - validate('InlineScript', copy); + validate('InlineScript', copy, workflow); } /** diff --git a/src/lib/generated/classes/input-from.ts b/src/lib/generated/classes/input-from.ts index d4bed3ac..6683b968 100644 --- a/src/lib/generated/classes/input-from.ts +++ b/src/lib/generated/classes/input-from.ts @@ -58,9 +58,9 @@ export class InputFrom extends ObjectHydrator { * Validates the current instance of the InputFrom. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new InputFrom(this as any) as InputFromIntersection; - validate('InputFrom', copy); + validate('InputFrom', copy, workflow); } /** diff --git a/src/lib/generated/classes/input.ts b/src/lib/generated/classes/input.ts index 33da49e6..a8f8a22d 100644 --- a/src/lib/generated/classes/input.ts +++ b/src/lib/generated/classes/input.ts @@ -63,9 +63,9 @@ export class Input extends ObjectHydrator { * Validates the current instance of the Input. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new Input(this as any) as InputIntersection; - validate('Input', copy); + validate('Input', copy, workflow); } /** diff --git a/src/lib/generated/classes/linear-backoff.ts b/src/lib/generated/classes/linear-backoff.ts index c93102c8..069627ef 100644 --- a/src/lib/generated/classes/linear-backoff.ts +++ b/src/lib/generated/classes/linear-backoff.ts @@ -58,9 +58,9 @@ export class LinearBackoff extends ObjectHydrator { * Validates the current instance of the LinearBackoff. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new LinearBackoff(this as any) as LinearBackoffIntersection; - validate('LinearBackoff', copy); + validate('LinearBackoff', copy, workflow); } /** diff --git a/src/lib/generated/classes/listen-task-configuration.ts b/src/lib/generated/classes/listen-task-configuration.ts index 1dd689f4..1e47efe8 100644 --- a/src/lib/generated/classes/listen-task-configuration.ts +++ b/src/lib/generated/classes/listen-task-configuration.ts @@ -63,9 +63,9 @@ export class ListenTaskConfiguration extends ObjectHydrator) { const copy = new ListenTaskConfiguration(this as any) as ListenTaskConfigurationIntersection; - validate('ListenTaskConfiguration', copy); + validate('ListenTaskConfiguration', copy, workflow); } /** diff --git a/src/lib/generated/classes/listen-task.ts b/src/lib/generated/classes/listen-task.ts index daa5e04d..4dd62e05 100644 --- a/src/lib/generated/classes/listen-task.ts +++ b/src/lib/generated/classes/listen-task.ts @@ -73,9 +73,9 @@ export class ListenTask extends _TaskBase { * Validates the current instance of the ListenTask. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new ListenTask(this as any) as ListenTaskIntersection; - validate('ListenTask', copy); + validate('ListenTask', copy, workflow); } /** diff --git a/src/lib/generated/classes/oauth2-autenthication-data-audiences.ts b/src/lib/generated/classes/oauth2-autenthication-data-audiences.ts index 5753d426..68aa0e74 100644 --- a/src/lib/generated/classes/oauth2-autenthication-data-audiences.ts +++ b/src/lib/generated/classes/oauth2-autenthication-data-audiences.ts @@ -20,6 +20,7 @@ * *****************************************************************************************/ +import { Specification } from '../definitions'; import { ArrayHydrator } from '../../hydrator'; import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; @@ -50,9 +51,9 @@ export class OAuth2AutenthicationDataAudiences extends ArrayHydrator { * Validates the current instance of the OAuth2AutenthicationDataAudiences. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new OAuth2AutenthicationDataAudiences(this); - validate('OAuth2AutenthicationDataAudiences', copy); + validate('OAuth2AutenthicationDataAudiences', copy, workflow); } /** diff --git a/src/lib/generated/classes/oauth2-autenthication-data-client.ts b/src/lib/generated/classes/oauth2-autenthication-data-client.ts index 41f18128..ae482383 100644 --- a/src/lib/generated/classes/oauth2-autenthication-data-client.ts +++ b/src/lib/generated/classes/oauth2-autenthication-data-client.ts @@ -59,9 +59,9 @@ export class OAuth2AutenthicationDataClient extends ObjectHydrator) { const copy = new OAuth2AutenthicationDataClient(this as any) as OAuth2AutenthicationDataClientIntersection; - validate('OAuth2AutenthicationDataClient', copy); + validate('OAuth2AutenthicationDataClient', copy, workflow); } /** diff --git a/src/lib/generated/classes/oauth2-autenthication-data-scopes.ts b/src/lib/generated/classes/oauth2-autenthication-data-scopes.ts index 7c2fa98d..6e791331 100644 --- a/src/lib/generated/classes/oauth2-autenthication-data-scopes.ts +++ b/src/lib/generated/classes/oauth2-autenthication-data-scopes.ts @@ -20,6 +20,7 @@ * *****************************************************************************************/ +import { Specification } from '../definitions'; import { ArrayHydrator } from '../../hydrator'; import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; @@ -50,9 +51,9 @@ export class OAuth2AutenthicationDataScopes extends ArrayHydrator { * Validates the current instance of the OAuth2AutenthicationDataScopes. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new OAuth2AutenthicationDataScopes(this); - validate('OAuth2AutenthicationDataScopes', copy); + validate('OAuth2AutenthicationDataScopes', copy, workflow); } /** diff --git a/src/lib/generated/classes/oauth2-autenthication-data.ts b/src/lib/generated/classes/oauth2-autenthication-data.ts index 8d79ae21..b36eb5be 100644 --- a/src/lib/generated/classes/oauth2-autenthication-data.ts +++ b/src/lib/generated/classes/oauth2-autenthication-data.ts @@ -68,9 +68,9 @@ export class OAuth2AutenthicationData extends ObjectHydrator) { const copy = new OAuth2AutenthicationData(this as any) as OAuth2AutenthicationDataIntersection; - validate('OAuth2AutenthicationData', copy); + validate('OAuth2AutenthicationData', copy, workflow); } /** diff --git a/src/lib/generated/classes/oauth2-authentication-policy-configuration.ts b/src/lib/generated/classes/oauth2-authentication-policy-configuration.ts index b59e81ef..bb576e87 100644 --- a/src/lib/generated/classes/oauth2-authentication-policy-configuration.ts +++ b/src/lib/generated/classes/oauth2-authentication-policy-configuration.ts @@ -94,11 +94,11 @@ export class OAuth2AuthenticationPolicyConfiguration extends ObjectHydrator) { const copy = new OAuth2AuthenticationPolicyConfiguration( this as any, ) as OAuth2AuthenticationPolicyConfigurationIntersection; - validate('OAuth2AuthenticationPolicyConfiguration', copy); + validate('OAuth2AuthenticationPolicyConfiguration', copy, workflow); } /** diff --git a/src/lib/generated/classes/oauth2-authentication-policy.ts b/src/lib/generated/classes/oauth2-authentication-policy.ts index a4cbdbce..92912895 100644 --- a/src/lib/generated/classes/oauth2-authentication-policy.ts +++ b/src/lib/generated/classes/oauth2-authentication-policy.ts @@ -64,9 +64,9 @@ export class OAuth2AuthenticationPolicy extends ObjectHydrator) { const copy = new OAuth2AuthenticationPolicy(this as any) as OAuth2AuthenticationPolicyIntersection; - validate('OAuth2AuthenticationPolicy', copy); + validate('OAuth2AuthenticationPolicy', copy, workflow); } /** diff --git a/src/lib/generated/classes/oauth2-authentication-properties-endpoints.ts b/src/lib/generated/classes/oauth2-authentication-properties-endpoints.ts index d19edfd7..d4ebba4e 100644 --- a/src/lib/generated/classes/oauth2-authentication-properties-endpoints.ts +++ b/src/lib/generated/classes/oauth2-authentication-properties-endpoints.ts @@ -61,11 +61,11 @@ export class OAuth2AuthenticationPropertiesEndpoints extends ObjectHydrator) { const copy = new OAuth2AuthenticationPropertiesEndpoints( this as any, ) as OAuth2AuthenticationPropertiesEndpointsIntersection; - validate('OAuth2AuthenticationPropertiesEndpoints', copy); + validate('OAuth2AuthenticationPropertiesEndpoints', copy, workflow); } /** diff --git a/src/lib/generated/classes/oauth2-connect-authentication-properties.ts b/src/lib/generated/classes/oauth2-connect-authentication-properties.ts index ed775211..d7edf078 100644 --- a/src/lib/generated/classes/oauth2-connect-authentication-properties.ts +++ b/src/lib/generated/classes/oauth2-connect-authentication-properties.ts @@ -74,11 +74,11 @@ export class OAuth2ConnectAuthenticationProperties extends _OAuth2Autenthication * Validates the current instance of the OAuth2ConnectAuthenticationProperties. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new OAuth2ConnectAuthenticationProperties( this as any, ) as OAuth2ConnectAuthenticationPropertiesIntersection; - validate('OAuth2ConnectAuthenticationProperties', copy); + validate('OAuth2ConnectAuthenticationProperties', copy, workflow); } /** diff --git a/src/lib/generated/classes/oauth2-issuers.ts b/src/lib/generated/classes/oauth2-issuers.ts index 1fea5bd5..e3d2ce4b 100644 --- a/src/lib/generated/classes/oauth2-issuers.ts +++ b/src/lib/generated/classes/oauth2-issuers.ts @@ -20,6 +20,7 @@ * *****************************************************************************************/ +import { Specification } from '../definitions'; import { ArrayHydrator } from '../../hydrator'; import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; @@ -50,9 +51,9 @@ export class OAuth2Issuers extends ArrayHydrator { * Validates the current instance of the OAuth2Issuers. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new OAuth2Issuers(this); - validate('OAuth2Issuers', copy); + validate('OAuth2Issuers', copy, workflow); } /** diff --git a/src/lib/generated/classes/oauth2-token-definition.ts b/src/lib/generated/classes/oauth2-token-definition.ts index da84b85c..6c9b54de 100644 --- a/src/lib/generated/classes/oauth2-token-definition.ts +++ b/src/lib/generated/classes/oauth2-token-definition.ts @@ -58,9 +58,9 @@ export class OAuth2TokenDefinition extends ObjectHydrator) { const copy = new OAuth2TokenDefinition(this as any) as OAuth2TokenDefinitionIntersection; - validate('OAuth2TokenDefinition', copy); + validate('OAuth2TokenDefinition', copy, workflow); } /** diff --git a/src/lib/generated/classes/oauth2-token-request.ts b/src/lib/generated/classes/oauth2-token-request.ts index b423c9c6..89781a24 100644 --- a/src/lib/generated/classes/oauth2-token-request.ts +++ b/src/lib/generated/classes/oauth2-token-request.ts @@ -58,9 +58,9 @@ export class OAuth2TokenRequest extends ObjectHydrator) { const copy = new OAuth2TokenRequest(this as any) as OAuth2TokenRequestIntersection; - validate('OAuth2TokenRequest', copy); + validate('OAuth2TokenRequest', copy, workflow); } /** diff --git a/src/lib/generated/classes/one-event-consumption-strategy.ts b/src/lib/generated/classes/one-event-consumption-strategy.ts index 73246a4d..b494f482 100644 --- a/src/lib/generated/classes/one-event-consumption-strategy.ts +++ b/src/lib/generated/classes/one-event-consumption-strategy.ts @@ -64,9 +64,9 @@ export class OneEventConsumptionStrategy extends ObjectHydrator) { const copy = new OneEventConsumptionStrategy(this as any) as OneEventConsumptionStrategyIntersection; - validate('OneEventConsumptionStrategy', copy); + validate('OneEventConsumptionStrategy', copy, workflow); } /** diff --git a/src/lib/generated/classes/open-api-arguments.ts b/src/lib/generated/classes/open-api-arguments.ts index a7bcfaf4..bfa0a688 100644 --- a/src/lib/generated/classes/open-api-arguments.ts +++ b/src/lib/generated/classes/open-api-arguments.ts @@ -68,9 +68,9 @@ export class OpenAPIArguments extends ObjectHydrator) { const copy = new OpenAPIArguments(this as any) as OpenAPIArgumentsIntersection; - validate('OpenAPIArguments', copy); + validate('OpenAPIArguments', copy, workflow); } /** diff --git a/src/lib/generated/classes/open-id-connect-authentication-policy-configuration.ts b/src/lib/generated/classes/open-id-connect-authentication-policy-configuration.ts index 21c2d55e..5026e98b 100644 --- a/src/lib/generated/classes/open-id-connect-authentication-policy-configuration.ts +++ b/src/lib/generated/classes/open-id-connect-authentication-policy-configuration.ts @@ -84,11 +84,11 @@ export class OpenIdConnectAuthenticationPolicyConfiguration extends ObjectHydrat * Validates the current instance of the OpenIdConnectAuthenticationPolicyConfiguration. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new OpenIdConnectAuthenticationPolicyConfiguration( this as any, ) as OpenIdConnectAuthenticationPolicyConfigurationIntersection; - validate('OpenIdConnectAuthenticationPolicyConfiguration', copy); + validate('OpenIdConnectAuthenticationPolicyConfiguration', copy, workflow); } /** diff --git a/src/lib/generated/classes/open-id-connect-authentication-policy.ts b/src/lib/generated/classes/open-id-connect-authentication-policy.ts index 7347322f..2e27b54e 100644 --- a/src/lib/generated/classes/open-id-connect-authentication-policy.ts +++ b/src/lib/generated/classes/open-id-connect-authentication-policy.ts @@ -64,9 +64,9 @@ export class OpenIdConnectAuthenticationPolicy extends ObjectHydrator) { const copy = new OpenIdConnectAuthenticationPolicy(this as any) as OpenIdConnectAuthenticationPolicyIntersection; - validate('OpenIdConnectAuthenticationPolicy', copy); + validate('OpenIdConnectAuthenticationPolicy', copy, workflow); } /** diff --git a/src/lib/generated/classes/open-id-connect-authentication-properties.ts b/src/lib/generated/classes/open-id-connect-authentication-properties.ts index dbedf195..e571dd93 100644 --- a/src/lib/generated/classes/open-id-connect-authentication-properties.ts +++ b/src/lib/generated/classes/open-id-connect-authentication-properties.ts @@ -71,11 +71,11 @@ export class OpenIdConnectAuthenticationProperties extends ObjectHydrator) { const copy = new OpenIdConnectAuthenticationProperties( this as any, ) as OpenIdConnectAuthenticationPropertiesIntersection; - validate('OpenIdConnectAuthenticationProperties', copy); + validate('OpenIdConnectAuthenticationProperties', copy, workflow); } /** diff --git a/src/lib/generated/classes/output-as.ts b/src/lib/generated/classes/output-as.ts index 2c55a969..dc5cbeca 100644 --- a/src/lib/generated/classes/output-as.ts +++ b/src/lib/generated/classes/output-as.ts @@ -58,9 +58,9 @@ export class OutputAs extends ObjectHydrator { * Validates the current instance of the OutputAs. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new OutputAs(this as any) as OutputAsIntersection; - validate('OutputAs', copy); + validate('OutputAs', copy, workflow); } /** diff --git a/src/lib/generated/classes/output.ts b/src/lib/generated/classes/output.ts index b86e580f..a4ba1523 100644 --- a/src/lib/generated/classes/output.ts +++ b/src/lib/generated/classes/output.ts @@ -63,9 +63,9 @@ export class Output extends ObjectHydrator { * Validates the current instance of the Output. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new Output(this as any) as OutputIntersection; - validate('Output', copy); + validate('Output', copy, workflow); } /** diff --git a/src/lib/generated/classes/raise-task-configuration.ts b/src/lib/generated/classes/raise-task-configuration.ts index ae61ee56..65d68972 100644 --- a/src/lib/generated/classes/raise-task-configuration.ts +++ b/src/lib/generated/classes/raise-task-configuration.ts @@ -63,9 +63,9 @@ export class RaiseTaskConfiguration extends ObjectHydrator) { const copy = new RaiseTaskConfiguration(this as any) as RaiseTaskConfigurationIntersection; - validate('RaiseTaskConfiguration', copy); + validate('RaiseTaskConfiguration', copy, workflow); } /** diff --git a/src/lib/generated/classes/raise-task-raise-error.ts b/src/lib/generated/classes/raise-task-raise-error.ts index 2e26b48d..628df2da 100644 --- a/src/lib/generated/classes/raise-task-raise-error.ts +++ b/src/lib/generated/classes/raise-task-raise-error.ts @@ -58,9 +58,9 @@ export class RaiseTaskRaiseError extends ObjectHydrator) { const copy = new RaiseTaskRaiseError(this as any) as RaiseTaskRaiseErrorIntersection; - validate('RaiseTaskRaiseError', copy); + validate('RaiseTaskRaiseError', copy, workflow); } /** diff --git a/src/lib/generated/classes/raise-task.ts b/src/lib/generated/classes/raise-task.ts index 11434444..f7b062fc 100644 --- a/src/lib/generated/classes/raise-task.ts +++ b/src/lib/generated/classes/raise-task.ts @@ -73,9 +73,9 @@ export class RaiseTask extends _TaskBase { * Validates the current instance of the RaiseTask. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new RaiseTask(this as any) as RaiseTaskIntersection; - validate('RaiseTask', copy); + validate('RaiseTask', copy, workflow); } /** diff --git a/src/lib/generated/classes/referenceable-authentication-policy.ts b/src/lib/generated/classes/referenceable-authentication-policy.ts index 1cf797e9..badbb1be 100644 --- a/src/lib/generated/classes/referenceable-authentication-policy.ts +++ b/src/lib/generated/classes/referenceable-authentication-policy.ts @@ -93,9 +93,9 @@ export class ReferenceableAuthenticationPolicy extends ObjectHydrator) { const copy = new ReferenceableAuthenticationPolicy(this as any) as ReferenceableAuthenticationPolicyIntersection; - validate('ReferenceableAuthenticationPolicy', copy); + validate('ReferenceableAuthenticationPolicy', copy, workflow); } /** diff --git a/src/lib/generated/classes/retry-backoff.ts b/src/lib/generated/classes/retry-backoff.ts index cb29d15b..bed48e77 100644 --- a/src/lib/generated/classes/retry-backoff.ts +++ b/src/lib/generated/classes/retry-backoff.ts @@ -58,9 +58,9 @@ export class RetryBackoff extends ObjectHydrator { * Validates the current instance of the RetryBackoff. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new RetryBackoff(this as any) as RetryBackoffIntersection; - validate('RetryBackoff', copy); + validate('RetryBackoff', copy, workflow); } /** diff --git a/src/lib/generated/classes/retry-limit-attempt.ts b/src/lib/generated/classes/retry-limit-attempt.ts index 67b04719..e48b9e77 100644 --- a/src/lib/generated/classes/retry-limit-attempt.ts +++ b/src/lib/generated/classes/retry-limit-attempt.ts @@ -63,9 +63,9 @@ export class RetryLimitAttempt extends ObjectHydrator) { const copy = new RetryLimitAttempt(this as any) as RetryLimitAttemptIntersection; - validate('RetryLimitAttempt', copy); + validate('RetryLimitAttempt', copy, workflow); } /** diff --git a/src/lib/generated/classes/retry-limit.ts b/src/lib/generated/classes/retry-limit.ts index b0864cb5..d745e861 100644 --- a/src/lib/generated/classes/retry-limit.ts +++ b/src/lib/generated/classes/retry-limit.ts @@ -65,9 +65,9 @@ export class RetryLimit extends ObjectHydrator { * Validates the current instance of the RetryLimit. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new RetryLimit(this as any) as RetryLimitIntersection; - validate('RetryLimit', copy); + validate('RetryLimit', copy, workflow); } /** diff --git a/src/lib/generated/classes/retry-policy-jitter.ts b/src/lib/generated/classes/retry-policy-jitter.ts index 25f7eb14..c8059791 100644 --- a/src/lib/generated/classes/retry-policy-jitter.ts +++ b/src/lib/generated/classes/retry-policy-jitter.ts @@ -64,9 +64,9 @@ export class RetryPolicyJitter extends ObjectHydrator) { const copy = new RetryPolicyJitter(this as any) as RetryPolicyJitterIntersection; - validate('RetryPolicyJitter', copy); + validate('RetryPolicyJitter', copy, workflow); } /** diff --git a/src/lib/generated/classes/retry-policy.ts b/src/lib/generated/classes/retry-policy.ts index 894c54e1..2678380f 100644 --- a/src/lib/generated/classes/retry-policy.ts +++ b/src/lib/generated/classes/retry-policy.ts @@ -69,9 +69,9 @@ export class RetryPolicy extends ObjectHydrator { * Validates the current instance of the RetryPolicy. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new RetryPolicy(this as any) as RetryPolicyIntersection; - validate('RetryPolicy', copy); + validate('RetryPolicy', copy, workflow); } /** diff --git a/src/lib/generated/classes/run-container.ts b/src/lib/generated/classes/run-container.ts index bbf010e3..2bb9dc04 100644 --- a/src/lib/generated/classes/run-container.ts +++ b/src/lib/generated/classes/run-container.ts @@ -63,9 +63,9 @@ export class RunContainer extends ObjectHydrator { * Validates the current instance of the RunContainer. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new RunContainer(this as any) as RunContainerIntersection; - validate('RunContainer', copy); + validate('RunContainer', copy, workflow); } /** diff --git a/src/lib/generated/classes/run-script.ts b/src/lib/generated/classes/run-script.ts index e2d4a4c4..0e5c829b 100644 --- a/src/lib/generated/classes/run-script.ts +++ b/src/lib/generated/classes/run-script.ts @@ -63,9 +63,9 @@ export class RunScript extends ObjectHydrator { * Validates the current instance of the RunScript. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new RunScript(this as any) as RunScriptIntersection; - validate('RunScript', copy); + validate('RunScript', copy, workflow); } /** diff --git a/src/lib/generated/classes/run-shell.ts b/src/lib/generated/classes/run-shell.ts index a08b0145..8d641e4c 100644 --- a/src/lib/generated/classes/run-shell.ts +++ b/src/lib/generated/classes/run-shell.ts @@ -63,9 +63,9 @@ export class RunShell extends ObjectHydrator { * Validates the current instance of the RunShell. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new RunShell(this as any) as RunShellIntersection; - validate('RunShell', copy); + validate('RunShell', copy, workflow); } /** diff --git a/src/lib/generated/classes/run-task-configuration.ts b/src/lib/generated/classes/run-task-configuration.ts index 9d2ed080..7a475836 100644 --- a/src/lib/generated/classes/run-task-configuration.ts +++ b/src/lib/generated/classes/run-task-configuration.ts @@ -81,9 +81,9 @@ export class RunTaskConfiguration extends ObjectHydrator) { const copy = new RunTaskConfiguration(this as any) as RunTaskConfigurationIntersection; - validate('RunTaskConfiguration', copy); + validate('RunTaskConfiguration', copy, workflow); } /** diff --git a/src/lib/generated/classes/run-task.ts b/src/lib/generated/classes/run-task.ts index 95b0b41e..986e2399 100644 --- a/src/lib/generated/classes/run-task.ts +++ b/src/lib/generated/classes/run-task.ts @@ -73,9 +73,9 @@ export class RunTask extends _TaskBase { * Validates the current instance of the RunTask. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new RunTask(this as any) as RunTaskIntersection; - validate('RunTask', copy); + validate('RunTask', copy, workflow); } /** diff --git a/src/lib/generated/classes/run-workflow.ts b/src/lib/generated/classes/run-workflow.ts index 9c12c719..60940869 100644 --- a/src/lib/generated/classes/run-workflow.ts +++ b/src/lib/generated/classes/run-workflow.ts @@ -63,9 +63,9 @@ export class RunWorkflow extends ObjectHydrator { * Validates the current instance of the RunWorkflow. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new RunWorkflow(this as any) as RunWorkflowIntersection; - validate('RunWorkflow', copy); + validate('RunWorkflow', copy, workflow); } /** diff --git a/src/lib/generated/classes/runtime-expression.ts b/src/lib/generated/classes/runtime-expression.ts index c7dff28d..ec80d13b 100644 --- a/src/lib/generated/classes/runtime-expression.ts +++ b/src/lib/generated/classes/runtime-expression.ts @@ -58,9 +58,9 @@ export class RuntimeExpression extends ObjectHydrator) { const copy = new RuntimeExpression(this as any) as RuntimeExpressionIntersection; - validate('RuntimeExpression', copy); + validate('RuntimeExpression', copy, workflow); } /** diff --git a/src/lib/generated/classes/schedule.ts b/src/lib/generated/classes/schedule.ts index c9b5f08f..60c90883 100644 --- a/src/lib/generated/classes/schedule.ts +++ b/src/lib/generated/classes/schedule.ts @@ -66,9 +66,9 @@ export class Schedule extends ObjectHydrator { * Validates the current instance of the Schedule. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new Schedule(this as any) as ScheduleIntersection; - validate('Schedule', copy); + validate('Schedule', copy, workflow); } /** diff --git a/src/lib/generated/classes/schema-external.ts b/src/lib/generated/classes/schema-external.ts index 26b91477..2c33cc5a 100644 --- a/src/lib/generated/classes/schema-external.ts +++ b/src/lib/generated/classes/schema-external.ts @@ -63,9 +63,9 @@ export class SchemaExternal extends ObjectHydrator * Validates the current instance of the SchemaExternal. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new SchemaExternal(this as any) as SchemaExternalIntersection; - validate('SchemaExternal', copy); + validate('SchemaExternal', copy, workflow); } /** diff --git a/src/lib/generated/classes/schema-inline.ts b/src/lib/generated/classes/schema-inline.ts index 21c91018..4a66913d 100644 --- a/src/lib/generated/classes/schema-inline.ts +++ b/src/lib/generated/classes/schema-inline.ts @@ -58,9 +58,9 @@ export class SchemaInline extends ObjectHydrator { * Validates the current instance of the SchemaInline. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new SchemaInline(this as any) as SchemaInlineIntersection; - validate('SchemaInline', copy); + validate('SchemaInline', copy, workflow); } /** diff --git a/src/lib/generated/classes/schema.ts b/src/lib/generated/classes/schema.ts index f7b85885..038d5af4 100644 --- a/src/lib/generated/classes/schema.ts +++ b/src/lib/generated/classes/schema.ts @@ -66,9 +66,9 @@ export class Schema extends ObjectHydrator { * Validates the current instance of the Schema. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new Schema(this as any) as SchemaIntersection; - validate('Schema', copy); + validate('Schema', copy, workflow); } /** diff --git a/src/lib/generated/classes/script.ts b/src/lib/generated/classes/script.ts index 29522a10..40d83f62 100644 --- a/src/lib/generated/classes/script.ts +++ b/src/lib/generated/classes/script.ts @@ -66,9 +66,9 @@ export class Script extends ObjectHydrator { * Validates the current instance of the Script. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new Script(this as any) as ScriptIntersection; - validate('Script', copy); + validate('Script', copy, workflow); } /** diff --git a/src/lib/generated/classes/secret-based-authentication-policy.ts b/src/lib/generated/classes/secret-based-authentication-policy.ts index 89e68a2a..773ee552 100644 --- a/src/lib/generated/classes/secret-based-authentication-policy.ts +++ b/src/lib/generated/classes/secret-based-authentication-policy.ts @@ -59,9 +59,9 @@ export class SecretBasedAuthenticationPolicy extends ObjectHydrator) { const copy = new SecretBasedAuthenticationPolicy(this as any) as SecretBasedAuthenticationPolicyIntersection; - validate('SecretBasedAuthenticationPolicy', copy); + validate('SecretBasedAuthenticationPolicy', copy, workflow); } /** diff --git a/src/lib/generated/classes/set-task-configuration.ts b/src/lib/generated/classes/set-task-configuration.ts index 042832d1..8e7e17a5 100644 --- a/src/lib/generated/classes/set-task-configuration.ts +++ b/src/lib/generated/classes/set-task-configuration.ts @@ -58,9 +58,9 @@ export class SetTaskConfiguration extends ObjectHydrator) { const copy = new SetTaskConfiguration(this as any) as SetTaskConfigurationIntersection; - validate('SetTaskConfiguration', copy); + validate('SetTaskConfiguration', copy, workflow); } /** diff --git a/src/lib/generated/classes/set-task.ts b/src/lib/generated/classes/set-task.ts index 8fd559ff..c1bb1821 100644 --- a/src/lib/generated/classes/set-task.ts +++ b/src/lib/generated/classes/set-task.ts @@ -73,9 +73,9 @@ export class SetTask extends _TaskBase { * Validates the current instance of the SetTask. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new SetTask(this as any) as SetTaskIntersection; - validate('SetTask', copy); + validate('SetTask', copy, workflow); } /** diff --git a/src/lib/generated/classes/shell-arguments.ts b/src/lib/generated/classes/shell-arguments.ts index 7792d936..25e0c1b5 100644 --- a/src/lib/generated/classes/shell-arguments.ts +++ b/src/lib/generated/classes/shell-arguments.ts @@ -58,9 +58,9 @@ export class ShellArguments extends ObjectHydrator * Validates the current instance of the ShellArguments. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new ShellArguments(this as any) as ShellArgumentsIntersection; - validate('ShellArguments', copy); + validate('ShellArguments', copy, workflow); } /** diff --git a/src/lib/generated/classes/shell-environment.ts b/src/lib/generated/classes/shell-environment.ts index 37b70dd9..8053bf26 100644 --- a/src/lib/generated/classes/shell-environment.ts +++ b/src/lib/generated/classes/shell-environment.ts @@ -58,9 +58,9 @@ export class ShellEnvironment extends ObjectHydrator) { const copy = new ShellEnvironment(this as any) as ShellEnvironmentIntersection; - validate('ShellEnvironment', copy); + validate('ShellEnvironment', copy, workflow); } /** diff --git a/src/lib/generated/classes/shell.ts b/src/lib/generated/classes/shell.ts index 0372c544..1036fc31 100644 --- a/src/lib/generated/classes/shell.ts +++ b/src/lib/generated/classes/shell.ts @@ -65,9 +65,9 @@ export class Shell extends ObjectHydrator { * Validates the current instance of the Shell. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new Shell(this as any) as ShellIntersection; - validate('Shell', copy); + validate('Shell', copy, workflow); } /** diff --git a/src/lib/generated/classes/subflow-configuration.ts b/src/lib/generated/classes/subflow-configuration.ts index ba6dd6c2..908ddba9 100644 --- a/src/lib/generated/classes/subflow-configuration.ts +++ b/src/lib/generated/classes/subflow-configuration.ts @@ -63,9 +63,9 @@ export class SubflowConfiguration extends ObjectHydrator) { const copy = new SubflowConfiguration(this as any) as SubflowConfigurationIntersection; - validate('SubflowConfiguration', copy); + validate('SubflowConfiguration', copy, workflow); } /** diff --git a/src/lib/generated/classes/subflow-input.ts b/src/lib/generated/classes/subflow-input.ts index 596d4e64..eb6ea842 100644 --- a/src/lib/generated/classes/subflow-input.ts +++ b/src/lib/generated/classes/subflow-input.ts @@ -58,9 +58,9 @@ export class SubflowInput extends ObjectHydrator { * Validates the current instance of the SubflowInput. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new SubflowInput(this as any) as SubflowInputIntersection; - validate('SubflowInput', copy); + validate('SubflowInput', copy, workflow); } /** diff --git a/src/lib/generated/classes/switch-case.ts b/src/lib/generated/classes/switch-case.ts index fe467af5..975a208b 100644 --- a/src/lib/generated/classes/switch-case.ts +++ b/src/lib/generated/classes/switch-case.ts @@ -58,9 +58,9 @@ export class SwitchCase extends ObjectHydrator { * Validates the current instance of the SwitchCase. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new SwitchCase(this as any) as SwitchCaseIntersection; - validate('SwitchCase', copy); + validate('SwitchCase', copy, workflow); } /** diff --git a/src/lib/generated/classes/switch-item.ts b/src/lib/generated/classes/switch-item.ts index f9f97a50..245ddb79 100644 --- a/src/lib/generated/classes/switch-item.ts +++ b/src/lib/generated/classes/switch-item.ts @@ -68,9 +68,9 @@ export class SwitchItem extends ObjectHydrator { * Validates the current instance of the SwitchItem. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new SwitchItem(this as any) as SwitchItemIntersection; - validate('SwitchItem', copy); + validate('SwitchItem', copy, workflow); } /** diff --git a/src/lib/generated/classes/switch-task-configuration.ts b/src/lib/generated/classes/switch-task-configuration.ts index acb19270..8b738935 100644 --- a/src/lib/generated/classes/switch-task-configuration.ts +++ b/src/lib/generated/classes/switch-task-configuration.ts @@ -52,9 +52,9 @@ export class SwitchTaskConfiguration extends ArrayHydrator) { const copy = new SwitchTaskConfiguration(this); - validate('SwitchTaskConfiguration', copy); + validate('SwitchTaskConfiguration', copy, workflow); } /** diff --git a/src/lib/generated/classes/switch-task.ts b/src/lib/generated/classes/switch-task.ts index 49db068f..cf3a21a0 100644 --- a/src/lib/generated/classes/switch-task.ts +++ b/src/lib/generated/classes/switch-task.ts @@ -74,9 +74,9 @@ export class SwitchTask extends _TaskBase { * Validates the current instance of the SwitchTask. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new SwitchTask(this as any) as SwitchTaskIntersection; - validate('SwitchTask', copy); + validate('SwitchTask', copy, workflow); } /** diff --git a/src/lib/generated/classes/task-base-if.ts b/src/lib/generated/classes/task-base-if.ts index 03b59d1e..c47e03af 100644 --- a/src/lib/generated/classes/task-base-if.ts +++ b/src/lib/generated/classes/task-base-if.ts @@ -58,9 +58,9 @@ export class TaskBaseIf extends ObjectHydrator { * Validates the current instance of the TaskBaseIf. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new TaskBaseIf(this as any) as TaskBaseIfIntersection; - validate('TaskBaseIf', copy); + validate('TaskBaseIf', copy, workflow); } /** diff --git a/src/lib/generated/classes/task-base-timeout.ts b/src/lib/generated/classes/task-base-timeout.ts index fac8faff..aa59a83b 100644 --- a/src/lib/generated/classes/task-base-timeout.ts +++ b/src/lib/generated/classes/task-base-timeout.ts @@ -66,9 +66,9 @@ export class TaskBaseTimeout extends ObjectHydrator) { const copy = new TaskBaseTimeout(this as any) as TaskBaseTimeoutIntersection; - validate('TaskBaseTimeout', copy); + validate('TaskBaseTimeout', copy, workflow); } /** diff --git a/src/lib/generated/classes/task-base.ts b/src/lib/generated/classes/task-base.ts index a94724e2..3078df37 100644 --- a/src/lib/generated/classes/task-base.ts +++ b/src/lib/generated/classes/task-base.ts @@ -71,9 +71,9 @@ export class TaskBase extends ObjectHydrator { * Validates the current instance of the TaskBase. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new TaskBase(this as any) as TaskBaseIntersection; - validate('TaskBase', copy); + validate('TaskBase', copy, workflow); } /** diff --git a/src/lib/generated/classes/task-item.ts b/src/lib/generated/classes/task-item.ts index f34ea66b..d4301689 100644 --- a/src/lib/generated/classes/task-item.ts +++ b/src/lib/generated/classes/task-item.ts @@ -68,9 +68,9 @@ export class TaskItem extends ObjectHydrator { * Validates the current instance of the TaskItem. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new TaskItem(this as any) as TaskItemIntersection; - validate('TaskItem', copy); + validate('TaskItem', copy, workflow); } /** diff --git a/src/lib/generated/classes/task-list.ts b/src/lib/generated/classes/task-list.ts index 69ef9ac0..72338ced 100644 --- a/src/lib/generated/classes/task-list.ts +++ b/src/lib/generated/classes/task-list.ts @@ -52,9 +52,9 @@ export class TaskList extends ArrayHydrator { * Validates the current instance of the TaskList. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new TaskList(this); - validate('TaskList', copy); + validate('TaskList', copy, workflow); } /** diff --git a/src/lib/generated/classes/task-metadata.ts b/src/lib/generated/classes/task-metadata.ts index 9da2b651..837f73d9 100644 --- a/src/lib/generated/classes/task-metadata.ts +++ b/src/lib/generated/classes/task-metadata.ts @@ -58,9 +58,9 @@ export class TaskMetadata extends ObjectHydrator { * Validates the current instance of the TaskMetadata. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new TaskMetadata(this as any) as TaskMetadataIntersection; - validate('TaskMetadata', copy); + validate('TaskMetadata', copy, workflow); } /** diff --git a/src/lib/generated/classes/task.ts b/src/lib/generated/classes/task.ts index 3c4ef3ab..036274b3 100644 --- a/src/lib/generated/classes/task.ts +++ b/src/lib/generated/classes/task.ts @@ -190,9 +190,9 @@ export class Task extends ObjectHydrator { * Validates the current instance of the Task. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new Task(this as any) as TaskIntersection; - validate('Task', copy); + validate('Task', copy, workflow); } /** diff --git a/src/lib/generated/classes/timeout.ts b/src/lib/generated/classes/timeout.ts index 1fca623a..4d9795db 100644 --- a/src/lib/generated/classes/timeout.ts +++ b/src/lib/generated/classes/timeout.ts @@ -63,9 +63,9 @@ export class Timeout extends ObjectHydrator { * Validates the current instance of the Timeout. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new Timeout(this as any) as TimeoutIntersection; - validate('Timeout', copy); + validate('Timeout', copy, workflow); } /** diff --git a/src/lib/generated/classes/try-task-catch-retry.ts b/src/lib/generated/classes/try-task-catch-retry.ts index f1c73073..dd3db21f 100644 --- a/src/lib/generated/classes/try-task-catch-retry.ts +++ b/src/lib/generated/classes/try-task-catch-retry.ts @@ -81,9 +81,9 @@ export class TryTaskCatchRetry extends ObjectHydrator) { const copy = new TryTaskCatchRetry(this as any) as TryTaskCatchRetryIntersection; - validate('TryTaskCatchRetry', copy); + validate('TryTaskCatchRetry', copy, workflow); } /** diff --git a/src/lib/generated/classes/try-task-catch.ts b/src/lib/generated/classes/try-task-catch.ts index 6a551304..33dfdc44 100644 --- a/src/lib/generated/classes/try-task-catch.ts +++ b/src/lib/generated/classes/try-task-catch.ts @@ -67,9 +67,9 @@ export class TryTaskCatch extends ObjectHydrator { * Validates the current instance of the TryTaskCatch. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new TryTaskCatch(this as any) as TryTaskCatchIntersection; - validate('TryTaskCatch', copy); + validate('TryTaskCatch', copy, workflow); } /** diff --git a/src/lib/generated/classes/try-task.ts b/src/lib/generated/classes/try-task.ts index 7d7d1067..37862016 100644 --- a/src/lib/generated/classes/try-task.ts +++ b/src/lib/generated/classes/try-task.ts @@ -75,9 +75,9 @@ export class TryTask extends _TaskBase { * Validates the current instance of the TryTask. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new TryTask(this as any) as TryTaskIntersection; - validate('TryTask', copy); + validate('TryTask', copy, workflow); } /** diff --git a/src/lib/generated/classes/use-authentications.ts b/src/lib/generated/classes/use-authentications.ts index 136a8381..b5a4a855 100644 --- a/src/lib/generated/classes/use-authentications.ts +++ b/src/lib/generated/classes/use-authentications.ts @@ -68,9 +68,9 @@ export class UseAuthentications extends ObjectHydrator) { const copy = new UseAuthentications(this as any) as UseAuthenticationsIntersection; - validate('UseAuthentications', copy); + validate('UseAuthentications', copy, workflow); } /** diff --git a/src/lib/generated/classes/use-errors.ts b/src/lib/generated/classes/use-errors.ts index 983aec2a..94a57176 100644 --- a/src/lib/generated/classes/use-errors.ts +++ b/src/lib/generated/classes/use-errors.ts @@ -68,9 +68,9 @@ export class UseErrors extends ObjectHydrator { * Validates the current instance of the UseErrors. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new UseErrors(this as any) as UseErrorsIntersection; - validate('UseErrors', copy); + validate('UseErrors', copy, workflow); } /** diff --git a/src/lib/generated/classes/use-extensions.ts b/src/lib/generated/classes/use-extensions.ts index 4ae483b5..8e94d79d 100644 --- a/src/lib/generated/classes/use-extensions.ts +++ b/src/lib/generated/classes/use-extensions.ts @@ -52,9 +52,9 @@ export class UseExtensions extends ArrayHydrator { * Validates the current instance of the UseExtensions. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new UseExtensions(this); - validate('UseExtensions', copy); + validate('UseExtensions', copy, workflow); } /** diff --git a/src/lib/generated/classes/use-functions.ts b/src/lib/generated/classes/use-functions.ts index 75325f70..2a26e866 100644 --- a/src/lib/generated/classes/use-functions.ts +++ b/src/lib/generated/classes/use-functions.ts @@ -68,9 +68,9 @@ export class UseFunctions extends ObjectHydrator { * Validates the current instance of the UseFunctions. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new UseFunctions(this as any) as UseFunctionsIntersection; - validate('UseFunctions', copy); + validate('UseFunctions', copy, workflow); } /** diff --git a/src/lib/generated/classes/use-retries.ts b/src/lib/generated/classes/use-retries.ts index 05d2c657..f75132f0 100644 --- a/src/lib/generated/classes/use-retries.ts +++ b/src/lib/generated/classes/use-retries.ts @@ -68,9 +68,9 @@ export class UseRetries extends ObjectHydrator { * Validates the current instance of the UseRetries. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new UseRetries(this as any) as UseRetriesIntersection; - validate('UseRetries', copy); + validate('UseRetries', copy, workflow); } /** diff --git a/src/lib/generated/classes/use-secrets.ts b/src/lib/generated/classes/use-secrets.ts index 02d311de..6c9e74c2 100644 --- a/src/lib/generated/classes/use-secrets.ts +++ b/src/lib/generated/classes/use-secrets.ts @@ -20,6 +20,7 @@ * *****************************************************************************************/ +import { Specification } from '../definitions'; import { ArrayHydrator } from '../../hydrator'; import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; @@ -50,9 +51,9 @@ export class UseSecrets extends ArrayHydrator { * Validates the current instance of the UseSecrets. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new UseSecrets(this); - validate('UseSecrets', copy); + validate('UseSecrets', copy, workflow); } /** diff --git a/src/lib/generated/classes/use-timeouts.ts b/src/lib/generated/classes/use-timeouts.ts index 99227e95..2931bc8c 100644 --- a/src/lib/generated/classes/use-timeouts.ts +++ b/src/lib/generated/classes/use-timeouts.ts @@ -68,9 +68,9 @@ export class UseTimeouts extends ObjectHydrator { * Validates the current instance of the UseTimeouts. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new UseTimeouts(this as any) as UseTimeoutsIntersection; - validate('UseTimeouts', copy); + validate('UseTimeouts', copy, workflow); } /** diff --git a/src/lib/generated/classes/use.ts b/src/lib/generated/classes/use.ts index e638ec7e..6ff1dfd1 100644 --- a/src/lib/generated/classes/use.ts +++ b/src/lib/generated/classes/use.ts @@ -74,9 +74,9 @@ export class Use extends ObjectHydrator { * Validates the current instance of the Use. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new Use(this as any) as UseIntersection; - validate('Use', copy); + validate('Use', copy, workflow); } /** diff --git a/src/lib/generated/classes/wait-task.ts b/src/lib/generated/classes/wait-task.ts index 99b8d708..eba13a80 100644 --- a/src/lib/generated/classes/wait-task.ts +++ b/src/lib/generated/classes/wait-task.ts @@ -73,9 +73,9 @@ export class WaitTask extends _TaskBase { * Validates the current instance of the WaitTask. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new WaitTask(this as any) as WaitTaskIntersection; - validate('WaitTask', copy); + validate('WaitTask', copy, workflow); } /** diff --git a/src/lib/generated/classes/with-async-api-payload.ts b/src/lib/generated/classes/with-async-api-payload.ts index 8eea626c..25f82138 100644 --- a/src/lib/generated/classes/with-async-api-payload.ts +++ b/src/lib/generated/classes/with-async-api-payload.ts @@ -58,9 +58,9 @@ export class WithAsyncAPIPayload extends ObjectHydrator) { const copy = new WithAsyncAPIPayload(this as any) as WithAsyncAPIPayloadIntersection; - validate('WithAsyncAPIPayload', copy); + validate('WithAsyncAPIPayload', copy, workflow); } /** diff --git a/src/lib/generated/classes/with-event.ts b/src/lib/generated/classes/with-event.ts index cd90a833..defc4b88 100644 --- a/src/lib/generated/classes/with-event.ts +++ b/src/lib/generated/classes/with-event.ts @@ -58,9 +58,9 @@ export class WithEvent extends ObjectHydrator { * Validates the current instance of the WithEvent. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new WithEvent(this as any) as WithEventIntersection; - validate('WithEvent', copy); + validate('WithEvent', copy, workflow); } /** diff --git a/src/lib/generated/classes/with-grpc-arguments.ts b/src/lib/generated/classes/with-grpc-arguments.ts index 90881a48..69644203 100644 --- a/src/lib/generated/classes/with-grpc-arguments.ts +++ b/src/lib/generated/classes/with-grpc-arguments.ts @@ -58,9 +58,9 @@ export class WithGRPCArguments extends ObjectHydrator) { const copy = new WithGRPCArguments(this as any) as WithGRPCArgumentsIntersection; - validate('WithGRPCArguments', copy); + validate('WithGRPCArguments', copy, workflow); } /** diff --git a/src/lib/generated/classes/with-grpc-service.ts b/src/lib/generated/classes/with-grpc-service.ts index f0438a55..3bdcd932 100644 --- a/src/lib/generated/classes/with-grpc-service.ts +++ b/src/lib/generated/classes/with-grpc-service.ts @@ -64,9 +64,9 @@ export class WithGRPCService extends ObjectHydrator) { const copy = new WithGRPCService(this as any) as WithGRPCServiceIntersection; - validate('WithGRPCService', copy); + validate('WithGRPCService', copy, workflow); } /** diff --git a/src/lib/generated/classes/with-http-body.ts b/src/lib/generated/classes/with-http-body.ts index 817773b2..761837be 100644 --- a/src/lib/generated/classes/with-http-body.ts +++ b/src/lib/generated/classes/with-http-body.ts @@ -58,9 +58,9 @@ export class WithHTTPBody extends ObjectHydrator { * Validates the current instance of the WithHTTPBody. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new WithHTTPBody(this as any) as WithHTTPBodyIntersection; - validate('WithHTTPBody', copy); + validate('WithHTTPBody', copy, workflow); } /** diff --git a/src/lib/generated/classes/with-http-headers.ts b/src/lib/generated/classes/with-http-headers.ts index 1f12c56d..df03ce28 100644 --- a/src/lib/generated/classes/with-http-headers.ts +++ b/src/lib/generated/classes/with-http-headers.ts @@ -58,9 +58,9 @@ export class WithHTTPHeaders extends ObjectHydrator) { const copy = new WithHTTPHeaders(this as any) as WithHTTPHeadersIntersection; - validate('WithHTTPHeaders', copy); + validate('WithHTTPHeaders', copy, workflow); } /** diff --git a/src/lib/generated/classes/with-http-query.ts b/src/lib/generated/classes/with-http-query.ts index e84c7c46..b6346a0e 100644 --- a/src/lib/generated/classes/with-http-query.ts +++ b/src/lib/generated/classes/with-http-query.ts @@ -58,9 +58,9 @@ export class WithHTTPQuery extends ObjectHydrator { * Validates the current instance of the WithHTTPQuery. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new WithHTTPQuery(this as any) as WithHTTPQueryIntersection; - validate('WithHTTPQuery', copy); + validate('WithHTTPQuery', copy, workflow); } /** diff --git a/src/lib/generated/classes/with-open-api-parameters.ts b/src/lib/generated/classes/with-open-api-parameters.ts index 2366d6fb..66b4ca0f 100644 --- a/src/lib/generated/classes/with-open-api-parameters.ts +++ b/src/lib/generated/classes/with-open-api-parameters.ts @@ -58,9 +58,9 @@ export class WithOpenAPIParameters extends ObjectHydrator) { const copy = new WithOpenAPIParameters(this as any) as WithOpenAPIParametersIntersection; - validate('WithOpenAPIParameters', copy); + validate('WithOpenAPIParameters', copy, workflow); } /** diff --git a/src/lib/generated/classes/workflow-metadata.ts b/src/lib/generated/classes/workflow-metadata.ts index f290fd90..cc6ea302 100644 --- a/src/lib/generated/classes/workflow-metadata.ts +++ b/src/lib/generated/classes/workflow-metadata.ts @@ -58,9 +58,9 @@ export class WorkflowMetadata extends ObjectHydrator) { const copy = new WorkflowMetadata(this as any) as WorkflowMetadataIntersection; - validate('WorkflowMetadata', copy); + validate('WorkflowMetadata', copy, workflow); } /** diff --git a/src/lib/generated/classes/workflow-tags.ts b/src/lib/generated/classes/workflow-tags.ts index 5c00bab5..8412c3e2 100644 --- a/src/lib/generated/classes/workflow-tags.ts +++ b/src/lib/generated/classes/workflow-tags.ts @@ -58,9 +58,9 @@ export class WorkflowTags extends ObjectHydrator { * Validates the current instance of the WorkflowTags. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new WorkflowTags(this as any) as WorkflowTagsIntersection; - validate('WorkflowTags', copy); + validate('WorkflowTags', copy, workflow); } /** diff --git a/src/lib/generated/classes/workflow-timeout.ts b/src/lib/generated/classes/workflow-timeout.ts index ae0bbdfc..12809085 100644 --- a/src/lib/generated/classes/workflow-timeout.ts +++ b/src/lib/generated/classes/workflow-timeout.ts @@ -66,9 +66,9 @@ export class WorkflowTimeout extends ObjectHydrator) { const copy = new WorkflowTimeout(this as any) as WorkflowTimeoutIntersection; - validate('WorkflowTimeout', copy); + validate('WorkflowTimeout', copy, workflow); } /** diff --git a/src/lib/generated/classes/workflow.ts b/src/lib/generated/classes/workflow.ts index 3adbfee7..e272f938 100644 --- a/src/lib/generated/classes/workflow.ts +++ b/src/lib/generated/classes/workflow.ts @@ -76,9 +76,9 @@ export class Workflow extends ObjectHydrator { * Validates the current instance of the Workflow. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new Workflow(this as any) as WorkflowIntersection; - validate('Workflow', copy); + validate('Workflow', copy, workflow); } /** diff --git a/src/lib/lifecycle-hooks.ts b/src/lib/lifecycle-hooks.ts index a2c3b5f8..a63d2b57 100644 --- a/src/lib/lifecycle-hooks.ts +++ b/src/lib/lifecycle-hooks.ts @@ -15,6 +15,7 @@ * */ +import { Specification } from './generated/definitions'; import { WorkflowHooks } from './hooks'; /** @@ -29,13 +30,15 @@ export type LifecycleHooks = { /** * The hook called before the validation * @param instance A copy instance being validated + * @param workflow A workflow instance, used for DSL level validation */ - preValidation?: (instance: T) => void; + preValidation?: (instance: T, workflow?: Partial) => void; /** * The hook called after the validation * @param instance A copy instance being validated + * @param workflow A workflow instance, used for DSL level validation */ - postValidation?: (instance: T) => void; + postValidation?: (instance: T, workflow?: Partial) => void; /** * The hook called to normalized the instance * @param instance A copy of the instance to normalize diff --git a/src/lib/validation.ts b/src/lib/validation.ts index 6c63630a..920d5d2a 100644 --- a/src/lib/validation.ts +++ b/src/lib/validation.ts @@ -21,6 +21,7 @@ import workflowSchema from './generated/schema/workflow.json'; import { validationPointers } from './generated/validation'; import { deepCopy } from './utils'; import { getLifecycleHooks } from './lifecycle-hooks'; +import { Specification } from './generated/definitions'; const ajv = new Ajv({ schemas: [workflowSchema], @@ -44,10 +45,11 @@ const validators: Map = new Map(typeName: string, data: T) => { - getLifecycleHooks(typeName)?.preValidation?.(data); +export const validate = (typeName: string, data: T, workflow?: Partial) => { + getLifecycleHooks(typeName)?.preValidation?.(data, workflow); const validateFn: ValidateFunction | undefined = validators.get(typeName); if (!validateFn) { throw Error(`Unable to find a validation function for '${typeName}'`); @@ -61,5 +63,5 @@ ${validateFn.errors?.reduce((acc, error) => acc + `- ${error.instancePath} | ${e data: ${JSON.stringify(data, null, 4)}`, ); } - getLifecycleHooks(typeName)?.postValidation?.(data); + getLifecycleHooks(typeName)?.postValidation?.(data, workflow); }; diff --git a/tools/4_generate-classes.ts b/tools/4_generate-classes.ts index 7e9ef446..06f13c55 100644 --- a/tools/4_generate-classes.ts +++ b/tools/4_generate-classes.ts @@ -88,9 +88,9 @@ export class ${name} extends ${baseClass ? '_' + baseClass : `ObjectHydrator) { const copy = new ${name}(this as any) as ${name}Intersection; - validate('${name}', copy); + validate('${name}', copy, workflow); } /** @@ -171,7 +171,7 @@ function getArrayLikeClassDeclaration(name: string, arrayTypeName: string, type: ${inFileDisclaimer} ${hydrationResult.imports.map((type) => `import { _${type} } from './${toKebabCase(normalizeKnownAllCaps(type))}';`)} -${hydrationResult.imports.length ? `import { Specification } from '../definitions';` : ''} +import { Specification } from '../definitions'; import { ArrayHydrator } from '../../hydrator'; import { getLifecycleHooks } from '../../lifecycle-hooks'; import { validate } from '../../validation'; @@ -199,9 +199,9 @@ export class ${name} extends ArrayHydrator<${arrayTypeName}> { * Validates the current instance of the ${name}. * Throws if invalid. */ - validate() { + validate(workflow?: Partial) { const copy = new ${name}(this); - validate('${name}', copy); + validate('${name}', copy, workflow); } /** From e02cf4ba4f4d1ce3618212b002747e85e210e10e Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Wed, 9 Oct 2024 18:05:16 +0200 Subject: [PATCH 20/24] Updated json-schema-to-typescript to v15.0.2 Signed-off-by: Jean-Baptiste Bianchi --- package-lock.json | 19 +++++++++++++------ package.json | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8eb2a778..eb7f6233 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@serverlessworkflow/sdk", - "version": "1.0.0-alpha2.0", + "version": "1.0.0-alpha3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@serverlessworkflow/sdk", - "version": "1.0.0-alpha2.0", + "version": "1.0.0-alpha3.0", "license": "http://www.apache.org/licenses/LICENSE-2.0.txt", "dependencies": { "ajv": "^8.17.1", @@ -30,7 +30,7 @@ "eslint-plugin-prettier": "^5.1.3", "husky": "^9.0.11", "jest": "^29.7.0", - "json-schema-to-typescript": "^15.0.1", + "json-schema-to-typescript": "^15.0.2", "lint-staged": "^15.2.7", "node-fetch": "^3.3.2", "prettier": "^3.3.3", @@ -1692,6 +1692,12 @@ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, + "node_modules/@types/lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-YpS0zzoduEhuOWjAotS6A5AVCva7X4lVlYLF0FYHAY9sdraBfnatttHItlWeZdGhuEkf+OzMNg2ZYAx8t+52uQ==", + "dev": true + }, "node_modules/@types/node": { "version": "20.14.10", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.10.tgz", @@ -4738,13 +4744,14 @@ "dev": true }, "node_modules/json-schema-to-typescript": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-15.0.1.tgz", - "integrity": "sha512-gSSg20skxv+ZQqR8Y8itZt+2iYFGNgneuTgf/Va0TBw+zo6JsykDG1bqhkhMs5g/vIdqmZx55oQJLbgOEuxPJw==", + "version": "15.0.2", + "resolved": "https://registry.npmjs.org/json-schema-to-typescript/-/json-schema-to-typescript-15.0.2.tgz", + "integrity": "sha512-+cRBw+bBJ3k783mZroDIgz1pLNPB4hvj6nnbHTWwEVl0dkW8qdZ+M9jWhBb+Y0FAdHvNsXACga3lewGO8lktrw==", "dev": true, "dependencies": { "@apidevtools/json-schema-ref-parser": "^11.5.5", "@types/json-schema": "^7.0.15", + "@types/lodash": "^4.17.7", "glob": "^10.3.12", "is-glob": "^4.0.3", "js-yaml": "^4.1.0", diff --git a/package.json b/package.json index ab8501b7..9536d4a9 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "eslint-plugin-prettier": "^5.1.3", "husky": "^9.0.11", "jest": "^29.7.0", - "json-schema-to-typescript": "^15.0.1", + "json-schema-to-typescript": "^15.0.2", "lint-staged": "^15.2.7", "node-fetch": "^3.3.2", "prettier": "^3.3.3", From 0727bded7ad73d98777f97272fe035158d5e51e0 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Wed, 9 Oct 2024 18:09:47 +0200 Subject: [PATCH 21/24] Removed duplicate validation hooks in Workflow deserialization Signed-off-by: Jean-Baptiste Bianchi --- src/lib/generated/classes/workflow.ts | 2 -- tools/4_generate-classes.ts | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/lib/generated/classes/workflow.ts b/src/lib/generated/classes/workflow.ts index e272f938..4d172765 100644 --- a/src/lib/generated/classes/workflow.ts +++ b/src/lib/generated/classes/workflow.ts @@ -94,9 +94,7 @@ export class Workflow extends ObjectHydrator { static deserialize(text: string): WorkflowIntersection { const model = yaml.load(text) as Partial; - getLifecycleHooks('Workflow')?.preValidation?.(model); validate('Workflow', model); - getLifecycleHooks('Workflow')?.postValidation?.(model); return new Workflow(model) as WorkflowIntersection; } diff --git a/tools/4_generate-classes.ts b/tools/4_generate-classes.ts index 06f13c55..7d1a2c19 100644 --- a/tools/4_generate-classes.ts +++ b/tools/4_generate-classes.ts @@ -108,9 +108,7 @@ export class ${name} extends ${baseClass ? '_' + baseClass : `ObjectHydrator; - getLifecycleHooks('Workflow')?.preValidation?.(model); validate('Workflow', model); - getLifecycleHooks('Workflow')?.postValidation?.(model); return new Workflow(model) as WorkflowIntersection; } From 3c9501cee46eec13c12dd4166c306b4689d3ad37 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Wed, 18 Dec 2024 16:27:03 +0100 Subject: [PATCH 22/24] Updated for v1.0.0-alpha5 Signed-off-by: Jean-Baptiste Bianchi --- package.json | 4 +- src/lib/generated/builders/catalog-builder.ts | 44 +++ src/lib/generated/builders/index.ts | 3 + .../builders/uri-template-builder.ts | 44 +++ .../builders/use-catalogs-builder.ts | 44 +++ src/lib/generated/classes/catalog.ts | 83 +++++ src/lib/generated/classes/index.ts | 6 + src/lib/generated/classes/uri-template.ts | 78 +++++ src/lib/generated/classes/use-catalogs.ts | 88 +++++ src/lib/generated/classes/use.ts | 2 + .../generated/definitions/specification.ts | 34 +- .../generated/schema/__internal_workflow.json | 78 ++++- src/lib/generated/schema/workflow.json | 73 +++-- src/lib/generated/schema/workflow.yaml | 63 ++-- .../validation/validation-pointers.ts | 307 +++++++++--------- 15 files changed, 726 insertions(+), 225 deletions(-) create mode 100644 src/lib/generated/builders/catalog-builder.ts create mode 100644 src/lib/generated/builders/uri-template-builder.ts create mode 100644 src/lib/generated/builders/use-catalogs-builder.ts create mode 100644 src/lib/generated/classes/catalog.ts create mode 100644 src/lib/generated/classes/uri-template.ts create mode 100644 src/lib/generated/classes/use-catalogs.ts diff --git a/package.json b/package.json index 9536d4a9..ad3e0654 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@serverlessworkflow/sdk", - "version": "1.0.0-alpha3.0", - "schemaVersion": "1.0.0-alpha3", + "version": "1.0.0-alpha5.0", + "schemaVersion": "1.0.0-alpha5", "description": "Typescript SDK for Serverless Workflow Specification", "main": "umd/index.umd.min.js", "browser": "umd/index.umd.min.js", diff --git a/src/lib/generated/builders/catalog-builder.ts b/src/lib/generated/builders/catalog-builder.ts new file mode 100644 index 00000000..30a111bf --- /dev/null +++ b/src/lib/generated/builders/catalog-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.Catalog} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.Catalog} The built object + */ +function buildingFn(model: Specification.Catalog, options: BuildOptions): Specification.Catalog { + const instance = new Classes.Catalog(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.Catalog; +} + +/** + * A factory to create a builder proxy for the type `Specification.Catalog` + * @returns {Builder} A builder for `Specification.Catalog` + */ +export const catalogBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/index.ts b/src/lib/generated/builders/index.ts index 335fe45c..cf5ec031 100644 --- a/src/lib/generated/builders/index.ts +++ b/src/lib/generated/builders/index.ts @@ -33,6 +33,7 @@ export * from './call-grpc-builder'; export * from './call-http-builder'; export * from './call-open-api-builder'; export * from './call-task-builder'; +export * from './catalog-builder'; export * from './catch-errors-builder'; export * from './constant-backoff-builder'; export * from './container-builder'; @@ -145,8 +146,10 @@ export * from './timeout-builder'; export * from './try-task-builder'; export * from './try-task-catch-builder'; export * from './try-task-catch-retry-builder'; +export * from './uri-template-builder'; export * from './use-builder'; export * from './use-authentications-builder'; +export * from './use-catalogs-builder'; export * from './use-errors-builder'; export * from './use-extensions-builder'; export * from './use-functions-builder'; diff --git a/src/lib/generated/builders/uri-template-builder.ts b/src/lib/generated/builders/uri-template-builder.ts new file mode 100644 index 00000000..80e4a2ea --- /dev/null +++ b/src/lib/generated/builders/uri-template-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.UriTemplate} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.UriTemplate} The built object + */ +function buildingFn(model: Specification.UriTemplate, options: BuildOptions): Specification.UriTemplate { + const instance = new Classes.UriTemplate(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.UriTemplate; +} + +/** + * A factory to create a builder proxy for the type `Specification.UriTemplate` + * @returns {Builder} A builder for `Specification.UriTemplate` + */ +export const uriTemplateBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/builders/use-catalogs-builder.ts b/src/lib/generated/builders/use-catalogs-builder.ts new file mode 100644 index 00000000..3c5b870d --- /dev/null +++ b/src/lib/generated/builders/use-catalogs-builder.ts @@ -0,0 +1,44 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { builder, Builder, BuildOptions } from '../../builder'; +import { Classes } from '../classes'; +import { Specification } from '../definitions'; + +/** + * The internal function used by the builder proxy to validate and return its underlying object + * @param {Specification.UseCatalogs} model The proxied object + * @param {BuildOptions} options The build options to use + * @returns {Specification.UseCatalogs} The built object + */ +function buildingFn(model: Specification.UseCatalogs, options: BuildOptions): Specification.UseCatalogs { + const instance = new Classes.UseCatalogs(model); + if (options.validate) instance.validate(); + return (options.normalize ? instance.normalize() : instance) as Specification.UseCatalogs; +} + +/** + * A factory to create a builder proxy for the type `Specification.UseCatalogs` + * @returns {Builder} A builder for `Specification.UseCatalogs` + */ +export const useCatalogsBuilder = (model?: Partial): Builder => + builder(model, buildingFn); diff --git a/src/lib/generated/classes/catalog.ts b/src/lib/generated/classes/catalog.ts new file mode 100644 index 00000000..e806b71b --- /dev/null +++ b/src/lib/generated/classes/catalog.ts @@ -0,0 +1,83 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _Endpoint } from './endpoint'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the Catalog class and type + */ +export type CatalogIntersection = Catalog & Specification.Catalog; + +/** + * Represents a constructor for the intersection of the Catalog class and type + */ +export interface CatalogConstructor { + new (model?: Partial): CatalogIntersection; +} + +/** + * Represents a Catalog with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class Catalog extends ObjectHydrator { + /** + * Instanciates a new instance of the Catalog class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the Catalog. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.Catalog & object; + if (isObject(model)) { + if (typeof model.endpoint === 'object') self.endpoint = new _Endpoint(model.endpoint); + } + getLifecycleHooks('Catalog')?.constructor?.(this); + } + + /** + * Validates the current instance of the Catalog. + * Throws if invalid. + */ + validate(workflow?: Partial) { + const copy = new Catalog(this as any) as CatalogIntersection; + validate('Catalog', copy, workflow); + } + + /** + * Normalizes the current instance of the Catalog. + * Creates a copy of the Catalog, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the Catalog instance. + */ + normalize(): Catalog & Specification.Catalog { + const copy = new Catalog(this as any) as CatalogIntersection; + return getLifecycleHooks('Catalog')?.normalize?.(copy) || copy; + } +} + +export const _Catalog = Catalog as CatalogConstructor; diff --git a/src/lib/generated/classes/index.ts b/src/lib/generated/classes/index.ts index 9ae9d61f..955ab025 100644 --- a/src/lib/generated/classes/index.ts +++ b/src/lib/generated/classes/index.ts @@ -33,6 +33,7 @@ import { _CallGRPC } from './call-grpc'; import { _CallHTTP } from './call-http'; import { _CallOpenAPI } from './call-open-api'; import { _CallTask } from './call-task'; +import { _Catalog } from './catalog'; import { _CatchErrors } from './catch-errors'; import { _ConstantBackoff } from './constant-backoff'; import { _Container } from './container'; @@ -145,8 +146,10 @@ import { _Timeout } from './timeout'; import { _TryTask } from './try-task'; import { _TryTaskCatch } from './try-task-catch'; import { _TryTaskCatchRetry } from './try-task-catch-retry'; +import { _UriTemplate } from './uri-template'; import { _Use } from './use'; import { _UseAuthentications } from './use-authentications'; +import { _UseCatalogs } from './use-catalogs'; import { _UseErrors } from './use-errors'; import { _UseExtensions } from './use-extensions'; import { _UseFunctions } from './use-functions'; @@ -187,6 +190,7 @@ export const Classes = { CallHTTP: _CallHTTP, CallOpenAPI: _CallOpenAPI, CallTask: _CallTask, + Catalog: _Catalog, CatchErrors: _CatchErrors, ConstantBackoff: _ConstantBackoff, Container: _Container, @@ -299,8 +303,10 @@ export const Classes = { TryTask: _TryTask, TryTaskCatch: _TryTaskCatch, TryTaskCatchRetry: _TryTaskCatchRetry, + UriTemplate: _UriTemplate, Use: _Use, UseAuthentications: _UseAuthentications, + UseCatalogs: _UseCatalogs, UseErrors: _UseErrors, UseExtensions: _UseExtensions, UseFunctions: _UseFunctions, diff --git a/src/lib/generated/classes/uri-template.ts b/src/lib/generated/classes/uri-template.ts new file mode 100644 index 00000000..4819ae13 --- /dev/null +++ b/src/lib/generated/classes/uri-template.ts @@ -0,0 +1,78 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; + +/** + * Represents the intersection between the UriTemplate class and type + */ +export type UriTemplateIntersection = UriTemplate & Specification.UriTemplate; + +/** + * Represents a constructor for the intersection of the UriTemplate class and type + */ +export interface UriTemplateConstructor { + new (model?: Partial): UriTemplateIntersection; +} + +/** + * Represents a UriTemplate with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class UriTemplate extends ObjectHydrator { + /** + * Instanciates a new instance of the UriTemplate class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the UriTemplate. + */ + constructor(model?: Partial) { + super(model); + + getLifecycleHooks('UriTemplate')?.constructor?.(this); + } + + /** + * Validates the current instance of the UriTemplate. + * Throws if invalid. + */ + validate(workflow?: Partial) { + const copy = new UriTemplate(this as any) as UriTemplateIntersection; + validate('UriTemplate', copy, workflow); + } + + /** + * Normalizes the current instance of the UriTemplate. + * Creates a copy of the UriTemplate, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the UriTemplate instance. + */ + normalize(): UriTemplate & Specification.UriTemplate { + const copy = new UriTemplate(this as any) as UriTemplateIntersection; + return getLifecycleHooks('UriTemplate')?.normalize?.(copy) || copy; + } +} + +export const _UriTemplate = UriTemplate as UriTemplateConstructor; diff --git a/src/lib/generated/classes/use-catalogs.ts b/src/lib/generated/classes/use-catalogs.ts new file mode 100644 index 00000000..47fe2bc6 --- /dev/null +++ b/src/lib/generated/classes/use-catalogs.ts @@ -0,0 +1,88 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/***************************************************************************************** + * + * /!\ This file is computer generated. Any manual modification can and will be lost. /!\ + * + *****************************************************************************************/ + +import { _Catalog } from './catalog'; +import { ObjectHydrator } from '../../hydrator'; +import { Specification } from '../definitions'; +import { getLifecycleHooks } from '../../lifecycle-hooks'; +import { validate } from '../../validation'; +import { isObject } from '../../utils'; + +/** + * Represents the intersection between the UseCatalogs class and type + */ +export type UseCatalogsIntersection = UseCatalogs & Specification.UseCatalogs; + +/** + * Represents a constructor for the intersection of the UseCatalogs class and type + */ +export interface UseCatalogsConstructor { + new (model?: Partial): UseCatalogsIntersection; +} + +/** + * Represents a UseCatalogs with methods for validation and normalization. + * Inherits from ObjectHydrator which provides functionality for hydrating the state based on a model. + */ +export class UseCatalogs extends ObjectHydrator { + /** + * Instanciates a new instance of the UseCatalogs class. + * Initializes properties based on the provided model if it is an object. + * + * @param model - Optional partial model object to initialize the UseCatalogs. + */ + constructor(model?: Partial) { + super(model); + const self = this as unknown as Specification.UseCatalogs & object; + if (isObject(model)) { + const knownProperties: string[] = []; + Object.entries(model) + .filter(([key]) => !knownProperties.includes(key)) + .forEach(([key, value]) => { + self[key] = new _Catalog(value); + }); + } + getLifecycleHooks('UseCatalogs')?.constructor?.(this); + } + + /** + * Validates the current instance of the UseCatalogs. + * Throws if invalid. + */ + validate(workflow?: Partial) { + const copy = new UseCatalogs(this as any) as UseCatalogsIntersection; + validate('UseCatalogs', copy, workflow); + } + + /** + * Normalizes the current instance of the UseCatalogs. + * Creates a copy of the UseCatalogs, invokes normalization hooks if available, and returns the normalized copy. + * + * @returns A normalized version of the UseCatalogs instance. + */ + normalize(): UseCatalogs & Specification.UseCatalogs { + const copy = new UseCatalogs(this as any) as UseCatalogsIntersection; + return getLifecycleHooks('UseCatalogs')?.normalize?.(copy) || copy; + } +} + +export const _UseCatalogs = UseCatalogs as UseCatalogsConstructor; diff --git a/src/lib/generated/classes/use.ts b/src/lib/generated/classes/use.ts index 6ff1dfd1..6af0c916 100644 --- a/src/lib/generated/classes/use.ts +++ b/src/lib/generated/classes/use.ts @@ -26,6 +26,7 @@ import { _UseExtensions } from './use-extensions'; import { _UseFunctions } from './use-functions'; import { _UseRetries } from './use-retries'; import { _UseTimeouts } from './use-timeouts'; +import { _UseCatalogs } from './use-catalogs'; import { ObjectHydrator } from '../../hydrator'; import { Specification } from '../definitions'; import { getLifecycleHooks } from '../../lifecycle-hooks'; @@ -66,6 +67,7 @@ export class Use extends ObjectHydrator { if (typeof model.functions === 'object') self.functions = new _UseFunctions(model.functions); if (typeof model.retries === 'object') self.retries = new _UseRetries(model.retries); if (typeof model.timeouts === 'object') self.timeouts = new _UseTimeouts(model.timeouts); + if (typeof model.catalogs === 'object') self.catalogs = new _UseCatalogs(model.catalogs); } getLifecycleHooks('Use')?.constructor?.(this); } diff --git a/src/lib/generated/definitions/specification.ts b/src/lib/generated/definitions/specification.ts index d913605a..fd1b22b9 100644 --- a/src/lib/generated/definitions/specification.ts +++ b/src/lib/generated/definitions/specification.ts @@ -27,15 +27,16 @@ export type Schema = SchemaInline | SchemaExternal; /** * Represents an endpoint. */ -export type Endpoint = RuntimeExpression | string | EndpointConfiguration; +export type Endpoint = RuntimeExpression | UriTemplate | EndpointConfiguration; /** * A runtime expression. */ export type RuntimeExpression = string; +export type UriTemplate = string; /** * The endpoint's URI. */ -export type EndpointUri = RuntimeExpression; +export type EndpointUri = UriTemplate | RuntimeExpression; /** * Represents a referenceable authentication policy. */ @@ -103,7 +104,7 @@ export type InputFrom = /** * A URI reference that identifies the error type. */ -export type ErrorType = RuntimeExpression; +export type ErrorType = UriTemplate | RuntimeExpression; /** * A JSON Pointer used to reference the component the error originates from. */ @@ -221,7 +222,7 @@ export type EmitTask = TaskBase & { /** * Identifies the context in which an event happened. */ -export type EventSource = RuntimeExpression; +export type EventSource = UriTemplate | RuntimeExpression; /** * When the event occured. */ @@ -229,7 +230,7 @@ export type EventTime = RuntimeExpression; /** * The schema describing the event format. */ -export type EventDataschema = RuntimeExpression; +export type EventDataschema = UriTemplate | RuntimeExpression; /** * Allows workflows to iterate over a collection of items, executing a defined set of subtasks for each item in the collection. This task type is instrumental in handling scenarios such as batch processing, data transformation, and repetitive operations across datasets. */ @@ -520,10 +521,7 @@ export interface OAuth2AuthenticationPolicy { * Inline configuration of the OAuth2 authentication policy. */ export interface OAuth2AutenthicationData { - /** - * The URI that references the OAuth2 authority to use. - */ - authority?: string; + authority?: UriTemplate; /** * The grant type to use. */ @@ -620,10 +618,7 @@ export interface OpenIdConnectAuthenticationPolicy { * Inline configuration of the OAuth2 authentication policy. */ export interface OpenIdConnectAuthenticationProperties { - /** - * The URI that references the OAuth2 authority to use. - */ - authority?: string; + authority?: UriTemplate; /** * The grant type to use. */ @@ -660,6 +655,7 @@ export interface Use { retries?: UseRetries; secrets?: UseSecrets; timeouts?: UseTimeouts; + catalogs?: UseCatalogs; } /** * The workflow's reusable authentication policies. @@ -1304,6 +1300,18 @@ export interface UseRetries { export interface UseTimeouts { [k: string]: Timeout; } +/** + * The workflow's reusable catalogs. + */ +export interface UseCatalogs { + [k: string]: Catalog; +} +/** + * The definition of a resource catalog + */ +export interface Catalog { + endpoint: Endpoint; +} /** * Schedules the workflow. */ diff --git a/src/lib/generated/schema/__internal_workflow.json b/src/lib/generated/schema/__internal_workflow.json index e01dbe07..d33df4b9 100644 --- a/src/lib/generated/schema/__internal_workflow.json +++ b/src/lib/generated/schema/__internal_workflow.json @@ -1,5 +1,5 @@ { - "$id": "https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json", + "$id": "https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "Serverless Workflow DSL - Workflow Schema.", "type": "object", @@ -136,6 +136,14 @@ "additionalProperties": { "$ref": "#/$defs/timeout" } + }, + "catalogs": { + "type": "object", + "title": "UseCatalogs", + "description": "The workflow's reusable catalogs.", + "additionalProperties": { + "$ref": "#/$defs/catalog" + } } } }, @@ -1490,9 +1498,10 @@ "description": "Inline configuration of the OAuth2 authentication policy.", "properties": { "authority": { - "type": "string", - "format": "uri-template", - "description": "The URI that references the OAuth2 authority to use." + "$ref": "#/$defs/uriTemplate", + "title": "OAuth2AutenthicationDataAuthority", + "description": "The URI that references the OAuth2 authority to use.", + "type": "object" }, "grant": { "type": "string", @@ -1668,13 +1677,14 @@ "description": "A URI reference that identifies the error type.", "oneOf": [ { + "title": "LiteralErrorType", + "$ref": "#/$defs/uriTemplate", "description": "The literal error type.", - "type": "string", - "format": "uri-template" + "type": "object" }, { - "$ref": "#/$defs/runtimeExpression", "title": "ExpressionErrorType", + "$ref": "#/$defs/runtimeExpression", "description": "An expression based error type.", "type": "object" } @@ -1715,6 +1725,21 @@ "status" ] }, + "uriTemplate": { + "title": "UriTemplate", + "anyOf": [ + { + "type": "string", + "format": "uri-template", + "pattern": "^[A-Za-z][A-Za-z0-9+\\-.]*://.*" + }, + { + "type": "string", + "format": "uri", + "pattern": "^[A-Za-z][A-Za-z0-9+\\-.]*://.*" + } + ] + }, "endpoint": { "title": "Endpoint", "description": "Represents an endpoint.", @@ -1724,8 +1749,8 @@ "type": "object" }, { - "type": "string", - "format": "uri-template" + "$ref": "#/$defs/uriTemplate", + "type": "object" }, { "title": "EndpointConfiguration", @@ -1737,13 +1762,14 @@ "description": "The endpoint's URI.", "oneOf": [ { + "title": "LiteralEndpointURI", "description": "The literal endpoint's URI.", - "type": "string", - "format": "uri-template" + "$ref": "#/$defs/uriTemplate", + "type": "object" }, { - "$ref": "#/$defs/runtimeExpression", "title": "ExpressionEndpointURI", + "$ref": "#/$defs/runtimeExpression", "description": "An expression based endpoint's URI.", "type": "object" } @@ -1776,8 +1802,8 @@ "description": "Identifies the context in which an event happened.", "oneOf": [ { - "type": "string", - "format": "uri-template" + "$ref": "#/$defs/uriTemplate", + "type": "object" }, { "$ref": "#/$defs/runtimeExpression", @@ -1816,13 +1842,14 @@ "description": "The schema describing the event format.", "oneOf": [ { + "title": "LiteralDataSchema", + "$ref": "#/$defs/uriTemplate", "description": "The literal event data schema.", - "type": "string", - "format": "uri-template" + "type": "object" }, { - "$ref": "#/$defs/runtimeExpression", "title": "ExpressionDataSchema", + "$ref": "#/$defs/runtimeExpression", "description": "An expression based event data schema.", "type": "object" } @@ -2255,6 +2282,23 @@ "after" ] }, + "catalog": { + "type": "object", + "title": "Catalog", + "description": "The definition of a resource catalog", + "unevaluatedProperties": false, + "properties": { + "endpoint": { + "$ref": "#/$defs/endpoint", + "title": "CatalogEndpoint", + "description": "The root URL where the catalog is hosted", + "type": "object" + } + }, + "required": [ + "endpoint" + ] + }, "runtimeExpression": { "type": "string", "title": "RuntimeExpression", diff --git a/src/lib/generated/schema/workflow.json b/src/lib/generated/schema/workflow.json index 6599050d..59616c26 100644 --- a/src/lib/generated/schema/workflow.json +++ b/src/lib/generated/schema/workflow.json @@ -1,5 +1,5 @@ { - "$id": "https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json", + "$id": "https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json", "$schema": "https://json-schema.org/draft/2020-12/schema", "description": "Serverless Workflow DSL - Workflow Schema.", "type": "object", @@ -141,6 +141,14 @@ "additionalProperties": { "$ref": "#/$defs/timeout" } + }, + "catalogs": { + "type": "object", + "title": "UseCatalogs", + "description": "The workflow's reusable catalogs.", + "additionalProperties": { + "$ref": "#/$defs/catalog" + } } } }, @@ -1466,8 +1474,7 @@ "description": "Inline configuration of the OAuth2 authentication policy.", "properties": { "authority": { - "type": "string", - "format": "uri-template", + "$ref": "#/$defs/uriTemplate", "title": "OAuth2AutenthicationDataAuthority", "description": "The URI that references the OAuth2 authority to use." }, @@ -1659,13 +1666,12 @@ "oneOf": [ { "title": "LiteralErrorType", - "description": "The literal error type.", - "type": "string", - "format": "uri-template" + "$ref": "#/$defs/uriTemplate", + "description": "The literal error type." }, { - "$ref": "#/$defs/runtimeExpression", "title": "ExpressionErrorType", + "$ref": "#/$defs/runtimeExpression", "description": "An expression based error type." } ] @@ -1708,6 +1714,23 @@ "status" ] }, + "uriTemplate": { + "title": "UriTemplate", + "anyOf": [ + { + "title": "LiteralUriTemplate", + "type": "string", + "format": "uri-template", + "pattern": "^[A-Za-z][A-Za-z0-9+\\-.]*://.*" + }, + { + "title": "LiteralUri", + "type": "string", + "format": "uri", + "pattern": "^[A-Za-z][A-Za-z0-9+\\-.]*://.*" + } + ] + }, "endpoint": { "title": "Endpoint", "description": "Represents an endpoint.", @@ -1716,9 +1739,7 @@ "$ref": "#/$defs/runtimeExpression" }, { - "title": "LiteralEndpoint", - "type": "string", - "format": "uri-template" + "$ref": "#/$defs/uriTemplate" }, { "title": "EndpointConfiguration", @@ -1732,12 +1753,11 @@ { "title": "LiteralEndpointURI", "description": "The literal endpoint's URI.", - "type": "string", - "format": "uri-template" + "$ref": "#/$defs/uriTemplate" }, { - "$ref": "#/$defs/runtimeExpression", "title": "ExpressionEndpointURI", + "$ref": "#/$defs/runtimeExpression", "description": "An expression based endpoint's URI." } ] @@ -1769,9 +1789,7 @@ "description": "Identifies the context in which an event happened.", "oneOf": [ { - "title": "LiteralSource", - "type": "string", - "format": "uri-template" + "$ref": "#/$defs/uriTemplate" }, { "$ref": "#/$defs/runtimeExpression" @@ -1813,13 +1831,12 @@ "oneOf": [ { "title": "LiteralDataSchema", - "description": "The literal event data schema.", - "type": "string", - "format": "uri-template" + "$ref": "#/$defs/uriTemplate", + "description": "The literal event data schema." }, { - "$ref": "#/$defs/runtimeExpression", "title": "ExpressionDataSchema", + "$ref": "#/$defs/runtimeExpression", "description": "An expression based event data schema." } ] @@ -2236,6 +2253,22 @@ "after" ] }, + "catalog": { + "type": "object", + "title": "Catalog", + "description": "The definition of a resource catalog", + "unevaluatedProperties": false, + "properties": { + "endpoint": { + "$ref": "#/$defs/endpoint", + "title": "CatalogEndpoint", + "description": "The root URL where the catalog is hosted" + } + }, + "required": [ + "endpoint" + ] + }, "runtimeExpression": { "type": "string", "title": "RuntimeExpression", diff --git a/src/lib/generated/schema/workflow.yaml b/src/lib/generated/schema/workflow.yaml index 0c396fbf..7c53f7b4 100644 --- a/src/lib/generated/schema/workflow.yaml +++ b/src/lib/generated/schema/workflow.yaml @@ -1,4 +1,4 @@ -$id: https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.yaml +$id: https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.yaml $schema: https://json-schema.org/draft/2020-12/schema description: Serverless Workflow DSL - Workflow Schema. type: object @@ -115,6 +115,12 @@ properties: description: The workflow's reusable timeouts. additionalProperties: $ref: '#/$defs/timeout' + catalogs: + type: object + title: UseCatalogs + description: The workflow's reusable catalogs. + additionalProperties: + $ref: '#/$defs/catalog' do: $ref: '#/$defs/taskList' title: Do @@ -1179,8 +1185,7 @@ $defs: description: Inline configuration of the OAuth2 authentication policy. properties: authority: - type: string - format: uri-template + $ref: '#/$defs/uriTemplate' title: OAuth2AutenthicationDataAuthority description: The URI that references the OAuth2 authority to use. grant: @@ -1335,11 +1340,10 @@ $defs: description: A URI reference that identifies the error type. oneOf: - title: LiteralErrorType + $ref: '#/$defs/uriTemplate' description: The literal error type. - type: string - format: uri-template - - $ref: '#/$defs/runtimeExpression' - title: ExpressionErrorType + - title: ExpressionErrorType + $ref: '#/$defs/runtimeExpression' description: An expression based error type. status: type: integer @@ -1371,14 +1375,23 @@ $defs: required: - type - status + uriTemplate: + title: UriTemplate + anyOf: + - title: LiteralUriTemplate + type: string + format: uri-template + pattern: ^[A-Za-z][A-Za-z0-9+\-.]*://.* + - title: LiteralUri + type: string + format: uri + pattern: ^[A-Za-z][A-Za-z0-9+\-.]*://.* endpoint: title: Endpoint description: Represents an endpoint. oneOf: - $ref: '#/$defs/runtimeExpression' - - title: LiteralEndpoint - type: string - format: uri-template + - $ref: '#/$defs/uriTemplate' - title: EndpointConfiguration type: object unevaluatedProperties: false @@ -1389,10 +1402,9 @@ $defs: oneOf: - title: LiteralEndpointURI description: The literal endpoint's URI. - type: string - format: uri-template - - $ref: '#/$defs/runtimeExpression' - title: ExpressionEndpointURI + $ref: '#/$defs/uriTemplate' + - title: ExpressionEndpointURI + $ref: '#/$defs/runtimeExpression' description: An expression based endpoint's URI. authentication: $ref: '#/$defs/referenceableAuthenticationPolicy' @@ -1413,9 +1425,7 @@ $defs: title: EventSource description: Identifies the context in which an event happened. oneOf: - - title: LiteralSource - type: string - format: uri-template + - $ref: '#/$defs/uriTemplate' - $ref: '#/$defs/runtimeExpression' type: type: string @@ -1447,11 +1457,10 @@ $defs: description: The schema describing the event format. oneOf: - title: LiteralDataSchema + $ref: '#/$defs/uriTemplate' description: The literal event data schema. - type: string - format: uri-template - - $ref: '#/$defs/runtimeExpression' - title: ExpressionDataSchema + - title: ExpressionDataSchema + $ref: '#/$defs/runtimeExpression' description: An expression based event data schema. additionalProperties: true eventConsumptionStrategy: @@ -1777,6 +1786,18 @@ $defs: description: The duration after which to timeout. required: - after + catalog: + type: object + title: Catalog + description: The definition of a resource catalog + unevaluatedProperties: false + properties: + endpoint: + $ref: '#/$defs/endpoint' + title: CatalogEndpoint + description: The root URL where the catalog is hosted + required: + - endpoint runtimeExpression: type: string title: RuntimeExpression diff --git a/src/lib/generated/validation/validation-pointers.ts b/src/lib/generated/validation/validation-pointers.ts index ebbc0e90..003b67f1 100644 --- a/src/lib/generated/validation/validation-pointers.ts +++ b/src/lib/generated/validation/validation-pointers.ts @@ -24,242 +24,245 @@ * A map of type names and their corresponding schema */ export const validationPointers = { - Workflow: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#', + Workflow: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#', AllEventConsumptionStrategy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventConsumptionStrategy/oneOf/0', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/eventConsumptionStrategy/oneOf/0', AllEventConsumptionStrategyConfiguration: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventConsumptionStrategy/oneOf/0/properties/all', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/eventConsumptionStrategy/oneOf/0/properties/all', AnyEventConsumptionStrategy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventConsumptionStrategy/oneOf/1', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/eventConsumptionStrategy/oneOf/1', AnyEventConsumptionStrategyConfiguration: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventConsumptionStrategy/oneOf/1/properties/any', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/eventConsumptionStrategy/oneOf/1/properties/any', AsyncApiArguments: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/0/properties/with', - AuthenticationPolicy: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/callTask/oneOf/0/properties/with', + AuthenticationPolicy: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/authenticationPolicy', AuthenticationPolicyReference: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/referenceableAuthenticationPolicy/oneOf/0', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/referenceableAuthenticationPolicy/oneOf/0', BasicAuthenticationPolicy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/0', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/authenticationPolicy/oneOf/0', BasicAuthenticationPolicyConfiguration: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/0/properties/basic', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/authenticationPolicy/oneOf/0/properties/basic', BasicAuthenticationProperties: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/0/properties/basic/oneOf/0', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/authenticationPolicy/oneOf/0/properties/basic/oneOf/0', BearerAuthenticationPolicy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/1', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/authenticationPolicy/oneOf/1', BearerAuthenticationPolicyConfiguration: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/1/properties/bearer', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/authenticationPolicy/oneOf/1/properties/bearer', BearerAuthenticationProperties: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/1/properties/bearer/oneOf/0', - CallAsyncAPI: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/0', - CallFunction: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/4', - CallGRPC: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/1', - CallHTTP: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/2', - CallOpenAPI: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/3', - CallTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/authenticationPolicy/oneOf/1/properties/bearer/oneOf/0', + CallAsyncAPI: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/callTask/oneOf/0', + CallFunction: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/callTask/oneOf/4', + CallGRPC: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/callTask/oneOf/1', + CallHTTP: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/callTask/oneOf/2', + CallOpenAPI: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/callTask/oneOf/3', + CallTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/callTask', + Catalog: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/catalog', CatchErrors: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/tryTask/properties/catch/properties/errors', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/tryTask/properties/catch/properties/errors', ConstantBackoff: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/retryPolicy/properties/backoff/oneOf/0', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/retryPolicy/properties/backoff/oneOf/0', Container: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/0/properties/container', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runTask/properties/run/oneOf/0/properties/container', ContainerEnvironment: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/0/properties/container/properties/environment', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runTask/properties/run/oneOf/0/properties/container/properties/environment', ContainerPorts: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/0/properties/container/properties/ports', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runTask/properties/run/oneOf/0/properties/container/properties/ports', ContainerVolumes: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/0/properties/container/properties/volumes', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runTask/properties/run/oneOf/0/properties/container/properties/volumes', DigestAuthenticationPolicy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/2', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/authenticationPolicy/oneOf/2', DigestAuthenticationPolicyConfiguration: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/2/properties/digest', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/authenticationPolicy/oneOf/2/properties/digest', DigestAuthenticationProperties: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/2/properties/digest/oneOf/0', - Document: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/document', - DoTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/doTask', - Duration: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/duration', - DurationInline: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/duration/oneOf/0', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/authenticationPolicy/oneOf/2/properties/digest/oneOf/0', + Document: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/properties/document', + DoTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/doTask', + Duration: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/duration', + DurationInline: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/duration/oneOf/0', EmitEventDefinition: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/emitTask/properties/emit/properties/event', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/emitTask/properties/emit/properties/event', EmitEventWith: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/emitTask/properties/emit/properties/event/properties/with', - EmitTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/emitTask', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/emitTask/properties/emit/properties/event/properties/with', + EmitTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/emitTask', EmitTaskConfiguration: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/emitTask/properties/emit', - Endpoint: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/endpoint', - EndpointConfiguration: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/endpoint/oneOf/2', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/emitTask/properties/emit', + Endpoint: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/endpoint', + EndpointConfiguration: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/endpoint/oneOf/2', EndpointUri: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/endpoint/oneOf/2/properties/uri', - Error: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/error', - ErrorInstance: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/error/properties/instance', - ErrorType: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/error/properties/type', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/endpoint/oneOf/2/properties/uri', + Error: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/error', + ErrorInstance: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/error/properties/instance', + ErrorType: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/error/properties/type', EventConsumptionStrategy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventConsumptionStrategy', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/eventConsumptionStrategy', EventDataschema: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventProperties/properties/dataschema', - EventFilter: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventFilter', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/eventProperties/properties/dataschema', + EventFilter: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/eventFilter', EventFilterCorrelate: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventFilter/properties/correlate', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/eventFilter/properties/correlate', EventSource: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventProperties/properties/source', - EventTime: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventProperties/properties/time', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/eventProperties/properties/source', + EventTime: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/eventProperties/properties/time', ExponentialBackOff: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/retryPolicy/properties/backoff/oneOf/1', - Export: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/export', - ExportAs: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/export/properties/as', - Extension: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/extension', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/retryPolicy/properties/backoff/oneOf/1', + Export: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/export', + ExportAs: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/export/properties/as', + Extension: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/extension', ExtensionItem: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/use/properties/extensions/items', - ExternalResource: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/externalResource', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/properties/use/properties/extensions/items', + ExternalResource: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/externalResource', ExternalScript: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/1/properties/script/oneOf/1', - FlowDirective: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/flowDirective', - ForkTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/forkTask', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runTask/properties/run/oneOf/1/properties/script/oneOf/1', + FlowDirective: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/flowDirective', + ForkTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/forkTask', ForkTaskConfiguration: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/forkTask/properties/fork', - ForTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/forTask', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/forkTask/properties/fork', + ForTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/forTask', ForTaskConfiguration: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/forTask/properties/for', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/forTask/properties/for', FunctionArguments: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/4/properties/with', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/callTask/oneOf/4/properties/with', GRPCArguments: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/1/properties/with', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/callTask/oneOf/1/properties/with', HTTPArguments: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/2/properties/with', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/callTask/oneOf/2/properties/with', InlineScript: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/1/properties/script/oneOf/0', - Input: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/input', - InputFrom: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/input/properties/from', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runTask/properties/run/oneOf/1/properties/script/oneOf/0', + Input: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/properties/input', + InputFrom: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/input/properties/from', LinearBackoff: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/retryPolicy/properties/backoff/oneOf/2', - ListenTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/listenTask', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/retryPolicy/properties/backoff/oneOf/2', + ListenTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/listenTask', ListenTaskConfiguration: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/listenTask/properties/listen', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/listenTask/properties/listen', OAuth2AutenthicationData: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/oauth2AuthenticationProperties', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/oauth2AuthenticationProperties', OAuth2AutenthicationDataAudiences: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/oauth2AuthenticationProperties/properties/audiences', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/oauth2AuthenticationProperties/properties/audiences', OAuth2AutenthicationDataClient: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/oauth2AuthenticationProperties/properties/client', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/oauth2AuthenticationProperties/properties/client', OAuth2AutenthicationDataScopes: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/oauth2AuthenticationProperties/properties/scopes', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/oauth2AuthenticationProperties/properties/scopes', OAuth2AuthenticationPolicy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/3', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/authenticationPolicy/oneOf/3', OAuth2AuthenticationPolicyConfiguration: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/3/properties/oauth2', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/authenticationPolicy/oneOf/3/properties/oauth2', OAuth2AuthenticationPropertiesEndpoints: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/3/properties/oauth2/oneOf/0/allOf/1/properties/endpoints', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/authenticationPolicy/oneOf/3/properties/oauth2/oneOf/0/allOf/1/properties/endpoints', OAuth2ConnectAuthenticationProperties: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/3/properties/oauth2/oneOf/0', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/authenticationPolicy/oneOf/3/properties/oauth2/oneOf/0', OAuth2Issuers: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/oauth2AuthenticationProperties/properties/issuers', - OAuth2TokenDefinition: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/oauth2Token', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/oauth2AuthenticationProperties/properties/issuers', + OAuth2TokenDefinition: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/oauth2Token', OAuth2TokenRequest: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/oauth2AuthenticationProperties/properties/request', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/oauth2AuthenticationProperties/properties/request', OneEventConsumptionStrategy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventConsumptionStrategy/oneOf/2', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/eventConsumptionStrategy/oneOf/2', OpenAPIArguments: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/3/properties/with', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/callTask/oneOf/3/properties/with', OpenIdConnectAuthenticationPolicy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/4', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/authenticationPolicy/oneOf/4', OpenIdConnectAuthenticationPolicyConfiguration: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/4/properties/oidc', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/authenticationPolicy/oneOf/4/properties/oidc', OpenIdConnectAuthenticationProperties: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/authenticationPolicy/oneOf/4/properties/oidc/oneOf/0', - Output: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/output', - OutputAs: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/output/properties/as', - RaiseTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/raiseTask', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/authenticationPolicy/oneOf/4/properties/oidc/oneOf/0', + Output: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/properties/output', + OutputAs: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/output/properties/as', + RaiseTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/raiseTask', RaiseTaskConfiguration: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/raiseTask/properties/raise', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/raiseTask/properties/raise', RaiseTaskRaiseError: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/raiseTask/properties/raise/properties/error', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/raiseTask/properties/raise/properties/error', ReferenceableAuthenticationPolicy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/referenceableAuthenticationPolicy', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/referenceableAuthenticationPolicy', RetryBackoff: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/retryPolicy/properties/backoff', - RetryLimit: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/retryPolicy/properties/limit', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/retryPolicy/properties/backoff', + RetryLimit: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/retryPolicy/properties/limit', RetryLimitAttempt: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/retryPolicy/properties/limit/properties/attempt', - RetryPolicy: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/retryPolicy', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/retryPolicy/properties/limit/properties/attempt', + RetryPolicy: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/retryPolicy', RetryPolicyJitter: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/retryPolicy/properties/jitter', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/retryPolicy/properties/jitter', RunContainer: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/0', - RunScript: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/1', - RunShell: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/2', - RunTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runTask/properties/run/oneOf/0', + RunScript: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runTask/properties/run/oneOf/1', + RunShell: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runTask/properties/run/oneOf/2', + RunTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runTask', RunTaskConfiguration: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run', - RuntimeExpression: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runtimeExpression', - RunWorkflow: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/3', - Schedule: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/schedule', - Schema: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/schema', - SchemaExternal: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/schema/oneOf/1', - SchemaInline: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/schema/oneOf/0', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runTask/properties/run', + RuntimeExpression: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runtimeExpression', + RunWorkflow: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runTask/properties/run/oneOf/3', + Schedule: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/properties/schedule', + Schema: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/schema', + SchemaExternal: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/schema/oneOf/1', + SchemaInline: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/schema/oneOf/0', Script: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/1/properties/script', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runTask/properties/run/oneOf/1/properties/script', SecretBasedAuthenticationPolicy: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/secretBasedAuthenticationPolicy', - SetTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/setTask', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/secretBasedAuthenticationPolicy', + SetTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/setTask', SetTaskConfiguration: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/setTask/properties/set', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/setTask/properties/set', Shell: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/2/properties/shell', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runTask/properties/run/oneOf/2/properties/shell', ShellArguments: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/2/properties/shell/properties/arguments', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runTask/properties/run/oneOf/2/properties/shell/properties/arguments', ShellEnvironment: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/2/properties/shell/properties/environment', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runTask/properties/run/oneOf/2/properties/shell/properties/environment', SubflowConfiguration: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/3/properties/workflow', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runTask/properties/run/oneOf/3/properties/workflow', SubflowInput: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/runTask/properties/run/oneOf/3/properties/workflow/properties/input', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/runTask/properties/run/oneOf/3/properties/workflow/properties/input', SwitchCase: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/switchTask/properties/switch/items/additionalProperties', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/switchTask/properties/switch/items/additionalProperties', SwitchItem: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/switchTask/properties/switch/items', - SwitchTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/switchTask', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/switchTask/properties/switch/items', + SwitchTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/switchTask', SwitchTaskConfiguration: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/switchTask/properties/switch', - Task: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/task', - TaskBase: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/taskBase', - TaskBaseIf: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/taskBase/properties/if', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/switchTask/properties/switch', + Task: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/task', + TaskBase: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/taskBase', + TaskBaseIf: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/taskBase/properties/if', TaskBaseTimeout: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/taskBase/properties/timeout', - TaskItem: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/taskList/items', - TaskList: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/taskList', - TaskMetadata: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/taskBase/properties/metadata', - Timeout: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/timeout', - TryTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/tryTask', - TryTaskCatch: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/tryTask/properties/catch', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/taskBase/properties/timeout', + TaskItem: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/taskList/items', + TaskList: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/taskList', + TaskMetadata: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/taskBase/properties/metadata', + Timeout: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/timeout', + TryTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/tryTask', + TryTaskCatch: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/tryTask/properties/catch', TryTaskCatchRetry: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/tryTask/properties/catch/properties/retry', - Use: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/use', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/tryTask/properties/catch/properties/retry', + UriTemplate: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/uriTemplate', + Use: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/properties/use', UseAuthentications: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/use/properties/authentications', - UseErrors: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/use/properties/errors', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/properties/use/properties/authentications', + UseCatalogs: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/properties/use/properties/catalogs', + UseErrors: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/properties/use/properties/errors', UseExtensions: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/use/properties/extensions', - UseFunctions: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/use/properties/functions', - UseRetries: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/use/properties/retries', - UseSecrets: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/use/properties/secrets', - UseTimeouts: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/use/properties/timeouts', - WaitTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/waitTask', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/properties/use/properties/extensions', + UseFunctions: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/properties/use/properties/functions', + UseRetries: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/properties/use/properties/retries', + UseSecrets: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/properties/use/properties/secrets', + UseTimeouts: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/properties/use/properties/timeouts', + WaitTask: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/waitTask', WithAsyncAPIPayload: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/0/properties/with/properties/payload', - WithEvent: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/eventFilter/properties/with', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/callTask/oneOf/0/properties/with/properties/payload', + WithEvent: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/eventFilter/properties/with', WithGRPCArguments: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/1/properties/with/properties/arguments', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/callTask/oneOf/1/properties/with/properties/arguments', WithGRPCService: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/1/properties/with/properties/service', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/callTask/oneOf/1/properties/with/properties/service', WithHTTPBody: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/2/properties/with/properties/body', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/callTask/oneOf/2/properties/with/properties/body', WithHTTPHeaders: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/2/properties/with/properties/headers', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/callTask/oneOf/2/properties/with/properties/headers', WithHTTPQuery: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/2/properties/with/properties/query', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/callTask/oneOf/2/properties/with/properties/query', WithOpenAPIParameters: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/$defs/callTask/oneOf/3/properties/with/properties/parameters', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/$defs/callTask/oneOf/3/properties/with/properties/parameters', WorkflowMetadata: - 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/document/properties/metadata', - WorkflowTags: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/document/properties/tags', - WorkflowTimeout: 'https://serverlessworkflow.io/schemas/1.0.0-alpha3/workflow.json#/properties/timeout', + 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/properties/document/properties/metadata', + WorkflowTags: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/properties/document/properties/tags', + WorkflowTimeout: 'https://serverlessworkflow.io/schemas/1.0.0-alpha5/workflow.json#/properties/timeout', }; From fc5defdde46e29ed4aca652ae4673034f439221a Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Fri, 10 Jan 2025 17:32:10 +0100 Subject: [PATCH 23/24] Added examples - Readded browser and node examples - Added call async api/grpc/function tests Signed-off-by: Jean-Baptiste Bianchi --- README.md | 12 +-- examples/browser/index.html | 44 +++++++++++ examples/node/index.ts | 42 ++++++++++ examples/node/tsconfig.json | 3 + jest.config.js | 4 +- package-lock.json | 25 +++--- package.json | 2 +- src/lib/generated/classes/workflow.ts | 11 +-- tests/builders/call-async-api-builder.spec.ts | 70 +++++++++++++++++ tests/builders/call-function-builder.spec.ts | 76 +++++++++++++++++++ tests/builders/call-grpc-builder.spec.ts | 73 ++++++++++++++++++ .../workflow-serialization.spec.ts | 17 +++++ tools/4_generate-classes.ts | 15 ++-- 13 files changed, 364 insertions(+), 30 deletions(-) create mode 100644 examples/browser/index.html create mode 100644 examples/node/index.ts create mode 100644 examples/node/tsconfig.json create mode 100644 tests/builders/call-async-api-builder.spec.ts create mode 100644 tests/builders/call-function-builder.spec.ts create mode 100644 tests/builders/call-grpc-builder.spec.ts diff --git a/README.md b/README.md index 36de0505..5e6a1f30 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ The npm [`@serverlessworkflow/sdk`](https://www.npmjs.com/package/@serverlesswor | Latest Releases | Conformance to Spec Version | | :---: | :---: | -| [v1.0.0-alpha2.\*](https://github.com/serverlessworkflow/sdk-typescript/releases/) | [v1.0.0-alpha2](https://github.com/serverlessworkflow/specification) | +| [v1.0.0-alpha5.\*](https://github.com/serverlessworkflow/sdk-typescript/releases/) | [v1.0.0-alpha5](https://github.com/serverlessworkflow/specification) | > [!WARNING] > Previous versions of the SDK were published with a typo in the scope: @@ -58,7 +58,7 @@ The `validate` function is directly exported and can be used as `validate('Workf ### Installation > [!NOTE] -> Version v1.0.0-alpha2.\* has not been released yet. +> Version v1.0.0-alpha5.\* has not been released yet. ```sh npm install @serverlessworkflow/sdk @@ -75,7 +75,7 @@ import { Classes } from '@serverlessworkflow/sdk'; // const text = await fetch('https://myserver.com/my-workflow-definition.json'); const text = ` document: - dsl: 1.0.0-alpha2 + dsl: 1.0.0-alpha5 name: test version: 1.0.0 namespace: default @@ -96,7 +96,7 @@ import { Classes, Specification, validate } from '@serverlessworkflow/sdk'; // Simply cast an object: const workflowDefinition = { document: { - dsl: '1.0.0-alpha2', + dsl: '1.0.0-alpha5', name: 'test', version: '1.0.0', namespace: 'default', @@ -132,7 +132,7 @@ import { Classes, validate } from '@serverlessworkflow/sdk'; // Simply use the constructor const workflowDefinition = new Classes.Workflow({ document: { - dsl: '1.0.0-alpha2', + dsl: '1.0.0-alpha5', name: 'test', version: '1.0.0', namespace: 'default', @@ -175,7 +175,7 @@ import { documentBuilder, setTaskBuilder, taskListBuilder, workflowBuilder } fro const workflowDefinition = workflowBuilder(/*workflowDefinitionObject*/) .document( documentBuilder() - .dsl('1.0.0-alpha2') + .dsl('1.0.0-alpha5') .name('test') .version('1.0.0') .namespace('default') diff --git a/examples/browser/index.html b/examples/browser/index.html new file mode 100644 index 00000000..24a3976d --- /dev/null +++ b/examples/browser/index.html @@ -0,0 +1,44 @@ + + + + + + Serveless Workflow + + + + + +

+ + + + + \ No newline at end of file diff --git a/examples/node/index.ts b/examples/node/index.ts new file mode 100644 index 00000000..c141ea11 --- /dev/null +++ b/examples/node/index.ts @@ -0,0 +1,42 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { Classes } from '../../dist'; +const { Workflow } = Classes; + +const workflow = new Workflow({ + document: { + dsl: '1.0.0-alpha5', + name: 'test', + version: '1.0.0', + namespace: 'default', + }, + do: [ + { + step1: { + set: { + variable: 'my first workflow', + }, + }, + }, + ], +}); + +try { + workflow.validate(); + console.log(workflow.serialize('json')); +} catch (ex) { + console.error('Invalid workflow', ex); +} diff --git a/examples/node/tsconfig.json b/examples/node/tsconfig.json new file mode 100644 index 00000000..4280ce73 --- /dev/null +++ b/examples/node/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tsconfig.base.json" +} \ No newline at end of file diff --git a/jest.config.js b/jest.config.js index c24ec706..8b7fb4d5 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,7 +1,7 @@ -/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ +/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */ module.exports = { preset: 'ts-jest', testEnvironment: 'node', testPathIgnorePatterns: [".d.ts", ".js"], - modulePathIgnorePatterns: ['/dist/'], + modulePathIgnorePatterns: ['/dist/', '/out-tsc/'], }; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index eb7f6233..325da6b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@serverlessworkflow/sdk", - "version": "1.0.0-alpha3.0", + "version": "1.0.0-alpha5.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@serverlessworkflow/sdk", - "version": "1.0.0-alpha3.0", + "version": "1.0.0-alpha5.0", "license": "http://www.apache.org/licenses/LICENSE-2.0.txt", "dependencies": { "ajv": "^8.17.1", @@ -2669,10 +2669,11 @@ "dev": true }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -5354,10 +5355,11 @@ } }, "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, + "license": "MIT", "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -6174,10 +6176,11 @@ } }, "node_modules/rollup": { - "version": "2.79.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", - "integrity": "sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==", + "version": "2.79.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.2.tgz", + "integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==", "dev": true, + "license": "MIT", "bin": { "rollup": "dist/bin/rollup" }, diff --git a/package.json b/package.json index ad3e0654..d85e53da 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "verify-publish-directory": "node -e 'if (!process.cwd().endsWith(\"dist\")) { console.error(\"Packaging/Publishing should be done from ./dist/\"); process.exitCode = 1; } process.exit();'", "prepack": "npm run verify-publish-directory", "prepublishOnly": "npm run verify-publish-directory", - "prepublish": "husky install" + "prepublish": "husky" }, "dependencies": { "ajv": "^8.17.1", diff --git a/src/lib/generated/classes/workflow.ts b/src/lib/generated/classes/workflow.ts index 4d172765..f1c1b8bd 100644 --- a/src/lib/generated/classes/workflow.ts +++ b/src/lib/generated/classes/workflow.ts @@ -99,16 +99,17 @@ export class Workflow extends ObjectHydrator { } static serialize( - workflow: WorkflowIntersection, + model: Partial, format: 'yaml' | 'json' = 'yaml', normalize: boolean = true, ): string { + const workflow = new Workflow(model); workflow.validate(); - const model = normalize ? workflow.normalize() : workflow; + const normalized = normalize ? workflow.normalize() : workflow; if (format === 'json') { - return JSON.stringify(model); + return JSON.stringify(normalized); } - return yaml.dump(model); + return yaml.dump(normalized); } /** @@ -137,5 +138,5 @@ export const _Workflow = Workflow as WorkflowConstructor & { * @param normalize If the workflow should be normalized before serialization, default true * @returns A string representation of the workflow */ - serialize(workflow: WorkflowIntersection, format?: 'yaml' | 'json', normalize?: boolean): string; + serialize(workflow: Partial, format?: 'yaml' | 'json', normalize?: boolean): string; }; diff --git a/tests/builders/call-async-api-builder.spec.ts b/tests/builders/call-async-api-builder.spec.ts new file mode 100644 index 00000000..6792767e --- /dev/null +++ b/tests/builders/call-async-api-builder.spec.ts @@ -0,0 +1,70 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import { callAsyncAPIBuilder } from '../../src/lib/generated/builders'; +import { Classes } from '../../src/lib/generated/classes'; + +const document = { endpoint: 'https://example.com', name: 'example' }; +const operationRef = 'operationRef'; + +describe('CallAsyncAPI builder', () => { + it('should build with fluent api', () => { + const callAsyncAPI = callAsyncAPIBuilder() + .with({ + document, + operationRef, + }) + .build(); + expect(callAsyncAPI).toBeDefined(); + expect(callAsyncAPI).toBeInstanceOf(Classes.CallAsyncAPI); + expect(callAsyncAPI.call).toBe('asyncapi'); + expect(callAsyncAPI.with).toBeDefined(); + expect(callAsyncAPI.with!.document).toEqual(document); + expect(callAsyncAPI.with!.operationRef).toBe(operationRef); + }); + + it('should build with input', () => { + const data = { + with: { + document, + operationRef, + }, + }; + const callAsyncAPI = callAsyncAPIBuilder(data).build(); + expect(callAsyncAPI).toBeDefined(); + expect(callAsyncAPI).toBeInstanceOf(Classes.CallAsyncAPI); + expect(callAsyncAPI.call).toBe('asyncapi'); + expect(callAsyncAPI.with).toBeDefined(); + expect(callAsyncAPI.with!.document).toEqual(document); + expect(callAsyncAPI.with!.operationRef).toBe(operationRef); + }); + + it('should throw when invalid', () => { + const test = () => { + callAsyncAPIBuilder().build(); + }; + expect(test).toThrow(Error); + expect(test).toThrow(/'CallAsyncAPI' is invalid/); + }); + + it('should not throw when validation is disabled', () => { + const test = () => { + callAsyncAPIBuilder().build({ validate: false }); + }; + expect(test).not.toThrow(); + }); +}); diff --git a/tests/builders/call-function-builder.spec.ts b/tests/builders/call-function-builder.spec.ts new file mode 100644 index 00000000..3ab60ed9 --- /dev/null +++ b/tests/builders/call-function-builder.spec.ts @@ -0,0 +1,76 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import { callFunctionBuilder } from '../../src/lib/generated/builders'; +import { Classes } from '../../src/lib/generated/classes'; + +const functionName = 'exampleFunction'; +const functionArgs = { arg1: 'value1', arg2: 'value2' }; + +describe('CallFunction builder', () => { + it('should build with fluent api', () => { + const callFunction = callFunctionBuilder().call(functionName).build(); + expect(callFunction).toBeDefined(); + expect(callFunction).toBeInstanceOf(Classes.CallFunction); + expect(callFunction.call).toBe(functionName); + }); + + it('should build with input', () => { + const data = { + call: functionName, + }; + const callFunction = callFunctionBuilder(data).build(); + expect(callFunction).toBeDefined(); + expect(callFunction).toBeInstanceOf(Classes.CallFunction); + expect(callFunction.call).toBe(functionName); + }); + + it('should build with function arguments', () => { + const callFunction = callFunctionBuilder().call(functionName).with(functionArgs).build(); + expect(callFunction).toBeDefined(); + expect(callFunction).toBeInstanceOf(Classes.CallFunction); + expect(callFunction.call).toBe(functionName); + expect(callFunction.with).toEqual(functionArgs); + }); + + it('should build with input and function arguments', () => { + const data = { + call: functionName, + with: functionArgs, + }; + const callFunction = callFunctionBuilder(data).build(); + expect(callFunction).toBeDefined(); + expect(callFunction).toBeInstanceOf(Classes.CallFunction); + expect(callFunction.call).toBe(functionName); + expect(callFunction.with).toEqual(functionArgs); + }); + + it('should throw when invalid', () => { + const test = () => { + callFunctionBuilder().build(); + }; + expect(test).toThrow(Error); + expect(test).toThrow(/'CallFunction' is invalid/); + }); + + it('should not throw when validation is disabled', () => { + const test = () => { + callFunctionBuilder().build({ validate: false }); + }; + expect(test).not.toThrow(); + }); +}); diff --git a/tests/builders/call-grpc-builder.spec.ts b/tests/builders/call-grpc-builder.spec.ts new file mode 100644 index 00000000..13deaa81 --- /dev/null +++ b/tests/builders/call-grpc-builder.spec.ts @@ -0,0 +1,73 @@ +/* + * Copyright 2021-Present The Serverless Workflow Specification Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +import { callGRPCBuilder } from '../../src/lib/generated/builders'; +import { Classes } from '../../src/lib/generated/classes'; + +const proto = { name: 'foo', endpoint: 'http://proto.com' }; +const service = { name: 'MyService', host: 'Host' }; +const method = 'MyMethod'; + +describe('CallGRPC builder', () => { + it('should build with fluent api', () => { + const callGrpc = callGRPCBuilder() + .with({ + proto, + service, + method, + }) + .build(); + expect(callGrpc).toBeDefined(); + expect(callGrpc).toBeInstanceOf(Classes.CallGRPC); + expect(callGrpc.call).toBe('grpc'); + expect(callGrpc.with).toBeDefined(); + expect(callGrpc.with!.service).toEqual(service); + expect(callGrpc.with!.method).toBe(method); + }); + + it('should build with input', () => { + const data = { + with: { + proto, + service, + method, + }, + }; + const callGrpc = callGRPCBuilder(data).build(); + expect(callGrpc).toBeDefined(); + expect(callGrpc).toBeInstanceOf(Classes.CallGRPC); + expect(callGrpc.call).toBe('grpc'); + expect(callGrpc.with).toBeDefined(); + expect(callGrpc.with!.service).toEqual(service); + expect(callGrpc.with!.method).toBe(method); + }); + + it('should throw when invalid', () => { + const test = () => { + callGRPCBuilder().build(); + }; + expect(test).toThrow(Error); + expect(test).toThrow(/'CallGRPC' is invalid/); + }); + + it('should not throw when validation is disabled', () => { + const test = () => { + callGRPCBuilder().build({ validate: false }); + }; + expect(test).not.toThrow(); + }); +}); diff --git a/tests/serialization/workflow-serialization.spec.ts b/tests/serialization/workflow-serialization.spec.ts index 09d53937..903968f9 100644 --- a/tests/serialization/workflow-serialization.spec.ts +++ b/tests/serialization/workflow-serialization.spec.ts @@ -19,6 +19,7 @@ import { Specification } from '../../src/lib/generated/definitions'; import { Classes } from '../../src/lib/generated/classes'; import { schemaVersion } from '../../package.json'; +import { documentBuilder, setTaskBuilder, taskListBuilder, workflowBuilder } from '../../src'; describe('Workflow (de)serialization', () => { it('should deserialize JSON', () => { @@ -91,4 +92,20 @@ describe('Workflow (de)serialization', () => { const serialized = workflow.serialize('json'); expect(serialized).toEqual(expected); }); + + it('should serialize as JSON from from static method from fluently built workflow', () => { + const workflow = workflowBuilder() + .document(documentBuilder().dsl('1.0.0-alpha5').name('test').version('1.0.0').namespace('default').build()) + .do( + taskListBuilder() + .push({ + step1: setTaskBuilder().set({ foo: 'bar' }).build(), + }) + .build(), + ) + .build(); + const expected = JSON.stringify(workflow); + const serialized = Classes.Workflow.serialize(workflow, 'json'); + expect(serialized).toEqual(expected); + }); }); diff --git a/tools/4_generate-classes.ts b/tools/4_generate-classes.ts index 7d1a2c19..b7b0ccd2 100644 --- a/tools/4_generate-classes.ts +++ b/tools/4_generate-classes.ts @@ -112,13 +112,18 @@ export class ${name} extends ${baseClass ? '_' + baseClass : `ObjectHydrator, + format: 'yaml' | 'json' = 'yaml', + normalize: boolean = true, + ): string { + const workflow = new Workflow(model); workflow.validate(); - const model = normalize ? workflow.normalize() : workflow; + const normalized = normalize ? workflow.normalize() : workflow; if (format === 'json') { - return JSON.stringify(model); + return JSON.stringify(normalized); } - return yaml.dump(model); + return yaml.dump(normalized); } /** @@ -151,7 +156,7 @@ export const _${name} = ${name} as ${name}Constructor${ * @param normalize If the workflow should be normalized before serialization, default true * @returns A string representation of the workflow */ - serialize(workflow: WorkflowIntersection, format?: 'yaml' | 'json', normalize?: boolean): string + serialize(workflow: Partial, format?: 'yaml' | 'json', normalize?: boolean): string }` : '' };`; From 9760570d2a3eea5629b54eb307710ca1e62792ef Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Bianchi Date: Mon, 13 Jan 2025 14:49:25 +0100 Subject: [PATCH 24/24] Fixed builders output type - Fixed the builders output type - Added more samples Signed-off-by: Jean-Baptiste Bianchi --- README.md | 2 + .../browser/{index.html => using-class.html} | 6 +- examples/browser/using-fluent-api.html | 36 +++++++++++ examples/browser/using-json.html | 40 ++++++++++++ examples/browser/using-plain-object.html | 45 +++++++++++++ examples/node/{index.ts => using-class.ts} | 6 +- examples/node/using-fluent-api.ts | 39 +++++++++++ examples/node/using-json.ts | 22 +++++++ examples/node/using-plain-object.ts | 27 ++++++++ src/lib/builder.ts | 41 ++++++------ .../all-event-consumption-strategy-builder.ts | 15 +++-- ...sumption-strategy-configuration-builder.ts | 18 +++--- .../any-event-consumption-strategy-builder.ts | 15 +++-- ...sumption-strategy-configuration-builder.ts | 18 +++--- .../builders/async-api-arguments-builder.ts | 14 ++-- .../builders/authentication-policy-builder.ts | 14 ++-- ...authentication-policy-reference-builder.ts | 15 +++-- .../basic-authentication-policy-builder.ts | 15 +++-- ...entication-policy-configuration-builder.ts | 21 ++++-- ...basic-authentication-properties-builder.ts | 15 +++-- .../bearer-authentication-policy-builder.ts | 15 +++-- ...entication-policy-configuration-builder.ts | 21 ++++-- ...earer-authentication-properties-builder.ts | 15 +++-- .../builders/call-async-api-builder.ts | 17 +++-- .../builders/call-function-builder.ts | 17 +++-- .../generated/builders/call-grpc-builder.ts | 17 +++-- .../generated/builders/call-http-builder.ts | 17 +++-- .../builders/call-open-api-builder.ts | 17 +++-- .../generated/builders/call-task-builder.ts | 17 +++-- src/lib/generated/builders/catalog-builder.ts | 17 +++-- .../builders/catch-errors-builder.ts | 17 +++-- .../builders/constant-backoff-builder.ts | 14 ++-- .../generated/builders/container-builder.ts | 17 +++-- .../builders/container-environment-builder.ts | 14 ++-- .../builders/container-ports-builder.ts | 14 ++-- .../builders/container-volumes-builder.ts | 14 ++-- .../digest-authentication-policy-builder.ts | 15 +++-- ...entication-policy-configuration-builder.ts | 21 ++++-- ...igest-authentication-properties-builder.ts | 15 +++-- src/lib/generated/builders/do-task-builder.ts | 17 +++-- .../generated/builders/document-builder.ts | 17 +++-- .../generated/builders/duration-builder.ts | 17 +++-- .../builders/duration-inline-builder.ts | 14 ++-- .../builders/emit-event-definition-builder.ts | 17 +++-- .../builders/emit-event-with-builder.ts | 14 ++-- .../generated/builders/emit-task-builder.ts | 17 +++-- .../emit-task-configuration-builder.ts | 14 ++-- .../generated/builders/endpoint-builder.ts | 17 +++-- .../endpoint-configuration-builder.ts | 14 ++-- .../builders/endpoint-uri-builder.ts | 17 +++-- src/lib/generated/builders/error-builder.ts | 17 +++-- .../builders/error-instance-builder.ts | 14 ++-- .../generated/builders/error-type-builder.ts | 17 +++-- .../event-consumption-strategy-builder.ts | 15 +++-- .../builders/event-dataschema-builder.ts | 14 ++-- .../builders/event-filter-builder.ts | 17 +++-- .../event-filter-correlate-builder.ts | 14 ++-- .../builders/event-source-builder.ts | 17 +++-- .../generated/builders/event-time-builder.ts | 17 +++-- .../builders/exponential-back-off-builder.ts | 14 ++-- .../generated/builders/export-as-builder.ts | 17 +++-- src/lib/generated/builders/export-builder.ts | 17 +++-- .../generated/builders/extension-builder.ts | 17 +++-- .../builders/extension-item-builder.ts | 14 ++-- .../builders/external-resource-builder.ts | 14 ++-- .../builders/external-script-builder.ts | 14 ++-- .../builders/flow-directive-builder.ts | 14 ++-- .../generated/builders/for-task-builder.ts | 17 +++-- .../for-task-configuration-builder.ts | 14 ++-- .../generated/builders/fork-task-builder.ts | 17 +++-- .../fork-task-configuration-builder.ts | 14 ++-- .../builders/function-arguments-builder.ts | 14 ++-- .../builders/grpc-arguments-builder.ts | 14 ++-- .../builders/http-arguments-builder.ts | 14 ++-- .../builders/inline-script-builder.ts | 17 +++-- src/lib/generated/builders/input-builder.ts | 17 +++-- .../generated/builders/input-from-builder.ts | 17 +++-- .../builders/linear-backoff-builder.ts | 14 ++-- .../generated/builders/listen-task-builder.ts | 17 +++-- .../listen-task-configuration-builder.ts | 14 ++-- ...2-autenthication-data-audiences-builder.ts | 16 +++-- .../oauth2-autenthication-data-builder.ts | 15 +++-- ...uth2-autenthication-data-client-builder.ts | 15 +++-- ...uth2-autenthication-data-scopes-builder.ts | 14 ++-- .../oauth2-authentication-policy-builder.ts | 15 +++-- ...entication-policy-configuration-builder.ts | 21 ++++-- ...entication-properties-endpoints-builder.ts | 21 ++++-- ...nnect-authentication-properties-builder.ts | 21 ++++-- .../builders/oauth2-issuers-builder.ts | 17 +++-- .../oauth2-token-definition-builder.ts | 14 ++-- .../builders/oauth2-token-request-builder.ts | 14 ++-- .../one-event-consumption-strategy-builder.ts | 15 +++-- .../builders/open-api-arguments-builder.ts | 14 ++-- ...d-connect-authentication-policy-builder.ts | 18 ++++-- ...entication-policy-configuration-builder.ts | 21 ++++-- ...nnect-authentication-properties-builder.ts | 21 ++++-- .../generated/builders/output-as-builder.ts | 17 +++-- src/lib/generated/builders/output-builder.ts | 17 +++-- .../generated/builders/raise-task-builder.ts | 17 +++-- .../raise-task-configuration-builder.ts | 14 ++-- .../raise-task-raise-error-builder.ts | 17 +++-- ...renceable-authentication-policy-builder.ts | 18 ++++-- .../builders/retry-backoff-builder.ts | 17 +++-- .../builders/retry-limit-attempt-builder.ts | 14 ++-- .../generated/builders/retry-limit-builder.ts | 17 +++-- .../builders/retry-policy-builder.ts | 17 +++-- .../builders/retry-policy-jitter-builder.ts | 14 ++-- .../builders/run-container-builder.ts | 17 +++-- .../generated/builders/run-script-builder.ts | 17 +++-- .../generated/builders/run-shell-builder.ts | 17 +++-- .../generated/builders/run-task-builder.ts | 17 +++-- .../run-task-configuration-builder.ts | 14 ++-- .../builders/run-workflow-builder.ts | 17 +++-- .../builders/runtime-expression-builder.ts | 14 ++-- .../generated/builders/schedule-builder.ts | 17 +++-- src/lib/generated/builders/schema-builder.ts | 17 +++-- .../builders/schema-external-builder.ts | 14 ++-- .../builders/schema-inline-builder.ts | 17 +++-- src/lib/generated/builders/script-builder.ts | 17 +++-- ...ret-based-authentication-policy-builder.ts | 18 ++++-- .../generated/builders/set-task-builder.ts | 17 +++-- .../set-task-configuration-builder.ts | 14 ++-- .../builders/shell-arguments-builder.ts | 14 ++-- src/lib/generated/builders/shell-builder.ts | 17 +++-- .../builders/shell-environment-builder.ts | 14 ++-- .../builders/subflow-configuration-builder.ts | 14 ++-- .../builders/subflow-input-builder.ts | 17 +++-- .../generated/builders/switch-case-builder.ts | 17 +++-- .../generated/builders/switch-item-builder.ts | 17 +++-- .../generated/builders/switch-task-builder.ts | 17 +++-- .../switch-task-configuration-builder.ts | 14 ++-- .../generated/builders/task-base-builder.ts | 17 +++-- .../builders/task-base-if-builder.ts | 17 +++-- .../builders/task-base-timeout-builder.ts | 14 ++-- src/lib/generated/builders/task-builder.ts | 17 +++-- .../generated/builders/task-item-builder.ts | 17 +++-- .../generated/builders/task-list-builder.ts | 17 +++-- .../builders/task-metadata-builder.ts | 17 +++-- src/lib/generated/builders/timeout-builder.ts | 17 +++-- .../generated/builders/try-task-builder.ts | 17 +++-- .../builders/try-task-catch-builder.ts | 17 +++-- .../builders/try-task-catch-retry-builder.ts | 14 ++-- .../builders/uri-template-builder.ts | 17 +++-- .../builders/use-authentications-builder.ts | 14 ++-- src/lib/generated/builders/use-builder.ts | 15 +++-- .../builders/use-catalogs-builder.ts | 17 +++-- .../generated/builders/use-errors-builder.ts | 17 +++-- .../builders/use-extensions-builder.ts | 17 +++-- .../builders/use-functions-builder.ts | 17 +++-- .../generated/builders/use-retries-builder.ts | 17 +++-- .../generated/builders/use-secrets-builder.ts | 15 +++-- .../builders/use-timeouts-builder.ts | 17 +++-- .../generated/builders/wait-task-builder.ts | 17 +++-- .../with-async-api-payload-builder.ts | 17 +++-- .../generated/builders/with-event-builder.ts | 17 +++-- .../builders/with-grpc-arguments-builder.ts | 14 ++-- .../builders/with-grpc-service-builder.ts | 14 ++-- .../builders/with-http-body-builder.ts | 17 +++-- .../builders/with-http-headers-builder.ts | 14 ++-- .../builders/with-http-query-builder.ts | 14 ++-- .../with-open-api-parameters-builder.ts | 14 ++-- .../generated/builders/workflow-builder.ts | 17 +++-- .../builders/workflow-metadata-builder.ts | 14 ++-- .../builders/workflow-tags-builder.ts | 17 +++-- .../builders/workflow-timeout-builder.ts | 14 ++-- ...vent-consumption-strategy-configuration.ts | 17 ++++- ...vent-consumption-strategy-configuration.ts | 17 ++++- .../oauth2-autenthication-data-audiences.ts | 17 ++++- .../oauth2-autenthication-data-scopes.ts | 17 ++++- src/lib/generated/classes/oauth2-issuers.ts | 15 ++++- .../classes/switch-task-configuration.ts | 15 ++++- src/lib/generated/classes/task-list.ts | 15 ++++- src/lib/generated/classes/use-extensions.ts | 15 ++++- src/lib/generated/classes/use-secrets.ts | 15 ++++- tests/builders/workflow-builder.spec.ts | 64 ++++++++++++++++++- tools/4_generate-classes.ts | 16 ++++- tools/5_generate-builders.ts | 26 ++++---- 177 files changed, 1912 insertions(+), 1090 deletions(-) rename examples/browser/{index.html => using-class.html} (81%) create mode 100644 examples/browser/using-fluent-api.html create mode 100644 examples/browser/using-json.html create mode 100644 examples/browser/using-plain-object.html rename examples/node/{index.ts => using-class.ts} (83%) create mode 100644 examples/node/using-fluent-api.ts create mode 100644 examples/node/using-json.ts create mode 100644 examples/node/using-plain-object.ts diff --git a/README.md b/README.md index 5e6a1f30..530e79a8 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,8 @@ The fluent builders wrap the core classes and provide a fluent API for construct The fluent builders are directly exported as `**Builder`, e.g., `workflowBuilder`. +By default, built objects are self-validated and self-normalized. `BuildOptions` can be passed to the `build()` method to disable validation or normalization. + ### Validation Function The SDK includes a validation function to check if objects conform to the expected schema. This function ensures that your workflow objects are correctly structured and meet the required specifications. diff --git a/examples/browser/index.html b/examples/browser/using-class.html similarity index 81% rename from examples/browser/index.html rename to examples/browser/using-class.html index 24a3976d..ba0ee640 100644 --- a/examples/browser/index.html +++ b/examples/browser/using-class.html @@ -9,7 +9,7 @@ -
+

   
   
+  
+
+
+
\ No newline at end of file
diff --git a/examples/browser/using-json.html b/examples/browser/using-json.html
new file mode 100644
index 00000000..c5aebca4
--- /dev/null
+++ b/examples/browser/using-json.html
@@ -0,0 +1,40 @@
+
+
+
+
+  
+  Serveless Workflow
+  
+  
+
+
+
+  

+  
+  
+
+
+
\ No newline at end of file
diff --git a/examples/browser/using-plain-object.html b/examples/browser/using-plain-object.html
new file mode 100644
index 00000000..f22b62c6
--- /dev/null
+++ b/examples/browser/using-plain-object.html
@@ -0,0 +1,45 @@
+
+
+
+
+  
+  Serveless Workflow
+  
+  
+
+
+
+  

+  
+  
+
+
+
\ No newline at end of file
diff --git a/examples/node/index.ts b/examples/node/using-class.ts
similarity index 83%
rename from examples/node/index.ts
rename to examples/node/using-class.ts
index c141ea11..8537eaaf 100644
--- a/examples/node/index.ts
+++ b/examples/node/using-class.ts
@@ -13,13 +13,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import { Classes } from '../../dist';
+import { Classes } from /*'@serverlessworkflow/sdk';*/ '../../dist';
 const { Workflow } = Classes;
 
 const workflow = new Workflow({
   document: {
     dsl: '1.0.0-alpha5',
-    name: 'test',
+    name: 'using-class',
     version: '1.0.0',
     namespace: 'default',
   },
@@ -36,7 +36,7 @@ const workflow = new Workflow({
 
 try {
   workflow.validate();
-  console.log(workflow.serialize('json'));
+  console.log(`--- YAML ---\n${workflow.serialize()}\n\n--- JSON ---\n${workflow.serialize('json')}`);
 } catch (ex) {
   console.error('Invalid workflow', ex);
 }
diff --git a/examples/node/using-fluent-api.ts b/examples/node/using-fluent-api.ts
new file mode 100644
index 00000000..70208977
--- /dev/null
+++ b/examples/node/using-fluent-api.ts
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2021-Present The Serverless Workflow Specification Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import {
+  documentBuilder,
+  setTaskBuilder,
+  taskListBuilder,
+  workflowBuilder,
+} from /*'@serverlessworkflow/sdk';*/ '../../dist';
+
+try {
+  const workflow = workflowBuilder()
+    .document(
+      documentBuilder().dsl('1.0.0-alpha5').name('using-fluent-api').version('1.0.0').namespace('default').build(),
+    )
+    .do(
+      taskListBuilder()
+        .push({
+          step1: setTaskBuilder().set({ foo: 'bar' }).build(),
+        })
+        .build(),
+    )
+    .build();
+  console.log(`--- YAML ---\n${workflow.serialize()}\n\n--- JSON ---\n${workflow.serialize('json')}`);
+} catch (ex) {
+  console.error('Invalid workflow', ex);
+}
diff --git a/examples/node/using-json.ts b/examples/node/using-json.ts
new file mode 100644
index 00000000..cad31c3d
--- /dev/null
+++ b/examples/node/using-json.ts
@@ -0,0 +1,22 @@
+import { Classes } from /*'@serverlessworkflow/sdk';*/ '../../dist';
+
+const myJsonWorkflow = `
+{
+  "document": {
+    "dsl": "1.0.0-alpha5",
+    "name": "using-json",
+    "version": "1.0.0",
+    "namespace": "default"
+  },
+  "do": [
+    {
+      "step1": {
+        "set": {
+          "variable": "my first workflow"
+        }
+      }
+    }
+  ]
+}`;
+const workflow = Classes.Workflow.deserialize(myJsonWorkflow);
+console.log(`--- YAML ---\n${workflow.serialize()}\n\n--- JSON ---\n${workflow.serialize('json')}`);
diff --git a/examples/node/using-plain-object.ts b/examples/node/using-plain-object.ts
new file mode 100644
index 00000000..449171cd
--- /dev/null
+++ b/examples/node/using-plain-object.ts
@@ -0,0 +1,27 @@
+import { Classes, Specification, validate } from /*'@serverlessworkflow/sdk';*/ '../../dist';
+
+const workflowDefinition = {
+  document: {
+    dsl: '1.0.0-alpha5',
+    name: 'using-plain-object',
+    version: '1.0.0',
+    namespace: 'default',
+  },
+  do: [
+    {
+      step1: {
+        set: {
+          variable: 'my first workflow',
+        },
+      },
+    },
+  ],
+} as Specification.Workflow;
+try {
+  validate('Workflow', workflowDefinition);
+  console.log(
+    `--- YAML ---\n${Classes.Workflow.serialize(workflowDefinition)}\n\n--- JSON ---\n${Classes.Workflow.serialize(workflowDefinition, 'json')}`,
+  );
+} catch (ex) {
+  console.error('Invalid workflow', ex);
+}
diff --git a/src/lib/builder.ts b/src/lib/builder.ts
index 6f76c2e5..5e8321bc 100644
--- a/src/lib/builder.ts
+++ b/src/lib/builder.ts
@@ -32,28 +32,28 @@ export type BuildOptions = {
 /**
  * The type of the underlying function called on `build()` for objects
  */
-export type BuildingFunction = (model: Partial, options: BuildOptions) => T;
+export type BuildingFunction = (model: Partial, options: BuildOptions) => TBuilt;
 
 /**
  * The type of the underlying function called on `build()` for arrays
  */
-export type ArrayBuildingFunction = (model: Array, options: BuildOptions) => Array;
+export type ArrayBuildingFunction = (model: Array, options: BuildOptions) => TBuilt;
 
 /**
  * Represents a fluent builder proxy for an object
  */
-export type Builder = {
-  build: (option?: BuildOptions) => T;
+export type Builder = {
+  build: (option?: BuildOptions) => TBuilt;
 } & {
-  [K in keyof T]-?: (arg: T[K]) => Builder;
+  [K in keyof TSpec]-?: (arg: TSpec[K]) => Builder;
 };
 
 /**
  * Represents a fluent builder proxy for an array
  */
-export type ArrayBuilder = {
-  push: (item: T) => ArrayBuilder;
-  build: (option?: BuildOptions) => Array;
+export type ArrayBuilder = {
+  push: (item: TSpec) => ArrayBuilder;
+  build: (option?: BuildOptions) => TBuilt;
 };
 
 /**
@@ -62,7 +62,7 @@ export type ArrayBuilder = {
  * @param options The build options
  * @returns
  */
-function defaultBuildingFn(model: Partial, options: BuildOptions): T {
+function defaultBuildingFn(model: Partial, options: BuildOptions): TBuilt {
   // prevents @typescript-eslint/no-unused-vars ...
   if (options.validate == null) {
     options.validate = true;
@@ -70,7 +70,7 @@ function defaultBuildingFn(model: Partial, options: BuildOptions): T {
   if (options.normalize == null) {
     options.normalize = true;
   }
-  return model as T;
+  return model as TBuilt;
 }
 
 /**
@@ -78,8 +78,11 @@ function defaultBuildingFn(model: Partial, options: BuildOptions): T {
  * @param buildingFn The function used to validate and produce the object on build()
  * @returns A fluent builder
  */
-export function builder(model: Partial = {}, buildingFn: BuildingFunction = defaultBuildingFn): Builder {
-  const proxy = new Proxy({} as Builder, {
+export function builder(
+  model: Partial = {},
+  buildingFn: BuildingFunction = defaultBuildingFn,
+): Builder {
+  const proxy = new Proxy({} as Builder, {
     get: (_, prop) => {
       if (prop === 'build') {
         return (options?: BuildOptions) => {
@@ -93,7 +96,7 @@ export function builder(model: Partial = {}, buildingFn: BuildingFunction<
           return buildingFn(model, options);
         };
       }
-      return (value: unknown): Builder => {
+      return (value: unknown): Builder => {
         (model as any)[prop.toString()] = value;
         return proxy;
       };
@@ -110,14 +113,14 @@ export function builder(model: Partial = {}, buildingFn: BuildingFunction<
  * @param buildingFn The function used to validate and produce the object on build()
  * @returns A fluent builder
  */
-export function arrayBuilder(
-  model: Array = [],
-  buildingFn: ArrayBuildingFunction = defaultBuildingFn,
-): ArrayBuilder {
+export function arrayBuilder(
+  model: Array = [],
+  buildingFn: ArrayBuildingFunction = defaultBuildingFn,
+): ArrayBuilder {
   if (model != null && !Array.isArray(model)) {
     throw new Error(`The provided model should be an array`);
   }
-  const proxy = new Proxy({} as ArrayBuilder, {
+  const proxy = new Proxy({} as ArrayBuilder, {
     get: (_, prop) => {
       if (prop === 'build') {
         return (options?: BuildOptions) => {
@@ -132,7 +135,7 @@ export function arrayBuilder(
         };
       }
       if (prop === 'push') {
-        return (value: T): ArrayBuilder => {
+        return (value: TSpec): ArrayBuilder => {
           model.push(value);
           return proxy;
         };
diff --git a/src/lib/generated/builders/all-event-consumption-strategy-builder.ts b/src/lib/generated/builders/all-event-consumption-strategy-builder.ts
index c5704c34..e5de7ed3 100644
--- a/src/lib/generated/builders/all-event-consumption-strategy-builder.ts
+++ b/src/lib/generated/builders/all-event-consumption-strategy-builder.ts
@@ -22,28 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { AllEventConsumptionStrategyIntersection } from '../classes/all-event-consumption-strategy';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.AllEventConsumptionStrategy} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.AllEventConsumptionStrategy} The built object
+ * @returns {AllEventConsumptionStrategyIntersection} The built object
  */
 function buildingFn(
   model: Specification.AllEventConsumptionStrategy,
   options: BuildOptions,
-): Specification.AllEventConsumptionStrategy {
+): AllEventConsumptionStrategyIntersection {
   const instance = new Classes.AllEventConsumptionStrategy(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.AllEventConsumptionStrategy;
+  return (options.normalize ? instance.normalize() : instance) as AllEventConsumptionStrategyIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.AllEventConsumptionStrategy`
- * @returns {Builder} A builder for `Specification.AllEventConsumptionStrategy`
+ * A factory to create a builder proxy for the type `AllEventConsumptionStrategyIntersection`
+ * @returns {Builder} A builder for `AllEventConsumptionStrategyIntersection`
  */
 export const allEventConsumptionStrategyBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder, AllEventConsumptionStrategyIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/all-event-consumption-strategy-configuration-builder.ts b/src/lib/generated/builders/all-event-consumption-strategy-configuration-builder.ts
index b278a2d0..c9119f6b 100644
--- a/src/lib/generated/builders/all-event-consumption-strategy-configuration-builder.ts
+++ b/src/lib/generated/builders/all-event-consumption-strategy-configuration-builder.ts
@@ -22,29 +22,31 @@
 
 import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { AllEventConsumptionStrategyConfigurationIntersection } from '../classes/all-event-consumption-strategy-configuration';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying array
  * @param {Specification.AllEventConsumptionStrategyConfiguration} model The proxied array
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.AllEventConsumptionStrategyConfiguration} The built array
+ * @returns {AllEventConsumptionStrategyConfigurationIntersection} The built array
  */
 function buildingFn(
   model: Specification.AllEventConsumptionStrategyConfiguration,
   options: BuildOptions,
-): Specification.AllEventConsumptionStrategyConfiguration {
+): AllEventConsumptionStrategyConfigurationIntersection {
   const instance = new Classes.AllEventConsumptionStrategyConfiguration(model);
   if (options.validate) instance.validate();
-  return (
-    options.normalize ? instance.normalize() : instance
-  ) as Specification.AllEventConsumptionStrategyConfiguration;
+  return (options.normalize
+    ? instance.normalize()
+    : instance) as unknown as AllEventConsumptionStrategyConfigurationIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.AllEventConsumptionStrategyConfiguration`
- * @returns {ArrayBuilder} A builder for `Specification.AllEventConsumptionStrategyConfiguration`
+ * A factory to create a builder proxy for the type `AllEventConsumptionStrategyConfigurationIntersection`
+ * @returns {ArrayBuilder} A builder for `AllEventConsumptionStrategyConfigurationIntersection`
  */
 export const allEventConsumptionStrategyConfigurationBuilder = (
   model?: Specification.AllEventConsumptionStrategyConfiguration,
-): ArrayBuilder => arrayBuilder(model, buildingFn);
+): ArrayBuilder =>
+  arrayBuilder(model, buildingFn);
diff --git a/src/lib/generated/builders/any-event-consumption-strategy-builder.ts b/src/lib/generated/builders/any-event-consumption-strategy-builder.ts
index dc00e1c6..5bacba31 100644
--- a/src/lib/generated/builders/any-event-consumption-strategy-builder.ts
+++ b/src/lib/generated/builders/any-event-consumption-strategy-builder.ts
@@ -22,28 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { AnyEventConsumptionStrategyIntersection } from '../classes/any-event-consumption-strategy';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.AnyEventConsumptionStrategy} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.AnyEventConsumptionStrategy} The built object
+ * @returns {AnyEventConsumptionStrategyIntersection} The built object
  */
 function buildingFn(
   model: Specification.AnyEventConsumptionStrategy,
   options: BuildOptions,
-): Specification.AnyEventConsumptionStrategy {
+): AnyEventConsumptionStrategyIntersection {
   const instance = new Classes.AnyEventConsumptionStrategy(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.AnyEventConsumptionStrategy;
+  return (options.normalize ? instance.normalize() : instance) as AnyEventConsumptionStrategyIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.AnyEventConsumptionStrategy`
- * @returns {Builder} A builder for `Specification.AnyEventConsumptionStrategy`
+ * A factory to create a builder proxy for the type `AnyEventConsumptionStrategyIntersection`
+ * @returns {Builder} A builder for `AnyEventConsumptionStrategyIntersection`
  */
 export const anyEventConsumptionStrategyBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder, AnyEventConsumptionStrategyIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/any-event-consumption-strategy-configuration-builder.ts b/src/lib/generated/builders/any-event-consumption-strategy-configuration-builder.ts
index 07585c3f..c8a9c7e5 100644
--- a/src/lib/generated/builders/any-event-consumption-strategy-configuration-builder.ts
+++ b/src/lib/generated/builders/any-event-consumption-strategy-configuration-builder.ts
@@ -22,29 +22,31 @@
 
 import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { AnyEventConsumptionStrategyConfigurationIntersection } from '../classes/any-event-consumption-strategy-configuration';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying array
  * @param {Specification.AnyEventConsumptionStrategyConfiguration} model The proxied array
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.AnyEventConsumptionStrategyConfiguration} The built array
+ * @returns {AnyEventConsumptionStrategyConfigurationIntersection} The built array
  */
 function buildingFn(
   model: Specification.AnyEventConsumptionStrategyConfiguration,
   options: BuildOptions,
-): Specification.AnyEventConsumptionStrategyConfiguration {
+): AnyEventConsumptionStrategyConfigurationIntersection {
   const instance = new Classes.AnyEventConsumptionStrategyConfiguration(model);
   if (options.validate) instance.validate();
-  return (
-    options.normalize ? instance.normalize() : instance
-  ) as Specification.AnyEventConsumptionStrategyConfiguration;
+  return (options.normalize
+    ? instance.normalize()
+    : instance) as unknown as AnyEventConsumptionStrategyConfigurationIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.AnyEventConsumptionStrategyConfiguration`
- * @returns {ArrayBuilder} A builder for `Specification.AnyEventConsumptionStrategyConfiguration`
+ * A factory to create a builder proxy for the type `AnyEventConsumptionStrategyConfigurationIntersection`
+ * @returns {ArrayBuilder} A builder for `AnyEventConsumptionStrategyConfigurationIntersection`
  */
 export const anyEventConsumptionStrategyConfigurationBuilder = (
   model?: Specification.AnyEventConsumptionStrategyConfiguration,
-): ArrayBuilder => arrayBuilder(model, buildingFn);
+): ArrayBuilder =>
+  arrayBuilder(model, buildingFn);
diff --git a/src/lib/generated/builders/async-api-arguments-builder.ts b/src/lib/generated/builders/async-api-arguments-builder.ts
index 2aff9a0c..4ac9ed7a 100644
--- a/src/lib/generated/builders/async-api-arguments-builder.ts
+++ b/src/lib/generated/builders/async-api-arguments-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { AsyncApiArgumentsIntersection } from '../classes/async-api-arguments';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.AsyncApiArguments} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.AsyncApiArguments} The built object
+ * @returns {AsyncApiArgumentsIntersection} The built object
  */
-function buildingFn(model: Specification.AsyncApiArguments, options: BuildOptions): Specification.AsyncApiArguments {
+function buildingFn(model: Specification.AsyncApiArguments, options: BuildOptions): AsyncApiArgumentsIntersection {
   const instance = new Classes.AsyncApiArguments(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.AsyncApiArguments;
+  return (options.normalize ? instance.normalize() : instance) as AsyncApiArgumentsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.AsyncApiArguments`
- * @returns {Builder} A builder for `Specification.AsyncApiArguments`
+ * A factory to create a builder proxy for the type `AsyncApiArgumentsIntersection`
+ * @returns {Builder} A builder for `AsyncApiArgumentsIntersection`
  */
 export const asyncApiArgumentsBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, AsyncApiArgumentsIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/authentication-policy-builder.ts b/src/lib/generated/builders/authentication-policy-builder.ts
index 05f39211..1acf09a8 100644
--- a/src/lib/generated/builders/authentication-policy-builder.ts
+++ b/src/lib/generated/builders/authentication-policy-builder.ts
@@ -22,27 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { AuthenticationPolicyIntersection } from '../classes/authentication-policy';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.AuthenticationPolicy} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.AuthenticationPolicy} The built object
+ * @returns {AuthenticationPolicyIntersection} The built object
  */
 function buildingFn(
   model: Specification.AuthenticationPolicy,
   options: BuildOptions,
-): Specification.AuthenticationPolicy {
+): AuthenticationPolicyIntersection {
   const instance = new Classes.AuthenticationPolicy(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.AuthenticationPolicy;
+  return (options.normalize ? instance.normalize() : instance) as AuthenticationPolicyIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.AuthenticationPolicy`
- * @returns {Builder} A builder for `Specification.AuthenticationPolicy`
+ * A factory to create a builder proxy for the type `AuthenticationPolicyIntersection`
+ * @returns {Builder} A builder for `AuthenticationPolicyIntersection`
  */
 export const authenticationPolicyBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, AuthenticationPolicyIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/authentication-policy-reference-builder.ts b/src/lib/generated/builders/authentication-policy-reference-builder.ts
index 5b7750ed..89a7d494 100644
--- a/src/lib/generated/builders/authentication-policy-reference-builder.ts
+++ b/src/lib/generated/builders/authentication-policy-reference-builder.ts
@@ -22,28 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { AuthenticationPolicyReferenceIntersection } from '../classes/authentication-policy-reference';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.AuthenticationPolicyReference} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.AuthenticationPolicyReference} The built object
+ * @returns {AuthenticationPolicyReferenceIntersection} The built object
  */
 function buildingFn(
   model: Specification.AuthenticationPolicyReference,
   options: BuildOptions,
-): Specification.AuthenticationPolicyReference {
+): AuthenticationPolicyReferenceIntersection {
   const instance = new Classes.AuthenticationPolicyReference(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.AuthenticationPolicyReference;
+  return (options.normalize ? instance.normalize() : instance) as AuthenticationPolicyReferenceIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.AuthenticationPolicyReference`
- * @returns {Builder} A builder for `Specification.AuthenticationPolicyReference`
+ * A factory to create a builder proxy for the type `AuthenticationPolicyReferenceIntersection`
+ * @returns {Builder} A builder for `AuthenticationPolicyReferenceIntersection`
  */
 export const authenticationPolicyReferenceBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder, AuthenticationPolicyReferenceIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/basic-authentication-policy-builder.ts b/src/lib/generated/builders/basic-authentication-policy-builder.ts
index 9ea54d3e..ad168c7c 100644
--- a/src/lib/generated/builders/basic-authentication-policy-builder.ts
+++ b/src/lib/generated/builders/basic-authentication-policy-builder.ts
@@ -22,28 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { BasicAuthenticationPolicyIntersection } from '../classes/basic-authentication-policy';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.BasicAuthenticationPolicy} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.BasicAuthenticationPolicy} The built object
+ * @returns {BasicAuthenticationPolicyIntersection} The built object
  */
 function buildingFn(
   model: Specification.BasicAuthenticationPolicy,
   options: BuildOptions,
-): Specification.BasicAuthenticationPolicy {
+): BasicAuthenticationPolicyIntersection {
   const instance = new Classes.BasicAuthenticationPolicy(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.BasicAuthenticationPolicy;
+  return (options.normalize ? instance.normalize() : instance) as BasicAuthenticationPolicyIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.BasicAuthenticationPolicy`
- * @returns {Builder} A builder for `Specification.BasicAuthenticationPolicy`
+ * A factory to create a builder proxy for the type `BasicAuthenticationPolicyIntersection`
+ * @returns {Builder} A builder for `BasicAuthenticationPolicyIntersection`
  */
 export const basicAuthenticationPolicyBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder, BasicAuthenticationPolicyIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/basic-authentication-policy-configuration-builder.ts b/src/lib/generated/builders/basic-authentication-policy-configuration-builder.ts
index 767e564a..cb8dc695 100644
--- a/src/lib/generated/builders/basic-authentication-policy-configuration-builder.ts
+++ b/src/lib/generated/builders/basic-authentication-policy-configuration-builder.ts
@@ -22,28 +22,35 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { BasicAuthenticationPolicyConfigurationIntersection } from '../classes/basic-authentication-policy-configuration';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.BasicAuthenticationPolicyConfiguration} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.BasicAuthenticationPolicyConfiguration} The built object
+ * @returns {BasicAuthenticationPolicyConfigurationIntersection} The built object
  */
 function buildingFn(
   model: Specification.BasicAuthenticationPolicyConfiguration,
   options: BuildOptions,
-): Specification.BasicAuthenticationPolicyConfiguration {
+): BasicAuthenticationPolicyConfigurationIntersection {
   const instance = new Classes.BasicAuthenticationPolicyConfiguration(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.BasicAuthenticationPolicyConfiguration;
+  return (options.normalize ? instance.normalize() : instance) as BasicAuthenticationPolicyConfigurationIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.BasicAuthenticationPolicyConfiguration`
- * @returns {Builder} A builder for `Specification.BasicAuthenticationPolicyConfiguration`
+ * A factory to create a builder proxy for the type `BasicAuthenticationPolicyConfigurationIntersection`
+ * @returns {Builder} A builder for `BasicAuthenticationPolicyConfigurationIntersection`
  */
 export const basicAuthenticationPolicyConfigurationBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder<
+  Partial,
+  BasicAuthenticationPolicyConfigurationIntersection
+> =>
+  builder(
+    model,
+    buildingFn,
+  );
diff --git a/src/lib/generated/builders/basic-authentication-properties-builder.ts b/src/lib/generated/builders/basic-authentication-properties-builder.ts
index 1486bbc6..5ad97b19 100644
--- a/src/lib/generated/builders/basic-authentication-properties-builder.ts
+++ b/src/lib/generated/builders/basic-authentication-properties-builder.ts
@@ -22,28 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { BasicAuthenticationPropertiesIntersection } from '../classes/basic-authentication-properties';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.BasicAuthenticationProperties} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.BasicAuthenticationProperties} The built object
+ * @returns {BasicAuthenticationPropertiesIntersection} The built object
  */
 function buildingFn(
   model: Specification.BasicAuthenticationProperties,
   options: BuildOptions,
-): Specification.BasicAuthenticationProperties {
+): BasicAuthenticationPropertiesIntersection {
   const instance = new Classes.BasicAuthenticationProperties(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.BasicAuthenticationProperties;
+  return (options.normalize ? instance.normalize() : instance) as BasicAuthenticationPropertiesIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.BasicAuthenticationProperties`
- * @returns {Builder} A builder for `Specification.BasicAuthenticationProperties`
+ * A factory to create a builder proxy for the type `BasicAuthenticationPropertiesIntersection`
+ * @returns {Builder} A builder for `BasicAuthenticationPropertiesIntersection`
  */
 export const basicAuthenticationPropertiesBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder, BasicAuthenticationPropertiesIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/bearer-authentication-policy-builder.ts b/src/lib/generated/builders/bearer-authentication-policy-builder.ts
index f6de3733..491270ed 100644
--- a/src/lib/generated/builders/bearer-authentication-policy-builder.ts
+++ b/src/lib/generated/builders/bearer-authentication-policy-builder.ts
@@ -22,28 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { BearerAuthenticationPolicyIntersection } from '../classes/bearer-authentication-policy';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.BearerAuthenticationPolicy} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.BearerAuthenticationPolicy} The built object
+ * @returns {BearerAuthenticationPolicyIntersection} The built object
  */
 function buildingFn(
   model: Specification.BearerAuthenticationPolicy,
   options: BuildOptions,
-): Specification.BearerAuthenticationPolicy {
+): BearerAuthenticationPolicyIntersection {
   const instance = new Classes.BearerAuthenticationPolicy(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.BearerAuthenticationPolicy;
+  return (options.normalize ? instance.normalize() : instance) as BearerAuthenticationPolicyIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.BearerAuthenticationPolicy`
- * @returns {Builder} A builder for `Specification.BearerAuthenticationPolicy`
+ * A factory to create a builder proxy for the type `BearerAuthenticationPolicyIntersection`
+ * @returns {Builder} A builder for `BearerAuthenticationPolicyIntersection`
  */
 export const bearerAuthenticationPolicyBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder, BearerAuthenticationPolicyIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/bearer-authentication-policy-configuration-builder.ts b/src/lib/generated/builders/bearer-authentication-policy-configuration-builder.ts
index adc638d4..e6f76012 100644
--- a/src/lib/generated/builders/bearer-authentication-policy-configuration-builder.ts
+++ b/src/lib/generated/builders/bearer-authentication-policy-configuration-builder.ts
@@ -22,28 +22,35 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { BearerAuthenticationPolicyConfigurationIntersection } from '../classes/bearer-authentication-policy-configuration';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.BearerAuthenticationPolicyConfiguration} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.BearerAuthenticationPolicyConfiguration} The built object
+ * @returns {BearerAuthenticationPolicyConfigurationIntersection} The built object
  */
 function buildingFn(
   model: Specification.BearerAuthenticationPolicyConfiguration,
   options: BuildOptions,
-): Specification.BearerAuthenticationPolicyConfiguration {
+): BearerAuthenticationPolicyConfigurationIntersection {
   const instance = new Classes.BearerAuthenticationPolicyConfiguration(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.BearerAuthenticationPolicyConfiguration;
+  return (options.normalize ? instance.normalize() : instance) as BearerAuthenticationPolicyConfigurationIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.BearerAuthenticationPolicyConfiguration`
- * @returns {Builder} A builder for `Specification.BearerAuthenticationPolicyConfiguration`
+ * A factory to create a builder proxy for the type `BearerAuthenticationPolicyConfigurationIntersection`
+ * @returns {Builder} A builder for `BearerAuthenticationPolicyConfigurationIntersection`
  */
 export const bearerAuthenticationPolicyConfigurationBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder<
+  Partial,
+  BearerAuthenticationPolicyConfigurationIntersection
+> =>
+  builder(
+    model,
+    buildingFn,
+  );
diff --git a/src/lib/generated/builders/bearer-authentication-properties-builder.ts b/src/lib/generated/builders/bearer-authentication-properties-builder.ts
index 02d4b0aa..21fb44d5 100644
--- a/src/lib/generated/builders/bearer-authentication-properties-builder.ts
+++ b/src/lib/generated/builders/bearer-authentication-properties-builder.ts
@@ -22,28 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { BearerAuthenticationPropertiesIntersection } from '../classes/bearer-authentication-properties';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.BearerAuthenticationProperties} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.BearerAuthenticationProperties} The built object
+ * @returns {BearerAuthenticationPropertiesIntersection} The built object
  */
 function buildingFn(
   model: Specification.BearerAuthenticationProperties,
   options: BuildOptions,
-): Specification.BearerAuthenticationProperties {
+): BearerAuthenticationPropertiesIntersection {
   const instance = new Classes.BearerAuthenticationProperties(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.BearerAuthenticationProperties;
+  return (options.normalize ? instance.normalize() : instance) as BearerAuthenticationPropertiesIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.BearerAuthenticationProperties`
- * @returns {Builder} A builder for `Specification.BearerAuthenticationProperties`
+ * A factory to create a builder proxy for the type `BearerAuthenticationPropertiesIntersection`
+ * @returns {Builder} A builder for `BearerAuthenticationPropertiesIntersection`
  */
 export const bearerAuthenticationPropertiesBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder, BearerAuthenticationPropertiesIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/call-async-api-builder.ts b/src/lib/generated/builders/call-async-api-builder.ts
index dc2ff206..07fdc9f5 100644
--- a/src/lib/generated/builders/call-async-api-builder.ts
+++ b/src/lib/generated/builders/call-async-api-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { CallAsyncAPIIntersection } from '../classes/call-async-api';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.CallAsyncAPI} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.CallAsyncAPI} The built object
+ * @returns {CallAsyncAPIIntersection} The built object
  */
-function buildingFn(model: Specification.CallAsyncAPI, options: BuildOptions): Specification.CallAsyncAPI {
+function buildingFn(model: Specification.CallAsyncAPI, options: BuildOptions): CallAsyncAPIIntersection {
   const instance = new Classes.CallAsyncAPI(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.CallAsyncAPI;
+  return (options.normalize ? instance.normalize() : instance) as CallAsyncAPIIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.CallAsyncAPI`
- * @returns {Builder} A builder for `Specification.CallAsyncAPI`
+ * A factory to create a builder proxy for the type `CallAsyncAPIIntersection`
+ * @returns {Builder} A builder for `CallAsyncAPIIntersection`
  */
-export const callAsyncAPIBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const callAsyncAPIBuilder = (
+  model?: Partial,
+): Builder, CallAsyncAPIIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/call-function-builder.ts b/src/lib/generated/builders/call-function-builder.ts
index bb0ad100..ca729edc 100644
--- a/src/lib/generated/builders/call-function-builder.ts
+++ b/src/lib/generated/builders/call-function-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { CallFunctionIntersection } from '../classes/call-function';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.CallFunction} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.CallFunction} The built object
+ * @returns {CallFunctionIntersection} The built object
  */
-function buildingFn(model: Specification.CallFunction, options: BuildOptions): Specification.CallFunction {
+function buildingFn(model: Specification.CallFunction, options: BuildOptions): CallFunctionIntersection {
   const instance = new Classes.CallFunction(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.CallFunction;
+  return (options.normalize ? instance.normalize() : instance) as CallFunctionIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.CallFunction`
- * @returns {Builder} A builder for `Specification.CallFunction`
+ * A factory to create a builder proxy for the type `CallFunctionIntersection`
+ * @returns {Builder} A builder for `CallFunctionIntersection`
  */
-export const callFunctionBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const callFunctionBuilder = (
+  model?: Partial,
+): Builder, CallFunctionIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/call-grpc-builder.ts b/src/lib/generated/builders/call-grpc-builder.ts
index adb6429e..356e3d64 100644
--- a/src/lib/generated/builders/call-grpc-builder.ts
+++ b/src/lib/generated/builders/call-grpc-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { CallGRPCIntersection } from '../classes/call-grpc';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.CallGRPC} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.CallGRPC} The built object
+ * @returns {CallGRPCIntersection} The built object
  */
-function buildingFn(model: Specification.CallGRPC, options: BuildOptions): Specification.CallGRPC {
+function buildingFn(model: Specification.CallGRPC, options: BuildOptions): CallGRPCIntersection {
   const instance = new Classes.CallGRPC(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.CallGRPC;
+  return (options.normalize ? instance.normalize() : instance) as CallGRPCIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.CallGRPC`
- * @returns {Builder} A builder for `Specification.CallGRPC`
+ * A factory to create a builder proxy for the type `CallGRPCIntersection`
+ * @returns {Builder} A builder for `CallGRPCIntersection`
  */
-export const callGRPCBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const callGRPCBuilder = (
+  model?: Partial,
+): Builder, CallGRPCIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/call-http-builder.ts b/src/lib/generated/builders/call-http-builder.ts
index c58200b9..e6ac20c8 100644
--- a/src/lib/generated/builders/call-http-builder.ts
+++ b/src/lib/generated/builders/call-http-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { CallHTTPIntersection } from '../classes/call-http';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.CallHTTP} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.CallHTTP} The built object
+ * @returns {CallHTTPIntersection} The built object
  */
-function buildingFn(model: Specification.CallHTTP, options: BuildOptions): Specification.CallHTTP {
+function buildingFn(model: Specification.CallHTTP, options: BuildOptions): CallHTTPIntersection {
   const instance = new Classes.CallHTTP(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.CallHTTP;
+  return (options.normalize ? instance.normalize() : instance) as CallHTTPIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.CallHTTP`
- * @returns {Builder} A builder for `Specification.CallHTTP`
+ * A factory to create a builder proxy for the type `CallHTTPIntersection`
+ * @returns {Builder} A builder for `CallHTTPIntersection`
  */
-export const callHTTPBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const callHTTPBuilder = (
+  model?: Partial,
+): Builder, CallHTTPIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/call-open-api-builder.ts b/src/lib/generated/builders/call-open-api-builder.ts
index 79aca1fb..98c8d11e 100644
--- a/src/lib/generated/builders/call-open-api-builder.ts
+++ b/src/lib/generated/builders/call-open-api-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { CallOpenAPIIntersection } from '../classes/call-open-api';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.CallOpenAPI} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.CallOpenAPI} The built object
+ * @returns {CallOpenAPIIntersection} The built object
  */
-function buildingFn(model: Specification.CallOpenAPI, options: BuildOptions): Specification.CallOpenAPI {
+function buildingFn(model: Specification.CallOpenAPI, options: BuildOptions): CallOpenAPIIntersection {
   const instance = new Classes.CallOpenAPI(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.CallOpenAPI;
+  return (options.normalize ? instance.normalize() : instance) as CallOpenAPIIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.CallOpenAPI`
- * @returns {Builder} A builder for `Specification.CallOpenAPI`
+ * A factory to create a builder proxy for the type `CallOpenAPIIntersection`
+ * @returns {Builder} A builder for `CallOpenAPIIntersection`
  */
-export const callOpenAPIBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const callOpenAPIBuilder = (
+  model?: Partial,
+): Builder, CallOpenAPIIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/call-task-builder.ts b/src/lib/generated/builders/call-task-builder.ts
index 675449cc..5015eb16 100644
--- a/src/lib/generated/builders/call-task-builder.ts
+++ b/src/lib/generated/builders/call-task-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { CallTaskIntersection } from '../classes/call-task';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.CallTask} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.CallTask} The built object
+ * @returns {CallTaskIntersection} The built object
  */
-function buildingFn(model: Specification.CallTask, options: BuildOptions): Specification.CallTask {
+function buildingFn(model: Specification.CallTask, options: BuildOptions): CallTaskIntersection {
   const instance = new Classes.CallTask(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.CallTask;
+  return (options.normalize ? instance.normalize() : instance) as CallTaskIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.CallTask`
- * @returns {Builder} A builder for `Specification.CallTask`
+ * A factory to create a builder proxy for the type `CallTaskIntersection`
+ * @returns {Builder} A builder for `CallTaskIntersection`
  */
-export const callTaskBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const callTaskBuilder = (
+  model?: Partial,
+): Builder, CallTaskIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/catalog-builder.ts b/src/lib/generated/builders/catalog-builder.ts
index 30a111bf..96f0ee20 100644
--- a/src/lib/generated/builders/catalog-builder.ts
+++ b/src/lib/generated/builders/catalog-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { CatalogIntersection } from '../classes/catalog';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.Catalog} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.Catalog} The built object
+ * @returns {CatalogIntersection} The built object
  */
-function buildingFn(model: Specification.Catalog, options: BuildOptions): Specification.Catalog {
+function buildingFn(model: Specification.Catalog, options: BuildOptions): CatalogIntersection {
   const instance = new Classes.Catalog(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.Catalog;
+  return (options.normalize ? instance.normalize() : instance) as CatalogIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.Catalog`
- * @returns {Builder} A builder for `Specification.Catalog`
+ * A factory to create a builder proxy for the type `CatalogIntersection`
+ * @returns {Builder} A builder for `CatalogIntersection`
  */
-export const catalogBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const catalogBuilder = (
+  model?: Partial,
+): Builder, CatalogIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/catch-errors-builder.ts b/src/lib/generated/builders/catch-errors-builder.ts
index de5fd061..ad6aad55 100644
--- a/src/lib/generated/builders/catch-errors-builder.ts
+++ b/src/lib/generated/builders/catch-errors-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { CatchErrorsIntersection } from '../classes/catch-errors';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.CatchErrors} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.CatchErrors} The built object
+ * @returns {CatchErrorsIntersection} The built object
  */
-function buildingFn(model: Specification.CatchErrors, options: BuildOptions): Specification.CatchErrors {
+function buildingFn(model: Specification.CatchErrors, options: BuildOptions): CatchErrorsIntersection {
   const instance = new Classes.CatchErrors(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.CatchErrors;
+  return (options.normalize ? instance.normalize() : instance) as CatchErrorsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.CatchErrors`
- * @returns {Builder} A builder for `Specification.CatchErrors`
+ * A factory to create a builder proxy for the type `CatchErrorsIntersection`
+ * @returns {Builder} A builder for `CatchErrorsIntersection`
  */
-export const catchErrorsBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const catchErrorsBuilder = (
+  model?: Partial,
+): Builder, CatchErrorsIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/constant-backoff-builder.ts b/src/lib/generated/builders/constant-backoff-builder.ts
index b6cbdc82..5abb9720 100644
--- a/src/lib/generated/builders/constant-backoff-builder.ts
+++ b/src/lib/generated/builders/constant-backoff-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ConstantBackoffIntersection } from '../classes/constant-backoff';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ConstantBackoff} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ConstantBackoff} The built object
+ * @returns {ConstantBackoffIntersection} The built object
  */
-function buildingFn(model: Specification.ConstantBackoff, options: BuildOptions): Specification.ConstantBackoff {
+function buildingFn(model: Specification.ConstantBackoff, options: BuildOptions): ConstantBackoffIntersection {
   const instance = new Classes.ConstantBackoff(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ConstantBackoff;
+  return (options.normalize ? instance.normalize() : instance) as ConstantBackoffIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ConstantBackoff`
- * @returns {Builder} A builder for `Specification.ConstantBackoff`
+ * A factory to create a builder proxy for the type `ConstantBackoffIntersection`
+ * @returns {Builder} A builder for `ConstantBackoffIntersection`
  */
 export const constantBackoffBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, ConstantBackoffIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/container-builder.ts b/src/lib/generated/builders/container-builder.ts
index 104d8f9f..6396a982 100644
--- a/src/lib/generated/builders/container-builder.ts
+++ b/src/lib/generated/builders/container-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ContainerIntersection } from '../classes/container';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.Container} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.Container} The built object
+ * @returns {ContainerIntersection} The built object
  */
-function buildingFn(model: Specification.Container, options: BuildOptions): Specification.Container {
+function buildingFn(model: Specification.Container, options: BuildOptions): ContainerIntersection {
   const instance = new Classes.Container(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.Container;
+  return (options.normalize ? instance.normalize() : instance) as ContainerIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.Container`
- * @returns {Builder} A builder for `Specification.Container`
+ * A factory to create a builder proxy for the type `ContainerIntersection`
+ * @returns {Builder} A builder for `ContainerIntersection`
  */
-export const containerBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const containerBuilder = (
+  model?: Partial,
+): Builder, ContainerIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/container-environment-builder.ts b/src/lib/generated/builders/container-environment-builder.ts
index 57006638..f6a19fcc 100644
--- a/src/lib/generated/builders/container-environment-builder.ts
+++ b/src/lib/generated/builders/container-environment-builder.ts
@@ -22,27 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ContainerEnvironmentIntersection } from '../classes/container-environment';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ContainerEnvironment} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ContainerEnvironment} The built object
+ * @returns {ContainerEnvironmentIntersection} The built object
  */
 function buildingFn(
   model: Specification.ContainerEnvironment,
   options: BuildOptions,
-): Specification.ContainerEnvironment {
+): ContainerEnvironmentIntersection {
   const instance = new Classes.ContainerEnvironment(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ContainerEnvironment;
+  return (options.normalize ? instance.normalize() : instance) as ContainerEnvironmentIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ContainerEnvironment`
- * @returns {Builder} A builder for `Specification.ContainerEnvironment`
+ * A factory to create a builder proxy for the type `ContainerEnvironmentIntersection`
+ * @returns {Builder} A builder for `ContainerEnvironmentIntersection`
  */
 export const containerEnvironmentBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, ContainerEnvironmentIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/container-ports-builder.ts b/src/lib/generated/builders/container-ports-builder.ts
index 49401398..1f45f71e 100644
--- a/src/lib/generated/builders/container-ports-builder.ts
+++ b/src/lib/generated/builders/container-ports-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ContainerPortsIntersection } from '../classes/container-ports';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ContainerPorts} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ContainerPorts} The built object
+ * @returns {ContainerPortsIntersection} The built object
  */
-function buildingFn(model: Specification.ContainerPorts, options: BuildOptions): Specification.ContainerPorts {
+function buildingFn(model: Specification.ContainerPorts, options: BuildOptions): ContainerPortsIntersection {
   const instance = new Classes.ContainerPorts(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ContainerPorts;
+  return (options.normalize ? instance.normalize() : instance) as ContainerPortsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ContainerPorts`
- * @returns {Builder} A builder for `Specification.ContainerPorts`
+ * A factory to create a builder proxy for the type `ContainerPortsIntersection`
+ * @returns {Builder} A builder for `ContainerPortsIntersection`
  */
 export const containerPortsBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, ContainerPortsIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/container-volumes-builder.ts b/src/lib/generated/builders/container-volumes-builder.ts
index 4b7609fd..eb438acd 100644
--- a/src/lib/generated/builders/container-volumes-builder.ts
+++ b/src/lib/generated/builders/container-volumes-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ContainerVolumesIntersection } from '../classes/container-volumes';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ContainerVolumes} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ContainerVolumes} The built object
+ * @returns {ContainerVolumesIntersection} The built object
  */
-function buildingFn(model: Specification.ContainerVolumes, options: BuildOptions): Specification.ContainerVolumes {
+function buildingFn(model: Specification.ContainerVolumes, options: BuildOptions): ContainerVolumesIntersection {
   const instance = new Classes.ContainerVolumes(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ContainerVolumes;
+  return (options.normalize ? instance.normalize() : instance) as ContainerVolumesIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ContainerVolumes`
- * @returns {Builder} A builder for `Specification.ContainerVolumes`
+ * A factory to create a builder proxy for the type `ContainerVolumesIntersection`
+ * @returns {Builder} A builder for `ContainerVolumesIntersection`
  */
 export const containerVolumesBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, ContainerVolumesIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/digest-authentication-policy-builder.ts b/src/lib/generated/builders/digest-authentication-policy-builder.ts
index a3028e30..c3e01db2 100644
--- a/src/lib/generated/builders/digest-authentication-policy-builder.ts
+++ b/src/lib/generated/builders/digest-authentication-policy-builder.ts
@@ -22,28 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { DigestAuthenticationPolicyIntersection } from '../classes/digest-authentication-policy';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.DigestAuthenticationPolicy} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.DigestAuthenticationPolicy} The built object
+ * @returns {DigestAuthenticationPolicyIntersection} The built object
  */
 function buildingFn(
   model: Specification.DigestAuthenticationPolicy,
   options: BuildOptions,
-): Specification.DigestAuthenticationPolicy {
+): DigestAuthenticationPolicyIntersection {
   const instance = new Classes.DigestAuthenticationPolicy(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.DigestAuthenticationPolicy;
+  return (options.normalize ? instance.normalize() : instance) as DigestAuthenticationPolicyIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.DigestAuthenticationPolicy`
- * @returns {Builder} A builder for `Specification.DigestAuthenticationPolicy`
+ * A factory to create a builder proxy for the type `DigestAuthenticationPolicyIntersection`
+ * @returns {Builder} A builder for `DigestAuthenticationPolicyIntersection`
  */
 export const digestAuthenticationPolicyBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder, DigestAuthenticationPolicyIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/digest-authentication-policy-configuration-builder.ts b/src/lib/generated/builders/digest-authentication-policy-configuration-builder.ts
index d92eee59..2aef95af 100644
--- a/src/lib/generated/builders/digest-authentication-policy-configuration-builder.ts
+++ b/src/lib/generated/builders/digest-authentication-policy-configuration-builder.ts
@@ -22,28 +22,35 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { DigestAuthenticationPolicyConfigurationIntersection } from '../classes/digest-authentication-policy-configuration';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.DigestAuthenticationPolicyConfiguration} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.DigestAuthenticationPolicyConfiguration} The built object
+ * @returns {DigestAuthenticationPolicyConfigurationIntersection} The built object
  */
 function buildingFn(
   model: Specification.DigestAuthenticationPolicyConfiguration,
   options: BuildOptions,
-): Specification.DigestAuthenticationPolicyConfiguration {
+): DigestAuthenticationPolicyConfigurationIntersection {
   const instance = new Classes.DigestAuthenticationPolicyConfiguration(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.DigestAuthenticationPolicyConfiguration;
+  return (options.normalize ? instance.normalize() : instance) as DigestAuthenticationPolicyConfigurationIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.DigestAuthenticationPolicyConfiguration`
- * @returns {Builder} A builder for `Specification.DigestAuthenticationPolicyConfiguration`
+ * A factory to create a builder proxy for the type `DigestAuthenticationPolicyConfigurationIntersection`
+ * @returns {Builder} A builder for `DigestAuthenticationPolicyConfigurationIntersection`
  */
 export const digestAuthenticationPolicyConfigurationBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder<
+  Partial,
+  DigestAuthenticationPolicyConfigurationIntersection
+> =>
+  builder(
+    model,
+    buildingFn,
+  );
diff --git a/src/lib/generated/builders/digest-authentication-properties-builder.ts b/src/lib/generated/builders/digest-authentication-properties-builder.ts
index 9174057a..a7d2a1cd 100644
--- a/src/lib/generated/builders/digest-authentication-properties-builder.ts
+++ b/src/lib/generated/builders/digest-authentication-properties-builder.ts
@@ -22,28 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { DigestAuthenticationPropertiesIntersection } from '../classes/digest-authentication-properties';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.DigestAuthenticationProperties} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.DigestAuthenticationProperties} The built object
+ * @returns {DigestAuthenticationPropertiesIntersection} The built object
  */
 function buildingFn(
   model: Specification.DigestAuthenticationProperties,
   options: BuildOptions,
-): Specification.DigestAuthenticationProperties {
+): DigestAuthenticationPropertiesIntersection {
   const instance = new Classes.DigestAuthenticationProperties(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.DigestAuthenticationProperties;
+  return (options.normalize ? instance.normalize() : instance) as DigestAuthenticationPropertiesIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.DigestAuthenticationProperties`
- * @returns {Builder} A builder for `Specification.DigestAuthenticationProperties`
+ * A factory to create a builder proxy for the type `DigestAuthenticationPropertiesIntersection`
+ * @returns {Builder} A builder for `DigestAuthenticationPropertiesIntersection`
  */
 export const digestAuthenticationPropertiesBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder, DigestAuthenticationPropertiesIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/do-task-builder.ts b/src/lib/generated/builders/do-task-builder.ts
index ad78338d..baaf1331 100644
--- a/src/lib/generated/builders/do-task-builder.ts
+++ b/src/lib/generated/builders/do-task-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { DoTaskIntersection } from '../classes/do-task';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.DoTask} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.DoTask} The built object
+ * @returns {DoTaskIntersection} The built object
  */
-function buildingFn(model: Specification.DoTask, options: BuildOptions): Specification.DoTask {
+function buildingFn(model: Specification.DoTask, options: BuildOptions): DoTaskIntersection {
   const instance = new Classes.DoTask(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.DoTask;
+  return (options.normalize ? instance.normalize() : instance) as DoTaskIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.DoTask`
- * @returns {Builder} A builder for `Specification.DoTask`
+ * A factory to create a builder proxy for the type `DoTaskIntersection`
+ * @returns {Builder} A builder for `DoTaskIntersection`
  */
-export const doTaskBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const doTaskBuilder = (
+  model?: Partial,
+): Builder, DoTaskIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/document-builder.ts b/src/lib/generated/builders/document-builder.ts
index fc7119a6..f8eb93a5 100644
--- a/src/lib/generated/builders/document-builder.ts
+++ b/src/lib/generated/builders/document-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { DocumentIntersection } from '../classes/document';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.Document} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.Document} The built object
+ * @returns {DocumentIntersection} The built object
  */
-function buildingFn(model: Specification.Document, options: BuildOptions): Specification.Document {
+function buildingFn(model: Specification.Document, options: BuildOptions): DocumentIntersection {
   const instance = new Classes.Document(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.Document;
+  return (options.normalize ? instance.normalize() : instance) as DocumentIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.Document`
- * @returns {Builder} A builder for `Specification.Document`
+ * A factory to create a builder proxy for the type `DocumentIntersection`
+ * @returns {Builder} A builder for `DocumentIntersection`
  */
-export const documentBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const documentBuilder = (
+  model?: Partial,
+): Builder, DocumentIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/duration-builder.ts b/src/lib/generated/builders/duration-builder.ts
index a40a9483..87bfaea0 100644
--- a/src/lib/generated/builders/duration-builder.ts
+++ b/src/lib/generated/builders/duration-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { DurationIntersection } from '../classes/duration';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.Duration} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.Duration} The built object
+ * @returns {DurationIntersection} The built object
  */
-function buildingFn(model: Specification.Duration, options: BuildOptions): Specification.Duration {
+function buildingFn(model: Specification.Duration, options: BuildOptions): DurationIntersection {
   const instance = new Classes.Duration(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.Duration;
+  return (options.normalize ? instance.normalize() : instance) as DurationIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.Duration`
- * @returns {Builder} A builder for `Specification.Duration`
+ * A factory to create a builder proxy for the type `DurationIntersection`
+ * @returns {Builder} A builder for `DurationIntersection`
  */
-export const durationBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const durationBuilder = (
+  model?: Partial,
+): Builder, DurationIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/duration-inline-builder.ts b/src/lib/generated/builders/duration-inline-builder.ts
index 709b6fa5..15aa68e8 100644
--- a/src/lib/generated/builders/duration-inline-builder.ts
+++ b/src/lib/generated/builders/duration-inline-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { DurationInlineIntersection } from '../classes/duration-inline';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.DurationInline} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.DurationInline} The built object
+ * @returns {DurationInlineIntersection} The built object
  */
-function buildingFn(model: Specification.DurationInline, options: BuildOptions): Specification.DurationInline {
+function buildingFn(model: Specification.DurationInline, options: BuildOptions): DurationInlineIntersection {
   const instance = new Classes.DurationInline(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.DurationInline;
+  return (options.normalize ? instance.normalize() : instance) as DurationInlineIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.DurationInline`
- * @returns {Builder} A builder for `Specification.DurationInline`
+ * A factory to create a builder proxy for the type `DurationInlineIntersection`
+ * @returns {Builder} A builder for `DurationInlineIntersection`
  */
 export const durationInlineBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, DurationInlineIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/emit-event-definition-builder.ts b/src/lib/generated/builders/emit-event-definition-builder.ts
index ae8ca8ab..f89df72c 100644
--- a/src/lib/generated/builders/emit-event-definition-builder.ts
+++ b/src/lib/generated/builders/emit-event-definition-builder.ts
@@ -22,27 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { EmitEventDefinitionIntersection } from '../classes/emit-event-definition';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.EmitEventDefinition} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.EmitEventDefinition} The built object
+ * @returns {EmitEventDefinitionIntersection} The built object
  */
-function buildingFn(
-  model: Specification.EmitEventDefinition,
-  options: BuildOptions,
-): Specification.EmitEventDefinition {
+function buildingFn(model: Specification.EmitEventDefinition, options: BuildOptions): EmitEventDefinitionIntersection {
   const instance = new Classes.EmitEventDefinition(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.EmitEventDefinition;
+  return (options.normalize ? instance.normalize() : instance) as EmitEventDefinitionIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.EmitEventDefinition`
- * @returns {Builder} A builder for `Specification.EmitEventDefinition`
+ * A factory to create a builder proxy for the type `EmitEventDefinitionIntersection`
+ * @returns {Builder} A builder for `EmitEventDefinitionIntersection`
  */
 export const emitEventDefinitionBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, EmitEventDefinitionIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/emit-event-with-builder.ts b/src/lib/generated/builders/emit-event-with-builder.ts
index bc4e0c6b..d96e5f7d 100644
--- a/src/lib/generated/builders/emit-event-with-builder.ts
+++ b/src/lib/generated/builders/emit-event-with-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { EmitEventWithIntersection } from '../classes/emit-event-with';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.EmitEventWith} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.EmitEventWith} The built object
+ * @returns {EmitEventWithIntersection} The built object
  */
-function buildingFn(model: Specification.EmitEventWith, options: BuildOptions): Specification.EmitEventWith {
+function buildingFn(model: Specification.EmitEventWith, options: BuildOptions): EmitEventWithIntersection {
   const instance = new Classes.EmitEventWith(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.EmitEventWith;
+  return (options.normalize ? instance.normalize() : instance) as EmitEventWithIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.EmitEventWith`
- * @returns {Builder} A builder for `Specification.EmitEventWith`
+ * A factory to create a builder proxy for the type `EmitEventWithIntersection`
+ * @returns {Builder} A builder for `EmitEventWithIntersection`
  */
 export const emitEventWithBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, EmitEventWithIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/emit-task-builder.ts b/src/lib/generated/builders/emit-task-builder.ts
index 4c2739b0..60313474 100644
--- a/src/lib/generated/builders/emit-task-builder.ts
+++ b/src/lib/generated/builders/emit-task-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { EmitTaskIntersection } from '../classes/emit-task';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.EmitTask} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.EmitTask} The built object
+ * @returns {EmitTaskIntersection} The built object
  */
-function buildingFn(model: Specification.EmitTask, options: BuildOptions): Specification.EmitTask {
+function buildingFn(model: Specification.EmitTask, options: BuildOptions): EmitTaskIntersection {
   const instance = new Classes.EmitTask(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.EmitTask;
+  return (options.normalize ? instance.normalize() : instance) as EmitTaskIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.EmitTask`
- * @returns {Builder} A builder for `Specification.EmitTask`
+ * A factory to create a builder proxy for the type `EmitTaskIntersection`
+ * @returns {Builder} A builder for `EmitTaskIntersection`
  */
-export const emitTaskBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const emitTaskBuilder = (
+  model?: Partial,
+): Builder, EmitTaskIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/emit-task-configuration-builder.ts b/src/lib/generated/builders/emit-task-configuration-builder.ts
index af232f1e..715fba1e 100644
--- a/src/lib/generated/builders/emit-task-configuration-builder.ts
+++ b/src/lib/generated/builders/emit-task-configuration-builder.ts
@@ -22,27 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { EmitTaskConfigurationIntersection } from '../classes/emit-task-configuration';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.EmitTaskConfiguration} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.EmitTaskConfiguration} The built object
+ * @returns {EmitTaskConfigurationIntersection} The built object
  */
 function buildingFn(
   model: Specification.EmitTaskConfiguration,
   options: BuildOptions,
-): Specification.EmitTaskConfiguration {
+): EmitTaskConfigurationIntersection {
   const instance = new Classes.EmitTaskConfiguration(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.EmitTaskConfiguration;
+  return (options.normalize ? instance.normalize() : instance) as EmitTaskConfigurationIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.EmitTaskConfiguration`
- * @returns {Builder} A builder for `Specification.EmitTaskConfiguration`
+ * A factory to create a builder proxy for the type `EmitTaskConfigurationIntersection`
+ * @returns {Builder} A builder for `EmitTaskConfigurationIntersection`
  */
 export const emitTaskConfigurationBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, EmitTaskConfigurationIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/endpoint-builder.ts b/src/lib/generated/builders/endpoint-builder.ts
index 4fa97076..0c397ee8 100644
--- a/src/lib/generated/builders/endpoint-builder.ts
+++ b/src/lib/generated/builders/endpoint-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { EndpointIntersection } from '../classes/endpoint';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.Endpoint} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.Endpoint} The built object
+ * @returns {EndpointIntersection} The built object
  */
-function buildingFn(model: Specification.Endpoint, options: BuildOptions): Specification.Endpoint {
+function buildingFn(model: Specification.Endpoint, options: BuildOptions): EndpointIntersection {
   const instance = new Classes.Endpoint(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.Endpoint;
+  return (options.normalize ? instance.normalize() : instance) as EndpointIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.Endpoint`
- * @returns {Builder} A builder for `Specification.Endpoint`
+ * A factory to create a builder proxy for the type `EndpointIntersection`
+ * @returns {Builder} A builder for `EndpointIntersection`
  */
-export const endpointBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const endpointBuilder = (
+  model?: Partial,
+): Builder, EndpointIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/endpoint-configuration-builder.ts b/src/lib/generated/builders/endpoint-configuration-builder.ts
index c47fe046..11fb85cc 100644
--- a/src/lib/generated/builders/endpoint-configuration-builder.ts
+++ b/src/lib/generated/builders/endpoint-configuration-builder.ts
@@ -22,27 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { EndpointConfigurationIntersection } from '../classes/endpoint-configuration';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.EndpointConfiguration} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.EndpointConfiguration} The built object
+ * @returns {EndpointConfigurationIntersection} The built object
  */
 function buildingFn(
   model: Specification.EndpointConfiguration,
   options: BuildOptions,
-): Specification.EndpointConfiguration {
+): EndpointConfigurationIntersection {
   const instance = new Classes.EndpointConfiguration(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.EndpointConfiguration;
+  return (options.normalize ? instance.normalize() : instance) as EndpointConfigurationIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.EndpointConfiguration`
- * @returns {Builder} A builder for `Specification.EndpointConfiguration`
+ * A factory to create a builder proxy for the type `EndpointConfigurationIntersection`
+ * @returns {Builder} A builder for `EndpointConfigurationIntersection`
  */
 export const endpointConfigurationBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, EndpointConfigurationIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/endpoint-uri-builder.ts b/src/lib/generated/builders/endpoint-uri-builder.ts
index e4e66124..3de7e83a 100644
--- a/src/lib/generated/builders/endpoint-uri-builder.ts
+++ b/src/lib/generated/builders/endpoint-uri-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { EndpointUriIntersection } from '../classes/endpoint-uri';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.EndpointUri} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.EndpointUri} The built object
+ * @returns {EndpointUriIntersection} The built object
  */
-function buildingFn(model: Specification.EndpointUri, options: BuildOptions): Specification.EndpointUri {
+function buildingFn(model: Specification.EndpointUri, options: BuildOptions): EndpointUriIntersection {
   const instance = new Classes.EndpointUri(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.EndpointUri;
+  return (options.normalize ? instance.normalize() : instance) as EndpointUriIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.EndpointUri`
- * @returns {Builder} A builder for `Specification.EndpointUri`
+ * A factory to create a builder proxy for the type `EndpointUriIntersection`
+ * @returns {Builder} A builder for `EndpointUriIntersection`
  */
-export const endpointUriBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const endpointUriBuilder = (
+  model?: Partial,
+): Builder, EndpointUriIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/error-builder.ts b/src/lib/generated/builders/error-builder.ts
index f203b6c3..0c4e6e02 100644
--- a/src/lib/generated/builders/error-builder.ts
+++ b/src/lib/generated/builders/error-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ErrorIntersection } from '../classes/error';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.Error} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.Error} The built object
+ * @returns {ErrorIntersection} The built object
  */
-function buildingFn(model: Specification.Error, options: BuildOptions): Specification.Error {
+function buildingFn(model: Specification.Error, options: BuildOptions): ErrorIntersection {
   const instance = new Classes.Error(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.Error;
+  return (options.normalize ? instance.normalize() : instance) as ErrorIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.Error`
- * @returns {Builder} A builder for `Specification.Error`
+ * A factory to create a builder proxy for the type `ErrorIntersection`
+ * @returns {Builder} A builder for `ErrorIntersection`
  */
-export const errorBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const errorBuilder = (
+  model?: Partial,
+): Builder, ErrorIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/error-instance-builder.ts b/src/lib/generated/builders/error-instance-builder.ts
index 7f8d6667..d0bf62ed 100644
--- a/src/lib/generated/builders/error-instance-builder.ts
+++ b/src/lib/generated/builders/error-instance-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ErrorInstanceIntersection } from '../classes/error-instance';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ErrorInstance} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ErrorInstance} The built object
+ * @returns {ErrorInstanceIntersection} The built object
  */
-function buildingFn(model: Specification.ErrorInstance, options: BuildOptions): Specification.ErrorInstance {
+function buildingFn(model: Specification.ErrorInstance, options: BuildOptions): ErrorInstanceIntersection {
   const instance = new Classes.ErrorInstance(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ErrorInstance;
+  return (options.normalize ? instance.normalize() : instance) as ErrorInstanceIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ErrorInstance`
- * @returns {Builder} A builder for `Specification.ErrorInstance`
+ * A factory to create a builder proxy for the type `ErrorInstanceIntersection`
+ * @returns {Builder} A builder for `ErrorInstanceIntersection`
  */
 export const errorInstanceBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, ErrorInstanceIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/error-type-builder.ts b/src/lib/generated/builders/error-type-builder.ts
index 50cfc0d4..49b5d8cc 100644
--- a/src/lib/generated/builders/error-type-builder.ts
+++ b/src/lib/generated/builders/error-type-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ErrorTypeIntersection } from '../classes/error-type';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ErrorType} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ErrorType} The built object
+ * @returns {ErrorTypeIntersection} The built object
  */
-function buildingFn(model: Specification.ErrorType, options: BuildOptions): Specification.ErrorType {
+function buildingFn(model: Specification.ErrorType, options: BuildOptions): ErrorTypeIntersection {
   const instance = new Classes.ErrorType(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ErrorType;
+  return (options.normalize ? instance.normalize() : instance) as ErrorTypeIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ErrorType`
- * @returns {Builder} A builder for `Specification.ErrorType`
+ * A factory to create a builder proxy for the type `ErrorTypeIntersection`
+ * @returns {Builder} A builder for `ErrorTypeIntersection`
  */
-export const errorTypeBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const errorTypeBuilder = (
+  model?: Partial,
+): Builder, ErrorTypeIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/event-consumption-strategy-builder.ts b/src/lib/generated/builders/event-consumption-strategy-builder.ts
index a783448a..94d9e939 100644
--- a/src/lib/generated/builders/event-consumption-strategy-builder.ts
+++ b/src/lib/generated/builders/event-consumption-strategy-builder.ts
@@ -22,28 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { EventConsumptionStrategyIntersection } from '../classes/event-consumption-strategy';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.EventConsumptionStrategy} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.EventConsumptionStrategy} The built object
+ * @returns {EventConsumptionStrategyIntersection} The built object
  */
 function buildingFn(
   model: Specification.EventConsumptionStrategy,
   options: BuildOptions,
-): Specification.EventConsumptionStrategy {
+): EventConsumptionStrategyIntersection {
   const instance = new Classes.EventConsumptionStrategy(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.EventConsumptionStrategy;
+  return (options.normalize ? instance.normalize() : instance) as EventConsumptionStrategyIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.EventConsumptionStrategy`
- * @returns {Builder} A builder for `Specification.EventConsumptionStrategy`
+ * A factory to create a builder proxy for the type `EventConsumptionStrategyIntersection`
+ * @returns {Builder} A builder for `EventConsumptionStrategyIntersection`
  */
 export const eventConsumptionStrategyBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder, EventConsumptionStrategyIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/event-dataschema-builder.ts b/src/lib/generated/builders/event-dataschema-builder.ts
index f2c270b5..81436195 100644
--- a/src/lib/generated/builders/event-dataschema-builder.ts
+++ b/src/lib/generated/builders/event-dataschema-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { EventDataschemaIntersection } from '../classes/event-dataschema';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.EventDataschema} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.EventDataschema} The built object
+ * @returns {EventDataschemaIntersection} The built object
  */
-function buildingFn(model: Specification.EventDataschema, options: BuildOptions): Specification.EventDataschema {
+function buildingFn(model: Specification.EventDataschema, options: BuildOptions): EventDataschemaIntersection {
   const instance = new Classes.EventDataschema(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.EventDataschema;
+  return (options.normalize ? instance.normalize() : instance) as EventDataschemaIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.EventDataschema`
- * @returns {Builder} A builder for `Specification.EventDataschema`
+ * A factory to create a builder proxy for the type `EventDataschemaIntersection`
+ * @returns {Builder} A builder for `EventDataschemaIntersection`
  */
 export const eventDataschemaBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, EventDataschemaIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/event-filter-builder.ts b/src/lib/generated/builders/event-filter-builder.ts
index e0f44403..d1c9c383 100644
--- a/src/lib/generated/builders/event-filter-builder.ts
+++ b/src/lib/generated/builders/event-filter-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { EventFilterIntersection } from '../classes/event-filter';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.EventFilter} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.EventFilter} The built object
+ * @returns {EventFilterIntersection} The built object
  */
-function buildingFn(model: Specification.EventFilter, options: BuildOptions): Specification.EventFilter {
+function buildingFn(model: Specification.EventFilter, options: BuildOptions): EventFilterIntersection {
   const instance = new Classes.EventFilter(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.EventFilter;
+  return (options.normalize ? instance.normalize() : instance) as EventFilterIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.EventFilter`
- * @returns {Builder} A builder for `Specification.EventFilter`
+ * A factory to create a builder proxy for the type `EventFilterIntersection`
+ * @returns {Builder} A builder for `EventFilterIntersection`
  */
-export const eventFilterBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const eventFilterBuilder = (
+  model?: Partial,
+): Builder, EventFilterIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/event-filter-correlate-builder.ts b/src/lib/generated/builders/event-filter-correlate-builder.ts
index 422c9a9c..6fbafb61 100644
--- a/src/lib/generated/builders/event-filter-correlate-builder.ts
+++ b/src/lib/generated/builders/event-filter-correlate-builder.ts
@@ -22,27 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { EventFilterCorrelateIntersection } from '../classes/event-filter-correlate';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.EventFilterCorrelate} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.EventFilterCorrelate} The built object
+ * @returns {EventFilterCorrelateIntersection} The built object
  */
 function buildingFn(
   model: Specification.EventFilterCorrelate,
   options: BuildOptions,
-): Specification.EventFilterCorrelate {
+): EventFilterCorrelateIntersection {
   const instance = new Classes.EventFilterCorrelate(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.EventFilterCorrelate;
+  return (options.normalize ? instance.normalize() : instance) as EventFilterCorrelateIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.EventFilterCorrelate`
- * @returns {Builder} A builder for `Specification.EventFilterCorrelate`
+ * A factory to create a builder proxy for the type `EventFilterCorrelateIntersection`
+ * @returns {Builder} A builder for `EventFilterCorrelateIntersection`
  */
 export const eventFilterCorrelateBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, EventFilterCorrelateIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/event-source-builder.ts b/src/lib/generated/builders/event-source-builder.ts
index bffe682c..449b00ba 100644
--- a/src/lib/generated/builders/event-source-builder.ts
+++ b/src/lib/generated/builders/event-source-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { EventSourceIntersection } from '../classes/event-source';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.EventSource} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.EventSource} The built object
+ * @returns {EventSourceIntersection} The built object
  */
-function buildingFn(model: Specification.EventSource, options: BuildOptions): Specification.EventSource {
+function buildingFn(model: Specification.EventSource, options: BuildOptions): EventSourceIntersection {
   const instance = new Classes.EventSource(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.EventSource;
+  return (options.normalize ? instance.normalize() : instance) as EventSourceIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.EventSource`
- * @returns {Builder} A builder for `Specification.EventSource`
+ * A factory to create a builder proxy for the type `EventSourceIntersection`
+ * @returns {Builder} A builder for `EventSourceIntersection`
  */
-export const eventSourceBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const eventSourceBuilder = (
+  model?: Partial,
+): Builder, EventSourceIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/event-time-builder.ts b/src/lib/generated/builders/event-time-builder.ts
index b4504de9..b9499cb0 100644
--- a/src/lib/generated/builders/event-time-builder.ts
+++ b/src/lib/generated/builders/event-time-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { EventTimeIntersection } from '../classes/event-time';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.EventTime} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.EventTime} The built object
+ * @returns {EventTimeIntersection} The built object
  */
-function buildingFn(model: Specification.EventTime, options: BuildOptions): Specification.EventTime {
+function buildingFn(model: Specification.EventTime, options: BuildOptions): EventTimeIntersection {
   const instance = new Classes.EventTime(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.EventTime;
+  return (options.normalize ? instance.normalize() : instance) as EventTimeIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.EventTime`
- * @returns {Builder} A builder for `Specification.EventTime`
+ * A factory to create a builder proxy for the type `EventTimeIntersection`
+ * @returns {Builder} A builder for `EventTimeIntersection`
  */
-export const eventTimeBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const eventTimeBuilder = (
+  model?: Partial,
+): Builder, EventTimeIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/exponential-back-off-builder.ts b/src/lib/generated/builders/exponential-back-off-builder.ts
index af24cc13..df4d6bbb 100644
--- a/src/lib/generated/builders/exponential-back-off-builder.ts
+++ b/src/lib/generated/builders/exponential-back-off-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ExponentialBackOffIntersection } from '../classes/exponential-back-off';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ExponentialBackOff} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ExponentialBackOff} The built object
+ * @returns {ExponentialBackOffIntersection} The built object
  */
-function buildingFn(model: Specification.ExponentialBackOff, options: BuildOptions): Specification.ExponentialBackOff {
+function buildingFn(model: Specification.ExponentialBackOff, options: BuildOptions): ExponentialBackOffIntersection {
   const instance = new Classes.ExponentialBackOff(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ExponentialBackOff;
+  return (options.normalize ? instance.normalize() : instance) as ExponentialBackOffIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ExponentialBackOff`
- * @returns {Builder} A builder for `Specification.ExponentialBackOff`
+ * A factory to create a builder proxy for the type `ExponentialBackOffIntersection`
+ * @returns {Builder} A builder for `ExponentialBackOffIntersection`
  */
 export const exponentialBackOffBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, ExponentialBackOffIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/export-as-builder.ts b/src/lib/generated/builders/export-as-builder.ts
index 5e15fd81..e09e270f 100644
--- a/src/lib/generated/builders/export-as-builder.ts
+++ b/src/lib/generated/builders/export-as-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ExportAsIntersection } from '../classes/export-as';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ExportAs} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ExportAs} The built object
+ * @returns {ExportAsIntersection} The built object
  */
-function buildingFn(model: Specification.ExportAs, options: BuildOptions): Specification.ExportAs {
+function buildingFn(model: Specification.ExportAs, options: BuildOptions): ExportAsIntersection {
   const instance = new Classes.ExportAs(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ExportAs;
+  return (options.normalize ? instance.normalize() : instance) as ExportAsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ExportAs`
- * @returns {Builder} A builder for `Specification.ExportAs`
+ * A factory to create a builder proxy for the type `ExportAsIntersection`
+ * @returns {Builder} A builder for `ExportAsIntersection`
  */
-export const exportAsBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const exportAsBuilder = (
+  model?: Partial,
+): Builder, ExportAsIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/export-builder.ts b/src/lib/generated/builders/export-builder.ts
index dc828a61..c7255e64 100644
--- a/src/lib/generated/builders/export-builder.ts
+++ b/src/lib/generated/builders/export-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ExportIntersection } from '../classes/export';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.Export} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.Export} The built object
+ * @returns {ExportIntersection} The built object
  */
-function buildingFn(model: Specification.Export, options: BuildOptions): Specification.Export {
+function buildingFn(model: Specification.Export, options: BuildOptions): ExportIntersection {
   const instance = new Classes.Export(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.Export;
+  return (options.normalize ? instance.normalize() : instance) as ExportIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.Export`
- * @returns {Builder} A builder for `Specification.Export`
+ * A factory to create a builder proxy for the type `ExportIntersection`
+ * @returns {Builder} A builder for `ExportIntersection`
  */
-export const exportBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const exportBuilder = (
+  model?: Partial,
+): Builder, ExportIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/extension-builder.ts b/src/lib/generated/builders/extension-builder.ts
index 01e70963..f9f0b71c 100644
--- a/src/lib/generated/builders/extension-builder.ts
+++ b/src/lib/generated/builders/extension-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ExtensionIntersection } from '../classes/extension';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.Extension} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.Extension} The built object
+ * @returns {ExtensionIntersection} The built object
  */
-function buildingFn(model: Specification.Extension, options: BuildOptions): Specification.Extension {
+function buildingFn(model: Specification.Extension, options: BuildOptions): ExtensionIntersection {
   const instance = new Classes.Extension(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.Extension;
+  return (options.normalize ? instance.normalize() : instance) as ExtensionIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.Extension`
- * @returns {Builder} A builder for `Specification.Extension`
+ * A factory to create a builder proxy for the type `ExtensionIntersection`
+ * @returns {Builder} A builder for `ExtensionIntersection`
  */
-export const extensionBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const extensionBuilder = (
+  model?: Partial,
+): Builder, ExtensionIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/extension-item-builder.ts b/src/lib/generated/builders/extension-item-builder.ts
index 4e1dc6d9..d99c7194 100644
--- a/src/lib/generated/builders/extension-item-builder.ts
+++ b/src/lib/generated/builders/extension-item-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ExtensionItemIntersection } from '../classes/extension-item';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ExtensionItem} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ExtensionItem} The built object
+ * @returns {ExtensionItemIntersection} The built object
  */
-function buildingFn(model: Specification.ExtensionItem, options: BuildOptions): Specification.ExtensionItem {
+function buildingFn(model: Specification.ExtensionItem, options: BuildOptions): ExtensionItemIntersection {
   const instance = new Classes.ExtensionItem(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ExtensionItem;
+  return (options.normalize ? instance.normalize() : instance) as ExtensionItemIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ExtensionItem`
- * @returns {Builder} A builder for `Specification.ExtensionItem`
+ * A factory to create a builder proxy for the type `ExtensionItemIntersection`
+ * @returns {Builder} A builder for `ExtensionItemIntersection`
  */
 export const extensionItemBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, ExtensionItemIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/external-resource-builder.ts b/src/lib/generated/builders/external-resource-builder.ts
index d60c2151..d03ae38d 100644
--- a/src/lib/generated/builders/external-resource-builder.ts
+++ b/src/lib/generated/builders/external-resource-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ExternalResourceIntersection } from '../classes/external-resource';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ExternalResource} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ExternalResource} The built object
+ * @returns {ExternalResourceIntersection} The built object
  */
-function buildingFn(model: Specification.ExternalResource, options: BuildOptions): Specification.ExternalResource {
+function buildingFn(model: Specification.ExternalResource, options: BuildOptions): ExternalResourceIntersection {
   const instance = new Classes.ExternalResource(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ExternalResource;
+  return (options.normalize ? instance.normalize() : instance) as ExternalResourceIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ExternalResource`
- * @returns {Builder} A builder for `Specification.ExternalResource`
+ * A factory to create a builder proxy for the type `ExternalResourceIntersection`
+ * @returns {Builder} A builder for `ExternalResourceIntersection`
  */
 export const externalResourceBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, ExternalResourceIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/external-script-builder.ts b/src/lib/generated/builders/external-script-builder.ts
index 28281b3e..6e5f29e1 100644
--- a/src/lib/generated/builders/external-script-builder.ts
+++ b/src/lib/generated/builders/external-script-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ExternalScriptIntersection } from '../classes/external-script';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ExternalScript} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ExternalScript} The built object
+ * @returns {ExternalScriptIntersection} The built object
  */
-function buildingFn(model: Specification.ExternalScript, options: BuildOptions): Specification.ExternalScript {
+function buildingFn(model: Specification.ExternalScript, options: BuildOptions): ExternalScriptIntersection {
   const instance = new Classes.ExternalScript(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ExternalScript;
+  return (options.normalize ? instance.normalize() : instance) as ExternalScriptIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ExternalScript`
- * @returns {Builder} A builder for `Specification.ExternalScript`
+ * A factory to create a builder proxy for the type `ExternalScriptIntersection`
+ * @returns {Builder} A builder for `ExternalScriptIntersection`
  */
 export const externalScriptBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, ExternalScriptIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/flow-directive-builder.ts b/src/lib/generated/builders/flow-directive-builder.ts
index 13947c04..44f2a0ce 100644
--- a/src/lib/generated/builders/flow-directive-builder.ts
+++ b/src/lib/generated/builders/flow-directive-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { FlowDirectiveIntersection } from '../classes/flow-directive';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.FlowDirective} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.FlowDirective} The built object
+ * @returns {FlowDirectiveIntersection} The built object
  */
-function buildingFn(model: Specification.FlowDirective, options: BuildOptions): Specification.FlowDirective {
+function buildingFn(model: Specification.FlowDirective, options: BuildOptions): FlowDirectiveIntersection {
   const instance = new Classes.FlowDirective(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.FlowDirective;
+  return (options.normalize ? instance.normalize() : instance) as FlowDirectiveIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.FlowDirective`
- * @returns {Builder} A builder for `Specification.FlowDirective`
+ * A factory to create a builder proxy for the type `FlowDirectiveIntersection`
+ * @returns {Builder} A builder for `FlowDirectiveIntersection`
  */
 export const flowDirectiveBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, FlowDirectiveIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/for-task-builder.ts b/src/lib/generated/builders/for-task-builder.ts
index bdd3db38..2e56e415 100644
--- a/src/lib/generated/builders/for-task-builder.ts
+++ b/src/lib/generated/builders/for-task-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ForTaskIntersection } from '../classes/for-task';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ForTask} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ForTask} The built object
+ * @returns {ForTaskIntersection} The built object
  */
-function buildingFn(model: Specification.ForTask, options: BuildOptions): Specification.ForTask {
+function buildingFn(model: Specification.ForTask, options: BuildOptions): ForTaskIntersection {
   const instance = new Classes.ForTask(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ForTask;
+  return (options.normalize ? instance.normalize() : instance) as ForTaskIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ForTask`
- * @returns {Builder} A builder for `Specification.ForTask`
+ * A factory to create a builder proxy for the type `ForTaskIntersection`
+ * @returns {Builder} A builder for `ForTaskIntersection`
  */
-export const forTaskBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const forTaskBuilder = (
+  model?: Partial,
+): Builder, ForTaskIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/for-task-configuration-builder.ts b/src/lib/generated/builders/for-task-configuration-builder.ts
index 4b011958..080b053e 100644
--- a/src/lib/generated/builders/for-task-configuration-builder.ts
+++ b/src/lib/generated/builders/for-task-configuration-builder.ts
@@ -22,27 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ForTaskConfigurationIntersection } from '../classes/for-task-configuration';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ForTaskConfiguration} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ForTaskConfiguration} The built object
+ * @returns {ForTaskConfigurationIntersection} The built object
  */
 function buildingFn(
   model: Specification.ForTaskConfiguration,
   options: BuildOptions,
-): Specification.ForTaskConfiguration {
+): ForTaskConfigurationIntersection {
   const instance = new Classes.ForTaskConfiguration(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ForTaskConfiguration;
+  return (options.normalize ? instance.normalize() : instance) as ForTaskConfigurationIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ForTaskConfiguration`
- * @returns {Builder} A builder for `Specification.ForTaskConfiguration`
+ * A factory to create a builder proxy for the type `ForTaskConfigurationIntersection`
+ * @returns {Builder} A builder for `ForTaskConfigurationIntersection`
  */
 export const forTaskConfigurationBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, ForTaskConfigurationIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/fork-task-builder.ts b/src/lib/generated/builders/fork-task-builder.ts
index d772a3e3..0c79c54c 100644
--- a/src/lib/generated/builders/fork-task-builder.ts
+++ b/src/lib/generated/builders/fork-task-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ForkTaskIntersection } from '../classes/fork-task';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ForkTask} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ForkTask} The built object
+ * @returns {ForkTaskIntersection} The built object
  */
-function buildingFn(model: Specification.ForkTask, options: BuildOptions): Specification.ForkTask {
+function buildingFn(model: Specification.ForkTask, options: BuildOptions): ForkTaskIntersection {
   const instance = new Classes.ForkTask(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ForkTask;
+  return (options.normalize ? instance.normalize() : instance) as ForkTaskIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ForkTask`
- * @returns {Builder} A builder for `Specification.ForkTask`
+ * A factory to create a builder proxy for the type `ForkTaskIntersection`
+ * @returns {Builder} A builder for `ForkTaskIntersection`
  */
-export const forkTaskBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const forkTaskBuilder = (
+  model?: Partial,
+): Builder, ForkTaskIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/fork-task-configuration-builder.ts b/src/lib/generated/builders/fork-task-configuration-builder.ts
index e9f5c732..fbfecb67 100644
--- a/src/lib/generated/builders/fork-task-configuration-builder.ts
+++ b/src/lib/generated/builders/fork-task-configuration-builder.ts
@@ -22,27 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ForkTaskConfigurationIntersection } from '../classes/fork-task-configuration';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ForkTaskConfiguration} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ForkTaskConfiguration} The built object
+ * @returns {ForkTaskConfigurationIntersection} The built object
  */
 function buildingFn(
   model: Specification.ForkTaskConfiguration,
   options: BuildOptions,
-): Specification.ForkTaskConfiguration {
+): ForkTaskConfigurationIntersection {
   const instance = new Classes.ForkTaskConfiguration(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ForkTaskConfiguration;
+  return (options.normalize ? instance.normalize() : instance) as ForkTaskConfigurationIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ForkTaskConfiguration`
- * @returns {Builder} A builder for `Specification.ForkTaskConfiguration`
+ * A factory to create a builder proxy for the type `ForkTaskConfigurationIntersection`
+ * @returns {Builder} A builder for `ForkTaskConfigurationIntersection`
  */
 export const forkTaskConfigurationBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, ForkTaskConfigurationIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/function-arguments-builder.ts b/src/lib/generated/builders/function-arguments-builder.ts
index 8cc6b538..a2523c12 100644
--- a/src/lib/generated/builders/function-arguments-builder.ts
+++ b/src/lib/generated/builders/function-arguments-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { FunctionArgumentsIntersection } from '../classes/function-arguments';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.FunctionArguments} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.FunctionArguments} The built object
+ * @returns {FunctionArgumentsIntersection} The built object
  */
-function buildingFn(model: Specification.FunctionArguments, options: BuildOptions): Specification.FunctionArguments {
+function buildingFn(model: Specification.FunctionArguments, options: BuildOptions): FunctionArgumentsIntersection {
   const instance = new Classes.FunctionArguments(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.FunctionArguments;
+  return (options.normalize ? instance.normalize() : instance) as FunctionArgumentsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.FunctionArguments`
- * @returns {Builder} A builder for `Specification.FunctionArguments`
+ * A factory to create a builder proxy for the type `FunctionArgumentsIntersection`
+ * @returns {Builder} A builder for `FunctionArgumentsIntersection`
  */
 export const functionArgumentsBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, FunctionArgumentsIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/grpc-arguments-builder.ts b/src/lib/generated/builders/grpc-arguments-builder.ts
index 0b15d0a2..e8294dee 100644
--- a/src/lib/generated/builders/grpc-arguments-builder.ts
+++ b/src/lib/generated/builders/grpc-arguments-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { GRPCArgumentsIntersection } from '../classes/grpc-arguments';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.GRPCArguments} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.GRPCArguments} The built object
+ * @returns {GRPCArgumentsIntersection} The built object
  */
-function buildingFn(model: Specification.GRPCArguments, options: BuildOptions): Specification.GRPCArguments {
+function buildingFn(model: Specification.GRPCArguments, options: BuildOptions): GRPCArgumentsIntersection {
   const instance = new Classes.GRPCArguments(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.GRPCArguments;
+  return (options.normalize ? instance.normalize() : instance) as GRPCArgumentsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.GRPCArguments`
- * @returns {Builder} A builder for `Specification.GRPCArguments`
+ * A factory to create a builder proxy for the type `GRPCArgumentsIntersection`
+ * @returns {Builder} A builder for `GRPCArgumentsIntersection`
  */
 export const gRPCArgumentsBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, GRPCArgumentsIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/http-arguments-builder.ts b/src/lib/generated/builders/http-arguments-builder.ts
index 8c7e1cae..3997f63e 100644
--- a/src/lib/generated/builders/http-arguments-builder.ts
+++ b/src/lib/generated/builders/http-arguments-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { HTTPArgumentsIntersection } from '../classes/http-arguments';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.HTTPArguments} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.HTTPArguments} The built object
+ * @returns {HTTPArgumentsIntersection} The built object
  */
-function buildingFn(model: Specification.HTTPArguments, options: BuildOptions): Specification.HTTPArguments {
+function buildingFn(model: Specification.HTTPArguments, options: BuildOptions): HTTPArgumentsIntersection {
   const instance = new Classes.HTTPArguments(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.HTTPArguments;
+  return (options.normalize ? instance.normalize() : instance) as HTTPArgumentsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.HTTPArguments`
- * @returns {Builder} A builder for `Specification.HTTPArguments`
+ * A factory to create a builder proxy for the type `HTTPArgumentsIntersection`
+ * @returns {Builder} A builder for `HTTPArgumentsIntersection`
  */
 export const hTTPArgumentsBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, HTTPArgumentsIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/inline-script-builder.ts b/src/lib/generated/builders/inline-script-builder.ts
index feb5830f..6dfca93d 100644
--- a/src/lib/generated/builders/inline-script-builder.ts
+++ b/src/lib/generated/builders/inline-script-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { InlineScriptIntersection } from '../classes/inline-script';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.InlineScript} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.InlineScript} The built object
+ * @returns {InlineScriptIntersection} The built object
  */
-function buildingFn(model: Specification.InlineScript, options: BuildOptions): Specification.InlineScript {
+function buildingFn(model: Specification.InlineScript, options: BuildOptions): InlineScriptIntersection {
   const instance = new Classes.InlineScript(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.InlineScript;
+  return (options.normalize ? instance.normalize() : instance) as InlineScriptIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.InlineScript`
- * @returns {Builder} A builder for `Specification.InlineScript`
+ * A factory to create a builder proxy for the type `InlineScriptIntersection`
+ * @returns {Builder} A builder for `InlineScriptIntersection`
  */
-export const inlineScriptBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const inlineScriptBuilder = (
+  model?: Partial,
+): Builder, InlineScriptIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/input-builder.ts b/src/lib/generated/builders/input-builder.ts
index 15c68c82..f7bb11eb 100644
--- a/src/lib/generated/builders/input-builder.ts
+++ b/src/lib/generated/builders/input-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { InputIntersection } from '../classes/input';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.Input} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.Input} The built object
+ * @returns {InputIntersection} The built object
  */
-function buildingFn(model: Specification.Input, options: BuildOptions): Specification.Input {
+function buildingFn(model: Specification.Input, options: BuildOptions): InputIntersection {
   const instance = new Classes.Input(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.Input;
+  return (options.normalize ? instance.normalize() : instance) as InputIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.Input`
- * @returns {Builder} A builder for `Specification.Input`
+ * A factory to create a builder proxy for the type `InputIntersection`
+ * @returns {Builder} A builder for `InputIntersection`
  */
-export const inputBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const inputBuilder = (
+  model?: Partial,
+): Builder, InputIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/input-from-builder.ts b/src/lib/generated/builders/input-from-builder.ts
index 3fb40b4d..f69c64cc 100644
--- a/src/lib/generated/builders/input-from-builder.ts
+++ b/src/lib/generated/builders/input-from-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { InputFromIntersection } from '../classes/input-from';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.InputFrom} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.InputFrom} The built object
+ * @returns {InputFromIntersection} The built object
  */
-function buildingFn(model: Specification.InputFrom, options: BuildOptions): Specification.InputFrom {
+function buildingFn(model: Specification.InputFrom, options: BuildOptions): InputFromIntersection {
   const instance = new Classes.InputFrom(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.InputFrom;
+  return (options.normalize ? instance.normalize() : instance) as InputFromIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.InputFrom`
- * @returns {Builder} A builder for `Specification.InputFrom`
+ * A factory to create a builder proxy for the type `InputFromIntersection`
+ * @returns {Builder} A builder for `InputFromIntersection`
  */
-export const inputFromBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const inputFromBuilder = (
+  model?: Partial,
+): Builder, InputFromIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/linear-backoff-builder.ts b/src/lib/generated/builders/linear-backoff-builder.ts
index c28cf2b0..deeb0ea2 100644
--- a/src/lib/generated/builders/linear-backoff-builder.ts
+++ b/src/lib/generated/builders/linear-backoff-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { LinearBackoffIntersection } from '../classes/linear-backoff';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.LinearBackoff} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.LinearBackoff} The built object
+ * @returns {LinearBackoffIntersection} The built object
  */
-function buildingFn(model: Specification.LinearBackoff, options: BuildOptions): Specification.LinearBackoff {
+function buildingFn(model: Specification.LinearBackoff, options: BuildOptions): LinearBackoffIntersection {
   const instance = new Classes.LinearBackoff(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.LinearBackoff;
+  return (options.normalize ? instance.normalize() : instance) as LinearBackoffIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.LinearBackoff`
- * @returns {Builder} A builder for `Specification.LinearBackoff`
+ * A factory to create a builder proxy for the type `LinearBackoffIntersection`
+ * @returns {Builder} A builder for `LinearBackoffIntersection`
  */
 export const linearBackoffBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, LinearBackoffIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/listen-task-builder.ts b/src/lib/generated/builders/listen-task-builder.ts
index d1b3a320..597b735a 100644
--- a/src/lib/generated/builders/listen-task-builder.ts
+++ b/src/lib/generated/builders/listen-task-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ListenTaskIntersection } from '../classes/listen-task';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ListenTask} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ListenTask} The built object
+ * @returns {ListenTaskIntersection} The built object
  */
-function buildingFn(model: Specification.ListenTask, options: BuildOptions): Specification.ListenTask {
+function buildingFn(model: Specification.ListenTask, options: BuildOptions): ListenTaskIntersection {
   const instance = new Classes.ListenTask(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ListenTask;
+  return (options.normalize ? instance.normalize() : instance) as ListenTaskIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ListenTask`
- * @returns {Builder} A builder for `Specification.ListenTask`
+ * A factory to create a builder proxy for the type `ListenTaskIntersection`
+ * @returns {Builder} A builder for `ListenTaskIntersection`
  */
-export const listenTaskBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const listenTaskBuilder = (
+  model?: Partial,
+): Builder, ListenTaskIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/listen-task-configuration-builder.ts b/src/lib/generated/builders/listen-task-configuration-builder.ts
index 7db2992b..60feb31e 100644
--- a/src/lib/generated/builders/listen-task-configuration-builder.ts
+++ b/src/lib/generated/builders/listen-task-configuration-builder.ts
@@ -22,27 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ListenTaskConfigurationIntersection } from '../classes/listen-task-configuration';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ListenTaskConfiguration} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ListenTaskConfiguration} The built object
+ * @returns {ListenTaskConfigurationIntersection} The built object
  */
 function buildingFn(
   model: Specification.ListenTaskConfiguration,
   options: BuildOptions,
-): Specification.ListenTaskConfiguration {
+): ListenTaskConfigurationIntersection {
   const instance = new Classes.ListenTaskConfiguration(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ListenTaskConfiguration;
+  return (options.normalize ? instance.normalize() : instance) as ListenTaskConfigurationIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ListenTaskConfiguration`
- * @returns {Builder} A builder for `Specification.ListenTaskConfiguration`
+ * A factory to create a builder proxy for the type `ListenTaskConfigurationIntersection`
+ * @returns {Builder} A builder for `ListenTaskConfigurationIntersection`
  */
 export const listenTaskConfigurationBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, ListenTaskConfigurationIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/oauth2-autenthication-data-audiences-builder.ts b/src/lib/generated/builders/oauth2-autenthication-data-audiences-builder.ts
index 54839c89..da49de46 100644
--- a/src/lib/generated/builders/oauth2-autenthication-data-audiences-builder.ts
+++ b/src/lib/generated/builders/oauth2-autenthication-data-audiences-builder.ts
@@ -22,27 +22,31 @@
 
 import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { OAuth2AutenthicationDataAudiencesIntersection } from '../classes/oauth2-autenthication-data-audiences';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying array
  * @param {Specification.OAuth2AutenthicationDataAudiences} model The proxied array
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.OAuth2AutenthicationDataAudiences} The built array
+ * @returns {OAuth2AutenthicationDataAudiencesIntersection} The built array
  */
 function buildingFn(
   model: Specification.OAuth2AutenthicationDataAudiences,
   options: BuildOptions,
-): Specification.OAuth2AutenthicationDataAudiences {
+): OAuth2AutenthicationDataAudiencesIntersection {
   const instance = new Classes.OAuth2AutenthicationDataAudiences(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2AutenthicationDataAudiences;
+  return (options.normalize
+    ? instance.normalize()
+    : instance) as unknown as OAuth2AutenthicationDataAudiencesIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.OAuth2AutenthicationDataAudiences`
- * @returns {ArrayBuilder} A builder for `Specification.OAuth2AutenthicationDataAudiences`
+ * A factory to create a builder proxy for the type `OAuth2AutenthicationDataAudiencesIntersection`
+ * @returns {ArrayBuilder} A builder for `OAuth2AutenthicationDataAudiencesIntersection`
  */
 export const oAuth2AutenthicationDataAudiencesBuilder = (
   model?: Specification.OAuth2AutenthicationDataAudiences,
-): ArrayBuilder => arrayBuilder(model, buildingFn);
+): ArrayBuilder =>
+  arrayBuilder(model, buildingFn);
diff --git a/src/lib/generated/builders/oauth2-autenthication-data-builder.ts b/src/lib/generated/builders/oauth2-autenthication-data-builder.ts
index 32147621..42f476a3 100644
--- a/src/lib/generated/builders/oauth2-autenthication-data-builder.ts
+++ b/src/lib/generated/builders/oauth2-autenthication-data-builder.ts
@@ -22,28 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { OAuth2AutenthicationDataIntersection } from '../classes/oauth2-autenthication-data';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.OAuth2AutenthicationData} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.OAuth2AutenthicationData} The built object
+ * @returns {OAuth2AutenthicationDataIntersection} The built object
  */
 function buildingFn(
   model: Specification.OAuth2AutenthicationData,
   options: BuildOptions,
-): Specification.OAuth2AutenthicationData {
+): OAuth2AutenthicationDataIntersection {
   const instance = new Classes.OAuth2AutenthicationData(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2AutenthicationData;
+  return (options.normalize ? instance.normalize() : instance) as OAuth2AutenthicationDataIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.OAuth2AutenthicationData`
- * @returns {Builder} A builder for `Specification.OAuth2AutenthicationData`
+ * A factory to create a builder proxy for the type `OAuth2AutenthicationDataIntersection`
+ * @returns {Builder} A builder for `OAuth2AutenthicationDataIntersection`
  */
 export const oAuth2AutenthicationDataBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder, OAuth2AutenthicationDataIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/oauth2-autenthication-data-client-builder.ts b/src/lib/generated/builders/oauth2-autenthication-data-client-builder.ts
index d460fef3..dcbc5fde 100644
--- a/src/lib/generated/builders/oauth2-autenthication-data-client-builder.ts
+++ b/src/lib/generated/builders/oauth2-autenthication-data-client-builder.ts
@@ -22,28 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { OAuth2AutenthicationDataClientIntersection } from '../classes/oauth2-autenthication-data-client';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.OAuth2AutenthicationDataClient} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.OAuth2AutenthicationDataClient} The built object
+ * @returns {OAuth2AutenthicationDataClientIntersection} The built object
  */
 function buildingFn(
   model: Specification.OAuth2AutenthicationDataClient,
   options: BuildOptions,
-): Specification.OAuth2AutenthicationDataClient {
+): OAuth2AutenthicationDataClientIntersection {
   const instance = new Classes.OAuth2AutenthicationDataClient(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2AutenthicationDataClient;
+  return (options.normalize ? instance.normalize() : instance) as OAuth2AutenthicationDataClientIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.OAuth2AutenthicationDataClient`
- * @returns {Builder} A builder for `Specification.OAuth2AutenthicationDataClient`
+ * A factory to create a builder proxy for the type `OAuth2AutenthicationDataClientIntersection`
+ * @returns {Builder} A builder for `OAuth2AutenthicationDataClientIntersection`
  */
 export const oAuth2AutenthicationDataClientBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder, OAuth2AutenthicationDataClientIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/oauth2-autenthication-data-scopes-builder.ts b/src/lib/generated/builders/oauth2-autenthication-data-scopes-builder.ts
index bf38a980..54bf64cc 100644
--- a/src/lib/generated/builders/oauth2-autenthication-data-scopes-builder.ts
+++ b/src/lib/generated/builders/oauth2-autenthication-data-scopes-builder.ts
@@ -22,27 +22,29 @@
 
 import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { OAuth2AutenthicationDataScopesIntersection } from '../classes/oauth2-autenthication-data-scopes';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying array
  * @param {Specification.OAuth2AutenthicationDataScopes} model The proxied array
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.OAuth2AutenthicationDataScopes} The built array
+ * @returns {OAuth2AutenthicationDataScopesIntersection} The built array
  */
 function buildingFn(
   model: Specification.OAuth2AutenthicationDataScopes,
   options: BuildOptions,
-): Specification.OAuth2AutenthicationDataScopes {
+): OAuth2AutenthicationDataScopesIntersection {
   const instance = new Classes.OAuth2AutenthicationDataScopes(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2AutenthicationDataScopes;
+  return (options.normalize ? instance.normalize() : instance) as unknown as OAuth2AutenthicationDataScopesIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.OAuth2AutenthicationDataScopes`
- * @returns {ArrayBuilder} A builder for `Specification.OAuth2AutenthicationDataScopes`
+ * A factory to create a builder proxy for the type `OAuth2AutenthicationDataScopesIntersection`
+ * @returns {ArrayBuilder} A builder for `OAuth2AutenthicationDataScopesIntersection`
  */
 export const oAuth2AutenthicationDataScopesBuilder = (
   model?: Specification.OAuth2AutenthicationDataScopes,
-): ArrayBuilder => arrayBuilder(model, buildingFn);
+): ArrayBuilder =>
+  arrayBuilder(model, buildingFn);
diff --git a/src/lib/generated/builders/oauth2-authentication-policy-builder.ts b/src/lib/generated/builders/oauth2-authentication-policy-builder.ts
index b31adac5..949c5f0e 100644
--- a/src/lib/generated/builders/oauth2-authentication-policy-builder.ts
+++ b/src/lib/generated/builders/oauth2-authentication-policy-builder.ts
@@ -22,28 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { OAuth2AuthenticationPolicyIntersection } from '../classes/oauth2-authentication-policy';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.OAuth2AuthenticationPolicy} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.OAuth2AuthenticationPolicy} The built object
+ * @returns {OAuth2AuthenticationPolicyIntersection} The built object
  */
 function buildingFn(
   model: Specification.OAuth2AuthenticationPolicy,
   options: BuildOptions,
-): Specification.OAuth2AuthenticationPolicy {
+): OAuth2AuthenticationPolicyIntersection {
   const instance = new Classes.OAuth2AuthenticationPolicy(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2AuthenticationPolicy;
+  return (options.normalize ? instance.normalize() : instance) as OAuth2AuthenticationPolicyIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.OAuth2AuthenticationPolicy`
- * @returns {Builder} A builder for `Specification.OAuth2AuthenticationPolicy`
+ * A factory to create a builder proxy for the type `OAuth2AuthenticationPolicyIntersection`
+ * @returns {Builder} A builder for `OAuth2AuthenticationPolicyIntersection`
  */
 export const oAuth2AuthenticationPolicyBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder, OAuth2AuthenticationPolicyIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/oauth2-authentication-policy-configuration-builder.ts b/src/lib/generated/builders/oauth2-authentication-policy-configuration-builder.ts
index d4053ca9..60923864 100644
--- a/src/lib/generated/builders/oauth2-authentication-policy-configuration-builder.ts
+++ b/src/lib/generated/builders/oauth2-authentication-policy-configuration-builder.ts
@@ -22,28 +22,35 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { OAuth2AuthenticationPolicyConfigurationIntersection } from '../classes/oauth2-authentication-policy-configuration';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.OAuth2AuthenticationPolicyConfiguration} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.OAuth2AuthenticationPolicyConfiguration} The built object
+ * @returns {OAuth2AuthenticationPolicyConfigurationIntersection} The built object
  */
 function buildingFn(
   model: Specification.OAuth2AuthenticationPolicyConfiguration,
   options: BuildOptions,
-): Specification.OAuth2AuthenticationPolicyConfiguration {
+): OAuth2AuthenticationPolicyConfigurationIntersection {
   const instance = new Classes.OAuth2AuthenticationPolicyConfiguration(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2AuthenticationPolicyConfiguration;
+  return (options.normalize ? instance.normalize() : instance) as OAuth2AuthenticationPolicyConfigurationIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.OAuth2AuthenticationPolicyConfiguration`
- * @returns {Builder} A builder for `Specification.OAuth2AuthenticationPolicyConfiguration`
+ * A factory to create a builder proxy for the type `OAuth2AuthenticationPolicyConfigurationIntersection`
+ * @returns {Builder} A builder for `OAuth2AuthenticationPolicyConfigurationIntersection`
  */
 export const oAuth2AuthenticationPolicyConfigurationBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder<
+  Partial,
+  OAuth2AuthenticationPolicyConfigurationIntersection
+> =>
+  builder(
+    model,
+    buildingFn,
+  );
diff --git a/src/lib/generated/builders/oauth2-authentication-properties-endpoints-builder.ts b/src/lib/generated/builders/oauth2-authentication-properties-endpoints-builder.ts
index 9645fb2b..8f62cb4e 100644
--- a/src/lib/generated/builders/oauth2-authentication-properties-endpoints-builder.ts
+++ b/src/lib/generated/builders/oauth2-authentication-properties-endpoints-builder.ts
@@ -22,28 +22,35 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { OAuth2AuthenticationPropertiesEndpointsIntersection } from '../classes/oauth2-authentication-properties-endpoints';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.OAuth2AuthenticationPropertiesEndpoints} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.OAuth2AuthenticationPropertiesEndpoints} The built object
+ * @returns {OAuth2AuthenticationPropertiesEndpointsIntersection} The built object
  */
 function buildingFn(
   model: Specification.OAuth2AuthenticationPropertiesEndpoints,
   options: BuildOptions,
-): Specification.OAuth2AuthenticationPropertiesEndpoints {
+): OAuth2AuthenticationPropertiesEndpointsIntersection {
   const instance = new Classes.OAuth2AuthenticationPropertiesEndpoints(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2AuthenticationPropertiesEndpoints;
+  return (options.normalize ? instance.normalize() : instance) as OAuth2AuthenticationPropertiesEndpointsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.OAuth2AuthenticationPropertiesEndpoints`
- * @returns {Builder} A builder for `Specification.OAuth2AuthenticationPropertiesEndpoints`
+ * A factory to create a builder proxy for the type `OAuth2AuthenticationPropertiesEndpointsIntersection`
+ * @returns {Builder} A builder for `OAuth2AuthenticationPropertiesEndpointsIntersection`
  */
 export const oAuth2AuthenticationPropertiesEndpointsBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder<
+  Partial,
+  OAuth2AuthenticationPropertiesEndpointsIntersection
+> =>
+  builder(
+    model,
+    buildingFn,
+  );
diff --git a/src/lib/generated/builders/oauth2-connect-authentication-properties-builder.ts b/src/lib/generated/builders/oauth2-connect-authentication-properties-builder.ts
index f483e6de..10b84896 100644
--- a/src/lib/generated/builders/oauth2-connect-authentication-properties-builder.ts
+++ b/src/lib/generated/builders/oauth2-connect-authentication-properties-builder.ts
@@ -22,28 +22,35 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { OAuth2ConnectAuthenticationPropertiesIntersection } from '../classes/oauth2-connect-authentication-properties';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.OAuth2ConnectAuthenticationProperties} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.OAuth2ConnectAuthenticationProperties} The built object
+ * @returns {OAuth2ConnectAuthenticationPropertiesIntersection} The built object
  */
 function buildingFn(
   model: Specification.OAuth2ConnectAuthenticationProperties,
   options: BuildOptions,
-): Specification.OAuth2ConnectAuthenticationProperties {
+): OAuth2ConnectAuthenticationPropertiesIntersection {
   const instance = new Classes.OAuth2ConnectAuthenticationProperties(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2ConnectAuthenticationProperties;
+  return (options.normalize ? instance.normalize() : instance) as OAuth2ConnectAuthenticationPropertiesIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.OAuth2ConnectAuthenticationProperties`
- * @returns {Builder} A builder for `Specification.OAuth2ConnectAuthenticationProperties`
+ * A factory to create a builder proxy for the type `OAuth2ConnectAuthenticationPropertiesIntersection`
+ * @returns {Builder} A builder for `OAuth2ConnectAuthenticationPropertiesIntersection`
  */
 export const oAuth2ConnectAuthenticationPropertiesBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder<
+  Partial,
+  OAuth2ConnectAuthenticationPropertiesIntersection
+> =>
+  builder(
+    model,
+    buildingFn,
+  );
diff --git a/src/lib/generated/builders/oauth2-issuers-builder.ts b/src/lib/generated/builders/oauth2-issuers-builder.ts
index 4059e933..6b2ab4b5 100644
--- a/src/lib/generated/builders/oauth2-issuers-builder.ts
+++ b/src/lib/generated/builders/oauth2-issuers-builder.ts
@@ -22,23 +22,26 @@
 
 import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { OAuth2IssuersIntersection } from '../classes/oauth2-issuers';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying array
  * @param {Specification.OAuth2Issuers} model The proxied array
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.OAuth2Issuers} The built array
+ * @returns {OAuth2IssuersIntersection} The built array
  */
-function buildingFn(model: Specification.OAuth2Issuers, options: BuildOptions): Specification.OAuth2Issuers {
+function buildingFn(model: Specification.OAuth2Issuers, options: BuildOptions): OAuth2IssuersIntersection {
   const instance = new Classes.OAuth2Issuers(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2Issuers;
+  return (options.normalize ? instance.normalize() : instance) as unknown as OAuth2IssuersIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.OAuth2Issuers`
- * @returns {ArrayBuilder} A builder for `Specification.OAuth2Issuers`
+ * A factory to create a builder proxy for the type `OAuth2IssuersIntersection`
+ * @returns {ArrayBuilder} A builder for `OAuth2IssuersIntersection`
  */
-export const oAuth2IssuersBuilder = (model?: Specification.OAuth2Issuers): ArrayBuilder =>
-  arrayBuilder(model, buildingFn);
+export const oAuth2IssuersBuilder = (
+  model?: Specification.OAuth2Issuers,
+): ArrayBuilder =>
+  arrayBuilder(model, buildingFn);
diff --git a/src/lib/generated/builders/oauth2-token-definition-builder.ts b/src/lib/generated/builders/oauth2-token-definition-builder.ts
index 2072b0e0..68ff0bb8 100644
--- a/src/lib/generated/builders/oauth2-token-definition-builder.ts
+++ b/src/lib/generated/builders/oauth2-token-definition-builder.ts
@@ -22,27 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { OAuth2TokenDefinitionIntersection } from '../classes/oauth2-token-definition';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.OAuth2TokenDefinition} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.OAuth2TokenDefinition} The built object
+ * @returns {OAuth2TokenDefinitionIntersection} The built object
  */
 function buildingFn(
   model: Specification.OAuth2TokenDefinition,
   options: BuildOptions,
-): Specification.OAuth2TokenDefinition {
+): OAuth2TokenDefinitionIntersection {
   const instance = new Classes.OAuth2TokenDefinition(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2TokenDefinition;
+  return (options.normalize ? instance.normalize() : instance) as OAuth2TokenDefinitionIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.OAuth2TokenDefinition`
- * @returns {Builder} A builder for `Specification.OAuth2TokenDefinition`
+ * A factory to create a builder proxy for the type `OAuth2TokenDefinitionIntersection`
+ * @returns {Builder} A builder for `OAuth2TokenDefinitionIntersection`
  */
 export const oAuth2TokenDefinitionBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, OAuth2TokenDefinitionIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/oauth2-token-request-builder.ts b/src/lib/generated/builders/oauth2-token-request-builder.ts
index b772d5cf..7d417a5c 100644
--- a/src/lib/generated/builders/oauth2-token-request-builder.ts
+++ b/src/lib/generated/builders/oauth2-token-request-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { OAuth2TokenRequestIntersection } from '../classes/oauth2-token-request';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.OAuth2TokenRequest} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.OAuth2TokenRequest} The built object
+ * @returns {OAuth2TokenRequestIntersection} The built object
  */
-function buildingFn(model: Specification.OAuth2TokenRequest, options: BuildOptions): Specification.OAuth2TokenRequest {
+function buildingFn(model: Specification.OAuth2TokenRequest, options: BuildOptions): OAuth2TokenRequestIntersection {
   const instance = new Classes.OAuth2TokenRequest(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.OAuth2TokenRequest;
+  return (options.normalize ? instance.normalize() : instance) as OAuth2TokenRequestIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.OAuth2TokenRequest`
- * @returns {Builder} A builder for `Specification.OAuth2TokenRequest`
+ * A factory to create a builder proxy for the type `OAuth2TokenRequestIntersection`
+ * @returns {Builder} A builder for `OAuth2TokenRequestIntersection`
  */
 export const oAuth2TokenRequestBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, OAuth2TokenRequestIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/one-event-consumption-strategy-builder.ts b/src/lib/generated/builders/one-event-consumption-strategy-builder.ts
index 642b0825..7af05a14 100644
--- a/src/lib/generated/builders/one-event-consumption-strategy-builder.ts
+++ b/src/lib/generated/builders/one-event-consumption-strategy-builder.ts
@@ -22,28 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { OneEventConsumptionStrategyIntersection } from '../classes/one-event-consumption-strategy';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.OneEventConsumptionStrategy} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.OneEventConsumptionStrategy} The built object
+ * @returns {OneEventConsumptionStrategyIntersection} The built object
  */
 function buildingFn(
   model: Specification.OneEventConsumptionStrategy,
   options: BuildOptions,
-): Specification.OneEventConsumptionStrategy {
+): OneEventConsumptionStrategyIntersection {
   const instance = new Classes.OneEventConsumptionStrategy(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.OneEventConsumptionStrategy;
+  return (options.normalize ? instance.normalize() : instance) as OneEventConsumptionStrategyIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.OneEventConsumptionStrategy`
- * @returns {Builder} A builder for `Specification.OneEventConsumptionStrategy`
+ * A factory to create a builder proxy for the type `OneEventConsumptionStrategyIntersection`
+ * @returns {Builder} A builder for `OneEventConsumptionStrategyIntersection`
  */
 export const oneEventConsumptionStrategyBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder, OneEventConsumptionStrategyIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/open-api-arguments-builder.ts b/src/lib/generated/builders/open-api-arguments-builder.ts
index f8d6228e..1ea8354c 100644
--- a/src/lib/generated/builders/open-api-arguments-builder.ts
+++ b/src/lib/generated/builders/open-api-arguments-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { OpenAPIArgumentsIntersection } from '../classes/open-api-arguments';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.OpenAPIArguments} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.OpenAPIArguments} The built object
+ * @returns {OpenAPIArgumentsIntersection} The built object
  */
-function buildingFn(model: Specification.OpenAPIArguments, options: BuildOptions): Specification.OpenAPIArguments {
+function buildingFn(model: Specification.OpenAPIArguments, options: BuildOptions): OpenAPIArgumentsIntersection {
   const instance = new Classes.OpenAPIArguments(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.OpenAPIArguments;
+  return (options.normalize ? instance.normalize() : instance) as OpenAPIArgumentsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.OpenAPIArguments`
- * @returns {Builder} A builder for `Specification.OpenAPIArguments`
+ * A factory to create a builder proxy for the type `OpenAPIArgumentsIntersection`
+ * @returns {Builder} A builder for `OpenAPIArgumentsIntersection`
  */
 export const openAPIArgumentsBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, OpenAPIArgumentsIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/open-id-connect-authentication-policy-builder.ts b/src/lib/generated/builders/open-id-connect-authentication-policy-builder.ts
index 4ff389bd..c1ede40a 100644
--- a/src/lib/generated/builders/open-id-connect-authentication-policy-builder.ts
+++ b/src/lib/generated/builders/open-id-connect-authentication-policy-builder.ts
@@ -22,28 +22,32 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { OpenIdConnectAuthenticationPolicyIntersection } from '../classes/open-id-connect-authentication-policy';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.OpenIdConnectAuthenticationPolicy} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.OpenIdConnectAuthenticationPolicy} The built object
+ * @returns {OpenIdConnectAuthenticationPolicyIntersection} The built object
  */
 function buildingFn(
   model: Specification.OpenIdConnectAuthenticationPolicy,
   options: BuildOptions,
-): Specification.OpenIdConnectAuthenticationPolicy {
+): OpenIdConnectAuthenticationPolicyIntersection {
   const instance = new Classes.OpenIdConnectAuthenticationPolicy(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.OpenIdConnectAuthenticationPolicy;
+  return (options.normalize ? instance.normalize() : instance) as OpenIdConnectAuthenticationPolicyIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.OpenIdConnectAuthenticationPolicy`
- * @returns {Builder} A builder for `Specification.OpenIdConnectAuthenticationPolicy`
+ * A factory to create a builder proxy for the type `OpenIdConnectAuthenticationPolicyIntersection`
+ * @returns {Builder} A builder for `OpenIdConnectAuthenticationPolicyIntersection`
  */
 export const openIdConnectAuthenticationPolicyBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder, OpenIdConnectAuthenticationPolicyIntersection> =>
+  builder(
+    model,
+    buildingFn,
+  );
diff --git a/src/lib/generated/builders/open-id-connect-authentication-policy-configuration-builder.ts b/src/lib/generated/builders/open-id-connect-authentication-policy-configuration-builder.ts
index 9f379eca..2989d3ea 100644
--- a/src/lib/generated/builders/open-id-connect-authentication-policy-configuration-builder.ts
+++ b/src/lib/generated/builders/open-id-connect-authentication-policy-configuration-builder.ts
@@ -22,30 +22,37 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { OpenIdConnectAuthenticationPolicyConfigurationIntersection } from '../classes/open-id-connect-authentication-policy-configuration';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.OpenIdConnectAuthenticationPolicyConfiguration} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.OpenIdConnectAuthenticationPolicyConfiguration} The built object
+ * @returns {OpenIdConnectAuthenticationPolicyConfigurationIntersection} The built object
  */
 function buildingFn(
   model: Specification.OpenIdConnectAuthenticationPolicyConfiguration,
   options: BuildOptions,
-): Specification.OpenIdConnectAuthenticationPolicyConfiguration {
+): OpenIdConnectAuthenticationPolicyConfigurationIntersection {
   const instance = new Classes.OpenIdConnectAuthenticationPolicyConfiguration(model);
   if (options.validate) instance.validate();
   return (
     options.normalize ? instance.normalize() : instance
-  ) as Specification.OpenIdConnectAuthenticationPolicyConfiguration;
+  ) as OpenIdConnectAuthenticationPolicyConfigurationIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.OpenIdConnectAuthenticationPolicyConfiguration`
- * @returns {Builder} A builder for `Specification.OpenIdConnectAuthenticationPolicyConfiguration`
+ * A factory to create a builder proxy for the type `OpenIdConnectAuthenticationPolicyConfigurationIntersection`
+ * @returns {Builder} A builder for `OpenIdConnectAuthenticationPolicyConfigurationIntersection`
  */
 export const openIdConnectAuthenticationPolicyConfigurationBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder<
+  Partial,
+  OpenIdConnectAuthenticationPolicyConfigurationIntersection
+> =>
+  builder<
+    Specification.OpenIdConnectAuthenticationPolicyConfiguration,
+    OpenIdConnectAuthenticationPolicyConfigurationIntersection
+  >(model, buildingFn);
diff --git a/src/lib/generated/builders/open-id-connect-authentication-properties-builder.ts b/src/lib/generated/builders/open-id-connect-authentication-properties-builder.ts
index c4ccf9ef..e13302b8 100644
--- a/src/lib/generated/builders/open-id-connect-authentication-properties-builder.ts
+++ b/src/lib/generated/builders/open-id-connect-authentication-properties-builder.ts
@@ -22,28 +22,35 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { OpenIdConnectAuthenticationPropertiesIntersection } from '../classes/open-id-connect-authentication-properties';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.OpenIdConnectAuthenticationProperties} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.OpenIdConnectAuthenticationProperties} The built object
+ * @returns {OpenIdConnectAuthenticationPropertiesIntersection} The built object
  */
 function buildingFn(
   model: Specification.OpenIdConnectAuthenticationProperties,
   options: BuildOptions,
-): Specification.OpenIdConnectAuthenticationProperties {
+): OpenIdConnectAuthenticationPropertiesIntersection {
   const instance = new Classes.OpenIdConnectAuthenticationProperties(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.OpenIdConnectAuthenticationProperties;
+  return (options.normalize ? instance.normalize() : instance) as OpenIdConnectAuthenticationPropertiesIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.OpenIdConnectAuthenticationProperties`
- * @returns {Builder} A builder for `Specification.OpenIdConnectAuthenticationProperties`
+ * A factory to create a builder proxy for the type `OpenIdConnectAuthenticationPropertiesIntersection`
+ * @returns {Builder} A builder for `OpenIdConnectAuthenticationPropertiesIntersection`
  */
 export const openIdConnectAuthenticationPropertiesBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder<
+  Partial,
+  OpenIdConnectAuthenticationPropertiesIntersection
+> =>
+  builder(
+    model,
+    buildingFn,
+  );
diff --git a/src/lib/generated/builders/output-as-builder.ts b/src/lib/generated/builders/output-as-builder.ts
index fe8015fe..b2673098 100644
--- a/src/lib/generated/builders/output-as-builder.ts
+++ b/src/lib/generated/builders/output-as-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { OutputAsIntersection } from '../classes/output-as';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.OutputAs} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.OutputAs} The built object
+ * @returns {OutputAsIntersection} The built object
  */
-function buildingFn(model: Specification.OutputAs, options: BuildOptions): Specification.OutputAs {
+function buildingFn(model: Specification.OutputAs, options: BuildOptions): OutputAsIntersection {
   const instance = new Classes.OutputAs(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.OutputAs;
+  return (options.normalize ? instance.normalize() : instance) as OutputAsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.OutputAs`
- * @returns {Builder} A builder for `Specification.OutputAs`
+ * A factory to create a builder proxy for the type `OutputAsIntersection`
+ * @returns {Builder} A builder for `OutputAsIntersection`
  */
-export const outputAsBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const outputAsBuilder = (
+  model?: Partial,
+): Builder, OutputAsIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/output-builder.ts b/src/lib/generated/builders/output-builder.ts
index 3515ee46..098478d3 100644
--- a/src/lib/generated/builders/output-builder.ts
+++ b/src/lib/generated/builders/output-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { OutputIntersection } from '../classes/output';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.Output} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.Output} The built object
+ * @returns {OutputIntersection} The built object
  */
-function buildingFn(model: Specification.Output, options: BuildOptions): Specification.Output {
+function buildingFn(model: Specification.Output, options: BuildOptions): OutputIntersection {
   const instance = new Classes.Output(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.Output;
+  return (options.normalize ? instance.normalize() : instance) as OutputIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.Output`
- * @returns {Builder} A builder for `Specification.Output`
+ * A factory to create a builder proxy for the type `OutputIntersection`
+ * @returns {Builder} A builder for `OutputIntersection`
  */
-export const outputBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const outputBuilder = (
+  model?: Partial,
+): Builder, OutputIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/raise-task-builder.ts b/src/lib/generated/builders/raise-task-builder.ts
index 41845bf7..b2ecda8d 100644
--- a/src/lib/generated/builders/raise-task-builder.ts
+++ b/src/lib/generated/builders/raise-task-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { RaiseTaskIntersection } from '../classes/raise-task';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.RaiseTask} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.RaiseTask} The built object
+ * @returns {RaiseTaskIntersection} The built object
  */
-function buildingFn(model: Specification.RaiseTask, options: BuildOptions): Specification.RaiseTask {
+function buildingFn(model: Specification.RaiseTask, options: BuildOptions): RaiseTaskIntersection {
   const instance = new Classes.RaiseTask(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.RaiseTask;
+  return (options.normalize ? instance.normalize() : instance) as RaiseTaskIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.RaiseTask`
- * @returns {Builder} A builder for `Specification.RaiseTask`
+ * A factory to create a builder proxy for the type `RaiseTaskIntersection`
+ * @returns {Builder} A builder for `RaiseTaskIntersection`
  */
-export const raiseTaskBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const raiseTaskBuilder = (
+  model?: Partial,
+): Builder, RaiseTaskIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/raise-task-configuration-builder.ts b/src/lib/generated/builders/raise-task-configuration-builder.ts
index b0a6d7ee..6372e4a8 100644
--- a/src/lib/generated/builders/raise-task-configuration-builder.ts
+++ b/src/lib/generated/builders/raise-task-configuration-builder.ts
@@ -22,27 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { RaiseTaskConfigurationIntersection } from '../classes/raise-task-configuration';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.RaiseTaskConfiguration} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.RaiseTaskConfiguration} The built object
+ * @returns {RaiseTaskConfigurationIntersection} The built object
  */
 function buildingFn(
   model: Specification.RaiseTaskConfiguration,
   options: BuildOptions,
-): Specification.RaiseTaskConfiguration {
+): RaiseTaskConfigurationIntersection {
   const instance = new Classes.RaiseTaskConfiguration(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.RaiseTaskConfiguration;
+  return (options.normalize ? instance.normalize() : instance) as RaiseTaskConfigurationIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.RaiseTaskConfiguration`
- * @returns {Builder} A builder for `Specification.RaiseTaskConfiguration`
+ * A factory to create a builder proxy for the type `RaiseTaskConfigurationIntersection`
+ * @returns {Builder} A builder for `RaiseTaskConfigurationIntersection`
  */
 export const raiseTaskConfigurationBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, RaiseTaskConfigurationIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/raise-task-raise-error-builder.ts b/src/lib/generated/builders/raise-task-raise-error-builder.ts
index 912815de..802ffde6 100644
--- a/src/lib/generated/builders/raise-task-raise-error-builder.ts
+++ b/src/lib/generated/builders/raise-task-raise-error-builder.ts
@@ -22,27 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { RaiseTaskRaiseErrorIntersection } from '../classes/raise-task-raise-error';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.RaiseTaskRaiseError} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.RaiseTaskRaiseError} The built object
+ * @returns {RaiseTaskRaiseErrorIntersection} The built object
  */
-function buildingFn(
-  model: Specification.RaiseTaskRaiseError,
-  options: BuildOptions,
-): Specification.RaiseTaskRaiseError {
+function buildingFn(model: Specification.RaiseTaskRaiseError, options: BuildOptions): RaiseTaskRaiseErrorIntersection {
   const instance = new Classes.RaiseTaskRaiseError(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.RaiseTaskRaiseError;
+  return (options.normalize ? instance.normalize() : instance) as RaiseTaskRaiseErrorIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.RaiseTaskRaiseError`
- * @returns {Builder} A builder for `Specification.RaiseTaskRaiseError`
+ * A factory to create a builder proxy for the type `RaiseTaskRaiseErrorIntersection`
+ * @returns {Builder} A builder for `RaiseTaskRaiseErrorIntersection`
  */
 export const raiseTaskRaiseErrorBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, RaiseTaskRaiseErrorIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/referenceable-authentication-policy-builder.ts b/src/lib/generated/builders/referenceable-authentication-policy-builder.ts
index 15e37d3a..203774bf 100644
--- a/src/lib/generated/builders/referenceable-authentication-policy-builder.ts
+++ b/src/lib/generated/builders/referenceable-authentication-policy-builder.ts
@@ -22,28 +22,32 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ReferenceableAuthenticationPolicyIntersection } from '../classes/referenceable-authentication-policy';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ReferenceableAuthenticationPolicy} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ReferenceableAuthenticationPolicy} The built object
+ * @returns {ReferenceableAuthenticationPolicyIntersection} The built object
  */
 function buildingFn(
   model: Specification.ReferenceableAuthenticationPolicy,
   options: BuildOptions,
-): Specification.ReferenceableAuthenticationPolicy {
+): ReferenceableAuthenticationPolicyIntersection {
   const instance = new Classes.ReferenceableAuthenticationPolicy(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ReferenceableAuthenticationPolicy;
+  return (options.normalize ? instance.normalize() : instance) as ReferenceableAuthenticationPolicyIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ReferenceableAuthenticationPolicy`
- * @returns {Builder} A builder for `Specification.ReferenceableAuthenticationPolicy`
+ * A factory to create a builder proxy for the type `ReferenceableAuthenticationPolicyIntersection`
+ * @returns {Builder} A builder for `ReferenceableAuthenticationPolicyIntersection`
  */
 export const referenceableAuthenticationPolicyBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder, ReferenceableAuthenticationPolicyIntersection> =>
+  builder(
+    model,
+    buildingFn,
+  );
diff --git a/src/lib/generated/builders/retry-backoff-builder.ts b/src/lib/generated/builders/retry-backoff-builder.ts
index 1edd8712..1ca7adad 100644
--- a/src/lib/generated/builders/retry-backoff-builder.ts
+++ b/src/lib/generated/builders/retry-backoff-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { RetryBackoffIntersection } from '../classes/retry-backoff';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.RetryBackoff} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.RetryBackoff} The built object
+ * @returns {RetryBackoffIntersection} The built object
  */
-function buildingFn(model: Specification.RetryBackoff, options: BuildOptions): Specification.RetryBackoff {
+function buildingFn(model: Specification.RetryBackoff, options: BuildOptions): RetryBackoffIntersection {
   const instance = new Classes.RetryBackoff(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.RetryBackoff;
+  return (options.normalize ? instance.normalize() : instance) as RetryBackoffIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.RetryBackoff`
- * @returns {Builder} A builder for `Specification.RetryBackoff`
+ * A factory to create a builder proxy for the type `RetryBackoffIntersection`
+ * @returns {Builder} A builder for `RetryBackoffIntersection`
  */
-export const retryBackoffBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const retryBackoffBuilder = (
+  model?: Partial,
+): Builder, RetryBackoffIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/retry-limit-attempt-builder.ts b/src/lib/generated/builders/retry-limit-attempt-builder.ts
index 24f2ea06..b43ed140 100644
--- a/src/lib/generated/builders/retry-limit-attempt-builder.ts
+++ b/src/lib/generated/builders/retry-limit-attempt-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { RetryLimitAttemptIntersection } from '../classes/retry-limit-attempt';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.RetryLimitAttempt} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.RetryLimitAttempt} The built object
+ * @returns {RetryLimitAttemptIntersection} The built object
  */
-function buildingFn(model: Specification.RetryLimitAttempt, options: BuildOptions): Specification.RetryLimitAttempt {
+function buildingFn(model: Specification.RetryLimitAttempt, options: BuildOptions): RetryLimitAttemptIntersection {
   const instance = new Classes.RetryLimitAttempt(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.RetryLimitAttempt;
+  return (options.normalize ? instance.normalize() : instance) as RetryLimitAttemptIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.RetryLimitAttempt`
- * @returns {Builder} A builder for `Specification.RetryLimitAttempt`
+ * A factory to create a builder proxy for the type `RetryLimitAttemptIntersection`
+ * @returns {Builder} A builder for `RetryLimitAttemptIntersection`
  */
 export const retryLimitAttemptBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, RetryLimitAttemptIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/retry-limit-builder.ts b/src/lib/generated/builders/retry-limit-builder.ts
index 0f20c395..6e252eec 100644
--- a/src/lib/generated/builders/retry-limit-builder.ts
+++ b/src/lib/generated/builders/retry-limit-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { RetryLimitIntersection } from '../classes/retry-limit';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.RetryLimit} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.RetryLimit} The built object
+ * @returns {RetryLimitIntersection} The built object
  */
-function buildingFn(model: Specification.RetryLimit, options: BuildOptions): Specification.RetryLimit {
+function buildingFn(model: Specification.RetryLimit, options: BuildOptions): RetryLimitIntersection {
   const instance = new Classes.RetryLimit(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.RetryLimit;
+  return (options.normalize ? instance.normalize() : instance) as RetryLimitIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.RetryLimit`
- * @returns {Builder} A builder for `Specification.RetryLimit`
+ * A factory to create a builder proxy for the type `RetryLimitIntersection`
+ * @returns {Builder} A builder for `RetryLimitIntersection`
  */
-export const retryLimitBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const retryLimitBuilder = (
+  model?: Partial,
+): Builder, RetryLimitIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/retry-policy-builder.ts b/src/lib/generated/builders/retry-policy-builder.ts
index 2f6eb8bc..cecfe466 100644
--- a/src/lib/generated/builders/retry-policy-builder.ts
+++ b/src/lib/generated/builders/retry-policy-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { RetryPolicyIntersection } from '../classes/retry-policy';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.RetryPolicy} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.RetryPolicy} The built object
+ * @returns {RetryPolicyIntersection} The built object
  */
-function buildingFn(model: Specification.RetryPolicy, options: BuildOptions): Specification.RetryPolicy {
+function buildingFn(model: Specification.RetryPolicy, options: BuildOptions): RetryPolicyIntersection {
   const instance = new Classes.RetryPolicy(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.RetryPolicy;
+  return (options.normalize ? instance.normalize() : instance) as RetryPolicyIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.RetryPolicy`
- * @returns {Builder} A builder for `Specification.RetryPolicy`
+ * A factory to create a builder proxy for the type `RetryPolicyIntersection`
+ * @returns {Builder} A builder for `RetryPolicyIntersection`
  */
-export const retryPolicyBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const retryPolicyBuilder = (
+  model?: Partial,
+): Builder, RetryPolicyIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/retry-policy-jitter-builder.ts b/src/lib/generated/builders/retry-policy-jitter-builder.ts
index 94f33282..46139ba7 100644
--- a/src/lib/generated/builders/retry-policy-jitter-builder.ts
+++ b/src/lib/generated/builders/retry-policy-jitter-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { RetryPolicyJitterIntersection } from '../classes/retry-policy-jitter';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.RetryPolicyJitter} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.RetryPolicyJitter} The built object
+ * @returns {RetryPolicyJitterIntersection} The built object
  */
-function buildingFn(model: Specification.RetryPolicyJitter, options: BuildOptions): Specification.RetryPolicyJitter {
+function buildingFn(model: Specification.RetryPolicyJitter, options: BuildOptions): RetryPolicyJitterIntersection {
   const instance = new Classes.RetryPolicyJitter(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.RetryPolicyJitter;
+  return (options.normalize ? instance.normalize() : instance) as RetryPolicyJitterIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.RetryPolicyJitter`
- * @returns {Builder} A builder for `Specification.RetryPolicyJitter`
+ * A factory to create a builder proxy for the type `RetryPolicyJitterIntersection`
+ * @returns {Builder} A builder for `RetryPolicyJitterIntersection`
  */
 export const retryPolicyJitterBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, RetryPolicyJitterIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/run-container-builder.ts b/src/lib/generated/builders/run-container-builder.ts
index 8702009e..8a28bf3a 100644
--- a/src/lib/generated/builders/run-container-builder.ts
+++ b/src/lib/generated/builders/run-container-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { RunContainerIntersection } from '../classes/run-container';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.RunContainer} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.RunContainer} The built object
+ * @returns {RunContainerIntersection} The built object
  */
-function buildingFn(model: Specification.RunContainer, options: BuildOptions): Specification.RunContainer {
+function buildingFn(model: Specification.RunContainer, options: BuildOptions): RunContainerIntersection {
   const instance = new Classes.RunContainer(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.RunContainer;
+  return (options.normalize ? instance.normalize() : instance) as RunContainerIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.RunContainer`
- * @returns {Builder} A builder for `Specification.RunContainer`
+ * A factory to create a builder proxy for the type `RunContainerIntersection`
+ * @returns {Builder} A builder for `RunContainerIntersection`
  */
-export const runContainerBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const runContainerBuilder = (
+  model?: Partial,
+): Builder, RunContainerIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/run-script-builder.ts b/src/lib/generated/builders/run-script-builder.ts
index 700e6c60..7d1be6ac 100644
--- a/src/lib/generated/builders/run-script-builder.ts
+++ b/src/lib/generated/builders/run-script-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { RunScriptIntersection } from '../classes/run-script';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.RunScript} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.RunScript} The built object
+ * @returns {RunScriptIntersection} The built object
  */
-function buildingFn(model: Specification.RunScript, options: BuildOptions): Specification.RunScript {
+function buildingFn(model: Specification.RunScript, options: BuildOptions): RunScriptIntersection {
   const instance = new Classes.RunScript(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.RunScript;
+  return (options.normalize ? instance.normalize() : instance) as RunScriptIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.RunScript`
- * @returns {Builder} A builder for `Specification.RunScript`
+ * A factory to create a builder proxy for the type `RunScriptIntersection`
+ * @returns {Builder} A builder for `RunScriptIntersection`
  */
-export const runScriptBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const runScriptBuilder = (
+  model?: Partial,
+): Builder, RunScriptIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/run-shell-builder.ts b/src/lib/generated/builders/run-shell-builder.ts
index c77104ec..e35a66fd 100644
--- a/src/lib/generated/builders/run-shell-builder.ts
+++ b/src/lib/generated/builders/run-shell-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { RunShellIntersection } from '../classes/run-shell';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.RunShell} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.RunShell} The built object
+ * @returns {RunShellIntersection} The built object
  */
-function buildingFn(model: Specification.RunShell, options: BuildOptions): Specification.RunShell {
+function buildingFn(model: Specification.RunShell, options: BuildOptions): RunShellIntersection {
   const instance = new Classes.RunShell(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.RunShell;
+  return (options.normalize ? instance.normalize() : instance) as RunShellIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.RunShell`
- * @returns {Builder} A builder for `Specification.RunShell`
+ * A factory to create a builder proxy for the type `RunShellIntersection`
+ * @returns {Builder} A builder for `RunShellIntersection`
  */
-export const runShellBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const runShellBuilder = (
+  model?: Partial,
+): Builder, RunShellIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/run-task-builder.ts b/src/lib/generated/builders/run-task-builder.ts
index 9cb168af..833d3c65 100644
--- a/src/lib/generated/builders/run-task-builder.ts
+++ b/src/lib/generated/builders/run-task-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { RunTaskIntersection } from '../classes/run-task';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.RunTask} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.RunTask} The built object
+ * @returns {RunTaskIntersection} The built object
  */
-function buildingFn(model: Specification.RunTask, options: BuildOptions): Specification.RunTask {
+function buildingFn(model: Specification.RunTask, options: BuildOptions): RunTaskIntersection {
   const instance = new Classes.RunTask(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.RunTask;
+  return (options.normalize ? instance.normalize() : instance) as RunTaskIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.RunTask`
- * @returns {Builder} A builder for `Specification.RunTask`
+ * A factory to create a builder proxy for the type `RunTaskIntersection`
+ * @returns {Builder} A builder for `RunTaskIntersection`
  */
-export const runTaskBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const runTaskBuilder = (
+  model?: Partial,
+): Builder, RunTaskIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/run-task-configuration-builder.ts b/src/lib/generated/builders/run-task-configuration-builder.ts
index 48d9a4e7..b7b2b2e4 100644
--- a/src/lib/generated/builders/run-task-configuration-builder.ts
+++ b/src/lib/generated/builders/run-task-configuration-builder.ts
@@ -22,27 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { RunTaskConfigurationIntersection } from '../classes/run-task-configuration';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.RunTaskConfiguration} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.RunTaskConfiguration} The built object
+ * @returns {RunTaskConfigurationIntersection} The built object
  */
 function buildingFn(
   model: Specification.RunTaskConfiguration,
   options: BuildOptions,
-): Specification.RunTaskConfiguration {
+): RunTaskConfigurationIntersection {
   const instance = new Classes.RunTaskConfiguration(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.RunTaskConfiguration;
+  return (options.normalize ? instance.normalize() : instance) as RunTaskConfigurationIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.RunTaskConfiguration`
- * @returns {Builder} A builder for `Specification.RunTaskConfiguration`
+ * A factory to create a builder proxy for the type `RunTaskConfigurationIntersection`
+ * @returns {Builder} A builder for `RunTaskConfigurationIntersection`
  */
 export const runTaskConfigurationBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, RunTaskConfigurationIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/run-workflow-builder.ts b/src/lib/generated/builders/run-workflow-builder.ts
index 1be54b6e..edb6b5ef 100644
--- a/src/lib/generated/builders/run-workflow-builder.ts
+++ b/src/lib/generated/builders/run-workflow-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { RunWorkflowIntersection } from '../classes/run-workflow';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.RunWorkflow} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.RunWorkflow} The built object
+ * @returns {RunWorkflowIntersection} The built object
  */
-function buildingFn(model: Specification.RunWorkflow, options: BuildOptions): Specification.RunWorkflow {
+function buildingFn(model: Specification.RunWorkflow, options: BuildOptions): RunWorkflowIntersection {
   const instance = new Classes.RunWorkflow(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.RunWorkflow;
+  return (options.normalize ? instance.normalize() : instance) as RunWorkflowIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.RunWorkflow`
- * @returns {Builder} A builder for `Specification.RunWorkflow`
+ * A factory to create a builder proxy for the type `RunWorkflowIntersection`
+ * @returns {Builder} A builder for `RunWorkflowIntersection`
  */
-export const runWorkflowBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const runWorkflowBuilder = (
+  model?: Partial,
+): Builder, RunWorkflowIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/runtime-expression-builder.ts b/src/lib/generated/builders/runtime-expression-builder.ts
index 2640796d..e432ce11 100644
--- a/src/lib/generated/builders/runtime-expression-builder.ts
+++ b/src/lib/generated/builders/runtime-expression-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { RuntimeExpressionIntersection } from '../classes/runtime-expression';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.RuntimeExpression} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.RuntimeExpression} The built object
+ * @returns {RuntimeExpressionIntersection} The built object
  */
-function buildingFn(model: Specification.RuntimeExpression, options: BuildOptions): Specification.RuntimeExpression {
+function buildingFn(model: Specification.RuntimeExpression, options: BuildOptions): RuntimeExpressionIntersection {
   const instance = new Classes.RuntimeExpression(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.RuntimeExpression;
+  return (options.normalize ? instance.normalize() : instance) as RuntimeExpressionIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.RuntimeExpression`
- * @returns {Builder} A builder for `Specification.RuntimeExpression`
+ * A factory to create a builder proxy for the type `RuntimeExpressionIntersection`
+ * @returns {Builder} A builder for `RuntimeExpressionIntersection`
  */
 export const runtimeExpressionBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, RuntimeExpressionIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/schedule-builder.ts b/src/lib/generated/builders/schedule-builder.ts
index a53ab9f0..2defa866 100644
--- a/src/lib/generated/builders/schedule-builder.ts
+++ b/src/lib/generated/builders/schedule-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ScheduleIntersection } from '../classes/schedule';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.Schedule} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.Schedule} The built object
+ * @returns {ScheduleIntersection} The built object
  */
-function buildingFn(model: Specification.Schedule, options: BuildOptions): Specification.Schedule {
+function buildingFn(model: Specification.Schedule, options: BuildOptions): ScheduleIntersection {
   const instance = new Classes.Schedule(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.Schedule;
+  return (options.normalize ? instance.normalize() : instance) as ScheduleIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.Schedule`
- * @returns {Builder} A builder for `Specification.Schedule`
+ * A factory to create a builder proxy for the type `ScheduleIntersection`
+ * @returns {Builder} A builder for `ScheduleIntersection`
  */
-export const scheduleBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const scheduleBuilder = (
+  model?: Partial,
+): Builder, ScheduleIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/schema-builder.ts b/src/lib/generated/builders/schema-builder.ts
index c2e97258..a72b6d95 100644
--- a/src/lib/generated/builders/schema-builder.ts
+++ b/src/lib/generated/builders/schema-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { SchemaIntersection } from '../classes/schema';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.Schema} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.Schema} The built object
+ * @returns {SchemaIntersection} The built object
  */
-function buildingFn(model: Specification.Schema, options: BuildOptions): Specification.Schema {
+function buildingFn(model: Specification.Schema, options: BuildOptions): SchemaIntersection {
   const instance = new Classes.Schema(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.Schema;
+  return (options.normalize ? instance.normalize() : instance) as SchemaIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.Schema`
- * @returns {Builder} A builder for `Specification.Schema`
+ * A factory to create a builder proxy for the type `SchemaIntersection`
+ * @returns {Builder} A builder for `SchemaIntersection`
  */
-export const schemaBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const schemaBuilder = (
+  model?: Partial,
+): Builder, SchemaIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/schema-external-builder.ts b/src/lib/generated/builders/schema-external-builder.ts
index 870b27c2..79697c64 100644
--- a/src/lib/generated/builders/schema-external-builder.ts
+++ b/src/lib/generated/builders/schema-external-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { SchemaExternalIntersection } from '../classes/schema-external';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.SchemaExternal} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.SchemaExternal} The built object
+ * @returns {SchemaExternalIntersection} The built object
  */
-function buildingFn(model: Specification.SchemaExternal, options: BuildOptions): Specification.SchemaExternal {
+function buildingFn(model: Specification.SchemaExternal, options: BuildOptions): SchemaExternalIntersection {
   const instance = new Classes.SchemaExternal(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.SchemaExternal;
+  return (options.normalize ? instance.normalize() : instance) as SchemaExternalIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.SchemaExternal`
- * @returns {Builder} A builder for `Specification.SchemaExternal`
+ * A factory to create a builder proxy for the type `SchemaExternalIntersection`
+ * @returns {Builder} A builder for `SchemaExternalIntersection`
  */
 export const schemaExternalBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, SchemaExternalIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/schema-inline-builder.ts b/src/lib/generated/builders/schema-inline-builder.ts
index 38e7e67a..910bfb6a 100644
--- a/src/lib/generated/builders/schema-inline-builder.ts
+++ b/src/lib/generated/builders/schema-inline-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { SchemaInlineIntersection } from '../classes/schema-inline';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.SchemaInline} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.SchemaInline} The built object
+ * @returns {SchemaInlineIntersection} The built object
  */
-function buildingFn(model: Specification.SchemaInline, options: BuildOptions): Specification.SchemaInline {
+function buildingFn(model: Specification.SchemaInline, options: BuildOptions): SchemaInlineIntersection {
   const instance = new Classes.SchemaInline(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.SchemaInline;
+  return (options.normalize ? instance.normalize() : instance) as SchemaInlineIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.SchemaInline`
- * @returns {Builder} A builder for `Specification.SchemaInline`
+ * A factory to create a builder proxy for the type `SchemaInlineIntersection`
+ * @returns {Builder} A builder for `SchemaInlineIntersection`
  */
-export const schemaInlineBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const schemaInlineBuilder = (
+  model?: Partial,
+): Builder, SchemaInlineIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/script-builder.ts b/src/lib/generated/builders/script-builder.ts
index c9a6300d..d2d728ee 100644
--- a/src/lib/generated/builders/script-builder.ts
+++ b/src/lib/generated/builders/script-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ScriptIntersection } from '../classes/script';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.Script} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.Script} The built object
+ * @returns {ScriptIntersection} The built object
  */
-function buildingFn(model: Specification.Script, options: BuildOptions): Specification.Script {
+function buildingFn(model: Specification.Script, options: BuildOptions): ScriptIntersection {
   const instance = new Classes.Script(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.Script;
+  return (options.normalize ? instance.normalize() : instance) as ScriptIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.Script`
- * @returns {Builder} A builder for `Specification.Script`
+ * A factory to create a builder proxy for the type `ScriptIntersection`
+ * @returns {Builder} A builder for `ScriptIntersection`
  */
-export const scriptBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const scriptBuilder = (
+  model?: Partial,
+): Builder, ScriptIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/secret-based-authentication-policy-builder.ts b/src/lib/generated/builders/secret-based-authentication-policy-builder.ts
index f8960756..fac68704 100644
--- a/src/lib/generated/builders/secret-based-authentication-policy-builder.ts
+++ b/src/lib/generated/builders/secret-based-authentication-policy-builder.ts
@@ -22,28 +22,32 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { SecretBasedAuthenticationPolicyIntersection } from '../classes/secret-based-authentication-policy';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.SecretBasedAuthenticationPolicy} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.SecretBasedAuthenticationPolicy} The built object
+ * @returns {SecretBasedAuthenticationPolicyIntersection} The built object
  */
 function buildingFn(
   model: Specification.SecretBasedAuthenticationPolicy,
   options: BuildOptions,
-): Specification.SecretBasedAuthenticationPolicy {
+): SecretBasedAuthenticationPolicyIntersection {
   const instance = new Classes.SecretBasedAuthenticationPolicy(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.SecretBasedAuthenticationPolicy;
+  return (options.normalize ? instance.normalize() : instance) as SecretBasedAuthenticationPolicyIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.SecretBasedAuthenticationPolicy`
- * @returns {Builder} A builder for `Specification.SecretBasedAuthenticationPolicy`
+ * A factory to create a builder proxy for the type `SecretBasedAuthenticationPolicyIntersection`
+ * @returns {Builder} A builder for `SecretBasedAuthenticationPolicyIntersection`
  */
 export const secretBasedAuthenticationPolicyBuilder = (
   model?: Partial,
-): Builder =>
-  builder(model, buildingFn);
+): Builder, SecretBasedAuthenticationPolicyIntersection> =>
+  builder(
+    model,
+    buildingFn,
+  );
diff --git a/src/lib/generated/builders/set-task-builder.ts b/src/lib/generated/builders/set-task-builder.ts
index 44b0047d..a0895adf 100644
--- a/src/lib/generated/builders/set-task-builder.ts
+++ b/src/lib/generated/builders/set-task-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { SetTaskIntersection } from '../classes/set-task';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.SetTask} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.SetTask} The built object
+ * @returns {SetTaskIntersection} The built object
  */
-function buildingFn(model: Specification.SetTask, options: BuildOptions): Specification.SetTask {
+function buildingFn(model: Specification.SetTask, options: BuildOptions): SetTaskIntersection {
   const instance = new Classes.SetTask(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.SetTask;
+  return (options.normalize ? instance.normalize() : instance) as SetTaskIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.SetTask`
- * @returns {Builder} A builder for `Specification.SetTask`
+ * A factory to create a builder proxy for the type `SetTaskIntersection`
+ * @returns {Builder} A builder for `SetTaskIntersection`
  */
-export const setTaskBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const setTaskBuilder = (
+  model?: Partial,
+): Builder, SetTaskIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/set-task-configuration-builder.ts b/src/lib/generated/builders/set-task-configuration-builder.ts
index ed02a6ff..77715dc4 100644
--- a/src/lib/generated/builders/set-task-configuration-builder.ts
+++ b/src/lib/generated/builders/set-task-configuration-builder.ts
@@ -22,27 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { SetTaskConfigurationIntersection } from '../classes/set-task-configuration';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.SetTaskConfiguration} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.SetTaskConfiguration} The built object
+ * @returns {SetTaskConfigurationIntersection} The built object
  */
 function buildingFn(
   model: Specification.SetTaskConfiguration,
   options: BuildOptions,
-): Specification.SetTaskConfiguration {
+): SetTaskConfigurationIntersection {
   const instance = new Classes.SetTaskConfiguration(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.SetTaskConfiguration;
+  return (options.normalize ? instance.normalize() : instance) as SetTaskConfigurationIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.SetTaskConfiguration`
- * @returns {Builder} A builder for `Specification.SetTaskConfiguration`
+ * A factory to create a builder proxy for the type `SetTaskConfigurationIntersection`
+ * @returns {Builder} A builder for `SetTaskConfigurationIntersection`
  */
 export const setTaskConfigurationBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, SetTaskConfigurationIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/shell-arguments-builder.ts b/src/lib/generated/builders/shell-arguments-builder.ts
index 21555fbb..4611cc22 100644
--- a/src/lib/generated/builders/shell-arguments-builder.ts
+++ b/src/lib/generated/builders/shell-arguments-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ShellArgumentsIntersection } from '../classes/shell-arguments';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ShellArguments} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ShellArguments} The built object
+ * @returns {ShellArgumentsIntersection} The built object
  */
-function buildingFn(model: Specification.ShellArguments, options: BuildOptions): Specification.ShellArguments {
+function buildingFn(model: Specification.ShellArguments, options: BuildOptions): ShellArgumentsIntersection {
   const instance = new Classes.ShellArguments(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ShellArguments;
+  return (options.normalize ? instance.normalize() : instance) as ShellArgumentsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ShellArguments`
- * @returns {Builder} A builder for `Specification.ShellArguments`
+ * A factory to create a builder proxy for the type `ShellArgumentsIntersection`
+ * @returns {Builder} A builder for `ShellArgumentsIntersection`
  */
 export const shellArgumentsBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, ShellArgumentsIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/shell-builder.ts b/src/lib/generated/builders/shell-builder.ts
index bdcc6e4b..b9191143 100644
--- a/src/lib/generated/builders/shell-builder.ts
+++ b/src/lib/generated/builders/shell-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ShellIntersection } from '../classes/shell';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.Shell} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.Shell} The built object
+ * @returns {ShellIntersection} The built object
  */
-function buildingFn(model: Specification.Shell, options: BuildOptions): Specification.Shell {
+function buildingFn(model: Specification.Shell, options: BuildOptions): ShellIntersection {
   const instance = new Classes.Shell(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.Shell;
+  return (options.normalize ? instance.normalize() : instance) as ShellIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.Shell`
- * @returns {Builder} A builder for `Specification.Shell`
+ * A factory to create a builder proxy for the type `ShellIntersection`
+ * @returns {Builder} A builder for `ShellIntersection`
  */
-export const shellBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const shellBuilder = (
+  model?: Partial,
+): Builder, ShellIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/shell-environment-builder.ts b/src/lib/generated/builders/shell-environment-builder.ts
index 41ad8f66..89ebc315 100644
--- a/src/lib/generated/builders/shell-environment-builder.ts
+++ b/src/lib/generated/builders/shell-environment-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { ShellEnvironmentIntersection } from '../classes/shell-environment';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.ShellEnvironment} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.ShellEnvironment} The built object
+ * @returns {ShellEnvironmentIntersection} The built object
  */
-function buildingFn(model: Specification.ShellEnvironment, options: BuildOptions): Specification.ShellEnvironment {
+function buildingFn(model: Specification.ShellEnvironment, options: BuildOptions): ShellEnvironmentIntersection {
   const instance = new Classes.ShellEnvironment(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.ShellEnvironment;
+  return (options.normalize ? instance.normalize() : instance) as ShellEnvironmentIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.ShellEnvironment`
- * @returns {Builder} A builder for `Specification.ShellEnvironment`
+ * A factory to create a builder proxy for the type `ShellEnvironmentIntersection`
+ * @returns {Builder} A builder for `ShellEnvironmentIntersection`
  */
 export const shellEnvironmentBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, ShellEnvironmentIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/subflow-configuration-builder.ts b/src/lib/generated/builders/subflow-configuration-builder.ts
index 6f174f72..078997f9 100644
--- a/src/lib/generated/builders/subflow-configuration-builder.ts
+++ b/src/lib/generated/builders/subflow-configuration-builder.ts
@@ -22,27 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { SubflowConfigurationIntersection } from '../classes/subflow-configuration';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.SubflowConfiguration} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.SubflowConfiguration} The built object
+ * @returns {SubflowConfigurationIntersection} The built object
  */
 function buildingFn(
   model: Specification.SubflowConfiguration,
   options: BuildOptions,
-): Specification.SubflowConfiguration {
+): SubflowConfigurationIntersection {
   const instance = new Classes.SubflowConfiguration(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.SubflowConfiguration;
+  return (options.normalize ? instance.normalize() : instance) as SubflowConfigurationIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.SubflowConfiguration`
- * @returns {Builder} A builder for `Specification.SubflowConfiguration`
+ * A factory to create a builder proxy for the type `SubflowConfigurationIntersection`
+ * @returns {Builder} A builder for `SubflowConfigurationIntersection`
  */
 export const subflowConfigurationBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, SubflowConfigurationIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/subflow-input-builder.ts b/src/lib/generated/builders/subflow-input-builder.ts
index 4cfe328a..4551acab 100644
--- a/src/lib/generated/builders/subflow-input-builder.ts
+++ b/src/lib/generated/builders/subflow-input-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { SubflowInputIntersection } from '../classes/subflow-input';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.SubflowInput} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.SubflowInput} The built object
+ * @returns {SubflowInputIntersection} The built object
  */
-function buildingFn(model: Specification.SubflowInput, options: BuildOptions): Specification.SubflowInput {
+function buildingFn(model: Specification.SubflowInput, options: BuildOptions): SubflowInputIntersection {
   const instance = new Classes.SubflowInput(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.SubflowInput;
+  return (options.normalize ? instance.normalize() : instance) as SubflowInputIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.SubflowInput`
- * @returns {Builder} A builder for `Specification.SubflowInput`
+ * A factory to create a builder proxy for the type `SubflowInputIntersection`
+ * @returns {Builder} A builder for `SubflowInputIntersection`
  */
-export const subflowInputBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const subflowInputBuilder = (
+  model?: Partial,
+): Builder, SubflowInputIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/switch-case-builder.ts b/src/lib/generated/builders/switch-case-builder.ts
index 37d12500..86dc28b6 100644
--- a/src/lib/generated/builders/switch-case-builder.ts
+++ b/src/lib/generated/builders/switch-case-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { SwitchCaseIntersection } from '../classes/switch-case';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.SwitchCase} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.SwitchCase} The built object
+ * @returns {SwitchCaseIntersection} The built object
  */
-function buildingFn(model: Specification.SwitchCase, options: BuildOptions): Specification.SwitchCase {
+function buildingFn(model: Specification.SwitchCase, options: BuildOptions): SwitchCaseIntersection {
   const instance = new Classes.SwitchCase(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.SwitchCase;
+  return (options.normalize ? instance.normalize() : instance) as SwitchCaseIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.SwitchCase`
- * @returns {Builder} A builder for `Specification.SwitchCase`
+ * A factory to create a builder proxy for the type `SwitchCaseIntersection`
+ * @returns {Builder} A builder for `SwitchCaseIntersection`
  */
-export const switchCaseBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const switchCaseBuilder = (
+  model?: Partial,
+): Builder, SwitchCaseIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/switch-item-builder.ts b/src/lib/generated/builders/switch-item-builder.ts
index 8951a6ae..2935a6d8 100644
--- a/src/lib/generated/builders/switch-item-builder.ts
+++ b/src/lib/generated/builders/switch-item-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { SwitchItemIntersection } from '../classes/switch-item';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.SwitchItem} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.SwitchItem} The built object
+ * @returns {SwitchItemIntersection} The built object
  */
-function buildingFn(model: Specification.SwitchItem, options: BuildOptions): Specification.SwitchItem {
+function buildingFn(model: Specification.SwitchItem, options: BuildOptions): SwitchItemIntersection {
   const instance = new Classes.SwitchItem(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.SwitchItem;
+  return (options.normalize ? instance.normalize() : instance) as SwitchItemIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.SwitchItem`
- * @returns {Builder} A builder for `Specification.SwitchItem`
+ * A factory to create a builder proxy for the type `SwitchItemIntersection`
+ * @returns {Builder} A builder for `SwitchItemIntersection`
  */
-export const switchItemBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const switchItemBuilder = (
+  model?: Partial,
+): Builder, SwitchItemIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/switch-task-builder.ts b/src/lib/generated/builders/switch-task-builder.ts
index ec3d1d15..a60b0ce8 100644
--- a/src/lib/generated/builders/switch-task-builder.ts
+++ b/src/lib/generated/builders/switch-task-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { SwitchTaskIntersection } from '../classes/switch-task';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.SwitchTask} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.SwitchTask} The built object
+ * @returns {SwitchTaskIntersection} The built object
  */
-function buildingFn(model: Specification.SwitchTask, options: BuildOptions): Specification.SwitchTask {
+function buildingFn(model: Specification.SwitchTask, options: BuildOptions): SwitchTaskIntersection {
   const instance = new Classes.SwitchTask(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.SwitchTask;
+  return (options.normalize ? instance.normalize() : instance) as SwitchTaskIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.SwitchTask`
- * @returns {Builder} A builder for `Specification.SwitchTask`
+ * A factory to create a builder proxy for the type `SwitchTaskIntersection`
+ * @returns {Builder} A builder for `SwitchTaskIntersection`
  */
-export const switchTaskBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const switchTaskBuilder = (
+  model?: Partial,
+): Builder, SwitchTaskIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/switch-task-configuration-builder.ts b/src/lib/generated/builders/switch-task-configuration-builder.ts
index 3638ed0e..e17975a1 100644
--- a/src/lib/generated/builders/switch-task-configuration-builder.ts
+++ b/src/lib/generated/builders/switch-task-configuration-builder.ts
@@ -22,27 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { SwitchTaskConfigurationIntersection } from '../classes/switch-task-configuration';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.SwitchTaskConfiguration} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.SwitchTaskConfiguration} The built object
+ * @returns {SwitchTaskConfigurationIntersection} The built object
  */
 function buildingFn(
   model: Specification.SwitchTaskConfiguration,
   options: BuildOptions,
-): Specification.SwitchTaskConfiguration {
+): SwitchTaskConfigurationIntersection {
   const instance = new Classes.SwitchTaskConfiguration(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as unknown as Specification.SwitchTaskConfiguration;
+  return (options.normalize ? instance.normalize() : instance) as unknown as SwitchTaskConfigurationIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.SwitchTaskConfiguration`
- * @returns {Builder} A builder for `Specification.SwitchTaskConfiguration`
+ * A factory to create a builder proxy for the type `SwitchTaskConfigurationIntersection`
+ * @returns {Builder} A builder for `SwitchTaskConfigurationIntersection`
  */
 export const switchTaskConfigurationBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, SwitchTaskConfigurationIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/task-base-builder.ts b/src/lib/generated/builders/task-base-builder.ts
index 94b1338d..1896f262 100644
--- a/src/lib/generated/builders/task-base-builder.ts
+++ b/src/lib/generated/builders/task-base-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { TaskBaseIntersection } from '../classes/task-base';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.TaskBase} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.TaskBase} The built object
+ * @returns {TaskBaseIntersection} The built object
  */
-function buildingFn(model: Specification.TaskBase, options: BuildOptions): Specification.TaskBase {
+function buildingFn(model: Specification.TaskBase, options: BuildOptions): TaskBaseIntersection {
   const instance = new Classes.TaskBase(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.TaskBase;
+  return (options.normalize ? instance.normalize() : instance) as TaskBaseIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.TaskBase`
- * @returns {Builder} A builder for `Specification.TaskBase`
+ * A factory to create a builder proxy for the type `TaskBaseIntersection`
+ * @returns {Builder} A builder for `TaskBaseIntersection`
  */
-export const taskBaseBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const taskBaseBuilder = (
+  model?: Partial,
+): Builder, TaskBaseIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/task-base-if-builder.ts b/src/lib/generated/builders/task-base-if-builder.ts
index 2fba8d4c..b4a5b037 100644
--- a/src/lib/generated/builders/task-base-if-builder.ts
+++ b/src/lib/generated/builders/task-base-if-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { TaskBaseIfIntersection } from '../classes/task-base-if';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.TaskBaseIf} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.TaskBaseIf} The built object
+ * @returns {TaskBaseIfIntersection} The built object
  */
-function buildingFn(model: Specification.TaskBaseIf, options: BuildOptions): Specification.TaskBaseIf {
+function buildingFn(model: Specification.TaskBaseIf, options: BuildOptions): TaskBaseIfIntersection {
   const instance = new Classes.TaskBaseIf(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.TaskBaseIf;
+  return (options.normalize ? instance.normalize() : instance) as TaskBaseIfIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.TaskBaseIf`
- * @returns {Builder} A builder for `Specification.TaskBaseIf`
+ * A factory to create a builder proxy for the type `TaskBaseIfIntersection`
+ * @returns {Builder} A builder for `TaskBaseIfIntersection`
  */
-export const taskBaseIfBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const taskBaseIfBuilder = (
+  model?: Partial,
+): Builder, TaskBaseIfIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/task-base-timeout-builder.ts b/src/lib/generated/builders/task-base-timeout-builder.ts
index 0b9484da..991119a9 100644
--- a/src/lib/generated/builders/task-base-timeout-builder.ts
+++ b/src/lib/generated/builders/task-base-timeout-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { TaskBaseTimeoutIntersection } from '../classes/task-base-timeout';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.TaskBaseTimeout} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.TaskBaseTimeout} The built object
+ * @returns {TaskBaseTimeoutIntersection} The built object
  */
-function buildingFn(model: Specification.TaskBaseTimeout, options: BuildOptions): Specification.TaskBaseTimeout {
+function buildingFn(model: Specification.TaskBaseTimeout, options: BuildOptions): TaskBaseTimeoutIntersection {
   const instance = new Classes.TaskBaseTimeout(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.TaskBaseTimeout;
+  return (options.normalize ? instance.normalize() : instance) as TaskBaseTimeoutIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.TaskBaseTimeout`
- * @returns {Builder} A builder for `Specification.TaskBaseTimeout`
+ * A factory to create a builder proxy for the type `TaskBaseTimeoutIntersection`
+ * @returns {Builder} A builder for `TaskBaseTimeoutIntersection`
  */
 export const taskBaseTimeoutBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, TaskBaseTimeoutIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/task-builder.ts b/src/lib/generated/builders/task-builder.ts
index d5477e4b..c74aa8c9 100644
--- a/src/lib/generated/builders/task-builder.ts
+++ b/src/lib/generated/builders/task-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { TaskIntersection } from '../classes/task';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.Task} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.Task} The built object
+ * @returns {TaskIntersection} The built object
  */
-function buildingFn(model: Specification.Task, options: BuildOptions): Specification.Task {
+function buildingFn(model: Specification.Task, options: BuildOptions): TaskIntersection {
   const instance = new Classes.Task(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.Task;
+  return (options.normalize ? instance.normalize() : instance) as TaskIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.Task`
- * @returns {Builder} A builder for `Specification.Task`
+ * A factory to create a builder proxy for the type `TaskIntersection`
+ * @returns {Builder} A builder for `TaskIntersection`
  */
-export const taskBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const taskBuilder = (
+  model?: Partial,
+): Builder, TaskIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/task-item-builder.ts b/src/lib/generated/builders/task-item-builder.ts
index 8b6a988b..5ee71592 100644
--- a/src/lib/generated/builders/task-item-builder.ts
+++ b/src/lib/generated/builders/task-item-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { TaskItemIntersection } from '../classes/task-item';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.TaskItem} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.TaskItem} The built object
+ * @returns {TaskItemIntersection} The built object
  */
-function buildingFn(model: Specification.TaskItem, options: BuildOptions): Specification.TaskItem {
+function buildingFn(model: Specification.TaskItem, options: BuildOptions): TaskItemIntersection {
   const instance = new Classes.TaskItem(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.TaskItem;
+  return (options.normalize ? instance.normalize() : instance) as TaskItemIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.TaskItem`
- * @returns {Builder} A builder for `Specification.TaskItem`
+ * A factory to create a builder proxy for the type `TaskItemIntersection`
+ * @returns {Builder} A builder for `TaskItemIntersection`
  */
-export const taskItemBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const taskItemBuilder = (
+  model?: Partial,
+): Builder, TaskItemIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/task-list-builder.ts b/src/lib/generated/builders/task-list-builder.ts
index 01a46f28..eb90ed3e 100644
--- a/src/lib/generated/builders/task-list-builder.ts
+++ b/src/lib/generated/builders/task-list-builder.ts
@@ -22,23 +22,26 @@
 
 import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { TaskListIntersection } from '../classes/task-list';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying array
  * @param {Specification.TaskList} model The proxied array
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.TaskList} The built array
+ * @returns {TaskListIntersection} The built array
  */
-function buildingFn(model: Specification.TaskList, options: BuildOptions): Specification.TaskList {
+function buildingFn(model: Specification.TaskList, options: BuildOptions): TaskListIntersection {
   const instance = new Classes.TaskList(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.TaskList;
+  return (options.normalize ? instance.normalize() : instance) as unknown as TaskListIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.TaskList`
- * @returns {ArrayBuilder} A builder for `Specification.TaskList`
+ * A factory to create a builder proxy for the type `TaskListIntersection`
+ * @returns {ArrayBuilder} A builder for `TaskListIntersection`
  */
-export const taskListBuilder = (model?: Specification.TaskList): ArrayBuilder =>
-  arrayBuilder(model, buildingFn);
+export const taskListBuilder = (
+  model?: Specification.TaskList,
+): ArrayBuilder =>
+  arrayBuilder(model, buildingFn);
diff --git a/src/lib/generated/builders/task-metadata-builder.ts b/src/lib/generated/builders/task-metadata-builder.ts
index e58f8a58..d9dc907d 100644
--- a/src/lib/generated/builders/task-metadata-builder.ts
+++ b/src/lib/generated/builders/task-metadata-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { TaskMetadataIntersection } from '../classes/task-metadata';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.TaskMetadata} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.TaskMetadata} The built object
+ * @returns {TaskMetadataIntersection} The built object
  */
-function buildingFn(model: Specification.TaskMetadata, options: BuildOptions): Specification.TaskMetadata {
+function buildingFn(model: Specification.TaskMetadata, options: BuildOptions): TaskMetadataIntersection {
   const instance = new Classes.TaskMetadata(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.TaskMetadata;
+  return (options.normalize ? instance.normalize() : instance) as TaskMetadataIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.TaskMetadata`
- * @returns {Builder} A builder for `Specification.TaskMetadata`
+ * A factory to create a builder proxy for the type `TaskMetadataIntersection`
+ * @returns {Builder} A builder for `TaskMetadataIntersection`
  */
-export const taskMetadataBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const taskMetadataBuilder = (
+  model?: Partial,
+): Builder, TaskMetadataIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/timeout-builder.ts b/src/lib/generated/builders/timeout-builder.ts
index 80b8e9a9..d395c819 100644
--- a/src/lib/generated/builders/timeout-builder.ts
+++ b/src/lib/generated/builders/timeout-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { TimeoutIntersection } from '../classes/timeout';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.Timeout} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.Timeout} The built object
+ * @returns {TimeoutIntersection} The built object
  */
-function buildingFn(model: Specification.Timeout, options: BuildOptions): Specification.Timeout {
+function buildingFn(model: Specification.Timeout, options: BuildOptions): TimeoutIntersection {
   const instance = new Classes.Timeout(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.Timeout;
+  return (options.normalize ? instance.normalize() : instance) as TimeoutIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.Timeout`
- * @returns {Builder} A builder for `Specification.Timeout`
+ * A factory to create a builder proxy for the type `TimeoutIntersection`
+ * @returns {Builder} A builder for `TimeoutIntersection`
  */
-export const timeoutBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const timeoutBuilder = (
+  model?: Partial,
+): Builder, TimeoutIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/try-task-builder.ts b/src/lib/generated/builders/try-task-builder.ts
index cce241fd..0a977db6 100644
--- a/src/lib/generated/builders/try-task-builder.ts
+++ b/src/lib/generated/builders/try-task-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { TryTaskIntersection } from '../classes/try-task';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.TryTask} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.TryTask} The built object
+ * @returns {TryTaskIntersection} The built object
  */
-function buildingFn(model: Specification.TryTask, options: BuildOptions): Specification.TryTask {
+function buildingFn(model: Specification.TryTask, options: BuildOptions): TryTaskIntersection {
   const instance = new Classes.TryTask(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.TryTask;
+  return (options.normalize ? instance.normalize() : instance) as TryTaskIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.TryTask`
- * @returns {Builder} A builder for `Specification.TryTask`
+ * A factory to create a builder proxy for the type `TryTaskIntersection`
+ * @returns {Builder} A builder for `TryTaskIntersection`
  */
-export const tryTaskBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const tryTaskBuilder = (
+  model?: Partial,
+): Builder, TryTaskIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/try-task-catch-builder.ts b/src/lib/generated/builders/try-task-catch-builder.ts
index b41a053f..2b534d7a 100644
--- a/src/lib/generated/builders/try-task-catch-builder.ts
+++ b/src/lib/generated/builders/try-task-catch-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { TryTaskCatchIntersection } from '../classes/try-task-catch';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.TryTaskCatch} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.TryTaskCatch} The built object
+ * @returns {TryTaskCatchIntersection} The built object
  */
-function buildingFn(model: Specification.TryTaskCatch, options: BuildOptions): Specification.TryTaskCatch {
+function buildingFn(model: Specification.TryTaskCatch, options: BuildOptions): TryTaskCatchIntersection {
   const instance = new Classes.TryTaskCatch(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.TryTaskCatch;
+  return (options.normalize ? instance.normalize() : instance) as TryTaskCatchIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.TryTaskCatch`
- * @returns {Builder} A builder for `Specification.TryTaskCatch`
+ * A factory to create a builder proxy for the type `TryTaskCatchIntersection`
+ * @returns {Builder} A builder for `TryTaskCatchIntersection`
  */
-export const tryTaskCatchBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const tryTaskCatchBuilder = (
+  model?: Partial,
+): Builder, TryTaskCatchIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/try-task-catch-retry-builder.ts b/src/lib/generated/builders/try-task-catch-retry-builder.ts
index 6ab4662a..0db8167b 100644
--- a/src/lib/generated/builders/try-task-catch-retry-builder.ts
+++ b/src/lib/generated/builders/try-task-catch-retry-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { TryTaskCatchRetryIntersection } from '../classes/try-task-catch-retry';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.TryTaskCatchRetry} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.TryTaskCatchRetry} The built object
+ * @returns {TryTaskCatchRetryIntersection} The built object
  */
-function buildingFn(model: Specification.TryTaskCatchRetry, options: BuildOptions): Specification.TryTaskCatchRetry {
+function buildingFn(model: Specification.TryTaskCatchRetry, options: BuildOptions): TryTaskCatchRetryIntersection {
   const instance = new Classes.TryTaskCatchRetry(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.TryTaskCatchRetry;
+  return (options.normalize ? instance.normalize() : instance) as TryTaskCatchRetryIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.TryTaskCatchRetry`
- * @returns {Builder} A builder for `Specification.TryTaskCatchRetry`
+ * A factory to create a builder proxy for the type `TryTaskCatchRetryIntersection`
+ * @returns {Builder} A builder for `TryTaskCatchRetryIntersection`
  */
 export const tryTaskCatchRetryBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, TryTaskCatchRetryIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/uri-template-builder.ts b/src/lib/generated/builders/uri-template-builder.ts
index 80e4a2ea..ec5713fb 100644
--- a/src/lib/generated/builders/uri-template-builder.ts
+++ b/src/lib/generated/builders/uri-template-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { UriTemplateIntersection } from '../classes/uri-template';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.UriTemplate} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.UriTemplate} The built object
+ * @returns {UriTemplateIntersection} The built object
  */
-function buildingFn(model: Specification.UriTemplate, options: BuildOptions): Specification.UriTemplate {
+function buildingFn(model: Specification.UriTemplate, options: BuildOptions): UriTemplateIntersection {
   const instance = new Classes.UriTemplate(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.UriTemplate;
+  return (options.normalize ? instance.normalize() : instance) as UriTemplateIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.UriTemplate`
- * @returns {Builder} A builder for `Specification.UriTemplate`
+ * A factory to create a builder proxy for the type `UriTemplateIntersection`
+ * @returns {Builder} A builder for `UriTemplateIntersection`
  */
-export const uriTemplateBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const uriTemplateBuilder = (
+  model?: Partial,
+): Builder, UriTemplateIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/use-authentications-builder.ts b/src/lib/generated/builders/use-authentications-builder.ts
index 8341f54b..0c224bbc 100644
--- a/src/lib/generated/builders/use-authentications-builder.ts
+++ b/src/lib/generated/builders/use-authentications-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { UseAuthenticationsIntersection } from '../classes/use-authentications';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.UseAuthentications} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.UseAuthentications} The built object
+ * @returns {UseAuthenticationsIntersection} The built object
  */
-function buildingFn(model: Specification.UseAuthentications, options: BuildOptions): Specification.UseAuthentications {
+function buildingFn(model: Specification.UseAuthentications, options: BuildOptions): UseAuthenticationsIntersection {
   const instance = new Classes.UseAuthentications(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.UseAuthentications;
+  return (options.normalize ? instance.normalize() : instance) as UseAuthenticationsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.UseAuthentications`
- * @returns {Builder} A builder for `Specification.UseAuthentications`
+ * A factory to create a builder proxy for the type `UseAuthenticationsIntersection`
+ * @returns {Builder} A builder for `UseAuthenticationsIntersection`
  */
 export const useAuthenticationsBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, UseAuthenticationsIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/use-builder.ts b/src/lib/generated/builders/use-builder.ts
index f5da14d2..32c748dd 100644
--- a/src/lib/generated/builders/use-builder.ts
+++ b/src/lib/generated/builders/use-builder.ts
@@ -22,23 +22,24 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { UseIntersection } from '../classes/use';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.Use} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.Use} The built object
+ * @returns {UseIntersection} The built object
  */
-function buildingFn(model: Specification.Use, options: BuildOptions): Specification.Use {
+function buildingFn(model: Specification.Use, options: BuildOptions): UseIntersection {
   const instance = new Classes.Use(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.Use;
+  return (options.normalize ? instance.normalize() : instance) as UseIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.Use`
- * @returns {Builder} A builder for `Specification.Use`
+ * A factory to create a builder proxy for the type `UseIntersection`
+ * @returns {Builder} A builder for `UseIntersection`
  */
-export const useBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const useBuilder = (model?: Partial): Builder, UseIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/use-catalogs-builder.ts b/src/lib/generated/builders/use-catalogs-builder.ts
index 3c5b870d..1e569e92 100644
--- a/src/lib/generated/builders/use-catalogs-builder.ts
+++ b/src/lib/generated/builders/use-catalogs-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { UseCatalogsIntersection } from '../classes/use-catalogs';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.UseCatalogs} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.UseCatalogs} The built object
+ * @returns {UseCatalogsIntersection} The built object
  */
-function buildingFn(model: Specification.UseCatalogs, options: BuildOptions): Specification.UseCatalogs {
+function buildingFn(model: Specification.UseCatalogs, options: BuildOptions): UseCatalogsIntersection {
   const instance = new Classes.UseCatalogs(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.UseCatalogs;
+  return (options.normalize ? instance.normalize() : instance) as UseCatalogsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.UseCatalogs`
- * @returns {Builder} A builder for `Specification.UseCatalogs`
+ * A factory to create a builder proxy for the type `UseCatalogsIntersection`
+ * @returns {Builder} A builder for `UseCatalogsIntersection`
  */
-export const useCatalogsBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const useCatalogsBuilder = (
+  model?: Partial,
+): Builder, UseCatalogsIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/use-errors-builder.ts b/src/lib/generated/builders/use-errors-builder.ts
index 73b6b6e1..59ebec2b 100644
--- a/src/lib/generated/builders/use-errors-builder.ts
+++ b/src/lib/generated/builders/use-errors-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { UseErrorsIntersection } from '../classes/use-errors';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.UseErrors} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.UseErrors} The built object
+ * @returns {UseErrorsIntersection} The built object
  */
-function buildingFn(model: Specification.UseErrors, options: BuildOptions): Specification.UseErrors {
+function buildingFn(model: Specification.UseErrors, options: BuildOptions): UseErrorsIntersection {
   const instance = new Classes.UseErrors(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.UseErrors;
+  return (options.normalize ? instance.normalize() : instance) as UseErrorsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.UseErrors`
- * @returns {Builder} A builder for `Specification.UseErrors`
+ * A factory to create a builder proxy for the type `UseErrorsIntersection`
+ * @returns {Builder} A builder for `UseErrorsIntersection`
  */
-export const useErrorsBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const useErrorsBuilder = (
+  model?: Partial,
+): Builder, UseErrorsIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/use-extensions-builder.ts b/src/lib/generated/builders/use-extensions-builder.ts
index 8519758e..a58eba58 100644
--- a/src/lib/generated/builders/use-extensions-builder.ts
+++ b/src/lib/generated/builders/use-extensions-builder.ts
@@ -22,23 +22,26 @@
 
 import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { UseExtensionsIntersection } from '../classes/use-extensions';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying array
  * @param {Specification.UseExtensions} model The proxied array
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.UseExtensions} The built array
+ * @returns {UseExtensionsIntersection} The built array
  */
-function buildingFn(model: Specification.UseExtensions, options: BuildOptions): Specification.UseExtensions {
+function buildingFn(model: Specification.UseExtensions, options: BuildOptions): UseExtensionsIntersection {
   const instance = new Classes.UseExtensions(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.UseExtensions;
+  return (options.normalize ? instance.normalize() : instance) as unknown as UseExtensionsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.UseExtensions`
- * @returns {ArrayBuilder} A builder for `Specification.UseExtensions`
+ * A factory to create a builder proxy for the type `UseExtensionsIntersection`
+ * @returns {ArrayBuilder} A builder for `UseExtensionsIntersection`
  */
-export const useExtensionsBuilder = (model?: Specification.UseExtensions): ArrayBuilder =>
-  arrayBuilder(model, buildingFn);
+export const useExtensionsBuilder = (
+  model?: Specification.UseExtensions,
+): ArrayBuilder =>
+  arrayBuilder(model, buildingFn);
diff --git a/src/lib/generated/builders/use-functions-builder.ts b/src/lib/generated/builders/use-functions-builder.ts
index faff3cca..4bd13998 100644
--- a/src/lib/generated/builders/use-functions-builder.ts
+++ b/src/lib/generated/builders/use-functions-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { UseFunctionsIntersection } from '../classes/use-functions';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.UseFunctions} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.UseFunctions} The built object
+ * @returns {UseFunctionsIntersection} The built object
  */
-function buildingFn(model: Specification.UseFunctions, options: BuildOptions): Specification.UseFunctions {
+function buildingFn(model: Specification.UseFunctions, options: BuildOptions): UseFunctionsIntersection {
   const instance = new Classes.UseFunctions(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.UseFunctions;
+  return (options.normalize ? instance.normalize() : instance) as UseFunctionsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.UseFunctions`
- * @returns {Builder} A builder for `Specification.UseFunctions`
+ * A factory to create a builder proxy for the type `UseFunctionsIntersection`
+ * @returns {Builder} A builder for `UseFunctionsIntersection`
  */
-export const useFunctionsBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const useFunctionsBuilder = (
+  model?: Partial,
+): Builder, UseFunctionsIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/use-retries-builder.ts b/src/lib/generated/builders/use-retries-builder.ts
index ed495ea7..2aea55b3 100644
--- a/src/lib/generated/builders/use-retries-builder.ts
+++ b/src/lib/generated/builders/use-retries-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { UseRetriesIntersection } from '../classes/use-retries';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.UseRetries} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.UseRetries} The built object
+ * @returns {UseRetriesIntersection} The built object
  */
-function buildingFn(model: Specification.UseRetries, options: BuildOptions): Specification.UseRetries {
+function buildingFn(model: Specification.UseRetries, options: BuildOptions): UseRetriesIntersection {
   const instance = new Classes.UseRetries(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.UseRetries;
+  return (options.normalize ? instance.normalize() : instance) as UseRetriesIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.UseRetries`
- * @returns {Builder} A builder for `Specification.UseRetries`
+ * A factory to create a builder proxy for the type `UseRetriesIntersection`
+ * @returns {Builder} A builder for `UseRetriesIntersection`
  */
-export const useRetriesBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const useRetriesBuilder = (
+  model?: Partial,
+): Builder, UseRetriesIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/use-secrets-builder.ts b/src/lib/generated/builders/use-secrets-builder.ts
index 7c618d89..432dd6f9 100644
--- a/src/lib/generated/builders/use-secrets-builder.ts
+++ b/src/lib/generated/builders/use-secrets-builder.ts
@@ -22,23 +22,24 @@
 
 import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { UseSecretsIntersection } from '../classes/use-secrets';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying array
  * @param {Specification.UseSecrets} model The proxied array
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.UseSecrets} The built array
+ * @returns {UseSecretsIntersection} The built array
  */
-function buildingFn(model: Specification.UseSecrets, options: BuildOptions): Specification.UseSecrets {
+function buildingFn(model: Specification.UseSecrets, options: BuildOptions): UseSecretsIntersection {
   const instance = new Classes.UseSecrets(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.UseSecrets;
+  return (options.normalize ? instance.normalize() : instance) as unknown as UseSecretsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.UseSecrets`
- * @returns {ArrayBuilder} A builder for `Specification.UseSecrets`
+ * A factory to create a builder proxy for the type `UseSecretsIntersection`
+ * @returns {ArrayBuilder} A builder for `UseSecretsIntersection`
  */
-export const useSecretsBuilder = (model?: Specification.UseSecrets): ArrayBuilder =>
-  arrayBuilder(model, buildingFn);
+export const useSecretsBuilder = (model?: Specification.UseSecrets): ArrayBuilder =>
+  arrayBuilder(model, buildingFn);
diff --git a/src/lib/generated/builders/use-timeouts-builder.ts b/src/lib/generated/builders/use-timeouts-builder.ts
index 89cb328d..f15cd84b 100644
--- a/src/lib/generated/builders/use-timeouts-builder.ts
+++ b/src/lib/generated/builders/use-timeouts-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { UseTimeoutsIntersection } from '../classes/use-timeouts';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.UseTimeouts} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.UseTimeouts} The built object
+ * @returns {UseTimeoutsIntersection} The built object
  */
-function buildingFn(model: Specification.UseTimeouts, options: BuildOptions): Specification.UseTimeouts {
+function buildingFn(model: Specification.UseTimeouts, options: BuildOptions): UseTimeoutsIntersection {
   const instance = new Classes.UseTimeouts(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.UseTimeouts;
+  return (options.normalize ? instance.normalize() : instance) as UseTimeoutsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.UseTimeouts`
- * @returns {Builder} A builder for `Specification.UseTimeouts`
+ * A factory to create a builder proxy for the type `UseTimeoutsIntersection`
+ * @returns {Builder} A builder for `UseTimeoutsIntersection`
  */
-export const useTimeoutsBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const useTimeoutsBuilder = (
+  model?: Partial,
+): Builder, UseTimeoutsIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/wait-task-builder.ts b/src/lib/generated/builders/wait-task-builder.ts
index 27413422..54e97138 100644
--- a/src/lib/generated/builders/wait-task-builder.ts
+++ b/src/lib/generated/builders/wait-task-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { WaitTaskIntersection } from '../classes/wait-task';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.WaitTask} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.WaitTask} The built object
+ * @returns {WaitTaskIntersection} The built object
  */
-function buildingFn(model: Specification.WaitTask, options: BuildOptions): Specification.WaitTask {
+function buildingFn(model: Specification.WaitTask, options: BuildOptions): WaitTaskIntersection {
   const instance = new Classes.WaitTask(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.WaitTask;
+  return (options.normalize ? instance.normalize() : instance) as WaitTaskIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.WaitTask`
- * @returns {Builder} A builder for `Specification.WaitTask`
+ * A factory to create a builder proxy for the type `WaitTaskIntersection`
+ * @returns {Builder} A builder for `WaitTaskIntersection`
  */
-export const waitTaskBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const waitTaskBuilder = (
+  model?: Partial,
+): Builder, WaitTaskIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/with-async-api-payload-builder.ts b/src/lib/generated/builders/with-async-api-payload-builder.ts
index 2717105c..3cacabf3 100644
--- a/src/lib/generated/builders/with-async-api-payload-builder.ts
+++ b/src/lib/generated/builders/with-async-api-payload-builder.ts
@@ -22,27 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { WithAsyncAPIPayloadIntersection } from '../classes/with-async-api-payload';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.WithAsyncAPIPayload} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.WithAsyncAPIPayload} The built object
+ * @returns {WithAsyncAPIPayloadIntersection} The built object
  */
-function buildingFn(
-  model: Specification.WithAsyncAPIPayload,
-  options: BuildOptions,
-): Specification.WithAsyncAPIPayload {
+function buildingFn(model: Specification.WithAsyncAPIPayload, options: BuildOptions): WithAsyncAPIPayloadIntersection {
   const instance = new Classes.WithAsyncAPIPayload(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.WithAsyncAPIPayload;
+  return (options.normalize ? instance.normalize() : instance) as WithAsyncAPIPayloadIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.WithAsyncAPIPayload`
- * @returns {Builder} A builder for `Specification.WithAsyncAPIPayload`
+ * A factory to create a builder proxy for the type `WithAsyncAPIPayloadIntersection`
+ * @returns {Builder} A builder for `WithAsyncAPIPayloadIntersection`
  */
 export const withAsyncAPIPayloadBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, WithAsyncAPIPayloadIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/with-event-builder.ts b/src/lib/generated/builders/with-event-builder.ts
index 78d7466f..2037d6f4 100644
--- a/src/lib/generated/builders/with-event-builder.ts
+++ b/src/lib/generated/builders/with-event-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { WithEventIntersection } from '../classes/with-event';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.WithEvent} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.WithEvent} The built object
+ * @returns {WithEventIntersection} The built object
  */
-function buildingFn(model: Specification.WithEvent, options: BuildOptions): Specification.WithEvent {
+function buildingFn(model: Specification.WithEvent, options: BuildOptions): WithEventIntersection {
   const instance = new Classes.WithEvent(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.WithEvent;
+  return (options.normalize ? instance.normalize() : instance) as WithEventIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.WithEvent`
- * @returns {Builder} A builder for `Specification.WithEvent`
+ * A factory to create a builder proxy for the type `WithEventIntersection`
+ * @returns {Builder} A builder for `WithEventIntersection`
  */
-export const withEventBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const withEventBuilder = (
+  model?: Partial,
+): Builder, WithEventIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/with-grpc-arguments-builder.ts b/src/lib/generated/builders/with-grpc-arguments-builder.ts
index 54f09ef5..b865c715 100644
--- a/src/lib/generated/builders/with-grpc-arguments-builder.ts
+++ b/src/lib/generated/builders/with-grpc-arguments-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { WithGRPCArgumentsIntersection } from '../classes/with-grpc-arguments';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.WithGRPCArguments} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.WithGRPCArguments} The built object
+ * @returns {WithGRPCArgumentsIntersection} The built object
  */
-function buildingFn(model: Specification.WithGRPCArguments, options: BuildOptions): Specification.WithGRPCArguments {
+function buildingFn(model: Specification.WithGRPCArguments, options: BuildOptions): WithGRPCArgumentsIntersection {
   const instance = new Classes.WithGRPCArguments(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.WithGRPCArguments;
+  return (options.normalize ? instance.normalize() : instance) as WithGRPCArgumentsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.WithGRPCArguments`
- * @returns {Builder} A builder for `Specification.WithGRPCArguments`
+ * A factory to create a builder proxy for the type `WithGRPCArgumentsIntersection`
+ * @returns {Builder} A builder for `WithGRPCArgumentsIntersection`
  */
 export const withGRPCArgumentsBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, WithGRPCArgumentsIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/with-grpc-service-builder.ts b/src/lib/generated/builders/with-grpc-service-builder.ts
index 965da7e9..d4a890dd 100644
--- a/src/lib/generated/builders/with-grpc-service-builder.ts
+++ b/src/lib/generated/builders/with-grpc-service-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { WithGRPCServiceIntersection } from '../classes/with-grpc-service';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.WithGRPCService} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.WithGRPCService} The built object
+ * @returns {WithGRPCServiceIntersection} The built object
  */
-function buildingFn(model: Specification.WithGRPCService, options: BuildOptions): Specification.WithGRPCService {
+function buildingFn(model: Specification.WithGRPCService, options: BuildOptions): WithGRPCServiceIntersection {
   const instance = new Classes.WithGRPCService(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.WithGRPCService;
+  return (options.normalize ? instance.normalize() : instance) as WithGRPCServiceIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.WithGRPCService`
- * @returns {Builder} A builder for `Specification.WithGRPCService`
+ * A factory to create a builder proxy for the type `WithGRPCServiceIntersection`
+ * @returns {Builder} A builder for `WithGRPCServiceIntersection`
  */
 export const withGRPCServiceBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, WithGRPCServiceIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/with-http-body-builder.ts b/src/lib/generated/builders/with-http-body-builder.ts
index c9cfacc6..4eea7cf7 100644
--- a/src/lib/generated/builders/with-http-body-builder.ts
+++ b/src/lib/generated/builders/with-http-body-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { WithHTTPBodyIntersection } from '../classes/with-http-body';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.WithHTTPBody} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.WithHTTPBody} The built object
+ * @returns {WithHTTPBodyIntersection} The built object
  */
-function buildingFn(model: Specification.WithHTTPBody, options: BuildOptions): Specification.WithHTTPBody {
+function buildingFn(model: Specification.WithHTTPBody, options: BuildOptions): WithHTTPBodyIntersection {
   const instance = new Classes.WithHTTPBody(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.WithHTTPBody;
+  return (options.normalize ? instance.normalize() : instance) as WithHTTPBodyIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.WithHTTPBody`
- * @returns {Builder} A builder for `Specification.WithHTTPBody`
+ * A factory to create a builder proxy for the type `WithHTTPBodyIntersection`
+ * @returns {Builder} A builder for `WithHTTPBodyIntersection`
  */
-export const withHTTPBodyBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const withHTTPBodyBuilder = (
+  model?: Partial,
+): Builder, WithHTTPBodyIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/with-http-headers-builder.ts b/src/lib/generated/builders/with-http-headers-builder.ts
index 5e834e5e..8af5c763 100644
--- a/src/lib/generated/builders/with-http-headers-builder.ts
+++ b/src/lib/generated/builders/with-http-headers-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { WithHTTPHeadersIntersection } from '../classes/with-http-headers';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.WithHTTPHeaders} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.WithHTTPHeaders} The built object
+ * @returns {WithHTTPHeadersIntersection} The built object
  */
-function buildingFn(model: Specification.WithHTTPHeaders, options: BuildOptions): Specification.WithHTTPHeaders {
+function buildingFn(model: Specification.WithHTTPHeaders, options: BuildOptions): WithHTTPHeadersIntersection {
   const instance = new Classes.WithHTTPHeaders(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.WithHTTPHeaders;
+  return (options.normalize ? instance.normalize() : instance) as WithHTTPHeadersIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.WithHTTPHeaders`
- * @returns {Builder} A builder for `Specification.WithHTTPHeaders`
+ * A factory to create a builder proxy for the type `WithHTTPHeadersIntersection`
+ * @returns {Builder} A builder for `WithHTTPHeadersIntersection`
  */
 export const withHTTPHeadersBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, WithHTTPHeadersIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/with-http-query-builder.ts b/src/lib/generated/builders/with-http-query-builder.ts
index b08d6c26..7a58dda5 100644
--- a/src/lib/generated/builders/with-http-query-builder.ts
+++ b/src/lib/generated/builders/with-http-query-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { WithHTTPQueryIntersection } from '../classes/with-http-query';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.WithHTTPQuery} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.WithHTTPQuery} The built object
+ * @returns {WithHTTPQueryIntersection} The built object
  */
-function buildingFn(model: Specification.WithHTTPQuery, options: BuildOptions): Specification.WithHTTPQuery {
+function buildingFn(model: Specification.WithHTTPQuery, options: BuildOptions): WithHTTPQueryIntersection {
   const instance = new Classes.WithHTTPQuery(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.WithHTTPQuery;
+  return (options.normalize ? instance.normalize() : instance) as WithHTTPQueryIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.WithHTTPQuery`
- * @returns {Builder} A builder for `Specification.WithHTTPQuery`
+ * A factory to create a builder proxy for the type `WithHTTPQueryIntersection`
+ * @returns {Builder} A builder for `WithHTTPQueryIntersection`
  */
 export const withHTTPQueryBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, WithHTTPQueryIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/with-open-api-parameters-builder.ts b/src/lib/generated/builders/with-open-api-parameters-builder.ts
index 159a1df6..31567562 100644
--- a/src/lib/generated/builders/with-open-api-parameters-builder.ts
+++ b/src/lib/generated/builders/with-open-api-parameters-builder.ts
@@ -22,27 +22,29 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { WithOpenAPIParametersIntersection } from '../classes/with-open-api-parameters';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.WithOpenAPIParameters} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.WithOpenAPIParameters} The built object
+ * @returns {WithOpenAPIParametersIntersection} The built object
  */
 function buildingFn(
   model: Specification.WithOpenAPIParameters,
   options: BuildOptions,
-): Specification.WithOpenAPIParameters {
+): WithOpenAPIParametersIntersection {
   const instance = new Classes.WithOpenAPIParameters(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.WithOpenAPIParameters;
+  return (options.normalize ? instance.normalize() : instance) as WithOpenAPIParametersIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.WithOpenAPIParameters`
- * @returns {Builder} A builder for `Specification.WithOpenAPIParameters`
+ * A factory to create a builder proxy for the type `WithOpenAPIParametersIntersection`
+ * @returns {Builder} A builder for `WithOpenAPIParametersIntersection`
  */
 export const withOpenAPIParametersBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, WithOpenAPIParametersIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/workflow-builder.ts b/src/lib/generated/builders/workflow-builder.ts
index befe3f13..cd5fc3db 100644
--- a/src/lib/generated/builders/workflow-builder.ts
+++ b/src/lib/generated/builders/workflow-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { WorkflowIntersection } from '../classes/workflow';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.Workflow} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.Workflow} The built object
+ * @returns {WorkflowIntersection} The built object
  */
-function buildingFn(model: Specification.Workflow, options: BuildOptions): Specification.Workflow {
+function buildingFn(model: Specification.Workflow, options: BuildOptions): WorkflowIntersection {
   const instance = new Classes.Workflow(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.Workflow;
+  return (options.normalize ? instance.normalize() : instance) as WorkflowIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.Workflow`
- * @returns {Builder} A builder for `Specification.Workflow`
+ * A factory to create a builder proxy for the type `WorkflowIntersection`
+ * @returns {Builder} A builder for `WorkflowIntersection`
  */
-export const workflowBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const workflowBuilder = (
+  model?: Partial,
+): Builder, WorkflowIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/workflow-metadata-builder.ts b/src/lib/generated/builders/workflow-metadata-builder.ts
index 9bdbc635..97c700cb 100644
--- a/src/lib/generated/builders/workflow-metadata-builder.ts
+++ b/src/lib/generated/builders/workflow-metadata-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { WorkflowMetadataIntersection } from '../classes/workflow-metadata';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.WorkflowMetadata} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.WorkflowMetadata} The built object
+ * @returns {WorkflowMetadataIntersection} The built object
  */
-function buildingFn(model: Specification.WorkflowMetadata, options: BuildOptions): Specification.WorkflowMetadata {
+function buildingFn(model: Specification.WorkflowMetadata, options: BuildOptions): WorkflowMetadataIntersection {
   const instance = new Classes.WorkflowMetadata(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.WorkflowMetadata;
+  return (options.normalize ? instance.normalize() : instance) as WorkflowMetadataIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.WorkflowMetadata`
- * @returns {Builder} A builder for `Specification.WorkflowMetadata`
+ * A factory to create a builder proxy for the type `WorkflowMetadataIntersection`
+ * @returns {Builder} A builder for `WorkflowMetadataIntersection`
  */
 export const workflowMetadataBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, WorkflowMetadataIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/workflow-tags-builder.ts b/src/lib/generated/builders/workflow-tags-builder.ts
index 91acb947..d92aab29 100644
--- a/src/lib/generated/builders/workflow-tags-builder.ts
+++ b/src/lib/generated/builders/workflow-tags-builder.ts
@@ -22,23 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { WorkflowTagsIntersection } from '../classes/workflow-tags';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.WorkflowTags} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.WorkflowTags} The built object
+ * @returns {WorkflowTagsIntersection} The built object
  */
-function buildingFn(model: Specification.WorkflowTags, options: BuildOptions): Specification.WorkflowTags {
+function buildingFn(model: Specification.WorkflowTags, options: BuildOptions): WorkflowTagsIntersection {
   const instance = new Classes.WorkflowTags(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.WorkflowTags;
+  return (options.normalize ? instance.normalize() : instance) as WorkflowTagsIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.WorkflowTags`
- * @returns {Builder} A builder for `Specification.WorkflowTags`
+ * A factory to create a builder proxy for the type `WorkflowTagsIntersection`
+ * @returns {Builder} A builder for `WorkflowTagsIntersection`
  */
-export const workflowTagsBuilder = (model?: Partial): Builder =>
-  builder(model, buildingFn);
+export const workflowTagsBuilder = (
+  model?: Partial,
+): Builder, WorkflowTagsIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/builders/workflow-timeout-builder.ts b/src/lib/generated/builders/workflow-timeout-builder.ts
index 3292ca41..dd084c3c 100644
--- a/src/lib/generated/builders/workflow-timeout-builder.ts
+++ b/src/lib/generated/builders/workflow-timeout-builder.ts
@@ -22,24 +22,26 @@
 
 import { builder, Builder, BuildOptions } from '../../builder';
 import { Classes } from '../classes';
+import { WorkflowTimeoutIntersection } from '../classes/workflow-timeout';
 import { Specification } from '../definitions';
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.WorkflowTimeout} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.WorkflowTimeout} The built object
+ * @returns {WorkflowTimeoutIntersection} The built object
  */
-function buildingFn(model: Specification.WorkflowTimeout, options: BuildOptions): Specification.WorkflowTimeout {
+function buildingFn(model: Specification.WorkflowTimeout, options: BuildOptions): WorkflowTimeoutIntersection {
   const instance = new Classes.WorkflowTimeout(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.WorkflowTimeout;
+  return (options.normalize ? instance.normalize() : instance) as WorkflowTimeoutIntersection;
 }
 
 /**
- * A factory to create a builder proxy for the type `Specification.WorkflowTimeout`
- * @returns {Builder} A builder for `Specification.WorkflowTimeout`
+ * A factory to create a builder proxy for the type `WorkflowTimeoutIntersection`
+ * @returns {Builder} A builder for `WorkflowTimeoutIntersection`
  */
 export const workflowTimeoutBuilder = (
   model?: Partial,
-): Builder => builder(model, buildingFn);
+): Builder, WorkflowTimeoutIntersection> =>
+  builder(model, buildingFn);
diff --git a/src/lib/generated/classes/all-event-consumption-strategy-configuration.ts b/src/lib/generated/classes/all-event-consumption-strategy-configuration.ts
index fe9e2c7d..5a6c71a3 100644
--- a/src/lib/generated/classes/all-event-consumption-strategy-configuration.ts
+++ b/src/lib/generated/classes/all-event-consumption-strategy-configuration.ts
@@ -26,6 +26,19 @@ import { ArrayHydrator } from '../../hydrator';
 import { getLifecycleHooks } from '../../lifecycle-hooks';
 import { validate } from '../../validation';
 
+/**
+ * Represents the intersection between the AllEventConsumptionStrategyConfiguration class and type
+ */
+export type AllEventConsumptionStrategyConfigurationIntersection = AllEventConsumptionStrategyConfiguration &
+  Specification.AllEventConsumptionStrategyConfiguration;
+
+/**
+ * Represents a constructor for the intersection of the AllEventConsumptionStrategyConfiguration class and type
+ */
+export interface AllEventConsumptionStrategyConfigurationConstructor {
+  new (model?: Array | number): AllEventConsumptionStrategyConfigurationIntersection;
+}
+
 /**
  * Represents a collection of Specification.EventFilter.
  * Inherits from ArrayHydrator to handle array-specific hydration.
@@ -69,4 +82,6 @@ export class AllEventConsumptionStrategyConfiguration extends ArrayHydrator | number): AnyEventConsumptionStrategyConfigurationIntersection;
+}
+
 /**
  * Represents a collection of Specification.EventFilter.
  * Inherits from ArrayHydrator to handle array-specific hydration.
@@ -69,4 +82,6 @@ export class AnyEventConsumptionStrategyConfiguration extends ArrayHydrator | number): OAuth2AutenthicationDataAudiencesIntersection;
+}
+
 /**
  * Represents a collection of string.
  * Inherits from ArrayHydrator to handle array-specific hydration.
@@ -68,4 +81,6 @@ export class OAuth2AutenthicationDataAudiences extends ArrayHydrator {
   }
 }
 
-export const _OAuth2AutenthicationDataAudiences = OAuth2AutenthicationDataAudiences; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes
+export const _OAuth2AutenthicationDataAudiences =
+  OAuth2AutenthicationDataAudiences as unknown as OAuth2AutenthicationDataAudiencesConstructor;
+//export const _OAuth2AutenthicationDataAudiences = OAuth2AutenthicationDataAudiences; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes
diff --git a/src/lib/generated/classes/oauth2-autenthication-data-scopes.ts b/src/lib/generated/classes/oauth2-autenthication-data-scopes.ts
index 6e791331..acc0c848 100644
--- a/src/lib/generated/classes/oauth2-autenthication-data-scopes.ts
+++ b/src/lib/generated/classes/oauth2-autenthication-data-scopes.ts
@@ -25,6 +25,19 @@ import { ArrayHydrator } from '../../hydrator';
 import { getLifecycleHooks } from '../../lifecycle-hooks';
 import { validate } from '../../validation';
 
+/**
+ * Represents the intersection between the OAuth2AutenthicationDataScopes class and type
+ */
+export type OAuth2AutenthicationDataScopesIntersection = OAuth2AutenthicationDataScopes &
+  Specification.OAuth2AutenthicationDataScopes;
+
+/**
+ * Represents a constructor for the intersection of the OAuth2AutenthicationDataScopes class and type
+ */
+export interface OAuth2AutenthicationDataScopesConstructor {
+  new (model?: Array | number): OAuth2AutenthicationDataScopesIntersection;
+}
+
 /**
  * Represents a collection of string.
  * Inherits from ArrayHydrator to handle array-specific hydration.
@@ -68,4 +81,6 @@ export class OAuth2AutenthicationDataScopes extends ArrayHydrator {
   }
 }
 
-export const _OAuth2AutenthicationDataScopes = OAuth2AutenthicationDataScopes; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes
+export const _OAuth2AutenthicationDataScopes =
+  OAuth2AutenthicationDataScopes as unknown as OAuth2AutenthicationDataScopesConstructor;
+//export const _OAuth2AutenthicationDataScopes = OAuth2AutenthicationDataScopes; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes
diff --git a/src/lib/generated/classes/oauth2-issuers.ts b/src/lib/generated/classes/oauth2-issuers.ts
index e3d2ce4b..a9607139 100644
--- a/src/lib/generated/classes/oauth2-issuers.ts
+++ b/src/lib/generated/classes/oauth2-issuers.ts
@@ -25,6 +25,18 @@ import { ArrayHydrator } from '../../hydrator';
 import { getLifecycleHooks } from '../../lifecycle-hooks';
 import { validate } from '../../validation';
 
+/**
+ * Represents the intersection between the OAuth2Issuers class and type
+ */
+export type OAuth2IssuersIntersection = OAuth2Issuers & Specification.OAuth2Issuers;
+
+/**
+ * Represents a constructor for the intersection of the OAuth2Issuers class and type
+ */
+export interface OAuth2IssuersConstructor {
+  new (model?: Array | number): OAuth2IssuersIntersection;
+}
+
 /**
  * Represents a collection of string.
  * Inherits from ArrayHydrator to handle array-specific hydration.
@@ -68,4 +80,5 @@ export class OAuth2Issuers extends ArrayHydrator {
   }
 }
 
-export const _OAuth2Issuers = OAuth2Issuers; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes
+export const _OAuth2Issuers = OAuth2Issuers as unknown as OAuth2IssuersConstructor;
+//export const _OAuth2Issuers = OAuth2Issuers; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes
diff --git a/src/lib/generated/classes/switch-task-configuration.ts b/src/lib/generated/classes/switch-task-configuration.ts
index 8b738935..647c5cb5 100644
--- a/src/lib/generated/classes/switch-task-configuration.ts
+++ b/src/lib/generated/classes/switch-task-configuration.ts
@@ -26,6 +26,18 @@ import { ArrayHydrator } from '../../hydrator';
 import { getLifecycleHooks } from '../../lifecycle-hooks';
 import { validate } from '../../validation';
 
+/**
+ * Represents the intersection between the SwitchTaskConfiguration class and type
+ */
+export type SwitchTaskConfigurationIntersection = SwitchTaskConfiguration & Specification.SwitchTaskConfiguration;
+
+/**
+ * Represents a constructor for the intersection of the SwitchTaskConfiguration class and type
+ */
+export interface SwitchTaskConfigurationConstructor {
+  new (model?: Array | number): SwitchTaskConfigurationIntersection;
+}
+
 /**
  * Represents a collection of Specification.SwitchItem.
  * Inherits from ArrayHydrator to handle array-specific hydration.
@@ -69,4 +81,5 @@ export class SwitchTaskConfiguration extends ArrayHydrator | number): TaskListIntersection;
+}
+
 /**
  * Represents a collection of Specification.TaskItem.
  * Inherits from ArrayHydrator to handle array-specific hydration.
@@ -69,4 +81,5 @@ export class TaskList extends ArrayHydrator {
   }
 }
 
-export const _TaskList = TaskList; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes
+export const _TaskList = TaskList as unknown as TaskListConstructor;
+//export const _TaskList = TaskList; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes
diff --git a/src/lib/generated/classes/use-extensions.ts b/src/lib/generated/classes/use-extensions.ts
index 8e94d79d..3fcf01bb 100644
--- a/src/lib/generated/classes/use-extensions.ts
+++ b/src/lib/generated/classes/use-extensions.ts
@@ -26,6 +26,18 @@ import { ArrayHydrator } from '../../hydrator';
 import { getLifecycleHooks } from '../../lifecycle-hooks';
 import { validate } from '../../validation';
 
+/**
+ * Represents the intersection between the UseExtensions class and type
+ */
+export type UseExtensionsIntersection = UseExtensions & Specification.UseExtensions;
+
+/**
+ * Represents a constructor for the intersection of the UseExtensions class and type
+ */
+export interface UseExtensionsConstructor {
+  new (model?: Array | number): UseExtensionsIntersection;
+}
+
 /**
  * Represents a collection of Specification.ExtensionItem.
  * Inherits from ArrayHydrator to handle array-specific hydration.
@@ -69,4 +81,5 @@ export class UseExtensions extends ArrayHydrator {
   }
 }
 
-export const _UseExtensions = UseExtensions; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes
+export const _UseExtensions = UseExtensions as unknown as UseExtensionsConstructor;
+//export const _UseExtensions = UseExtensions; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes
diff --git a/src/lib/generated/classes/use-secrets.ts b/src/lib/generated/classes/use-secrets.ts
index 6c9e74c2..c49c15a1 100644
--- a/src/lib/generated/classes/use-secrets.ts
+++ b/src/lib/generated/classes/use-secrets.ts
@@ -25,6 +25,18 @@ import { ArrayHydrator } from '../../hydrator';
 import { getLifecycleHooks } from '../../lifecycle-hooks';
 import { validate } from '../../validation';
 
+/**
+ * Represents the intersection between the UseSecrets class and type
+ */
+export type UseSecretsIntersection = UseSecrets & Specification.UseSecrets;
+
+/**
+ * Represents a constructor for the intersection of the UseSecrets class and type
+ */
+export interface UseSecretsConstructor {
+  new (model?: Array | number): UseSecretsIntersection;
+}
+
 /**
  * Represents a collection of string.
  * Inherits from ArrayHydrator to handle array-specific hydration.
@@ -68,4 +80,5 @@ export class UseSecrets extends ArrayHydrator {
   }
 }
 
-export const _UseSecrets = UseSecrets; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes
+export const _UseSecrets = UseSecrets as unknown as UseSecretsConstructor;
+//export const _UseSecrets = UseSecrets; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes
diff --git a/tests/builders/workflow-builder.spec.ts b/tests/builders/workflow-builder.spec.ts
index 272cc0fd..8d7cac82 100644
--- a/tests/builders/workflow-builder.spec.ts
+++ b/tests/builders/workflow-builder.spec.ts
@@ -14,7 +14,24 @@
  * limitations under the License.
  *
  */
-import { documentBuilder, setTaskBuilder, taskListBuilder, workflowBuilder } from '../../src/lib/generated/builders';
+import {
+  basicAuthenticationPolicyBuilder,
+  basicAuthenticationPropertiesBuilder,
+  bearerAuthenticationPolicyBuilder,
+  bearerAuthenticationPropertiesBuilder,
+  callHTTPBuilder,
+  documentBuilder,
+  hTTPArgumentsBuilder,
+  oAuth2AutenthicationDataClientBuilder,
+  oAuth2AuthenticationPolicyBuilder,
+  oAuth2ConnectAuthenticationPropertiesBuilder,
+  setTaskBuilder,
+  taskListBuilder,
+  useAuthenticationsBuilder,
+  useBuilder,
+  useFunctionsBuilder,
+  workflowBuilder,
+} from '../../src/lib/generated/builders';
 import { Classes } from '../../src/lib/generated/classes';
 
 import { schemaVersion } from '../../package.json';
@@ -35,6 +52,51 @@ describe('Workflow builder', () => {
     expect(workflow).toBeInstanceOf(Classes.Workflow);
   });
 
+  it('should build a complex workflow with fluent api', () => {
+    const workflow = workflowBuilder()
+      .document(documentBuilder().dsl(schemaVersion).name('test').version('1.0.0').namespace('default').build())
+      .use(
+        useBuilder()
+          .authentications(
+            useAuthenticationsBuilder({
+              myBasicAuth: basicAuthenticationPolicyBuilder()
+                .basic(basicAuthenticationPropertiesBuilder().username('user').password('password').build())
+                .build(),
+              myBearerAuth: bearerAuthenticationPolicyBuilder()
+                .bearer(bearerAuthenticationPropertiesBuilder().token('token').build())
+                .build(),
+              myOAuthAuth: oAuth2AuthenticationPolicyBuilder()
+                .oauth2(
+                  oAuth2ConnectAuthenticationPropertiesBuilder()
+                    .grant('client_credentials')
+                    .authority('https://authority.com')
+                    .client(oAuth2AutenthicationDataClientBuilder().id('clientId').secret('clientSecret').build())
+                    .build(),
+                )
+                .build(),
+            }).build(),
+          )
+          .functions(
+            useFunctionsBuilder({
+              myCustomFunction: callHTTPBuilder()
+                .with(hTTPArgumentsBuilder().method('GET').endpoint('https://myapi.com').build())
+                .build(),
+            }).build(),
+          )
+          .build(),
+      )
+      .do(
+        taskListBuilder()
+          .push({
+            step1: setTaskBuilder().set({ foo: 'bar' }).build(),
+          })
+          .build(),
+      )
+      .build();
+    expect(workflow).toBeDefined();
+    expect(workflow).toBeInstanceOf(Classes.Workflow);
+  });
+
   it('should build with input', () => {
     const data = {
       document: {
diff --git a/tools/4_generate-classes.ts b/tools/4_generate-classes.ts
index b7b0ccd2..c770ddc1 100644
--- a/tools/4_generate-classes.ts
+++ b/tools/4_generate-classes.ts
@@ -179,6 +179,19 @@ import { ArrayHydrator } from '../../hydrator';
 import { getLifecycleHooks } from '../../lifecycle-hooks';
 import { validate } from '../../validation';
 
+
+/**
+ * Represents the intersection between the ${name} class and type
+ */
+export type ${name}Intersection = ${name} & Specification.${name};
+
+/**
+ * Represents a constructor for the intersection of the ${name} class and type
+ */
+export interface ${name}Constructor {
+  new (model?: Array<${arrayTypeName}> | number): ${name}Intersection;
+}
+
 /**
  * Represents a collection of ${arrayTypeName}.
  * Inherits from ArrayHydrator to handle array-specific hydration.
@@ -219,7 +232,8 @@ export class ${name} extends ArrayHydrator<${arrayTypeName}> {
   }
 }
 
-export const _${name} = ${name}; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes
+export const _${name} = ${name} as unknown as ${name}Constructor;
+//export const _${name} = ${name}; // could be exported directly, but it makes the job of building the index more straightforward as it's consistant with "object" classes
 `;
 }
 
diff --git a/tools/5_generate-builders.ts b/tools/5_generate-builders.ts
index 8fde3e8d..15e8bfc5 100644
--- a/tools/5_generate-builders.ts
+++ b/tools/5_generate-builders.ts
@@ -44,25 +44,26 @@ ${inFileDisclaimer}
 
 import { builder, Builder, BuildOptions } from "../../builder";
 import { Classes } from "../classes";
+import { ${name}Intersection } from '../classes/${toKebabCase(normalizeKnownAllCaps(name))}';
 import { Specification } from "../definitions";
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying object
  * @param {Specification.${name}} model The proxied object
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.${name}} The built object
+ * @returns {${name}Intersection} The built object
  */
-function buildingFn(model: Specification.${name}, options: BuildOptions): Specification.${name} {
+function buildingFn(model: Specification.${name}, options: BuildOptions): ${name}Intersection {
   const instance = new Classes.${name}(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) ${type.isTuple() ? 'as unknown ' : ''}as Specification.${name};
+  return (options.normalize ? instance.normalize() : instance) ${type.isTuple() ? 'as unknown ' : ''}as ${name}Intersection;
 }
 
 /**
- * A factory to create a builder proxy for the type \`Specification.${name}\`
- * @returns {Builder} A builder for \`Specification.${name}\`
+ * A factory to create a builder proxy for the type \`${name}Intersection\`
+ * @returns {Builder<${name}Intersection, ${name}Intersection>} A builder for \`${name}Intersection\`
  */
-export const ${toCamelCase(name)}Builder = (model?: Partial): Builder => builder(model, buildingFn);`;
+export const ${toCamelCase(name)}Builder = (model?: Partial): Builder, ${name}Intersection> => builder(model, buildingFn);`;
 
 /**
  * Creates an array builder for the provided type
@@ -75,25 +76,26 @@ ${inFileDisclaimer}
 
 import { arrayBuilder, ArrayBuilder, BuildOptions } from "../../builder";
 import { Classes } from "../classes";
+import { ${name}Intersection } from '../classes/${toKebabCase(normalizeKnownAllCaps(name))}';
 import { Specification } from "../definitions";
 
 /**
  * The internal function used by the builder proxy to validate and return its underlying array
  * @param {Specification.${name}} model The proxied array
  * @param {BuildOptions} options The build options to use
- * @returns {Specification.${name}} The built array
+ * @returns {${name}Intersection} The built array
  */
-function buildingFn(model: Specification.${name}, options: BuildOptions): Specification.${name} {
+function buildingFn(model: Specification.${name}, options: BuildOptions): ${name}Intersection {
   const instance = new Classes.${name}(model);
   if (options.validate) instance.validate();
-  return (options.normalize ? instance.normalize() : instance) as Specification.${name};
+  return (options.normalize ? instance.normalize() : instance) as unknown as ${name}Intersection;
 }
 
 /**
- * A factory to create a builder proxy for the type \`Specification.${name}\`
- * @returns {ArrayBuilder} A builder for \`Specification.${name}\`
+ * A factory to create a builder proxy for the type \`${name}Intersection\`
+ * @returns {ArrayBuilder<${arrayTypeName}, ${name}Intersection>} A builder for \`${name}Intersection\`
  */
-export const ${toCamelCase(name)}Builder = (model?: Specification.${name}): ArrayBuilder<${arrayTypeName}> => arrayBuilder<${arrayTypeName}>(model, buildingFn);`;
+export const ${toCamelCase(name)}Builder = (model?: Specification.${name}): ArrayBuilder<${arrayTypeName}, ${name}Intersection> => arrayBuilder<${arrayTypeName}, ${name}Intersection>(model, buildingFn);`;
 
 /**
  * Creates the builders index file