open-index/open-npm huggingface dataset:
npm package: @opuscapita/field-validators
Description: Common library for master data field validations such as VAT ID, IBAN, etc.
Author: Lekealem Asong
Latest version: 1.1.0

## field-validators
Common library for master data field validations such as VAT ID, IBAN, etc.

The library has the following validators:

- International Bank Account Number (IBAN)
- Bank Identifier Code (BIC)
- Value Added Tax number (VAT)
- Data Universal Numbering System number (DUNS)
- Global Location Number (GLN)
- Finnish Party Identification number (OVT-number) (OVT)
- Company register number (REGNO)
- ISR party number under Swiss IBAN (ISR)
- ABA routing transit number (ABA)
- Tax Identification Number
- LeitwegID Number

To have a look at the full API, please visit the related [wiki page](https://github.com/OpusCapita/field-validators/wiki).

---

### Setup

Install library by running:
```
npm install @opuscapita/field-validators
```
Perform a validation by doing:
```JS
const validators = require('@opuscapita/field-validators');

// validate an IBAN
validators.IBAN.isValid('DE10000000000000000000');

// validate a VAT number
validators.VAT.isValid('DE 10000000');

// validate a BIC
validators.BIC.isValid('DEDSLTJXXXX');

// validate a DUNS number
validators.DUNS.isValid('356932675');

// validate a GLN
validators.GLN.isValid('3569326752346');

// validate an OVT
validators.OVT.isValid('003708599126');

// validate a REGNO
validators.REGNO.isValid('Jena GnR 100008', 'DE');

// validate an ISR
validators.ISR.isValid('54-354567-8');

// validate an ABA
validators.ABA.isValid('051000017');

// validate an LeitwegID
validators.LEITWEGID.isValid('04011000-1234512345-06');
npm package: @opuscapita/fsm-task-manager
Description: Task manager for FSM workflow
Author: Daniel Zhitomirsky
Latest version: 0.0.1-beta.4

## Intro
FSM Task(Work) manager is an extension to finite state machine. It manages
existing tasks (stateful full objects, e.g. invoice) within the lifecycle
specified in finite state machine (definition.

## Usage
### Machine(workflow) definition

Example cound be found [here](../core#example)

### Task(process) Manager
```
context machine = new Machine({
  machineDefinition: new MachineDefinition({schema,actions,conditions}),
  context
});

const taskManager = new TaskManager({
  machine: machine,
  search: search,
  update: update
});

//function that return promise that is resolved with task list
function search(searchParams) {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve([{status: ''}, {status: ''}]);
    }, 500)
  })
};

//function that return promise that is resolved after object saving
function update(object) {
 return new Promise((resolve, reject) => {
  //some hard-working persistent saving code
  resolve();
 })
};
```

## Starting the process
After configuration there is only one thing is left behind - to start task list monitoring.
```
taskManager.run({ timeout: 1000 });
```

_timeout_ argument indicates the frequency of calling _search_ action and checking for
available automatic event / sending events (in case found auto-transitions);

## Stopping the process
If the time has come to kill the process, you have to do the next:
```
taskManager.stop();
```
This method return true/false in case of correct/incorrect process finish, correspondingly.

## Getting ongoing/stopped process statistic
Sometime you may need to get the process statistic (currently available values are: machine name,
start & end timestamps)

```
taskManager.processCache
```

This field is an object with next signature:
{<timer_descriptor> : {
  <name>,
  <started>,
  <finished>
}}

TBD: increase process cache notation usability
TBD: add 1 by 1 event sending queue

## Sending event to object with TaskManager
You might need an ability to send event to an object with further saving.
If you configured TaskManager properly and it knows how to save objects, next two code snippets do the same:
```
//passed as constructor arg to TaskManager
const update = (object) => {
  <some async object update code>
  return Promise
};
machine.sendEvent({object, event, request}).then(({object}) => {
  return update(object);
})

----equals---

taskManager.sendEvent({object, event, request})
```

## Starting workflow with TaskManager
Also you might want to start the workflow with further object saving.
If you configured TaskManager properly and it knows how to save objects, next to code snippets do the same:
```
//passed as constructor arg to TaskManager
const update = (object) => {
  <some async object update code>
  return Promise
};
machine.start({object}).then(({object}) => {
  return update(object);
})

----equals---

