@@ -19,7 +19,7 @@ To build the project and run tests locally:
1919``` sh
2020git clone https://github.com/serverlessworkflow/sdk-typescript.git
2121cd sdk-typescript
22- npm install && npm run update-code-base && npm run test
22+ npm install && npm run test
2323```
2424
2525
@@ -66,7 +66,6 @@ const workflow: Specification.Workflow = workflowBuilder()
6666 .data ({
6767 " result" : " Hello World!"
6868 })
69- .end (true )
7069 .build ()
7170 ])
7271 .build ();
@@ -76,9 +75,9 @@ const workflow: Specification.Workflow = workflowBuilder()
7675#### Load a file JSON/YAML to a Workflow instance
7776
7877``` typescript
79- import { Specification , WorkflowConverter } from ' @severlessworkflow/sdk-typescript' ;
78+ import { Specification , Workflow } from ' @severlessworkflow/sdk-typescript' ;
8079
81- const workflow: Specification .Workflow = WorkflowConverter . fromString (source );
80+ const workflow: Specification .Workflow = Workflow . fromSource (source );
8281```
8382Where ` source ` is a JSON or a YAML string.
8483
@@ -109,18 +108,18 @@ const workflow: Specification.Workflow = workflowBuilder()
109108```
110109
111110You can convert it to its string representation in JSON or YAML format
112- by using the static methods ` toJson ` or ` toYaml ` respectively:
111+ by using the static methods ` Workflow. toJson` or ` Workflow. toYaml` respectively:
113112
114113``` typescript
115- import { WorkflowConverter } from ' @severlessworkflow/sdk-typescript ' ;
114+ import { Workflow } from ' ../src/lib/definitions/workflow ' ;
116115
117- const workflowAsJson: string = WorkflowConverter .toJson (workflow );
116+ const workflowAsJson: string = Workflow .toJson (workflow );
118117```
119118
120119``` typescript
121- import { WorkflowConverter } from ' @severlessworkflow/sdk-typescript ' ;
120+ import { Workflow } from ' ../src/lib/definitions/workflow ' ;
122121
123- const workflowAsYaml: string = WorkflowConverter .toYaml (workflow );
122+ const workflowAsYaml: string = Workflow .toYaml (workflow );
124123```
125124
126125
@@ -169,4 +168,4 @@ const injectionStateValidator: ValidateFunction<Specification.Injectstate> = val
169168if (! injectionStateValidator (injectionState )) {
170169 injectionStateValidator .errors .forEach (error => console .error (error .message ));
171170}
172- ```
171+ ```
0 commit comments