Skip to content

Commit

Permalink
openapi: change rep openapi -> openapi-api-bal
Browse files Browse the repository at this point in the history
  • Loading branch information
fufeck committed Dec 2, 2024
1 parent 18a28e7 commit 55d2753
Show file tree
Hide file tree
Showing 124 changed files with 103 additions and 84 deletions.
2 changes: 1 addition & 1 deletion components/bal-recovery/recover-bal-alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion components/bal/commune-tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion components/bal/numero-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
2 changes: 1 addition & 1 deletion components/bal/position-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion components/bal/toponyme-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
6 changes: 5 additions & 1 deletion components/bal/toponymes-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion components/bal/voie-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
UpdateVoieDTO,
Voie,
VoiesService,
} from "@/lib/openapi";
} from "@/lib/openapi-api-bal";
import LayoutContext from "@/contexts/layout";

interface VoieEditorProps {
Expand Down
2 changes: 1 addition & 1 deletion components/bal/voies-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion components/base-locale-card/base-locale-card-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
2 changes: 1 addition & 1 deletion components/base-locale-card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion components/bases-locales-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down
2 changes: 1 addition & 1 deletion components/breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions components/demo-warning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
28 changes: 18 additions & 10 deletions components/downloads.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -63,21 +73,19 @@ function Downloads({ baseLocaleId }: DownloadsProps) {
checked={withComment}
onChange={(e) => setWithComment(e.target.checked)}
/>
<Text
marginLeft={6}
>
Avec commentaires
</Text>
<Text marginLeft={6}>Avec commentaires</Text>
</>
)}
</Pane>
{ withComment &&
{withComment && (
<Alert marginLeft={-30} marginRight={10} hasIcon={false}>
<Text is="p" textAlign="center">
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.
</Text>
</Alert>
}
)}
</Pane>
<Pane is="li" marginBottom={10}>
<Link style={{ cursor: "pointer" }} onClick={downloadVoieCsv}>
Expand Down
2 changes: 1 addition & 1 deletion components/grouped-actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion components/habilitation-process/accepted-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion components/habilitation-process/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
2 changes: 1 addition & 1 deletion components/habilitation-process/rejected-dialog.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion components/help/help-tabs/publication.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion components/hidden-bal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
2 changes: 1 addition & 1 deletion components/map/hooks/bounds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion components/map/map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion components/map/numero-marker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion components/map/numeros-markers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion components/map/toponyme-marker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion components/new/alert-other-bal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion components/new/create-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion components/new/demo-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion components/new/upload-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion components/renew-token-dialog.tsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion components/settings/bal-settings-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion components/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion components/signalement/voie/signalement-update-voie.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion components/status-badge.tsx
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Loading

0 comments on commit 55d2753

Please sign in to comment.