@proconnect-gouv/proconnect.identite 16.0.0 → 17.0.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 +18 -0
- package/dist/connectors/index.d.ts +0 -71
- package/dist/connectors/index.d.ts.map +1 -1
- package/dist/connectors/index.js +4 -14
- package/dist/managers/certification/process-certification-dirigeant.d.ts.map +1 -1
- package/dist/managers/organization/get-organization-info.d.ts.map +1 -1
- package/dist/repositories/authenticator/index.d.ts +0 -1
- package/dist/repositories/authenticator/index.d.ts.map +1 -1
- package/dist/repositories/authenticator/index.js +0 -1
- package/dist/repositories/moderation/index.d.ts +0 -2
- package/dist/repositories/moderation/index.d.ts.map +1 -1
- package/dist/repositories/moderation/index.js +0 -2
- package/dist/repositories/organization/index.d.ts +0 -2
- package/dist/repositories/organization/index.d.ts.map +1 -1
- package/dist/repositories/organization/index.js +0 -2
- package/dist/repositories/user/index.d.ts +0 -1
- package/dist/repositories/user/index.d.ts.map +1 -1
- package/dist/repositories/user/index.js +0 -1
- package/dist/types/authenticator.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/connectors/index.ts +0 -17
- package/src/managers/certification/process-certification-dirigeant.ts +1 -2
- package/src/managers/organization/get-organization-info.ts +1 -2
- package/src/repositories/authenticator/index.ts +0 -1
- package/src/repositories/moderation/index.ts +0 -2
- package/src/repositories/organization/index.ts +0 -2
- package/src/repositories/user/index.ts +0 -1
- package/src/types/authenticator.ts +1 -7
- package/testing/index.ts +2 -1
- package/dist/repositories/authenticator/update-authenticator.d.ts +0 -3
- package/dist/repositories/authenticator/update-authenticator.d.ts.map +0 -1
- package/dist/repositories/authenticator/update-authenticator.js +0 -13
- package/dist/repositories/email-deliverability-whitelist/find-email-in-deliverability-white-list.d.ts +0 -3
- package/dist/repositories/email-deliverability-whitelist/find-email-in-deliverability-white-list.d.ts.map +0 -1
- package/dist/repositories/email-deliverability-whitelist/find-email-in-deliverability-white-list.js +0 -15
- package/dist/repositories/email-deliverability-whitelist/index.d.ts +0 -2
- package/dist/repositories/email-deliverability-whitelist/index.d.ts.map +0 -1
- package/dist/repositories/email-deliverability-whitelist/index.js +0 -2
- package/dist/repositories/moderation/find-pending-moderation.d.ts +0 -20
- package/dist/repositories/moderation/find-pending-moderation.d.ts.map +0 -1
- package/dist/repositories/moderation/find-pending-moderation.js +0 -16
- package/dist/repositories/moderation/find-rejected-moderation.d.ts +0 -20
- package/dist/repositories/moderation/find-rejected-moderation.d.ts.map +0 -1
- package/dist/repositories/moderation/find-rejected-moderation.js +0 -17
- package/dist/repositories/organization/find-by-siret.d.ts +0 -3
- package/dist/repositories/organization/find-by-siret.d.ts.map +0 -1
- package/dist/repositories/organization/find-by-siret.js +0 -13
- package/dist/repositories/organization/find-pending-by-user-id.d.ts +0 -6
- package/dist/repositories/organization/find-pending-by-user-id.d.ts.map +0 -1
- package/dist/repositories/organization/find-pending-by-user-id.js +0 -18
- package/dist/repositories/user/find-by-reset-password-token.d.ts +0 -29
- package/dist/repositories/user/find-by-reset-password-token.d.ts.map +0 -1
- package/dist/repositories/user/find-by-reset-password-token.js +0 -12
- package/src/repositories/authenticator/update-authenticator.test.ts +0 -41
- package/src/repositories/authenticator/update-authenticator.ts +0 -29
- package/src/repositories/email-deliverability-whitelist/find-email-in-deliverability-white-list.test.ts +0 -45
- package/src/repositories/email-deliverability-whitelist/find-email-in-deliverability-white-list.ts +0 -24
- package/src/repositories/email-deliverability-whitelist/index.ts +0 -3
- package/src/repositories/moderation/find-pending-moderation.test.ts +0 -57
- package/src/repositories/moderation/find-pending-moderation.ts +0 -35
- package/src/repositories/moderation/find-rejected-moderation.test.ts +0 -57
- package/src/repositories/moderation/find-rejected-moderation.ts +0 -37
- package/src/repositories/organization/find-by-siret.test.ts +0 -35
- package/src/repositories/organization/find-by-siret.ts +0 -21
- package/src/repositories/organization/find-pending-by-user-id.test.ts +0 -51
- package/src/repositories/organization/find-pending-by-user-id.ts +0 -27
- package/src/repositories/user/find-by-reset-password-token.test.ts +0 -37
- package/src/repositories/user/find-by-reset-password-token.ts +0 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @proconnect-gouv/proconnect.identite
|
|
2
2
|
|
|
3
|
+
## 17.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#2414](https://github.com/proconnect-gouv/proconnect-identite/pull/2414) [`1b8f27b`](https://github.com/proconnect-gouv/proconnect-identite/commit/1b8f27b1ebba511ae4fda064460e7f9d38d5fa88) Thanks [@douglasduteil](https://github.com/douglasduteil)! - Retire `findEmailInDeliverabilityWhiteListFactory` (`repositories/email-deliverability-whitelist`) et l'entrée `email_deliverability_whitelist` de `connectors` : la vérification de délivrabilité lit maintenant la base en Drizzle depuis l'application.
|
|
8
|
+
|
|
9
|
+
- [#2416](https://github.com/proconnect-gouv/proconnect-identite/pull/2416) [`34cded0`](https://github.com/proconnect-gouv/proconnect-identite/commit/34cded02cb672ca85f29718379f2a7dd54175fc3) Thanks [@douglasduteil](https://github.com/douglasduteil)! - Retire `findByResetPasswordTokenFactory` (`repositories/user`) et l'entrée `users.findByResetPasswordToken` de `connectors` : la réinitialisation de mot de passe lit maintenant la base en Drizzle depuis l'application.
|
|
10
|
+
|
|
11
|
+
- [#2419](https://github.com/proconnect-gouv/proconnect-identite/pull/2419) [`d60638e`](https://github.com/proconnect-gouv/proconnect-identite/commit/d60638e523dfd4018aa7b33367001c9181bad961) Thanks [@douglasduteil](https://github.com/douglasduteil)! - Retire `findBySiretFactory` (`repositories/organization`) et l'entrée `organizations.findBySiret` de `connectors` : la garde de navigation lit maintenant la base en Drizzle depuis l'application.
|
|
12
|
+
|
|
13
|
+
- [#2420](https://github.com/proconnect-gouv/proconnect-identite/pull/2420) [`3e728cb`](https://github.com/proconnect-gouv/proconnect-identite/commit/3e728cb5acd3254e3fef5665f32ac57dd45e2291) Thanks [@douglasduteil](https://github.com/douglasduteil)! - Retire `findPendingByUserIdFactory` (`repositories/organization`) et l'entrée `organizations.findPendingByUserId` de `connectors` : la page des organisations lit maintenant la base en Drizzle depuis l'application.
|
|
14
|
+
|
|
15
|
+
- [#2417](https://github.com/proconnect-gouv/proconnect-identite/pull/2417) [`678828a`](https://github.com/proconnect-gouv/proconnect-identite/commit/678828a72299c2b41f421aa048981c9fd6b73ad3) Thanks [@douglasduteil](https://github.com/douglasduteil)! - Retire `findPendingModerationFactory` (`repositories/moderation`) et l'entrée `moderations.findPending` de `connectors` : la décision d'adhésion lit maintenant la base en Drizzle depuis l'application.
|
|
16
|
+
|
|
17
|
+
- [#2418](https://github.com/proconnect-gouv/proconnect-identite/pull/2418) [`8577ae3`](https://github.com/proconnect-gouv/proconnect-identite/commit/8577ae3f1fe900d0a242e04d97755a7b4c96fc7d) Thanks [@douglasduteil](https://github.com/douglasduteil)! - Retire `findRejectedModerationFactory` (`repositories/moderation`) et l'entrée `moderations.findRejected` de `connectors` : la décision d'adhésion lit maintenant la base en Drizzle depuis l'application.
|
|
18
|
+
|
|
19
|
+
- [#2535](https://github.com/proconnect-gouv/proconnect-identite/pull/2535) [`83f822e`](https://github.com/proconnect-gouv/proconnect-identite/commit/83f822e5ff3f5b82071491b4baf16e36aab2cf81) Thanks [@douglasduteil](https://github.com/douglasduteil)! - Retire `updateAuthenticatorFactory` (`repositories/authenticator`), exposé aussi par `connectors` (`authenticators.update`). L'application identite met à jour le compteur d'une clé d'accès avec Drizzle.
|
|
20
|
+
|
|
3
21
|
## 16.0.0
|
|
4
22
|
|
|
5
23
|
### Major Changes
|
|
@@ -371,10 +371,6 @@ export declare function createContext({ api_entreprise_client, api_insee_client,
|
|
|
371
371
|
deleteAllByUserId: (user_id: number) => Promise<boolean>;
|
|
372
372
|
find: (user_id: number, serialized_credential_id: string) => Promise<import("../types/authenticator.js").Authenticator | undefined>;
|
|
373
373
|
findByUserId: (user_id: number) => Promise<import("../types/authenticator.js").Authenticator[]>;
|
|
374
|
-
update: (credential_id: import("../types/authenticator.js").Base64URLString, { counter, last_used_at, usage_count }: Partial<import("../types/authenticator.js").BaseAuthenticator>) => Promise<import("../types/authenticator.js").Authenticator>;
|
|
375
|
-
};
|
|
376
|
-
email_deliverability_whitelist: {
|
|
377
|
-
findEmailInDeliverabilityWhiteList: (email: string) => Promise<{} | undefined>;
|
|
378
374
|
};
|
|
379
375
|
email_domains: {
|
|
380
376
|
addDomain: ({ organization_id, domain, verification_type, }: {
|
|
@@ -418,42 +414,6 @@ export declare function createContext({ api_entreprise_client, api_insee_client,
|
|
|
418
414
|
end_user_reason: string;
|
|
419
415
|
allow_editing: boolean;
|
|
420
416
|
} | undefined>;
|
|
421
|
-
findPending: ({ user_id, organization_id, type, }: {
|
|
422
|
-
user_id: number;
|
|
423
|
-
organization_id: number;
|
|
424
|
-
type: import("../types/moderation.js").ModerationType;
|
|
425
|
-
}) => Promise<{
|
|
426
|
-
id: number;
|
|
427
|
-
user_id: number;
|
|
428
|
-
organization_id: number;
|
|
429
|
-
ticket_id: string | null;
|
|
430
|
-
type: "non_verified_domain" | "organization_join_block";
|
|
431
|
-
created_at: Date;
|
|
432
|
-
moderated_at: Date | null;
|
|
433
|
-
comment: string | null;
|
|
434
|
-
moderated_by: string | null;
|
|
435
|
-
status: "accepted" | "pending" | "rejected" | "reopened" | "unknown";
|
|
436
|
-
end_user_reason: string;
|
|
437
|
-
allow_editing: boolean;
|
|
438
|
-
} | undefined>;
|
|
439
|
-
findRejected: ({ user_id, organization_id, type, }: {
|
|
440
|
-
user_id: number;
|
|
441
|
-
organization_id: number;
|
|
442
|
-
type: import("../types/moderation.js").ModerationType;
|
|
443
|
-
}) => Promise<{
|
|
444
|
-
id: number;
|
|
445
|
-
user_id: number;
|
|
446
|
-
organization_id: number;
|
|
447
|
-
ticket_id: string | null;
|
|
448
|
-
type: "non_verified_domain" | "organization_join_block";
|
|
449
|
-
created_at: Date;
|
|
450
|
-
moderated_at: Date | null;
|
|
451
|
-
comment: string | null;
|
|
452
|
-
moderated_by: string | null;
|
|
453
|
-
status: "accepted" | "pending" | "rejected" | "reopened" | "unknown";
|
|
454
|
-
end_user_reason: string;
|
|
455
|
-
allow_editing: boolean;
|
|
456
|
-
} | undefined>;
|
|
457
417
|
getById: (id: number) => Promise<import("../types/moderation.js").Moderation>;
|
|
458
418
|
reopen: ({ id, userEmail, cause, }: {
|
|
459
419
|
id: number;
|
|
@@ -499,15 +459,11 @@ export declare function createContext({ api_entreprise_client, api_insee_client,
|
|
|
499
459
|
};
|
|
500
460
|
organizations: {
|
|
501
461
|
findById: (id: number) => Promise<import("../types/organization.js").Organization | undefined>;
|
|
502
|
-
findBySiret: (siret: string) => Promise<import("../types/organization.js").Organization | undefined>;
|
|
503
462
|
findByUserId: (userId: number) => Promise<(import("../types/organization.js").Organization & {
|
|
504
463
|
is_external: boolean;
|
|
505
464
|
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" | "no_verification_means_for_small_organization";
|
|
506
465
|
verified_at: Date | null;
|
|
507
466
|
})[]>;
|
|
508
|
-
findPendingByUserId: (user_id: number) => Promise<(import("../types/organization.js").Organization & {
|
|
509
|
-
moderation_id: number;
|
|
510
|
-
})[]>;
|
|
511
467
|
getById: (id: number) => Promise<import("../types/organization.js").Organization>;
|
|
512
468
|
upsert: ({ siret, organizationInfo, }: {
|
|
513
469
|
siret: string;
|
|
@@ -654,33 +610,6 @@ export declare function createContext({ api_entreprise_client, api_insee_client,
|
|
|
654
610
|
verify_email_sent_at: Date | null;
|
|
655
611
|
verify_email_token: string | null;
|
|
656
612
|
} | undefined>;
|
|
657
|
-
findByResetPasswordToken: (reset_password_token: string) => Promise<{
|
|
658
|
-
created_at: Date;
|
|
659
|
-
current_challenge: string | null;
|
|
660
|
-
email: string;
|
|
661
|
-
email_verified: boolean;
|
|
662
|
-
email_verified_at: Date | null;
|
|
663
|
-
encrypted_password: string | null;
|
|
664
|
-
encrypted_totp_key: string | null;
|
|
665
|
-
family_name: string | null;
|
|
666
|
-
force_2fa: boolean;
|
|
667
|
-
given_name: string | null;
|
|
668
|
-
id: number;
|
|
669
|
-
job: string | null;
|
|
670
|
-
last_sign_in_at: Date | null;
|
|
671
|
-
magic_link_sent_at: Date | null;
|
|
672
|
-
magic_link_token: string | null;
|
|
673
|
-
needs_inclusionconnect_onboarding_help: boolean;
|
|
674
|
-
needs_inclusionconnect_welcome_page: boolean;
|
|
675
|
-
phone_number: string | null;
|
|
676
|
-
reset_password_sent_at: Date | null;
|
|
677
|
-
reset_password_token: string | null;
|
|
678
|
-
sign_in_count: number;
|
|
679
|
-
totp_key_verified_at: Date | null;
|
|
680
|
-
updated_at: Date;
|
|
681
|
-
verify_email_sent_at: Date | null;
|
|
682
|
-
verify_email_token: string | null;
|
|
683
|
-
} | undefined>;
|
|
684
613
|
getById: (id: number) => Promise<{
|
|
685
614
|
created_at: Date;
|
|
686
615
|
current_challenge: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connectors/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/connectors/index.ts"],"names":[],"mappings":"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"}
|
package/dist/connectors/index.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
//
|
|
2
|
-
import { createAuthenticatorFactory, deleteAllAuthenticatorsByUserIdFactory, deleteAuthenticatorFactory, findAuthenticatorFactory, findAuthenticatorsByUserIdFactory,
|
|
3
|
-
import { findEmailInDeliverabilityWhiteListFactory } from "#src/repositories/email-deliverability-whitelist";
|
|
2
|
+
import { createAuthenticatorFactory, deleteAllAuthenticatorsByUserIdFactory, deleteAuthenticatorFactory, findAuthenticatorFactory, findAuthenticatorsByUserIdFactory, } from "#src/repositories/authenticator";
|
|
4
3
|
import { addDomainFactory, findEmailDomainsByOrganizationIdFactory, } from "#src/repositories/email-domain";
|
|
5
4
|
import { findFranceconnectUserinfoFactory } from "#src/repositories/franceconnect_userinfo";
|
|
6
|
-
import { deleteModerationFactory, findModerationByIdFactory,
|
|
5
|
+
import { deleteModerationFactory, findModerationByIdFactory, getModerationByIdFactory, reopenModerationFactory, } from "#src/repositories/moderation";
|
|
7
6
|
import { deleteOfficialContactEmailVerificationFactory, findOfficialContactEmailVerificationFactory, upsertOfficialContactEmailVerificationFactory, } from "#src/repositories/official-contact-email-verification";
|
|
8
7
|
import { findByClientIdFactory, upsertAuthorizationRequestFactory, } from "#src/repositories/oidc-client";
|
|
9
|
-
import {
|
|
8
|
+
import { findByUserIdFactory, findOrganizationByIdFactory, getOrganizationByIdFactory, upsertFactory, } from "#src/repositories/organization";
|
|
10
9
|
import { createRecoveryWordsFactory, deleteRecoveryWordsByUserIdFactory, findRecoveryWordsByUserIdFactory, } from "#src/repositories/recovery-words";
|
|
11
|
-
import { createUserFactory, findByEmailFactory, findByMagicLinkTokenFactory,
|
|
10
|
+
import { createUserFactory, findByEmailFactory, findByMagicLinkTokenFactory, findByIdFactory as findUserByIdFactory, getByIdFactory, updateUserFactory, } from "#src/repositories/user";
|
|
12
11
|
import { findUserOrganizationFactory, getUserOrganizationFactory, } from "#src/repositories/user_organisation";
|
|
13
12
|
import {} from "pg";
|
|
14
13
|
//
|
|
@@ -26,10 +25,6 @@ export function createContext({ api_entreprise_client, api_insee_client, api_reg
|
|
|
26
25
|
deleteAllByUserId: deleteAllAuthenticatorsByUserIdFactory({ pg }),
|
|
27
26
|
find: findAuthenticatorFactory({ pg }),
|
|
28
27
|
findByUserId: findAuthenticatorsByUserIdFactory({ pg }),
|
|
29
|
-
update: updateAuthenticatorFactory({ pg }),
|
|
30
|
-
},
|
|
31
|
-
email_deliverability_whitelist: {
|
|
32
|
-
findEmailInDeliverabilityWhiteList: findEmailInDeliverabilityWhiteListFactory({ pg }),
|
|
33
28
|
},
|
|
34
29
|
email_domains: {
|
|
35
30
|
addDomain: addDomainFactory({ pg }),
|
|
@@ -38,8 +33,6 @@ export function createContext({ api_entreprise_client, api_insee_client, api_reg
|
|
|
38
33
|
moderations: {
|
|
39
34
|
delete: deleteModerationFactory({ pg }),
|
|
40
35
|
findById: findModerationByIdFactory({ pg }),
|
|
41
|
-
findPending: findPendingModerationFactory({ pg }),
|
|
42
|
-
findRejected: findRejectedModerationFactory({ pg }),
|
|
43
36
|
getById: getModerationByIdFactory({ pg }),
|
|
44
37
|
reopen: reopenModerationFactory({ pg }),
|
|
45
38
|
},
|
|
@@ -54,9 +47,7 @@ export function createContext({ api_entreprise_client, api_insee_client, api_reg
|
|
|
54
47
|
},
|
|
55
48
|
organizations: {
|
|
56
49
|
findById: findOrganizationByIdFactory({ pg }),
|
|
57
|
-
findBySiret: findBySiretFactory({ pg }),
|
|
58
50
|
findByUserId: findByUserIdFactory({ pg }),
|
|
59
|
-
findPendingByUserId: findPendingByUserIdFactory({ pg }),
|
|
60
51
|
getById: getOrganizationByIdFactory({ pg }),
|
|
61
52
|
upsert: upsertFactory({ pg }),
|
|
62
53
|
},
|
|
@@ -74,7 +65,6 @@ export function createContext({ api_entreprise_client, api_insee_client, api_reg
|
|
|
74
65
|
findByEmail: findByEmailFactory({ pg }),
|
|
75
66
|
findById: findUserByIdFactory({ pg }),
|
|
76
67
|
findByMagicLinkToken: findByMagicLinkTokenFactory({ pg }),
|
|
77
|
-
findByResetPasswordToken: findByResetPasswordTokenFactory({ pg }),
|
|
78
68
|
getById: getByIdFactory({ pg }),
|
|
79
69
|
update: updateUserFactory({ pg }),
|
|
80
70
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-certification-dirigeant.d.ts","sourceRoot":"","sources":["../../../src/managers/certification/process-certification-dirigeant.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EAClB,MAAM,YAAY,CAAC;AAEpB,OAAO,CAAC,MAAM,QAAQ,CAAC;AASvB,eAAO,MAAM,gCAAgC;;;;EAI3C,CAAC;AAEH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,gCAAgC,CACxC,CAAC;AAWF,wBAAgB,yCAAyC,CACvD,UAAU,EAAE,gCAAgC,UAG7C;AAID,MAAM,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"process-certification-dirigeant.d.ts","sourceRoot":"","sources":["../../../src/managers/certification/process-certification-dirigeant.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EAClB,MAAM,YAAY,CAAC;AAEpB,OAAO,CAAC,MAAM,QAAQ,CAAC;AASvB,eAAO,MAAM,gCAAgC;;;;EAI3C,CAAC;AAEH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,gCAAgC,CACxC,CAAC;AAWF,wBAAgB,yCAAyC,CACvD,UAAU,EAAE,gCAAgC,UAG7C;AAID,MAAM,MAAM,eAAe,GACzB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC;AAqCnE,wBAAgB,oCAAoC,CAAC,OAAO,EAAE,OAAO,IAMjE,cAAc,YAAY,EAC1B,wBAAwB,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-organization-info.d.ts","sourceRoot":"","sources":["../../../src/managers/organization/get-organization-info.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAK1F,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,+DAA+D,CAAC;AAM1H,MAAM,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"get-organization-info.d.ts","sourceRoot":"","sources":["../../../src/managers/organization/get-organization-info.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AAK1F,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,+DAA+D,CAAC;AAM1H,MAAM,MAAM,aAAa,GACvB;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC;AAEhE,MAAM,MAAM,sBAAsB,GAC9B;IAAE,IAAI,EAAE,uBAAuB,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,iBAAiB,EAAE,gBAAgB,CAAC;IAAC,GAAG,EAAE,aAAa,CAAA;CAAE,GAC1E;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,SAAS,EAAE,iBAAiB,CAAA;CAAE,GACvD;IAAE,IAAI,EAAE,gBAAgB,CAAA;CAAE,CAAC;AAE/B,wBAAgB,0BAA0B,CACxC,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,oCAAoC,IAShD,cAAc,MAAM,KACnB,OAAO,CAAC,sBAAsB,CAAC,CAoDnC;AAED,MAAM,MAAM,0BAA0B,GAAG,UAAU,CACjD,OAAO,0BAA0B,CAClC,CAAC"}
|
|
@@ -3,5 +3,4 @@ export * from "./delete-all-authenticators-by-user-id.js";
|
|
|
3
3
|
export * from "./delete-authenticator.js";
|
|
4
4
|
export * from "./find-authenticator.js";
|
|
5
5
|
export * from "./find-authenticators-by-user-id.js";
|
|
6
|
-
export * from "./update-authenticator.js";
|
|
7
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/repositories/authenticator/index.ts"],"names":[],"mappings":"AAEA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,qCAAqC,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/repositories/authenticator/index.ts"],"names":[],"mappings":"AAEA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,qCAAqC,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export * from "./delete-moderation.js";
|
|
2
2
|
export * from "./find-moderation-by-id.js";
|
|
3
|
-
export * from "./find-pending-moderation.js";
|
|
4
|
-
export * from "./find-rejected-moderation.js";
|
|
5
3
|
export * from "./get-moderation-by-id.js";
|
|
6
4
|
export * from "./reopen-moderation.js";
|
|
7
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/repositories/moderation/index.ts"],"names":[],"mappings":"AAEA,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/repositories/moderation/index.ts"],"names":[],"mappings":"AAEA,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
//
|
|
2
2
|
export * from "./delete-moderation.js";
|
|
3
3
|
export * from "./find-moderation-by-id.js";
|
|
4
|
-
export * from "./find-pending-moderation.js";
|
|
5
|
-
export * from "./find-rejected-moderation.js";
|
|
6
4
|
export * from "./get-moderation-by-id.js";
|
|
7
5
|
export * from "./reopen-moderation.js";
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
export * from "./find-by-siret.js";
|
|
2
1
|
export * from "./find-by-user-id.js";
|
|
3
2
|
export * from "./find-organization-by-id.js";
|
|
4
|
-
export * from "./find-pending-by-user-id.js";
|
|
5
3
|
export * from "./get-organization-by-id.js";
|
|
6
4
|
export * from "./upsert.js";
|
|
7
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/repositories/organization/index.ts"],"names":[],"mappings":"AAEA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/repositories/organization/index.ts"],"names":[],"mappings":"AAEA,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,aAAa,CAAC"}
|
|
@@ -2,7 +2,6 @@ export * from "./create.js";
|
|
|
2
2
|
export * from "./find-by-email.js";
|
|
3
3
|
export * from "./find-by-id.js";
|
|
4
4
|
export * from "./find-by-magic-link-token.js";
|
|
5
|
-
export * from "./find-by-reset-password-token.js";
|
|
6
5
|
export * from "./get-by-id.js";
|
|
7
6
|
export * from "./update.js";
|
|
8
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/repositories/user/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/repositories/user/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticator.d.ts","sourceRoot":"","sources":["../../src/types/authenticator.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AACrC,MAAM,MAAM,4BAA4B,
|
|
1
|
+
{"version":3,"file":"authenticator.d.ts","sourceRoot":"","sources":["../../src/types/authenticator.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AACrC,MAAM,MAAM,4BAA4B,GACtC,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,KAAK,GAAG,YAAY,GAAG,KAAK,CAAC;AACzE,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG,aAAa,CAAC;AAIlE,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,eAAe,CAAC;IAC/B,qBAAqB,EAAE,UAAU,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,sBAAsB,EAAE,oBAAoB,CAAC;IAC7C,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,CAAC,EAAE,4BAA4B,EAAE,CAAC;IAC5C,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,IAAI,CAAC;CAClB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proconnect-gouv/proconnect.identite",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.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": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"zod": "^4.6.7"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@electric-sql/pglite": "^0.
|
|
53
|
+
"@electric-sql/pglite": "^0.5.16",
|
|
54
54
|
"@proconnect-gouv/proconnect.annuaire_entreprises": "^3.0.5",
|
|
55
55
|
"@proconnect-gouv/proconnect.api_entreprise": "^2.3.0",
|
|
56
56
|
"@proconnect-gouv/proconnect.core": "^1.1.0",
|
package/src/connectors/index.ts
CHANGED
|
@@ -6,9 +6,7 @@ import {
|
|
|
6
6
|
deleteAuthenticatorFactory,
|
|
7
7
|
findAuthenticatorFactory,
|
|
8
8
|
findAuthenticatorsByUserIdFactory,
|
|
9
|
-
updateAuthenticatorFactory,
|
|
10
9
|
} from "#src/repositories/authenticator";
|
|
11
|
-
import { findEmailInDeliverabilityWhiteListFactory } from "#src/repositories/email-deliverability-whitelist";
|
|
12
10
|
import {
|
|
13
11
|
addDomainFactory,
|
|
14
12
|
findEmailDomainsByOrganizationIdFactory,
|
|
@@ -17,8 +15,6 @@ import { findFranceconnectUserinfoFactory } from "#src/repositories/franceconnec
|
|
|
17
15
|
import {
|
|
18
16
|
deleteModerationFactory,
|
|
19
17
|
findModerationByIdFactory,
|
|
20
|
-
findPendingModerationFactory,
|
|
21
|
-
findRejectedModerationFactory,
|
|
22
18
|
getModerationByIdFactory,
|
|
23
19
|
reopenModerationFactory,
|
|
24
20
|
} from "#src/repositories/moderation";
|
|
@@ -32,10 +28,8 @@ import {
|
|
|
32
28
|
upsertAuthorizationRequestFactory,
|
|
33
29
|
} from "#src/repositories/oidc-client";
|
|
34
30
|
import {
|
|
35
|
-
findBySiretFactory,
|
|
36
31
|
findByUserIdFactory,
|
|
37
32
|
findOrganizationByIdFactory,
|
|
38
|
-
findPendingByUserIdFactory,
|
|
39
33
|
getOrganizationByIdFactory,
|
|
40
34
|
upsertFactory,
|
|
41
35
|
} from "#src/repositories/organization";
|
|
@@ -48,7 +42,6 @@ import {
|
|
|
48
42
|
createUserFactory,
|
|
49
43
|
findByEmailFactory,
|
|
50
44
|
findByMagicLinkTokenFactory,
|
|
51
|
-
findByResetPasswordTokenFactory,
|
|
52
45
|
findByIdFactory as findUserByIdFactory,
|
|
53
46
|
getByIdFactory,
|
|
54
47
|
updateUserFactory,
|
|
@@ -88,11 +81,6 @@ export function createContext({
|
|
|
88
81
|
deleteAllByUserId: deleteAllAuthenticatorsByUserIdFactory({ pg }),
|
|
89
82
|
find: findAuthenticatorFactory({ pg }),
|
|
90
83
|
findByUserId: findAuthenticatorsByUserIdFactory({ pg }),
|
|
91
|
-
update: updateAuthenticatorFactory({ pg }),
|
|
92
|
-
},
|
|
93
|
-
email_deliverability_whitelist: {
|
|
94
|
-
findEmailInDeliverabilityWhiteList:
|
|
95
|
-
findEmailInDeliverabilityWhiteListFactory({ pg }),
|
|
96
84
|
},
|
|
97
85
|
email_domains: {
|
|
98
86
|
addDomain: addDomainFactory({ pg }),
|
|
@@ -102,8 +90,6 @@ export function createContext({
|
|
|
102
90
|
moderations: {
|
|
103
91
|
delete: deleteModerationFactory({ pg }),
|
|
104
92
|
findById: findModerationByIdFactory({ pg }),
|
|
105
|
-
findPending: findPendingModerationFactory({ pg }),
|
|
106
|
-
findRejected: findRejectedModerationFactory({ pg }),
|
|
107
93
|
getById: getModerationByIdFactory({ pg }),
|
|
108
94
|
reopen: reopenModerationFactory({ pg }),
|
|
109
95
|
},
|
|
@@ -118,9 +104,7 @@ export function createContext({
|
|
|
118
104
|
},
|
|
119
105
|
organizations: {
|
|
120
106
|
findById: findOrganizationByIdFactory({ pg }),
|
|
121
|
-
findBySiret: findBySiretFactory({ pg }),
|
|
122
107
|
findByUserId: findByUserIdFactory({ pg }),
|
|
123
|
-
findPendingByUserId: findPendingByUserIdFactory({ pg }),
|
|
124
108
|
getById: getOrganizationByIdFactory({ pg }),
|
|
125
109
|
upsert: upsertFactory({ pg }),
|
|
126
110
|
},
|
|
@@ -138,7 +122,6 @@ export function createContext({
|
|
|
138
122
|
findByEmail: findByEmailFactory({ pg }),
|
|
139
123
|
findById: findUserByIdFactory({ pg }),
|
|
140
124
|
findByMagicLinkToken: findByMagicLinkTokenFactory({ pg }),
|
|
141
|
-
findByResetPasswordToken: findByResetPasswordTokenFactory({ pg }),
|
|
142
125
|
getById: getByIdFactory({ pg }),
|
|
143
126
|
update: updateUserFactory({ pg }),
|
|
144
127
|
},
|
|
@@ -45,8 +45,7 @@ export function getCertificationDirigeantDataSourceLabels(
|
|
|
45
45
|
//
|
|
46
46
|
|
|
47
47
|
export type SourceSelection =
|
|
48
|
-
|
|
49
|
-
| { kind: "preferred" };
|
|
48
|
+
{ kind: "fallback"; exception: unknown } | { kind: "preferred" };
|
|
50
49
|
|
|
51
50
|
async function getMandatairesSociaux(
|
|
52
51
|
{ client: { api_entreprise, rne } }: Context,
|
|
@@ -14,8 +14,7 @@ import * as ApiRne from "./adapters/rne.js";
|
|
|
14
14
|
//
|
|
15
15
|
|
|
16
16
|
export type RneEnrichment =
|
|
17
|
-
| { kind: "
|
|
18
|
-
| { kind: "failed"; exception: unknown };
|
|
17
|
+
{ kind: "enriched" } | { kind: "failed"; exception: unknown };
|
|
19
18
|
|
|
20
19
|
export type OrganizationInfoLookup =
|
|
21
20
|
| { kind: "api_entreprise_failed"; exception: unknown }
|
|
@@ -2,7 +2,5 @@
|
|
|
2
2
|
|
|
3
3
|
export * from "./delete-moderation.js";
|
|
4
4
|
export * from "./find-moderation-by-id.js";
|
|
5
|
-
export * from "./find-pending-moderation.js";
|
|
6
|
-
export * from "./find-rejected-moderation.js";
|
|
7
5
|
export * from "./get-moderation-by-id.js";
|
|
8
6
|
export * from "./reopen-moderation.js";
|
|
@@ -2,13 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
export type Base64URLString = string;
|
|
4
4
|
export type AuthenticatorTransportFuture =
|
|
5
|
-
| "
|
|
6
|
-
| "cable"
|
|
7
|
-
| "hybrid"
|
|
8
|
-
| "internal"
|
|
9
|
-
| "nfc"
|
|
10
|
-
| "smart-card"
|
|
11
|
-
| "usb";
|
|
5
|
+
"ble" | "cable" | "hybrid" | "internal" | "nfc" | "smart-card" | "usb";
|
|
12
6
|
export type CredentialDeviceType = "singleDevice" | "multiDevice";
|
|
13
7
|
|
|
14
8
|
//
|
package/testing/index.ts
CHANGED
|
@@ -9,7 +9,7 @@ import type {
|
|
|
9
9
|
import type { FindPouvoirsBySirenHandler } from "@proconnect-gouv/proconnect.registre_national_entreprises/api";
|
|
10
10
|
import { noop } from "lodash-es";
|
|
11
11
|
import { runner } from "node-pg-migrate";
|
|
12
|
-
import { mock } from "node:test";
|
|
12
|
+
import { after, mock } from "node:test";
|
|
13
13
|
import { join } from "path";
|
|
14
14
|
import type { Pool } from "pg";
|
|
15
15
|
import type { FindUniteLegaleBySirenHandler } from "../../insee/src/api/find-by-siren.js";
|
|
@@ -19,6 +19,7 @@ import { createContext } from "../src/connectors/index.js";
|
|
|
19
19
|
//
|
|
20
20
|
|
|
21
21
|
export const pg = new PGlite();
|
|
22
|
+
after(() => pg.close());
|
|
22
23
|
|
|
23
24
|
export async function migrate() {
|
|
24
25
|
await runner({
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { Authenticator, Base64URLString, BaseAuthenticator, DatabaseContext } from "#src/types";
|
|
2
|
-
export declare function updateAuthenticatorFactory({ pg }: DatabaseContext): (credential_id: Base64URLString, { counter, last_used_at, usage_count }: Partial<BaseAuthenticator>) => Promise<Authenticator>;
|
|
3
|
-
//# sourceMappingURL=update-authenticator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-authenticator.d.ts","sourceRoot":"","sources":["../../../src/repositories/authenticator/update-authenticator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,eAAe,EAChB,MAAM,YAAY,CAAC;AAKpB,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,EAAE,EAAE,eAAe,IAE9D,eAAe,eAAe,EAC9B,wCAAwC,OAAO,CAAC,iBAAiB,CAAC,4BAarE"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
import {} from "pg";
|
|
3
|
-
//
|
|
4
|
-
export function updateAuthenticatorFactory({ pg }) {
|
|
5
|
-
return async function updateAuthenticator(credential_id, { counter, last_used_at, usage_count }) {
|
|
6
|
-
const { rows } = await pg.query(`
|
|
7
|
-
UPDATE authenticators
|
|
8
|
-
SET counter = $2, last_used_at = $3, usage_count = $4
|
|
9
|
-
WHERE credential_id = $1
|
|
10
|
-
RETURNING *`, [credential_id, counter, last_used_at, usage_count]);
|
|
11
|
-
return rows.shift();
|
|
12
|
-
};
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-email-in-deliverability-white-list.d.ts","sourceRoot":"","sources":["../../../src/repositories/email-deliverability-whitelist/find-email-in-deliverability-white-list.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAMlD,wBAAgB,yCAAyC,CAAC,EACxD,EAAE,GACH,EAAE,eAAe,IACyC,OAAO,MAAM,6BAYvE"}
|
package/dist/repositories/email-deliverability-whitelist/find-email-in-deliverability-white-list.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
import {} from "#src/types";
|
|
3
|
-
import { getEmailDomain } from "@proconnect-gouv/proconnect.core/services/email";
|
|
4
|
-
import {} from "pg";
|
|
5
|
-
//
|
|
6
|
-
export function findEmailInDeliverabilityWhiteListFactory({ pg, }) {
|
|
7
|
-
return async function findEmailInDeliverabilityWhiteList(email) {
|
|
8
|
-
const domain = getEmailDomain(email);
|
|
9
|
-
const { rows } = await pg.query(`
|
|
10
|
-
SELECT *
|
|
11
|
-
FROM email_deliverability_whitelist WHERE email_domain = $1
|
|
12
|
-
`, [domain]);
|
|
13
|
-
return rows.shift();
|
|
14
|
-
};
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/repositories/email-deliverability-whitelist/index.ts"],"names":[],"mappings":"AAEA,cAAc,8CAA8C,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type DatabaseContext, type ModerationType } from "#src/types";
|
|
2
|
-
export declare function findPendingModerationFactory({ pg }: DatabaseContext): ({ user_id, organization_id, type, }: {
|
|
3
|
-
user_id: number;
|
|
4
|
-
organization_id: number;
|
|
5
|
-
type: ModerationType;
|
|
6
|
-
}) => Promise<{
|
|
7
|
-
id: number;
|
|
8
|
-
user_id: number;
|
|
9
|
-
organization_id: number;
|
|
10
|
-
ticket_id: string | null;
|
|
11
|
-
type: "non_verified_domain" | "organization_join_block";
|
|
12
|
-
created_at: Date;
|
|
13
|
-
moderated_at: Date | null;
|
|
14
|
-
comment: string | null;
|
|
15
|
-
moderated_by: string | null;
|
|
16
|
-
status: "accepted" | "pending" | "rejected" | "reopened" | "unknown";
|
|
17
|
-
end_user_reason: string;
|
|
18
|
-
allow_editing: boolean;
|
|
19
|
-
} | undefined>;
|
|
20
|
-
//# sourceMappingURL=find-pending-moderation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"find-pending-moderation.d.ts","sourceRoot":"","sources":["../../../src/repositories/moderation/find-pending-moderation.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,eAAe,EAEpB,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAKpB,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,EAAE,EAAE,eAAe,IACtB,qCAIzC;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,cAAc,CAAC;CACtB;;;;;;;;;;;;;eAcF"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
import {} from "#src/types";
|
|
3
|
-
import {} from "pg";
|
|
4
|
-
//
|
|
5
|
-
export function findPendingModerationFactory({ pg }) {
|
|
6
|
-
return async function findPendingModeration({ user_id, organization_id, type, }) {
|
|
7
|
-
const { rows } = await pg.query(`
|
|
8
|
-
SELECT *
|
|
9
|
-
FROM moderations
|
|
10
|
-
WHERE user_id = $1
|
|
11
|
-
AND organization_id = $2
|
|
12
|
-
AND type = $3
|
|
13
|
-
AND moderated_at IS NULL;`, [user_id, organization_id, type]);
|
|
14
|
-
return rows.shift();
|
|
15
|
-
};
|
|
16
|
-
}
|