├── .eslintignore ├── .eslintrc.js ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug.yml │ ├── config.yml │ └── feature.yml ├── OWNERS ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── node-ci.yml │ └── npmjs-release.yml ├── .gitignore ├── .gitpod.Dockerfile ├── .gitpod.yml ├── .husky ├── .gitignore ├── pre-commit └── pre-push ├── .lintstagedrc.json ├── .npmrc ├── .prettierignore ├── .prettierrc.js ├── .whitesource ├── CONTRIBUTING.md ├── LICENSE ├── MAINTAINERS.md ├── README.md ├── code-of-conduct.md ├── examples ├── browser │ ├── mermaid.html │ ├── using-class.html │ ├── using-fluent-api.html │ ├── using-json.html │ └── using-plain-object.html └── node │ ├── tsconfig.json │ ├── using-class.ts │ ├── using-fluent-api.ts │ ├── using-json.ts │ └── using-plain-object.ts ├── jest.config.js ├── maintainer_guidelines.md ├── package-lock.json ├── package.json ├── rollup.config.ts ├── src ├── index.ts ├── lib │ ├── builder.ts │ ├── generated │ │ ├── builders │ │ │ ├── README.md │ │ │ ├── all-event-consumption-strategy-builder.ts │ │ │ ├── all-event-consumption-strategy-configuration-builder.ts │ │ │ ├── any-event-consumption-strategy-builder.ts │ │ │ ├── any-event-consumption-strategy-configuration-builder.ts │ │ │ ├── any-event-consumption-strategy-until-builder.ts │ │ │ ├── any-event-until-consumed-builder.ts │ │ │ ├── async-api-arguments-builder.ts │ │ │ ├── authentication-policy-builder.ts │ │ │ ├── authentication-policy-reference-builder.ts │ │ │ ├── basic-authentication-policy-builder.ts │ │ │ ├── basic-authentication-policy-configuration-builder.ts │ │ │ ├── basic-authentication-properties-builder.ts │ │ │ ├── bearer-authentication-policy-builder.ts │ │ │ ├── bearer-authentication-policy-configuration-builder.ts │ │ │ ├── bearer-authentication-properties-builder.ts │ │ │ ├── call-async-api-builder.ts │ │ │ ├── call-function-builder.ts │ │ │ ├── call-grpc-builder.ts │ │ │ ├── call-http-builder.ts │ │ │ ├── call-open-api-builder.ts │ │ │ ├── call-task-builder.ts │ │ │ ├── catalog-builder.ts │ │ │ ├── catch-errors-builder.ts │ │ │ ├── constant-backoff-builder.ts │ │ │ ├── container-builder.ts │ │ │ ├── container-environment-builder.ts │ │ │ ├── container-lifetime-builder.ts │ │ │ ├── container-ports-builder.ts │ │ │ ├── container-volumes-builder.ts │ │ │ ├── digest-authentication-policy-builder.ts │ │ │ ├── digest-authentication-policy-configuration-builder.ts │ │ │ ├── digest-authentication-properties-builder.ts │ │ │ ├── do-task-builder.ts │ │ │ ├── document-builder.ts │ │ │ ├── duration-builder.ts │ │ │ ├── duration-inline-builder.ts │ │ │ ├── emit-event-definition-builder.ts │ │ │ ├── emit-event-with-builder.ts │ │ │ ├── emit-task-builder.ts │ │ │ ├── emit-task-configuration-builder.ts │ │ │ ├── endpoint-builder.ts │ │ │ ├── endpoint-configuration-builder.ts │ │ │ ├── endpoint-uri-builder.ts │ │ │ ├── error-builder.ts │ │ │ ├── error-filter-builder.ts │ │ │ ├── error-instance-builder.ts │ │ │ ├── error-type-builder.ts │ │ │ ├── event-consumption-strategy-builder.ts │ │ │ ├── event-data-builder.ts │ │ │ ├── event-dataschema-builder.ts │ │ │ ├── event-filter-builder.ts │ │ │ ├── event-filter-correlate-builder.ts │ │ │ ├── event-source-builder.ts │ │ │ ├── event-time-builder.ts │ │ │ ├── exponential-back-off-builder.ts │ │ │ ├── export-as-builder.ts │ │ │ ├── export-builder.ts │ │ │ ├── extension-builder.ts │ │ │ ├── extension-item-builder.ts │ │ │ ├── external-resource-builder.ts │ │ │ ├── external-script-builder.ts │ │ │ ├── flow-directive-builder.ts │ │ │ ├── for-task-builder.ts │ │ │ ├── for-task-configuration-builder.ts │ │ │ ├── fork-task-builder.ts │ │ │ ├── fork-task-configuration-builder.ts │ │ │ ├── function-arguments-builder.ts │ │ │ ├── grpc-arguments-builder.ts │ │ │ ├── http-arguments-builder.ts │ │ │ ├── http-body-builder.ts │ │ │ ├── http-headers-builder.ts │ │ │ ├── http-query-builder.ts │ │ │ ├── index.ts │ │ │ ├── inline-script-builder.ts │ │ │ ├── input-builder.ts │ │ │ ├── input-from-builder.ts │ │ │ ├── linear-backoff-builder.ts │ │ │ ├── listen-task-builder.ts │ │ │ ├── listen-task-configuration-builder.ts │ │ │ ├── oauth2-autenthication-data-audiences-builder.ts │ │ │ ├── oauth2-autenthication-data-builder.ts │ │ │ ├── oauth2-autenthication-data-client-builder.ts │ │ │ ├── oauth2-autenthication-data-scopes-builder.ts │ │ │ ├── oauth2-authentication-policy-builder.ts │ │ │ ├── oauth2-authentication-policy-configuration-builder.ts │ │ │ ├── oauth2-authentication-properties-endpoints-builder.ts │ │ │ ├── oauth2-connect-authentication-properties-builder.ts │ │ │ ├── oauth2-issuers-builder.ts │ │ │ ├── oauth2-token-definition-builder.ts │ │ │ ├── oauth2-token-request-builder.ts │ │ │ ├── one-event-consumption-strategy-builder.ts │ │ │ ├── open-api-arguments-builder.ts │ │ │ ├── open-id-connect-authentication-policy-builder.ts │ │ │ ├── open-id-connect-authentication-policy-configuration-builder.ts │ │ │ ├── open-id-connect-authentication-properties-builder.ts │ │ │ ├── output-as-builder.ts │ │ │ ├── output-builder.ts │ │ │ ├── raise-task-builder.ts │ │ │ ├── raise-task-configuration-builder.ts │ │ │ ├── raise-task-error-builder.ts │ │ │ ├── referenceable-authentication-policy-builder.ts │ │ │ ├── retry-backoff-builder.ts │ │ │ ├── retry-limit-attempt-builder.ts │ │ │ ├── retry-limit-builder.ts │ │ │ ├── retry-policy-builder.ts │ │ │ ├── retry-policy-jitter-builder.ts │ │ │ ├── run-container-builder.ts │ │ │ ├── run-script-builder.ts │ │ │ ├── run-shell-builder.ts │ │ │ ├── run-task-builder.ts │ │ │ ├── run-task-configuration-builder.ts │ │ │ ├── run-workflow-builder.ts │ │ │ ├── runtime-expression-builder.ts │ │ │ ├── schedule-builder.ts │ │ │ ├── schema-builder.ts │ │ │ ├── schema-external-builder.ts │ │ │ ├── schema-inline-builder.ts │ │ │ ├── script-builder.ts │ │ │ ├── secret-based-authentication-policy-builder.ts │ │ │ ├── set-task-builder.ts │ │ │ ├── set-task-configuration-builder.ts │ │ │ ├── shell-arguments-builder.ts │ │ │ ├── shell-builder.ts │ │ │ ├── shell-environment-builder.ts │ │ │ ├── subflow-configuration-builder.ts │ │ │ ├── subflow-input-builder.ts │ │ │ ├── subscription-iterator-builder.ts │ │ │ ├── switch-case-builder.ts │ │ │ ├── switch-item-builder.ts │ │ │ ├── switch-task-builder.ts │ │ │ ├── switch-task-configuration-builder.ts │ │ │ ├── task-base-builder.ts │ │ │ ├── task-base-if-builder.ts │ │ │ ├── task-builder.ts │ │ │ ├── task-item-builder.ts │ │ │ ├── task-list-builder.ts │ │ │ ├── task-metadata-builder.ts │ │ │ ├── task-timeout-builder.ts │ │ │ ├── timeout-builder.ts │ │ │ ├── try-task-builder.ts │ │ │ ├── try-task-catch-builder.ts │ │ │ ├── try-task-catch-retry-builder.ts │ │ │ ├── uri-template-builder.ts │ │ │ ├── use-authentications-builder.ts │ │ │ ├── use-builder.ts │ │ │ ├── use-catalogs-builder.ts │ │ │ ├── use-errors-builder.ts │ │ │ ├── use-extensions-builder.ts │ │ │ ├── use-functions-builder.ts │ │ │ ├── use-retries-builder.ts │ │ │ ├── use-secrets-builder.ts │ │ │ ├── use-timeouts-builder.ts │ │ │ ├── wait-task-builder.ts │ │ │ ├── with-event-builder.ts │ │ │ ├── with-grpc-arguments-builder.ts │ │ │ ├── with-grpc-service-builder.ts │ │ │ ├── with-open-api-parameters-builder.ts │ │ │ ├── workflow-builder.ts │ │ │ ├── workflow-metadata-builder.ts │ │ │ ├── workflow-tags-builder.ts │ │ │ └── workflow-timeout-builder.ts │ │ ├── classes │ │ │ ├── README.md │ │ │ ├── all-event-consumption-strategy-configuration.ts │ │ │ ├── all-event-consumption-strategy.ts │ │ │ ├── any-event-consumption-strategy-configuration.ts │ │ │ ├── any-event-consumption-strategy-until.ts │ │ │ ├── any-event-consumption-strategy.ts │ │ │ ├── any-event-until-consumed.ts │ │ │ ├── async-api-arguments.ts │ │ │ ├── authentication-policy-reference.ts │ │ │ ├── authentication-policy.ts │ │ │ ├── basic-authentication-policy-configuration.ts │ │ │ ├── basic-authentication-policy.ts │ │ │ ├── basic-authentication-properties.ts │ │ │ ├── bearer-authentication-policy-configuration.ts │ │ │ ├── bearer-authentication-policy.ts │ │ │ ├── bearer-authentication-properties.ts │ │ │ ├── call-async-api.ts │ │ │ ├── call-function.ts │ │ │ ├── call-grpc.ts │ │ │ ├── call-http.ts │ │ │ ├── call-open-api.ts │ │ │ ├── call-task.ts │ │ │ ├── catalog.ts │ │ │ ├── catch-errors.ts │ │ │ ├── constant-backoff.ts │ │ │ ├── container-environment.ts │ │ │ ├── container-lifetime.ts │ │ │ ├── container-ports.ts │ │ │ ├── container-volumes.ts │ │ │ ├── container.ts │ │ │ ├── digest-authentication-policy-configuration.ts │ │ │ ├── digest-authentication-policy.ts │ │ │ ├── digest-authentication-properties.ts │ │ │ ├── do-task.ts │ │ │ ├── document.ts │ │ │ ├── duration-inline.ts │ │ │ ├── duration.ts │ │ │ ├── emit-event-definition.ts │ │ │ ├── emit-event-with.ts │ │ │ ├── emit-task-configuration.ts │ │ │ ├── emit-task.ts │ │ │ ├── endpoint-configuration.ts │ │ │ ├── endpoint-uri.ts │ │ │ ├── endpoint.ts │ │ │ ├── error-filter.ts │ │ │ ├── error-instance.ts │ │ │ ├── error-type.ts │ │ │ ├── error.ts │ │ │ ├── event-consumption-strategy.ts │ │ │ ├── event-data.ts │ │ │ ├── event-dataschema.ts │ │ │ ├── event-filter-correlate.ts │ │ │ ├── event-filter.ts │ │ │ ├── event-source.ts │ │ │ ├── event-time.ts │ │ │ ├── exponential-back-off.ts │ │ │ ├── export-as.ts │ │ │ ├── export.ts │ │ │ ├── extension-item.ts │ │ │ ├── extension.ts │ │ │ ├── external-resource.ts │ │ │ ├── external-script.ts │ │ │ ├── flow-directive.ts │ │ │ ├── for-task-configuration.ts │ │ │ ├── for-task.ts │ │ │ ├── fork-task-configuration.ts │ │ │ ├── fork-task.ts │ │ │ ├── function-arguments.ts │ │ │ ├── grpc-arguments.ts │ │ │ ├── http-arguments.ts │ │ │ ├── http-body.ts │ │ │ ├── http-headers.ts │ │ │ ├── http-query.ts │ │ │ ├── index.ts │ │ │ ├── inline-script.ts │ │ │ ├── input-from.ts │ │ │ ├── input.ts │ │ │ ├── linear-backoff.ts │ │ │ ├── listen-task-configuration.ts │ │ │ ├── listen-task.ts │ │ │ ├── oauth2-autenthication-data-audiences.ts │ │ │ ├── oauth2-autenthication-data-client.ts │ │ │ ├── oauth2-autenthication-data-scopes.ts │ │ │ ├── oauth2-autenthication-data.ts │ │ │ ├── oauth2-authentication-policy-configuration.ts │ │ │ ├── oauth2-authentication-policy.ts │ │ │ ├── oauth2-authentication-properties-endpoints.ts │ │ │ ├── oauth2-connect-authentication-properties.ts │ │ │ ├── oauth2-issuers.ts │ │ │ ├── oauth2-token-definition.ts │ │ │ ├── oauth2-token-request.ts │ │ │ ├── one-event-consumption-strategy.ts │ │ │ ├── open-api-arguments.ts │ │ │ ├── open-id-connect-authentication-policy-configuration.ts │ │ │ ├── open-id-connect-authentication-policy.ts │ │ │ ├── open-id-connect-authentication-properties.ts │ │ │ ├── output-as.ts │ │ │ ├── output.ts │ │ │ ├── raise-task-configuration.ts │ │ │ ├── raise-task-error.ts │ │ │ ├── raise-task.ts │ │ │ ├── referenceable-authentication-policy.ts │ │ │ ├── retry-backoff.ts │ │ │ ├── retry-limit-attempt.ts │ │ │ ├── retry-limit.ts │ │ │ ├── retry-policy-jitter.ts │ │ │ ├── retry-policy.ts │ │ │ ├── run-container.ts │ │ │ ├── run-script.ts │ │ │ ├── run-shell.ts │ │ │ ├── run-task-configuration.ts │ │ │ ├── run-task.ts │ │ │ ├── run-workflow.ts │ │ │ ├── runtime-expression.ts │ │ │ ├── schedule.ts │ │ │ ├── schema-external.ts │ │ │ ├── schema-inline.ts │ │ │ ├── schema.ts │ │ │ ├── script.ts │ │ │ ├── secret-based-authentication-policy.ts │ │ │ ├── set-task-configuration.ts │ │ │ ├── set-task.ts │ │ │ ├── shell-arguments.ts │ │ │ ├── shell-environment.ts │ │ │ ├── shell.ts │ │ │ ├── subflow-configuration.ts │ │ │ ├── subflow-input.ts │ │ │ ├── subscription-iterator.ts │ │ │ ├── switch-case.ts │ │ │ ├── switch-item.ts │ │ │ ├── switch-task-configuration.ts │ │ │ ├── switch-task.ts │ │ │ ├── task-base-if.ts │ │ │ ├── task-base.ts │ │ │ ├── task-item.ts │ │ │ ├── task-list.ts │ │ │ ├── task-metadata.ts │ │ │ ├── task-timeout.ts │ │ │ ├── task.ts │ │ │ ├── timeout.ts │ │ │ ├── try-task-catch-retry.ts │ │ │ ├── try-task-catch.ts │ │ │ ├── try-task.ts │ │ │ ├── uri-template.ts │ │ │ ├── use-authentications.ts │ │ │ ├── use-catalogs.ts │ │ │ ├── use-errors.ts │ │ │ ├── use-extensions.ts │ │ │ ├── use-functions.ts │ │ │ ├── use-retries.ts │ │ │ ├── use-secrets.ts │ │ │ ├── use-timeouts.ts │ │ │ ├── use.ts │ │ │ ├── wait-task.ts │ │ │ ├── with-event.ts │ │ │ ├── with-grpc-arguments.ts │ │ │ ├── with-grpc-service.ts │ │ │ ├── with-open-api-parameters.ts │ │ │ ├── workflow-metadata.ts │ │ │ ├── workflow-tags.ts │ │ │ ├── workflow-timeout.ts │ │ │ └── workflow.ts │ │ ├── definitions │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ └── specification.ts │ │ ├── schema │ │ │ ├── README.md │ │ │ ├── __internal_workflow.json │ │ │ ├── workflow.json │ │ │ └── workflow.yaml │ │ └── validation │ │ │ ├── README.md │ │ │ ├── index.ts │ │ │ └── validation-pointers.ts │ ├── graph-builder.ts │ ├── hooks │ │ ├── index.ts │ │ └── workflow-hooks.ts │ ├── hydrator.ts │ ├── lifecycle-hooks.ts │ ├── mermaid-converter.ts │ ├── utils.ts │ └── validation.ts └── serverless-workflow-sdk.ts ├── tests ├── builders │ ├── builder.spec.ts │ ├── call-async-api-builder.spec.ts │ ├── call-function-builder.spec.ts │ ├── call-grpc-builder.spec.ts │ ├── call-http-builder.spec.ts │ ├── use-extensions-builder.spec.ts │ └── workflow-builder.spec.ts ├── classes │ ├── use-extensions.spec.ts │ └── workflow.spec.ts ├── graph │ └── graph.spec.ts ├── mermaid │ └── mermaid.spec.ts ├── serialization │ └── workflow-serialization.spec.ts ├── tsconfig.json └── validation │ └── workflow-validation.spec.ts ├── tools ├── 1_download-schemas.ts ├── 2_generate-definitions.ts ├── 3_generate-validation-pointers.ts ├── 4_generate-classes.ts ├── 5_generate-builders.ts ├── README.md ├── consts.ts ├── reflection.ts ├── tsconfig.json └── utils.ts ├── tsconfig.base.json └── tsconfig.json /.eslintignore: -------------------------------------------------------------------------------- 1 | # don't ever lint node_modules 2 | node_modules 3 | # don't lint definitions 4 | src/lib/definitions/**/* 5 | # don't lint build output 6 | dist 7 | out-tsc -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: '@typescript-eslint/parser', 4 | plugins: [ 5 | '@typescript-eslint', 6 | ], 7 | extends: [ 8 | 'eslint:recommended', 9 | 'plugin:@typescript-eslint/eslint-recommended', 10 | 'plugin:@typescript-eslint/recommended', 11 | 'prettier' 12 | ], 13 | rules: { 14 | '@typescript-eslint/no-explicit-any': 0, 15 | '@typescript-eslint/no-inferrable-types': 0 16 | } 17 | }; -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @tsurdilo @manuelstein @ricardozanini @antmendoza -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.yml: -------------------------------------------------------------------------------- 1 | name: Bug Report 2 | description: Create a bug report 3 | labels: ["type: bug"] 4 | body: 5 | 6 | - type: markdown 7 | attributes: 8 | value: | 9 | :pray: Thanks for taking the time to fill out this bug report! 10 | 11 | - type: markdown 12 | attributes: 13 | value: | 14 | ## Bug Report 15 | 16 | - type: textarea 17 | id: i-tried-this 18 | attributes: 19 | label: "I tried this:" 20 | placeholder: "What did you try to do? A code snippet or example helps." 21 | validations: 22 | required: true 23 | 24 | - type: textarea 25 | id: instead-what-happened 26 | attributes: 27 | label: "This happened:" 28 | placeholder: "What happened instead of what you've expected?" 29 | validations: 30 | required: true 31 | 32 | - type: textarea 33 | id: what-did-you-expect 34 | attributes: 35 | label: "I expected this:" 36 | placeholder: "What did you expect to happen? Describe the output or behavior you expected to see (unless it's obvious)." 37 | 38 | - type: textarea 39 | id: workaround 40 | attributes: 41 | label: "Is there a workaround?" 42 | placeholder: "What's the workaround to avoid this issue?" 43 | 44 | - type: textarea 45 | attributes: 46 | label: Anything else? 47 | placeholder: | 48 | Links? References? Logs? Anything that will give us more context about the issue you are encountering. 49 | Tip: You can attach images or log files by dragging files in. 50 | 51 | - type: markdown 52 | attributes: 53 | value: | 54 | ## Environment 55 | 56 | - type: textarea 57 | attributes: 58 | label: Community Notes 59 | value: | 60 | 61 | * Please vote by adding a 👍 reaction to the issue to help us prioritize. 62 | * If you are interested to work on this issue, please leave a comment.name: Bug Report 🐞 63 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: [] -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature.yml: -------------------------------------------------------------------------------- 1 | name: Feature Request 2 | description: Create a feature request 3 | labels: ["type: feature"] 4 | body: 5 | 6 | - type: markdown 7 | attributes: 8 | value: | 9 | :pray: Thanks for taking the time to fill out this feature request! 10 | 11 | - type: markdown 12 | attributes: 13 | value: | 14 | ## Feature Request 15 | 16 | - type: textarea 17 | id: what-would-you-like-to-be-added 18 | attributes: 19 | label: "What would you like to be added?" 20 | placeholder: "Description of the feature you'd like to see." 21 | validations: 22 | required: true 23 | 24 | - type: textarea 25 | id: proposals 26 | attributes: 27 | label: "Proposal(s):" 28 | placeholder: "Describe your proposal(s) and any relevant details here." 29 | 30 | - type: textarea 31 | id: alternatives 32 | attributes: 33 | label: "Alternative(s):" 34 | placeholder: "Describe any alternative approaches, options, or suggestions you’d like to consider." 35 | 36 | - type: textarea 37 | id: additional-info 38 | attributes: 39 | label: "Additional info:" 40 | placeholder: "Provide any supplementary details, context, or supporting information here." 41 | 42 | - type: textarea 43 | attributes: 44 | label: Community Notes 45 | value: | 46 | 47 | * Please vote by adding a 👍 reaction to the feature to help us prioritize. 48 | * If you are interested to work on this feature, please leave a comment. 49 | -------------------------------------------------------------------------------- /.github/OWNERS: -------------------------------------------------------------------------------- 1 | reviewers: 2 | - tsurdilo 3 | - manuelstein 4 | - ricardozanini 5 | - antmendoza 6 | approvers: 7 | - tsurdilo 8 | - manuelstein 9 | - ricardozanini 10 | - antmendoza 11 | labels: 12 | - sig/contributor-experience -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **Many thanks for submitting your Pull Request :heart:!** 2 | 3 | **What this PR does / why we need it**: 4 | 5 | **Special notes for reviewers**: 6 | 7 | **Additional information (if needed):** -------------------------------------------------------------------------------- /.github/workflows/node-ci.yml: -------------------------------------------------------------------------------- 1 | name: Node CI 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | strategy: 15 | matrix: 16 | node-version: [20.x, 21.x, 22.x] 17 | 18 | steps: 19 | - uses: actions/checkout@v2 20 | - name: Use Node.js ${{ matrix.node-version }} 21 | uses: actions/setup-node@v1 22 | with: 23 | node-version: ${{ matrix.node-version }} 24 | - run: npm ci 25 | - run: npm run build --if-present 26 | - run: npm test -------------------------------------------------------------------------------- /.github/workflows/npmjs-release.yml: -------------------------------------------------------------------------------- 1 | name: npmjs release 2 | 3 | on: 4 | release: 5 | types: [created] 6 | jobs: 7 | build: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v2 11 | # Setup .npmrc file to publish to npm 12 | - uses: actions/setup-node@v2 13 | with: 14 | node-version: '20.x' 15 | registry-url: 'https://registry.npmjs.org' 16 | - run: npm ci 17 | - run: npm test 18 | - run: npm run build 19 | - run: cd dist && npm publish --access=public 20 | env: 21 | NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Dependency directory 2 | node_modules 3 | bower_components 4 | 5 | # Editors 6 | .idea 7 | .vscode 8 | *.iml 9 | 10 | # OS metadata 11 | .DS_Store 12 | Thumbs.db 13 | 14 | # Ignore built ts files 15 | dist/**/* 16 | out-tsc 17 | 18 | # ignore yarn.lock 19 | yarn.lock -------------------------------------------------------------------------------- /.gitpod.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:16-buster 2 | -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | image: 2 | file: .gitpod.Dockerfile 3 | 4 | # List the start up tasks. You can start them in parallel in multiple terminals. 5 | # https://www.gitpod.io/docs/config-start-tasks/ 6 | tasks: 7 | - init: > 8 | npm install && 9 | npm run build 10 | command: npm run test 11 | 12 | # Enable prebuilds of your project to enable faster workspace start times. 13 | # https://www.gitpod.io/docs/prebuilds/#configure-the-github-app 14 | github: 15 | prebuilds: 16 | master: true 17 | branches: true 18 | pullRequests: true 19 | pullRequestsFromForks: true 20 | addCheck: true 21 | -------------------------------------------------------------------------------- /.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx lint-staged 5 | -------------------------------------------------------------------------------- /.husky/pre-push: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npm run test 5 | -------------------------------------------------------------------------------- /.lintstagedrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "*.ts": "prettier --write" 3 | } -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmjs.org -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | out-tsc 4 | src/lib/validation/validators-paths.ts -------------------------------------------------------------------------------- /.whitesource: -------------------------------------------------------------------------------- 1 | { 2 | "scanSettings": { 3 | "baseBranches": [] 4 | }, 5 | "checkRunSettings": { 6 | "vulnerableCheckRunConclusionLevel": "failure", 7 | "displayMode": "diff" 8 | }, 9 | "issueSettings": { 10 | "minSeverityLevel": "LOW", 11 | "issueType": "DEPENDENCY" 12 | } 13 | } -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Hacking on Serverless Workflow Typescript SDK in Gitpod 2 | 3 | If you have a web browser, you can get a fully pre-configured development environment in one click: 4 | 5 | [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/serverlessworkflow/sdk-typescript) 6 | -------------------------------------------------------------------------------- /MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | # Serverless Workflow Org Maintainers 2 | 3 | * [Jean-Baptiste Bianchi](https://github.com/JBBianchi) 4 | * [Charles d'Avernas](https://github.com/cdavernas) 5 | * [Ricardo Zanini](https://github.com/ricardozanini) 6 | 7 | # Serverless Workflow Org Emeritus Maintainers 8 | * [Antonio Mendoza Pérez](https://github.com/antmendoza) 9 | 10 | # Maintainers Mailing list 11 | [cncf-serverlessws-maintainers](mailto:cncf-serverlessws-maintainers@lists.cncf.io) -------------------------------------------------------------------------------- /code-of-conduct.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | We follow the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md). 4 | 5 | 10 | Please contact the [CNCF Code of Conduct Committee](mailto:conduct@cncf.io) 11 | in order to report violations of the Code of Conduct. 12 | -------------------------------------------------------------------------------- /examples/browser/using-class.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Serveless Workflow 7 | 8 | 9 | 10 | 11 | 12 |

