From 55d27536d0cd28171f4f237c3f2d686bd668dfc3 Mon Sep 17 00:00:00 2001 From: Fufeck Date: Wed, 27 Nov 2024 11:24:47 +0100 Subject: [PATCH] openapi: change rep openapi -> openapi-api-bal --- components/bal-recovery/recover-bal-alert.tsx | 2 +- components/bal/commune-tab.tsx | 2 +- components/bal/numero-editor.tsx | 2 +- components/bal/position-editor.tsx | 2 +- components/bal/toponyme-editor.tsx | 2 +- components/bal/toponymes-list.tsx | 6 +++- components/bal/voie-editor.tsx | 2 +- components/bal/voies-list.tsx | 2 +- .../base-locale-card-content.tsx | 2 +- components/base-locale-card/index.tsx | 2 +- components/bases-locales-list/index.tsx | 2 +- .../public-bases-locales-list.tsx | 2 +- components/breadcrumbs.tsx | 2 +- components/demo-warning.tsx | 4 +-- components/downloads.tsx | 28 ++++++++++++------- components/grouped-actions.tsx | 2 +- .../habilitation-process/accepted-dialog.tsx | 2 +- components/habilitation-process/index.tsx | 2 +- .../habilitation-process/rejected-dialog.tsx | 2 +- components/help/help-tabs/publication.tsx | 2 +- components/hidden-bal.tsx | 2 +- components/map/hooks/bounds.ts | 2 +- components/map/map.tsx | 2 +- components/map/numero-marker.tsx | 2 +- components/map/numeros-markers.tsx | 2 +- components/map/toponyme-marker.tsx | 2 +- components/new/alert-other-bal.tsx | 2 +- components/new/create-form.tsx | 2 +- components/new/demo-form.tsx | 2 +- components/new/upload-form.tsx | 2 +- components/renew-token-dialog.tsx | 2 +- components/settings/bal-settings-form.tsx | 2 +- components/settings/index.tsx | 2 +- .../numero/signalement-create-numero.tsx | 2 +- .../numero/signalement-delete-numero.tsx | 2 +- .../numero/signalement-update-numero.tsx | 2 +- .../toponyme/signalement-update-toponyme.tsx | 2 +- .../voie/signalement-update-voie.tsx | 2 +- components/status-badge.tsx | 2 +- .../bal-status/ban-sync/ban-history.tsx | 2 +- .../ban-sync/ban-history/revision-user.tsx | 2 +- .../sub-header/bal-status/ban-sync/index.tsx | 2 +- components/sub-header/bal-status/index.tsx | 2 +- .../toponyme/add-numeros-with-polygon.tsx | 2 +- components/toponyme/add-numeros-with-voie.tsx | 2 +- components/toponyme/toponyme-heading.tsx | 2 +- components/toponyme/toponyme-numeros.tsx | 2 +- components/trash/restore-voie/index.tsx | 2 +- .../restore-voie/list-numeros-deleted.tsx | 2 +- components/user-bases-locales.tsx | 2 +- components/voie/numeros-list.tsx | 6 +++- components/voie/voie-heading.tsx | 2 +- contexts/bal-data.tsx | 2 +- contexts/draw.tsx | 2 +- contexts/local-storage.tsx | 2 +- contexts/markers.tsx | 2 +- contexts/signalement.tsx | 2 +- contexts/token.tsx | 4 +-- hooks/habilitation.ts | 2 +- hooks/publish-process.ts | 7 +++-- hooks/trash.ts | 2 +- layouts/editor.tsx | 2 +- .../core/ApiError.ts | 0 .../core/ApiRequestOptions.ts | 0 .../core/ApiResult.ts | 0 .../core/CancelablePromise.ts | 0 .../core/OpenAPI.ts | 0 .../core/request.ts | 0 lib/{openapi => openapi-api-bal}/index.ts | 0 .../models/AllDeletedInBalDTO.ts | 0 .../models/BaseLocale.ts | 0 .../models/BaseLocaleSync.ts | 0 .../models/BasesLocalesCreationDTO.ts | 0 .../models/BasesLocalesStatusDTO.ts | 0 .../models/BatchNumeroResponseDTO.ts | 0 .../models/CodeCommuneDTO.ts | 0 .../models/CommuneExtraDTO.ts | 0 .../models/CreateBaseLocaleDTO.ts | 0 .../models/CreateDemoBaseLocaleDTO.ts | 0 .../models/CreateNumeroDTO.ts | 0 .../models/CreateToponymeDTO.ts | 0 .../models/CreateVoieDTO.ts | 0 .../models/DeleteBatchNumeroDTO.ts | 0 .../models/ExtendedBaseLocaleDTO.ts | 0 .../models/ExtendedVoieDTO.ts | 0 .../models/ExtentedToponymeDTO.ts | 0 .../models/HabilitationDTO.ts | 0 .../models/ImportFileBaseLocaleDTO.ts | 0 .../models/LineString.ts | 0 .../models/Numero.ts | 0 .../models/PageBaseLocaleDTO.ts | 0 .../models/Position.ts | 0 .../models/RecoverBaseLocaleDTO.ts | 0 .../models/RestoreVoieDTO.ts | 0 .../models/SearchNumeroDTO.ts | 0 .../models/Strategy.ts | 0 .../models/Toponyme.ts | 0 .../models/UpdateBaseLocaleDTO.ts | 0 .../models/UpdateBaseLocaleDemoDTO.ts | 0 .../models/UpdateBatchNumeroChangeDTO.ts | 0 .../models/UpdateBatchNumeroDTO.ts | 0 .../models/UpdateNumeroDTO.ts | 0 .../models/UpdateToponymeDTO.ts | 0 .../models/UpdateVoieDTO.ts | 0 .../models/ValidatePinCodeDTO.ts | 0 .../models/Voie.ts | 0 .../services/BasesLocalesService.ts | 0 .../services/CommuneService.ts | 0 .../services/ExportCsvService.ts | 0 .../services/HabilitationService.ts | 0 .../services/NumerosService.ts | 0 .../services/StatsService.ts | 0 .../services/TilesService.ts | 0 .../services/ToponymesService.ts | 0 .../services/VoiesService.ts | 0 lib/statuses.ts | 2 +- package.json | 2 +- pages/_app.tsx | 2 +- pages/all.tsx | 2 +- pages/bal/[balId]/index.tsx | 2 +- .../[balId]/signalements/[idSignalement].tsx | 2 +- pages/bal/[balId]/toponymes/[idToponyme].tsx | 2 +- pages/bal/[balId]/voies/[idVoie].tsx | 2 +- types/commune.ts | 4 +-- 124 files changed, 103 insertions(+), 84 deletions(-) rename lib/{openapi => openapi-api-bal}/core/ApiError.ts (100%) rename lib/{openapi => openapi-api-bal}/core/ApiRequestOptions.ts (100%) rename lib/{openapi => openapi-api-bal}/core/ApiResult.ts (100%) rename lib/{openapi => openapi-api-bal}/core/CancelablePromise.ts (100%) rename lib/{openapi => openapi-api-bal}/core/OpenAPI.ts (100%) rename lib/{openapi => openapi-api-bal}/core/request.ts (100%) rename lib/{openapi => openapi-api-bal}/index.ts (100%) rename lib/{openapi => openapi-api-bal}/models/AllDeletedInBalDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/BaseLocale.ts (100%) rename lib/{openapi => openapi-api-bal}/models/BaseLocaleSync.ts (100%) rename lib/{openapi => openapi-api-bal}/models/BasesLocalesCreationDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/BasesLocalesStatusDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/BatchNumeroResponseDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/CodeCommuneDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/CommuneExtraDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/CreateBaseLocaleDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/CreateDemoBaseLocaleDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/CreateNumeroDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/CreateToponymeDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/CreateVoieDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/DeleteBatchNumeroDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/ExtendedBaseLocaleDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/ExtendedVoieDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/ExtentedToponymeDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/HabilitationDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/ImportFileBaseLocaleDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/LineString.ts (100%) rename lib/{openapi => openapi-api-bal}/models/Numero.ts (100%) rename lib/{openapi => openapi-api-bal}/models/PageBaseLocaleDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/Position.ts (100%) rename lib/{openapi => openapi-api-bal}/models/RecoverBaseLocaleDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/RestoreVoieDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/SearchNumeroDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/Strategy.ts (100%) rename lib/{openapi => openapi-api-bal}/models/Toponyme.ts (100%) rename lib/{openapi => openapi-api-bal}/models/UpdateBaseLocaleDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/UpdateBaseLocaleDemoDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/UpdateBatchNumeroChangeDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/UpdateBatchNumeroDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/UpdateNumeroDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/UpdateToponymeDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/UpdateVoieDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/ValidatePinCodeDTO.ts (100%) rename lib/{openapi => openapi-api-bal}/models/Voie.ts (100%) rename lib/{openapi => openapi-api-bal}/services/BasesLocalesService.ts (100%) rename lib/{openapi => openapi-api-bal}/services/CommuneService.ts (100%) rename lib/{openapi => openapi-api-bal}/services/ExportCsvService.ts (100%) rename lib/{openapi => openapi-api-bal}/services/HabilitationService.ts (100%) rename lib/{openapi => openapi-api-bal}/services/NumerosService.ts (100%) rename lib/{openapi => openapi-api-bal}/services/StatsService.ts (100%) rename lib/{openapi => openapi-api-bal}/services/TilesService.ts (100%) rename lib/{openapi => openapi-api-bal}/services/ToponymesService.ts (100%) rename lib/{openapi => openapi-api-bal}/services/VoiesService.ts (100%) diff --git a/components/bal-recovery/recover-bal-alert.tsx b/components/bal-recovery/recover-bal-alert.tsx index d897eadd5..09b8937bb 100644 --- a/components/bal-recovery/recover-bal-alert.tsx +++ b/components/bal-recovery/recover-bal-alert.tsx @@ -10,7 +10,7 @@ import { } from "@/components/help/video-container"; import { useInput } from "@/hooks/input"; -import { BasesLocalesService } from "@/lib/openapi"; +import { BasesLocalesService } from "@/lib/openapi-api-bal"; import LayoutContext from "@/contexts/layout"; const hasBeenSentRecently = (sentAt) => { diff --git a/components/bal/commune-tab.tsx b/components/bal/commune-tab.tsx index ba275c6be..ca49097d1 100644 --- a/components/bal/commune-tab.tsx +++ b/components/bal/commune-tab.tsx @@ -9,7 +9,7 @@ import HabilitationInfos from "./habilitation-infos"; import SignalementsInfos from "./signalement-infos"; import ReadOnlyInfos from "./read-only-infos"; import { CommuneType } from "@/types/commune"; -import { BaseLocale } from "@/lib/openapi"; +import { BaseLocale } from "@/lib/openapi-api-bal"; import SignalementContext from "@/contexts/signalement"; interface CommuneTabProps { diff --git a/components/bal/numero-editor.tsx b/components/bal/numero-editor.tsx index 6e33c168c..29c621f76 100644 --- a/components/bal/numero-editor.tsx +++ b/components/bal/numero-editor.tsx @@ -30,7 +30,7 @@ import { Numero, NumerosService, VoiesService, -} from "@/lib/openapi"; +} from "@/lib/openapi-api-bal"; import { CommuneType } from "@/types/commune"; import LayoutContext from "@/contexts/layout"; diff --git a/components/bal/position-editor.tsx b/components/bal/position-editor.tsx index ad1d5a0e5..064792253 100644 --- a/components/bal/position-editor.tsx +++ b/components/bal/position-editor.tsx @@ -12,7 +12,7 @@ import MarkersContext from "@/contexts/markers"; import InputLabel from "@/components/input-label"; import PositionItem from "./position-item"; -import { Position } from "@/lib/openapi"; +import { Position } from "@/lib/openapi-api-bal"; import LayoutContext from "@/contexts/layout"; interface PositionEditorProps { diff --git a/components/bal/toponyme-editor.tsx b/components/bal/toponyme-editor.tsx index 414a8e43d..bf31f1dd3 100644 --- a/components/bal/toponyme-editor.tsx +++ b/components/bal/toponyme-editor.tsx @@ -23,7 +23,7 @@ import { Toponyme, ToponymesService, UpdateBatchNumeroDTO, -} from "@/lib/openapi"; +} from "@/lib/openapi-api-bal"; import { CommuneType } from "@/types/commune"; import LayoutContext from "@/contexts/layout"; import AddNumerosInput from "../toponyme/add-numeros-input"; diff --git a/components/bal/toponymes-list.tsx b/components/bal/toponymes-list.tsx index 270707239..ed165255a 100644 --- a/components/bal/toponymes-list.tsx +++ b/components/bal/toponymes-list.tsx @@ -21,7 +21,11 @@ import useFuse from "@/hooks/fuse"; import DeleteWarning from "@/components/delete-warning"; import InfiniteScrollList from "@/components/infinite-scroll-list"; -import { ExtentedToponymeDTO, Numero, ToponymesService } from "@/lib/openapi"; +import { + ExtentedToponymeDTO, + Numero, + ToponymesService, +} from "@/lib/openapi-api-bal"; import LayoutContext from "@/contexts/layout"; import LanguagePreview from "./language-preview"; import TableRowNotifications from "../table-row/table-row-notifications"; diff --git a/components/bal/voie-editor.tsx b/components/bal/voie-editor.tsx index 00d019e92..f03379a7a 100644 --- a/components/bal/voie-editor.tsx +++ b/components/bal/voie-editor.tsx @@ -22,7 +22,7 @@ import { UpdateVoieDTO, Voie, VoiesService, -} from "@/lib/openapi"; +} from "@/lib/openapi-api-bal"; import LayoutContext from "@/contexts/layout"; interface VoieEditorProps { diff --git a/components/bal/voies-list.tsx b/components/bal/voies-list.tsx index 834bab349..194f05816 100644 --- a/components/bal/voies-list.tsx +++ b/components/bal/voies-list.tsx @@ -28,7 +28,7 @@ import CommentsContent from "@/components/comments-content"; import DeleteWarning from "@/components/delete-warning"; import InfiniteScrollList from "../infinite-scroll-list"; -import { ExtendedVoieDTO, Numero, VoiesService } from "@/lib/openapi"; +import { ExtendedVoieDTO, Numero, VoiesService } from "@/lib/openapi-api-bal"; import LayoutContext from "@/contexts/layout"; import TableRowActions from "../table-row/table-row-actions"; import TableRowNotifications from "../table-row/table-row-notifications"; diff --git a/components/base-locale-card/base-locale-card-content.tsx b/components/base-locale-card/base-locale-card-content.tsx index eb146bebb..384c555f6 100644 --- a/components/base-locale-card/base-locale-card-content.tsx +++ b/components/base-locale-card/base-locale-card-content.tsx @@ -24,7 +24,7 @@ import { ExtendedBaseLocaleDTO, HabilitationDTO, BaseLocaleSync, -} from "@/lib/openapi"; +} from "@/lib/openapi-api-bal"; import { CommuneApiGeoType } from "@/lib/geo-api/type"; import LayoutContext from "@/contexts/layout"; diff --git a/components/base-locale-card/index.tsx b/components/base-locale-card/index.tsx index d03751666..f923afed9 100644 --- a/components/base-locale-card/index.tsx +++ b/components/base-locale-card/index.tsx @@ -20,7 +20,7 @@ import { HabilitationDTO, HabilitationService, OpenAPI, -} from "@/lib/openapi"; +} from "@/lib/openapi-api-bal"; import { CommuneApiGeoType } from "@/lib/geo-api/type"; const ADRESSE_URL = diff --git a/components/bases-locales-list/index.tsx b/components/bases-locales-list/index.tsx index 8a2f380fc..5ea1442f8 100644 --- a/components/bases-locales-list/index.tsx +++ b/components/bases-locales-list/index.tsx @@ -10,7 +10,7 @@ import useFuse from "@/hooks/fuse"; import DeleteWarning from "@/components/delete-warning"; import BaseLocaleCard from "@/components/base-locale-card"; -import { ExtendedBaseLocaleDTO } from "@/lib/openapi"; +import { ExtendedBaseLocaleDTO } from "@/lib/openapi-api-bal"; interface BasesLocalesListProps { basesLocales: ExtendedBaseLocaleDTO[]; diff --git a/components/bases-locales-list/public-bases-locales-list.tsx b/components/bases-locales-list/public-bases-locales-list.tsx index ac59c717d..2d2ac6092 100644 --- a/components/bases-locales-list/public-bases-locales-list.tsx +++ b/components/bases-locales-list/public-bases-locales-list.tsx @@ -2,7 +2,7 @@ import Router from "next/router"; import { Pane, Table } from "evergreen-ui"; import BaseLocaleCard from "@/components/base-locale-card"; -import { ExtendedBaseLocaleDTO } from "@/lib/openapi"; +import { ExtendedBaseLocaleDTO } from "@/lib/openapi-api-bal"; interface PublicBasesLocalesListProps { basesLocales: ExtendedBaseLocaleDTO[]; diff --git a/components/breadcrumbs.tsx b/components/breadcrumbs.tsx index ef9851564..2a494ced5 100644 --- a/components/breadcrumbs.tsx +++ b/components/breadcrumbs.tsx @@ -2,7 +2,7 @@ import React, { useContext } from "react"; import NextLink from "next/link"; import { Pane, Text, HomeIcon, Link, PaneProps } from "evergreen-ui"; import { CommuneType } from "@/types/commune"; -import { BaseLocale, Toponyme, Voie } from "@/lib/openapi"; +import { BaseLocale, Toponyme, Voie } from "@/lib/openapi-api-bal"; import { useRouter } from "next/router"; import { capitalize } from "lodash"; import SignalementContext from "@/contexts/signalement"; diff --git a/components/demo-warning.tsx b/components/demo-warning.tsx index 5e8aaf982..cf0f8c881 100644 --- a/components/demo-warning.tsx +++ b/components/demo-warning.tsx @@ -8,13 +8,13 @@ import { WarningSignIcon, } from "evergreen-ui"; -import { BasesLocalesService } from "@/lib/openapi/services/BasesLocalesService"; +import { BasesLocalesService } from "@/lib/openapi-api-bal"; import BalDataContext from "@/contexts/bal-data"; import { useInput } from "@/hooks/input"; import useFocus from "@/hooks/focus"; -import { ExtendedBaseLocaleDTO } from "@/lib/openapi"; +import { ExtendedBaseLocaleDTO } from "@/lib/openapi-api-bal"; import LayoutContext from "@/contexts/layout"; interface DemoWarningProps { diff --git a/components/downloads.tsx b/components/downloads.tsx index f60b0e509..c07d22026 100644 --- a/components/downloads.tsx +++ b/components/downloads.tsx @@ -1,6 +1,16 @@ -import { Pane, Heading, Link, DownloadIcon, Checkbox, Alert, Button, Text, Label } from "evergreen-ui"; +import { + Pane, + Heading, + Link, + DownloadIcon, + Checkbox, + Alert, + Button, + Text, + Label, +} from "evergreen-ui"; import { useContext, useState } from "react"; -import { ExportCsvService } from "@/lib/openapi"; +import { ExportCsvService } from "@/lib/openapi-api-bal"; import TokenContext from "@/contexts/token"; interface DownloadsProps { @@ -63,21 +73,19 @@ function Downloads({ baseLocaleId }: DownloadsProps) { checked={withComment} onChange={(e) => setWithComment(e.target.checked)} /> - - Avec commentaires - + Avec commentaires )} - { withComment && + {withComment && ( - Attention, si vous avez renseigné des informations à caractère personnel dans vos commentaires, celles-ci seront présentes dans l’export de votre Base Adresse Locale. + Attention, si vous avez renseigné des informations à caractère + personnel dans vos commentaires, celles-ci seront présentes dans + l’export de votre Base Adresse Locale. - } + )} diff --git a/components/grouped-actions.tsx b/components/grouped-actions.tsx index c5f458ee3..7ac76b4d7 100644 --- a/components/grouped-actions.tsx +++ b/components/grouped-actions.tsx @@ -25,7 +25,7 @@ import { useInput, useCheckboxInput } from "@/hooks/input"; import Comment from "@/components/comment"; import CertificationButton from "@/components/certification-button"; import FormInput from "@/components/form-input"; -import { Numero } from "@/lib/openapi"; +import { Numero } from "@/lib/openapi-api-bal"; interface GroupedActionsProps { idVoie: string; diff --git a/components/habilitation-process/accepted-dialog.tsx b/components/habilitation-process/accepted-dialog.tsx index f93b2cc9c..ed8fa934b 100644 --- a/components/habilitation-process/accepted-dialog.tsx +++ b/components/habilitation-process/accepted-dialog.tsx @@ -15,7 +15,7 @@ import { import TextWrapper from "@/components/text-wrapper"; import AuthenticatedUser from "@/components/habilitation-process/authenticated-user"; import { CommuneType } from "@/types/commune"; -import { BasesLocalesService } from "@/lib/openapi"; +import { BasesLocalesService } from "@/lib/openapi-api-bal"; interface AcceptedDialogProps { baseLocaleId: string; diff --git a/components/habilitation-process/index.tsx b/components/habilitation-process/index.tsx index dc12fa030..6ccc64268 100644 --- a/components/habilitation-process/index.tsx +++ b/components/habilitation-process/index.tsx @@ -17,7 +17,7 @@ import { BaseLocale, BasesLocalesService, HabilitationService, -} from "@/lib/openapi"; +} from "@/lib/openapi-api-bal"; import { CommuneType } from "@/types/commune"; import LayoutContext from "@/contexts/layout"; diff --git a/components/habilitation-process/rejected-dialog.tsx b/components/habilitation-process/rejected-dialog.tsx index 40cfeb46e..1f07c7c7d 100644 --- a/components/habilitation-process/rejected-dialog.tsx +++ b/components/habilitation-process/rejected-dialog.tsx @@ -1,5 +1,5 @@ import { Alert, Text } from "evergreen-ui"; -import { Strategy } from "@/lib/openapi"; +import { Strategy } from "@/lib/openapi-api-bal"; interface RejectedDialogProps { communeName: string; diff --git a/components/help/help-tabs/publication.tsx b/components/help/help-tabs/publication.tsx index 456b14871..037c1939d 100644 --- a/components/help/help-tabs/publication.tsx +++ b/components/help/help-tabs/publication.tsx @@ -21,7 +21,7 @@ import { VideoContainer, PEERTUBE_LINK, } from "@/components/help/video-container"; -import { BaseLocale, BaseLocaleSync } from "@/lib/openapi"; +import { BaseLocale, BaseLocaleSync } from "@/lib/openapi-api-bal"; function Publication() { return ( diff --git a/components/hidden-bal.tsx b/components/hidden-bal.tsx index 7498e5800..a3c3c1d89 100644 --- a/components/hidden-bal.tsx +++ b/components/hidden-bal.tsx @@ -8,7 +8,7 @@ import { UndoIcon, Spinner, } from "evergreen-ui"; -import { BasesLocalesService } from "@/lib/openapi"; +import { BasesLocalesService } from "@/lib/openapi-api-bal"; import LocalStorageContext from "@/contexts/local-storage"; diff --git a/components/map/hooks/bounds.ts b/components/map/hooks/bounds.ts index 7d718540b..6c00e6d0e 100644 --- a/components/map/hooks/bounds.ts +++ b/components/map/hooks/bounds.ts @@ -6,7 +6,7 @@ import BalDataContext from "@/contexts/bal-data"; import MapContext from "@/contexts/map"; import { NextRouter, useRouter } from "next/router"; import { CommuneType } from "@/types/commune"; -import { Toponyme, Voie } from "@/lib/openapi"; +import { Toponyme, Voie } from "@/lib/openapi-api-bal"; import { ViewState } from "react-map-gl"; function useBounds( diff --git a/components/map/map.tsx b/components/map/map.tsx index b9e0b1bcb..6685755e2 100644 --- a/components/map/map.tsx +++ b/components/map/map.tsx @@ -51,7 +51,7 @@ import ImageControl from "@/components/map/controls/image-control"; import useBounds from "@/components/map/hooks/bounds"; import useHovered from "@/components/map/hooks/hovered"; import { CommuneType } from "@/types/commune"; -import { Numero } from "@/lib/openapi"; +import { Numero } from "@/lib/openapi-api-bal"; import LayoutContext from "@/contexts/layout"; const TOPONYMES_MIN_ZOOM = 13; diff --git a/components/map/numero-marker.tsx b/components/map/numero-marker.tsx index 7f0f34781..a01e10dc3 100644 --- a/components/map/numero-marker.tsx +++ b/components/map/numero-marker.tsx @@ -13,7 +13,7 @@ import { import { Tooltip } from "evergreen-ui/commonjs/tooltip"; import { computeCompletNumero } from "@/lib/utils/numero"; -import { Numero } from "@/lib/openapi"; +import { Numero } from "@/lib/openapi-api-bal"; interface NumeroMarkerProps { numero: Numero; diff --git a/components/map/numeros-markers.tsx b/components/map/numeros-markers.tsx index bbd4f5334..393d44230 100644 --- a/components/map/numeros-markers.tsx +++ b/components/map/numeros-markers.tsx @@ -5,7 +5,7 @@ import BalDataContext from "@/contexts/bal-data"; import MapContext from "@/contexts/map"; import NumeroMarker from "@/components/map/numero-marker"; -import { Numero, NumerosService } from "@/lib/openapi"; +import { Numero, NumerosService } from "@/lib/openapi-api-bal"; import LayoutContext from "@/contexts/layout"; interface NumerosMarkersProps { diff --git a/components/map/toponyme-marker.tsx b/components/map/toponyme-marker.tsx index ea9d89fc0..e407ce894 100644 --- a/components/map/toponyme-marker.tsx +++ b/components/map/toponyme-marker.tsx @@ -13,7 +13,7 @@ import { css } from "glamor"; import MarkersContext from "@/contexts/markers"; import BalDataContext from "@/contexts/bal-data"; -import { ExtentedToponymeDTO, ToponymesService } from "@/lib/openapi"; +import { ExtentedToponymeDTO, ToponymesService } from "@/lib/openapi-api-bal"; import LayoutContext from "@/contexts/layout"; interface ToponymeMarkerProps { diff --git a/components/new/alert-other-bal.tsx b/components/new/alert-other-bal.tsx index acbe94ca2..24dd39632 100644 --- a/components/new/alert-other-bal.tsx +++ b/components/new/alert-other-bal.tsx @@ -9,7 +9,7 @@ import LocalStorageContext from "@/contexts/local-storage"; import BaseLocaleCard from "@/components/base-locale-card"; import DeleteWarning from "@/components/delete-warning"; -import { ExtendedBaseLocaleDTO } from "@/lib/openapi"; +import { ExtendedBaseLocaleDTO } from "@/lib/openapi-api-bal"; interface AlertOtherBALProps { isShown: boolean; diff --git a/components/new/create-form.tsx b/components/new/create-form.tsx index 1555616c1..dc4bf2abd 100644 --- a/components/new/create-form.tsx +++ b/components/new/create-form.tsx @@ -25,7 +25,7 @@ import { ExtendedBaseLocaleDTO, OpenAPI, PageBaseLocaleDTO, -} from "@/lib/openapi"; +} from "@/lib/openapi-api-bal"; import { ApiDepotService } from "@/lib/api-depot"; import { Client, Revision } from "@/lib/api-depot/types"; import LayoutContext from "@/contexts/layout"; diff --git a/components/new/demo-form.tsx b/components/new/demo-form.tsx index 61fa4e052..58ca6850a 100644 --- a/components/new/demo-form.tsx +++ b/components/new/demo-form.tsx @@ -9,7 +9,7 @@ import { useCheckboxInput } from "@/hooks/input"; import FormInput from "@/components/form-input"; import CommuneSearchField from "@/components/commune-search/commune-search-field"; import { CommuneType } from "@/types/commune"; -import { BasesLocalesService } from "@/lib/openapi"; +import { BasesLocalesService } from "@/lib/openapi-api-bal"; import LayoutContext from "@/contexts/layout"; interface DemoFormProps { diff --git a/components/new/upload-form.tsx b/components/new/upload-form.tsx index 0125e5a2b..a2358f7f6 100644 --- a/components/new/upload-form.tsx +++ b/components/new/upload-form.tsx @@ -41,7 +41,7 @@ import { ExtendedBaseLocaleDTO, OpenAPI, PageBaseLocaleDTO, -} from "@/lib/openapi"; +} from "@/lib/openapi-api-bal"; import { isExceptionClientId } from "./create-form"; import { ApiDepotService } from "@/lib/api-depot"; import { Revision } from "@/lib/api-depot/types"; diff --git a/components/renew-token-dialog.tsx b/components/renew-token-dialog.tsx index d69e1e544..b4e3a9be7 100644 --- a/components/renew-token-dialog.tsx +++ b/components/renew-token-dialog.tsx @@ -1,6 +1,6 @@ import { useState, useCallback, useContext } from "react"; import { Pane, Dialog, Paragraph, Alert } from "evergreen-ui"; -import { BasesLocalesService } from "@/lib/openapi"; +import { BasesLocalesService } from "@/lib/openapi-api-bal"; import LayoutContext from "@/contexts/layout"; interface RenewTokenDialogProps { diff --git a/components/settings/bal-settings-form.tsx b/components/settings/bal-settings-form.tsx index 73aa5f57a..bf5e16164 100644 --- a/components/settings/bal-settings-form.tsx +++ b/components/settings/bal-settings-form.tsx @@ -22,7 +22,7 @@ import { useInput } from "@/hooks/input"; import FormContainer from "@/components/form-container"; import FormInput from "@/components/form-input"; import RenewTokenDialog from "@/components/renew-token-dialog"; -import { BaseLocale, BasesLocalesService } from "@/lib/openapi"; +import { BaseLocale, BasesLocalesService } from "@/lib/openapi-api-bal"; import LayoutContext from "@/contexts/layout"; const mailHasChanged = (listA, listB) => { diff --git a/components/settings/index.tsx b/components/settings/index.tsx index 117eab637..7d18f1220 100644 --- a/components/settings/index.tsx +++ b/components/settings/index.tsx @@ -3,7 +3,7 @@ import { Pane, Heading, Tablist, Tab, CogIcon } from "evergreen-ui"; import UserSettingsForm from "./user-settings-form"; import BALSettingsForm from "./bal-settings-form"; -import { BaseLocale } from "@/lib/openapi"; +import { BaseLocale } from "@/lib/openapi-api-bal"; const getSettingsTabs = (hideBalSettings) => { const tabs = [ diff --git a/components/signalement/numero/signalement-create-numero.tsx b/components/signalement/numero/signalement-create-numero.tsx index 8497b56c2..d4fd62ccd 100644 --- a/components/signalement/numero/signalement-create-numero.tsx +++ b/components/signalement/numero/signalement-create-numero.tsx @@ -2,7 +2,7 @@ import { Button, Pane } from "evergreen-ui"; import React from "react"; import NumeroEditor from "../../bal/numero-editor"; import { CommuneType } from "@/types/commune"; -import { Numero } from "@/lib/openapi"; +import { Numero } from "@/lib/openapi-api-bal"; import { Signalement } from "@/lib/openapi-signalement"; interface SignalementCreateNumeroProps { diff --git a/components/signalement/numero/signalement-delete-numero.tsx b/components/signalement/numero/signalement-delete-numero.tsx index ce7e371c0..f901337cb 100644 --- a/components/signalement/numero/signalement-delete-numero.tsx +++ b/components/signalement/numero/signalement-delete-numero.tsx @@ -4,7 +4,7 @@ import NumeroEditor from "../../bal/numero-editor"; import { CommuneType } from "@/types/commune"; import BalDataContext from "@/contexts/bal-data"; import MapContext from "@/contexts/map"; -import { Numero, NumerosService, Voie } from "@/lib/openapi"; +import { Numero, NumerosService, Voie } from "@/lib/openapi-api-bal"; import LayoutContext from "@/contexts/layout"; interface SignalementDeleteNumeroProps { diff --git a/components/signalement/numero/signalement-update-numero.tsx b/components/signalement/numero/signalement-update-numero.tsx index c0d5ba527..5f34d1ea2 100644 --- a/components/signalement/numero/signalement-update-numero.tsx +++ b/components/signalement/numero/signalement-update-numero.tsx @@ -13,7 +13,7 @@ import { CommuneType } from "@/types/commune"; import SignalementCard from "../signalement-card"; import MarkersContext from "@/contexts/markers"; import PositionItem from "../../bal/position-item"; -import { Numero, Position, Voie, VoiesService } from "@/lib/openapi"; +import { Numero, Position, Voie, VoiesService } from "@/lib/openapi-api-bal"; import { Signalement, Position as PositionSignalement, diff --git a/components/signalement/toponyme/signalement-update-toponyme.tsx b/components/signalement/toponyme/signalement-update-toponyme.tsx index b57e46845..92a639d4d 100644 --- a/components/signalement/toponyme/signalement-update-toponyme.tsx +++ b/components/signalement/toponyme/signalement-update-toponyme.tsx @@ -4,7 +4,7 @@ import ReactDOM from "react-dom"; import { CommuneType } from "@/types/commune"; import SignalementCard from "../signalement-card"; import ToponymeEditor from "@/components/bal/toponyme-editor"; -import { Position, Toponyme } from "@/lib/openapi"; +import { Position, Toponyme } from "@/lib/openapi-api-bal"; import PositionItem from "@/components/bal/position-item"; import MarkersContext from "@/contexts/markers"; import { diff --git a/components/signalement/voie/signalement-update-voie.tsx b/components/signalement/voie/signalement-update-voie.tsx index 849e58af0..76efc5791 100644 --- a/components/signalement/voie/signalement-update-voie.tsx +++ b/components/signalement/voie/signalement-update-voie.tsx @@ -5,7 +5,7 @@ import { CommuneType } from "@/types/commune"; import SignalementCard from "../signalement-card"; import VoieEditor from "@/components/bal/voie-editor"; import { Signalement } from "@/lib/openapi-signalement"; -import { Voie } from "@/lib/openapi"; +import { Voie } from "@/lib/openapi-api-bal"; interface SignalementUpdateVoieProps { signalement: Signalement; diff --git a/components/status-badge.tsx b/components/status-badge.tsx index 57f560fdd..0adff4f20 100644 --- a/components/status-badge.tsx +++ b/components/status-badge.tsx @@ -1,7 +1,7 @@ import { Pane, Badge, Position, Tooltip, Icon } from "evergreen-ui"; import { computeStatus } from "@/lib/statuses"; -import { BaseLocale, BaseLocaleSync } from "@/lib/openapi"; +import { BaseLocale, BaseLocaleSync } from "@/lib/openapi-api-bal"; interface StatusBadgeProps { status: BaseLocale.status; diff --git a/components/sub-header/bal-status/ban-sync/ban-history.tsx b/components/sub-header/bal-status/ban-sync/ban-history.tsx index b7f840b7d..0bc9d25a1 100644 --- a/components/sub-header/bal-status/ban-sync/ban-history.tsx +++ b/components/sub-header/bal-status/ban-sync/ban-history.tsx @@ -14,7 +14,7 @@ import { ApiDepotService } from "@/lib/api-depot"; import Revision from "@/components/sub-header/bal-status/ban-sync/ban-history/revision"; import { Revision as RevisionType } from "@/lib/api-depot/types"; import { CommuneType } from "@/types/commune"; -import { BaseLocaleSync } from "@/lib/openapi"; +import { BaseLocaleSync } from "@/lib/openapi-api-bal"; interface BANHistoryProps { baseLocaleId: string; diff --git a/components/sub-header/bal-status/ban-sync/ban-history/revision-user.tsx b/components/sub-header/bal-status/ban-sync/ban-history/revision-user.tsx index 72fd4176a..58922fde7 100644 --- a/components/sub-header/bal-status/ban-sync/ban-history/revision-user.tsx +++ b/components/sub-header/bal-status/ban-sync/ban-history/revision-user.tsx @@ -1,6 +1,6 @@ import React from "react"; import { Pane, Text, Strong } from "evergreen-ui"; -import { HabilitationDTO } from "@/lib/openapi"; +import { HabilitationDTO } from "@/lib/openapi-api-bal"; interface RevisionUserProps { communeName: string; diff --git a/components/sub-header/bal-status/ban-sync/index.tsx b/components/sub-header/bal-status/ban-sync/index.tsx index 80329c440..0cee12fad 100644 --- a/components/sub-header/bal-status/ban-sync/index.tsx +++ b/components/sub-header/bal-status/ban-sync/index.tsx @@ -11,7 +11,7 @@ import { computeStatus } from "@/lib/statuses"; import BANHistory from "@/components/sub-header/bal-status/ban-sync/ban-history"; import SyncButton from "@/components/sub-header/bal-status/ban-sync/sync-button"; -import { ExtendedBaseLocaleDTO } from "@/lib/openapi"; +import { ExtendedBaseLocaleDTO } from "@/lib/openapi-api-bal"; import { CommuneType } from "@/types/commune"; import { useContext } from "react"; import LayoutContext from "@/contexts/layout"; diff --git a/components/sub-header/bal-status/index.tsx b/components/sub-header/bal-status/index.tsx index 548dabd06..26b80bc12 100644 --- a/components/sub-header/bal-status/index.tsx +++ b/components/sub-header/bal-status/index.tsx @@ -10,7 +10,7 @@ import { BasesLocalesService, ExtendedBaseLocaleDTO, BaseLocaleSync, -} from "@/lib/openapi"; +} from "@/lib/openapi-api-bal"; interface BALStatusProps { baseLocale: ExtendedBaseLocaleDTO; diff --git a/components/toponyme/add-numeros-with-polygon.tsx b/components/toponyme/add-numeros-with-polygon.tsx index 37575ebf9..201a57429 100644 --- a/components/toponyme/add-numeros-with-polygon.tsx +++ b/components/toponyme/add-numeros-with-polygon.tsx @@ -18,7 +18,7 @@ import { } from "evergreen-ui"; import BalDataContext from "@/contexts/bal-data"; -import { BasesLocalesService, Numero } from "@/lib/openapi"; +import { BasesLocalesService, Numero } from "@/lib/openapi-api-bal"; import DrawContext from "@/contexts/draw"; interface AddNumerosWithPolygonProps { diff --git a/components/toponyme/add-numeros-with-voie.tsx b/components/toponyme/add-numeros-with-voie.tsx index 869bfc568..a1e8c40ca 100644 --- a/components/toponyme/add-numeros-with-voie.tsx +++ b/components/toponyme/add-numeros-with-voie.tsx @@ -14,7 +14,7 @@ import { normalizeSort } from "@/lib/normalize"; import BalDataContext from "@/contexts/bal-data"; import FormInput from "@/components/form-input"; -import { VoiesService } from "@/lib/openapi"; +import { VoiesService } from "@/lib/openapi-api-bal"; interface AddNumerosWithVoieProps { numerosIds: string[]; diff --git a/components/toponyme/toponyme-heading.tsx b/components/toponyme/toponyme-heading.tsx index 377e3819e..28b34b66d 100644 --- a/components/toponyme/toponyme-heading.tsx +++ b/components/toponyme/toponyme-heading.tsx @@ -6,7 +6,7 @@ import BalDataContext from "@/contexts/bal-data"; import ToponymeEditor from "@/components/bal/toponyme-editor"; import LanguagePreview from "../bal/language-preview"; -import { Toponyme } from "@/lib/openapi"; +import { Toponyme } from "@/lib/openapi-api-bal"; import { CommuneType } from "@/types/commune"; interface ToponymeHeadingProps { diff --git a/components/toponyme/toponyme-numeros.tsx b/components/toponyme/toponyme-numeros.tsx index def9f7472..3a03fdb20 100644 --- a/components/toponyme/toponyme-numeros.tsx +++ b/components/toponyme/toponyme-numeros.tsx @@ -9,7 +9,7 @@ import { WarningSignIcon, Position, } from "evergreen-ui"; -import { Numero } from "@/lib/openapi"; +import { Numero } from "@/lib/openapi-api-bal"; interface ToponymeNumerosProps { numeros: Numero[]; diff --git a/components/trash/restore-voie/index.tsx b/components/trash/restore-voie/index.tsx index 5441ef1c3..e4bce6d20 100644 --- a/components/trash/restore-voie/index.tsx +++ b/components/trash/restore-voie/index.tsx @@ -3,7 +3,7 @@ import { Pane, Heading, Button, AddIcon, CrossIcon } from "evergreen-ui"; import ListNumerosDeleted from "@/components/trash/restore-voie/list-numeros-deleted"; import LanguagePreview from "@/components/bal/language-preview"; -import { Numero, Voie } from "@/lib/openapi"; +import { Numero, Voie } from "@/lib/openapi-api-bal"; interface RestoreVoieProps { voie: Voie & { numeros: Numero[] }; diff --git a/components/trash/restore-voie/list-numeros-deleted.tsx b/components/trash/restore-voie/list-numeros-deleted.tsx index 42e43f5dd..dd590f7f7 100644 --- a/components/trash/restore-voie/list-numeros-deleted.tsx +++ b/components/trash/restore-voie/list-numeros-deleted.tsx @@ -8,7 +8,7 @@ import useFuse from "@/hooks/fuse"; import InfiniteScrollList from "@/components/infinite-scroll-list"; import RowNumeroDeleted from "@/components/trash/restore-voie/row-numero-deleted"; -import { Numero } from "@/lib/openapi"; +import { Numero } from "@/lib/openapi-api-bal"; interface ListNumerosDeletedProps { numeros: Numero[]; diff --git a/components/user-bases-locales.tsx b/components/user-bases-locales.tsx index 34846745e..d79bef974 100644 --- a/components/user-bases-locales.tsx +++ b/components/user-bases-locales.tsx @@ -5,7 +5,7 @@ import { Pane, Spinner, Button, PlusIcon } from "evergreen-ui"; import LocalStorageContext from "@/contexts/local-storage"; import HiddenBal from "@/components/hidden-bal"; import BasesLocalesList from "@/components/bases-locales-list"; -import { BaseLocale, BasesLocalesService } from "@/lib/openapi"; +import { BaseLocale, BasesLocalesService } from "@/lib/openapi-api-bal"; function UserBasesLocales() { const { balAccess, hiddenBal, getHiddenBal } = diff --git a/components/voie/numeros-list.tsx b/components/voie/numeros-list.tsx index 1c1ef8214..06ac9e439 100644 --- a/components/voie/numeros-list.tsx +++ b/components/voie/numeros-list.tsx @@ -24,7 +24,11 @@ import DeleteWarning from "@/components/delete-warning"; import GroupedActions from "@/components/grouped-actions"; import InfiniteScrollList from "@/components/infinite-scroll-list"; import BALRecoveryContext from "@/contexts/bal-recovery"; -import { BasesLocalesService, Numero, NumerosService } from "@/lib/openapi"; +import { + BasesLocalesService, + Numero, + NumerosService, +} from "@/lib/openapi-api-bal"; import TableRowActions from "../table-row/table-row-actions"; import TableRowNotifications from "../table-row/table-row-notifications"; import LayoutContext from "@/contexts/layout"; diff --git a/components/voie/voie-heading.tsx b/components/voie/voie-heading.tsx index fd52ebb6c..00d14010d 100644 --- a/components/voie/voie-heading.tsx +++ b/components/voie/voie-heading.tsx @@ -6,7 +6,7 @@ import BalDataContext from "@/contexts/bal-data"; import VoieEditor from "@/components/bal/voie-editor"; import LanguagePreview from "../bal/language-preview"; -import { Voie } from "@/lib/openapi"; +import { Voie } from "@/lib/openapi-api-bal"; interface VoieHeadingProps { voie: Voie; diff --git a/contexts/bal-data.tsx b/contexts/bal-data.tsx index f423670b9..b3b3492a4 100644 --- a/contexts/bal-data.tsx +++ b/contexts/bal-data.tsx @@ -19,7 +19,7 @@ import { ExtendedBaseLocaleDTO, ExtentedToponymeDTO, ExtendedVoieDTO, -} from "@/lib/openapi"; +} from "@/lib/openapi-api-bal"; import TokenContext from "@/contexts/token"; import useHabilitation from "@/hooks/habilitation"; import { ChildrenProps } from "@/types/context"; diff --git a/contexts/draw.tsx b/contexts/draw.tsx index 335906a5d..7d07c6ba2 100644 --- a/contexts/draw.tsx +++ b/contexts/draw.tsx @@ -1,4 +1,4 @@ -import { Voie, LineString } from "@/lib/openapi"; +import { Voie, LineString } from "@/lib/openapi-api-bal"; import { ChildrenProps } from "@/types/context"; import React, { useState, useEffect, useMemo, useCallback } from "react"; diff --git a/contexts/local-storage.tsx b/contexts/local-storage.tsx index 99ce763f3..8be1061bd 100644 --- a/contexts/local-storage.tsx +++ b/contexts/local-storage.tsx @@ -1,7 +1,7 @@ import React, { useCallback, useContext, useMemo } from "react"; import { useLocalStorage } from "@/hooks/local-storage"; -import { BasesLocalesService, OpenAPI } from "@/lib/openapi"; +import { BasesLocalesService, OpenAPI } from "@/lib/openapi-api-bal"; import { ChildrenProps } from "@/types/context"; import LayoutContext from "./layout"; diff --git a/contexts/markers.tsx b/contexts/markers.tsx index d200c1a06..eac9390af 100644 --- a/contexts/markers.tsx +++ b/contexts/markers.tsx @@ -2,7 +2,7 @@ import React, { useState, useCallback, useContext, useMemo } from "react"; import { ObjectId } from "bson"; import MapContext from "@/contexts/map"; -import { Position } from "@/lib/openapi"; +import { Position } from "@/lib/openapi-api-bal"; import { ChildrenProps } from "@/types/context"; export interface Marker { diff --git a/contexts/signalement.tsx b/contexts/signalement.tsx index 428f8f5e9..781af30d0 100644 --- a/contexts/signalement.tsx +++ b/contexts/signalement.tsx @@ -6,7 +6,7 @@ import React, { useMemo, } from "react"; -import { BaseLocale } from "@/lib/openapi"; +import { BaseLocale } from "@/lib/openapi-api-bal"; import { Signalement, DefaultService as SignalementService, diff --git a/contexts/token.tsx b/contexts/token.tsx index 5b40eb85e..8658227d3 100644 --- a/contexts/token.tsx +++ b/contexts/token.tsx @@ -8,9 +8,9 @@ import React, { import Router from "next/router"; import LocalStorageContext from "@/contexts/local-storage"; -import { BasesLocalesService } from "@/lib/openapi"; +import { BasesLocalesService } from "@/lib/openapi-api-bal"; import { ChildrenProps } from "@/types/context"; -import { OpenAPI } from "@/lib/openapi"; +import { OpenAPI } from "@/lib/openapi-api-bal"; interface TokenContextType { token: string | null; diff --git a/hooks/habilitation.ts b/hooks/habilitation.ts index b92694581..0e56f389b 100644 --- a/hooks/habilitation.ts +++ b/hooks/habilitation.ts @@ -11,7 +11,7 @@ import { ExtendedBaseLocaleDTO, HabilitationDTO, HabilitationService, -} from "@/lib/openapi"; +} from "@/lib/openapi-api-bal"; interface UseHabilitationType { habilitation: HabilitationDTO | null; diff --git a/hooks/publish-process.ts b/hooks/publish-process.ts index 623773984..a814e1faf 100644 --- a/hooks/publish-process.ts +++ b/hooks/publish-process.ts @@ -2,9 +2,12 @@ import { useState, useContext, Dispatch, SetStateAction } from "react"; import { getBANCommune } from "@/lib/api-ban"; import BalDataContext from "@/contexts/bal-data"; -import { BasesLocalesService, HabilitationService } from "@/lib/openapi"; +import { + BasesLocalesService, + HabilitationService, +} from "@/lib/openapi-api-bal"; import { CommuneType } from "@/types/commune"; -import { BaseLocale } from "@/lib/openapi"; +import { BaseLocale } from "@/lib/openapi-api-bal"; import LayoutContext from "@/contexts/layout"; interface UsePublishProcess { diff --git a/hooks/trash.ts b/hooks/trash.ts index e4453d960..f0d1e30a4 100644 --- a/hooks/trash.ts +++ b/hooks/trash.ts @@ -8,7 +8,7 @@ import { ToponymesService, Voie, VoiesService, -} from "@/lib/openapi"; +} from "@/lib/openapi-api-bal"; import BalDataContext from "@/contexts/bal-data"; import MapContext from "@/contexts/map"; import LayoutContext from "@/contexts/layout"; diff --git a/layouts/editor.tsx b/layouts/editor.tsx index 08771e142..b1b5b17c4 100644 --- a/layouts/editor.tsx +++ b/layouts/editor.tsx @@ -27,7 +27,7 @@ import { ExtendedBaseLocaleDTO, ExtendedVoieDTO, ExtentedToponymeDTO, -} from "@/lib/openapi"; +} from "@/lib/openapi-api-bal"; import { CommuneApiGeoType } from "@/lib/geo-api/type"; import { MobileControls } from "@/components/mobile-layout/mobile-controls"; import LayoutContext from "@/contexts/layout"; diff --git a/lib/openapi/core/ApiError.ts b/lib/openapi-api-bal/core/ApiError.ts similarity index 100% rename from lib/openapi/core/ApiError.ts rename to lib/openapi-api-bal/core/ApiError.ts diff --git a/lib/openapi/core/ApiRequestOptions.ts b/lib/openapi-api-bal/core/ApiRequestOptions.ts similarity index 100% rename from lib/openapi/core/ApiRequestOptions.ts rename to lib/openapi-api-bal/core/ApiRequestOptions.ts diff --git a/lib/openapi/core/ApiResult.ts b/lib/openapi-api-bal/core/ApiResult.ts similarity index 100% rename from lib/openapi/core/ApiResult.ts rename to lib/openapi-api-bal/core/ApiResult.ts diff --git a/lib/openapi/core/CancelablePromise.ts b/lib/openapi-api-bal/core/CancelablePromise.ts similarity index 100% rename from lib/openapi/core/CancelablePromise.ts rename to lib/openapi-api-bal/core/CancelablePromise.ts diff --git a/lib/openapi/core/OpenAPI.ts b/lib/openapi-api-bal/core/OpenAPI.ts similarity index 100% rename from lib/openapi/core/OpenAPI.ts rename to lib/openapi-api-bal/core/OpenAPI.ts diff --git a/lib/openapi/core/request.ts b/lib/openapi-api-bal/core/request.ts similarity index 100% rename from lib/openapi/core/request.ts rename to lib/openapi-api-bal/core/request.ts diff --git a/lib/openapi/index.ts b/lib/openapi-api-bal/index.ts similarity index 100% rename from lib/openapi/index.ts rename to lib/openapi-api-bal/index.ts diff --git a/lib/openapi/models/AllDeletedInBalDTO.ts b/lib/openapi-api-bal/models/AllDeletedInBalDTO.ts similarity index 100% rename from lib/openapi/models/AllDeletedInBalDTO.ts rename to lib/openapi-api-bal/models/AllDeletedInBalDTO.ts diff --git a/lib/openapi/models/BaseLocale.ts b/lib/openapi-api-bal/models/BaseLocale.ts similarity index 100% rename from lib/openapi/models/BaseLocale.ts rename to lib/openapi-api-bal/models/BaseLocale.ts diff --git a/lib/openapi/models/BaseLocaleSync.ts b/lib/openapi-api-bal/models/BaseLocaleSync.ts similarity index 100% rename from lib/openapi/models/BaseLocaleSync.ts rename to lib/openapi-api-bal/models/BaseLocaleSync.ts diff --git a/lib/openapi/models/BasesLocalesCreationDTO.ts b/lib/openapi-api-bal/models/BasesLocalesCreationDTO.ts similarity index 100% rename from lib/openapi/models/BasesLocalesCreationDTO.ts rename to lib/openapi-api-bal/models/BasesLocalesCreationDTO.ts diff --git a/lib/openapi/models/BasesLocalesStatusDTO.ts b/lib/openapi-api-bal/models/BasesLocalesStatusDTO.ts similarity index 100% rename from lib/openapi/models/BasesLocalesStatusDTO.ts rename to lib/openapi-api-bal/models/BasesLocalesStatusDTO.ts diff --git a/lib/openapi/models/BatchNumeroResponseDTO.ts b/lib/openapi-api-bal/models/BatchNumeroResponseDTO.ts similarity index 100% rename from lib/openapi/models/BatchNumeroResponseDTO.ts rename to lib/openapi-api-bal/models/BatchNumeroResponseDTO.ts diff --git a/lib/openapi/models/CodeCommuneDTO.ts b/lib/openapi-api-bal/models/CodeCommuneDTO.ts similarity index 100% rename from lib/openapi/models/CodeCommuneDTO.ts rename to lib/openapi-api-bal/models/CodeCommuneDTO.ts diff --git a/lib/openapi/models/CommuneExtraDTO.ts b/lib/openapi-api-bal/models/CommuneExtraDTO.ts similarity index 100% rename from lib/openapi/models/CommuneExtraDTO.ts rename to lib/openapi-api-bal/models/CommuneExtraDTO.ts diff --git a/lib/openapi/models/CreateBaseLocaleDTO.ts b/lib/openapi-api-bal/models/CreateBaseLocaleDTO.ts similarity index 100% rename from lib/openapi/models/CreateBaseLocaleDTO.ts rename to lib/openapi-api-bal/models/CreateBaseLocaleDTO.ts diff --git a/lib/openapi/models/CreateDemoBaseLocaleDTO.ts b/lib/openapi-api-bal/models/CreateDemoBaseLocaleDTO.ts similarity index 100% rename from lib/openapi/models/CreateDemoBaseLocaleDTO.ts rename to lib/openapi-api-bal/models/CreateDemoBaseLocaleDTO.ts diff --git a/lib/openapi/models/CreateNumeroDTO.ts b/lib/openapi-api-bal/models/CreateNumeroDTO.ts similarity index 100% rename from lib/openapi/models/CreateNumeroDTO.ts rename to lib/openapi-api-bal/models/CreateNumeroDTO.ts diff --git a/lib/openapi/models/CreateToponymeDTO.ts b/lib/openapi-api-bal/models/CreateToponymeDTO.ts similarity index 100% rename from lib/openapi/models/CreateToponymeDTO.ts rename to lib/openapi-api-bal/models/CreateToponymeDTO.ts diff --git a/lib/openapi/models/CreateVoieDTO.ts b/lib/openapi-api-bal/models/CreateVoieDTO.ts similarity index 100% rename from lib/openapi/models/CreateVoieDTO.ts rename to lib/openapi-api-bal/models/CreateVoieDTO.ts diff --git a/lib/openapi/models/DeleteBatchNumeroDTO.ts b/lib/openapi-api-bal/models/DeleteBatchNumeroDTO.ts similarity index 100% rename from lib/openapi/models/DeleteBatchNumeroDTO.ts rename to lib/openapi-api-bal/models/DeleteBatchNumeroDTO.ts diff --git a/lib/openapi/models/ExtendedBaseLocaleDTO.ts b/lib/openapi-api-bal/models/ExtendedBaseLocaleDTO.ts similarity index 100% rename from lib/openapi/models/ExtendedBaseLocaleDTO.ts rename to lib/openapi-api-bal/models/ExtendedBaseLocaleDTO.ts diff --git a/lib/openapi/models/ExtendedVoieDTO.ts b/lib/openapi-api-bal/models/ExtendedVoieDTO.ts similarity index 100% rename from lib/openapi/models/ExtendedVoieDTO.ts rename to lib/openapi-api-bal/models/ExtendedVoieDTO.ts diff --git a/lib/openapi/models/ExtentedToponymeDTO.ts b/lib/openapi-api-bal/models/ExtentedToponymeDTO.ts similarity index 100% rename from lib/openapi/models/ExtentedToponymeDTO.ts rename to lib/openapi-api-bal/models/ExtentedToponymeDTO.ts diff --git a/lib/openapi/models/HabilitationDTO.ts b/lib/openapi-api-bal/models/HabilitationDTO.ts similarity index 100% rename from lib/openapi/models/HabilitationDTO.ts rename to lib/openapi-api-bal/models/HabilitationDTO.ts diff --git a/lib/openapi/models/ImportFileBaseLocaleDTO.ts b/lib/openapi-api-bal/models/ImportFileBaseLocaleDTO.ts similarity index 100% rename from lib/openapi/models/ImportFileBaseLocaleDTO.ts rename to lib/openapi-api-bal/models/ImportFileBaseLocaleDTO.ts diff --git a/lib/openapi/models/LineString.ts b/lib/openapi-api-bal/models/LineString.ts similarity index 100% rename from lib/openapi/models/LineString.ts rename to lib/openapi-api-bal/models/LineString.ts diff --git a/lib/openapi/models/Numero.ts b/lib/openapi-api-bal/models/Numero.ts similarity index 100% rename from lib/openapi/models/Numero.ts rename to lib/openapi-api-bal/models/Numero.ts diff --git a/lib/openapi/models/PageBaseLocaleDTO.ts b/lib/openapi-api-bal/models/PageBaseLocaleDTO.ts similarity index 100% rename from lib/openapi/models/PageBaseLocaleDTO.ts rename to lib/openapi-api-bal/models/PageBaseLocaleDTO.ts diff --git a/lib/openapi/models/Position.ts b/lib/openapi-api-bal/models/Position.ts similarity index 100% rename from lib/openapi/models/Position.ts rename to lib/openapi-api-bal/models/Position.ts diff --git a/lib/openapi/models/RecoverBaseLocaleDTO.ts b/lib/openapi-api-bal/models/RecoverBaseLocaleDTO.ts similarity index 100% rename from lib/openapi/models/RecoverBaseLocaleDTO.ts rename to lib/openapi-api-bal/models/RecoverBaseLocaleDTO.ts diff --git a/lib/openapi/models/RestoreVoieDTO.ts b/lib/openapi-api-bal/models/RestoreVoieDTO.ts similarity index 100% rename from lib/openapi/models/RestoreVoieDTO.ts rename to lib/openapi-api-bal/models/RestoreVoieDTO.ts diff --git a/lib/openapi/models/SearchNumeroDTO.ts b/lib/openapi-api-bal/models/SearchNumeroDTO.ts similarity index 100% rename from lib/openapi/models/SearchNumeroDTO.ts rename to lib/openapi-api-bal/models/SearchNumeroDTO.ts diff --git a/lib/openapi/models/Strategy.ts b/lib/openapi-api-bal/models/Strategy.ts similarity index 100% rename from lib/openapi/models/Strategy.ts rename to lib/openapi-api-bal/models/Strategy.ts diff --git a/lib/openapi/models/Toponyme.ts b/lib/openapi-api-bal/models/Toponyme.ts similarity index 100% rename from lib/openapi/models/Toponyme.ts rename to lib/openapi-api-bal/models/Toponyme.ts diff --git a/lib/openapi/models/UpdateBaseLocaleDTO.ts b/lib/openapi-api-bal/models/UpdateBaseLocaleDTO.ts similarity index 100% rename from lib/openapi/models/UpdateBaseLocaleDTO.ts rename to lib/openapi-api-bal/models/UpdateBaseLocaleDTO.ts diff --git a/lib/openapi/models/UpdateBaseLocaleDemoDTO.ts b/lib/openapi-api-bal/models/UpdateBaseLocaleDemoDTO.ts similarity index 100% rename from lib/openapi/models/UpdateBaseLocaleDemoDTO.ts rename to lib/openapi-api-bal/models/UpdateBaseLocaleDemoDTO.ts diff --git a/lib/openapi/models/UpdateBatchNumeroChangeDTO.ts b/lib/openapi-api-bal/models/UpdateBatchNumeroChangeDTO.ts similarity index 100% rename from lib/openapi/models/UpdateBatchNumeroChangeDTO.ts rename to lib/openapi-api-bal/models/UpdateBatchNumeroChangeDTO.ts diff --git a/lib/openapi/models/UpdateBatchNumeroDTO.ts b/lib/openapi-api-bal/models/UpdateBatchNumeroDTO.ts similarity index 100% rename from lib/openapi/models/UpdateBatchNumeroDTO.ts rename to lib/openapi-api-bal/models/UpdateBatchNumeroDTO.ts diff --git a/lib/openapi/models/UpdateNumeroDTO.ts b/lib/openapi-api-bal/models/UpdateNumeroDTO.ts similarity index 100% rename from lib/openapi/models/UpdateNumeroDTO.ts rename to lib/openapi-api-bal/models/UpdateNumeroDTO.ts diff --git a/lib/openapi/models/UpdateToponymeDTO.ts b/lib/openapi-api-bal/models/UpdateToponymeDTO.ts similarity index 100% rename from lib/openapi/models/UpdateToponymeDTO.ts rename to lib/openapi-api-bal/models/UpdateToponymeDTO.ts diff --git a/lib/openapi/models/UpdateVoieDTO.ts b/lib/openapi-api-bal/models/UpdateVoieDTO.ts similarity index 100% rename from lib/openapi/models/UpdateVoieDTO.ts rename to lib/openapi-api-bal/models/UpdateVoieDTO.ts diff --git a/lib/openapi/models/ValidatePinCodeDTO.ts b/lib/openapi-api-bal/models/ValidatePinCodeDTO.ts similarity index 100% rename from lib/openapi/models/ValidatePinCodeDTO.ts rename to lib/openapi-api-bal/models/ValidatePinCodeDTO.ts diff --git a/lib/openapi/models/Voie.ts b/lib/openapi-api-bal/models/Voie.ts similarity index 100% rename from lib/openapi/models/Voie.ts rename to lib/openapi-api-bal/models/Voie.ts diff --git a/lib/openapi/services/BasesLocalesService.ts b/lib/openapi-api-bal/services/BasesLocalesService.ts similarity index 100% rename from lib/openapi/services/BasesLocalesService.ts rename to lib/openapi-api-bal/services/BasesLocalesService.ts diff --git a/lib/openapi/services/CommuneService.ts b/lib/openapi-api-bal/services/CommuneService.ts similarity index 100% rename from lib/openapi/services/CommuneService.ts rename to lib/openapi-api-bal/services/CommuneService.ts diff --git a/lib/openapi/services/ExportCsvService.ts b/lib/openapi-api-bal/services/ExportCsvService.ts similarity index 100% rename from lib/openapi/services/ExportCsvService.ts rename to lib/openapi-api-bal/services/ExportCsvService.ts diff --git a/lib/openapi/services/HabilitationService.ts b/lib/openapi-api-bal/services/HabilitationService.ts similarity index 100% rename from lib/openapi/services/HabilitationService.ts rename to lib/openapi-api-bal/services/HabilitationService.ts diff --git a/lib/openapi/services/NumerosService.ts b/lib/openapi-api-bal/services/NumerosService.ts similarity index 100% rename from lib/openapi/services/NumerosService.ts rename to lib/openapi-api-bal/services/NumerosService.ts diff --git a/lib/openapi/services/StatsService.ts b/lib/openapi-api-bal/services/StatsService.ts similarity index 100% rename from lib/openapi/services/StatsService.ts rename to lib/openapi-api-bal/services/StatsService.ts diff --git a/lib/openapi/services/TilesService.ts b/lib/openapi-api-bal/services/TilesService.ts similarity index 100% rename from lib/openapi/services/TilesService.ts rename to lib/openapi-api-bal/services/TilesService.ts diff --git a/lib/openapi/services/ToponymesService.ts b/lib/openapi-api-bal/services/ToponymesService.ts similarity index 100% rename from lib/openapi/services/ToponymesService.ts rename to lib/openapi-api-bal/services/ToponymesService.ts diff --git a/lib/openapi/services/VoiesService.ts b/lib/openapi-api-bal/services/VoiesService.ts similarity index 100% rename from lib/openapi/services/VoiesService.ts rename to lib/openapi-api-bal/services/VoiesService.ts diff --git a/lib/statuses.ts b/lib/statuses.ts index 10c14cb34..891f6b20d 100644 --- a/lib/statuses.ts +++ b/lib/statuses.ts @@ -8,7 +8,7 @@ import { IconComponent, } from "evergreen-ui"; -import { BaseLocale, BaseLocaleSync } from "./openapi"; +import { BaseLocale, BaseLocaleSync } from "./openapi-api-bal"; type StatusType = { label: string; diff --git a/package.json b/package.json index 3707b9464..8f7cef861 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "build": "yarn build-available-flags && next build", "analyze": "ANALYZE=true next build", "build-available-flags": "node scripts/build-available-flags", - "generate:openapi": "openapi --input http://localhost:5000/api-json --output ./lib/openapi", + "generate:openapi:api-bal": "openapi --input http://localhost:5000/api-json --output ./lib/openapi-api-bal", "generate:openapi:signalement": "openapi --input http://localhost:5005/api-json --output ./lib/openapi-signalement", "push-staging": "./scripts/push-staging.sh" }, diff --git a/pages/_app.tsx b/pages/_app.tsx index 800a30b28..224fa9022 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -17,7 +17,7 @@ import useMatomoTracker from "@/hooks/matomo-tracker"; import Editor from "@/layouts/editor"; import { BALRecoveryProvider } from "@/contexts/bal-recovery"; import { BalDataContextProvider } from "@/contexts/bal-data"; -import { OpenAPI } from "@/lib/openapi"; +import { OpenAPI } from "@/lib/openapi-api-bal"; import { OpenAPI as OpenAPISignalement } from "@/lib/openapi-signalement"; import { SignalementContextProvider } from "@/contexts/signalement"; import { LayoutContextProvider } from "@/contexts/layout"; diff --git a/pages/all.tsx b/pages/all.tsx index dcc5a9111..37d1a33d6 100644 --- a/pages/all.tsx +++ b/pages/all.tsx @@ -18,7 +18,7 @@ import { BaseLocale, BasesLocalesService, PageBaseLocaleDTO, -} from "@/lib/openapi"; +} from "@/lib/openapi-api-bal"; const LIMIT_BY_PAGE = 20; diff --git a/pages/bal/[balId]/index.tsx b/pages/bal/[balId]/index.tsx index 1a6523808..d79a263b5 100644 --- a/pages/bal/[balId]/index.tsx +++ b/pages/bal/[balId]/index.tsx @@ -32,7 +32,7 @@ import { Toponyme, Voie, VoiesService, -} from "@/lib/openapi"; +} from "@/lib/openapi-api-bal"; import SignalementContext from "@/contexts/signalement"; import LayoutContext from "@/contexts/layout"; import usePublishProcess from "@/hooks/publish-process"; diff --git a/pages/bal/[balId]/signalements/[idSignalement].tsx b/pages/bal/[balId]/signalements/[idSignalement].tsx index 56b2a0c9b..9fe381a5a 100644 --- a/pages/bal/[balId]/signalements/[idSignalement].tsx +++ b/pages/bal/[balId]/signalements/[idSignalement].tsx @@ -9,7 +9,7 @@ import { ToponymesService, Voie, VoiesService, -} from "@/lib/openapi"; +} from "@/lib/openapi-api-bal"; import { ExistingLocation, Signalement, diff --git a/pages/bal/[balId]/toponymes/[idToponyme].tsx b/pages/bal/[balId]/toponymes/[idToponyme].tsx index c8d1d761f..ae19cb163 100644 --- a/pages/bal/[balId]/toponymes/[idToponyme].tsx +++ b/pages/bal/[balId]/toponymes/[idToponyme].tsx @@ -30,7 +30,7 @@ import { Numero, ToponymesService, UpdateBatchNumeroDTO, -} from "@/lib/openapi"; +} from "@/lib/openapi-api-bal"; import LayoutContext from "@/contexts/layout"; interface ToponymePageProps { diff --git a/pages/bal/[balId]/voies/[idVoie].tsx b/pages/bal/[balId]/voies/[idVoie].tsx index 64abcf2bf..706e2ae49 100644 --- a/pages/bal/[balId]/voies/[idVoie].tsx +++ b/pages/bal/[balId]/voies/[idVoie].tsx @@ -12,7 +12,7 @@ import VoieHeading from "@/components/voie/voie-heading"; import NumerosList from "@/components/voie/numeros-list"; import { CommuneType } from "@/types/commune"; import { BaseEditorProps, getBaseEditorProps } from "@/layouts/editor"; -import { ExtendedVoieDTO, Numero, VoiesService } from "@/lib/openapi"; +import { ExtendedVoieDTO, Numero, VoiesService } from "@/lib/openapi-api-bal"; // Import BALRecoveryContext from '@/contexts/bal-recovery' interface VoiePageProps { diff --git a/types/commune.ts b/types/commune.ts index b69bd4b69..40aab3c89 100644 --- a/types/commune.ts +++ b/types/commune.ts @@ -1,4 +1,4 @@ import { CommuneApiGeoType } from "@/lib/geo-api/type"; -import { CommuneExtraDTO } from "@/lib/openapi"; +import { CommuneExtraDTO } from "@/lib/openapi-api-bal"; -export type CommuneType = CommuneExtraDTO & CommuneApiGeoType \ No newline at end of file +export type CommuneType = CommuneExtraDTO & CommuneApiGeoType;