@proconnect-gouv/proconnect.identite 1.6.0 → 1.7.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 (58) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/managers/organization/adapters/index.d.ts +2 -0
  3. package/dist/managers/organization/adapters/index.d.ts.map +1 -0
  4. package/dist/managers/organization/adapters/index.js +1 -0
  5. package/dist/managers/organization/index.d.ts +1 -1
  6. package/dist/managers/organization/index.d.ts.map +1 -1
  7. package/dist/managers/organization/index.js +1 -1
  8. package/dist/managers/organization/mark-domain-as-verified.d.ts +14 -6
  9. package/dist/managers/organization/mark-domain-as-verified.d.ts.map +1 -1
  10. package/dist/managers/organization/mark-domain-as-verified.js +7 -7
  11. package/dist/repositories/email-domain/add-domain.d.ts +12 -3
  12. package/dist/repositories/email-domain/add-domain.d.ts.map +1 -1
  13. package/dist/repositories/email-domain/delete-email-domains-by-verification-types.d.ts +2 -2
  14. package/dist/repositories/email-domain/delete-email-domains-by-verification-types.d.ts.map +1 -1
  15. package/dist/repositories/email-domain/delete-email-domains-by-verification-types.js +1 -3
  16. package/dist/repositories/email-domain/find-email-domains-by-organization-id.d.ts +11 -2
  17. package/dist/repositories/email-domain/find-email-domains-by-organization-id.d.ts.map +1 -1
  18. package/dist/repositories/organization/find-by-user-id.d.ts +1 -1
  19. package/dist/repositories/organization/get-users-by-organization.d.ts +1 -1
  20. package/dist/repositories/organization/index.d.ts +0 -1
  21. package/dist/repositories/organization/index.d.ts.map +1 -1
  22. package/dist/repositories/organization/index.js +0 -1
  23. package/dist/repositories/organization/link-user-to-organization.d.ts +1 -1
  24. package/dist/repositories/user/update-user-organization-link.d.ts +1 -1
  25. package/dist/services/organization/is-domain-allowed-for-organization.js +1 -1
  26. package/dist/services/organization/is-public-service.d.ts +1 -1
  27. package/dist/services/organization/is-public-service.d.ts.map +1 -1
  28. package/dist/types/email-domain.d.ts +37 -16
  29. package/dist/types/email-domain.d.ts.map +1 -1
  30. package/dist/types/email-domain.js +30 -7
  31. package/dist/types/user-organization-link.d.ts +7 -6
  32. package/dist/types/user-organization-link.d.ts.map +1 -1
  33. package/package.json +12 -11
  34. package/src/managers/organization/adapters/index.ts +1 -0
  35. package/src/managers/organization/index.ts +1 -1
  36. package/src/managers/organization/mark-domain-as-verified.test.ts.snapshot +2 -1
  37. package/src/managers/organization/mark-domain-as-verified.ts +23 -22
  38. package/src/managers/user/assign-user-verification-type-to-domain.test.ts +97 -0
  39. package/src/repositories/email-domain/add-domain.ts +6 -2
  40. package/src/repositories/email-domain/delete-email-domains-by-verification-types.test.ts +2 -2
  41. package/src/repositories/email-domain/delete-email-domains-by-verification-types.ts +7 -7
  42. package/src/repositories/email-domain/find-email-domains-by-organization-id.test.ts +3 -3
  43. package/src/repositories/organization/index.ts +0 -1
  44. package/src/services/organization/is-domain-allowed-for-organization.ts +1 -1
  45. package/src/services/organization/is-public-service.ts +1 -1
  46. package/src/types/email-domain.ts +44 -27
  47. package/src/types/user-organization-link.ts +2 -0
  48. package/tsconfig.lib.tsbuildinfo +1 -1
  49. package/dist/managers/organization/force-join-organization.d.ts +0 -29
  50. package/dist/managers/organization/force-join-organization.d.ts.map +0 -1
  51. package/dist/managers/organization/force-join-organization.js +0 -32
  52. package/dist/repositories/organization/get-by-id.d.ts +0 -4
  53. package/dist/repositories/organization/get-by-id.d.ts.map +0 -1
  54. package/dist/repositories/organization/get-by-id.js +0 -15
  55. package/src/managers/organization/force-join-organization.test.ts +0 -94
  56. package/src/managers/organization/force-join-organization.ts +0 -87
  57. package/src/repositories/organization/get-by-id.test.ts +0 -61
  58. package/src/repositories/organization/get-by-id.ts +0 -21
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @proconnect-gouv/proconnect.identite
2
2
 
3
+ ## 1.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1762](https://github.com/proconnect-gouv/proconnect-identite/pull/1762) [`8d3fc90`](https://github.com/proconnect-gouv/proconnect-identite/commit/8d3fc90e8e1302ed3193b69baeecce66df0e9e1a) Thanks [@rdubigny](https://github.com/rdubigny)! - Les verification_type de la table email_domains ne peuvent plus être null. Ils prennent la valeur not_verified_yet à la place. On décommissione aussi la function forceJoinOrganization disponible via API au profil d'une logique centralisée dans Hyyypertool.
8
+
9
+ ## 1.6.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [#1766](https://github.com/proconnect-gouv/proconnect-identite/pull/1766) [`68dcd88`](https://github.com/proconnect-gouv/proconnect-identite/commit/68dcd887dafaa3124b691d18c647a9a037d87541) Thanks [@BenoitSerrano](https://github.com/BenoitSerrano)! - ajout de barrel file au dossier adapters
14
+
3
15
  ## 1.6.0
4
16
 
5
17
  ### Minor Changes