13 |   
14 |   
42 | 
43 | 
44 | 


--------------------------------------------------------------------------------
/examples/browser/using-fluent-api.html:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 | 
 4 | 
 5 |   
 6 |   Serveless Workflow
 7 |   
 8 |   
 9 | 
10 | 
11 | 
12 |   

13 |   
14 |   
34 | 
35 | 
36 | 


--------------------------------------------------------------------------------
/examples/browser/using-json.html:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 | 
 4 | 
 5 |   
 6 |   Serveless Workflow
 7 |   
 8 |   
 9 | 
10 | 
11 | 
12 |   

13 |   
14 |   
38 | 
39 | 
40 | 


--------------------------------------------------------------------------------
/examples/browser/using-plain-object.html:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 | 
 4 | 
 5 |   
 6 |   Serveless Workflow
 7 |   
 8 |   
 9 | 
10 | 
11 | 
12 |   

13 |   
14 |   
43 | 
44 | 
45 | 


--------------------------------------------------------------------------------
/examples/node/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 |   "extends": "../../tsconfig.base.json"
3 | }


--------------------------------------------------------------------------------
/examples/node/using-class.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | import { Classes } from /*'@serverlessworkflow/sdk';*/ '../../dist';
17 | const { Workflow } = Classes;
18 | 
19 | const workflow = new Workflow({
20 |   document: {
21 |     dsl: '1.0.0',
22 |     name: 'using-class',
23 |     version: '1.0.0',
24 |     namespace: 'default',
25 |   },
26 |   do: [
27 |     {
28 |       step1: {
29 |         set: {
30 |           variable: 'my first workflow',
31 |         },
32 |       },
33 |     },
34 |   ],
35 | });
36 | 
37 | try {
38 |   workflow.validate();
39 |   console.log(`--- YAML ---\n${workflow.serialize()}\n\n--- JSON ---\n${workflow.serialize('json')}`);
40 | } catch (ex) {
41 |   console.error('Invalid workflow', ex);
42 | }
43 | 


