@bernierllc/sender-identity-verification 1.3.1 → 1.4.0

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/index.d.ts CHANGED
@@ -2,3 +2,5 @@ export { SenderIdentityVerification } from './SenderIdentityVerification.js';
2
2
  export { SenderIdentityConfig, loadConfigFromEnv } from './config.js';
3
3
  export { SenderVerificationError, SenderErrorCode, handleSenderError } from './errors.js';
4
4
  export { SenderIdentity, SenderStatus, EmailProvider, CreateSenderInput, UpdateSenderInput, VerificationResult, ComplianceCheckResult, ListSendersOptions, SenderIdentityResult, DomainVerificationStatus, IEmailDomainVerification } from './types.js';
5
+ export { getManualInstructions, isManualVerificationProvider } from './manual-instructions.js';
6
+ export type { ManualVerificationInstruction } from './manual-instructions.js';
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ The client may use and modify this code *only within the scope of the project it
7
7
  Redistribution or use in other products or commercial offerings is not permitted without written consent from Bernier LLC.
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.EmailProvider = exports.SenderStatus = exports.handleSenderError = exports.SenderErrorCode = exports.SenderVerificationError = exports.loadConfigFromEnv = exports.SenderIdentityVerification = void 0;
10
+ exports.isManualVerificationProvider = exports.getManualInstructions = exports.EmailProvider = exports.SenderStatus = exports.handleSenderError = exports.SenderErrorCode = exports.SenderVerificationError = exports.loadConfigFromEnv = exports.SenderIdentityVerification = void 0;
11
11
  var SenderIdentityVerification_js_1 = require("./SenderIdentityVerification.js");
12
12
  Object.defineProperty(exports, "SenderIdentityVerification", { enumerable: true, get: function () { return SenderIdentityVerification_js_1.SenderIdentityVerification; } });
13
13
  var config_js_1 = require("./config.js");