@@ -0,0 +1,2 @@
1
+ export * from "./api_entreprise.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/managers/organization/adapters/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./api_entreprise.js";
@@ -1,4 +1,4 @@
1
- export * from "./force-join-organization.js";
1
+ export * from "./adapters/index.js";
2
2
  export * from "./get-organization-info.js";
3
3
  export * from "./mark-domain-as-verified.js";
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/managers/organization/index.ts"],"names":[],"mappings":"AAEA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/managers/organization/index.ts"],"names":[],"mappings":"AAEA,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC"}
@@ -1,4 +1,4 @@
1
1
  //
2
- export * from "./force-join-organization.js";
2
+ export * from "./adapters/index.js";
3
3
  export * from "./get-organization-info.js";
4
4
  export * from "./mark-domain-as-verified.js";
@@ -1,8 +1,7 @@
1
- import type { GetUsersByOrganizationHandler } from "#src/repositories/organization";
1
+ import type { AddDomainHandler, DeleteEmailDomainsByVerificationTypesHandler } from "#src/repositories/email-domain";
2
+ import type { FindByIdHandler, GetUsersByOrganizationHandler } from "#src/repositories/organization";
2
3
  import type { UpdateUserOrganizationLinkHandler } from "#src/repositories/user";
3
- import type { AddDomainHandler, DeleteEmailDomainsByVerificationTypesHandler } from "@proconnect-gouv/proconnect.identite/repositories/email-domain";
4
- import type { FindByIdHandler } from "@proconnect-gouv/proconnect.identite/repositories/organization";
5
- import { type EmailDomainVerificationType } from "@proconnect-gouv/proconnect.identite/types";
4
+ import { type EmailDomainNoPendingVerificationType } from "#src/types";
6
5
  type FactoryDependencies = {
7
6
  addDomain: AddDomainHandler;
8
7
  deleteEmailDomainsByVerificationTypes: DeleteEmailDomainsByVerificationTypesHandler;
@@ -13,8 +12,17 @@ type FactoryDependencies = {
13
12
  export declare function markDomainAsVerifiedFactory({ addDomain, deleteEmailDomainsByVerificationTypes, findOrganizationById, getUsers, updateUserOrganizationLink, }: FactoryDependencies): ({ organization_id, domain, domain_verification_type, }: {
14
13
  organization_id: number;
15
14
  domain: string;
16
- domain_verification_type: NonNullable<EmailDomainVerificationType>;
17
- }) => Promise<import("@proconnect-gouv/proconnect.identite/types").EmailDomain>;
15
+ domain_verification_type: EmailDomainNoPendingVerificationType;
16
+ }) => Promise<{
17
+ id: number;
18
+ organization_id: number;
19
+ domain: string;
20
+ verification_type: "official_contact" | "trackdechets_postal_mail" | "verified" | "external" | "not_verified_yet" | "blacklisted" | "refused";
21
+ can_be_suggested: boolean;
22
+ verified_at: Date | null;
23
+ created_at: Date;
24
+ updated_at: Date;
25
+ }>;
18
26
  export type MarkDomainAsVerifiedHandler = ReturnType<typeof markDomainAsVerifiedFactory>;
19
27
  export {};
20
28
  //# sourceMappingURL=mark-domain-as-verified.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mark-domain-as-verified.d.ts","sourceRoot":"","sources":["../../../src/managers/organization/mark-domain-as-verified.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AACpF,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EACV,gBAAgB,EAChB,4CAA4C,EAC7C,MAAM,gEAAgE,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gEAAgE,CAAC;AACtG,OAAO,EAKL,KAAK,2BAA2B,EACjC,MAAM,4CAA4C,CAAC;AAMpD,KAAK,mBAAmB,GAAG;IACzB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,qCAAqC,EAAE,4CAA4C,CAAC;IACpF,oBAAoB,EAAE,eAAe,CAAC;IACtC,QAAQ,EAAE,6BAA6B,CAAC;IACxC,0BAA0B,EAAE,iCAAiC,CAAC;CAC/D,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,EAC1C,SAAS,EACT,qCAAqC,EACrC,oBAAoB,EACpB,QAAQ,EACR,0BAA0B,GAC3B,EAAE,mBAAmB,IAMuB,wDAIxC;IACD,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,wBAAwB,EAAE,WAAW,CAAC,2BAA2B,CAAC,CAAC;CACpE,+EAoFF;AAED,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAClD,OAAO,2BAA2B,CACnC,CAAC"}
