@socialgouv/kali-data
[![License][img-license]][link-license] [![NPM Version][img-npm]][link-npm] [![Code Coverage][img-coverage]][link-coverage]
Last updated 4 days ago by socialgroovybot .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @socialgouv/kali-data 
SYNC missed versions from official npm registry.

@socialgouv/kali-data

License NPM Version Code Coverage

Extracted with dila-api-client from DILA API API using unist (Univeral Syntax Tree) structure.

Usage

Getting started

npm i @socialgouv/kali-data

Definitions

Agreement

An agreement is a labor agreement (convention collective in French). Only national agreements are available at the moment. Each agreement is made up of articles wrapped within sections.

Article

An article always refers to an agreement article.

API

This package is typed with Typescript, you can check the returns type details there.

Data

It's possible to require any of the available agreements JSON unist tree straight from the data directory:

const JournalismAgreement = require("@socialgouv/kali-data/data/KALITEXT000005652402.json");

And the list of available agreements with :

const agreements = require("@socialgouv/kali-data/data/index.json");

Return Type

KaliData.Agreement

getAgreement()

Get a full agreement unist tree with its sections and articles.

Parameter Type Default Description
agreementIdOrIdcc number \| string required Agreement ID or IDCC

Return Type

KaliData.Agreement

getAgreementArticlesWithParentSections()

:warning: Deprecated: Use getAgreementArticlesWithPath() instead.

Get a flat unist array of all the articles an agreement contains.

Each article includes a list of its parent sections.

Parameter Type Default Description
agreementIdOrIdcc number \| string required Agreement ID or IDCC

Return Type

KaliData.AgreementArticleWithParentSections[]

getAgreementArticlesWithPath()

Get a flat unist array of all the articles an agreement contains.

Each article includes its parent sections path, as an ordered list of their titles.

Parameter Type Default Description
agreementIdOrIdcc number \| string required Agreement ID or IDCC

Return Type

KaliData.AgreementArticleWithPath[]

getAgreementIdFromIdOrIdcc()

Convert any agreement ID or IDCC into a normalized agreement ID.

Parameter Type Default Description
agreementIdOrIdcc number \| string required Agreement ID or IDCC

Return Type

string

getAgreements()

Get the full list of indexed agreements.

Return Type

KaliData.IndexedAgreement[]

getArticles()

Get the full list of indexed articles.

Return Type

KaliData.IndexedArticle[]

getArticleWithParentSections()

:warning: Deprecated: Use getArticleWithPath() instead.

Get an agreement article unist node with its parent sections.

Parameter Type Default Description
articleIdOrCid string required Article ID or CID

Return Type

KaliData.AgreementArticleWithParentSections

getArticleWithPath()

Get an agreement article unist node with its parent sections path.

The parent sections path is represented as an ordered array of their titles.

Parameter Type Default Description
articleIdOrCid string required Article ID or CID

Return Type

KaliData.AgreementArticleWithPath

getIndexedArticle()

Get an indexed article.

Parameter Type Default Description
articleIdOrCid string required Article ID or CID

Return Type

KaliData.IndexedArticle

hasAgreement()

Check if an agreement is available.

Parameter Type Default Description
agreementIdOrIdcc number \| string required Agreement ID or IDCC

Return Type

boolean

hasArticle()

Check if an article is available.

Parameter Type Default Description
articleIdOrCid string required Article ID or CID

Return Type

boolean

Contributing

Getting started

First, you'll need to create an application on PISTE and select DILA - Légifrance Beta API.

Then:

yarn
yarn setup

This will automatically prompt and store your OAuth Client ID & Secret.

Data Generation

yarn data:update will automatically fetch, match, list and check data package agreements with their articles.

  • yarn data:check Check agreements consistency.
  • yarn data:fetch: Update agreements articles from DILA API.
  • yarn data:match: Update agreements articles index (matching articles ID & CID with their agreements ID).
  • yarn data:list Update REFERENCES.md file.

Tests

  • yarn test:lint: Lint codebase.
  • yarn test:type: Check typings.
  • yarn test:unit Launch unit tests.
  • yarn test:update Update unit tests snapshots.
  • yarn test:watch Launch unit tests in watching mode.

References

The agreement references list is available here.

See Also


Current Tags

  • 1.84.0                                ...           latest (4 days ago)

