Skip to content

Commit 9a33182

Browse files
committed
docs(annuaire_entreprises): add README
1 parent e15886d commit 9a33182

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Direction Interministérielle du Numérique - Gouvernement Français
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# 📋 @proconnect-gouv/proconnect.annuaire_entreprises
2+
3+
> 📊 Annuaire des Entreprises data for ProConnect
4+
5+
## ⚙️ Installation
6+
7+
```bash
8+
npm install @proconnect-gouv/proconnect.annuaire_entreprises
9+
```
10+
11+
## 📖 Usage
12+
13+
### Public Service Classification Data
14+
15+
Get public service classification constants from `@proconnect-gouv/proconnect.annuaire_entreprises`
16+
17+
```ts
18+
import {
19+
NATURE_JURIDIQUE_SERVICE_PUBLIC,
20+
SERVICE_PUBLIC_BLACKLIST,
21+
SERVICE_PUBLIC_WHITELIST,
22+
} from "@proconnect-gouv/proconnect.annuaire_entreprises";
23+
24+
// Check if a legal nature code corresponds to a public service
25+
const isPublicServiceNature = NATURE_JURIDIQUE_SERVICE_PUBLIC.includes("7160");
26+
27+
// Check if a SIREN is explicitly blacklisted (never a public service)
28+
const isBlacklisted = SERVICE_PUBLIC_BLACKLIST.includes("123456789");
29+
30+
// Check if a SIREN is whitelisted (always a public service)
31+
const isWhitelisted = SERVICE_PUBLIC_WHITELIST.includes("987654321");
32+
```
33+
34+
## 📊 Available Data
35+
36+
- **`NATURE_JURIDIQUE_SERVICE_PUBLIC`** - Legal nature codes for public services from [Annuaire des Entreprises](https://github.com/annuaire-entreprises-data-gouv-fr/search-infra)
37+
- **`SERVICE_PUBLIC_BLACKLIST`** - SIREN numbers explicitly excluded from public service classification
38+
- **`SERVICE_PUBLIC_WHITELIST`** - SIREN numbers explicitly included as public services
39+
40+
## 🔄 Data Updates
41+
42+
Data is synced from the [Annuaire des Entreprises search infrastructure](https://github.com/annuaire-entreprises-data-gouv-fr/search-infra) using:
43+
44+
```bash
45+
npm run build:data
46+
```
47+
48+
## 📖 License
49+
50+
[MIT](./LICENSE.md)

0 commit comments

Comments
 (0)