diff --git a/.talismanrc b/.talismanrc index 64851b3c4d..ccbd07a8e4 100644 --- a/.talismanrc +++ b/.talismanrc @@ -1,4 +1,8 @@ fileignoreconfig: +- filename: _scripts/db/dumps/domifa_test.postgres.restore-data-only.sql + checksum: 1e3af6483b906589d5ff94a3f5c9c4b461daacb252dd023adf9de9eb70aa2e05 +- filename: _scripts/db/dumps/domifa_test.postgres.truncate-restore-data-only.sql + checksum: 0a5566f61d5418e27c400a112beaf0bcd6fa6cdca3f7f837108cc64a1e9a14c0 - filename: docker-compose.local.yml checksum: ae67a7cafd3797780e29e6e3aca8f7a273dfe3f10f8456f95b3b4680e8440605 - filename: packages/backend/.env.backend.test.local.example.env @@ -24,7 +28,7 @@ fileignoreconfig: - filename: packages/backend/src/_migrations/1707149718714-auto-migration.ts checksum: aa054cce95ed17cdb3b5d3dd94ad82b56ff60d2b9dd002f15a617806e4883fda - filename: packages/backend/src/_migrations/_init-db/1603812391580-pr-env-create-database.ts - checksum: e9749edc537ce0d902f2750870816c75a3e57a79955f5d92174c7b0f19b4267e + checksum: e427d473e2d46ea8e5e8a7051e2bd76b6f5097855f07cfe0b7ed91977d20da94 - filename: packages/backend/src/_portail-admin/portail-admin-login/portail-admin-login.controller.spec.ts checksum: 3bd78f8919cbe14a45484825d6ce816bc7e2a0456fc53b9beeb1fedb6bdb061a - filename: packages/backend/src/auth/structures-auth.controller.spec.ts diff --git a/_scripts/db/dumps/domifa_test.postgres.custom.gz b/_scripts/db/dumps/domifa_test.postgres.custom.gz index 696de38e76..1c570816c7 100644 Binary files a/_scripts/db/dumps/domifa_test.postgres.custom.gz and b/_scripts/db/dumps/domifa_test.postgres.custom.gz differ diff --git a/_scripts/db/dumps/domifa_test.postgres.restore-data-only.sql b/_scripts/db/dumps/domifa_test.postgres.restore-data-only.sql index 357f86c988..d61ab0ed30 100644 --- a/_scripts/db/dumps/domifa_test.postgres.restore-data-only.sql +++ b/_scripts/db/dumps/domifa_test.postgres.restore-data-only.sql @@ -2,8 +2,8 @@ -- PostgreSQL database dump -- --- Dumped from database version 14.9 (Debian 14.9-1.pgdg110+1) --- Dumped by pg_dump version 14.9 (Debian 14.9-1.pgdg110+1) +-- Dumped from database version 14.9 +-- Dumped by pg_dump version 14.9 SET statement_timeout = 0; SET lock_timeout = 0; @@ -82,24 +82,24 @@ b2c26e55-ab37-457d-b307-6fe161050a9b 2021-06-28 15:24:22.924091+02 2023-12-18 17 -- COPY public.interactions (uuid, "createdAt", "updatedAt", version, "dateInteraction", "nbCourrier", "structureId", type, "usagerRef", "userId", "userName", content, "usagerUUID", "interactionOutUUID", procuration, "returnToSender") FROM stdin; -4fc32424-3f6e-48c7-9ef1-02b9db388445 2020-11-18 12:01:52.072912+01 2020-11-18 12:01:52.072912+01 1 2020-11-01 19:47:00.286+01 3 1 recommandeIn 1 1 Patrick Roméro 860ffa4c-88c4-4e1c-ad42-5a05cdf39830 \N \N \N -44ba43d0-ab44-4449-a6e1-40cbcbc92adc 2020-11-18 12:01:52.072912+01 2020-11-18 12:01:52.072912+01 1 2020-11-01 19:47:03.303+01 4 1 colisIn 1 1 Patrick Roméro 860ffa4c-88c4-4e1c-ad42-5a05cdf39830 \N \N \N -b174770d-dfb4-45ea-bf5c-58f1288ff6dd 2020-11-18 12:01:52.072912+01 2020-11-18 12:01:52.072912+01 1 2020-11-01 19:47:06.168+01 1 1 courrierIn 1 1 Patrick Roméro 860ffa4c-88c4-4e1c-ad42-5a05cdf39830 \N \N \N -f3b49608-cb17-4fdb-b793-8da431cd6ffe 2021-06-28 15:25:35.998265+02 2021-06-28 15:25:35.998265+02 1 2021-06-28 17:25:35.997+02 2 1 courrierOut 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b \N \N \N -53a50f2d-c906-421e-be21-8857dfca97fc 2021-06-28 15:25:36.005054+02 2021-06-28 15:25:36.005054+02 1 2021-06-28 17:25:36.004+02 2 1 colisOut 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b \N \N \N -7d27aea0-d9ae-4529-b1ee-e40a4eadf1ab 2021-06-28 15:25:37.471534+02 2021-06-28 15:25:37.471534+02 1 2021-06-28 17:25:37.47+02 1 1 courrierIn 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b \N \N \N -212f8184-972a-4cb3-ae83-d1738659cbf9 2021-06-28 15:25:45.842905+02 2021-06-28 15:25:45.842905+02 1 2021-06-28 17:25:45.842+02 1 1 courrierIn 7 1 Patrick Roméro Courrier très important b2c26e55-ab37-457d-b307-6fe161050a9b \N \N \N -8abd81e6-403f-49f3-999a-0ead3e6456c5 2021-06-28 15:25:51.252592+02 2021-06-28 15:25:51.252592+02 1 2021-06-28 17:25:51.252+02 1 1 colisIn 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b \N \N \N -b68794a5-1d02-48ca-9cc7-8b43b4a4bbf0 2021-06-28 15:25:28.404973+02 2021-12-24 01:46:32.485168+01 2 2021-06-28 17:25:28.404+02 2 1 courrierIn 7 1 Patrick Roméro b2c26e55-ab37-457d-b307-6fe161050a9b f3b49608-cb17-4fdb-b793-8da431cd6ffe \N \N -fb8dde95-b421-4cf0-b205-9e940d9641e5 2021-06-28 15:25:28.512802+02 2021-12-24 01:46:32.491031+01 2 2021-06-28 17:25:28.512+02 1 1 colisIn 7 1 Patrick Roméro b2c26e55-ab37-457d-b307-6fe161050a9b 53a50f2d-c906-421e-be21-8857dfca97fc \N \N -0a0dbf1d-055f-47db-b2ae-013c611033e8 2021-06-28 15:25:33.70286+02 2021-12-24 01:46:32.491031+01 2 2021-06-28 17:25:33.702+02 1 1 colisIn 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b 53a50f2d-c906-421e-be21-8857dfca97fc \N \N -2bbb1a89-c14f-4f32-8928-965dc2565174 2022-03-17 22:40:01.392572+01 2022-03-17 22:40:01.392572+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N \N \N -eaa91392-fe09-4faa-9bbd-3722b25dd013 2022-03-17 22:39:10.963799+01 2022-03-17 22:39:10.963799+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N \N \N -03d2f113-726a-4cab-8cee-f111cdbc2c66 2022-03-17 22:40:29.896899+01 2022-03-17 22:40:29.955167+01 3 2020-12-01 11:00:24.98+01 3 1 colisIn 2 1 Patrick Roméro Colis à donner en urgence 97b7e840-0e93-4bf4-ba7d-0a406aa898f2 \N \N \N -bbf70ce8-d4d6-4318-adc6-143af0a06daa 2022-03-17 22:40:30.030609+01 2022-03-17 22:40:30.030609+01 1 2020-12-01 11:00:24.98+01 0 1 visite 2 1 Patrick Roméro \N 97b7e840-0e93-4bf4-ba7d-0a406aa898f2 \N \N \N -efabd6a5-e8d3-464d-a700-f0fd723a43b9 2022-03-17 22:40:30.315091+01 2022-03-17 22:40:30.315091+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N \N \N -ccfdb5d8-dbb6-4cf8-9818-cd0f4211021e 2022-03-17 22:39:21.729672+01 2022-03-17 22:39:21.729672+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N \N \N -672bae2a-dfb3-41f3-a3d9-8eda89783612 2022-03-17 22:37:37.935256+01 2022-03-17 22:37:37.935256+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N \N \N +4fc32424-3f6e-48c7-9ef1-02b9db388445 2020-11-18 12:01:52.072912+01 2020-11-18 12:01:52.072912+01 1 2020-11-01 19:47:00.286+01 3 1 recommandeIn 1 1 Patrick Roméro 860ffa4c-88c4-4e1c-ad42-5a05cdf39830 \N f f +44ba43d0-ab44-4449-a6e1-40cbcbc92adc 2020-11-18 12:01:52.072912+01 2020-11-18 12:01:52.072912+01 1 2020-11-01 19:47:03.303+01 4 1 colisIn 1 1 Patrick Roméro 860ffa4c-88c4-4e1c-ad42-5a05cdf39830 \N f f +b174770d-dfb4-45ea-bf5c-58f1288ff6dd 2020-11-18 12:01:52.072912+01 2020-11-18 12:01:52.072912+01 1 2020-11-01 19:47:06.168+01 1 1 courrierIn 1 1 Patrick Roméro 860ffa4c-88c4-4e1c-ad42-5a05cdf39830 \N f f +f3b49608-cb17-4fdb-b793-8da431cd6ffe 2021-06-28 15:25:35.998265+02 2021-06-28 15:25:35.998265+02 1 2021-06-28 17:25:35.997+02 2 1 courrierOut 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b \N f f +53a50f2d-c906-421e-be21-8857dfca97fc 2021-06-28 15:25:36.005054+02 2021-06-28 15:25:36.005054+02 1 2021-06-28 17:25:36.004+02 2 1 colisOut 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b \N f f +7d27aea0-d9ae-4529-b1ee-e40a4eadf1ab 2021-06-28 15:25:37.471534+02 2021-06-28 15:25:37.471534+02 1 2021-06-28 17:25:37.47+02 1 1 courrierIn 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b \N f f +212f8184-972a-4cb3-ae83-d1738659cbf9 2021-06-28 15:25:45.842905+02 2021-06-28 15:25:45.842905+02 1 2021-06-28 17:25:45.842+02 1 1 courrierIn 7 1 Patrick Roméro Courrier très important b2c26e55-ab37-457d-b307-6fe161050a9b \N f f +8abd81e6-403f-49f3-999a-0ead3e6456c5 2021-06-28 15:25:51.252592+02 2021-06-28 15:25:51.252592+02 1 2021-06-28 17:25:51.252+02 1 1 colisIn 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b \N f f +b68794a5-1d02-48ca-9cc7-8b43b4a4bbf0 2021-06-28 15:25:28.404973+02 2021-12-24 01:46:32.485168+01 2 2021-06-28 17:25:28.404+02 2 1 courrierIn 7 1 Patrick Roméro b2c26e55-ab37-457d-b307-6fe161050a9b f3b49608-cb17-4fdb-b793-8da431cd6ffe f f +fb8dde95-b421-4cf0-b205-9e940d9641e5 2021-06-28 15:25:28.512802+02 2021-12-24 01:46:32.491031+01 2 2021-06-28 17:25:28.512+02 1 1 colisIn 7 1 Patrick Roméro b2c26e55-ab37-457d-b307-6fe161050a9b 53a50f2d-c906-421e-be21-8857dfca97fc f f +0a0dbf1d-055f-47db-b2ae-013c611033e8 2021-06-28 15:25:33.70286+02 2021-12-24 01:46:32.491031+01 2 2021-06-28 17:25:33.702+02 1 1 colisIn 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b 53a50f2d-c906-421e-be21-8857dfca97fc f f +2bbb1a89-c14f-4f32-8928-965dc2565174 2022-03-17 22:40:01.392572+01 2022-03-17 22:40:01.392572+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N f f +eaa91392-fe09-4faa-9bbd-3722b25dd013 2022-03-17 22:39:10.963799+01 2022-03-17 22:39:10.963799+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N f f +03d2f113-726a-4cab-8cee-f111cdbc2c66 2022-03-17 22:40:29.896899+01 2022-03-17 22:40:29.955167+01 3 2020-12-01 11:00:24.98+01 3 1 colisIn 2 1 Patrick Roméro Colis à donner en urgence 97b7e840-0e93-4bf4-ba7d-0a406aa898f2 \N f f +bbf70ce8-d4d6-4318-adc6-143af0a06daa 2022-03-17 22:40:30.030609+01 2022-03-17 22:40:30.030609+01 1 2020-12-01 11:00:24.98+01 0 1 visite 2 1 Patrick Roméro \N 97b7e840-0e93-4bf4-ba7d-0a406aa898f2 \N f f +efabd6a5-e8d3-464d-a700-f0fd723a43b9 2022-03-17 22:40:30.315091+01 2022-03-17 22:40:30.315091+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N f f +ccfdb5d8-dbb6-4cf8-9818-cd0f4211021e 2022-03-17 22:39:21.729672+01 2022-03-17 22:39:21.729672+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N f f +672bae2a-dfb3-41f3-a3d9-8eda89783612 2022-03-17 22:37:37.935256+01 2022-03-17 22:37:37.935256+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N f f \. diff --git a/_scripts/db/dumps/domifa_test.postgres.truncate-restore-data-only.sql b/_scripts/db/dumps/domifa_test.postgres.truncate-restore-data-only.sql index 5bc2e0d154..4494720272 100644 --- a/_scripts/db/dumps/domifa_test.postgres.truncate-restore-data-only.sql +++ b/_scripts/db/dumps/domifa_test.postgres.truncate-restore-data-only.sql @@ -28,8 +28,8 @@ TRUNCATE TABLE public.usager_options_history RESTART IDENTITY CASCADE; -- PostgreSQL database dump -- --- Dumped from database version 14.9 (Debian 14.9-1.pgdg110+1) --- Dumped by pg_dump version 14.9 (Debian 14.9-1.pgdg110+1) +-- Dumped from database version 14.9 +-- Dumped by pg_dump version 14.9 SET statement_timeout = 0; SET lock_timeout = 0; @@ -108,24 +108,24 @@ b2c26e55-ab37-457d-b307-6fe161050a9b 2021-06-28 15:24:22.924091+02 2023-12-18 17 -- COPY public.interactions (uuid, "createdAt", "updatedAt", version, "dateInteraction", "nbCourrier", "structureId", type, "usagerRef", "userId", "userName", content, "usagerUUID", "interactionOutUUID", procuration, "returnToSender") FROM stdin; -4fc32424-3f6e-48c7-9ef1-02b9db388445 2020-11-18 12:01:52.072912+01 2020-11-18 12:01:52.072912+01 1 2020-11-01 19:47:00.286+01 3 1 recommandeIn 1 1 Patrick Roméro 860ffa4c-88c4-4e1c-ad42-5a05cdf39830 \N \N \N -44ba43d0-ab44-4449-a6e1-40cbcbc92adc 2020-11-18 12:01:52.072912+01 2020-11-18 12:01:52.072912+01 1 2020-11-01 19:47:03.303+01 4 1 colisIn 1 1 Patrick Roméro 860ffa4c-88c4-4e1c-ad42-5a05cdf39830 \N \N \N -b174770d-dfb4-45ea-bf5c-58f1288ff6dd 2020-11-18 12:01:52.072912+01 2020-11-18 12:01:52.072912+01 1 2020-11-01 19:47:06.168+01 1 1 courrierIn 1 1 Patrick Roméro 860ffa4c-88c4-4e1c-ad42-5a05cdf39830 \N \N \N -f3b49608-cb17-4fdb-b793-8da431cd6ffe 2021-06-28 15:25:35.998265+02 2021-06-28 15:25:35.998265+02 1 2021-06-28 17:25:35.997+02 2 1 courrierOut 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b \N \N \N -53a50f2d-c906-421e-be21-8857dfca97fc 2021-06-28 15:25:36.005054+02 2021-06-28 15:25:36.005054+02 1 2021-06-28 17:25:36.004+02 2 1 colisOut 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b \N \N \N -7d27aea0-d9ae-4529-b1ee-e40a4eadf1ab 2021-06-28 15:25:37.471534+02 2021-06-28 15:25:37.471534+02 1 2021-06-28 17:25:37.47+02 1 1 courrierIn 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b \N \N \N -212f8184-972a-4cb3-ae83-d1738659cbf9 2021-06-28 15:25:45.842905+02 2021-06-28 15:25:45.842905+02 1 2021-06-28 17:25:45.842+02 1 1 courrierIn 7 1 Patrick Roméro Courrier très important b2c26e55-ab37-457d-b307-6fe161050a9b \N \N \N -8abd81e6-403f-49f3-999a-0ead3e6456c5 2021-06-28 15:25:51.252592+02 2021-06-28 15:25:51.252592+02 1 2021-06-28 17:25:51.252+02 1 1 colisIn 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b \N \N \N -b68794a5-1d02-48ca-9cc7-8b43b4a4bbf0 2021-06-28 15:25:28.404973+02 2021-12-24 01:46:32.485168+01 2 2021-06-28 17:25:28.404+02 2 1 courrierIn 7 1 Patrick Roméro b2c26e55-ab37-457d-b307-6fe161050a9b f3b49608-cb17-4fdb-b793-8da431cd6ffe \N \N -fb8dde95-b421-4cf0-b205-9e940d9641e5 2021-06-28 15:25:28.512802+02 2021-12-24 01:46:32.491031+01 2 2021-06-28 17:25:28.512+02 1 1 colisIn 7 1 Patrick Roméro b2c26e55-ab37-457d-b307-6fe161050a9b 53a50f2d-c906-421e-be21-8857dfca97fc \N \N -0a0dbf1d-055f-47db-b2ae-013c611033e8 2021-06-28 15:25:33.70286+02 2021-12-24 01:46:32.491031+01 2 2021-06-28 17:25:33.702+02 1 1 colisIn 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b 53a50f2d-c906-421e-be21-8857dfca97fc \N \N -2bbb1a89-c14f-4f32-8928-965dc2565174 2022-03-17 22:40:01.392572+01 2022-03-17 22:40:01.392572+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N \N \N -eaa91392-fe09-4faa-9bbd-3722b25dd013 2022-03-17 22:39:10.963799+01 2022-03-17 22:39:10.963799+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N \N \N -03d2f113-726a-4cab-8cee-f111cdbc2c66 2022-03-17 22:40:29.896899+01 2022-03-17 22:40:29.955167+01 3 2020-12-01 11:00:24.98+01 3 1 colisIn 2 1 Patrick Roméro Colis à donner en urgence 97b7e840-0e93-4bf4-ba7d-0a406aa898f2 \N \N \N -bbf70ce8-d4d6-4318-adc6-143af0a06daa 2022-03-17 22:40:30.030609+01 2022-03-17 22:40:30.030609+01 1 2020-12-01 11:00:24.98+01 0 1 visite 2 1 Patrick Roméro \N 97b7e840-0e93-4bf4-ba7d-0a406aa898f2 \N \N \N -efabd6a5-e8d3-464d-a700-f0fd723a43b9 2022-03-17 22:40:30.315091+01 2022-03-17 22:40:30.315091+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N \N \N -ccfdb5d8-dbb6-4cf8-9818-cd0f4211021e 2022-03-17 22:39:21.729672+01 2022-03-17 22:39:21.729672+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N \N \N -672bae2a-dfb3-41f3-a3d9-8eda89783612 2022-03-17 22:37:37.935256+01 2022-03-17 22:37:37.935256+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N \N \N +4fc32424-3f6e-48c7-9ef1-02b9db388445 2020-11-18 12:01:52.072912+01 2020-11-18 12:01:52.072912+01 1 2020-11-01 19:47:00.286+01 3 1 recommandeIn 1 1 Patrick Roméro 860ffa4c-88c4-4e1c-ad42-5a05cdf39830 \N f f +44ba43d0-ab44-4449-a6e1-40cbcbc92adc 2020-11-18 12:01:52.072912+01 2020-11-18 12:01:52.072912+01 1 2020-11-01 19:47:03.303+01 4 1 colisIn 1 1 Patrick Roméro 860ffa4c-88c4-4e1c-ad42-5a05cdf39830 \N f f +b174770d-dfb4-45ea-bf5c-58f1288ff6dd 2020-11-18 12:01:52.072912+01 2020-11-18 12:01:52.072912+01 1 2020-11-01 19:47:06.168+01 1 1 courrierIn 1 1 Patrick Roméro 860ffa4c-88c4-4e1c-ad42-5a05cdf39830 \N f f +f3b49608-cb17-4fdb-b793-8da431cd6ffe 2021-06-28 15:25:35.998265+02 2021-06-28 15:25:35.998265+02 1 2021-06-28 17:25:35.997+02 2 1 courrierOut 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b \N f f +53a50f2d-c906-421e-be21-8857dfca97fc 2021-06-28 15:25:36.005054+02 2021-06-28 15:25:36.005054+02 1 2021-06-28 17:25:36.004+02 2 1 colisOut 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b \N f f +7d27aea0-d9ae-4529-b1ee-e40a4eadf1ab 2021-06-28 15:25:37.471534+02 2021-06-28 15:25:37.471534+02 1 2021-06-28 17:25:37.47+02 1 1 courrierIn 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b \N f f +212f8184-972a-4cb3-ae83-d1738659cbf9 2021-06-28 15:25:45.842905+02 2021-06-28 15:25:45.842905+02 1 2021-06-28 17:25:45.842+02 1 1 courrierIn 7 1 Patrick Roméro Courrier très important b2c26e55-ab37-457d-b307-6fe161050a9b \N f f +8abd81e6-403f-49f3-999a-0ead3e6456c5 2021-06-28 15:25:51.252592+02 2021-06-28 15:25:51.252592+02 1 2021-06-28 17:25:51.252+02 1 1 colisIn 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b \N f f +b68794a5-1d02-48ca-9cc7-8b43b4a4bbf0 2021-06-28 15:25:28.404973+02 2021-12-24 01:46:32.485168+01 2 2021-06-28 17:25:28.404+02 2 1 courrierIn 7 1 Patrick Roméro b2c26e55-ab37-457d-b307-6fe161050a9b f3b49608-cb17-4fdb-b793-8da431cd6ffe f f +fb8dde95-b421-4cf0-b205-9e940d9641e5 2021-06-28 15:25:28.512802+02 2021-12-24 01:46:32.491031+01 2 2021-06-28 17:25:28.512+02 1 1 colisIn 7 1 Patrick Roméro b2c26e55-ab37-457d-b307-6fe161050a9b 53a50f2d-c906-421e-be21-8857dfca97fc f f +0a0dbf1d-055f-47db-b2ae-013c611033e8 2021-06-28 15:25:33.70286+02 2021-12-24 01:46:32.491031+01 2 2021-06-28 17:25:33.702+02 1 1 colisIn 7 1 Patrick Roméro \N b2c26e55-ab37-457d-b307-6fe161050a9b 53a50f2d-c906-421e-be21-8857dfca97fc f f +2bbb1a89-c14f-4f32-8928-965dc2565174 2022-03-17 22:40:01.392572+01 2022-03-17 22:40:01.392572+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N f f +eaa91392-fe09-4faa-9bbd-3722b25dd013 2022-03-17 22:39:10.963799+01 2022-03-17 22:39:10.963799+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N f f +03d2f113-726a-4cab-8cee-f111cdbc2c66 2022-03-17 22:40:29.896899+01 2022-03-17 22:40:29.955167+01 3 2020-12-01 11:00:24.98+01 3 1 colisIn 2 1 Patrick Roméro Colis à donner en urgence 97b7e840-0e93-4bf4-ba7d-0a406aa898f2 \N f f +bbf70ce8-d4d6-4318-adc6-143af0a06daa 2022-03-17 22:40:30.030609+01 2022-03-17 22:40:30.030609+01 1 2020-12-01 11:00:24.98+01 0 1 visite 2 1 Patrick Roméro \N 97b7e840-0e93-4bf4-ba7d-0a406aa898f2 \N f f +efabd6a5-e8d3-464d-a700-f0fd723a43b9 2022-03-17 22:40:30.315091+01 2022-03-17 22:40:30.315091+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N f f +ccfdb5d8-dbb6-4cf8-9818-cd0f4211021e 2022-03-17 22:39:21.729672+01 2022-03-17 22:39:21.729672+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N f f +672bae2a-dfb3-41f3-a3d9-8eda89783612 2022-03-17 22:37:37.935256+01 2022-03-17 22:37:37.935256+01 1 2020-12-01 06:00:24.98+01 0 5 courrierOut 1 11 Mauricette Pali 6d93ecf8-c59a-42cc-ac1e-b5bd6f977a01 \N f f \. diff --git a/packages/backend/src/_migrations/1709572023866-auto-migration.ts b/packages/backend/src/_migrations/1709572023866-auto-migration.ts new file mode 100644 index 0000000000..3f48d7256c --- /dev/null +++ b/packages/backend/src/_migrations/1709572023866-auto-migration.ts @@ -0,0 +1,40 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; +import { appLogger } from "../util"; +import { domifaConfig } from "../config"; + +export class AutoMigration1709572023866 implements MigrationInterface { + name = "AutoMigration1709572023866"; + + public async up(queryRunner: QueryRunner): Promise { + if ( + domifaConfig().envId === "prod" || + domifaConfig().envId === "preprod" || + domifaConfig().envId === "local" + ) { + appLogger.warn( + "[MIGRATION] add false by default to interactions procuration and returnToSender" + ); + await queryRunner.query( + `update interactions set "procuration" = false, "returnToSender" = false where procuration is null and "returnToSender" is null;` + ); + await queryRunner.query( + `update interactions set "returnToSender" = false where "returnToSender" is null;` + ); + } + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `ALTER TABLE "interactions" ALTER COLUMN "returnToSender" DROP DEFAULT` + ); + await queryRunner.query( + `ALTER TABLE "interactions" ALTER COLUMN "returnToSender" DROP NOT NULL` + ); + await queryRunner.query( + `ALTER TABLE "interactions" ALTER COLUMN "procuration" DROP DEFAULT` + ); + await queryRunner.query( + `ALTER TABLE "interactions" ALTER COLUMN "procuration" DROP NOT NULL` + ); + } +} diff --git a/packages/backend/src/_migrations/1709572076573-manual-migration.ts b/packages/backend/src/_migrations/1709572076573-manual-migration.ts new file mode 100644 index 0000000000..7ad10dca9d --- /dev/null +++ b/packages/backend/src/_migrations/1709572076573-manual-migration.ts @@ -0,0 +1,121 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import { In, MigrationInterface, QueryRunner } from "typeorm"; +import { appLogger } from "../util"; +import { structureRepository, usagerRepository } from "../database"; +import { differenceInCalendarDays } from "date-fns"; +import { Usager } from "../_common/model"; +import { getLastInteractionOut } from "../interactions/services/getLastInteractionDate.service"; +import { domifaConfig } from "../config"; + +const usagersUpdated = []; +export class ManualMigration1709572076573 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise { + if ( + domifaConfig().envId === "prod" || + domifaConfig().envId === "preprod" || + domifaConfig().envId === "local" + ) { + appLogger.info(`[MIGRATION] nettoyage des dates de dernier passage`); + + let cpt = 0; + const total = await this.countMigration(); + + const structures = await structureRepository.find({ + select: ["uuid", "id", "nom", "portailUsager"], + }); + + const structuresMap = {}; + structures.forEach((structure) => { + structuresMap[structure.id.toString()] = structure; + }); + + while ((await this.countMigration()) > 0) { + appLogger.info(`${cpt}/${total} usagers`); + + const usagers: Usager[] = await usagerRepository + .createQueryBuilder("usager") + .where({ migrated: false }) + .limit(1000) + .orderBy({ ref: "DESC" }) + .getMany(); + + await queryRunner.startTransaction(); + const uuidsToEdit = usagers.map((usager) => usager.uuid); + + console.log(cpt + "/" + total + " dossiers"); + + for (const usager of usagers) { + usager.lastInteraction.dateInteraction = new Date( + usager.lastInteraction.dateInteraction + ); + + const dateInteractionOut = await getLastInteractionOut( + usager, + structuresMap[usager.structureId.toString()] + ); + + if ( + dateInteractionOut && + differenceInCalendarDays( + new Date(usager.lastInteraction.dateInteraction), + dateInteractionOut + ) !== 0 && + differenceInCalendarDays( + dateInteractionOut, + new Date(usager.decision.dateDebut) + ) > 0 + ) { + const log = { + uuid: usager.uuid, + ref: usager.ref, + structureId: usager.structureId, + before: usager.lastInteraction.dateInteraction, + after: dateInteractionOut, + dateDebut: usager.decision.dateDebut, + dateDiff: differenceInCalendarDays( + new Date(usager.lastInteraction.dateInteraction), + dateInteractionOut + ), + }; + + usagersUpdated.push(log); + + await usagerRepository.update( + { uuid: usager.uuid }, + { + lastInteraction: { + ...usager.lastInteraction, + dateInteraction: dateInteractionOut, + }, + migrated: true, + } + ); + + console.log(); + } + } + cpt = cpt + 1000; + + await usagerRepository.update( + { uuid: In(uuidsToEdit) }, + { migrated: true } + ); + + await queryRunner.commitTransaction(); + } + console.log(usagersUpdated); + console.log(usagersUpdated.length); + } + } + + public async down(_queryRunner: QueryRunner): Promise { + // + } + + private async countMigration(): Promise { + return await usagerRepository + .createQueryBuilder() + .where({ migrated: false }) + .getCount(); + } +} diff --git a/packages/backend/src/_migrations/1709581711156-manual-migration.ts b/packages/backend/src/_migrations/1709581711156-manual-migration.ts new file mode 100644 index 0000000000..6350c642e0 --- /dev/null +++ b/packages/backend/src/_migrations/1709581711156-manual-migration.ts @@ -0,0 +1,35 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +import { MigrationInterface, QueryRunner } from "typeorm"; +import { appLogger } from "../util"; +import { domifaConfig } from "../config"; + +export class ManualMigration1709581711156 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise { + if ( + domifaConfig().envId === "prod" || + domifaConfig().envId === "preprod" || + domifaConfig().envId === "local" + ) { + appLogger.warn( + "[MIGRATION] add NOT NULL to interactions procuration and returnToSender" + ); + await queryRunner.query( + `ALTER TABLE "interactions" ALTER COLUMN "procuration" SET DEFAULT false` + ); + await queryRunner.query( + `ALTER TABLE "interactions" ALTER COLUMN "returnToSender" SET DEFAULT false` + ); + await queryRunner.query( + `ALTER TABLE "interactions" ALTER COLUMN "procuration" SET NOT NULL` + ); + await queryRunner.query( + `ALTER TABLE "interactions" ALTER COLUMN "returnToSender" SET NOT NULL` + ); + } + } + /* eslint-disable @typescript-eslint/no-unused-vars */ + + public async down(_queryRunner: QueryRunner): Promise { + // + } +} diff --git a/packages/backend/src/_migrations/_init-db/1603812391580-pr-env-create-database.ts b/packages/backend/src/_migrations/_init-db/1603812391580-pr-env-create-database.ts index 44618cd76c..b489e02eda 100644 --- a/packages/backend/src/_migrations/_init-db/1603812391580-pr-env-create-database.ts +++ b/packages/backend/src/_migrations/_init-db/1603812391580-pr-env-create-database.ts @@ -41,9 +41,9 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.app_log; CREATE UNLOGGED TABLE public.app_log ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, "userId" int4 NOT NULL, "usagerRef" int4 NULL, @@ -61,14 +61,14 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.contact_support; CREATE UNLOGGED TABLE public.contact_support ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, "userId" int4 NULL, "structureId" int4 NULL, "content" text NOT NULL, - status text NOT NULL DEFAULT 'ON_HOLD'::text, + status text DEFAULT 'ON_HOLD'::text NOT NULL, attachment jsonb NULL, email text NOT NULL, category text NULL, @@ -89,9 +89,9 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.expired_token; CREATE UNLOGGED TABLE public.expired_token ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, "userId" int4 NOT NULL, "structureId" int4 NOT NULL, @@ -110,9 +110,9 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.message_email; CREATE UNLOGGED TABLE public.message_email ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, status text NOT NULL, "emailId" text NOT NULL, @@ -120,7 +120,7 @@ async function createTables(queryRunner: QueryRunner) { "nextScheduledDate" timestamptz NOT NULL, "sendDate" timestamptz NULL, "content" jsonb NOT NULL, - "errorCount" int4 NOT NULL DEFAULT 0, + "errorCount" int4 DEFAULT 0 NOT NULL, "errorMessage" text NULL, "sendDetails" jsonb NULL, attachments jsonb NULL, @@ -135,9 +135,9 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.monitor_batch_process; CREATE UNLOGGED TABLE public.monitor_batch_process ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, "processId" text NOT NULL, "beginDate" timestamptz NOT NULL, @@ -146,7 +146,7 @@ async function createTables(queryRunner: QueryRunner) { status text NOT NULL, details jsonb NULL, "errorMessage" text NULL, - "alertMailSent" bool NOT NULL DEFAULT false, + "alertMailSent" bool DEFAULT false NOT NULL, CONSTRAINT "PK_f00131d757d1ddf39e70901e372" PRIMARY KEY (uuid) ); @@ -158,9 +158,9 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.open_data_places; CREATE UNLOGGED TABLE public.open_data_places ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, nom text NOT NULL, adresse text NOT NULL, @@ -193,9 +193,9 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public."structure"; CREATE UNLOGGED TABLE public."structure" ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, id serial4 NOT NULL, adresse text NOT NULL, @@ -209,7 +209,7 @@ async function createTables(queryRunner: QueryRunner) { email text NOT NULL, "hardReset" jsonb NULL, "tokenDelete" text NULL, - "import" bool NOT NULL DEFAULT false, + "import" bool DEFAULT false NOT NULL, "registrationDate" timestamptz NOT NULL, "importDate" date NULL, "lastLogin" date NULL, @@ -218,14 +218,14 @@ async function createTables(queryRunner: QueryRunner) { responsable jsonb NOT NULL, "structureType" text NOT NULL, "token" text NULL, - verified bool NOT NULL DEFAULT false, + verified bool DEFAULT false NOT NULL, ville text NULL, - sms jsonb NOT NULL DEFAULT '{"senderName": null, "senderDetails": null, "enabledByDomifa": true, "enabledByStructure": false}'::jsonb, - "portailUsager" jsonb NOT NULL DEFAULT '{"enabledByDomifa": true, "enabledByStructure": false, "usagerLoginUpdateLastInteraction": false}'::jsonb, + sms jsonb DEFAULT '{"senderName": null, "senderDetails": null, "enabledByDomifa": true, "enabledByStructure": false}'::jsonb NOT NULL, + "portailUsager" jsonb DEFAULT '{"enabledByDomifa": true, "enabledByStructure": false, "usagerLoginUpdateLastInteraction": false}'::jsonb NOT NULL, "timeZone" text NULL, - telephone jsonb NOT NULL DEFAULT '{"numero": "", "countryCode": "fr"}'::jsonb, + telephone jsonb DEFAULT '{"numero": "", "countryCode": "fr"}'::jsonb NOT NULL, "acceptTerms" timestamptz NULL, - "filesUpdated" bool NOT NULL DEFAULT false, + "filesUpdated" bool DEFAULT false NOT NULL, latitude float8 NULL, longitude float8 NULL, "organismeType" text NULL, @@ -250,9 +250,9 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.usager_history_states; CREATE UNLOGGED TABLE public.usager_history_states ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, "usagerUUID" uuid NOT NULL, "usagerRef" int4 NOT NULL, @@ -264,10 +264,10 @@ async function createTables(queryRunner: QueryRunner) { "createdEvent" text NOT NULL, "historyBeginDate" timestamptz NOT NULL, "historyEndDate" timestamptz NULL, - "isActive" bool NULL DEFAULT false, - migrated bool NOT NULL DEFAULT false, - "typeDom" text NULL DEFAULT 'PREMIERE_DOM'::text, - "etapeDemande" int4 NOT NULL DEFAULT 0, + "isActive" bool DEFAULT false NULL, + migrated bool DEFAULT false NOT NULL, + "typeDom" text DEFAULT 'PREMIERE_DOM'::text NULL, + "etapeDemande" int4 DEFAULT 0 NOT NULL, CONSTRAINT "PK_c1bd0d42891df5715d2ef8474d7" PRIMARY KEY (uuid) ); CREATE INDEX "IDX_78061fee381f67924d9a659dc6" ON public.usager_history_states USING btree ("isActive"); @@ -286,9 +286,9 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.user_usager_login; CREATE UNLOGGED TABLE public.user_usager_login ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, "usagerUUID" uuid NOT NULL, "structureId" int4 NOT NULL, @@ -304,21 +304,21 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.message_sms; CREATE UNLOGGED TABLE public.message_sms ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, "usagerRef" int4 NOT NULL, "structureId" int4 NOT NULL, "content" text NOT NULL, - status text NOT NULL DEFAULT 'TO_SEND'::text, + status text DEFAULT 'TO_SEND'::text NOT NULL, "smsId" text NOT NULL, "scheduledDate" timestamptz NOT NULL, "sendDate" timestamptz NULL, "interactionMetas" jsonb NULL, "reminderMetas" jsonb NULL, "lastUpdate" timestamptz NULL, - "errorCount" int4 NOT NULL DEFAULT 0, + "errorCount" int4 DEFAULT 0 NOT NULL, "errorMessage" text NULL, "responseId" text NULL, "phoneNumber" text NOT NULL, @@ -339,19 +339,19 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.structure_doc; CREATE UNLOGGED TABLE public.structure_doc ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, id serial4 NOT NULL, "label" text NOT NULL, "createdBy" jsonb NOT NULL, - custom bool NOT NULL DEFAULT false, + custom bool DEFAULT false NOT NULL, filetype text NOT NULL, "structureId" int4 NOT NULL, "path" text NOT NULL, "customDocType" text NULL, - "displayInPortailUsager" bool NOT NULL DEFAULT false, + "displayInPortailUsager" bool DEFAULT false NOT NULL, CONSTRAINT "PK_6d6be27ca865c8ba30b9c862b70" PRIMARY KEY (uuid), CONSTRAINT "UQ_b1dfa7ef1934657b38072e749e3" UNIQUE (id), CONSTRAINT "FK_d79d466c870df0b58864836899d" FOREIGN KEY ("structureId") REFERENCES public."structure"(id) ON DELETE CASCADE @@ -367,9 +367,9 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.usager; CREATE UNLOGGED TABLE public.usager ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, "ref" int4 NOT NULL, "customRef" text NULL, @@ -383,18 +383,18 @@ async function createTables(queryRunner: QueryRunner) { langue text NULL, email text NULL, "datePremiereDom" timestamptz NULL, - "typeDom" text NULL DEFAULT 'PREMIERE_DOM'::text, + "typeDom" text DEFAULT 'PREMIERE_DOM'::text NULL, decision jsonb NOT NULL, historique jsonb NOT NULL, "ayantsDroits" jsonb NULL, "lastInteraction" jsonb NOT NULL, - "etapeDemande" int4 NOT NULL DEFAULT 0, + "etapeDemande" int4 DEFAULT 0 NOT NULL, rdv jsonb NULL, "options" jsonb NOT NULL, "import" jsonb NULL, - migrated bool NOT NULL DEFAULT false, - telephone jsonb NOT NULL DEFAULT '{"numero": "", "countryCode": "fr"}'::jsonb, - "contactByPhone" bool NULL DEFAULT false, + migrated bool DEFAULT false NOT NULL, + telephone jsonb DEFAULT '{"numero": "", "countryCode": "fr"}'::jsonb NOT NULL, + "contactByPhone" bool DEFAULT false NULL, "numeroDistribution" text NULL, "pinnedNote" jsonb NULL, CONSTRAINT "PK_1bb36e24229bec446a281573612" PRIMARY KEY (uuid), @@ -418,9 +418,9 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.usager_docs; CREATE UNLOGGED TABLE public.usager_docs ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, "usagerUUID" uuid NOT NULL, "structureId" int4 NOT NULL, @@ -446,9 +446,9 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.usager_entretien; CREATE UNLOGGED TABLE public.usager_entretien ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, "usagerUUID" uuid NOT NULL, "structureId" int4 NOT NULL, @@ -490,16 +490,16 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.usager_history; CREATE UNLOGGED TABLE public.usager_history ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, "usagerUUID" uuid NOT NULL, "usagerRef" int4 NOT NULL, "structureId" int4 NOT NULL, "import" jsonb NULL, states jsonb NOT NULL, - migrated bool NOT NULL DEFAULT false, + migrated bool DEFAULT false NOT NULL, CONSTRAINT "PK_29638b771d16000882db14bab40" PRIMARY KEY (uuid), CONSTRAINT "UQ_29a873927e96c4290d288d594f4" UNIQUE ("structureId", "usagerRef"), CONSTRAINT "UQ_7356ee08f3ac6e3e1c6fe08bd81" UNIQUE ("usagerUUID"), @@ -517,20 +517,20 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.usager_notes; CREATE UNLOGGED TABLE public.usager_notes ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, id serial4 NOT NULL, "usagerUUID" uuid NOT NULL, "structureId" int4 NOT NULL, "usagerRef" int4 NOT NULL, message text NOT NULL, - archived bool NOT NULL DEFAULT false, + archived bool DEFAULT false NOT NULL, "createdBy" jsonb NULL, "archivedBy" jsonb NULL, "archivedAt" date NULL, - pinned bool NOT NULL DEFAULT false, + pinned bool DEFAULT false NOT NULL, CONSTRAINT "PK_11acb926f75642e9dcdd97e5be1" PRIMARY KEY (uuid), CONSTRAINT "UQ_5d06e43196df8e4b02ceb16bc9a" UNIQUE (id), CONSTRAINT "FK_6ca23b363643ae281d2f1eddf2f" FOREIGN KEY ("usagerUUID") REFERENCES public.usager("uuid") ON DELETE CASCADE, @@ -548,9 +548,9 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.usager_options_history; CREATE UNLOGGED TABLE public.usager_options_history ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, "usagerUUID" uuid NOT NULL, "userId" int4 NULL, @@ -561,7 +561,7 @@ async function createTables(queryRunner: QueryRunner) { nom text NULL, prenom text NULL, adresse text NULL, - actif bool NOT NULL DEFAULT false, + actif bool DEFAULT false NOT NULL, "dateDebut" date NULL, "dateFin" date NULL, "dateNaissance" date NULL, @@ -581,9 +581,9 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.user_structure; CREATE UNLOGGED TABLE public.user_structure ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, email text NOT NULL, fonction text NULL, @@ -592,11 +592,11 @@ async function createTables(queryRunner: QueryRunner) { nom text NOT NULL, "password" text NOT NULL, prenom text NOT NULL, - "role" text NOT NULL DEFAULT 'simple'::text, + "role" text DEFAULT 'simple'::text NOT NULL, "structureId" int4 NOT NULL, - mails jsonb NOT NULL DEFAULT '{"guide": false, "import": false}'::jsonb, + mails jsonb DEFAULT '{"guide": false, "import": false}'::jsonb NOT NULL, "passwordLastUpdate" timestamptz NULL, - verified bool NOT NULL DEFAULT true, + verified bool DEFAULT true NOT NULL, "acceptTerms" timestamptz NULL, CONSTRAINT "PK_a58dc229068f494a0360b170322" PRIMARY KEY (uuid), CONSTRAINT "UQ_22a5c4a3d9b2fb8e4e73fc4ada1" UNIQUE (id), @@ -615,14 +615,14 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.user_structure_security; CREATE UNLOGGED TABLE public.user_structure_security ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, "userId" int4 NOT NULL, "structureId" int4 NOT NULL, "temporaryTokens" jsonb NULL, - "eventsHistory" jsonb NOT NULL DEFAULT '[]'::jsonb, + "eventsHistory" jsonb DEFAULT '[]'::jsonb NOT NULL, CONSTRAINT "PK_a617f0127221193d06271877ae0" PRIMARY KEY (uuid), CONSTRAINT "FK_0389a8aa8e69b2d17210745d040" FOREIGN KEY ("userId") REFERENCES public.user_structure(id) ON DELETE CASCADE, CONSTRAINT "FK_57be1bdd772eb3fea1e201317e6" FOREIGN KEY ("structureId") REFERENCES public."structure"(id) ON DELETE CASCADE @@ -638,9 +638,9 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.user_usager; CREATE UNLOGGED TABLE public.user_usager ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, id serial4 NOT NULL, "usagerUUID" uuid NOT NULL, @@ -648,12 +648,12 @@ async function createTables(queryRunner: QueryRunner) { login text NOT NULL, "password" text NOT NULL, salt text NOT NULL, - "isTemporaryPassword" bool NOT NULL DEFAULT false, + "isTemporaryPassword" bool DEFAULT false NOT NULL, "lastLogin" timestamptz NULL, "passwordLastUpdate" timestamptz NULL, "lastPasswordResetDate" timestamptz NULL, "lastPasswordResetStructureUser" jsonb NULL, - enabled bool NOT NULL DEFAULT false, + enabled bool DEFAULT false NOT NULL, "acceptTerms" timestamptz NULL, CONSTRAINT "PK_46cd95ba6c330d680e13ce7d932" PRIMARY KEY (uuid), CONSTRAINT "UQ_07ddbb376616a6bf4ffdbb2b6d7" UNIQUE ("usagerUUID"), @@ -675,13 +675,13 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.user_usager_security; CREATE UNLOGGED TABLE public.user_usager_security ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, "userId" int4 NOT NULL, "structureId" int4 NOT NULL, - "eventsHistory" jsonb NOT NULL DEFAULT '[]'::jsonb, + "eventsHistory" jsonb DEFAULT '[]'::jsonb NOT NULL, CONSTRAINT "PK_bae071b5eb7273c0b3d82e670d1" PRIMARY KEY (uuid), CONSTRAINT "UQ_0b7885e1594c7af3a5b84a4bdb3" UNIQUE ("userId"), CONSTRAINT "FK_066d08686fd781a7ea049b115a2" FOREIGN KEY ("structureId") REFERENCES public."structure"(id) ON DELETE CASCADE, @@ -698,12 +698,12 @@ async function createTables(queryRunner: QueryRunner) { -- DROP TABLE public.interactions; CREATE UNLOGGED TABLE public.interactions ( - "uuid" uuid NOT NULL DEFAULT uuid_generate_v4(), - "createdAt" timestamptz NOT NULL DEFAULT now(), - "updatedAt" timestamptz NOT NULL DEFAULT now(), + "uuid" uuid DEFAULT uuid_generate_v4() NOT NULL, + "createdAt" timestamptz DEFAULT now() NOT NULL, + "updatedAt" timestamptz DEFAULT now() NOT NULL, "version" int4 NOT NULL, "dateInteraction" timestamptz NOT NULL, - "nbCourrier" int4 NOT NULL DEFAULT 0, + "nbCourrier" int4 DEFAULT 0 NOT NULL, "structureId" int4 NOT NULL, "type" text NOT NULL, "usagerRef" int4 NOT NULL, @@ -712,8 +712,8 @@ async function createTables(queryRunner: QueryRunner) { "content" text NULL, "usagerUUID" uuid NOT NULL, "interactionOutUUID" uuid NULL, - procuration bool NULL, - "returnToSender" bool NULL, + procuration bool DEFAULT false NOT NULL, + "returnToSender" bool DEFAULT false NOT NULL, CONSTRAINT "PK_006113a10247f411c459d62a5b3" PRIMARY KEY (uuid), CONSTRAINT "FK_1953f5ad67157bada8774f7e245" FOREIGN KEY ("structureId") REFERENCES public."structure"(id) ON DELETE CASCADE, CONSTRAINT "FK_f9c3ee379ce68d4acfe4199a335" FOREIGN KEY ("usagerUUID") REFERENCES public.usager("uuid") ON DELETE CASCADE diff --git a/packages/backend/src/database/entities/interaction/InteractionsTable.typeorm.ts b/packages/backend/src/database/entities/interaction/InteractionsTable.typeorm.ts index 82b641de21..b0a3ee3a50 100644 --- a/packages/backend/src/database/entities/interaction/InteractionsTable.typeorm.ts +++ b/packages/backend/src/database/entities/interaction/InteractionsTable.typeorm.ts @@ -60,12 +60,12 @@ export class InteractionsTable usagerUUID: string; @Index() - @Column({ type: "boolean", nullable: true }) - procuration: boolean | null; + @Column({ type: "boolean", default: false }) + procuration: boolean; @Index() - @Column({ type: "boolean", nullable: true }) - returnToSender: boolean | null; + @Column({ type: "boolean", default: false }) + returnToSender: boolean; public constructor(entity?: Partial) { super(entity); diff --git a/packages/backend/src/database/entities/interaction/TmpCourriersTable.typeorm.ts b/packages/backend/src/database/entities/interaction/TmpCourriersTable.typeorm.ts deleted file mode 100644 index 0fa22ccb37..0000000000 --- a/packages/backend/src/database/entities/interaction/TmpCourriersTable.typeorm.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Entity, Column, PrimaryGeneratedColumn, Index } from "typeorm"; - -export interface TmpCourriers { - IDDomicilie: number; - motif: number; - date: number; - Date_recup: number; -} - -@Entity("TmpCourriers") -export class TmpCourriersTable { - @PrimaryGeneratedColumn("uuid") - public uuid?: string; - - @Index() - @Column({ type: "integer", nullable: true }) - IDDomicilie: number; - - @Column({ type: "integer", nullable: true }) - date: number; - - @Column({ type: "integer", nullable: true }) - Date_recup: number; - - @Column({ type: "integer", nullable: true }) - motif: number; - - public constructor(entity?: Partial) { - Object.assign(this, entity); - } -} diff --git a/packages/backend/src/database/entities/interaction/TmpHistoriqueTable.typeorm.ts b/packages/backend/src/database/entities/interaction/TmpHistoriqueTable.typeorm.ts deleted file mode 100644 index 54c468220c..0000000000 --- a/packages/backend/src/database/entities/interaction/TmpHistoriqueTable.typeorm.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Entity, Column, PrimaryGeneratedColumn, Index } from "typeorm"; - -export interface TmpHistorique { - id_domicilie: number; - date: string; - type: string; -} - -@Entity("TmpHistorique") -export class TmpHistoriqueTable { - @PrimaryGeneratedColumn("uuid") - public uuid?: string; - - @Index() - @Column({ type: "integer", nullable: true }) - id_domicilie: number; - - @Column({ type: "integer", nullable: true }) - date: number; - - @Index() - @Column({ nullable: true }) - type: string; - - public constructor(entity?: Partial) { - Object.assign(this, entity); - } -} diff --git a/packages/backend/src/database/services/interaction/interactionRepository.service.ts b/packages/backend/src/database/services/interaction/interactionRepository.service.ts index bf863be1b1..11b4fa6224 100644 --- a/packages/backend/src/database/services/interaction/interactionRepository.service.ts +++ b/packages/backend/src/database/services/interaction/interactionRepository.service.ts @@ -325,7 +325,7 @@ async function findLastInteractionOut( return interactionRepository.findOne({ where: { type: In(INTERACTION_OK_LIST), - procuration: IsNull(), + procuration: false, returnToSender: false, usagerUUID: usager.uuid, }, diff --git a/packages/backend/src/interactions/dto/interactions.dto.ts b/packages/backend/src/interactions/dto/interactions.dto.ts index 7e4228b781..e08ac38fd5 100644 --- a/packages/backend/src/interactions/dto/interactions.dto.ts +++ b/packages/backend/src/interactions/dto/interactions.dto.ts @@ -81,9 +81,9 @@ export class InteractionDto { public dateInteraction?: Date; @IsEmpty() - public procuration?: boolean | null = null; + public procuration: boolean = false; @IsOptional() @IsBoolean() - public returnToSender?: boolean | null = null; + public returnToSender: boolean = false; } diff --git a/packages/backend/src/interactions/services/InteractionsDeletor.service.spec.ts b/packages/backend/src/interactions/services/InteractionsDeletor.service.spec.ts index 8e65337737..a916db7fff 100644 --- a/packages/backend/src/interactions/services/InteractionsDeletor.service.spec.ts +++ b/packages/backend/src/interactions/services/InteractionsDeletor.service.spec.ts @@ -120,6 +120,8 @@ describe("InteractionsDeletor", () => { usagerRef: usager.ref, userName: "Nom", dateInteraction: new Date(), + returnToSender: false, + procuration: false, }; const resultat = await interactionsCreator.createInteraction({ diff --git a/packages/backend/src/interactions/services/interactionsCreator.service.ts b/packages/backend/src/interactions/services/interactionsCreator.service.ts index 9e4579037e..b80973a674 100644 --- a/packages/backend/src/interactions/services/interactionsCreator.service.ts +++ b/packages/backend/src/interactions/services/interactionsCreator.service.ts @@ -29,7 +29,8 @@ async function createInteraction({ interaction: CommonInteraction; }> { const now = new Date(); - let procuration: boolean | null = null; + let procuration: boolean = false; + const direction = interactionsTypeManager.getDirection({ type: interaction.type, }); diff --git a/packages/backend/src/sms/services/generators/generateSmsInteraction.service.spec.ts b/packages/backend/src/sms/services/generators/generateSmsInteraction.service.spec.ts index 487d70bd65..c4e5e64875 100644 --- a/packages/backend/src/sms/services/generators/generateSmsInteraction.service.spec.ts +++ b/packages/backend/src/sms/services/generators/generateSmsInteraction.service.spec.ts @@ -1,10 +1,13 @@ +import { CommonInteraction } from "@domifa/common"; import { generateSmsInteraction } from "."; -import { InteractionDto } from "../../../interactions/dto"; describe("generate SMS", () => { it("generate SMS", () => { - const firstInteraction: InteractionDto = { + const firstInteraction: CommonInteraction = { + returnToSender: false, + procuration: false, type: "courrierIn", + interactionOutUUID: null, content: "", nbCourrier: 2, structureId: 1, @@ -14,8 +17,11 @@ describe("generate SMS", () => { dateInteraction: new Date(), }; - const secondInteraction: InteractionDto = { + const secondInteraction: CommonInteraction = { + returnToSender: false, + procuration: false, type: "recommandeIn", + interactionOutUUID: null, content: "", nbCourrier: 1, structureId: 1, @@ -25,8 +31,11 @@ describe("generate SMS", () => { dateInteraction: new Date(), }; - const thirdInteraction: InteractionDto = { + const thirdInteraction: CommonInteraction = { + returnToSender: false, + procuration: false, type: "colisIn", + interactionOutUUID: null, content: "", nbCourrier: 19, structureId: 1, @@ -36,8 +45,11 @@ describe("generate SMS", () => { dateInteraction: new Date(), }; - const fourInteraction: InteractionDto = { + const fourInteraction: CommonInteraction = { + returnToSender: false, + procuration: false, type: "courrierIn", + interactionOutUUID: null, content: "", nbCourrier: 1, structureId: 1, diff --git a/packages/backend/src/sms/services/generators/generateSmsInteraction.service.ts b/packages/backend/src/sms/services/generators/generateSmsInteraction.service.ts index 5832e4b2b1..e8e9f5e098 100644 --- a/packages/backend/src/sms/services/generators/generateSmsInteraction.service.ts +++ b/packages/backend/src/sms/services/generators/generateSmsInteraction.service.ts @@ -1,8 +1,7 @@ -import { InteractionType } from "@domifa/common"; -import { InteractionDto } from "../../../interactions/dto"; +import { CommonInteraction, InteractionType } from "@domifa/common"; export function generateSmsInteraction( - interaction: InteractionDto, + interaction: CommonInteraction, senderDetails: string ): string { const interactionLabels: { diff --git a/packages/backend/src/sms/services/message-sms.service.ts b/packages/backend/src/sms/services/message-sms.service.ts index c3e2572ef6..4108ed8aa3 100644 --- a/packages/backend/src/sms/services/message-sms.service.ts +++ b/packages/backend/src/sms/services/message-sms.service.ts @@ -3,7 +3,6 @@ import { Injectable } from "@nestjs/common"; import { structureRepository } from "../../database"; import { messageSmsRepository } from "../../database/services/message-sms"; -import { InteractionDto } from "../../interactions/dto"; import { Usager } from "../../_common/model"; import { generateSmsInteraction } from "./generators"; @@ -50,7 +49,7 @@ export class MessageSmsService { public async deleteSmsInteraction( usager: Pick, structure: Pick, - interaction: InteractionDto + interaction: CommonInteraction ) { if (!structure.sms.enabledByDomifa && !structure.sms.enabledByStructure) { return null; @@ -81,7 +80,7 @@ export class MessageSmsService { public async createSmsInteraction( usager: Usager, structure: Pick, - interaction: InteractionDto + interaction: CommonInteraction ) { const scheduledDate = generateScheduleSendDate(new Date()); diff --git a/packages/backend/src/util/sentry/AppSentryInterceptor.service.ts b/packages/backend/src/util/sentry/AppSentryInterceptor.service.ts index 3ba7c20f04..f9aadd470f 100644 --- a/packages/backend/src/util/sentry/AppSentryInterceptor.service.ts +++ b/packages/backend/src/util/sentry/AppSentryInterceptor.service.ts @@ -31,6 +31,9 @@ export class AppSentryInterceptor implements NestInterceptor { if (user) { logContext.user = logSentryUser(user); } + if (req?.body) { + logContext.payload = req.body; + } } else { prefix = "[core]"; } @@ -91,7 +94,6 @@ function logSentryRequest(req: any): Record { "user-agent": req.headers["user-agent"], withAuthorizationToken: headers.authorization !== undefined, }, - payload: req.body, }; } diff --git a/packages/common/src/interactions/interfaces/CommonInteraction.interface.ts b/packages/common/src/interactions/interfaces/CommonInteraction.interface.ts index bacfad4a4d..1b1218355f 100644 --- a/packages/common/src/interactions/interfaces/CommonInteraction.interface.ts +++ b/packages/common/src/interactions/interfaces/CommonInteraction.interface.ts @@ -13,6 +13,6 @@ export interface CommonInteraction extends AppEntity { userId: number; userName: string; interactionOutUUID: string | null; - procuration: boolean | null; - returnToSender?: boolean | null; + procuration: boolean; + returnToSender?: boolean; }