fix: 🏷️ move types to global.d.ts to include in global function
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
3e5484e9cd
commit
2110d86129
@ -3,31 +3,25 @@ import {
|
|||||||
Button,
|
Button,
|
||||||
Flex,
|
Flex,
|
||||||
Group,
|
Group,
|
||||||
Indicator,
|
|
||||||
Pagination,
|
Pagination,
|
||||||
Progress,
|
|
||||||
Select,
|
|
||||||
Stack,
|
Stack,
|
||||||
Text,
|
Text,
|
||||||
TextInput,
|
TextInput,
|
||||||
Title,
|
Title,
|
||||||
Tooltip,
|
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { Document, Page } from "react-pdf";
|
import { Document, Page } from "react-pdf";
|
||||||
import { Form, isNotEmpty, useForm } from "@mantine/form";
|
import { Form, isNotEmpty, useForm } from "@mantine/form";
|
||||||
import {
|
import {
|
||||||
createArchiveAndDownload,
|
createArchiveAndDownload,
|
||||||
fileCategories,
|
fileCategories,
|
||||||
getFileDataUrl,
|
|
||||||
systemMessage,
|
systemMessage,
|
||||||
} from "./utils";
|
} from "./utils";
|
||||||
import { useCallback, useState } from "react";
|
import { useCallback, useState } from "react";
|
||||||
|
|
||||||
import { ChatCompletionMessageParam } from "@mlc-ai/web-llm";
|
import { ChatCompletionMessageParam } from "@mlc-ai/web-llm";
|
||||||
import { CreateArchiveInput } from "./types";
|
import type { CreateArchiveInput } from "./global.d";
|
||||||
import Dropzone from "./Dropzone";
|
import Dropzone from "./Dropzone";
|
||||||
import { FileWithPath } from "@mantine/dropzone";
|
import { FileWithPath } from "@mantine/dropzone";
|
||||||
import { IconRobotFace } from "@tabler/icons-react";
|
|
||||||
import LLMPicker from "./LLMPicker";
|
import LLMPicker from "./LLMPicker";
|
||||||
import { useMLEngine } from "./MLEngineContext";
|
import { useMLEngine } from "./MLEngineContext";
|
||||||
|
|
||||||
|
32
src/global.d.ts
vendored
32
src/global.d.ts
vendored
@ -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>;
|
declare function createArchive(payload: CreateArchiveInput): Promise<string>;
|
||||||
|
31
src/types.ts
31
src/types.ts
@ -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;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user