open-index/open-npm huggingface dataset:
npm package: @spheretech/crm-public
Description: Лёгкий клиент для публичного API CRM (Flask) — для React/Gatsby/Next и т.д.
Latest version: 0.1.3

## CRM Public API Client (React/Gatsby/Next)

Лёгкий изоморфный клиент для публичного API CRM. Подходит для браузера и SSR (Gatsby/Next). Под капотом использует `fetch` и нативный `EventSource` для SSE.

### Установка

```bash
yarn add @sphere/crm-public
# или
npm i @sphere/crm-public
```

Если ваш рантайм не предоставляет `fetch`/`EventSource` (некоторые SSR-сценарии), установите полифиллы:

```bash
yarn add cross-fetch eventsource
```

и передайте их в клиент через опции.

### Быстрый старт

```ts
import { PublicApiClient } from '@sphere/crm-public'

const api = new PublicApiClient({
  baseUrl: 'https://your-api.example.com',
  publicKey: 'ORG_PUBLIC_KEY',
})

// Получить страницу CMS
const page = await api.cms.getPage('about')

// Поиск документов
const products = await api.products.list({ q: 'iphone', min_price: 500 })

// Создать лида
await api.leads.create({ name: 'Иван', email: 'ivan@example.com' })

// Подключиться к SSE (публичный поток)
const es = api.sse.connect()
es.onmessage = (e) => console.log('event', e.data)
```

### API

- `new PublicApiClient({ baseUrl, publicKey, fetchImpl?, eventSourceImpl? })`
  - **baseUrl**: базовый URL API (без завершающего `/`)
  - **publicKey**: публичный ключ организации
  - **fetchImpl**: опционально, реализация `fetch` (например, из `cross-fetch`)
  - **eventSourceImpl**: опционально, класс `EventSource` (например, из `eventsource` для Node)

#### Storage
- `storage.getFileUrl(key, opts?)` → `{ url: string }`

#### Documents
- `documents.search(collection, params)` → `any[]`

#### CMS
- `cms.getPage(slug, { preview? })` → `CmsPage`
- `cms.listPages({ page?, per_page?, q?, preview? })` → `{ data, page, pages, per_page, total }`
- `cms.getPost(slug, { preview? })` → `CmsPost`
- `cms.listPosts({ page?, per_page?, tag? })` → `{ data, page, pages, per_page, total }`

#### Leads
- `leads.create(payload)` → созданный лид

#### Products
- `products.list(params)` → `any[]`

#### Categories
- `categories.list({ page?, per_page?, parent_id? })` → `{ data, page, pages, per_page, total }`

#### SSE
- `sse.connect()` → `EventSource`
  - Поддерживается публичный доступ через `public_key` (JWT-режим в браузере без полифилла не поддерживается, так как нужны кастомные заголовки).

### Примечания
- Минимальная версия Node: 18 (в браузере — любой современный)
- Для SSR при отсутствии `fetch`/`EventSource` используйте полифиллы и передавайте их в конструктор
npm package: @sphericalelephant/express-api-version
Description: A simple API versioning middleware for express.
Author: Patrick Sturm
Latest version: 0.1.1

# express-api-version

