open-index/open-npm huggingface dataset:
npm package: @finsel-dgi/pasby
Description: pasby™ API wrapper
Author: Finsel DGI Limited
Latest version: 0.0.9

## Node.js pasby™ library<a id="pasby-node.js-library"></a>
---
[![npm](https://img.shields.io/badge/npm-v0.0.3-blue)](https://www.npmjs.com/package/pasby-typescript-sdk/v/1.0.0)


The pasby™ node library provides convenient access to the pasby API from applications written in Typescript/Javascript. 

Our integrations supercharge your digital services and drastically improves your user experience flows.


## Requirements<a id="requirement"></a>
---

Node 10 or higher.


## Installation<a id="installation"></a>

<table>
<tr>
<th width="292px"><code>npm</code></th>
<th width="293px"><code>pnpm</code></th>
<th width="292px"><code>yarn</code></th>
</tr>
<tr>
<td>

```bash
npm i @finsel-dgi/pasby
```

</td>
<td>

```bash
pnpm i @finsel-dgi/pasby
```

</td>
<td>

```bash
yarn add @finsel-dgi/pasby
```

</td>
</tr>
</table>

---
## Usage<a id="usage"></a>
---

The package needs to be configured with your account's secret key, which is retrievable from the developer [Console](https://console.pasby.africa). Provide it with your organisations api key.


```typescript
import { Pasby } from "@finsel-dgi/pasby";

const pasby = new Pasby({
  apikeyAuth: 'bk-test_',
  appSecretKey: 'snb_',
  basePath: "https://s.pasby.africa"
});

await pasby.flows.ping('req_')
.then((value) => {
  console.log(`${JSON.stringify(value)}`);
});

```

or using production access:


```typescript
import { Pasby } from "@finsel-dgi/pasby";

const pasby = new Pasby({
  apikeyAuth: 'bk-live_',
  appSecretKey: 'prd_',
  basePath: "https://l.pasby.africa"
});

await pasby.flows.ping('req_')
.then((value) => {
  console.log(`${JSON.stringify(value)}`);
});

```

## Documentation<a id="documentation"></a>
---
See our [REST API docs](https://docs.pasby.africa)

See integrations [guide documentation](https://dev.pasby.africa) covering how to use the library and pasby in general.

Start integrating today at no costs and only begin to pay once you cross 100 requests monthly. We look forward to see what you build with on pasby™. 

Learn how to integrate pasby™ through this [demo application](https://demo.pasby.africa) with open source code.

## Document Operations<a id="document-operations"></a>
---

### Document Signature Refresh

Refresh document signatures using the flow identifier:

```typescript
// Refresh document signatures
const refreshResult = await pasby.docs.docSignatureRefresh({ 
  flow: 'your_flow_identifier_here' 
});

console.log('Document refreshed:', refreshResult.data.doc.id);
console.log('Status:', refreshResult.status);
console.log('Reason:', refreshResult.reason);
```

The response includes comprehensive document information including signees, signatures, file details, and status logs.
npm package: @finsimco/strapi-plugin-placeholder
Description: Generate base64 placeholders for Strapi images
Author: @WalkingPizza
Latest version: 4.4.2

# Strapi Placeholder Generator

Generate base64 placeholders for [Strapi](https://strapi.io/) images.

## 🖌️ Supported Content
The Placeholder plugin currently supports the following formats:
- JPEG
- PNG
- GIF
- TIFF
- SVG

## ✨ Supported Strapi Versions

The Placeholder plugin is only compatible with Strapi v4.

## ⚙️ Installation

```bash
# if you use NPM
npm install strapi-plugin-placeholder

# if you use Yarn
yarn add strapi-plugin-placeholder
```

## 🔧 Configuration

### Enable The Plugin

Open or create the file `config/plugins.js` and enable the plugin by adding the following snippet:

```js
module.exports = {
  // ...
  placeholder: {
    enabled: true,
    config: {
      size: 10,
    },
  },
};
```

For more information regarding the `size` param, refer to the [Plaiceholder docs](https://plaiceholder.co/).

### Generate Placeholders For Existing Images

Create the file `database/migrations/generate-placeholders-for-existing-images.js` with the following content:

```js
'use strict';

const FILES_TABLE = 'files';
const BATCH_SIZE = 1000;

async function up(trx) {
  let lastId = 0;

  while (true) {
    const files = await trx
      .select(['id', 'url'])
      .from(FILES_TABLE)
      .whereNot('url', null)
      .andWhereLike('mime', 'image/%')
      .andWhere('placeholder', null)
      .andWhere('id', '>', lastId)
      .orderBy('id', 'asc')
      .limit(BATCH_SIZE);

    for (const file of files) {
      const placeholder = await strapi
        .plugin('placeholder')
        .service('placeholder')
        .generate(file.url);

      if (placeholder)
        await trx.update('placeholder', placeholder).from(FILES_TABLE).where('id', file.id);
    }

    if (files.length < BATCH_SIZE) {
      break;
    }

    lastId = files[files.length - 1].id;
  }
}

async function down() {}

module.exports = { up, down };
```