--------------------------------------------------------------------------------
/examples/node/using-fluent-api.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | import {
17 |   documentBuilder,
18 |   setTaskBuilder,
19 |   taskListBuilder,
20 |   workflowBuilder,
21 | } from /*'@serverlessworkflow/sdk';*/ '../../dist';
22 | 
23 | try {
24 |   const workflow = workflowBuilder()
25 |     .document(documentBuilder().dsl('1.0.0').name('using-fluent-api').version('1.0.0').namespace('default').build())
26 |     .do(
27 |       taskListBuilder()
28 |         .push({
29 |           step1: setTaskBuilder().set({ foo: 'bar' }).build(),
30 |         })
31 |         .build(),
32 |     )
33 |     .build();
34 |   console.log(`--- YAML ---\n${workflow.serialize()}\n\n--- JSON ---\n${workflow.serialize('json')}`);
35 | } catch (ex) {
36 |   console.error('Invalid workflow', ex);
37 | }
38 | 


--------------------------------------------------------------------------------
/examples/node/using-json.ts:
--------------------------------------------------------------------------------
 1 | import { Classes } from /*'@serverlessworkflow/sdk';*/ '../../dist';
 2 | 
 3 | const myJsonWorkflow = `
 4 | {
 5 |   "document": {
 6 |     "dsl": "1.0.0",
 7 |     "name": "using-json",
 8 |     "version": "1.0.0",
 9 |     "namespace": "default"
10 |   },
11 |   "do": [
12 |     {
13 |       "step1": {
14 |         "set": {
15 |           "variable": "my first workflow"
16 |         }
17 |       }
18 |     }
19 |   ]
20 | }`;
21 | const workflow = Classes.Workflow.deserialize(myJsonWorkflow);
22 | console.log(`--- YAML ---\n${workflow.serialize()}\n\n--- JSON ---\n${workflow.serialize('json')}`);
23 | 


--------------------------------------------------------------------------------
/examples/node/using-plain-object.ts:
--------------------------------------------------------------------------------
 1 | import { Classes, Specification, validate } from /*'@serverlessworkflow/sdk';*/ '../../dist';
 2 | 
 3 | const workflowDefinition = {
 4 |   document: {
 5 |     dsl: '1.0.0',
 6 |     name: 'using-plain-object',
 7 |     version: '1.0.0',
 8 |     namespace: 'default',
 9 |   },
10 |   do: [
11 |     {
12 |       step1: {
13 |         set: {
14 |           variable: 'my first workflow',
15 |         },
16 |       },
17 |     },
18 |   ],
19 | } as Specification.Workflow;
20 | try {
21 |   validate('Workflow', workflowDefinition);
22 |   console.log(
23 |     `--- YAML ---\n${Classes.Workflow.serialize(workflowDefinition)}\n\n--- JSON ---\n${Classes.Workflow.serialize(workflowDefinition, 'json')}`,
24 |   );
25 | } catch (ex) {
26 |   console.error('Invalid workflow', ex);
27 | }
28 | 


