Initial commit
This commit is contained in:
8
app/types/emailContext.ts
Normal file
8
app/types/emailContext.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export interface EmailContextType {
|
||||
selectedEmails: string;
|
||||
selectedName: string;
|
||||
selectedId: string;
|
||||
setSelectedEmails: (emails: string) => void;
|
||||
setSelectedName: (name: string) => void;
|
||||
setSelectedId: (id: string) => void;
|
||||
}
|
||||
32
app/types/emailForm1.ts
Normal file
32
app/types/emailForm1.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
export interface FormData {
|
||||
id: number | undefined;
|
||||
name: string;
|
||||
template: string;
|
||||
content:{
|
||||
receiver: string;
|
||||
subject: string;
|
||||
content: string;
|
||||
imageUrl: string | null;
|
||||
linkUrl: string[];
|
||||
textLinkUrl: string[];
|
||||
keyword: Array<string | { keyword: string; value: string }>;
|
||||
html: string;
|
||||
}
|
||||
// emails: string;
|
||||
// subject: string;
|
||||
// message: string;
|
||||
// template: string;
|
||||
// company?: string;
|
||||
// phone?: string;
|
||||
// imageUrl?: string | null;
|
||||
// linkUrl?: string[];
|
||||
// keyWords?: string[] | { keyword: string; value: string }[];
|
||||
// textLinkUrl?: string[];
|
||||
}
|
||||
|
||||
export interface EmailFormProps {
|
||||
onDataChange: (data: FormData) => void;
|
||||
initialData?: FormData;
|
||||
}
|
||||
|
||||
export type ModalType = "none" | "save-list" | "open-list" | "save-template" | "open-template";
|
||||
11
app/types/emailSent.ts
Normal file
11
app/types/emailSent.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export interface EmailSent {
|
||||
id: string;
|
||||
receiver: string;
|
||||
subject: string;
|
||||
content: string;
|
||||
status: number;
|
||||
create_time: string;
|
||||
update_time: string;
|
||||
}
|
||||
|
||||
export type EmailSentStatus = "pending" | "success" | "error"| "schedule";
|
||||
7
app/types/modal.ts
Normal file
7
app/types/modal.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export interface ModalProps {
|
||||
active: boolean;
|
||||
onClose: () => void;
|
||||
height?: string | number;
|
||||
width?: string | number;
|
||||
children: React.ReactNode;
|
||||
}
|
||||
7
app/types/openListGmail.ts
Normal file
7
app/types/openListGmail.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export interface openListGmailProps {
|
||||
emails: string;
|
||||
dataEmail: { id: string; email: string; name: string }[];
|
||||
onClose: () => void;
|
||||
onEdit?: (id: string, name: string, emails: string) => void;
|
||||
loading?: boolean;
|
||||
}
|
||||
12
app/types/saveListGmail.ts
Normal file
12
app/types/saveListGmail.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export interface SaveListGmailProps {
|
||||
emails: string;
|
||||
name?: string;
|
||||
id?: string;
|
||||
onClose?: () => void;
|
||||
onSuccess?: () => Promise<void>;
|
||||
}
|
||||
|
||||
export interface DataEmail {
|
||||
email: string;
|
||||
name: string;
|
||||
}
|
||||
32
app/types/saveListTemplate.ts
Normal file
32
app/types/saveListTemplate.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
export interface saveListTemplateProps {
|
||||
name?: string;
|
||||
content?: {
|
||||
receiver: string;
|
||||
subject: string;
|
||||
content: string;
|
||||
imageUrl: string | null;
|
||||
linkUrl: string[] | string;
|
||||
textLinkUrl: string[] | string;
|
||||
keyword: Array<string | { keyword: string; value: string }>;
|
||||
html: string;
|
||||
};
|
||||
editMode?: boolean;
|
||||
id?: number;
|
||||
onClose?: () => void;
|
||||
onSuccess?: () => Promise<void>;
|
||||
}
|
||||
|
||||
export interface DataTemplate {
|
||||
id: number;
|
||||
name: string;
|
||||
content: {
|
||||
receiver: string;
|
||||
subject: string;
|
||||
content: string;
|
||||
imageUrl: string | null;
|
||||
linkUrl: string[] | string;
|
||||
textLinkUrl: string[] | string;
|
||||
keyword: Array<string | { keyword: string; value: string }>;
|
||||
html: string;
|
||||
}
|
||||
}
|
||||
11
app/types/template1.ts
Normal file
11
app/types/template1.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export interface Template1Props {
|
||||
content:{
|
||||
subject?: string;
|
||||
message?: string;
|
||||
imageUrl?: string | null;
|
||||
linkUrl?: string[];
|
||||
textLinkUrl?: string[];
|
||||
keyword: Array<string | { keyword: string; value: string }>;
|
||||
}
|
||||
previewMode?: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user