@proconnect-gouv/proconnect.identite 1.0.0 → 1.2.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.
- package/CHANGELOG.md +22 -0
- package/LICENSE +21 -0
- package/README.md +117 -0
- package/dist/data/certification/commune-code-conversion.d.ts +13 -0
- package/dist/data/certification/commune-code-conversion.d.ts.map +1 -0
- package/dist/data/certification/commune-code-conversion.js +5188 -0
- package/dist/data/certification/country-iso-to-cog.d.ts +12 -0
- package/dist/data/certification/country-iso-to-cog.d.ts.map +1 -0
- package/dist/data/certification/country-iso-to-cog.js +438 -0
- package/dist/data/certification/index.d.ts +3 -0
- package/dist/data/certification/index.d.ts.map +1 -0
- package/dist/data/certification/index.js +3 -0
- package/dist/managers/certification/adapters/api_entreprise.d.ts +4 -0
- package/dist/managers/certification/adapters/api_entreprise.d.ts.map +1 -0
- package/dist/managers/certification/adapters/api_entreprise.js +14 -0
- package/dist/managers/certification/adapters/franceconnect.d.ts +3 -0
- package/dist/managers/certification/adapters/franceconnect.d.ts.map +1 -0
- package/dist/managers/certification/adapters/franceconnect.js +15 -0
- package/dist/managers/certification/adapters/insee.d.ts +4 -0
- package/dist/managers/certification/adapters/insee.d.ts.map +1 -0
- package/dist/managers/certification/adapters/insee.js +29 -0
- package/dist/managers/certification/adapters/rne.d.ts +4 -0
- package/dist/managers/certification/adapters/rne.d.ts.map +1 -0
- package/dist/managers/certification/adapters/rne.js +45 -0
- package/dist/managers/certification/birthplace-conversion.d.ts +27 -0
- package/dist/managers/certification/birthplace-conversion.d.ts.map +1 -0
- package/dist/managers/certification/birthplace-conversion.js +45 -0
- package/dist/managers/certification/certification-score.d.ts +22 -0
- package/dist/managers/certification/certification-score.d.ts.map +1 -0
- package/dist/managers/certification/certification-score.js +72 -0
- package/dist/managers/certification/index.d.ts +1 -1
- package/dist/managers/certification/index.d.ts.map +1 -1
- package/dist/managers/certification/index.js +1 -1
- package/dist/managers/certification/is-organization-dirigeant.d.ts +38 -8
- package/dist/managers/certification/is-organization-dirigeant.d.ts.map +1 -1
- package/dist/managers/certification/is-organization-dirigeant.js +89 -52
- package/dist/managers/certification/normalize.d.ts +21 -0
- package/dist/managers/certification/normalize.d.ts.map +1 -0
- package/dist/managers/certification/normalize.js +64 -0
- package/dist/managers/franceconnect/openid-client.d.ts +1 -0
- package/dist/managers/franceconnect/openid-client.d.ts.map +1 -1
- package/dist/managers/organization/adapters/api_entreprise.d.ts +25 -0
- package/dist/managers/organization/adapters/api_entreprise.d.ts.map +1 -0
- package/dist/{mappers/organization/from-siret.js → managers/organization/adapters/api_entreprise.js} +26 -3
- package/dist/managers/organization/get-organization-info.d.ts +2 -2
- package/dist/managers/organization/get-organization-info.d.ts.map +1 -1
- package/dist/managers/organization/get-organization-info.js +6 -6
- package/dist/repositories/organization/upsert.d.ts +1 -1
- package/dist/repositories/organization/upsert.d.ts.map +1 -1
- package/dist/repositories/organization/upsert.js +26 -1
- package/dist/repositories/user/get-franceconnect-user-info.d.ts +1 -0
- package/dist/repositories/user/get-franceconnect-user-info.d.ts.map +1 -1
- package/dist/repositories/user/upsert-franceconnect-userinfo.d.ts +1 -0
- package/dist/repositories/user/upsert-franceconnect-userinfo.d.ts.map +1 -1
- package/dist/services/organization/index.d.ts +2 -0
- package/dist/services/organization/index.d.ts.map +1 -1
- package/dist/services/organization/index.js +2 -0
- package/dist/services/organization/is-public-service.d.ts +3 -0
- package/dist/services/organization/is-public-service.d.ts.map +1 -0
- package/dist/services/organization/is-public-service.js +19 -0
- package/dist/services/organization/is-syndicat-communal.d.ts +3 -0
- package/dist/services/organization/is-syndicat-communal.d.ts.map +1 -0
- package/dist/services/organization/is-syndicat-communal.js +13 -0
- package/dist/types/dirigeant.d.ts +5 -0
- package/dist/types/dirigeant.d.ts.map +1 -1
- package/dist/types/dirigeant.js +2 -0
- package/dist/types/franceconnect.d.ts +2 -0
- package/dist/types/franceconnect.d.ts.map +1 -1
- package/dist/types/franceconnect.js +1 -0
- package/dist/types/organization.d.ts +3 -3
- package/dist/types/organization.d.ts.map +1 -1
- package/package.json +9 -8
- package/src/data/certification/commune-code-conversion.ts +5189 -0
- package/src/data/certification/country-iso-to-cog.ts +439 -0
- package/src/data/certification/index.ts +4 -0
- package/src/managers/certification/adapters/api_entreprise.test.ts +68 -0
- package/src/managers/certification/adapters/api_entreprise.test.ts.snapshot +109 -0
- package/src/{mappers/certification/index.ts → managers/certification/adapters/api_entreprise.ts} +8 -5
- package/src/managers/certification/adapters/franceconnect.ts +21 -0
- package/src/managers/certification/adapters/insee.test.ts +18 -0
- package/src/managers/certification/adapters/insee.test.ts.snapshot +21 -0
- package/src/managers/certification/adapters/insee.ts +39 -0
- package/src/managers/certification/adapters/rne.test.ts +276 -0
- package/src/managers/certification/adapters/rne.ts +64 -0
- package/src/managers/certification/birthplace-conversion.test.ts +76 -0
- package/src/managers/certification/birthplace-conversion.ts +58 -0
- package/src/managers/certification/certification-score.test.ts +309 -0
- package/src/managers/certification/certification-score.ts +97 -0
- package/src/managers/certification/index.ts +1 -1
- package/src/managers/certification/is-organization-dirigeant.test.ts +144 -53
- package/src/managers/certification/is-organization-dirigeant.ts +132 -106
- package/src/managers/certification/normalize.test.ts +71 -0
- package/src/managers/certification/normalize.ts +72 -0
- package/src/managers/organization/adapters/api_entreprise.test.ts +31 -0
- package/src/{mappers/organization/from-siret.test.ts.snapshot → managers/organization/adapters/api_entreprise.test.ts.snapshot} +26 -3
- package/src/{mappers/organization/from-siret.ts → managers/organization/adapters/api_entreprise.ts} +55 -5
- package/src/managers/organization/get-organization-info.test.ts +2 -2
- package/src/managers/organization/get-organization-info.ts +10 -10
- package/src/repositories/organization/get-users-by-organization.test.ts.snapshot +1 -1
- package/src/repositories/organization/upsert.ts +69 -19
- package/src/repositories/user/find-by-email.test.ts +1 -1
- package/src/repositories/user/find-by-id.test.ts +1 -1
- package/src/repositories/user/get-by-id.test.ts +1 -1
- package/src/repositories/user/get-franceconnect-user-info.test.ts +1 -0
- package/src/repositories/user/upsert-franceconnect-userinfo.test.ts +2 -0
- package/src/services/organization/index.ts +2 -0
- package/src/services/organization/is-public-service.test.ts +99 -0
- package/src/services/organization/is-public-service.ts +35 -0
- package/src/services/organization/is-syndicat-communal.test.ts +31 -0
- package/src/services/organization/is-syndicat-communal.ts +18 -0
- package/src/types/dirigeant.ts +3 -0
- package/src/types/franceconnect.ts +1 -0
- package/src/types/organization-info.ts +1 -1
- package/src/types/organization.ts +3 -3
- package/testing/seed/franceconnect/index.ts +12 -9
- package/testing/seed/organizations/index.ts +108 -0
- package/tsconfig.json +6 -2
- package/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/managers/certification/distance.d.ts +0 -4
- package/dist/managers/certification/distance.d.ts.map +0 -1
- package/dist/managers/certification/distance.js +0 -16
- package/dist/mappers/certification/index.d.ts +0 -4
- package/dist/mappers/certification/index.d.ts.map +0 -1
- package/dist/mappers/certification/index.js +0 -11
- package/dist/mappers/index.d.ts +0 -2
- package/dist/mappers/index.d.ts.map +0 -1
- package/dist/mappers/index.js +0 -2
- package/dist/mappers/organization/from-siret.d.ts +0 -5
- package/dist/mappers/organization/from-siret.d.ts.map +0 -1
- package/dist/mappers/organization/index.d.ts +0 -2
- package/dist/mappers/organization/index.d.ts.map +0 -1
- package/dist/mappers/organization/index.js +0 -2
- package/src/managers/certification/distance.test.ts +0 -109
- package/src/managers/certification/distance.ts +0 -41
- package/src/mappers/index.ts +0 -3
- package/src/mappers/organization/from-siret.test.ts +0 -26
- package/src/mappers/organization/index.ts +0 -3
- package/testing/seed/insee/index.ts +0 -22
- package/testing/seed/mandataires/index.ts +0 -32
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
//
|
|
2
2
|
//
|
|
3
3
|
export function upsertFactory({ pg }) {
|
|
4
|
-
return async function upsert({ siret, organizationInfo
|
|
4
|
+
return async function upsert({ siret, organizationInfo, }) {
|
|
5
|
+
const { cached_libelle, cached_nom_complet, cached_enseigne, cached_tranche_effectifs, cached_tranche_effectifs_unite_legale, cached_libelle_tranche_effectif, cached_etat_administratif, cached_est_active, cached_statut_diffusion, cached_est_diffusible, cached_adresse, cached_code_postal, cached_code_officiel_geographique, cached_activite_principale, cached_libelle_activite_principale, cached_categorie_juridique, cached_libelle_categorie_juridique, } = toPartialOrganization(organizationInfo);
|
|
5
6
|
const { rows } = await pg.query(`
|
|
6
7
|
INSERT INTO organizations
|
|
7
8
|
(
|
|
@@ -101,3 +102,27 @@ export function upsertFactory({ pg }) {
|
|
|
101
102
|
return rows.shift();
|
|
102
103
|
};
|
|
103
104
|
}
|
|
105
|
+
//
|
|
106
|
+
function toPartialOrganization(organization_info) {
|
|
107
|
+
const { activitePrincipale: cached_activite_principale, adresse: cached_adresse, categorieJuridique: cached_categorie_juridique, codeOfficielGeographique: cached_code_officiel_geographique, codePostal: cached_code_postal, enseigne: cached_enseigne, estActive: cached_est_active, estDiffusible: cached_est_diffusible, etatAdministratif: cached_etat_administratif, libelle: cached_libelle, libelleActivitePrincipale: cached_libelle_activite_principale, libelleCategorieJuridique: cached_libelle_categorie_juridique, libelleTrancheEffectif: cached_libelle_tranche_effectif, nomComplet: cached_nom_complet, siret, statutDiffusion: cached_statut_diffusion, trancheEffectifs: cached_tranche_effectifs, trancheEffectifsUniteLegale: cached_tranche_effectifs_unite_legale, } = organization_info;
|
|
108
|
+
return {
|
|
109
|
+
cached_activite_principale,
|
|
110
|
+
cached_adresse,
|
|
111
|
+
cached_categorie_juridique,
|
|
112
|
+
cached_code_officiel_geographique,
|
|
113
|
+
cached_code_postal,
|
|
114
|
+
cached_enseigne,
|
|
115
|
+
cached_est_active,
|
|
116
|
+
cached_est_diffusible,
|
|
117
|
+
cached_etat_administratif,
|
|
118
|
+
cached_libelle_activite_principale,
|
|
119
|
+
cached_libelle_categorie_juridique,
|
|
120
|
+
cached_libelle_tranche_effectif,
|
|
121
|
+
cached_libelle,
|
|
122
|
+
cached_nom_complet,
|
|
123
|
+
cached_statut_diffusion,
|
|
124
|
+
cached_tranche_effectifs_unite_legale,
|
|
125
|
+
cached_tranche_effectifs,
|
|
126
|
+
siret,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-franceconnect-user-info.d.ts","sourceRoot":"","sources":["../../../src/repositories/user/get-franceconnect-user-info.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAyB,MAAM,YAAY,CAAC;AAKzE,wBAAgB,+BAA+B,CAAC,EAAE,EAAE,EAAE,EAAE,eAAe,IACtB,SAAS,MAAM
|
|
1
|
+
{"version":3,"file":"get-franceconnect-user-info.d.ts","sourceRoot":"","sources":["../../../src/repositories/user/get-franceconnect-user-info.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAyB,MAAM,YAAY,CAAC;AAKzE,wBAAgB,+BAA+B,CAAC,EAAE,EAAE,EAAE,EAAE,eAAe,IACtB,SAAS,MAAM;;;;;;;;;;;;eAY/D;AAED,MAAM,MAAM,+BAA+B,GAAG,UAAU,CACtD,OAAO,+BAA+B,CACvC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DatabaseContext, FranceConnectUserInfo } from "#src/types";
|
|
2
2
|
export declare function upsertFranceconnectUserinfoFactory({ pg }: DatabaseContext): (value: Pick<FranceConnectUserInfo, "user_id"> & Partial<FranceConnectUserInfo>) => Promise<{
|
|
3
|
+
birthcountry: string;
|
|
3
4
|
birthdate: Date;
|
|
4
5
|
birthplace: string;
|
|
5
6
|
family_name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upsert-franceconnect-userinfo.d.ts","sourceRoot":"","sources":["../../../src/repositories/user/upsert-franceconnect-userinfo.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAIzE,wBAAgB,kCAAkC,CAAC,EAAE,EAAE,EAAE,EAAE,eAAe,IAEtE,OAAO,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC,GAC3C,OAAO,CAAC,qBAAqB,CAAC
|
|
1
|
+
{"version":3,"file":"upsert-franceconnect-userinfo.d.ts","sourceRoot":"","sources":["../../../src/repositories/user/upsert-franceconnect-userinfo.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAIzE,wBAAgB,kCAAkC,CAAC,EAAE,EAAE,EAAE,EAAE,eAAe,IAEtE,OAAO,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC,GAC3C,OAAO,CAAC,qBAAqB,CAAC;;;;;;;;;;;;GA0BnC;AAED,MAAM,MAAM,iCAAiC,GAAG,UAAU,CACxD,OAAO,kCAAkC,CAC1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/organization/index.ts"],"names":[],"mappings":"AAEA,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/organization/index.ts"],"names":[],"mappings":"AAEA,cAAc,yCAAyC,CAAC;AACxD,cAAc,mCAAmC,CAAC;AAClD,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-public-service.d.ts","sourceRoot":"","sources":["../../../src/services/organization/is-public-service.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAG/E,eAAO,MAAM,eAAe,GAAI,mEAI7B,YAAY,KAAG,OAoBjB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//
|
|
2
|
+
import { NATURE_JURIDIQUE_SERVICE_PUBLIC, SERVICE_PUBLIC_BLACKLIST, SERVICE_PUBLIC_WHITELIST, } from "@proconnect-gouv/proconnect.annuaire_entreprises";
|
|
3
|
+
// inspired from https://github.com/annuaire-entreprises-data-gouv-fr/search-infra/blob/f1e56ac476b0b1730115f7b1f0667e8509ee5379/workflows/data_pipelines/elasticsearch/data_enrichment.py#L155-L189
|
|
4
|
+
export const isPublicService = ({ cached_categorie_juridique, cached_etat_administratif, siret, }) => {
|
|
5
|
+
const siren = (siret || "").substring(0, 9);
|
|
6
|
+
// Entities in the blacklist are never considered public services
|
|
7
|
+
if (SERVICE_PUBLIC_BLACKLIST.includes(siren)) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
// Closed entities are not considered public services
|
|
11
|
+
if (cached_etat_administratif === "C") {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
// Check if entity is in whitelist or has a public service legal nature code
|
|
15
|
+
const cat_jur_ok = cached_categorie_juridique &&
|
|
16
|
+
NATURE_JURIDIQUE_SERVICE_PUBLIC.includes(cached_categorie_juridique);
|
|
17
|
+
const whitelist_ok = SERVICE_PUBLIC_WHITELIST.includes(siren);
|
|
18
|
+
return cat_jur_ok || whitelist_ok;
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-syndicat-communal.d.ts","sourceRoot":"","sources":["../../../src/services/organization/is-syndicat-communal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAU/C,eAAO,MAAM,kBAAkB,GAAI,yCAEhC,IAAI,CAAC,YAAY,EAAE,oCAAoC,CAAC,KAAG,OAK7D,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const cat_jur = [
|
|
2
|
+
"Centre communal d'action sociale",
|
|
3
|
+
"Établissement public local social et médico-social",
|
|
4
|
+
"Syndicat intercommunal à vocation multiple (SIVOM)",
|
|
5
|
+
"Syndicat intercommunal à vocation unique (SIVU)",
|
|
6
|
+
"Syndicat mixte fermé",
|
|
7
|
+
];
|
|
8
|
+
export const isSyndicatCommunal = ({ cached_libelle_categorie_juridique, }) => {
|
|
9
|
+
if (!cached_libelle_categorie_juridique) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
return cat_jur.includes(cached_libelle_categorie_juridique);
|
|
13
|
+
};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const IdentityVectorSchema: z.ZodObject<{
|
|
3
|
+
birthcountry: z.ZodNullable<z.ZodString>;
|
|
3
4
|
birthdate: z.ZodNullable<z.ZodDate>;
|
|
4
5
|
birthplace: z.ZodNullable<z.ZodString>;
|
|
5
6
|
family_name: z.ZodNullable<z.ZodString>;
|
|
7
|
+
gender: z.ZodNullable<z.ZodEnum<{
|
|
8
|
+
male: "male";
|
|
9
|
+
female: "female";
|
|
10
|
+
}>>;
|
|
6
11
|
given_name: z.ZodNullable<z.ZodString>;
|
|
7
12
|
}, z.core.$strip>;
|
|
8
13
|
export type IdentityVector = z.output<typeof IdentityVectorSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dirigeant.d.ts","sourceRoot":"","sources":["../../src/types/dirigeant.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"dirigeant.d.ts","sourceRoot":"","sources":["../../src/types/dirigeant.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oBAAoB;;;;;;;;;;iBAO/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
package/dist/types/dirigeant.js
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//
|
|
4
4
|
export const IdentityVectorSchema = z.object({
|
|
5
|
+
birthcountry: z.string().nullable(),
|
|
5
6
|
birthdate: z.date().nullable(),
|
|
6
7
|
birthplace: z.string().nullable(),
|
|
7
8
|
family_name: z.string().nullable(),
|
|
9
|
+
gender: z.enum(["male", "female"]).nullable(),
|
|
8
10
|
given_name: z.string().nullable(),
|
|
9
11
|
});
|
|
@@ -3,6 +3,7 @@ import { z } from "zod";
|
|
|
3
3
|
* @see https://docs.partenaires.franceconnect.gouv.fr/fs/fs-technique/fs-technique-scope-fc/#liste-des-claims
|
|
4
4
|
*/
|
|
5
5
|
export declare const FranceConnectUserInfoResponseSchema: z.ZodObject<{
|
|
6
|
+
birthcountry: z.ZodString;
|
|
6
7
|
birthdate: z.ZodCoercedDate<unknown>;
|
|
7
8
|
birthplace: z.ZodString;
|
|
8
9
|
family_name: z.ZodString;
|
|
@@ -13,6 +14,7 @@ export declare const FranceConnectUserInfoResponseSchema: z.ZodObject<{
|
|
|
13
14
|
}, z.core.$strip>;
|
|
14
15
|
export type FranceConnectUserInfoResponse = z.output<typeof FranceConnectUserInfoResponseSchema>;
|
|
15
16
|
export declare const FranceConnectUserInfoSchema: z.ZodObject<{
|
|
17
|
+
birthcountry: z.ZodString;
|
|
16
18
|
birthdate: z.ZodCoercedDate<unknown>;
|
|
17
19
|
birthplace: z.ZodString;
|
|
18
20
|
family_name: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"franceconnect.d.ts","sourceRoot":"","sources":["../../src/types/franceconnect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;GAEG;AACH,eAAO,MAAM,mCAAmC
|
|
1
|
+
{"version":3,"file":"franceconnect.d.ts","sourceRoot":"","sources":["../../src/types/franceconnect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;GAEG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;iBAU9C,CAAC;AAEH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAClD,OAAO,mCAAmC,CAC3C,CAAC;AAIF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;iBAOrC,CAAC;AACJ,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAC1C,OAAO,2BAA2B,CACnC,CAAC"}
|
|
@@ -5,6 +5,7 @@ import { z } from "zod";
|
|
|
5
5
|
* @see https://docs.partenaires.franceconnect.gouv.fr/fs/fs-technique/fs-technique-scope-fc/#liste-des-claims
|
|
6
6
|
*/
|
|
7
7
|
export const FranceConnectUserInfoResponseSchema = z.object({
|
|
8
|
+
birthcountry: z.string(),
|
|
8
9
|
birthdate: z.coerce.date(),
|
|
9
10
|
birthplace: z.string(),
|
|
10
11
|
family_name: z.string(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TrancheEffectifs } from "@proconnect-gouv/proconnect.
|
|
1
|
+
import type { TrancheEffectifs } from "@proconnect-gouv/proconnect.api_entreprise/types";
|
|
2
2
|
export interface Organization {
|
|
3
3
|
id: number;
|
|
4
4
|
siret: string;
|
|
@@ -11,9 +11,9 @@ export interface Organization {
|
|
|
11
11
|
cached_tranche_effectifs_unite_legale: string | null;
|
|
12
12
|
cached_libelle_tranche_effectif: string | null;
|
|
13
13
|
cached_etat_administratif: string | null;
|
|
14
|
-
cached_est_active:
|
|
14
|
+
cached_est_active: boolean | null;
|
|
15
15
|
cached_statut_diffusion: string | null;
|
|
16
|
-
cached_est_diffusible:
|
|
16
|
+
cached_est_diffusible: boolean | null;
|
|
17
17
|
cached_adresse: string | null;
|
|
18
18
|
cached_code_postal: string | null;
|
|
19
19
|
cached_code_officiel_geographique: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../src/types/organization.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../src/types/organization.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kDAAkD,CAAC;AAIzF,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;IACjB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,wBAAwB,EAAE,gBAAgB,CAAC;IAC3C,qCAAqC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrD,+BAA+B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/C,yBAAyB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,iBAAiB,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,qBAAqB,EAAE,OAAO,GAAG,IAAI,CAAC;IACtC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,iCAAiC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjD,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,kCAAkC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClD,0BAA0B,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C,kCAAkC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClD,4BAA4B,EAAE,IAAI,GAAG,IAAI,CAAC;CAC3C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proconnect-gouv/proconnect.identite",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"homepage": "https://github.com/proconnect-gouv/proconnect-identite/tree/main/packages/identite#readme",
|
|
5
5
|
"bugs": "https://github.com/proconnect-gouv/proconnect-identite/issues",
|
|
6
6
|
"repository": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"clean": "rm -rf dist tsconfig*.tsbuildinfo",
|
|
40
40
|
"dev": "npm run build -- --watch --preserveWatchOutput",
|
|
41
41
|
"dev:test": "tsx --watch --test src/**/*.test.ts",
|
|
42
|
-
"test": "tsx --test --test-reporter=spec
|
|
43
|
-
"test:update-snapshots": "
|
|
42
|
+
"test": "tsx --test --test-reporter=spec",
|
|
43
|
+
"test:update-snapshots": "npm run test -- --test-update-snapshots"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"leven": "^4.0.0",
|
|
@@ -49,15 +49,16 @@
|
|
|
49
49
|
"zod": "^4.0.17"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@electric-sql/pglite": "^0.3.
|
|
52
|
+
"@electric-sql/pglite": "^0.3.12",
|
|
53
|
+
"@proconnect-gouv/proconnect.annuaire_entreprises": "^1.1.0",
|
|
54
|
+
"@proconnect-gouv/proconnect.api_entreprise": "^1.1.0",
|
|
53
55
|
"@proconnect-gouv/proconnect.core": "^1.0.0",
|
|
54
56
|
"@proconnect-gouv/proconnect.devtools.typescript": "1.0.0",
|
|
55
|
-
"@proconnect-gouv/proconnect.
|
|
56
|
-
"@proconnect-gouv/proconnect.insee": "^1.0.0",
|
|
57
|
-
"@sinonjs/fake-timers": "^14.0.0",
|
|
57
|
+
"@proconnect-gouv/proconnect.insee": "^1.0.1",
|
|
58
58
|
"@types/node": "^22.18.6",
|
|
59
|
+
"@types/pg": "^8.15.5",
|
|
59
60
|
"await-to-js": "^3.0.0",
|
|
60
|
-
"node-pg-migrate": "^
|
|
61
|
+
"node-pg-migrate": "^8.0.3",
|
|
61
62
|
"pg": "^8.16.3",
|
|
62
63
|
"tsx": "^4.20.3"
|
|
63
64
|
},
|