taskManager.start({object})
```
npm package: @opuscapita/fsm-workflow-editor
Description: Fsm workflow crud editor
Author: Egor Stambakio
Latest version: 3.0.1

# Usage

[Editor demo (showroom)](https://opuscapita.github.io/fsm-workflow/branches/master/editor/?currentComponentName=WorkflowEditor&maxContainerWidth=100%25) - see example schema in props

[Actions & conditions paramsSchema definition and usage](https://github.com/OpusCapita/fsm-workflow/blob/master/packages/editor/src/components/Actions/Readme.md)

## i18n

UI labels for `states`, `conditions`, `actions` and `params` can be translated.

To add translations `register` an object of the following structure within [i18nManager](https://github.com/OpusCapita/i18n) in context of your app:

```
de: { // locale
    fsmWorkflowEditor: {
      actions: { // here you define translations for actions
        testAction: { // action name like in workflow.actions
          label: 'Test Action', // this text is a UI label for this action
          params: {
            nickname: { // param name in this action's schema
              label: 'Nickname' // UI label for this param
            },
            fullName: {
              label: 'Full Name'
            }
          }
        },
        sendMail: {
          label: 'Send Email',
          params: {
            fromAddress: {
              label: "Sender' address"
            }
          }
        },
        ...
      },
      conditions: { // like in workflow.conditions
        userHasRoles: {
          label: 'User Has Roles',
          params: {
            restrictedRoles: {
              label: 'Only these roles are allowed'
            }
          }
        },
        ...
      },
      states: {
        approved: {
          label: 'Approved'
        },
        inspectionRequired: {
          label: "Inspection Required"
        },
        ...
      }
    }
  },
fi: {
  ...same structure
}
```

Plain objects are also ok:

```
de: {
  'fsmWorkflowEditor.states.approved.label': 'Approved',
  'fsmWorkflowEditor.actions.testAction.label': 'Test action',
  'fsmWorkflowEditor.actions.testAction.params.nickname.label': 'Nickname',
  ...
}
```
npm package: @opuscapita/fsm-workflow-transition-history
Description: Business-object history for FSM workflow
Latest version: 0.0.4

# Workflow Transition History

![badge-npm-version](https://img.shields.io/npm/v/@opuscapita/fsm-workflow-transition-history.svg)
![NPM Downloads](https://img.shields.io/npm/dm/@opuscapita/fsm-workflow-transition-history.svg)

Workflow Transition History is an extension to FSM Core.  It provies server-side API for storing and extracting Business Object lifecycle history.

## Installation

Install package

```
npm install --save @opuscapita/fsm-workflow-transition-history
```

## Basic Usage

```javascript
const Sequelize = require('sequelize');
const workflowTransitionHistory = require('@opuscapita/fsm-workflow-transition-history');
const dbConfig = require('./config/db.js');

const sequelize = new Sequelize(dbConfig);

workflowTransitionHistory.runMigrations(sequelize).
  then(_ => workflowTransitionHistory.createModel(sequelize)).
  then(handlers => {
    const { add, search } = handlers;

    add({
      from: 'from-state',
      to: 'to-state',
      event: 'transition-event',
      businessObjType: 'invoice',
      businessObjId: 'ew153-7210',
      user: 'user-id-46270e',
      description: 'Optional business object transition description text'
    }).
      then(obj => console.log('The following obj has been added to history:', obj)).
      catch(err => console.error('Error adding obj to histofy:', err));

    search({

      // Optional.
      // Its format is the same as "where" in sequelize.model().findAll
      where: {
        from: 'from-state',
        to: 'to-state'
      },

      // Optional.
      // Its format is the same as "order" in sequelize.model().findAll
      order: [["createdOn","ASC"]]

    }).
      then(objList => console.log(objList.map(obj => JSON.stringify({
        id: obj.id,
        from: obj.from,
        to: obj.to,
        event: obj.event,
        businessObjType: obj.businessObjType,
        businessObjId: obj.businessObjId,
        user: obj.user,
        description: obj.description,
        createdOn: obj.createdOn
      })))).
      catch(err => console.error('Error extracting objects from history:', err));
  });
```
See [Express Server Demo](demo/server.js) for an example of using Workflow Transition History.
npm package: @opuscapita/git-label-cli
Description: Create and remove labels across GitHub repositories
Latest version: 0.0.9

# git-label-cli

Create and remove labels across GitHub repositories

## Installation

`npm install -g git-label-cli`

## Examples:

`git-label opuscapita/git-label-cli`

`git-label --repositories-json`

**repositories.json** example:

```js
[
  "github_user/repo-1",
  "github_user/repo-2",
  "github_user/repo-3"
]
```

**labels-to-create.json** example:

```js
[
  { "name": "closed: completed", "color": "#d93f0b" },
  { "name": "closed: duplicate", "color": "#d93f0b" },
  { "name": "closed: wontfix", "color": "#d93f0b" },
  { "name": "requested by: myFavoriteCustomer", "color": "#0052cc" },
  { "name": "type: bug", "color": "#1d76db" },
  { "name": "type: enhancement", "color": "#1d76db" }
]
```

**labels-to-remove.json** example:

```js
[
  { "name": "bug" },
  { "name": "enhancement" },
  { "name": "duplicate" },
  { "name": "good first issue" },
  { "name": "help wanted" },
  { "name": "invalid" },
  { "name": "question" },
  { "name": "wontfix" }
]
```

## Related projects

[git-label](https://github.com/jasonbellamy/git-label)

## License

Licensed under the Apache License, Version 2.0. See [LICENSE](./LICENSE) for the full license text.