@bernierllc/sender-identity-verification 3.0.9 → 3.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types.d.ts DELETED
@@ -1,147 +0,0 @@
1
- /**
2
- * Sender identity record
3
- */
4
- export interface SenderIdentity {
5
- id: string;
6
- email: string;
7
- name: string;
8
- replyToEmail?: string;
9
- replyToName?: string;
10
- domain: string;
11
- provider: EmailProvider;
12
- status: SenderStatus;
13
- isDefault: boolean;
14
- isActive: boolean;
15
- verifiedAt?: Date;
16
- verificationToken?: string;
17
- verificationSentAt?: Date;
18
- verificationExpiresAt?: Date;
19
- verificationAttempts: number;
20
- providerSenderId?: string;
21
- providerMetadata?: Record<string, unknown>;
22
- lastValidated?: Date;
23
- validationErrors?: string[];
24
- createdAt: Date;
25
- updatedAt: Date;
26
- deletedAt?: Date;
27
- }
28
- /**
29
- * Sender status enum
30
- */
31
- export declare enum SenderStatus {
32
- PENDING = "pending",// Created, awaiting verification
33
- VERIFICATION_SENT = "verification_sent",// Verification email sent
34
- VERIFIED = "verified",// Email verified, ready to use
35
- FAILED = "failed",// Verification failed
36
- EXPIRED = "expired",// Verification token expired
37
- LOCKED = "locked",// Too many failed attempts
38
- INACTIVE = "inactive"
39
- }
40
- /**
41
- * Email provider enum
42
- */
43
- export declare enum EmailProvider {
44
- SENDGRID = "sendgrid",
45
- MAILGUN = "mailgun",
46
- SES = "ses",
47
- SMTP = "smtp",
48
- POSTMARK = "postmark",
49
- MANDRILL = "mandrill",
50
- SMTP2GO = "smtp2go"
51
- }
52
- /**
53
- * Sender creation input
54
- */
55
- export interface CreateSenderInput {
56
- email: string;
57
- name: string;
58
- replyToEmail?: string;
59
- replyToName?: string;
60
- provider: EmailProvider;
61
- isDefault?: boolean;
62
- skipVerification?: boolean;
63
- createdBy?: string;
64
- /** Provider-specific fields (e.g., address/city/state for SendGrid) */
65
- providerFields?: Record<string, unknown>;
66
- }
67
- /**
68
- * Sender update input
69
- */
70
- export interface UpdateSenderInput {
71
- name?: string;
72
- replyToEmail?: string;
73
- replyToName?: string;
74
- isDefault?: boolean;
75
- isActive?: boolean;
76
- lastModifiedBy?: string;
77
- providerFields?: Record<string, unknown>;
78
- }
79
- /**
80
- * Verification result
81
- */
82
- export interface VerificationResult {
83
- success: boolean;
84
- senderId: string;
85
- status: SenderStatus;
86
- message: string;
87
- verifiedAt?: Date;
88
- errors?: string[];
89
- }
90
- /**
91
- * Provider compliance check result
92
- */
93
- export interface ComplianceCheckResult {
94
- isCompliant: boolean;
95
- checks: {
96
- domainVerified: boolean;
97
- spfValid: boolean;
98
- dkimValid: boolean;
99
- emailFormat: boolean;
100
- };
101
- errors: string[];
102
- warnings: string[];
103
- }
104
- /**
105
- * Sender list options
106
- */
107
- export interface ListSendersOptions {
108
- provider?: EmailProvider;
109
- status?: SenderStatus;
110
- isActive?: boolean;
111
- domain?: string;
112
- limit?: number;
113
- offset?: number;
114
- }
115
- /**
116
- * Package result wrapper
117
- */
118
- export interface SenderIdentityResult<T = unknown> {
119
- success: boolean;
120
- data?: T;
121
- error?: string;
122
- errors?: string[];
123
- }
124
- /**
125
- * Domain verification status (interface for missing @bernierllc/email-domain-verification)
126
- * TODO: Replace with actual import when email-domain-verification package is available
127
- */
128
- export interface DomainVerificationStatus {
129
- isVerified: boolean;
130
- domain: string;
131
- verificationUrl?: string;
132
- dnsRecords?: {
133
- spf?: {
134
- isValid: boolean;
135
- };
136
- dkim?: {
137
- isValid: boolean;
138
- };
139
- };
140
- }
141
- /**
142
- * Email domain verification interface (stub for missing dependency)
143
- * TODO: Replace with actual @bernierllc/email-domain-verification when available
144
- */
145
- export interface IEmailDomainVerification {
146
- getDomainStatus(domain: string): Promise<DomainVerificationStatus>;
147
- }
package/dist/types.js DELETED
@@ -1,36 +0,0 @@
1
- "use strict";
2
- /*
3
- Copyright (c) 2025 Bernier LLC
4
-
5
- This file is licensed to the client under a limited-use license.
6
- The client may use and modify this code *only within the scope of the project it was delivered for*.
7
- Redistribution or use in other products or commercial offerings is not permitted without written consent from Bernier LLC.
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.EmailProvider = exports.SenderStatus = void 0;
11
- /**
12
- * Sender status enum
13
- */
14
- var SenderStatus;
15
- (function (SenderStatus) {
16
- SenderStatus["PENDING"] = "pending";
17
- SenderStatus["VERIFICATION_SENT"] = "verification_sent";
18
- SenderStatus["VERIFIED"] = "verified";
19
- SenderStatus["FAILED"] = "failed";
20
- SenderStatus["EXPIRED"] = "expired";
21
- SenderStatus["LOCKED"] = "locked";
22
- SenderStatus["INACTIVE"] = "inactive";
23
- })(SenderStatus || (exports.SenderStatus = SenderStatus = {}));
24
- /**
25
- * Email provider enum
26
- */
27
- var EmailProvider;
28
- (function (EmailProvider) {
29
- EmailProvider["SENDGRID"] = "sendgrid";
30
- EmailProvider["MAILGUN"] = "mailgun";
31
- EmailProvider["SES"] = "ses";
32
- EmailProvider["SMTP"] = "smtp";
33
- EmailProvider["POSTMARK"] = "postmark";
34
- EmailProvider["MANDRILL"] = "mandrill";
35
- EmailProvider["SMTP2GO"] = "smtp2go";
36
- })(EmailProvider || (exports.EmailProvider = EmailProvider = {}));
@@ -1,4 +0,0 @@
1
- /**
2
- * Extract domain from email address
3
- */
4
- export declare function extractDomain(email: string): string;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- /*
3
- Copyright (c) 2025 Bernier LLC
4
-
5
- This file is licensed to the client under a limited-use license.
6
- The client may use and modify this code *only within the scope of the project it was delivered for*.
7
- Redistribution or use in other products or commercial offerings is not permitted without written consent from Bernier LLC.
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.extractDomain = extractDomain;
11
- /**
12
- * Extract domain from email address
13
- */
14
- function extractDomain(email) {
15
- const parts = email.split('@');
16
- if (parts.length !== 2) {
17
- throw new Error(`Invalid email format: ${email}`);
18
- }
19
- return parts[1].toLowerCase();
20
- }