Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ npm install && npm run build && npm run test
For the latest stable version:

```sh
npm i @severlessworkflow/sdk-typescript
npm i @serverlessworkflow/sdk-typescript
```

#### Create Workflow using builder API

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

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

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

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

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

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

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

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

```typescript
import { ValidateFunction } from 'ajv';
import { validators, Specification } from '@severlessworkflow/sdk-typescript';
import { validators, Specification } from '@serverlessworkflow/sdk-typescript';

const injectionState: Specification.Injectstate = workflow.states[0];
const injectionStateValidator: ValidateFunction<Specification.Injectstate> = validators.get('Injectstate');
Expand Down
2 changes: 1 addition & 1 deletion examples/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
import { injectstateBuilder, Specification, workflowBuilder } from '../../dist';

const workflow: Specification.Workflow = workflowBuilder()
const workflow: Specification.IWorkflow = workflowBuilder()
.id('helloworld')
.version('1.0')
.name('Hello World Workflow')
Expand Down
Loading