Skip to content

Commit b5a3fb5

Browse files
authored
Add support to Interface based model (#195)
* Add interfaces and plain objects based model Signed-off-by: handreyrc <handrey.cunha@gmail.com> * fix lodash dependency and remove debug message Signed-off-by: handreyrc <handrey.cunha@gmail.com> * do not break the SDK for those relying on classes Signed-off-by: handreyrc <handrey.cunha@gmail.com> * fix wrong name and version Signed-off-by: handreyrc <handrey.cunha@gmail.com> --------- Signed-off-by: handreyrc <handrey.cunha@gmail.com>
1 parent 8549c07 commit b5a3fb5

File tree

121 files changed

+9101
-10656
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+9101
-10656
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ npm install && npm run build && npm run test
4040
For the latest stable version:
4141

4242
```sh
43-
npm i @severlessworkflow/sdk-typescript
43+
npm i @serverlessworkflow/sdk-typescript
4444
```
4545

4646
#### Create Workflow using builder API
4747

4848
```typescript
49-
import { workflowBuilder, injectstateBuilder, Specification } from '@severlessworkflow/sdk-typescript';
49+
import { workflowBuilder, injectstateBuilder, Specification } from '@serverlessworkflow/sdk-typescript';
5050

5151
const workflow: Specification.Workflow = workflowBuilder()
5252
.id("helloworld")
@@ -69,7 +69,7 @@ const workflow: Specification.Workflow = workflowBuilder()
6969
#### Create Workflow from JSON/YAML source
7070

7171
```typescript
72-
import { Specification, Workflow } from '@severlessworkflow/sdk-typescript';
72+
import { Specification, Workflow } from '@serverlessworkflow/sdk-typescript';
7373

7474
const source = `id: helloworld
7575
version: '1.0'
@@ -93,7 +93,7 @@ Where `source` can be in both JSON or YAML format.
9393
Having the following workflow instance:
9494

9595
```typescript
96-
import { workflowBuilder, injectstateBuilder, Specification } from '@severlessworkflow/sdk-typescript';
96+
import { workflowBuilder, injectstateBuilder, Specification } from '@serverlessworkflow/sdk-typescript';
9797

9898
const workflow: Specification.Workflow = workflowBuilder()
9999
.id("helloworld")
@@ -139,7 +139,7 @@ The sdk provides a way to validate if a workflow object is compliant with the se
139139
- `validate(): boolean`
140140

141141
```typescript
142-
import {WorkflowValidator, Specification} from '@severlessworkflow/sdk-typescript';
142+
import {WorkflowValidator, Specification} from '@serverlessworkflow/sdk-typescript';
143143
import {Workflow} from "./workflow";
144144

145145
const workflow = {
@@ -171,7 +171,7 @@ You can also validate parts of a workflow using `validators`:
171171

172172
```typescript
173173
import { ValidateFunction } from 'ajv';
174-
import { validators, Specification } from '@severlessworkflow/sdk-typescript';
174+
import { validators, Specification } from '@serverlessworkflow/sdk-typescript';
175175

176176
const injectionState: Specification.Injectstate = workflow.states[0];
177177
const injectionStateValidator: ValidateFunction<Specification.Injectstate> = validators.get('Injectstate');

examples/node/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
import { injectstateBuilder, Specification, workflowBuilder } from '../../dist';
1717

18-
const workflow: Specification.Workflow = workflowBuilder()
18+
const workflow: Specification.IWorkflow = workflowBuilder()
1919
.id('helloworld')
2020
.version('1.0')
2121
.name('Hello World Workflow')

0 commit comments

Comments
 (0)