@@ -19,3 +19,6 @@ Object.defineProperty(exports, "handleSenderError", { enumerable: true, get: fun
19
19
  var types_js_1 = require("./types.js");
20
20
  Object.defineProperty(exports, "SenderStatus", { enumerable: true, get: function () { return types_js_1.SenderStatus; } });
21
21
  Object.defineProperty(exports, "EmailProvider", { enumerable: true, get: function () { return types_js_1.EmailProvider; } });
22
+ var manual_instructions_js_1 = require("./manual-instructions.js");
23
+ Object.defineProperty(exports, "getManualInstructions", { enumerable: true, get: function () { return manual_instructions_js_1.getManualInstructions; } });
24
+ Object.defineProperty(exports, "isManualVerificationProvider", { enumerable: true, get: function () { return manual_instructions_js_1.isManualVerificationProvider; } });
@@ -0,0 +1,9 @@
1
+ import { EmailProvider } from './types.js';
2
+ export interface ManualVerificationInstruction {
3
+ provider: EmailProvider;
4
+ title: string;
5
+ steps: string[];
6
+ dashboardUrl?: string;
7
+ }
8
+ export declare function getManualInstructions(provider: EmailProvider): ManualVerificationInstruction | null;
9
+ export declare function isManualVerificationProvider(provider: EmailProvider): boolean;
@@ -0,0 +1,54 @@
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.getManualInstructions = getManualInstructions;
11
+ exports.isManualVerificationProvider = isManualVerificationProvider;
12
+ const types_js_1 = require("./types.js");
13
+ const MANUAL_INSTRUCTIONS = {
14
+ [types_js_1.EmailProvider.SMTP]: {
15
+ provider: types_js_1.EmailProvider.SMTP,
16
+ title: 'SMTP Sender Verification',
17
+ steps: [
18
+ 'Configure your SMTP server to allow sending from this address.',
19
+ 'Ensure SPF records include your SMTP server IP.',
20
+ 'Configure DKIM signing for the domain.',
21
+ 'Mark the sender as verified once DNS records are propagated.',
22
+ ],
23
+ },
24
+ [types_js_1.EmailProvider.SMTP2GO]: {
25
+ provider: types_js_1.EmailProvider.SMTP2GO,
26
+ title: 'SMTP2GO Sender Verification',
27
+ steps: [
28
+ 'Log in to your SMTP2GO dashboard.',
29
+ 'Navigate to Settings → Sender Domains.',
30
+ 'Add and verify the sender domain.',
31
+ 'Mark the sender as verified once domain is confirmed.',
32
+ ],
33
+ dashboardUrl: 'https://app.smtp2go.com/settings/sender_domains/',
34
+ },
35
+ [types_js_1.EmailProvider.MANDRILL]: {
36
+ provider: types_js_1.EmailProvider.MANDRILL,
37
+ title: 'Mandrill Sender Verification',
38
+ steps: [
39
+ 'Log in to your Mandrill dashboard.',
40
+ 'Navigate to Settings → Sending Domains.',
41
+ 'Add and verify the sender domain.',
42
+ 'Mark the sender as verified once domain is confirmed.',
43
+ ],
44
+ dashboardUrl: 'https://mandrillapp.com/settings/sending-domains',
45
+ },
46
+ };
47
+ function getManualInstructions(provider) {
48
+ return MANUAL_INSTRUCTIONS[provider] || null;
49
+ }
50
+ function isManualVerificationProvider(provider) {
51
+ return provider === types_js_1.EmailProvider.SMTP
52
+ || provider === types_js_1.EmailProvider.SMTP2GO
53
+ || provider === types_js_1.EmailProvider.MANDRILL;
54
+ }
package/dist/types.d.ts CHANGED
@@ -60,6 +60,9 @@ export interface CreateSenderInput {
60
60
  provider: EmailProvider;
61
61
  isDefault?: boolean;
62
62
  skipVerification?: boolean;
63
+ createdBy?: string;
64
+ /** Provider-specific fields (e.g., address/city/state for SendGrid) */
65
+ providerFields?: Record<string, unknown>;
63
66
  }
64
67
  /**
65
68
  * Sender update input
@@ -70,6 +73,8 @@ export interface UpdateSenderInput {
70
73
  replyToName?: string;
71
74
  isDefault?: boolean;
72
75
  isActive?: boolean;
76
+ lastModifiedBy?: string;
77
+ providerFields?: Record<string, unknown>;
73
78
  }
74
79
  /**
75
80
  * Verification result
package/jest.config.cjs CHANGED
@@ -13,7 +13,8 @@ module.exports = {
13
13
  roots: ['<rootDir>/__tests__'],
14
14
  testMatch: ['**/__tests__/**/*.test.ts'],
15
15
  moduleNameMapper: {
16
- '^(\\.{1,2}/.*)\\.js$': '$1'
16
+ '^(\\.{1,2}/.*)\\.js$': '$1',
17
+ '^@bernierllc/email-sender-manager$': '<rootDir>/../../core/email-sender-manager/src/index.ts'
17
18
  },
18
19
  collectCoverageFrom: [
19
20
  'src/**/*.{ts,tsx}',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bernierllc/sender-identity-verification",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "description": "Individual sender email address verification service for email production compliance",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,12 +19,13 @@
19
19
  "author": "Bernier LLC",
20
20
  "license": "SEE LICENSE IN LICENSE",
21
21
  "dependencies": {
22
- "@bernierllc/email-sender": "5.2.1",
22
+ "@bernierllc/email-sender": "5.3.0",
23
+ "@bernierllc/crypto-utils": "1.0.8",
24
+ "@bernierllc/email-sender-manager": "1.3.0",
23
25
  "@bernierllc/logger": "1.3.2",
24
26
  "@bernierllc/neverhub-adapter": "0.1.6",
25
27
  "@bernierllc/retry-policy": "0.3.2",
26
- "@bernierllc/validators-email": "0.3.2",
27
- "@bernierllc/crypto-utils": "1.0.8"
28
+ "@bernierllc/validators-email": "0.3.2"
28
29
  },
29
30
  "devDependencies": {
30
31
  "@types/jest": "^29.0.0",