Skip to content

Commit 7fca903

Browse files
docs(identite): 📝 add package README and LICENSE (#1468)
1 parent 931904c commit 7fca903

File tree

2 files changed

+138
-0
lines changed

2 files changed

+138
-0
lines changed

packages/identite/LICENSE

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.

packages/identite/README.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# 🔐 @proconnect-gouv/proconnect.identite
2+
3+
> Core identity management logic for ProConnect
4+
5+
## ⚙️ Installation
6+
7+
```bash
8+
npm install @proconnect-gouv/proconnect.identite
9+
```
10+
11+
## 📖 Usage
12+
13+
### Managers
14+
15+
High-level business logic for certification, FranceConnect integration, organization, and user management.
16+
17+
```typescript
18+
import { isOrganizationDirigeant } from "@proconnect-gouv/proconnect.identite/managers/certification";
19+
import { getOrganizationInfo } from "@proconnect-gouv/proconnect.identite/managers/organization";
20+
import { assignUserVerificationTypeToDomain } from "@proconnect-gouv/proconnect.identite/managers/user";
21+
```
22+
23+
### Repositories
24+
25+
Data access layer for email domains, organizations, and users.
26+
27+
```typescript
28+
import {
29+
findByEmail,
30+
findById,
31+
getByIdFactory,
32+
} from "@proconnect-gouv/proconnect.identite/repositories/user";
33+
import {
34+
findByUserId,
35+
linkUserToOrganization,
36+
} from "@proconnect-gouv/proconnect.identite/repositories/organization";
37+
import { addDomain } from "@proconnect-gouv/proconnect.identite/repositories/email-domain";
38+
```
39+
40+
### Services
41+
42+
Stateless business logic for organization validation and PostgreSQL utilities.
43+
44+
```typescript
45+
import {
46+
isEntrepriseUnipersonnelle,
47+
isPublicService,
48+
} from "@proconnect-gouv/proconnect.identite/services/organization";
49+
import { hashToPostgresParams } from "@proconnect-gouv/proconnect.identite/services/postgres";
50+
```
51+
52+
### Mappers
53+
54+
Data transformation utilities for certification and organization data.
55+
56+
```typescript
57+
import { fromSiret } from "@proconnect-gouv/proconnect.identite/mappers/organization";
58+
```
59+
60+
### Types
61+
62+
TypeScript type definitions for users, organizations, claims, and more.
63+
64+
```typescript
65+
import type {
66+
User,
67+
Organization,
68+
UserOrganizationLink,
69+
EmailDomain,
70+
FranceConnectUserInfo,
71+
} from "@proconnect-gouv/proconnect.identite/types";
72+
```
73+
74+
### Data
75+
76+
Raw data arrays for organization domain whitelists.
77+
78+
```typescript
79+
import { domainsWhitelist } from "@proconnect-gouv/proconnect.identite/data/organization";
80+
```
81+
82+
### Errors
83+
84+
Custom error types for identity management operations.
85+
86+
```typescript
87+
import {
88+
InvalidCertificationError,
89+
InvalidSiretError,
90+
NotFoundError,
91+
OrganizationNotActiveError,
92+
OrganizationNotFoundError,
93+
UserNotFoundError,
94+
ModerationNotFoundError,
95+
} from "@proconnect-gouv/proconnect.identite/errors";
96+
```
97+
98+
## 📊 Available Exports
99+
100+
- **`/managers/certification`** - Organization certification and dirigeant validation
101+
- **`/managers/franceconnect`** - FranceConnect OIDC client integration
102+
- **`/managers/organization`** - Organization business logic
103+
- **`/managers/user`** - User business logic
104+
- **`/repositories/email-domain`** - Email domain data access
105+
- **`/repositories/organization`** - Organization data access
106+
- **`/repositories/user`** - User data access
107+
- **`/services/organization`** - Organization validation utilities
108+
- **`/services/postgres`** - PostgreSQL query utilities
109+
- **`/mappers/certification`** - Certification data transformation
110+
- **`/mappers/organization`** - Organization data transformation
111+
- **`/types`** - TypeScript type definitions
112+
- **`/data/organization`** - Organization reference data
113+
- **`/errors`** - Custom error types
114+
115+
## 📖 License
116+
117+
[MIT](./LICENSE)

0 commit comments

Comments
 (0)