-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
91 lines (81 loc) · 1.66 KB
/
types.ts
File metadata and controls
91 lines (81 loc) · 1.66 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
export enum UserPlan {
FREE = 'FREE',
PAID_15 = 'PAID_15',
PAID_MONTHLY = 'PAID_MONTHLY'
}
export interface PaymentGatewayConfig {
enabled: boolean;
publicKey: string;
secretKey: string;
}
export interface PaymentConfig {
stripe: PaymentGatewayConfig;
paypal: PaymentGatewayConfig;
currency: string;
}
export interface User {
id: string;
email: string;
name?: string;
picture?: string;
plan: UserPlan;
planExpiry?: string;
smtp?: CustomSMTP;
dailyUsage: number;
totalSent?: number;
createdAt: string;
lastLogin?: string;
}
export interface CustomSMTP {
host: string;
port: number;
user: string;
pass: string;
fromEmail: string;
fromName: string;
encryption: 'SSL' | 'TLS' | 'NONE';
}
export interface Recipient {
id: string;
data: Record<string, string>;
email: string;
certId: string;
status?: 'PENDING' | 'SUCCESS' | 'FAILURE';
}
export type VariableType = 'TEXT' | 'QR_CODE';
export interface VariableConfig {
id: string;
key: string;
type: VariableType;
x: number;
y: number;
fontSize: number;
fontColor: string;
textAlign?: 'left' | 'center' | 'right';
}
export interface Project {
id: string;
name: string;
templateFile: string | null;
templateType: 'image' | 'pdf' | null;
variables: VariableConfig[];
recipients: Recipient[];
emailSubject: string;
emailBody: string;
updatedAt: string;
stats?: {
success: number;
failed: number;
};
}
export interface ProcessingLog {
id: string;
userId: string;
userEmail: string;
projectId: string;
projectName: string;
recipientEmail: string;
status: 'SUCCESS' | 'FAILURE';
timestamp: string;
errorMessage?: string;
}