225 Versions

  • 1.84.0                                ...           4 days ago
  • 1.83.0                                ...           5 days ago
  • 1.82.0                                ...           6 days ago
  • 1.81.0                                ...           10 days ago
  • 1.80.0                                ...           12 days ago
  • 1.79.0                                ...           a month ago
  • 1.78.0                                ...           a month ago
  • 1.77.0                                ...           a month ago
  • 1.76.0                                ...           a month ago
  • 1.75.0                                ...           a month ago
  • 1.74.0                                ...           a month ago
  • 1.73.0                                ...           2 months ago
  • 1.72.0                                ...           2 months ago
  • 1.71.0                                ...           2 months ago
  • 1.70.0                                ...           2 months ago
  • 1.69.0                                ...           2 months ago
  • 1.68.0                                ...           2 months ago
  • 1.67.0                                ...           2 months ago
  • 1.66.0                                ...           2 months ago
  • 1.65.0                                ...           2 months ago
  • 1.64.0                                ...           2 months ago
  • 1.63.0                                ...           2 months ago
  • 1.62.0                                ...           2 months ago
  • 1.61.0                                ...           2 months ago
  • 1.60.0                                ...           2 months ago
  • 1.59.0                                ...           2 months ago
  • 1.58.0                                ...           2 months ago
  • 1.57.0                                ...           2 months ago
  • 1.56.0                                ...           2 months ago
  • 1.55.0                                ...           2 months ago
  • 1.54.0                                ...           2 months ago
  • 1.53.0                                ...           2 months ago
  • 1.52.0                                ...           2 months ago
  • 1.51.0                                ...           2 months ago
  • 1.50.0                                ...           2 months ago
  • 1.49.0                                ...           2 months ago
  • 1.48.0                                ...           2 months ago
  • 1.47.0                                ...           2 months ago
  • 1.46.0                                ...           2 months ago
  • 1.45.0                                ...           2 months ago
  • 1.44.0                                ...           3 months ago
  • 1.43.0                                ...           3 months ago
  • 1.42.0                                ...           3 months ago
  • 1.41.0                                ...           3 months ago
  • 1.40.0                                ...           3 months ago
  • 1.39.0                                ...           3 months ago
  • 1.38.0                                ...           3 months ago
  • 1.37.0                                ...           3 months ago
  • 1.36.0                                ...           3 months ago
  • 1.35.0                                ...           3 months ago
  • 1.34.0                                ...           3 months ago
  • 1.33.0                                ...           3 months ago
  • 1.32.0                                ...           3 months ago
  • 1.31.0                                ...           3 months ago
  • 1.30.0                                ...           3 months ago
  • 1.29.0                                ...           3 months ago
  • 1.28.0                                ...           3 months ago
  • 1.27.0                                ...           3 months ago
  • 1.26.0                                ...           3 months ago
  • 1.25.0                                ...           3 months ago
  • 1.24.0                                ...           3 months ago
  • 1.23.0                                ...           3 months ago
  • 1.22.0                                ...           3 months ago
  • 1.21.0                                ...           3 months ago
  • 1.20.0                                ...           3 months ago
  • 1.19.0                                ...           3 months ago
  • 1.18.0                                ...           4 months ago
  • 1.17.0                                ...           4 months ago
  • 1.16.0                                ...           4 months ago
  • 1.15.0                                ...           4 months ago
  • 1.14.0                                ...           4 months ago
  • 1.13.0                                ...           4 months ago
  • 1.12.0                                ...           4 months ago
  • 1.11.0                                ...           4 months ago
  • 1.10.0                                ...           4 months ago
  • 1.9.0                                ...           4 months ago
  • 1.8.0                                ...           4 months ago
  • 1.7.0                                ...           4 months ago
  • 1.6.0                                ...           4 months ago
  • 1.5.0                                ...           4 months ago
  • 1.4.0                                ...           4 months ago
  • 1.3.36                                ...           4 months ago
  • 1.3.35                                ...           4 months ago
  • 1.3.34                                ...           4 months ago
  • 1.3.33                                ...           4 months ago
  • 1.3.32                                ...           4 months ago
  • 1.3.31                                ...           4 months ago
  • 1.3.30                                ...           4 months ago
  • 1.3.29                                ...           5 months ago
  • 1.3.28                                ...           5 months ago
  • 1.3.27                                ...           5 months ago
  • 1.3.26                                ...           5 months ago
  • 1.3.25                                ...           5 months ago
  • 1.3.24                                ...           5 months ago
  • 1.3.23                                ...           5 months ago
  • 1.3.22                                ...           5 months ago
  • 1.3.21                                ...           5 months ago
  • 1.3.20                                ...           5 months ago
  • 1.3.19                                ...           5 months ago
  • 1.3.18                                ...           5 months ago
  • 1.3.17                                ...           5 months ago
  • 1.3.16                                ...           5 months ago
  • 1.3.15                                ...           5 months ago
  • 1.3.14                                ...           5 months ago
  • 1.3.13                                ...           5 months ago
  • 1.3.12                                ...           5 months ago
  • 1.3.11                                ...           5 months ago
  • 1.3.10                                ...           6 months ago
  • 1.3.9                                ...           6 months ago
  • 1.3.8                                ...           6 months ago
  • 1.3.7                                ...           6 months ago
  • 1.3.6                                ...           6 months ago
  • 1.3.5                                ...           6 months ago
  • 1.3.4                                ...           6 months ago
  • 1.3.3                                ...           6 months ago
  • 1.3.2                                ...           6 months ago
  • 1.3.1                                ...           6 months ago
  • 1.3.0                                ...           7 months ago
  • 1.2.104                                ...           7 months ago
  • 1.2.103                                ...           7 months ago
  • 1.2.102                                ...           7 months ago
  • 1.2.101                                ...           7 months ago
  • 1.2.100                                ...           7 months ago
  • 1.2.99                                ...           7 months ago
  • 1.2.98                                ...           8 months ago
  • 1.2.97                                ...           8 months ago
  • 1.2.96                                ...           8 months ago
  • 1.2.95                                ...           8 months ago
  • 1.2.94                                ...           8 months ago
  • 1.2.93                                ...           8 months ago
  • 1.2.92                                ...           8 months ago
  • 1.2.91                                ...           8 months ago
  • 1.2.90                                ...           8 months ago
  • 1.2.89                                ...           8 months ago
  • 1.2.88                                ...           8 months ago
  • 1.2.87                                ...           8 months ago
  • 1.2.86                                ...           8 months ago
  • 1.2.85                                ...           8 months ago
  • 1.2.84                                ...           8 months ago
  • 1.2.83                                ...           8 months ago
  • 1.2.82                                ...           8 months ago
  • 1.2.81                                ...           8 months ago
  • 1.2.80                                ...           8 months ago
  • 1.2.79                                ...           8 months ago
  • 1.2.78                                ...           8 months ago
  • 1.2.77                                ...           8 months ago
  • 1.2.76                                ...           8 months ago
  • 1.2.75                                ...           8 months ago
  • 1.2.74                                ...           8 months ago
  • 1.2.73                                ...           8 months ago
  • 1.2.72                                ...           8 months ago
  • 1.2.71                                ...           8 months ago
  • 1.2.70                                ...           8 months ago
  • 1.2.69                                ...           8 months ago
  • 1.2.68                                ...           8 months ago
  • 1.2.67                                ...           8 months ago
  • 1.2.66                                ...           8 months ago
  • 1.2.65                                ...           8 months ago
  • 1.2.64                                ...           8 months ago
  • 1.2.63                                ...           8 months ago
  • 1.2.62                                ...           8 months ago
  • 1.2.61                                ...           8 months ago
  • 1.2.60                                ...           8 months ago
  • 1.2.59                                ...           8 months ago
  • 1.2.58                                ...           8 months ago
  • 1.2.57                                ...           8 months ago
  • 1.2.56                                ...           8 months ago
  • 1.2.55                                ...           8 months ago
  • 1.2.54                                ...           8 months ago
  • 1.2.53                                ...           8 months ago
  • 1.2.52                                ...           8 months ago
  • 1.2.51                                ...           8 months ago
  • 1.2.50                                ...           8 months ago
  • 1.2.49                                ...           8 months ago
  • 1.2.48                                ...           8 months ago
  • 1.2.47                                ...           8 months ago
  • 1.2.46                                ...           8 months ago
  • 1.2.45                                ...           8 months ago
  • 1.2.44                                ...           8 months ago
  • 1.2.43                                ...           8 months ago
  • 1.2.42                                ...           8 months ago
  • 1.2.41                                ...           8 months ago
  • 1.2.40                                ...           8 months ago
  • 1.2.39                                ...           8 months ago
  • 1.2.38                                ...           8 months ago
  • 1.2.37                                ...           8 months ago
  • 1.2.36                                ...           8 months ago
  • 1.2.35                                ...           8 months ago
  • 1.2.34                                ...           8 months ago
  • 1.2.33                                ...           8 months ago
  • 1.2.32                                ...           9 months ago
  • 1.2.31                                ...           9 months ago
  • 1.2.30                                ...           9 months ago
  • 1.2.29                                ...           9 months ago
  • 1.2.28                                ...           9 months ago
  • 1.2.27                                ...           9 months ago
  • 1.2.26                                ...           9 months ago
  • 1.2.25                                ...           9 months ago
  • 1.2.24                                ...           9 months ago
  • 1.2.23                                ...           9 months ago
  • 1.2.22                                ...           10 months ago
  • 1.2.21                                ...           10 months ago
  • 1.2.20                                ...           10 months ago
  • 1.2.19                                ...           10 months ago
  • 1.2.18                                ...           10 months ago
  • 1.2.17                                ...           10 months ago
  • 1.2.16                                ...           10 months ago
  • 1.2.15                                ...           10 months ago
  • 1.2.14                                ...           10 months ago
  • 1.2.13                                ...           10 months ago
  • 1.2.12                                ...           10 months ago
  • 1.2.11                                ...           10 months ago
  • 1.2.10                                ...           10 months ago
  • 1.2.9                                ...           10 months ago
  • 1.2.6                                ...           a year ago
  • 1.2.5                                ...           a year ago
  • 1.2.4                                ...           a year ago
  • 1.2.3                                ...           a year ago
  • 1.2.2                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.0                                ...           a year ago
Downloads
Today 0
This Week 0
This Month 151
Last Day 0
Last Week 207
Last Month 83
Dependencies (3)
Dev Dependencies (23)

Copyright 2014 - 2016 © taobao.org |