--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */
2 | module.exports = {
3 |   preset: 'ts-jest',
4 |   testEnvironment: 'node',
5 |   testPathIgnorePatterns: [".d.ts", ".js"],
6 |   modulePathIgnorePatterns: ['/dist/', '/out-tsc/'],
7 | };


--------------------------------------------------------------------------------
/maintainer_guidelines.md:
--------------------------------------------------------------------------------
 1 | # Maintainer's Guide
 2 | 
 3 | ## Tips
 4 | 
 5 | Here are a few tips for repository maintainers.
 6 | 
 7 | * Stay on top of your pull requests. PRs that languish for too long can become difficult to merge.
 8 | * Work from your own fork. As you are making contributions to the project, you should be working from your own fork just as outside contributors do. This keeps the branches in github to a minimum and reduces unnecessary CI runs.
 9 | * Try to proactively label issues with backport labels if it's obvious that a change should be backported to previous releases.
10 | * When landing pull requests, if there is more than one commit, try to squash into a single commit. Usually this can just be done with the GitHub UI when merging the PR. Use "Squash and merge".
11 | * Triage issues once in a while in order to keep the repository alive. During the triage:
12 |     * If some issues are stale for too long because they are no longer valid/relevant or because the discussion reached no significant action items to perform, close them and invite the users to reopen if they need it.
13 |     * If some PRs are no longer valid but still needed, ask the user to rebase them
14 |     * If some issues and PRs are still relevant, use labels to help organize tasks
15 |     * If you find an issue that you want to create a fix for and submit a pull request, be sure to assign it to yourself so that others maintainers don't start working on it at the same time.
16 | 
17 | ## Branch Management
18 | 
19 | The `main` branch is the bleeding edge. New major versions of the module
20 | are cut from this branch and tagged. If you intend to submit a pull request
21 | you should use `main HEAD` as your starting point.
22 | 
23 | Each major release will result in a new branch and tag. For example, the
24 | release of version 1.0.0 of the project results in a `v1.0.0` tag on the
25 | release commit, and a new branch `release-1.y.z` for subsequent minor and patch
26 | level releases of that major version if necessary. However, development will continue
27 | apace on `main` for the next major version - e.g. 2.0.0. Version branches
28 | are only created for each major version. Minor and patch level releases
29 | are simply tagged.
30 | 


--------------------------------------------------------------------------------
/rollup.config.ts:
--------------------------------------------------------------------------------
 1 | import commonjs from '@rollup/plugin-commonjs';
 2 | import json from '@rollup/plugin-json';
 3 | import resolve from '@rollup/plugin-node-resolve';
 4 | import sourceMaps from 'rollup-plugin-sourcemaps';
 5 | import { terser } from 'rollup-plugin-terser';
 6 | import typescript from 'rollup-plugin-typescript2';
 7 | 
 8 | export default {
 9 |   input: 'src/index.ts',
10 |   output: [
11 |     { file: 'dist/umd/index.umd.js', name: 'serverWorkflowSdk', format: 'umd', sourcemap: true },
12 |     {
13 |       file: 'dist/umd/index.umd.min.js',
14 |       name: 'serverWorkflowSdk',
15 |       format: 'umd',
16 |       sourcemap: true,
17 |       plugins: [terser()],
18 |     },
19 |     { file: 'dist/esm/index.esm.js', format: 'es', sourcemap: true },
20 |     { file: 'dist/esm/index.esm.min.js', format: 'es', sourcemap: true, plugins: [terser()] },
21 |     { file: 'dist/systemjs/index.systemjs.js', format: 'system', sourcemap: true },
22 |     { file: 'dist/systemjs/index.systemjs.min.js', format: 'system', sourcemap: true, plugins: [terser()] },
23 |   ],
24 |   plugins: [json(), typescript({ useTsconfigDeclarationDir: true }), commonjs(), resolve(), sourceMaps()],
25 | };
26 | 


--------------------------------------------------------------------------------
/src/index.ts:
--------------------------------------------------------------------------------
1 | export * from './serverless-workflow-sdk';
2 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/README.md:
--------------------------------------------------------------------------------
1 | # Auto generated notice
2 | This directory and its content has been generated automatically. Do not modify its content, it WILL be lost.


