fix: 🏷️ move types to global.d.ts to include in global function
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
RaviAnand Mohabir 2025-04-25 16:09:31 +02:00
parent 3e5484e9cd
commit 2110d86129
3 changed files with 32 additions and 39 deletions

View File

@ -3,31 +3,25 @@ import {
Button,
Flex,
Group,
Indicator,
Pagination,
Progress,
Select,
Stack,
Text,
TextInput,
Title,
Tooltip,
} from "@mantine/core";
import { Document, Page } from "react-pdf";
import { Form, isNotEmpty, useForm } from "@mantine/form";
import {
createArchiveAndDownload,
fileCategories,
getFileDataUrl,
systemMessage,
} from "./utils";
import { useCallback, useState } from "react";
import { ChatCompletionMessageParam } from "@mlc-ai/web-llm";
import { CreateArchiveInput } from "./types";
import type { CreateArchiveInput } from "./global.d";
import Dropzone from "./Dropzone";
import { FileWithPath } from "@mantine/dropzone";
import { IconRobotFace } from "@tabler/icons-react";
import LLMPicker from "./LLMPicker";
import { useMLEngine } from "./MLEngineContext";

32
src/global.d.ts vendored
View File

@ -1,3 +1,33 @@
import { CreateArchiveInput } from "./types";
export interface Customer {
firstName: string;
lastName: string;
}
export interface Document {
id: string;
file: File;
}
export interface CustomerFile {
id: string;
documents: CustomerDocument[];
suffix: string;
}
export interface CustomerDocument {
id: string;
selectedPages: string[];
}
export interface CreateArchiveInput {
customer: Customer;
documents: Document[];
files: CustomerFile[];
}
export interface CreateArchiveResult {
resultArchive?: string;
error?: string;
}
declare function createArchive(payload: CreateArchiveInput): Promise<string>;

View File

@ -1,31 +0,0 @@
export interface Customer {
firstName: string;
lastName: string;
}
export interface Document {
id: string;
file: File;
}
export interface CustomerFile {
id: string;
documents: CustomerDocument[];
suffix: string;
}
export interface CustomerDocument {
id: string;
selectedPages: string[];
}
export interface CreateArchiveInput {
customer: Customer;
documents: Document[];
files: CustomerFile[];
}
export interface CreateArchiveResult {
resultArchive?: string;
error?: string;
}