Skip to content
This repository has been archived by the owner on Nov 14, 2019. It is now read-only.

Commit

Permalink
improve docs for changelog, readme and application pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgooz committed Oct 17, 2018
1 parent c56f339 commit 6f4794b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- Possibility to set specific tag executions
- Add more precise client side filter and add executionTags filter
- Possibility to associate tags for executions.
- Update client side filter to be more precise and support executionTags filter.

## v1.3.0

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@ The previous functions expect the following object definitions:
| `taskKey` | `String` | `*` | Only listen for this task's key. Leave empty or set `*` to listen for any task's result from this service |
| `outputKey` | `String` | `*` | Only listen for the output key. If set, `taskKey` is required. Leave it empty or set `*` to listen for any task's output from this service |
| `tagFilters` | `String[]` | `[]` | List of tags required to process this result. All inclusive filter |
| `filter` | `func(resultKey: string, resultData: Object, taskKey?: string, tags?: string[]) => boolean` | `() => true` | Function to filter based on the output key and/or output data of the result |
| `filter` | `func(outputKey: string, outputData: Object, taskKey?: string, tags?: string[]) => boolean` | `() => true` | Function to filter based on the output key, output data, task key and tags of the task result |

### `task`

| Key | Type | Default | Description |
| --- | --- | --- | --- |
| `serviceID` | `String` | **REQUIRED** | The task's service ID |
| `taskKey` | `String` | **REQUIRED** | The task key to execute |
| `tags` | `String[]` or `(eventKey: string, eventData: Object) => string[]` or `(outputKey: string, outputData: Object, taskKey: string, tags: string[]) => string[]` | `[]` | List of tags to send for the execution. These tags can be static, generated based on an event or a result |
| `inputs` | `Object` or `(eventKey: string, eventData: Object) => Object` or `(outputKey: string, outputData: Object, taskKey: string, tags: string[]) => Object` | `{}` | Input to pass on to the task that can be plain object or generated object based on the event or result |
| `tags` | `String[]` or `(eventKey: string, eventData: Object) => string[]` or `(outputKey: string, outputData: Object, taskKey: string, tags: string[]) => string[]` | `[]` | List of tags to associate with the execution. These tags can be statically set or can be generated based on event or result |
| `inputs` | `Object` or `(eventKey: string, eventData: Object) => Object` or `(outputKey: string, outputData: Object, taskKey: string, tags: string[]) => Object` | `{}` | Input data to pass as task inputs. Inputs can be statically set or can be generated based on event or result |

## Example

Expand Down
8 changes: 4 additions & 4 deletions src/application/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ type Task = {
taskKey: string

// tags is a list of tags associated to an execution
// tags can be either a list of static strings or a function that returns the list of strings
// functions are depending of your incoming data
// events: The function will have the eventKey and the eventData
// results: The function will have the outputKey, the outputData, the taskKey and the list of tags for this execution
// tags can be either a list of static strings or a function that returns a list of strings
// function parameters depends the received event type which can be an event or a result.
// for events: the function will have eventKey and eventData.
// for results: the function will have outputKey, outputData, taskKey and the list of tags associated with execution.
tags?: string[] |
((eventKey: string, eventData: Object) => string[]) |
((outputKey: string, outputData: Object, taskKey: string, tags: string[]) => string[])
Expand Down

0 comments on commit 6f4794b

Please sign in to comment.