--------------------------------------------------------------------------------
/src/lib/generated/builders/call-async-api-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { CallAsyncAPIIntersection } from '../classes/call-async-api';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.CallAsyncAPI} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {CallAsyncAPIIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.CallAsyncAPI, options: BuildOptions): CallAsyncAPIIntersection {
35 |   const instance = new Classes.CallAsyncAPI(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as CallAsyncAPIIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `CallAsyncAPIIntersection`
42 |  * @returns {Builder} A builder for `CallAsyncAPIIntersection`
43 |  */
44 | export const callAsyncAPIBuilder = (
45 |   model?: Partial,
46 | ): Builder, CallAsyncAPIIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/call-function-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { CallFunctionIntersection } from '../classes/call-function';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.CallFunction} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {CallFunctionIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.CallFunction, options: BuildOptions): CallFunctionIntersection {
35 |   const instance = new Classes.CallFunction(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as CallFunctionIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `CallFunctionIntersection`
42 |  * @returns {Builder} A builder for `CallFunctionIntersection`
43 |  */
44 | export const callFunctionBuilder = (
45 |   model?: Partial,
46 | ): Builder, CallFunctionIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/call-grpc-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { CallGRPCIntersection } from '../classes/call-grpc';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.CallGRPC} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {CallGRPCIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.CallGRPC, options: BuildOptions): CallGRPCIntersection {
35 |   const instance = new Classes.CallGRPC(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as CallGRPCIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `CallGRPCIntersection`
42 |  * @returns {Builder} A builder for `CallGRPCIntersection`
43 |  */
44 | export const callGRPCBuilder = (
45 |   model?: Partial,
46 | ): Builder, CallGRPCIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/call-http-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { CallHTTPIntersection } from '../classes/call-http';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.CallHTTP} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {CallHTTPIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.CallHTTP, options: BuildOptions): CallHTTPIntersection {
35 |   const instance = new Classes.CallHTTP(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as CallHTTPIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `CallHTTPIntersection`
42 |  * @returns {Builder} A builder for `CallHTTPIntersection`
43 |  */
44 | export const callHTTPBuilder = (
45 |   model?: Partial,
46 | ): Builder, CallHTTPIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/call-open-api-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { CallOpenAPIIntersection } from '../classes/call-open-api';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.CallOpenAPI} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {CallOpenAPIIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.CallOpenAPI, options: BuildOptions): CallOpenAPIIntersection {
35 |   const instance = new Classes.CallOpenAPI(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as CallOpenAPIIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `CallOpenAPIIntersection`
42 |  * @returns {Builder} A builder for `CallOpenAPIIntersection`
43 |  */
44 | export const callOpenAPIBuilder = (
45 |   model?: Partial,
46 | ): Builder, CallOpenAPIIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/call-task-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { CallTaskIntersection } from '../classes/call-task';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.CallTask} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {CallTaskIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.CallTask, options: BuildOptions): CallTaskIntersection {
35 |   const instance = new Classes.CallTask(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as CallTaskIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `CallTaskIntersection`
42 |  * @returns {Builder} A builder for `CallTaskIntersection`
43 |  */
44 | export const callTaskBuilder = (
45 |   model?: Partial,
46 | ): Builder, CallTaskIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/catalog-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { CatalogIntersection } from '../classes/catalog';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.Catalog} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {CatalogIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.Catalog, options: BuildOptions): CatalogIntersection {
35 |   const instance = new Classes.Catalog(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as CatalogIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `CatalogIntersection`
42 |  * @returns {Builder} A builder for `CatalogIntersection`
43 |  */
44 | export const catalogBuilder = (
45 |   model?: Partial,
46 | ): Builder, CatalogIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/catch-errors-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { CatchErrorsIntersection } from '../classes/catch-errors';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.CatchErrors} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {CatchErrorsIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.CatchErrors, options: BuildOptions): CatchErrorsIntersection {
35 |   const instance = new Classes.CatchErrors(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as CatchErrorsIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `CatchErrorsIntersection`
42 |  * @returns {Builder} A builder for `CatchErrorsIntersection`
43 |  */
44 | export const catchErrorsBuilder = (
45 |   model?: Partial,
46 | ): Builder, CatchErrorsIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/container-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { ContainerIntersection } from '../classes/container';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.Container} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {ContainerIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.Container, options: BuildOptions): ContainerIntersection {
35 |   const instance = new Classes.Container(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as ContainerIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `ContainerIntersection`
42 |  * @returns {Builder} A builder for `ContainerIntersection`
43 |  */
44 | export const containerBuilder = (
45 |   model?: Partial,
46 | ): Builder, ContainerIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/do-task-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { DoTaskIntersection } from '../classes/do-task';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.DoTask} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {DoTaskIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.DoTask, options: BuildOptions): DoTaskIntersection {
35 |   const instance = new Classes.DoTask(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as DoTaskIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `DoTaskIntersection`
42 |  * @returns {Builder} A builder for `DoTaskIntersection`
43 |  */
44 | export const doTaskBuilder = (
45 |   model?: Partial,
46 | ): Builder, DoTaskIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/document-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { DocumentIntersection } from '../classes/document';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.Document} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {DocumentIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.Document, options: BuildOptions): DocumentIntersection {
35 |   const instance = new Classes.Document(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as DocumentIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `DocumentIntersection`
42 |  * @returns {Builder} A builder for `DocumentIntersection`
43 |  */
44 | export const documentBuilder = (
45 |   model?: Partial,
46 | ): Builder, DocumentIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/duration-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { DurationIntersection } from '../classes/duration';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.Duration} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {DurationIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.Duration, options: BuildOptions): DurationIntersection {
35 |   const instance = new Classes.Duration(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as DurationIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `DurationIntersection`
42 |  * @returns {Builder} A builder for `DurationIntersection`
43 |  */
44 | export const durationBuilder = (
45 |   model?: Partial,
46 | ): Builder, DurationIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/emit-task-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { EmitTaskIntersection } from '../classes/emit-task';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.EmitTask} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {EmitTaskIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.EmitTask, options: BuildOptions): EmitTaskIntersection {
35 |   const instance = new Classes.EmitTask(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as EmitTaskIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `EmitTaskIntersection`
42 |  * @returns {Builder} A builder for `EmitTaskIntersection`
43 |  */
44 | export const emitTaskBuilder = (
45 |   model?: Partial,
46 | ): Builder, EmitTaskIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/endpoint-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { EndpointIntersection } from '../classes/endpoint';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.Endpoint} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {EndpointIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.Endpoint, options: BuildOptions): EndpointIntersection {
35 |   const instance = new Classes.Endpoint(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as EndpointIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `EndpointIntersection`
42 |  * @returns {Builder} A builder for `EndpointIntersection`
43 |  */
44 | export const endpointBuilder = (
45 |   model?: Partial,
46 | ): Builder, EndpointIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/endpoint-uri-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { EndpointUriIntersection } from '../classes/endpoint-uri';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.EndpointUri} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {EndpointUriIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.EndpointUri, options: BuildOptions): EndpointUriIntersection {
35 |   const instance = new Classes.EndpointUri(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as EndpointUriIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `EndpointUriIntersection`
42 |  * @returns {Builder} A builder for `EndpointUriIntersection`
43 |  */
44 | export const endpointUriBuilder = (
45 |   model?: Partial,
46 | ): Builder, EndpointUriIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/error-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { ErrorIntersection } from '../classes/error';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.Error} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {ErrorIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.Error, options: BuildOptions): ErrorIntersection {
35 |   const instance = new Classes.Error(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as ErrorIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `ErrorIntersection`
42 |  * @returns {Builder} A builder for `ErrorIntersection`
43 |  */
44 | export const errorBuilder = (
45 |   model?: Partial,
46 | ): Builder, ErrorIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/error-filter-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { ErrorFilterIntersection } from '../classes/error-filter';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.ErrorFilter} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {ErrorFilterIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.ErrorFilter, options: BuildOptions): ErrorFilterIntersection {
35 |   const instance = new Classes.ErrorFilter(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as ErrorFilterIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `ErrorFilterIntersection`
42 |  * @returns {Builder} A builder for `ErrorFilterIntersection`
43 |  */
44 | export const errorFilterBuilder = (
45 |   model?: Partial,
46 | ): Builder, ErrorFilterIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/error-type-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { ErrorTypeIntersection } from '../classes/error-type';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.ErrorType} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {ErrorTypeIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.ErrorType, options: BuildOptions): ErrorTypeIntersection {
35 |   const instance = new Classes.ErrorType(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as ErrorTypeIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `ErrorTypeIntersection`
42 |  * @returns {Builder} A builder for `ErrorTypeIntersection`
43 |  */
44 | export const errorTypeBuilder = (
45 |   model?: Partial,
46 | ): Builder, ErrorTypeIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/event-data-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { EventDataIntersection } from '../classes/event-data';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.EventData} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {EventDataIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.EventData, options: BuildOptions): EventDataIntersection {
35 |   const instance = new Classes.EventData(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as EventDataIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `EventDataIntersection`
42 |  * @returns {Builder} A builder for `EventDataIntersection`
43 |  */
44 | export const eventDataBuilder = (
45 |   model?: Partial,
46 | ): Builder, EventDataIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/event-filter-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { EventFilterIntersection } from '../classes/event-filter';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.EventFilter} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {EventFilterIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.EventFilter, options: BuildOptions): EventFilterIntersection {
35 |   const instance = new Classes.EventFilter(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as EventFilterIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `EventFilterIntersection`
42 |  * @returns {Builder} A builder for `EventFilterIntersection`
43 |  */
44 | export const eventFilterBuilder = (
45 |   model?: Partial,
46 | ): Builder, EventFilterIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/event-source-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { EventSourceIntersection } from '../classes/event-source';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.EventSource} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {EventSourceIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.EventSource, options: BuildOptions): EventSourceIntersection {
35 |   const instance = new Classes.EventSource(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as EventSourceIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `EventSourceIntersection`
42 |  * @returns {Builder} A builder for `EventSourceIntersection`
43 |  */
44 | export const eventSourceBuilder = (
45 |   model?: Partial,
46 | ): Builder, EventSourceIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/event-time-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { EventTimeIntersection } from '../classes/event-time';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.EventTime} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {EventTimeIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.EventTime, options: BuildOptions): EventTimeIntersection {
35 |   const instance = new Classes.EventTime(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as EventTimeIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `EventTimeIntersection`
42 |  * @returns {Builder} A builder for `EventTimeIntersection`
43 |  */
44 | export const eventTimeBuilder = (
45 |   model?: Partial,
46 | ): Builder, EventTimeIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/export-as-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { ExportAsIntersection } from '../classes/export-as';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.ExportAs} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {ExportAsIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.ExportAs, options: BuildOptions): ExportAsIntersection {
35 |   const instance = new Classes.ExportAs(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as ExportAsIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `ExportAsIntersection`
42 |  * @returns {Builder} A builder for `ExportAsIntersection`
43 |  */
44 | export const exportAsBuilder = (
45 |   model?: Partial,
46 | ): Builder, ExportAsIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/export-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { ExportIntersection } from '../classes/export';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.Export} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {ExportIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.Export, options: BuildOptions): ExportIntersection {
35 |   const instance = new Classes.Export(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as ExportIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `ExportIntersection`
42 |  * @returns {Builder} A builder for `ExportIntersection`
43 |  */
44 | export const exportBuilder = (
45 |   model?: Partial,
46 | ): Builder, ExportIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/extension-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { ExtensionIntersection } from '../classes/extension';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.Extension} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {ExtensionIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.Extension, options: BuildOptions): ExtensionIntersection {
35 |   const instance = new Classes.Extension(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as ExtensionIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `ExtensionIntersection`
42 |  * @returns {Builder} A builder for `ExtensionIntersection`
43 |  */
44 | export const extensionBuilder = (
45 |   model?: Partial,
46 | ): Builder, ExtensionIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/for-task-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { ForTaskIntersection } from '../classes/for-task';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.ForTask} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {ForTaskIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.ForTask, options: BuildOptions): ForTaskIntersection {
35 |   const instance = new Classes.ForTask(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as ForTaskIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `ForTaskIntersection`
42 |  * @returns {Builder} A builder for `ForTaskIntersection`
43 |  */
44 | export const forTaskBuilder = (
45 |   model?: Partial,
46 | ): Builder, ForTaskIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/fork-task-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { ForkTaskIntersection } from '../classes/fork-task';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.ForkTask} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {ForkTaskIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.ForkTask, options: BuildOptions): ForkTaskIntersection {
35 |   const instance = new Classes.ForkTask(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as ForkTaskIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `ForkTaskIntersection`
42 |  * @returns {Builder} A builder for `ForkTaskIntersection`
43 |  */
44 | export const forkTaskBuilder = (
45 |   model?: Partial,
46 | ): Builder, ForkTaskIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/http-body-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { HTTPBodyIntersection } from '../classes/http-body';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.HTTPBody} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {HTTPBodyIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.HTTPBody, options: BuildOptions): HTTPBodyIntersection {
35 |   const instance = new Classes.HTTPBody(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as HTTPBodyIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `HTTPBodyIntersection`
42 |  * @returns {Builder} A builder for `HTTPBodyIntersection`
43 |  */
44 | export const hTTPBodyBuilder = (
45 |   model?: Partial,
46 | ): Builder, HTTPBodyIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/http-headers-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { HTTPHeadersIntersection } from '../classes/http-headers';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.HTTPHeaders} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {HTTPHeadersIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.HTTPHeaders, options: BuildOptions): HTTPHeadersIntersection {
35 |   const instance = new Classes.HTTPHeaders(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as HTTPHeadersIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `HTTPHeadersIntersection`
42 |  * @returns {Builder} A builder for `HTTPHeadersIntersection`
43 |  */
44 | export const hTTPHeadersBuilder = (
45 |   model?: Partial,
46 | ): Builder, HTTPHeadersIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/http-query-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { HTTPQueryIntersection } from '../classes/http-query';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.HTTPQuery} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {HTTPQueryIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.HTTPQuery, options: BuildOptions): HTTPQueryIntersection {
35 |   const instance = new Classes.HTTPQuery(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as HTTPQueryIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `HTTPQueryIntersection`
42 |  * @returns {Builder} A builder for `HTTPQueryIntersection`
43 |  */
44 | export const hTTPQueryBuilder = (
45 |   model?: Partial,
46 | ): Builder, HTTPQueryIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/inline-script-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { InlineScriptIntersection } from '../classes/inline-script';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.InlineScript} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {InlineScriptIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.InlineScript, options: BuildOptions): InlineScriptIntersection {
35 |   const instance = new Classes.InlineScript(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as InlineScriptIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `InlineScriptIntersection`
42 |  * @returns {Builder} A builder for `InlineScriptIntersection`
43 |  */
44 | export const inlineScriptBuilder = (
45 |   model?: Partial,
46 | ): Builder, InlineScriptIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/input-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { InputIntersection } from '../classes/input';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.Input} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {InputIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.Input, options: BuildOptions): InputIntersection {
35 |   const instance = new Classes.Input(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as InputIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `InputIntersection`
42 |  * @returns {Builder} A builder for `InputIntersection`
43 |  */
44 | export const inputBuilder = (
45 |   model?: Partial,
46 | ): Builder, InputIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/input-from-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { InputFromIntersection } from '../classes/input-from';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.InputFrom} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {InputFromIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.InputFrom, options: BuildOptions): InputFromIntersection {
35 |   const instance = new Classes.InputFrom(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as InputFromIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `InputFromIntersection`
42 |  * @returns {Builder} A builder for `InputFromIntersection`
43 |  */
44 | export const inputFromBuilder = (
45 |   model?: Partial,
46 | ): Builder, InputFromIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/listen-task-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { ListenTaskIntersection } from '../classes/listen-task';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.ListenTask} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {ListenTaskIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.ListenTask, options: BuildOptions): ListenTaskIntersection {
35 |   const instance = new Classes.ListenTask(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as ListenTaskIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `ListenTaskIntersection`
42 |  * @returns {Builder} A builder for `ListenTaskIntersection`
43 |  */
44 | export const listenTaskBuilder = (
45 |   model?: Partial,
46 | ): Builder, ListenTaskIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/oauth2-issuers-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { OAuth2IssuersIntersection } from '../classes/oauth2-issuers';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying array
30 |  * @param {Specification.OAuth2Issuers} model The proxied array
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {OAuth2IssuersIntersection} The built array
33 |  */
34 | function buildingFn(model: Specification.OAuth2Issuers, options: BuildOptions): OAuth2IssuersIntersection {
35 |   const instance = new Classes.OAuth2Issuers(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as unknown as OAuth2IssuersIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `OAuth2IssuersIntersection`
42 |  * @returns {ArrayBuilder} A builder for `OAuth2IssuersIntersection`
43 |  */
44 | export const oAuth2IssuersBuilder = (
45 |   model?: Specification.OAuth2Issuers,
46 | ): ArrayBuilder =>
47 |   arrayBuilder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/output-as-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { OutputAsIntersection } from '../classes/output-as';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.OutputAs} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {OutputAsIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.OutputAs, options: BuildOptions): OutputAsIntersection {
35 |   const instance = new Classes.OutputAs(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as OutputAsIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `OutputAsIntersection`
42 |  * @returns {Builder} A builder for `OutputAsIntersection`
43 |  */
44 | export const outputAsBuilder = (
45 |   model?: Partial,
46 | ): Builder, OutputAsIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/output-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { OutputIntersection } from '../classes/output';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.Output} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {OutputIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.Output, options: BuildOptions): OutputIntersection {
35 |   const instance = new Classes.Output(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as OutputIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `OutputIntersection`
42 |  * @returns {Builder} A builder for `OutputIntersection`
43 |  */
44 | export const outputBuilder = (
45 |   model?: Partial,
46 | ): Builder, OutputIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/raise-task-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { RaiseTaskIntersection } from '../classes/raise-task';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.RaiseTask} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {RaiseTaskIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.RaiseTask, options: BuildOptions): RaiseTaskIntersection {
35 |   const instance = new Classes.RaiseTask(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as RaiseTaskIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `RaiseTaskIntersection`
42 |  * @returns {Builder} A builder for `RaiseTaskIntersection`
43 |  */
44 | export const raiseTaskBuilder = (
45 |   model?: Partial,
46 | ): Builder, RaiseTaskIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/retry-backoff-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { RetryBackoffIntersection } from '../classes/retry-backoff';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.RetryBackoff} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {RetryBackoffIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.RetryBackoff, options: BuildOptions): RetryBackoffIntersection {
35 |   const instance = new Classes.RetryBackoff(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as RetryBackoffIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `RetryBackoffIntersection`
42 |  * @returns {Builder} A builder for `RetryBackoffIntersection`
43 |  */
44 | export const retryBackoffBuilder = (
45 |   model?: Partial,
46 | ): Builder, RetryBackoffIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/retry-limit-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { RetryLimitIntersection } from '../classes/retry-limit';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.RetryLimit} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {RetryLimitIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.RetryLimit, options: BuildOptions): RetryLimitIntersection {
35 |   const instance = new Classes.RetryLimit(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as RetryLimitIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `RetryLimitIntersection`
42 |  * @returns {Builder} A builder for `RetryLimitIntersection`
43 |  */
44 | export const retryLimitBuilder = (
45 |   model?: Partial,
46 | ): Builder, RetryLimitIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/retry-policy-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { RetryPolicyIntersection } from '../classes/retry-policy';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.RetryPolicy} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {RetryPolicyIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.RetryPolicy, options: BuildOptions): RetryPolicyIntersection {
35 |   const instance = new Classes.RetryPolicy(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as RetryPolicyIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `RetryPolicyIntersection`
42 |  * @returns {Builder} A builder for `RetryPolicyIntersection`
43 |  */
44 | export const retryPolicyBuilder = (
45 |   model?: Partial,
46 | ): Builder, RetryPolicyIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/run-container-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { RunContainerIntersection } from '../classes/run-container';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.RunContainer} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {RunContainerIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.RunContainer, options: BuildOptions): RunContainerIntersection {
35 |   const instance = new Classes.RunContainer(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as RunContainerIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `RunContainerIntersection`
42 |  * @returns {Builder} A builder for `RunContainerIntersection`
43 |  */
44 | export const runContainerBuilder = (
45 |   model?: Partial,
46 | ): Builder, RunContainerIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/run-script-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { RunScriptIntersection } from '../classes/run-script';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.RunScript} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {RunScriptIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.RunScript, options: BuildOptions): RunScriptIntersection {
35 |   const instance = new Classes.RunScript(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as RunScriptIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `RunScriptIntersection`
42 |  * @returns {Builder} A builder for `RunScriptIntersection`
43 |  */
44 | export const runScriptBuilder = (
45 |   model?: Partial,
46 | ): Builder, RunScriptIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/run-shell-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { RunShellIntersection } from '../classes/run-shell';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.RunShell} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {RunShellIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.RunShell, options: BuildOptions): RunShellIntersection {
35 |   const instance = new Classes.RunShell(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as RunShellIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `RunShellIntersection`
42 |  * @returns {Builder} A builder for `RunShellIntersection`
43 |  */
44 | export const runShellBuilder = (
45 |   model?: Partial,
46 | ): Builder, RunShellIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/run-task-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { RunTaskIntersection } from '../classes/run-task';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.RunTask} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {RunTaskIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.RunTask, options: BuildOptions): RunTaskIntersection {
35 |   const instance = new Classes.RunTask(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as RunTaskIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `RunTaskIntersection`
42 |  * @returns {Builder} A builder for `RunTaskIntersection`
43 |  */
44 | export const runTaskBuilder = (
45 |   model?: Partial,
46 | ): Builder, RunTaskIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/run-workflow-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { RunWorkflowIntersection } from '../classes/run-workflow';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.RunWorkflow} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {RunWorkflowIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.RunWorkflow, options: BuildOptions): RunWorkflowIntersection {
35 |   const instance = new Classes.RunWorkflow(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as RunWorkflowIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `RunWorkflowIntersection`
42 |  * @returns {Builder} A builder for `RunWorkflowIntersection`
43 |  */
44 | export const runWorkflowBuilder = (
45 |   model?: Partial,
46 | ): Builder, RunWorkflowIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/schedule-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { ScheduleIntersection } from '../classes/schedule';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.Schedule} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {ScheduleIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.Schedule, options: BuildOptions): ScheduleIntersection {
35 |   const instance = new Classes.Schedule(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as ScheduleIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `ScheduleIntersection`
42 |  * @returns {Builder} A builder for `ScheduleIntersection`
43 |  */
44 | export const scheduleBuilder = (
45 |   model?: Partial,
46 | ): Builder, ScheduleIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/schema-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { SchemaIntersection } from '../classes/schema';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.Schema} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {SchemaIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.Schema, options: BuildOptions): SchemaIntersection {
35 |   const instance = new Classes.Schema(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as SchemaIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `SchemaIntersection`
42 |  * @returns {Builder} A builder for `SchemaIntersection`
43 |  */
44 | export const schemaBuilder = (
45 |   model?: Partial,
46 | ): Builder, SchemaIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/schema-inline-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { SchemaInlineIntersection } from '../classes/schema-inline';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.SchemaInline} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {SchemaInlineIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.SchemaInline, options: BuildOptions): SchemaInlineIntersection {
35 |   const instance = new Classes.SchemaInline(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as SchemaInlineIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `SchemaInlineIntersection`
42 |  * @returns {Builder} A builder for `SchemaInlineIntersection`
43 |  */
44 | export const schemaInlineBuilder = (
45 |   model?: Partial,
46 | ): Builder, SchemaInlineIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/script-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { ScriptIntersection } from '../classes/script';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.Script} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {ScriptIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.Script, options: BuildOptions): ScriptIntersection {
35 |   const instance = new Classes.Script(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as ScriptIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `ScriptIntersection`
42 |  * @returns {Builder} A builder for `ScriptIntersection`
43 |  */
44 | export const scriptBuilder = (
45 |   model?: Partial,
46 | ): Builder, ScriptIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/set-task-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { SetTaskIntersection } from '../classes/set-task';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.SetTask} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {SetTaskIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.SetTask, options: BuildOptions): SetTaskIntersection {
35 |   const instance = new Classes.SetTask(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as SetTaskIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `SetTaskIntersection`
42 |  * @returns {Builder} A builder for `SetTaskIntersection`
43 |  */
44 | export const setTaskBuilder = (
45 |   model?: Partial,
46 | ): Builder, SetTaskIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/shell-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { ShellIntersection } from '../classes/shell';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.Shell} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {ShellIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.Shell, options: BuildOptions): ShellIntersection {
35 |   const instance = new Classes.Shell(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as ShellIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `ShellIntersection`
42 |  * @returns {Builder} A builder for `ShellIntersection`
43 |  */
44 | export const shellBuilder = (
45 |   model?: Partial,
46 | ): Builder, ShellIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/subflow-input-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { SubflowInputIntersection } from '../classes/subflow-input';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.SubflowInput} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {SubflowInputIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.SubflowInput, options: BuildOptions): SubflowInputIntersection {
35 |   const instance = new Classes.SubflowInput(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as SubflowInputIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `SubflowInputIntersection`
42 |  * @returns {Builder} A builder for `SubflowInputIntersection`
43 |  */
44 | export const subflowInputBuilder = (
45 |   model?: Partial,
46 | ): Builder, SubflowInputIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/switch-case-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { SwitchCaseIntersection } from '../classes/switch-case';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.SwitchCase} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {SwitchCaseIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.SwitchCase, options: BuildOptions): SwitchCaseIntersection {
35 |   const instance = new Classes.SwitchCase(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as SwitchCaseIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `SwitchCaseIntersection`
42 |  * @returns {Builder} A builder for `SwitchCaseIntersection`
43 |  */
44 | export const switchCaseBuilder = (
45 |   model?: Partial,
46 | ): Builder, SwitchCaseIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/switch-item-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { SwitchItemIntersection } from '../classes/switch-item';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.SwitchItem} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {SwitchItemIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.SwitchItem, options: BuildOptions): SwitchItemIntersection {
35 |   const instance = new Classes.SwitchItem(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as SwitchItemIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `SwitchItemIntersection`
42 |  * @returns {Builder} A builder for `SwitchItemIntersection`
43 |  */
44 | export const switchItemBuilder = (
45 |   model?: Partial,
46 | ): Builder, SwitchItemIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/switch-task-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { SwitchTaskIntersection } from '../classes/switch-task';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.SwitchTask} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {SwitchTaskIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.SwitchTask, options: BuildOptions): SwitchTaskIntersection {
35 |   const instance = new Classes.SwitchTask(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as SwitchTaskIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `SwitchTaskIntersection`
42 |  * @returns {Builder} A builder for `SwitchTaskIntersection`
43 |  */
44 | export const switchTaskBuilder = (
45 |   model?: Partial,
46 | ): Builder, SwitchTaskIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/task-base-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { TaskBaseIntersection } from '../classes/task-base';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.TaskBase} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {TaskBaseIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.TaskBase, options: BuildOptions): TaskBaseIntersection {
35 |   const instance = new Classes.TaskBase(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as TaskBaseIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `TaskBaseIntersection`
42 |  * @returns {Builder} A builder for `TaskBaseIntersection`
43 |  */
44 | export const taskBaseBuilder = (
45 |   model?: Partial,
46 | ): Builder, TaskBaseIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/task-base-if-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { TaskBaseIfIntersection } from '../classes/task-base-if';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.TaskBaseIf} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {TaskBaseIfIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.TaskBaseIf, options: BuildOptions): TaskBaseIfIntersection {
35 |   const instance = new Classes.TaskBaseIf(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as TaskBaseIfIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `TaskBaseIfIntersection`
42 |  * @returns {Builder} A builder for `TaskBaseIfIntersection`
43 |  */
44 | export const taskBaseIfBuilder = (
45 |   model?: Partial,
46 | ): Builder, TaskBaseIfIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/task-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { TaskIntersection } from '../classes/task';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.Task} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {TaskIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.Task, options: BuildOptions): TaskIntersection {
35 |   const instance = new Classes.Task(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as TaskIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `TaskIntersection`
42 |  * @returns {Builder} A builder for `TaskIntersection`
43 |  */
44 | export const taskBuilder = (
45 |   model?: Partial,
46 | ): Builder, TaskIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/task-item-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { TaskItemIntersection } from '../classes/task-item';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.TaskItem} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {TaskItemIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.TaskItem, options: BuildOptions): TaskItemIntersection {
35 |   const instance = new Classes.TaskItem(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as TaskItemIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `TaskItemIntersection`
42 |  * @returns {Builder} A builder for `TaskItemIntersection`
43 |  */
44 | export const taskItemBuilder = (
45 |   model?: Partial,
46 | ): Builder, TaskItemIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/task-list-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { TaskListIntersection } from '../classes/task-list';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying array
30 |  * @param {Specification.TaskList} model The proxied array
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {TaskListIntersection} The built array
33 |  */
34 | function buildingFn(model: Specification.TaskList, options: BuildOptions): TaskListIntersection {
35 |   const instance = new Classes.TaskList(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as unknown as TaskListIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `TaskListIntersection`
42 |  * @returns {ArrayBuilder} A builder for `TaskListIntersection`
43 |  */
44 | export const taskListBuilder = (
45 |   model?: Specification.TaskList,
46 | ): ArrayBuilder =>
47 |   arrayBuilder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/task-metadata-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { TaskMetadataIntersection } from '../classes/task-metadata';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.TaskMetadata} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {TaskMetadataIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.TaskMetadata, options: BuildOptions): TaskMetadataIntersection {
35 |   const instance = new Classes.TaskMetadata(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as TaskMetadataIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `TaskMetadataIntersection`
42 |  * @returns {Builder} A builder for `TaskMetadataIntersection`
43 |  */
44 | export const taskMetadataBuilder = (
45 |   model?: Partial,
46 | ): Builder, TaskMetadataIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/task-timeout-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { TaskTimeoutIntersection } from '../classes/task-timeout';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.TaskTimeout} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {TaskTimeoutIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.TaskTimeout, options: BuildOptions): TaskTimeoutIntersection {
35 |   const instance = new Classes.TaskTimeout(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as TaskTimeoutIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `TaskTimeoutIntersection`
42 |  * @returns {Builder} A builder for `TaskTimeoutIntersection`
43 |  */
44 | export const taskTimeoutBuilder = (
45 |   model?: Partial,
46 | ): Builder, TaskTimeoutIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/timeout-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { TimeoutIntersection } from '../classes/timeout';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.Timeout} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {TimeoutIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.Timeout, options: BuildOptions): TimeoutIntersection {
35 |   const instance = new Classes.Timeout(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as TimeoutIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `TimeoutIntersection`
42 |  * @returns {Builder} A builder for `TimeoutIntersection`
43 |  */
44 | export const timeoutBuilder = (
45 |   model?: Partial,
46 | ): Builder, TimeoutIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/try-task-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { TryTaskIntersection } from '../classes/try-task';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.TryTask} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {TryTaskIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.TryTask, options: BuildOptions): TryTaskIntersection {
35 |   const instance = new Classes.TryTask(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as TryTaskIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `TryTaskIntersection`
42 |  * @returns {Builder} A builder for `TryTaskIntersection`
43 |  */
44 | export const tryTaskBuilder = (
45 |   model?: Partial,
46 | ): Builder, TryTaskIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/try-task-catch-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { TryTaskCatchIntersection } from '../classes/try-task-catch';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.TryTaskCatch} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {TryTaskCatchIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.TryTaskCatch, options: BuildOptions): TryTaskCatchIntersection {
35 |   const instance = new Classes.TryTaskCatch(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as TryTaskCatchIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `TryTaskCatchIntersection`
42 |  * @returns {Builder} A builder for `TryTaskCatchIntersection`
43 |  */
44 | export const tryTaskCatchBuilder = (
45 |   model?: Partial,
46 | ): Builder, TryTaskCatchIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/uri-template-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { UriTemplateIntersection } from '../classes/uri-template';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.UriTemplate} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {UriTemplateIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.UriTemplate, options: BuildOptions): UriTemplateIntersection {
35 |   const instance = new Classes.UriTemplate(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as UriTemplateIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `UriTemplateIntersection`
42 |  * @returns {Builder} A builder for `UriTemplateIntersection`
43 |  */
44 | export const uriTemplateBuilder = (
45 |   model?: Partial,
46 | ): Builder, UriTemplateIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/use-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { UseIntersection } from '../classes/use';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.Use} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {UseIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.Use, options: BuildOptions): UseIntersection {
35 |   const instance = new Classes.Use(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as UseIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `UseIntersection`
42 |  * @returns {Builder} A builder for `UseIntersection`
43 |  */
44 | export const useBuilder = (model?: Partial): Builder, UseIntersection> =>
45 |   builder(model, buildingFn);
46 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/use-catalogs-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { UseCatalogsIntersection } from '../classes/use-catalogs';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.UseCatalogs} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {UseCatalogsIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.UseCatalogs, options: BuildOptions): UseCatalogsIntersection {
35 |   const instance = new Classes.UseCatalogs(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as UseCatalogsIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `UseCatalogsIntersection`
42 |  * @returns {Builder} A builder for `UseCatalogsIntersection`
43 |  */
44 | export const useCatalogsBuilder = (
45 |   model?: Partial,
46 | ): Builder, UseCatalogsIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/use-errors-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { UseErrorsIntersection } from '../classes/use-errors';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.UseErrors} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {UseErrorsIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.UseErrors, options: BuildOptions): UseErrorsIntersection {
35 |   const instance = new Classes.UseErrors(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as UseErrorsIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `UseErrorsIntersection`
42 |  * @returns {Builder} A builder for `UseErrorsIntersection`
43 |  */
44 | export const useErrorsBuilder = (
45 |   model?: Partial,
46 | ): Builder, UseErrorsIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/use-functions-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { UseFunctionsIntersection } from '../classes/use-functions';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.UseFunctions} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {UseFunctionsIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.UseFunctions, options: BuildOptions): UseFunctionsIntersection {
35 |   const instance = new Classes.UseFunctions(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as UseFunctionsIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `UseFunctionsIntersection`
42 |  * @returns {Builder} A builder for `UseFunctionsIntersection`
43 |  */
44 | export const useFunctionsBuilder = (
45 |   model?: Partial,
46 | ): Builder, UseFunctionsIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/use-retries-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { UseRetriesIntersection } from '../classes/use-retries';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.UseRetries} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {UseRetriesIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.UseRetries, options: BuildOptions): UseRetriesIntersection {
35 |   const instance = new Classes.UseRetries(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as UseRetriesIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `UseRetriesIntersection`
42 |  * @returns {Builder} A builder for `UseRetriesIntersection`
43 |  */
44 | export const useRetriesBuilder = (
45 |   model?: Partial,
46 | ): Builder, UseRetriesIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/use-secrets-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { arrayBuilder, ArrayBuilder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { UseSecretsIntersection } from '../classes/use-secrets';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying array
30 |  * @param {Specification.UseSecrets} model The proxied array
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {UseSecretsIntersection} The built array
33 |  */
34 | function buildingFn(model: Specification.UseSecrets, options: BuildOptions): UseSecretsIntersection {
35 |   const instance = new Classes.UseSecrets(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as unknown as UseSecretsIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `UseSecretsIntersection`
42 |  * @returns {ArrayBuilder} A builder for `UseSecretsIntersection`
43 |  */
44 | export const useSecretsBuilder = (model?: Specification.UseSecrets): ArrayBuilder =>
45 |   arrayBuilder(model, buildingFn);
46 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/use-timeouts-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { UseTimeoutsIntersection } from '../classes/use-timeouts';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.UseTimeouts} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {UseTimeoutsIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.UseTimeouts, options: BuildOptions): UseTimeoutsIntersection {
35 |   const instance = new Classes.UseTimeouts(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as UseTimeoutsIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `UseTimeoutsIntersection`
42 |  * @returns {Builder} A builder for `UseTimeoutsIntersection`
43 |  */
44 | export const useTimeoutsBuilder = (
45 |   model?: Partial,
46 | ): Builder, UseTimeoutsIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/wait-task-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { WaitTaskIntersection } from '../classes/wait-task';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.WaitTask} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {WaitTaskIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.WaitTask, options: BuildOptions): WaitTaskIntersection {
35 |   const instance = new Classes.WaitTask(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as WaitTaskIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `WaitTaskIntersection`
42 |  * @returns {Builder} A builder for `WaitTaskIntersection`
43 |  */
44 | export const waitTaskBuilder = (
45 |   model?: Partial,
46 | ): Builder, WaitTaskIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/with-event-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { WithEventIntersection } from '../classes/with-event';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.WithEvent} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {WithEventIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.WithEvent, options: BuildOptions): WithEventIntersection {
35 |   const instance = new Classes.WithEvent(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as WithEventIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `WithEventIntersection`
42 |  * @returns {Builder} A builder for `WithEventIntersection`
43 |  */
44 | export const withEventBuilder = (
45 |   model?: Partial,
46 | ): Builder, WithEventIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/workflow-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { WorkflowIntersection } from '../classes/workflow';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.Workflow} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {WorkflowIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.Workflow, options: BuildOptions): WorkflowIntersection {
35 |   const instance = new Classes.Workflow(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as WorkflowIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `WorkflowIntersection`
42 |  * @returns {Builder} A builder for `WorkflowIntersection`
43 |  */
44 | export const workflowBuilder = (
45 |   model?: Partial,
46 | ): Builder, WorkflowIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/builders/workflow-tags-builder.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | /*****************************************************************************************
18 |  *
19 |  * /!\ This file is computer generated. Any manual modification can and will be lost. /!\
20 |  *
21 |  *****************************************************************************************/
22 | 
23 | import { builder, Builder, BuildOptions } from '../../builder';
24 | import { Classes } from '../classes';
25 | import { WorkflowTagsIntersection } from '../classes/workflow-tags';
26 | import { Specification } from '../definitions';
27 | 
28 | /**
29 |  * The internal function used by the builder proxy to validate and return its underlying object
30 |  * @param {Specification.WorkflowTags} model The proxied object
31 |  * @param {BuildOptions} options The build options to use
32 |  * @returns {WorkflowTagsIntersection} The built object
33 |  */
34 | function buildingFn(model: Specification.WorkflowTags, options: BuildOptions): WorkflowTagsIntersection {
35 |   const instance = new Classes.WorkflowTags(model);
36 |   if (options.validate) instance.validate();
37 |   return (options.normalize ? instance.normalize() : instance) as WorkflowTagsIntersection;
38 | }
39 | 
40 | /**
41 |  * A factory to create a builder proxy for the type `WorkflowTagsIntersection`
42 |  * @returns {Builder} A builder for `WorkflowTagsIntersection`
43 |  */
44 | export const workflowTagsBuilder = (
45 |   model?: Partial,
46 | ): Builder, WorkflowTagsIntersection> =>
47 |   builder(model, buildingFn);
48 | 


--------------------------------------------------------------------------------
/src/lib/generated/classes/README.md:
--------------------------------------------------------------------------------
1 | # Auto generated notice
2 | This directory and its content has been generated automatically. Do not modify its content, it WILL be lost.


--------------------------------------------------------------------------------
/src/lib/generated/definitions/README.md:
--------------------------------------------------------------------------------
1 | # Auto generated notice
2 | This directory and its content has been generated automatically. Do not modify its content, it WILL be lost.


--------------------------------------------------------------------------------
/src/lib/generated/definitions/index.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | export * as Specification from './specification';
18 | 


--------------------------------------------------------------------------------
/src/lib/generated/schema/README.md:
--------------------------------------------------------------------------------
1 | # Auto generated notice
2 | This directory and its content has been generated automatically. Do not modify its content, it WILL be lost.


--------------------------------------------------------------------------------
/src/lib/generated/validation/README.md:
--------------------------------------------------------------------------------
1 | # Auto generated notice
2 | This directory and its content has been generated automatically. Do not modify its content, it WILL be lost.


--------------------------------------------------------------------------------
/src/lib/generated/validation/index.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | export { validationPointers } from './validation-pointers';
18 | 


--------------------------------------------------------------------------------
/src/lib/hooks/index.ts:
--------------------------------------------------------------------------------
1 | export * from './workflow-hooks';
2 | 


--------------------------------------------------------------------------------
/src/lib/hooks/workflow-hooks.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | 
17 | import { LifecycleHooks } from '../lifecycle-hooks';
18 | import { Specification } from '../generated/definitions';
19 | 
20 | import { schemaVersion } from '../../../package.json';
21 | 
22 | export const WorkflowHooks = {
23 |   preValidation(instance) {
24 |     if (instance?.document?.dsl !== schemaVersion) {
25 |       throw new Error(
26 |         `'Workflow' is invalid - The DSL version of the workflow '${instance?.document?.dsl}' doesn't match the supported version of the SDK '${schemaVersion}'.`,
27 |       );
28 |     }
29 |     return;
30 |   },
31 | } as LifecycleHooks;
32 | 


--------------------------------------------------------------------------------
/src/lib/hydrator.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  *
16 |  */
17 | 
18 | import { deepCopy, isObject } from './utils';
19 | 
20 | /**
21 |  * A base class used for object hydration
22 |  */
23 | export class ObjectHydrator {
24 |   constructor(model?: Partial) {
25 |     if (isObject(model)) {
26 |       Object.assign(this, deepCopy(model));
27 |     }
28 |   }
29 | }
30 | 
31 | /**
32 |  * A base class used for array hydration
33 |  */
34 | export class ArrayHydrator extends Array {
35 |   constructor(model?: Array | number) {
36 |     if (!isNaN(model as number)) {
37 |       super(model as number);
38 |     } else {
39 |       super(...((model as Array) || []));
40 |       if (!model) {
41 |         model = [];
42 |       }
43 |       if (!Array.isArray(model)) {
44 |         throw new Error('The provided model should be an array');
45 |       }
46 |     }
47 |   }
48 | }
49 | 


--------------------------------------------------------------------------------
/src/lib/utils.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  *
16 |  */
17 | 
18 | /**
19 |  * Check if the provided value is an object but not an array
20 |  * @param value The value to check
21 |  * @returns True if the value is an object
22 |  */
23 | export const isObject = (value: T): value is T & object => {
24 |   if (!value) return false;
25 |   return typeof value === 'object' && !Array.isArray(value);
26 | };
27 | 
28 | /**
29 |  * Makes a deep copy of the provided object
30 |  * @param obj
31 |  * @returns
32 |  */
33 | export const deepCopy = (obj: T): T => JSON.parse(JSON.stringify(obj));
34 | 
35 | /**
36 |  * Checks the provided array is an array
37 |  * @param arr
38 |  * @returns
39 |  */
40 | export const isArray = (arr: Array | number | undefined): arr is Array => !!arr && isNaN(arr as number);
41 | 


--------------------------------------------------------------------------------
/src/serverless-workflow-sdk.ts:
--------------------------------------------------------------------------------
1 | export * from './lib/generated/builders';
2 | export * from './lib/generated/classes';
3 | export * from './lib/generated/definitions';
4 | export * from './lib/validation';
5 | export * from './lib/graph-builder';
6 | export * from './lib/mermaid-converter';
7 | 


--------------------------------------------------------------------------------
/tests/classes/use-extensions.spec.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  *
16 |  */
17 | import { type } from 'ts-inference-check';
18 | import { Classes } from '../../src/lib/generated/classes';
19 | import { Specification } from '../../src/lib/generated/definitions';
20 | 
21 | describe('UseExtensions class', () => {
22 |   it('should be an instance of UseExtensions', () => {
23 |     const useExtensions = new Classes.UseExtensions();
24 |     expect(useExtensions).toBeInstanceOf(Classes.UseExtensions);
25 |     expect(useExtensions.length).toBe(0);
26 |     expect(type(useExtensions.push).is<(...items: { [k: string]: Specification.Extension }[]) => number>(true)).toBe(
27 |       true,
28 |     );
29 |   });
30 | });
31 | 


--------------------------------------------------------------------------------
/tests/classes/workflow.spec.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * oUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  *
16 |  */
17 | import { type } from 'ts-inference-check';
18 | import { Classes } from '../../src/lib/generated/classes';
19 | import { Specification } from '../../src/lib/generated/definitions';
20 | //import { schemaVersion } from '../../package.json';
21 | 
22 | describe('Workflow class', () => {
23 |   it('should be an instance of Workflow', () => {
24 |     const workflow = new Classes.Workflow();
25 |     expect(workflow).toBeInstanceOf(Classes.Workflow);
26 |     expect(type(workflow.document).is(true)).toBe(true);
27 |     expect(type(workflow.input).is(true)).toBe(true);
28 |     expect(type(workflow.use).is(true)).toBe(true);
29 |     expect(type(workflow.do).is(true)).toBe(true);
30 |     expect(type(workflow.timeout).is(true)).toBe(true);
31 |     expect(type(workflow.output).is(true)).toBe(true);
32 |     expect(type(workflow.schedule).is(true)).toBe(true);
33 |     expect(type(workflow.foobar).is(true)).toBe(true);
34 |   });
35 | });
36 | 


--------------------------------------------------------------------------------
/tests/tsconfig.json:
--------------------------------------------------------------------------------
 1 | {
 2 |   "extends": "../tsconfig.base.json",
 3 |   "compilerOptions": {
 4 |     "outDir": "../out-tsc/tests"
 5 |   },
 6 |   "include": [
 7 |     "../src/**/*.ts",
 8 |     "../**/*.spec.ts"
 9 |   ]
10 | }
11 | 


--------------------------------------------------------------------------------
/tools/consts.ts:
--------------------------------------------------------------------------------
 1 | /*
 2 |  * Copyright 2021-Present The Serverless Workflow Specification Authors
 3 |  *
 4 |  * Licensed under the Apache License, Version 2.0 (the "License");
 5 |  * you may not use this file except in compliance with the License.
 6 |  * You may obtain a copy of the License at
 7 |  *
 8 |  * http://www.apache.org/licenses/LICENSE-2.0
 9 |  *
10 |  * Unless required by applicable law or agreed to in writing, software
11 |  * distributed under the License is distributed on an "AS IS" BASIS,
12 |  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 |  * See the License for the specific language governing permissions and
14 |  * limitations under the License.
15 |  */
16 | export const fileHeader = `/*
17 | * Copyright 2021-Present The Serverless Workflow Specification Authors
18 | *
19 | * Licensed under the Apache License, Version 2.0 (the "License");
20 | * you may not use this file except in compliance with the License.
21 | * You may obtain a copy of the License at
22 | *
23 | * http://www.apache.org/licenses/LICENSE-2.0
24 | *
25 | * Unless required by applicable law or agreed to in writing, software
26 | * distributed under the License is distributed on an "AS IS" BASIS,
27 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28 | * See the License for the specific language governing permissions and
29 | * limitations under the License.
30 | */
31 | 
32 | `;
33 | 
34 | export const inFileDisclaimer = `  
35 | /*****************************************************************************************
36 |  *
37 |  * /!\\ This file is computer generated. Any manual modification can and will be lost. /!\\
38 |  *
39 |  *****************************************************************************************/
40 | `;
41 | 
42 | export const readMeDisclaimer = `# Auto generated notice
43 | This directory and its content has been generated automatically. Do not modify its content, it WILL be lost.`;
44 | 


--------------------------------------------------------------------------------
/tools/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 |   "extends": "../tsconfig.base.json"
3 | }
4 | 


--------------------------------------------------------------------------------
/tsconfig.base.json:
--------------------------------------------------------------------------------
 1 | {
 2 |   "compilerOptions": {
 3 |     "target": "ES2017",                       /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
 4 |     "module": "commonjs",                     /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
 5 |     "lib": [ "ES2019", "DOM" ],               /* Specify library files to be included in the compilation. */
 6 |     "declaration": true,                      /* Generates corresponding '.d.ts' file. */
 7 |     "sourceMap": true,                        /* Generates corresponding '.map' file. */
 8 |     "noImplicitAny": true,                    /* Raise error on expressions and declarations with an implied 'any' type. */
 9 |     "strictNullChecks": true,                 /* Enable strict null checks. */
10 |     "noUnusedLocals": true,                   /* Report errors on unused locals. */
11 |     "noFallthroughCasesInSwitch": true,       /* Report errors for fallthrough cases in switch statement. */
12 |     "moduleResolution": "node",               /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
13 |     "esModuleInterop": true,                  /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
14 |     "forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */
15 |     "resolveJsonModule": true
16 |   }
17 | }
18 | 


--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
 1 | {
 2 |   "extends": "./tsconfig.base.json",
 3 |   "compilerOptions": {
 4 |     "declarationDir": "./dist",
 5 |     "declarationMap": true,
 6 |     "target": "ES5",
 7 |     "module": "ES2015"
 8 |   },
 9 |   "include": [
10 |     "./src/**/*.ts",
11 |   ]
12 | }
13 | 


--------------------------------------------------------------------------------