open-index/open-npm huggingface dataset:
npm package: @sebammon/scripts
Description: A CLI bin to execute scripts in one place.
Author: Sebastian Ammon
Latest version: 1.0.0

# Scripts

A CLI bin to execute scripts in one place.

## Getting started

Run `npm install -g scripts` to install the CLI package.

## Usage

Create a file called `scripts.json` in your project and add your scripts there.

For example:

```json
{
  "command-1": "node --version",
  "command-2": "..."
}
```

In your terminal execute:

```shell
$ run command-1
```
npm package: @sebaran/widget
Description: React widget for Sebaran WhatsApp integration — connect instances, view QR codes, and browse message history
Author: Sebaran
Latest version: 1.0.0

# @sebaran/widget

React widget for [Sebaran](https://cloud.sebaran.co) — embed WhatsApp instance connection and message history into your app.

## Install

```bash
npm install @sebaran/widget
# or
pnpm add @sebaran/widget
# or
yarn add @sebaran/widget
```

## Quick Start

```tsx
import { WhatsAppWidget } from "@sebaran/widget";
import "@sebaran/widget/styles.css";

function App() {
  return (
    <div style={{ maxWidth: 640, margin: "0 auto" }}>
      <WhatsAppWidget
        instanceId="your-instance-id"
        apiKey="your-api-key"
      />
    </div>
  );
}
```

That's it. The widget handles:
- Displaying a QR code when the WhatsApp session is not connected
- Auto-connecting when the instance status is `pending`
- Showing message history once connected

## Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `instanceId` | `string` | **required** | Your Sebaran instance ID |
| `apiKey` | `string` | **required** | API key for authentication |


## What's Included

- **QR Code View** — scan with WhatsApp to connect your instance
- **Instance Info** — shows connected phone number, name, and status
- **Message History** — paginated table with source, type, recipient, status, and timestamps
- **Message Detail** — click any message to see it rendered as a WhatsApp-style chat bubble
- **Error Details** — click a failed status to view the error reason

## Styles

Import the CSS file once in your app entry point:

```tsx
import "@sebaran/widget/styles.css";
```

The widget uses Tailwind CSS classes. If your project already uses Tailwind, the widget styles will blend in automatically. If not, the bundled CSS includes all necessary styles.


## Types

```typescript
interface Instance {
  id: string;
  label: string;
  phone_number: string | null;
  wa_name: string | null;
  status: "pending" | "connected" | "disconnected" | "logged_out";
}
```

## License

MIT
npm package: @sebarin/cli
Description: sebarin-cli CLI
Latest version: 0.3.3

# sebarin-cli CLI

A CLI for sebarin-cli.

## Customizing your CLI

Check out the documentation at https://github.com/infinitered/gluegun/tree/master/docs.

## Publishing to NPM

To package your CLI up for NPM, do this:

```shell
$ npm login
$ npm whoami
$ npm test

$ npm run build

$ npm publish
```

# License

MIT - see LICENSE
npm package: @sebaseg/br-firebase-crud
Description: CRUD to get collections, documents by id, create and update data in firestore
Author: Sebasgovia
Latest version: 1.3.9

# BR FIREBASE CRUD NestJS Library

Nest Library CRUD to get collections, documents by id, create and update data in firestore.

## Instructions

### Install

`npm i @sebaseg/br-firebase-crud`

### Use library

#### Added support for use with GCP secret manager ☺ 

... STEP 1 . You need to set the required firebase credentials in your .env or secret manager

... STEP 2. import BrFirebaseCrudModule in your module:


If you do not set names in root they will be taken as default:

```typescript
import { Module } from '@nestjs/common';
import { YourService } from './your-service.service';
import { YourController } from './your-controller.controller';
import { BrFirebaseCrudModule } from '@sebaseg/br-firebase-crud';

@Module({
  imports: [BrFirebaseCrudModule.forRoot({})],
  controllers: [YourController],
  providers: [YourService],
})
export class YourModuleModule {}
```

If you use secretManager, you need to define the name. The default is ''

```typescript
import { Module } from '@nestjs/common';
import { YourService } from './your-service.service';
import { YourController } from './your-controller.controller';
import { BrFirebaseCrudModule } from '@sebaseg/br-firebase-crud';

@Module({
  imports: [
    BrFirebaseCrudModule.forRoot({ secretName: 'MY_SECRET_MANAGER_ENV_NAME' }),
  ],
  controllers: [YourController],
  providers: [YourService],
})
export class YourModuleModule {}
```

If you use .env you can define a name. The default name is FIREBASE_CREDENTIALS

```typescript
import { Module } from '@nestjs/common';
import { YourService } from './your-service.service';
import { YourController } from './your-controller.controller';
import { BrFirebaseCrudModule } from '@sebaseg/br-firebase-crud';

@Module({
  imports: [
    BrFirebaseCrudModule.forRoot({
      firebaseEnvCredName: 'YOUR_FIREBASE_ENV_NAME',
    }),
  ],
  controllers: [YourController],
  providers: [YourService],
})
export class YourModuleModule {}
```
npm package: @sebaseg/br-gcp-storage-crud
Description: CRUD to get, download, save or update a document in gcp storage easily with nest.js
Author: Sebasgovia
Latest version: 1.3.2

# BR GCP STORAGE CRUD NestJS Library

Nest.js library CRUD to get, download, save or update a document in gcp storage easily.

## Instructions

### Install

`npm i @sebaseg/br-gcp-storage-crud`

### Use library

... STEP 1.  You need to set the required storage credentials in your .env or secret managercredentials.

... STEP 2. import BrGcpStorageCrudModule in your module:

If you do not set names in root they will be taken as default:

```typescript
import { Module } from '@nestjs/common';
import { YourService } from './your-service.service';
import { YourController } from './your-controller.controller';
import { BrGcpStorageCrudModule } from '@sebaseg/br-gcp-storage-crud';

@Module({
  imports: [BrGcpStorageCrudModule.forRoot({})],
  controllers: [YourController],
  providers: [YourService],
})
export class YourModuleModule {}
```

If you use secretManager, you need to define the name. The default is ''

```typescript
import { Module } from '@nestjs/common';
import { YourService } from './your-service.service';
import { YourController } from './your-controller.controller';
import { BrGcpStorageCrudModule } from '@sebaseg/br-gcp-storage-crud';

@Module({
  imports: [
    BrGcpStorageCrudModule.forRoot({ secretName: 'MY_SECRET_MANAGER_ENV_NAME' }),
  ],
  controllers: [YourController],
  providers: [YourService],
})
export class YourModuleModule {}
```

If you use .env you can define a name. The default name is STORAGE_CREDENTIALS

```typescript
import { Module } from '@nestjs/common';
import { YourService } from './your-service.service';
import { YourController } from './your-controller.controller';
import { BrGcpStorageCrudModule } from '@sebaseg/br-gcp-storage-crud';

@Module({
  imports: [
    BrGcpStorageCrudModule.forRoot({
      storageEnvCredName: 'YOUR_STORAGE_ENV_NAME',
    }),
  ],
  controllers: [YourController],
  providers: [YourService],
})
export class YourModuleModule {}
```
npm package: @sebaseg/saga-builder-nestjs
Description: Library to apply orchestrator saga pattern with steps and compensations
Author: Sebasgovia
Latest version: 1.0.2

# Saga Orchestrator pattern for NestJS Library

Nest.js Library to apply orchestrator saga pattern with steps and compensations

## Instructions

### Install

`npm i @sebaseg/saga-builder-nestjs`

### Use library

Import the **SagaBuilderNestjsModule** in your module service or app where you need to implement the pattern.

Before inject **SagaBuilderNestjsService** in the constructor:

```typescript
constructor(private sagaBuilderSrvc: SagaBuilderNestjsService){}
```

### Example usage:

```typescript
import { Injectable } from '@nestjs/common';
import { SagaStep, SagaCompensation } from 'src/saga/interfaces';
import { SagaBuilderNestjsService } from '@sebaseg/saga-builder-nestjs/saga-builder-nestjs.service';

export interface Iuser {
name: string;
}

@Injectable()
export class ConsumeSagaService {
constructor(private sagaBuilderSrvc: SagaBuilderNestjsService) {}

responseFunc1: Iuser;

async startSaga(data: any) {
try {

      const steps = [
        {
          step: this.func1(),
          compensation: this.compensationForFunc1(),
        },
        {
          step: this.func2(),
          compensation: this.compensationForFunc2(),
        },
        {
          step: this.func3(),
        },
      ];

      await this.sagaService.run(data, steps);
    } catch (error) {
      console.error('[startSaga] error: ', error);
      throw error;
    }

}

// Your functions

func1(): SagaStep {
console.log('func1 configured');
return {
action: async (data: any) => {
console.log('Executing func1', data);
// Logic here...
const dataFunc1 = { name: 'john doe' };
this.responseFunc1 = dataFunc1;
},
};
}

compensationForFunc1(): SagaCompensation {
console.log('compensation for func1 configured');
return {
compensation: async (data: any) => {
console.log('Executing compensation for step 1', data);
// Logic compensation here
},
};
}

func2(): SagaStep {
console.log('func2 configured');
return {
action: async (data: any) => {
console.log('Executing func2', data);
console.log('data de func1: ', this.responseFunc1);
// Your logic here...
//throw new Error('error ejecutando error func2');
},
};
}

compensationForFunc2(): SagaCompensation {
console.log('compensation for func2 configured');
return {
compensation: async (data: any) => {
console.log('Executing compensation for func2, data);
// Your compensation logic here...
},
};
}

func3(): SagaStep {
console.log('func3 configured');
return {
action: async (data: any) => {
console.log('Executing func3', data);
// Your logic here...
},
};
}
}
```