# @outerbounds/events

> Outerbounds Events Publisher

Latest version **0.1.4** (published 2023-10-18) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @outerbounds/events
pnpm add @outerbounds/events
yarn add @outerbounds/events
bun add @outerbounds/events
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2023-10-18 |
| First published | 2023-10-18 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 35.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Outerbounds |
| Maintainers | outerbounds |

## Links

- npm: https://www.npmjs.com/package/@outerbounds/events
- npm.io page: https://npm.io/package/@outerbounds/events

## Dependencies (3)

- [uuid](https://npm.io/package/uuid.md) ^9.0.1
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.7.0
- [@aws-sdk/client-secrets-manager](https://npm.io/package/@aws-sdk/client-secrets-manager.md) ^3.430.0

## Recent versions

- 0.1.4 (latest) — 2023-10-18
- 0.1.3 — 2023-10-18
- 0.1.1 — 2023-10-18

## README

# Typescript package to publish Events to Outerbounds platform

## Installation

`npm -i @outerbounds/events`

## Usage example

Assuming you have a Flow that is triggerd on event like this

```python
from metaflow import FlowSpec, step, current, trigger


@trigger(event='my_event')
class NodeSimpleTriggeredFlow(FlowSpec):
    @step
    def start(self):
        self.var_1 = ["h", "e", "l", "l"]

        self.next(self.b, foreach='var_1')

    @step
    def b(self):
        print("In B")
        self.next(self.join)

    @step
    def join(self, inputs):
        self.next(self.end)

    @step
    def end(self):
        print("In end")

if __name__ == "__main__":
    NodeSimpleTriggeredFlow()
```

You can trigger it using Typescript code below. This assumes you're using Service Principals for programmatic auth. You can get `configString` for the machine user from OBP UI.

```ts
import { ArgoEventTrigger } from "@outerbounds/events";

// Event name, must match what's in @trigger
let argoEvent = new ArgoEventTrigger("my_event");

// Make sure to initialize the library
await argoEvent.init({ configString: "awssm-arn:..." });

// Trigger the event
await argoEvent.trigger({ foo: "bar" });
```

---
_Source: https://npm.io/package/@outerbounds/events · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
