2.20.5 • Published 7 months ago

@universis/docnumbers v2.20.5

Weekly downloads
12
License
LGPL-3.0-or-later
Repository
gitlab
Last release
7 months ago

@universis/docnumbers

Universis api server default document numbering service

Installation

npm i @universis/docnumbers

Usage

Register DocumentNumberService in application services:

# app.production.json

"services": [
    ...,
    {
        "serviceType": "@universis/docnumbers#DocumentNumberService",
        "strategyType": "@universis/docnumbers#DefaultDocumentNumberService"
    }
]

Add DocumentNumberSchemaLoader to schema loaders

# app.production.json

{
    "settings": {
        "schema": {
            "loaders": [
                ...,
                {
                    "loaderType": "@universis/docnumbers#DocumentNumberSchemaLoader"
                }
            ]
        }
    }
}

Configuration

Use settings/universis/docnumbers section to configure the usage of document verifier services:

 "docnumbers": {
    "origin": "https://api.example.com/",
    "rateLimit": {
        "windowMs": 300000
        "max": 5
    }
  }

origin

string

A string which represents the remote address where document verifier service will be accessible by end-users.

rateLimit

object

@universis/docnumbers uses express-rate-limit configuration for limiting the amount of requests against verification services. The default values are:

{
    windowMs: 300000, // 5 minutes
    max: 20, // 20 requests
    standardHeaders: true,
    legacyHeaders: false
}

shortDocumentCodeDuration

string

An ISO 8601 duration which represents the amount of time where the usage of short document code will be valid. The default value is P1M

{
    "shortDocumentCodeDuration": "P2M" // two months
}
2.20.4

7 months ago

2.20.5

7 months ago

2.20.2

8 months ago

2.20.3

8 months ago

2.20.1

8 months ago

1.3.6

9 months ago

1.3.5

1 year ago

1.3.4

1 year ago

1.3.3

2 years ago

1.2.4

2 years ago

1.3.2

2 years ago

1.2.3

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.11

3 years ago

1.1.10

3 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.4-next.1

5 years ago