-
Notifications
You must be signed in to change notification settings - Fork 192
/
types.ts
58 lines (49 loc) · 1.1 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Zod
import z from "zod";
// RHF
import { FieldPath, UseFormReturn } from "react-hook-form";
// Zod schemas
import { InvoiceSchema, ItemSchema } from "@/lib/schemas";
// Form types
export type InvoiceType = z.infer<typeof InvoiceSchema>;
export type ItemType = z.infer<typeof ItemSchema>;
export type FormType = UseFormReturn<InvoiceType>;
export type NameType = FieldPath<InvoiceType>;
export type CurrencyType = {
[currencyCode: string]: string;
};
export type CurrencyDetails = {
currency: string;
decimals: number;
beforeDecimal: string | null;
afterDecimal: string | null;
};
// Signature types
export type SignatureColor = {
name: string;
label: string;
color: string;
};
export type SignatureFont = {
name: string;
variable: string;
};
export enum SignatureTabs {
DRAW = "draw",
TYPE = "type",
UPLOAD = "upload",
}
// Wizard types
export type WizardStepType = {
id: number;
label: string;
isValid?: boolean;
};
// Export types
export enum ExportTypes {
JSON = "JSON",
CSV = "CSV",
XML = "XML",
XLSX = "XLSX",
DOCX = "DOCX",
}