1
+ {"version":3,"file":"mark-domain-as-verified.d.ts","sourceRoot":"","sources":["../../../src/managers/organization/mark-domain-as-verified.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,gBAAgB,EAChB,4CAA4C,EAC7C,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACV,eAAe,EACf,6BAA6B,EAC9B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAGL,KAAK,oCAAoC,EAK1C,MAAM,YAAY,CAAC;AAOpB,KAAK,mBAAmB,GAAG;IACzB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,qCAAqC,EAAE,4CAA4C,CAAC;IACpF,oBAAoB,EAAE,eAAe,CAAC;IACtC,QAAQ,EAAE,6BAA6B,CAAC;IACxC,0BAA0B,EAAE,iCAAiC,CAAC;CAC/D,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,EAC1C,SAAS,EACT,qCAAqC,EACrC,oBAAoB,EACpB,QAAQ,EACR,0BAA0B,GAC3B,EAAE,mBAAmB,IAMuB,wDAIxC;IACD,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,wBAAwB,EAAE,oCAAoC,CAAC;CAChE;;;;;;;;;GAgFF;AAED,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAClD,OAAO,2BAA2B,CACnC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  //
2
2
  import { NotFoundError } from "#src/errors";
3
3
  import { assignUserVerificationTypeToDomainFactory } from "#src/managers/user";
4
- import { EMAIL_DOMAIN_APPROVED_VERIFICATION_TYPES, EMAIL_DOMAIN_REJECTED_VERIFICATION_TYPES, } from "@proconnect-gouv/proconnect.identite/types";
4
+ import { EmailDomainApprovedVerificationTypes, EmailDomainPendingVerificationTypes, EmailDomainRejectedVerificationTypes, } from "#src/types";
5
5
  import { isEmpty } from "lodash-es";
6
6
  import { match } from "ts-pattern";
7
7
  export function markDomainAsVerifiedFactory({ addDomain, deleteEmailDomainsByVerificationTypes, findOrganizationById, getUsers, updateUserOrganizationLink, }) {
@@ -15,7 +15,7 @@ export function markDomainAsVerifiedFactory({ addDomain, deleteEmailDomainsByVer
15
15
  throw new NotFoundError();
16
16
  }
17
17
  return match(domain_verification_type)
18
- .with(EMAIL_DOMAIN_APPROVED_VERIFICATION_TYPES.enum.official_contact, EMAIL_DOMAIN_APPROVED_VERIFICATION_TYPES.enum.trackdechets_postal_mail, EMAIL_DOMAIN_APPROVED_VERIFICATION_TYPES.enum.verified, ...EMAIL_DOMAIN_APPROVED_VERIFICATION_TYPES.options, async (approved_verification_type) => {
18
+ .with(...EmailDomainApprovedVerificationTypes, async (approved_verification_type) => {
19
19
  await assignUserVerificationTypeToDomain(organization_id, domain);
20
20
  return markDomainAsApproved({
21
21
  organization_id,
@@ -23,7 +23,7 @@ export function markDomainAsVerifiedFactory({ addDomain, deleteEmailDomainsByVer
23
23
  domain_verification_type: approved_verification_type,
24
24
  });
25
25
  })
26
- .with(EMAIL_DOMAIN_REJECTED_VERIFICATION_TYPES.enum.blacklisted, EMAIL_DOMAIN_REJECTED_VERIFICATION_TYPES.enum.external, EMAIL_DOMAIN_REJECTED_VERIFICATION_TYPES.enum.refused, ...EMAIL_DOMAIN_REJECTED_VERIFICATION_TYPES.options, (rejected_verification_type) => markDomainAsRejected({
26
+ .with(...EmailDomainRejectedVerificationTypes, (rejected_verification_type) => markDomainAsRejected({
27
27
  organization_id,
28
28
  domain,
29
29
  domain_verification_type: rejected_verification_type,
@@ -35,8 +35,8 @@ export function markDomainAsVerifiedFactory({ addDomain, deleteEmailDomainsByVer
35
35
  organization_id,
36
36
  domain,
37
37
  domain_verification_types: [
38
- ...EMAIL_DOMAIN_APPROVED_VERIFICATION_TYPES.options,
39
- null,
38
+ ...EmailDomainApprovedVerificationTypes,
39
+ ...EmailDomainPendingVerificationTypes,
40
40
  ],
41
41
  });
42
42
  return addDomain({
@@ -50,8 +50,8 @@ export function markDomainAsVerifiedFactory({ addDomain, deleteEmailDomainsByVer
50
50
  organization_id,
51
51
  domain,
52
52
  domain_verification_types: [
53
- null,
54
- ...EMAIL_DOMAIN_REJECTED_VERIFICATION_TYPES.options,
53
+ ...EmailDomainPendingVerificationTypes,
54
+ ...EmailDomainRejectedVerificationTypes,
55
55
  ],
56
56
  });
57
57
  return addDomain({
@@ -1,8 +1,17 @@
1
- import type { DatabaseContext, EmailDomain } from "#src/types";
1
+ import type { DatabaseContext, EmailDomainVerificationType } from "#src/types";
2
2
  export declare function addDomainFactory({ pg }: DatabaseContext): ({ organization_id, domain, verification_type, }: {
3
3
  organization_id: number;
4
4
  domain: string;
5
- verification_type: EmailDomain["verification_type"];
6
- }) => Promise<EmailDomain>;
5
+ verification_type: EmailDomainVerificationType;
6
+ }) => Promise<{
7
+ id: number;
8
+ organization_id: number;
9
+ domain: string;
10
+ verification_type: "official_contact" | "trackdechets_postal_mail" | "verified" | "external" | "not_verified_yet" | "blacklisted" | "refused";
11
+ can_be_suggested: boolean;
12
+ verified_at: Date | null;
13
+ created_at: Date;
14
+ updated_at: Date;
15
+ }>;
7
16
  export type AddDomainHandler = ReturnType<typeof addDomainFactory>;
8
17
  //# sourceMappingURL=add-domain.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"add-domain.d.ts","sourceRoot":"","sources":["../../../src/repositories/email-domain/add-domain.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAK/D,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,EAAE,EAAE,eAAe,IACtB,iDAI7B;IACD,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CAAC,CAAC;CACrD,0BA4BF;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"add-domain.d.ts","sourceRoot":"","sources":["../../../src/repositories/email-domain/add-domain.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EAEf,2BAA2B,EAC5B,MAAM,YAAY,CAAC;AAKpB,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,EAAE,EAAE,eAAe,IACtB,iDAI7B;IACD,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,2BAA2B,CAAC;CAChD;;;;;;;;;GA4BF;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
- import type { DatabaseContext, EmailDomain } from "#src/types";
1
+ import type { DatabaseContext, EmailDomain, EmailDomainVerificationType } from "#src/types";
2
2
  export declare function deleteEmailDomainsByVerificationTypesFactory({ pg, }: DatabaseContext): ({ organization_id, domain, domain_verification_types, }: {
3
3
  organization_id: EmailDomain["organization_id"];
4
- domain_verification_types: EmailDomain["verification_type"][];
4
+ domain_verification_types: EmailDomainVerificationType[];
5
5
  domain: EmailDomain["domain"];
6
6
  }) => Promise<import("pg").QueryResult<any>>;
7
7
  export type DeleteEmailDomainsByVerificationTypesHandler = ReturnType<typeof deleteEmailDomainsByVerificationTypesFactory>;
@@ -1 +1 @@
1
- {"version":3,"file":"delete-email-domains-by-verification-types.d.ts","sourceRoot":"","sources":["../../../src/repositories/email-domain/delete-email-domains-by-verification-types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAI/D,wBAAgB,4CAA4C,CAAC,EAC3D,EAAE,GACH,EAAE,eAAe,IAC4C,yDAIzD;IACD,eAAe,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAChD,yBAAyB,EAAE,WAAW,CAAC,mBAAmB,CAAC,EAAE,CAAC;IAC9D,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;CAC/B,4CAuBF;AAED,MAAM,MAAM,4CAA4C,GAAG,UAAU,CACnE,OAAO,4CAA4C,CACpD,CAAC"}
1
+ {"version":3,"file":"delete-email-domains-by-verification-types.d.ts","sourceRoot":"","sources":["../../../src/repositories/email-domain/delete-email-domains-by-verification-types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,2BAA2B,EAC5B,MAAM,YAAY,CAAC;AAIpB,wBAAgB,4CAA4C,CAAC,EAC3D,EAAE,GACH,EAAE,eAAe,IAC4C,yDAIzD;IACD,eAAe,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAChD,yBAAyB,EAAE,2BAA2B,EAAE,CAAC;IACzD,MAAM,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;CAC/B,4CAmBF;AAED,MAAM,MAAM,4CAA4C,GAAG,UAAU,CACnE,OAAO,4CAA4C,CACpD,CAAC"}
@@ -3,9 +3,7 @@
3
3
  export function deleteEmailDomainsByVerificationTypesFactory({ pg, }) {
4
4
  return async function deleteEmailDomainsByVerificationTypes({ organization_id, domain, domain_verification_types, }) {
5
5
  const SQL_VERIFICATION_TYPES = domain_verification_types
6
- .map((type) => type === null
7
- ? "verification_type IS NULL"
8
- : `verification_type = '${type}'`)
6
+ .map((type) => `verification_type = '${type}'`)
9
7
  .join(" OR ");
10
8
  return pg.query(`
11
9
  DELETE FROM email_domains
@@ -1,4 +1,13 @@
1
- import type { DatabaseContext, EmailDomain } from "#src/types";
2
- export declare function findEmailDomainsByOrganizationIdFactory({ pg, }: DatabaseContext): (organization_id: number) => Promise<EmailDomain[]>;
1
+ import type { DatabaseContext } from "#src/types";
2
+ export declare function findEmailDomainsByOrganizationIdFactory({ pg, }: DatabaseContext): (organization_id: number) => Promise<{
3
+ id: number;
4
+ organization_id: number;
5
+ domain: string;
6
+ verification_type: "official_contact" | "trackdechets_postal_mail" | "verified" | "external" | "not_verified_yet" | "blacklisted" | "refused";
7
+ can_be_suggested: boolean;
8
+ verified_at: Date | null;
9
+ created_at: Date;
10
+ updated_at: Date;
11
+ }[]>;
3
12
  export type FindEmailDomainsByOrganizationIdHandler = ReturnType<typeof findEmailDomainsByOrganizationIdFactory>;
4
13
  //# sourceMappingURL=find-email-domains-by-organization-id.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"find-email-domains-by-organization-id.d.ts","sourceRoot":"","sources":["../../../src/repositories/email-domain/find-email-domains-by-organization-id.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAK/D,wBAAgB,uCAAuC,CAAC,EACtD,EAAE,GACH,EAAE,eAAe,IAEd,iBAAiB,MAAM,4BAY1B;AAED,MAAM,MAAM,uCAAuC,GAAG,UAAU,CAC9D,OAAO,uCAAuC,CAC/C,CAAC"}
1
+ {"version":3,"file":"find-email-domains-by-organization-id.d.ts","sourceRoot":"","sources":["../../../src/repositories/email-domain/find-email-domains-by-organization-id.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAe,MAAM,YAAY,CAAC;AAK/D,wBAAgB,uCAAuC,CAAC,EACtD,EAAE,GACH,EAAE,eAAe,IAEd,iBAAiB,MAAM;;;;;;;;;KAY1B;AAED,MAAM,MAAM,uCAAuC,GAAG,UAAU,CAC9D,OAAO,uCAAuC,CAC/C,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { DatabaseContext, Organization } from "#src/types";
2
2
  export declare function findByUserIdFactory({ pg }: DatabaseContext): (userId: number) => Promise<(Organization & {
3
3
  is_external: boolean;
4
- verification_type: "organization_dirigeant" | "code_sent_to_official_contact_email" | "domain" | "imported_from_coop_mediation_numerique" | "imported_from_inclusion_connect" | "in_liste_dirigeants_rna" | "in_liste_dirigeants_rne" | "official_contact_email" | "ordre_professionnel_domain" | "proof_received" | "verified_by_coop_mediation_numerique" | "bypassed" | "domain_not_verified_yet" | "no_validation_means_available" | "no_verification_means_for_entreprise_unipersonnelle" | "no_verification_means_for_small_association";
4
+ verification_type: "domain" | "organization_dirigeant" | "code_sent_to_official_contact_email" | "imported_from_coop_mediation_numerique" | "imported_from_inclusion_connect" | "in_liste_dirigeants_rna" | "in_liste_dirigeants_rne" | "official_contact_email" | "ordre_professionnel_domain" | "proof_received" | "verified_by_coop_mediation_numerique" | "bypassed" | "domain_not_verified_yet" | "no_validation_means_available" | "no_verification_means_for_entreprise_unipersonnelle" | "no_verification_means_for_small_association";
5
5
  verified_at: Date | null;
6
6
  has_been_greeted: boolean;
7
7
  needs_official_contact_email_verification: boolean;
@@ -1,7 +1,7 @@
1
1
  import type { DatabaseContext, User } from "#src/types";
2
2
  export declare function getUsersByOrganizationFactory({ pg }: DatabaseContext): (organization_id: number, additionalWhereClause?: string, additionalParams?: any[]) => Promise<(User & {
3
3
  is_external: boolean;
4
- verification_type: "organization_dirigeant" | "code_sent_to_official_contact_email" | "domain" | "imported_from_coop_mediation_numerique" | "imported_from_inclusion_connect" | "in_liste_dirigeants_rna" | "in_liste_dirigeants_rne" | "official_contact_email" | "ordre_professionnel_domain" | "proof_received" | "verified_by_coop_mediation_numerique" | "bypassed" | "domain_not_verified_yet" | "no_validation_means_available" | "no_verification_means_for_entreprise_unipersonnelle" | "no_verification_means_for_small_association";
4
+ verification_type: "domain" | "organization_dirigeant" | "code_sent_to_official_contact_email" | "imported_from_coop_mediation_numerique" | "imported_from_inclusion_connect" | "in_liste_dirigeants_rna" | "in_liste_dirigeants_rne" | "official_contact_email" | "ordre_professionnel_domain" | "proof_received" | "verified_by_coop_mediation_numerique" | "bypassed" | "domain_not_verified_yet" | "no_validation_means_available" | "no_verification_means_for_entreprise_unipersonnelle" | "no_verification_means_for_small_association";
5
5
  verified_at: Date | null;
6
6
  has_been_greeted: boolean;
7
7
  needs_official_contact_email_verification: boolean;
@@ -1,6 +1,5 @@
1
1
  export * from "./find-by-id.js";
2
2
  export * from "./find-by-user-id.js";
3
- export * from "./get-by-id.js";
4
3
  export * from "./get-users-by-organization.js";
5
4
  export * from "./link-user-to-organization.js";
6
5
  export * from "./upsert.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/repositories/organization/index.ts"],"names":[],"mappings":"AAEA,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/repositories/organization/index.ts"],"names":[],"mappings":"AAEA,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,aAAa,CAAC"}
@@ -1,7 +1,6 @@
1
1
  //
2
2
  export * from "./find-by-id.js";
3
3
  export * from "./find-by-user-id.js";
4
- export * from "./get-by-id.js";
5
4
  export * from "./get-users-by-organization.js";
6
5
  export * from "./link-user-to-organization.js";
7
6
  export * from "./upsert.js";
@@ -1,7 +1,7 @@
1
1
  import type { DatabaseContext, InsertUserOrganizationLink } from "#src/types";
2
2
  export declare function linkUserToOrganizationFactory({ pg }: DatabaseContext): ({ is_external, needs_official_contact_email_verification, organization_id, user_id, verification_type, }: InsertUserOrganizationLink) => Promise<{
3
3
  is_external: boolean;
4
- verification_type: "organization_dirigeant" | "code_sent_to_official_contact_email" | "domain" | "imported_from_coop_mediation_numerique" | "imported_from_inclusion_connect" | "in_liste_dirigeants_rna" | "in_liste_dirigeants_rne" | "official_contact_email" | "ordre_professionnel_domain" | "proof_received" | "verified_by_coop_mediation_numerique" | "bypassed" | "domain_not_verified_yet" | "no_validation_means_available" | "no_verification_means_for_entreprise_unipersonnelle" | "no_verification_means_for_small_association";
4
+ verification_type: "domain" | "organization_dirigeant" | "code_sent_to_official_contact_email" | "imported_from_coop_mediation_numerique" | "imported_from_inclusion_connect" | "in_liste_dirigeants_rna" | "in_liste_dirigeants_rne" | "official_contact_email" | "ordre_professionnel_domain" | "proof_received" | "verified_by_coop_mediation_numerique" | "bypassed" | "domain_not_verified_yet" | "no_validation_means_available" | "no_verification_means_for_entreprise_unipersonnelle" | "no_verification_means_for_small_association";
5
5
  verified_at: Date | null;
6
6
  has_been_greeted: boolean;
7
7
  needs_official_contact_email_verification: boolean;
@@ -1,7 +1,7 @@
1
1
  import type { DatabaseContext, UserOrganizationLink } from "#src/types";
2
2
  export declare function updateUserOrganizationLinkFactory({ pg }: DatabaseContext): (organization_id: number, user_id: number, fieldsToUpdate: Partial<UserOrganizationLink>) => Promise<{
3
3
  is_external: boolean;
4
- verification_type: "organization_dirigeant" | "code_sent_to_official_contact_email" | "domain" | "imported_from_coop_mediation_numerique" | "imported_from_inclusion_connect" | "in_liste_dirigeants_rna" | "in_liste_dirigeants_rne" | "official_contact_email" | "ordre_professionnel_domain" | "proof_received" | "verified_by_coop_mediation_numerique" | "bypassed" | "domain_not_verified_yet" | "no_validation_means_available" | "no_verification_means_for_entreprise_unipersonnelle" | "no_verification_means_for_small_association";
4
+ verification_type: "domain" | "organization_dirigeant" | "code_sent_to_official_contact_email" | "imported_from_coop_mediation_numerique" | "imported_from_inclusion_connect" | "in_liste_dirigeants_rna" | "in_liste_dirigeants_rne" | "official_contact_email" | "ordre_professionnel_domain" | "proof_received" | "verified_by_coop_mediation_numerique" | "bypassed" | "domain_not_verified_yet" | "no_validation_means_available" | "no_verification_means_for_entreprise_unipersonnelle" | "no_verification_means_for_small_association";
5
5
  verified_at: Date | null;
6
6
  has_been_greeted: boolean;
7
7
  needs_official_contact_email_verification: boolean;
@@ -1,4 +1,4 @@
1
- import { DOMAINS_WHITELIST } from "@proconnect-gouv/proconnect.identite/data/organization";
1
+ import { DOMAINS_WHITELIST } from "#src/data/organization";
2
2
  export function isDomainAllowedForOrganization(siret, domain) {
3
3
  const whitelist = DOMAINS_WHITELIST.get(siret);
4
4
  // Allow unknown siret to ignore whitelisting
@@ -1,3 +1,3 @@
1
- import type { Organization } from "@proconnect-gouv/proconnect.identite/types";
1
+ import type { Organization } from "#src/types";
2
2
  export declare const isPublicService: ({ cached_categorie_juridique, cached_etat_administratif, siret, }: Organization) => boolean;
3
3
  //# sourceMappingURL=is-public-service.d.ts.map
@@ -1 +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,OAiCjB,CAAC"}
1
+ {"version":3,"file":"is-public-service.d.ts","sourceRoot":"","sources":["../../../src/services/organization/is-public-service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAQ/C,eAAO,MAAM,eAAe,GAAI,mEAI7B,YAAY,KAAG,OAiCjB,CAAC"}
@@ -1,25 +1,46 @@
1
1
  import { z } from "zod";
2
- export declare const EMAIL_DOMAIN_APPROVED_VERIFICATION_TYPES: z.ZodEnum<{
2
+ export declare const EmailDomainApprovedVerificationTypes: readonly ["official_contact", "trackdechets_postal_mail", "verified", "external"];
3
+ export type EmailDomainApprovedVerificationType = z.output<typeof EmailDomainApprovedVerificationTypes>;
4
+ export declare const EmailDomainPendingVerificationTypes: readonly ["not_verified_yet"];
5
+ export type EmailDomainPendingVerificationType = z.output<typeof EmailDomainPendingVerificationTypes>;
6
+ export declare const EmailDomainRejectedVerificationTypes: readonly ["blacklisted", "refused"];
7
+ export type EmailDomainRejectedVerificationType = z.output<typeof EmailDomainRejectedVerificationTypes>;
8
+ export declare const EmailDomainNoPendingVerificationTypes: z.ZodEnum<{
3
9
  official_contact: "official_contact";
4
10
  trackdechets_postal_mail: "trackdechets_postal_mail";
5
11
  verified: "verified";
6
- }>;
7
- export type EmailDomainApprovedVerificationType = z.output<typeof EMAIL_DOMAIN_APPROVED_VERIFICATION_TYPES>;
8
- export declare const EMAIL_DOMAIN_REJECTED_VERIFICATION_TYPES: z.ZodEnum<{
12
+ external: "external";
9
13
  blacklisted: "blacklisted";
14
+ refused: "refused";
15
+ }>;
16
+ export type EmailDomainNoPendingVerificationType = z.output<typeof EmailDomainNoPendingVerificationTypes>;
17
+ export declare const EmailDomainVerificationTypes: z.ZodEnum<{
18
+ official_contact: "official_contact";
19
+ trackdechets_postal_mail: "trackdechets_postal_mail";
20
+ verified: "verified";
10
21
  external: "external";
22
+ not_verified_yet: "not_verified_yet";
23
+ blacklisted: "blacklisted";
11
24
  refused: "refused";
12
25
  }>;
13
- export type EmailDomainRejectedVerificationType = z.output<typeof EMAIL_DOMAIN_REJECTED_VERIFICATION_TYPES>;
14
- export type EmailDomainVerificationType = EmailDomainApprovedVerificationType | EmailDomainRejectedVerificationType | null;
15
- export interface EmailDomain {
16
- id: number;
17
- organization_id: number;
18
- domain: string;
19
- verification_type: EmailDomainVerificationType;
20
- can_be_suggested: boolean;
21
- verified_at: Date | null;
22
- created_at: Date;
23
- updated_at: Date;
24
- }
26
+ export type EmailDomainVerificationType = z.output<typeof EmailDomainVerificationTypes>;
27
+ export declare const EmailDomainSchema: z.ZodObject<{
28
+ id: z.ZodNumber;
29
+ organization_id: z.ZodNumber;
30
+ domain: z.ZodString;
31
+ verification_type: z.ZodEnum<{
32
+ official_contact: "official_contact";
33
+ trackdechets_postal_mail: "trackdechets_postal_mail";
34
+ verified: "verified";
35
+ external: "external";
36
+ not_verified_yet: "not_verified_yet";
37
+ blacklisted: "blacklisted";
38
+ refused: "refused";
39
+ }>;
40
+ can_be_suggested: z.ZodBoolean;
41
+ verified_at: z.ZodNullable<z.ZodDate>;
42
+ created_at: z.ZodDate;
43
+ updated_at: z.ZodDate;
44
+ }, z.core.$strip>;
45
+ export type EmailDomain = z.output<typeof EmailDomainSchema>;
25
46
  //# sourceMappingURL=email-domain.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"email-domain.d.ts","sourceRoot":"","sources":["../../src/types/email-domain.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,wCAAwC;;;;EAInD,CAAC;AAEH,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CACxD,OAAO,wCAAwC,CAChD,CAAC;AAIF,eAAO,MAAM,wCAAwC;;;;EAInD,CAAC;AAEH,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CACxD,OAAO,wCAAwC,CAChD,CAAC;AAIF,MAAM,MAAM,2BAA2B,GACnC,mCAAmC,GACnC,mCAAmC,GACnC,IAAI,CAAC;AAET,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,2BAA2B,CAAC;IAE/C,gBAAgB,EAAE,OAAO,CAAC;IAG1B,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;CAClB"}
1
+ {"version":3,"file":"email-domain.d.ts","sourceRoot":"","sources":["../../src/types/email-domain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oCAAoC,mFAKvC,CAAC;AAEX,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CACxD,OAAO,oCAAoC,CAC5C,CAAC;AAGF,eAAO,MAAM,mCAAmC,+BAEtC,CAAC;AAEX,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,MAAM,CACvD,OAAO,mCAAmC,CAC3C,CAAC;AAEF,eAAO,MAAM,oCAAoC,qCAGvC,CAAC;AAEX,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CACxD,OAAO,oCAAoC,CAC5C,CAAC;AAEF,eAAO,MAAM,qCAAqC;;;;;;;EAGhD,CAAC;AAEH,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CACzD,OAAO,qCAAqC,CAC7C,CAAC;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;EAIvC,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAChD,OAAO,4BAA4B,CACpC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;iBAY5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -1,14 +1,37 @@
1
- //
2
1
  import { z } from "zod";
3
- //
4
- export const EMAIL_DOMAIN_APPROVED_VERIFICATION_TYPES = z.enum([
2
+ export const EmailDomainApprovedVerificationTypes = [
5
3
  "official_contact",
6
4
  "trackdechets_postal_mail",
7
5
  "verified",
8
- ]);
9
- //
10
- export const EMAIL_DOMAIN_REJECTED_VERIFICATION_TYPES = z.enum([
11
- "blacklisted", // unused
12
6
  "external", // domain used by external employees (eg. ext.numerique.gouv.fr)
7
+ ];
8
+ // domain is not verified, but users are still permitted to use it
9
+ export const EmailDomainPendingVerificationTypes = [
10
+ "not_verified_yet",
11
+ ];
12
+ export const EmailDomainRejectedVerificationTypes = [
13
+ "blacklisted", // unused
13
14
  "refused",
15
+ ];
16
+ export const EmailDomainNoPendingVerificationTypes = z.enum([
17
+ ...EmailDomainApprovedVerificationTypes,
18
+ ...EmailDomainRejectedVerificationTypes,
19
+ ]);
20
+ export const EmailDomainVerificationTypes = z.enum([
21
+ ...EmailDomainApprovedVerificationTypes,
22
+ ...EmailDomainPendingVerificationTypes,
23
+ ...EmailDomainRejectedVerificationTypes,
14
24
  ]);
25
+ export const EmailDomainSchema = z.object({
26
+ id: z.number(),
27
+ organization_id: z.number(),
28
+ domain: z.string(),
29
+ verification_type: EmailDomainVerificationTypes,
30
+ // Unused.
31
+ can_be_suggested: z.boolean(),
32
+ // Can be updated when verification_type changes.
33
+ // In practice, entries are deleted and recreated rather than updated directly
34
+ verified_at: z.date().nullable(),
35
+ created_at: z.date(),
36
+ updated_at: z.date(),
37
+ });
@@ -4,9 +4,9 @@ export declare const WeakLinkTypes: readonly ["code_sent_to_official_contact_ema
4
4
  export declare const SuperWeakLinkTypes: readonly ["domain_not_verified_yet"];
5
5
  export declare const UnverifiedLinkTypes: readonly ["no_validation_means_available", "no_verification_means_for_entreprise_unipersonnelle", "no_verification_means_for_small_association"];
6
6
  export declare const LinkTypes: z.ZodEnum<{
7
+ domain: "domain";
7
8
  organization_dirigeant: "organization_dirigeant";
8
9
  code_sent_to_official_contact_email: "code_sent_to_official_contact_email";
9
- domain: "domain";
10
10
  imported_from_coop_mediation_numerique: "imported_from_coop_mediation_numerique";
11
11
  imported_from_inclusion_connect: "imported_from_inclusion_connect";
12
12
  in_liste_dirigeants_rna: "in_liste_dirigeants_rna";
@@ -21,12 +21,13 @@ export declare const LinkTypes: z.ZodEnum<{
21
21
  no_verification_means_for_entreprise_unipersonnelle: "no_verification_means_for_entreprise_unipersonnelle";
22
22
  no_verification_means_for_small_association: "no_verification_means_for_small_association";
23
23
  }>;
24
+ export type LinkType = z.output<typeof LinkTypes>;
24
25
  export declare const BaseUserOrganizationLinkSchema: z.ZodObject<{
25
26
  is_external: z.ZodBoolean;
26
27
  verification_type: z.ZodEnum<{
28
+ domain: "domain";
27
29
  organization_dirigeant: "organization_dirigeant";
28
30
  code_sent_to_official_contact_email: "code_sent_to_official_contact_email";
29
- domain: "domain";
30
31
  imported_from_coop_mediation_numerique: "imported_from_coop_mediation_numerique";
31
32
  imported_from_inclusion_connect: "imported_from_inclusion_connect";
32
33
  in_liste_dirigeants_rna: "in_liste_dirigeants_rna";
@@ -51,9 +52,9 @@ export type BaseUserOrganizationLink = z.output<typeof BaseUserOrganizationLinkS
51
52
  export declare const UserOrganizationLinkSchema: z.ZodObject<{
52
53
  is_external: z.ZodBoolean;
53
54
  verification_type: z.ZodEnum<{
55
+ domain: "domain";
54
56
  organization_dirigeant: "organization_dirigeant";
55
57
  code_sent_to_official_contact_email: "code_sent_to_official_contact_email";
56
- domain: "domain";
57
58
  imported_from_coop_mediation_numerique: "imported_from_coop_mediation_numerique";
58
59
  imported_from_inclusion_connect: "imported_from_inclusion_connect";
59
60
  in_liste_dirigeants_rna: "in_liste_dirigeants_rna";
@@ -80,12 +81,10 @@ export declare const UserOrganizationLinkSchema: z.ZodObject<{
80
81
  }, z.core.$strip>;
81
82
  export type UserOrganizationLink = z.output<typeof UserOrganizationLinkSchema>;
82
83
  export declare const InsertUserOrganizationLinkSchema: z.ZodObject<{
83
- user_id: z.ZodNumber;
84
- organization_id: z.ZodNumber;
85
84
  verification_type: z.ZodEnum<{
85
+ domain: "domain";
86
86
  organization_dirigeant: "organization_dirigeant";
87
87
  code_sent_to_official_contact_email: "code_sent_to_official_contact_email";
88
- domain: "domain";
89
88
  imported_from_coop_mediation_numerique: "imported_from_coop_mediation_numerique";
90
89
  imported_from_inclusion_connect: "imported_from_inclusion_connect";
91
90
  in_liste_dirigeants_rna: "in_liste_dirigeants_rna";
@@ -100,6 +99,8 @@ export declare const InsertUserOrganizationLinkSchema: z.ZodObject<{
100
99
  no_verification_means_for_entreprise_unipersonnelle: "no_verification_means_for_entreprise_unipersonnelle";
101
100
  no_verification_means_for_small_association: "no_verification_means_for_small_association";
102
101
  }>;
102
+ organization_id: z.ZodNumber;
103
+ user_id: z.ZodNumber;
103
104
  is_external: z.ZodOptional<z.ZodBoolean>;
104
105
  needs_official_contact_email_verification: z.ZodOptional<z.ZodBoolean>;
105
106
  }, z.core.$strip>;
@@ -1 +1 @@
1
- {"version":3,"file":"user-organization-link.d.ts","sourceRoot":"","sources":["../../src/types/user-organization-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe,qCAAsC,CAAC;AAEnE,eAAO,MAAM,aAAa,6TAahB,CAAC;AAMX,eAAO,MAAM,kBAAkB,sCAAuC,CAAC;AAQvE,eAAO,MAAM,mBAAmB,kJAItB,CAAC;AAEX,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;EAAyD,CAAC;AAEhF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;iBASzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAC7C,OAAO,8BAA8B,CACtC,CAAC;AAIF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOtC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAI/E,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;iBAW5C,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAC/C,OAAO,gCAAgC,CACxC,CAAC"}
1
+ {"version":3,"file":"user-organization-link.d.ts","sourceRoot":"","sources":["../../src/types/user-organization-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe,qCAAsC,CAAC;AAEnE,eAAO,MAAM,aAAa,6TAahB,CAAC;AAMX,eAAO,MAAM,kBAAkB,sCAAuC,CAAC;AAQvE,eAAO,MAAM,mBAAmB,kJAItB,CAAC;AAEX,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;EAAyD,CAAC;AAEhF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;iBASzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAC7C,OAAO,8BAA8B,CACtC,CAAC;AAIF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOtC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAI/E,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;iBAW5C,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAC/C,OAAO,gCAAgC,CACxC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proconnect-gouv/proconnect.identite",
3
- "version": "1.6.0",
3
+ "version": "1.7.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": {
@@ -21,16 +21,16 @@
21
21
  },
22
22
  "exports": {
23
23
  "./*": {
24
- "require": {
25
- "types": "./dist/*/index.d.ts",
26
- "default": "./dist/*/index.js"
27
- },
28
- "import": {
29
- "types": "./dist/*/index.d.ts",
30
- "default": "./dist/*/index.js"
31
- },
32
- "types": "./dist/*/index.d.ts",
33
- "default": "./dist/*/index.js"
24
+ "require": "./dist/*/index.js",
25
+ "import": "./dist/*/index.js",
26
+ "types": "./dist/*/index.d.ts"
27
+ }
28
+ },
29
+ "typesVersions": {
30
+ "*": {
31
+ "*": [
32
+ "./dist/*/index.d.ts"
33
+ ]
34
34
  }
35
35
  },
36
36
  "scripts": {
@@ -46,6 +46,7 @@
46
46
  "leven": "^4.0.0",
47
47
  "openid-client": "^6.6.4",
48
48
  "sql-template-tag": "^5.2.1",
49
+ "ts-pattern": "^5.7.0",
49
50
  "zod": "^4.3.5"
50
51
  },
51
52
  "devDependencies": {
@@ -0,0 +1 @@
1
+ export * from "./api_entreprise.js";
@@ -1,5 +1,5 @@
1
1
  //
2
2
 
3
- export * from "./force-join-organization.js";
3
+ export * from "./adapters/index.js";
4
4
  export * from "./get-organization-info.js";
5
5
  export * from "./mark-domain-as-verified.js";
@@ -25,7 +25,8 @@ exports[`markDomainAsVerified > should update organization members > should call
25
25
  "official_contact",
26
26
  "trackdechets_postal_mail",
27
27
  "verified",
28
- null
28
+ "external",
29
+ "not_verified_yet"
29
30
  ]
30
31
  }
31
32
  ],