@socialgouv/legi-data-types 2.181.0 → 2.183.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +25 -56
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -9,75 +9,44 @@
9
9
 
10
10
  ---
11
11
 
12
- Extracted with [dila-api-client][link-dila-api-client] from [DILA API][link-aife-api] API using
13
- [unist (Univeral Syntax Tree)][link-unist] structure.
14
-
15
- - [Usage](#usage)
16
- - [Getting started](#getting-started)
17
- - [Definitions](#definitions)
18
- - [Code](#code)
19
- - [Article](#article)
20
- - [API](#api)
21
- - [Data](#data)
22
- - [getArticleWithParentSections()](#getarticlewithparentsections)
23
- - [getCode()](#getcode)
24
- - [getCodeWithParents()](#getcodewithparents)
25
- - [getIndexedArticle()](#getindexedarticle)
26
- - [getIndexedArticles()](#getindexedarticles)
27
- - [getIndexedCodes()](#getindexedcodes)
28
- - [hasArticle()](#hasarticle)
29
- - [hasCode()](#hascode)
30
- - [Contributing](#contributing)
31
- - [Getting started](#getting-started-1)
32
- - [Data Generation](#data-generation)
33
- - [Tests](#tests)
34
- - [References](#references)
35
- - [Also](#also)
36
-
37
- ## Usage
12
+ Extractions quotidiennes des codes de loi de la
13
+ [base LEGI](https://www.data.gouv.fr/fr/datasets/legi-codes-lois-et-reglements-consolides/) depuis
14
+ l'API legifrance.gouv.fr
38
15
 
39
- ### Getting started
40
-
41
- ```sh
42
- npm i @socialgouv/legi-data
43
- # or if you only need the Typescript types
44
- npm i -D @socialgouv/legi-data-types
45
- ```
46
-
47
- ### Definitions
48
-
49
- #### Code
16
+ Les données sont disponibles au format JSON ou via une API TypeScript.
50
17
 
51
- A code is a French code of law (i.e.: "Labor Code", "Social Security Code"). Each code is made up
52
- of articles wrapped within sections.
18
+ ex pour récupérer le "code du travail" complet :
53
19
 
54
- #### Article
20
+ ```
21
+ const code = require("@socialgouv/legi-data/data/LEGITEXT000006072050.json");
22
+ ```
55
23
 
56
- An article always refers to a code article.
24
+ La structure du JSON est basée sur [unified](https://unifiedjs.com/)
57
25
 
58
- ### API
26
+ ---
59
27
 
60
- This package is typed with Typescript, you can check the returns type details [there][link-typings].
28
+ Actuellement, seuls 4 codes sont versionnés ici :
61
29
 
62
- #### Data
30
+ | Id | Description |
31
+ | -------------------- | ------------------------------------------------------ |
32
+ | LEGITEXT000006072050 | Code du travail |
33
+ | LEGITEXT000022197698 | Code de la sécurité sociale |
34
+ | LEGITEXT000022197698 | Code rural et de la pêche maritime |
35
+ | LEGITEXT000031366350 | Code des relations entre le public et l'administration |
63
36
 
64
- It's possible to require any of the [available codes][link-code-references] JSON [unist][link-unist]
65
- tree straight from the data directory:
37
+ Postez [une issue](https://github.com/SocialGouv/legi-data) si vous souhaitez en voir d'autres.
66
38
 
67
- ```js
68
- const LaborCode = require("@socialgouv/legi-data/data/LEGITEXT000006072050.json");
69
- ```
39
+ ---
70
40
 
71
- And the list of available codes with:
41
+ ## API TypeScript
72
42
 
73
- ```js
74
- const codes = require("@socialgouv/legi-data/data/index.json");
75
- ```
43
+ ### Getting started
76
44
 
77
- **Return Type**
45
+ ```sh
46
+ npm i @socialgouv/legi-data
78
47
 
79
- ```ts
80
- LegiData.Code;
48
+ # or if you only need the Typescript types
49
+ npm i -D @socialgouv/legi-data-types
81
50
  ```
82
51
 
83
52
  #### getArticleWithParentSections()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socialgouv/legi-data-types",
3
- "version": "2.181.0",
3
+ "version": "2.183.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },