1
- ![ Node CI] ( https://github.com/serverlessworkflow /sdk-typescript /workflows/Node%20CI/badge.svg ) [ ![ Gitpod ready-to-code] ( https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod )] ( https://gitpod.io/#https://github.com/serverlessworkflow /sdk-typescript )
1
+ ![ Node CI] ( https://github.com/serverless-workflow /sdk/workflows/Node%20CI/badge.svg ) [ ![ Gitpod ready-to-code] ( https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod )] ( https://gitpod.io/#https://github.com/serverless-workflow /sdk )
2
2
3
3
# Serverless Workflow Specification - Typescript SDK
4
4
@@ -14,9 +14,9 @@ With the SDK you can:
14
14
15
15
| Latest Releases | Conformance to spec version |
16
16
| :---: | :---: |
17
- | [ v1.0.0] ( https://github.com/serverlessworkflow /sdk-typescript /releases/ ) | [ v0.6] ( https://github.com/serverlessworkflow/specification/tree/0.6.x ) |
18
- | [ v2.0.0] ( https://github.com/serverlessworkflow /sdk-typescript /releases/ ) | [ v0.7] ( https://github.com/serverlessworkflow/specification/tree/0.7.x ) |
19
- | [ v3.0.0] ( https://github.com/serverlessworkflow /sdk-typescript /releases/ ) | [ v0.8] ( https://github.com/serverlessworkflow/specification/tree/0.8.x ) |
17
+ | [ v1.0.0] ( https://github.com/serverless-workflow /sdk/releases/ ) | [ v0.6] ( https://github.com/serverlessworkflow/specification/tree/0.6.x ) |
18
+ | [ v2.0.0] ( https://github.com/serverless-workflow /sdk/releases/ ) | [ v0.7] ( https://github.com/serverlessworkflow/specification/tree/0.7.x ) |
19
+ | [ v3.0.0] ( https://github.com/serverless-workflow /sdk/releases/ ) | [ v0.8] ( https://github.com/serverlessworkflow/specification/tree/0.8.x ) |
20
20
21
21
22
22
@@ -27,7 +27,7 @@ With the SDK you can:
27
27
To build the project and run tests locally:
28
28
29
29
``` sh
30
- git clone https://github.com/serverlessworkflow /sdk-typescript .git
30
+ git clone https://github.com/serverless-workflow /sdk.git
31
31
cd sdk-typescript
32
32
npm install && npm run build && npm run test
33
33
```
@@ -41,7 +41,7 @@ npm install && npm run build && npm run test
41
41
##### Version >= 4.0.0
42
42
Note: Version 4.0.0 has not been released yet.
43
43
``` sh
44
- npm i @serverlessworkflow /sdk-typescript
44
+ npm i @serverless-workflow /sdk
45
45
```
46
46
47
47
@@ -55,7 +55,7 @@ npm i @severlessworkflow/sdk-typescript
55
55
#### Create Workflow using builder API
56
56
57
57
``` typescript
58
- import { workflowBuilder , injectstateBuilder , Specification } from ' @serverlessworkflow /sdk-typescript ' ;
58
+ import { workflowBuilder , injectstateBuilder , Specification } from ' @serverless-workflow /sdk' ;
59
59
60
60
const workflow: Specification .Workflow = workflowBuilder ()
61
61
.id (" helloworld" )
@@ -78,7 +78,7 @@ const workflow: Specification.Workflow = workflowBuilder()
78
78
#### Create Workflow from JSON/YAML source
79
79
80
80
``` typescript
81
- import { Specification , Workflow } from ' @serverlessworkflow /sdk-typescript ' ;
81
+ import { Specification , Workflow } from ' @serverless-workflow /sdk' ;
82
82
83
83
const source = ` id: helloworld
84
84
version: '1.0'
@@ -102,7 +102,7 @@ Where `source` can be in both JSON or YAML format.
102
102
Having the following workflow instance:
103
103
104
104
``` typescript
105
- import { workflowBuilder , injectstateBuilder , Specification } from ' @serverlessworkflow /sdk-typescript ' ;
105
+ import { workflowBuilder , injectstateBuilder , Specification } from ' @serverless-workflow /sdk' ;
106
106
107
107
const workflow: Specification .Workflow = workflowBuilder ()
108
108
.id (" helloworld" )
@@ -156,7 +156,7 @@ The sdk provides a way to validate if a workflow object is compliant with the se
156
156
- ` validate(): boolean `
157
157
158
158
``` typescript
159
- import {WorkflowValidator , Specification } from ' @serverlessworkflow /sdk-typescript ' ;
159
+ import {WorkflowValidator , Specification } from ' @serverless-workflow /sdk' ;
160
160
import {Workflow } from " ./workflow" ;
161
161
162
162
const workflow = {
@@ -188,7 +188,7 @@ You can also validate parts of a workflow using `validators`:
188
188
189
189
``` typescript
190
190
import { ValidateFunction } from ' ajv' ;
191
- import { validators , Specification } from ' @serverlessworkflow /sdk-typescript ' ;
191
+ import { validators , Specification } from ' @serverless-workflow /sdk' ;
192
192
193
193
const injectionState: Specification .Injectstate = workflow .states [0 ];
194
194
const injectionStateValidator: ValidateFunction <Specification .Injectstate > = validators .get (' Injectstate' );
0 commit comments