open-index/open-npm huggingface dataset:
npm package: @skroz/admin-layout
Description: Layout for Admin Panel
Latest version: 1.0.33

# @skroz/admin-layout [![NPM version](https://img.shields.io/npm/v/@skroz/admin-layout)](https://yarnpkg.com/package/@skroz/admin-layout) [![BundlePhobia](https://img.shields.io/bundlephobia/minzip/@skroz/admin-layout)](https://bundlephobia.com/result?p=@skroz/admin-layout)

Layout for Admin Panel

## Usage

### Step 1. Install the package

Install the package using the following command:

```
yarn add @skroz/admin-layout
```

See the official documentation [Telegram Bot API](https://core.telegram.org/bots/api).
npm package: @skroz/telegram-api
Description: API methods for Telegram messenger and working with chatbots.
Latest version: 1.0.15

# @skroz/telegram-api [![NPM version](https://img.shields.io/npm/v/@skroz/telegram-api)](https://yarnpkg.com/package/@skroz/telegram-api) [![BundlePhobia](https://img.shields.io/bundlephobia/minzip/@skroz/telegram-api)](https://bundlephobia.com/result?p=@skroz/telegram-api)

API methods for Telegram messenger and working with chatbots.

## Usage

### Step 1. Install the package

Install the package using the following command:

```
yarn add @skroz/telegram-api
```

See the official documentation [Telegram Bot API](https://core.telegram.org/bots/api).
npm package: @skroz/telegram-bot
Description: ## Usage
Latest version: 1.1.14

# @skroz/telegram-bot [![NPM version](https://img.shields.io/npm/v/@skroz/telegram-bot)](https://yarnpkg.com/package/@skroz/telegram-bot) [![BundlePhobia](https://img.shields.io/bundlephobia/minzip/@skroz/telegram-bot)](https://bundlephobia.com/result?p=@skroz/telegram-bot)

## Usage

### Step 1. Install the package

Install the package using the following command:

```
yarn add @skroz/telegram-bot
```
npm package: @skroz/wata
Description: API methods for Wata.
Author: skroznikov
Latest version: 1.0.14

# @skroz/wata [![NPM version](https://img.shields.io/npm/v/@skroz/wata)](https://yarnpkg.com/package/@skroz/wata) [![BundlePhobia](https://img.shields.io/bundlephobia/minzip/@skroz/wata)](https://bundlephobia.com/result?p=@skroz/wata)

API methods for Wata.

## Usage

### Step 1. Install the package

Install the package using the following command:

```
yarn add @skroz/wata
```

See the official documentation [WATA API](https://wata.pro/api).
npm package: @skrumble/sails-elastic
Description: Elasticsearch adapter for Sails / Waterline
Author: Mauricio Bertanha
Latest version: 0.1.2

# waterline-elasticsearch

[![Join the chat at https://gitter.im/mie00/sails-elasticsearch](https://badges.gitter.im/mie00/sails-elasticsearch.svg)](https://gitter.im/mie00/sails-elasticsearch?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

### Installation

To install this adapter, run:

```sh
$ npm install sails-elastic
```


### Configuration

#### config/connections.js

```js
{
    adapter: 'sails-elastic',
    hosts: ['http://127.0.0.1:9200'],
    keepAlive: false,
    sniffOnStart: true,
    maxRetries: 10,
    deadTimeout: 40000,
    sniffOnConnectionFault: true,
    apiVersion: '5.5'
},
```
#### Models

##### Attributes

sails-elastic does not support `attributes` inside the model. It gets its attributes from another attribute in the model called `elasticSearch`. There you can tell elasticsearch how to create the index. You can find more information [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html).

```js
// person model
module.exports = {
    elasticSearch: {
        mappings: {
            person: {
                properties: {
                    name: {
                        type: "string",
                    },
                    adress: {
                        type: "string",
                        index: "not_analyzed"
                    },
                    age: {
                        type: "integer",
                    },
                }
            }
        }
    }
};
```

##### Multiple adapters

To use multiple adapters for the same model. you have to make elasticsearch the last one, and manually sync create, update, destroy between adapters

```js
module.exports = {
    connection: ['mongoConnection','elasticConnection'],
    elasticSearch: {/*...*/},
    attributes: {/*...*/},
    afterCreate: function (value, callback){
        this.createIndex(value, callback)
    },
    afterUpdate: function (value, callback){
        this.updateIndex(value.id, value, callback)
    },
    afterDestroy: function (value, callback){
        this.destroyIndex(value.id, callback)
    },
};
```

> Warning: for sails v11.0 and earlier, connection attribute used to be defined with an 's'.

### API

This adapter exposes the following methods (you can pass a callback function to them or use them as [bluebird](https://github.com/petkaantonov/bluebird) promises):

* `search(criteria, callback)`

* `createIndex(value, callback)` === `create(value, callback)`

* `updateIndex(id, value, callback)` === `update(id, value, callback)`

* `destroyIndex(id, callback)` === `destroy(id, callback)`

* `countIndex(criteria, callback)` === `count(criteria, callback)`

* `bulk(body, callback)`

* `client()`

+ **returns**
  + Elasticsearch client instance to call methods directly to elasticsearch API. You can find API reference [here](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html)

### TODO

Fully support Semantic and Queryable interfaces.
npm package: @skruv/liten
Description: A small dom abstraction
Author: Svante Richter
Latest version: 0.0.4

![skruv](./icon.svg)

# @skruv/liten

Small DOM abstraction with element reuse.

[Github](https://github.com/skruv/liten) • [NPM](https://www.npmjs.com/package/@skruv/liten)

Installation: `npm i @skruv/liten`

Exposes two exports:

- `r(virtualElement, currentElement = document.documentElement)`: The main render function
  - Takes in a `virtualElement` created by `e()` and patches `currentElement` (a HTMLElement) and it's children
  - `currentElement` defaults to the whole document
- `e`: A proxy object that returns `(attributes, ...children) => virtualElement` curried with the keyname. Creates constructors for elements.
  - `const {div, img} = e`
  - creates virtual elements for `r` or as children of other virtual elements
  - attributes is a plain object with HTML attributes
  - Children are either plain strings or elements created by `e`

This library is focused on size first, low-complexity second and performance third.

## Size

About 0.5kb when compressed:

```txt
467     index.min.js.br
553     index.min.js.zst
564     index.min.js.gz
1088    index.min.js
2074    index.js (without comments)
```

> [!TIP]
> For small apps it can be more efficient to inline the entire app in the html response to avoid a roundtrip and get better combined compression.

## Example

```js
import { r, e } from '@skruv/liten'
// Or `import { r, e } from 'https://unpkg.com/@skruv/liten/index.js'` if you don't want to install
const { html, body, div, h1, hr, 'my-custom-element': myCustomElement, button } = e

r(
  html({ lang: 'en' },
    body(false,
      div(false,
        h1(false, 'My custom element'),
        hr(),
        myCustomElement(),
        button(
          { onclick: () => { alert('Hello, small screw') } },
          'Greet'
        )
      )
    )
  )
)
```

## Etymology

"Liten skruv" means "small screw" in swedish. It is the smaller cousin of <https://github.com/skruv/skruv>.
npm package: @skrybe/sdk
Description: Official TypeScript/JavaScript SDK for Skrybe API
Author: Skrybe
Latest version: 1.0.1

# Skrybe TypeScript/JavaScript SDK

Official TypeScript/JavaScript SDK for the Skrybe API.

## Installation

```bash
npm install @skrybe/sdk
```

## Usage

### Initialize the SDK

```typescript
import { SkrybeSDK } from '@skrybe/sdk';

const skrybe = new SkrybeSDK({
  apiKey: 'your-api-key'
});
```

### Send an Email

```typescript
const response = await skrybe.sendEmail({
  fromName: 'John Doe',
  fromEmail: 'john@example.com',
  replyTo: 'support@example.com',
  subject: 'Welcome!',
  htmlText: '<html><body>Hello [recipient.first]!</body></html>',
  to: ['user@example.com'],
  recipientVariables: {
    'user@example.com': {
      first: 'John'
    }
  },
  trackOpens: 1,
  trackClicks: 1
});
```

### Create a Campaign

```typescript
const response = await skrybe.createCampaign({
  fromName: 'John Doe',
  fromEmail: 'john@example.com',
  replyTo: 'support@example.com',
  title: 'Monthly Newsletter',
  subject: 'Your Monthly Update',
  htmlText: '<html><body>Newsletter content here</body></html>',
  listIds: 'list-id-1,list-id-2',
  trackOpens: 1,
  trackClicks: 1,
  sendCampaign: 1
});
```

### Get Lists

```typescript
const lists = await skrybe.getLists();
// To include hidden lists
const allLists = await skrybe.getLists(true);
```

## API Reference

### SkrybeSDK Configuration

```typescript
interface SkrybeConfig {
  apiKey: string;
  baseURL?: string; // Defaults to https://dashboard.skry.be
}
```

### SendEmailOptions

```typescript
interface SendEmailOptions {
  fromName: string;
  fromEmail: string;
  replyTo: string;
  subject: string;
  htmlText: string;
  plainText?: string;
  to?: string[];
  recipientVariables?: Record<string, Record<string, any>>;
  listIds?: string[];
  queryString?: string;
  trackOpens?: 0 | 1 | 2;
  trackClicks?: 0 | 1 | 2;
  scheduleDateTime?: string;
  scheduleTimezone?: string;
}
```

### CreateCampaignOptions

```typescript
interface CreateCampaignOptions {
  fromName: string;
  fromEmail: string;
  replyTo: string;
  title: string;
  subject: string;
  htmlText: string;
  plainText?: string;
  listIds?: string;
  segmentIds?: string;
  excludeListIds?: string;
  excludeSegmentIds?: string;
  queryString?: string;
  trackOpens?: 0 | 1 | 2;
  trackClicks?: 0 | 1 | 2;
  sendCampaign?: 0 | 1;
  scheduleDateTime?: string;
  scheduleTimezone?: string;
}
```

## Error Handling

The SDK throws errors for invalid API keys, missing required parameters, and other API errors. Make sure to wrap your API calls in try-catch blocks:

```typescript
try {
  const response = await skrybe.sendEmail({
    // ... options
  });
} catch (error) {
  console.error('Error sending email:', error.message);
}
```

## License

MIT