[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Build Status](https://travis-ci.com/SphericalElephant/express-api-version.svg?branch=master)](https://travis-ci.com/SphericalElephant/express-api-version)
[![Coverage Status](https://coveralls.io/repos/github/SphericalElephant/express-api-version/badge.svg?branch=master)](https://coveralls.io/github/SphericalElephant/express-api-version?branch=master)

A simple API versioning middleware for express.

## Usage

```javascript
const {VersionManager, MiddlewareFactory} = require('@sphericalelephant/express-api-version');
const express = require('express');
const app = express();
const bodyParser = require('body-parser');

const middlewareFactory = new MiddleWarefactory({
  // required: your custom vendor extension, resulting Content-Type application/vnd.api-test-vendor-1.0.0+json
  vndExtension: 'test-vendor',
  // required: a list of valid API versions
  supportedVersions: ['1.0.0', '1.1.1', '2.0.0', '2.2.2'],
  // optional: is used to attach the maximum satifying version to the req object, if not set '__api_version' is used
  attachVersionKey: 'customKey'
});

app.use(bodyParser.json({type: middlewareFactory.getVndExtensions()}));
app.get('/', (req, res, next) => {
  if (!req['customKey']) {
    return res.status(400).send();
  }
  // do something with the version key here
});
```

[npm-image]: https://img.shields.io/npm/v/@sphericalelephant/express-api-version.svg
[npm-url]: https://npmjs.org/package/@sphericalelephant/express-api-version
[downloads-image]: https://img.shields.io/npm/dm/@sphericalelephant/express-api-version.svg
[downloads-url]: https://npmjs.org/package/@sphericalelephant/express-api-version
npm package: @sphericalelephant/express-package-version
Description: A simple route handler that displays the version of the package that is running the web appication server.
Author: Patrick Sturm
Latest version: 0.1.0
Deprecated: This package is unmaintained

# express-package-version

```javascript
'use strict';

const express = require('express');
const version = require('@sphericalelephant/express-package-version');

const app = express();

app.get('/version', version);
```
npm package: @sphericalelephant/senodeconf
Description: A simple nconf wrapper that supports multiple stages (environments via NODE_ENV) and provides sane configuration file lookups on *nix systems.
Author: Patrick Sturm
Latest version: 1.3.1

# senodeconfig
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Build Status](https://travis-ci.com/SphericalElephant/senodeconf.svg?branch=master)](https://travis-ci.com/SphericalElephant/senodeconf)
[![Coverage Status](https://coveralls.io/repos/github/SphericalElephant/senodeconf/badge.svg?branch=master)](https://coveralls.io/github/SphericalElephant/senodeconf?branch=master)

## About

A simple nconf wrapper that supports multiple stages (environments via NODE_ENV) and provides sane configuration file lookups on *nix systems.

## Installation

```$ npm install @sphericalelephant/senodeconf```

## Getting Started

### Basic Usage

*lib/config.js*

*NODE_ENV=development*
```javascript
// lib/myconfig.js
module.exports = require('senodeconfig')('my-app');

// other file
const config = require('lib/myconfig');
config.get('my:setting'); // can be used like nconf
```

merges the following configurations in the following order:

* ./development.conf.json
* ~/.my-app/development.conf.json
* /etc/my-app/development.conf.json

The settings within the global config in /etc/ are overridden by the user specific configuration in ~, which are in turn overridden by any settings made in the local config file placed in the current working directory.

### Supported Options

*lib/config.js*
```javascript
module.exports = require('senodeconfig')('my-app', {
  // array of allowed environments (NODE_ENv), defaults to  ['production', 'staging', 'development', 'local', 'test'];
  allowedEnv: [],
  // sets the default environment that is used when NODE_ENV has not been specified, defaults to 'development'
  // careful: defaultEnv must be an allowedEnv
  defaultEnv: 'environment',
  // allows adjusting the config file name, %%STAGE%% must be used exacly once, as it is substituted
  configFileNameTemplate: '%%STAGE%%_custom_config_name.json',
  // allows setting a custom env variable separator, default is "_"
  envSeparator: '__'
});
```

## License
[MIT](LICENSE)

[npm-image]: https://img.shields.io/npm/v/@sphericalelephant/senodeconf.svg
[npm-url]: https://npmjs.org/package/@sphericalelephant/senodeconf
[downloads-image]: https://img.shields.io/npm/dm/@sphericalelephant/senodeconf.svg
[downloads-url]: https://npmjs.org/package/@sphericalelephant/senodeconf
npm package: @sphericcube/draggable
Description: Make HTMLElement draggable. With snapping
Author: Yevhen Dovhoborets
Latest version: 0.3.4

# Draggable

Make HTMLElement draggable. With snapping

## How to use
Can be called without options
```javascript
const someHTMLElement = document.getElementById('someHTMLElement');

draggable(someHTMLElement)
```

... or with options provided
```javascript
const someHTMLElement = document.getElementById('someHTMLElement'),
      draggableOptions = {
        shadowRadius: 10,
        borderRadius: 10,
        snapRadius: 100
      };

draggable(someHTMLElement,draggableOptions)
```
## Draggable options
### Shadow radius
```javascript
draggable(someHTMLElement,{
  ...
  shadowRadius: 10 // Radius of box-shadow attribute applied to element when it is in detached state
  ...
})
```
applied css looks like this
```css
{
  box-shadow: 0 0 [shadowRadius]px;
}
```
### Border radius
```javascript
draggable(someHTMLElement,{
  ...
  borderRadius: 10 // Border radius attribute applied to element when it is in detached state
  ...
})
```
applied css looks like this
```css
{
  border-radius: [borderRadius]px [borderRadius]px [borderRadius]px [borderRadius]px;
}
```
### Snap distance
```javascript
draggable(someHTMLElement,{
  ...
  snapDistance: 10 // Border radius attribute applied to element when it is in detached state
  ...
})
```
When dragged element is close to window borders or to original position it will be snapped

**If snapDistance is equal to any false value snapping will be disabled**
npm package: @spherity/did-extension-ethr
Description: This Veramo plugin extends the functionality of `did-provider-ethr` by exposing a new method `ethrChangeControllerKey` which allows the owner of a `did:ethr` to change its owner and therefor its controller. Meta transactions are support as well by providi
Latest version: 2.1.3

# Veramo Extension Plugin for did:ethr

This Veramo plugin extends the functionality of `did-provider-ethr` by exposing a new method `ethrChangeControllerKey`
which allows the owner of a `did:ethr` to change its owner and therefor its controller. Meta transactions are support as
well by providing a `metaIdentifierKeyId` in the options.

## Quick start

* Clone this repo
* `npm ci`
* `npm run build`
* `npm run generate-plugin-schema`
* `npm run start` or VSCode Debugger (CMD + Shift + D) > Run `OpenAPI server`

## Usage

```typescript
agent = createAgent<IEthrDidExtension & ...>({
  plugins: [
    ...
    new EthrDidExtension({
      store: new DIDStore(dbConnection),
      defaultKms: 'local',
      networks: [
        {
          chainId: 5,
          name: 'goerli',
          provider: new JsonRpcProvider('http://localhost:8545'),
        },
      ],
    }),
    ...
  ],
})

...

const alice = await agent.didManagerImport({...});
const bob = await agent.didManagerImport({...});
const txHash = await agent.ethrChangeControllerKey({ did: alice.did, kid: bob.controllerKeyId! })
```