@aacigroup/aaci_shared 2.3.0 → 2.6.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/README.md +491 -62
- package/dist/LeadTracker.d.ts.map +1 -1
- package/dist/LeadTracker.js +5 -0
- package/dist/LeadTracker.js.map +1 -1
- package/dist/TrackingContext.d.ts +19 -0
- package/dist/TrackingContext.d.ts.map +1 -0
- package/dist/TrackingContext.js +58 -0
- package/dist/TrackingContext.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/react.d.ts +3 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +9 -0
- package/dist/react.js.map +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/validation.d.ts +306 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +93 -0
- package/dist/validation.js.map +1 -0
- package/package.json +23 -4
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { LeadTracker, PostHog } from './index';
|
|
3
|
+
interface TrackingConfig {
|
|
4
|
+
apiUrl: string;
|
|
5
|
+
apiKey: string;
|
|
6
|
+
projectName: string;
|
|
7
|
+
posthogKey: string;
|
|
8
|
+
productionDomains: string[];
|
|
9
|
+
}
|
|
10
|
+
export type { TrackingConfig };
|
|
11
|
+
interface TrackingProviderProps {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
config: TrackingConfig;
|
|
14
|
+
}
|
|
15
|
+
export declare const TrackingProvider: ({ children, config }: TrackingProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const useLeadTracker: () => LeadTracker;
|
|
17
|
+
export declare const usePostHog: () => PostHog;
|
|
18
|
+
export declare const createTrackingConfigFromEnv: () => TrackingConfig;
|
|
19
|
+
//# sourceMappingURL=TrackingContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrackingContext.d.ts","sourceRoot":"","sources":["../src/TrackingContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,SAAS,EAAW,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAS/C,UAAU,cAAc;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,eAAO,MAAM,gBAAgB,GAAI,sBAAsB,qBAAqB,4CA4B3E,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,WAMjC,CAAC;AAEF,eAAO,MAAM,UAAU,QAAO,OAM7B,CAAC;AAGF,eAAO,MAAM,2BAA2B,QAAO,cAc9C,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTrackingConfigFromEnv = exports.usePostHog = exports.useLeadTracker = exports.TrackingProvider = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const index_1 = require("./index");
|
|
7
|
+
const TrackingContext = (0, react_1.createContext)(undefined);
|
|
8
|
+
const TrackingProvider = ({ children, config }) => {
|
|
9
|
+
const trackers = (0, react_1.useMemo)(() => {
|
|
10
|
+
const leadTracker = new index_1.LeadTracker({
|
|
11
|
+
apiUrl: config.apiUrl,
|
|
12
|
+
apiKey: config.apiKey,
|
|
13
|
+
projectName: config.projectName,
|
|
14
|
+
productionDomains: config.productionDomains,
|
|
15
|
+
});
|
|
16
|
+
const posthog = new index_1.PostHog({
|
|
17
|
+
apiKey: config.posthogKey,
|
|
18
|
+
projectName: config.projectName,
|
|
19
|
+
productionDomains: config.productionDomains,
|
|
20
|
+
});
|
|
21
|
+
posthog.init();
|
|
22
|
+
return { leadTracker, posthog };
|
|
23
|
+
}, [config]);
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)(TrackingContext.Provider, { value: trackers, children: children }));
|
|
25
|
+
};
|
|
26
|
+
exports.TrackingProvider = TrackingProvider;
|
|
27
|
+
const useLeadTracker = () => {
|
|
28
|
+
const context = (0, react_1.useContext)(TrackingContext);
|
|
29
|
+
if (!context) {
|
|
30
|
+
throw new Error('useLeadTracker must be used within TrackingProvider');
|
|
31
|
+
}
|
|
32
|
+
return context.leadTracker;
|
|
33
|
+
};
|
|
34
|
+
exports.useLeadTracker = useLeadTracker;
|
|
35
|
+
const usePostHog = () => {
|
|
36
|
+
const context = (0, react_1.useContext)(TrackingContext);
|
|
37
|
+
if (!context) {
|
|
38
|
+
throw new Error('usePostHog must be used within TrackingProvider');
|
|
39
|
+
}
|
|
40
|
+
return context.posthog;
|
|
41
|
+
};
|
|
42
|
+
exports.usePostHog = usePostHog;
|
|
43
|
+
const createTrackingConfigFromEnv = () => {
|
|
44
|
+
var _a;
|
|
45
|
+
if (typeof window !== 'undefined' && 'import' in window && 'meta' in window.import) {
|
|
46
|
+
const env = window.import.meta.env;
|
|
47
|
+
return {
|
|
48
|
+
apiUrl: env.VITE_LEAD_CAPTURE_API_URL,
|
|
49
|
+
apiKey: env.VITE_LEAD_CAPTURE_API_KEY,
|
|
50
|
+
projectName: env.VITE_PROJECT_NAME,
|
|
51
|
+
posthogKey: env.VITE_POSTHOG_KEY,
|
|
52
|
+
productionDomains: ((_a = env.VITE_PRODUCTION_DOMAINS) === null || _a === void 0 ? void 0 : _a.split(',').map((d) => d.trim()).filter(Boolean)) || [],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
throw new Error('Environment variables not available. Please provide config manually.');
|
|
56
|
+
};
|
|
57
|
+
exports.createTrackingConfigFromEnv = createTrackingConfigFromEnv;
|
|
58
|
+
//# sourceMappingURL=TrackingContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrackingContext.js","sourceRoot":"","sources":["../src/TrackingContext.tsx"],"names":[],"mappings":";;;;AAAA,iCAAsE;AACtE,mCAA+C;AAO/C,MAAM,eAAe,GAAG,IAAA,qBAAa,EAAkC,SAAS,CAAC,CAAC;AAiB3E,MAAM,gBAAgB,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAyB,EAAE,EAAE;IAC9E,MAAM,QAAQ,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAE5B,MAAM,WAAW,GAAG,IAAI,mBAAW,CAAC;YAClC,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;SAC5C,CAAC,CAAC;QAGH,MAAM,OAAO,GAAG,IAAI,eAAO,CAAC;YAC1B,MAAM,EAAE,MAAM,CAAC,UAAU;YACzB,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;SAC5C,CAAC,CAAC;QAGH,OAAO,CAAC,IAAI,EAAE,CAAC;QAEf,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;IAClC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,OAAO,CACL,uBAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,YACtC,QAAQ,GACgB,CAC5B,CAAC;AACJ,CAAC,CAAC;AA5BW,QAAA,gBAAgB,oBA4B3B;AAEK,MAAM,cAAc,GAAG,GAAgB,EAAE;IAC9C,MAAM,OAAO,GAAG,IAAA,kBAAU,EA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racker } from './LeadTracker';
|
|
|
3
3
|
export { PostHog } from './PostHog';
|
|
4
4
|
export { GTM } from './GTM';
|
|
5
5
|
export { Environment } from './Environment';
|
|
6
|
+
export { validateTrackLeadParams, validateAddress, validateTrackLeadAndAddress, safeValidateTrackLeadParams, safeValidateAddress, safeValidateTrackLeadAndAddress, leadTypeEnum, trackLeadParamsSchema, addressSchema, trackLeadAndAddressSchema, sessionDataSchema } from './validation';
|
|
6
7
|
export type { Lead, AddressCapture, SessionData, TrackLeadParams, Address, LeadTrackerConfig, LeadTrackingResponse } from './types';
|
|
7
8
|
export type { PostHogConfig } from './PostHog';
|
|
8
9
|
export type { GTMConfig } from './GTM';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,KAAK,YAAmD,CAAC;AAGtE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,YAAY,EAEV,IAAI,EACJ,cAAc,EACd,WAAW,EAGX,eAAe,EACf,OAAO,EAGP,iBAAiB,EAGjB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAEjB,YAAY,EACV,aAAa,EACd,MAAM,WAAW,CAAC;AAEnB,YAAY,EACV,SAAS,EACV,MAAM,OAAO,CAAC;AAEf,YAAY,EACV,iBAAiB,EAClB,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,KAAK,YAAmD,CAAC;AAGtE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,2BAA2B,EAC3B,2BAA2B,EAC3B,mBAAmB,EACnB,+BAA+B,EAE/B,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,yBAAyB,EACzB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAGtB,YAAY,EAEV,IAAI,EACJ,cAAc,EACd,WAAW,EAGX,eAAe,EACf,OAAO,EAGP,iBAAiB,EAGjB,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAEjB,YAAY,EACV,aAAa,EACd,MAAM,WAAW,CAAC;AAEnB,YAAY,EACV,SAAS,EACV,MAAM,OAAO,CAAC;AAEf,YAAY,EACV,iBAAiB,EAClB,MAAM,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Environment = exports.GTM = exports.PostHog = exports.LeadTracker = exports.hello = void 0;
|
|
3
|
+
exports.sessionDataSchema = exports.trackLeadAndAddressSchema = exports.addressSchema = exports.trackLeadParamsSchema = exports.leadTypeEnum = exports.safeValidateTrackLeadAndAddress = exports.safeValidateAddress = exports.safeValidateTrackLeadParams = exports.validateTrackLeadAndAddress = exports.validateAddress = exports.validateTrackLeadParams = exports.Environment = exports.GTM = exports.PostHog = exports.LeadTracker = exports.hello = void 0;
|
|
4
4
|
const hello = () => console.log("Hello from AACI shared lib!");
|
|
5
5
|
exports.hello = hello;
|
|
6
6
|
var LeadTracker_1 = require("./LeadTracker");
|
|
@@ -11,4 +11,16 @@ var GTM_1 = require("./GTM");
|
|
|
11
11
|
Object.defineProperty(exports, "GTM", { enumerable: true, get: function () { return GTM_1.GTM; } });
|
|
12
12
|
var Environment_1 = require("./Environment");
|
|
13
13
|
Object.defineProperty(exports, "Environment", { enumerable: true, get: function () { return Environment_1.Environment; } });
|
|
14
|
+
var validation_1 = require("./validation");
|
|
15
|
+
Object.defineProperty(exports, "validateTrackLeadParams", { enumerable: true, get: function () { return validation_1.validateTrackLeadParams; } });
|
|
16
|
+
Object.defineProperty(exports, "validateAddress", { enumerable: true, get: function () { return validation_1.validateAddress; } });
|
|
17
|
+
Object.defineProperty(exports, "validateTrackLeadAndAddress", { enumerable: true, get: function () { return validation_1.validateTrackLeadAndAddress; } });
|
|
18
|
+
Object.defineProperty(exports, "safeValidateTrackLeadParams", { enumerable: true, get: function () { return validation_1.safeValidateTrackLeadParams; } });
|
|
19
|
+
Object.defineProperty(exports, "safeValidateAddress", { enumerable: true, get: function () { return validation_1.safeValidateAddress; } });
|
|
20
|
+
Object.defineProperty(exports, "safeValidateTrackLeadAndAddress", { enumerable: true, get: function () { return validation_1.safeValidateTrackLeadAndAddress; } });
|
|
21
|
+
Object.defineProperty(exports, "leadTypeEnum", { enumerable: true, get: function () { return validation_1.leadTypeEnum; } });
|
|
22
|
+
Object.defineProperty(exports, "trackLeadParamsSchema", { enumerable: true, get: function () { return validation_1.trackLeadParamsSchema; } });
|
|
23
|
+
Object.defineProperty(exports, "addressSchema", { enumerable: true, get: function () { return validation_1.addressSchema; } });
|
|
24
|
+
Object.defineProperty(exports, "trackLeadAndAddressSchema", { enumerable: true, get: function () { return validation_1.trackLeadAndAddressSchema; } });
|
|
25
|
+
Object.defineProperty(exports, "sessionDataSchema", { enumerable: true, get: function () { return validation_1.sessionDataSchema; } });
|
|
14
26
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACO,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;AAAzD,QAAA,KAAK,SAAoD;AAGtE,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,6BAA4B;AAAnB,0FAAA,GAAG,OAAA;AACZ,6CAA4C;AAAnC,0GAAA,WAAW,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACO,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;AAAzD,QAAA,KAAK,SAAoD;AAGtE,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,6BAA4B;AAAnB,0FAAA,GAAG,OAAA;AACZ,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AAGpB,2CAasB;AAZpB,qHAAA,uBAAuB,OAAA;AACvB,6GAAA,eAAe,OAAA;AACf,yHAAA,2BAA2B,OAAA;AAC3B,yHAAA,2BAA2B,OAAA;AAC3B,iHAAA,mBAAmB,OAAA;AACnB,6HAAA,+BAA+B,OAAA;AAE/B,0GAAA,YAAY,OAAA;AACZ,mHAAA,qBAAqB,OAAA;AACrB,2GAAA,aAAa,OAAA;AACb,uHAAA,yBAAyB,OAAA;AACzB,+GAAA,iBAAiB,OAAA"}
|
package/dist/react.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,2BAA2B,EAC5B,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,cAAc,EACf,MAAM,mBAAmB,CAAC"}
|
package/dist/react.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTrackingConfigFromEnv = exports.usePostHog = exports.useLeadTracker = exports.TrackingProvider = void 0;
|
|
4
|
+
var TrackingContext_1 = require("./TrackingContext");
|
|
5
|
+
Object.defineProperty(exports, "TrackingProvider", { enumerable: true, get: function () { return TrackingContext_1.TrackingProvider; } });
|
|
6
|
+
Object.defineProperty(exports, "useLeadTracker", { enumerable: true, get: function () { return TrackingContext_1.useLeadTracker; } });
|
|
7
|
+
Object.defineProperty(exports, "usePostHog", { enumerable: true, get: function () { return TrackingContext_1.usePostHog; } });
|
|
8
|
+
Object.defineProperty(exports, "createTrackingConfigFromEnv", { enumerable: true, get: function () { return TrackingContext_1.createTrackingConfigFromEnv; } });
|
|
9
|
+
//# sourceMappingURL=react.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../src/react.ts"],"names":[],"mappings":";;;AAGA,qDAK2B;AAJzB,mHAAA,gBAAgB,OAAA;AAChB,iHAAA,cAAc,OAAA;AACd,6GAAA,UAAU,OAAA;AACV,8HAAA,2BAA2B,OAAA"}
|
package/dist/types.d.ts
CHANGED
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,WAAW;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,C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CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC;AAGD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,KAAK,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;CACJ"}
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const leadTypeEnum: z.ZodEnum<{
|
|
3
|
+
policy_review: "policy_review";
|
|
4
|
+
address_check: "address_check";
|
|
5
|
+
contact: "contact";
|
|
6
|
+
signup: "signup";
|
|
7
|
+
consultation: "consultation";
|
|
8
|
+
quote: "quote";
|
|
9
|
+
}>;
|
|
10
|
+
declare const sessionDataSchema: z.ZodObject<{
|
|
11
|
+
ip: z.ZodOptional<z.ZodString>;
|
|
12
|
+
user_agent: z.ZodOptional<z.ZodString>;
|
|
13
|
+
browser: z.ZodOptional<z.ZodString>;
|
|
14
|
+
browser_version: z.ZodOptional<z.ZodString>;
|
|
15
|
+
os: z.ZodOptional<z.ZodString>;
|
|
16
|
+
device: z.ZodOptional<z.ZodString>;
|
|
17
|
+
referrer: z.ZodOptional<z.ZodString>;
|
|
18
|
+
utm_source: z.ZodOptional<z.ZodString>;
|
|
19
|
+
utm_medium: z.ZodOptional<z.ZodString>;
|
|
20
|
+
utm_campaign: z.ZodOptional<z.ZodString>;
|
|
21
|
+
landing_page: z.ZodOptional<z.ZodString>;
|
|
22
|
+
current_page: z.ZodOptional<z.ZodString>;
|
|
23
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
24
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
25
|
+
distinct_id: z.ZodOptional<z.ZodString>;
|
|
26
|
+
gclid: z.ZodOptional<z.ZodString>;
|
|
27
|
+
fbclid: z.ZodOptional<z.ZodString>;
|
|
28
|
+
fbc: z.ZodOptional<z.ZodString>;
|
|
29
|
+
fbp: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
declare const trackLeadParamsSchema: z.ZodObject<{
|
|
32
|
+
lead_type: z.ZodEnum<{
|
|
33
|
+
policy_review: "policy_review";
|
|
34
|
+
address_check: "address_check";
|
|
35
|
+
contact: "contact";
|
|
36
|
+
signup: "signup";
|
|
37
|
+
consultation: "consultation";
|
|
38
|
+
quote: "quote";
|
|
39
|
+
}>;
|
|
40
|
+
first_name: z.ZodOptional<z.ZodString>;
|
|
41
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
42
|
+
email: z.ZodOptional<z.ZodString>;
|
|
43
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
44
|
+
extra_data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
45
|
+
session_data: z.ZodOptional<z.ZodObject<{
|
|
46
|
+
ip: z.ZodOptional<z.ZodString>;
|
|
47
|
+
user_agent: z.ZodOptional<z.ZodString>;
|
|
48
|
+
browser: z.ZodOptional<z.ZodString>;
|
|
49
|
+
browser_version: z.ZodOptional<z.ZodString>;
|
|
50
|
+
os: z.ZodOptional<z.ZodString>;
|
|
51
|
+
device: z.ZodOptional<z.ZodString>;
|
|
52
|
+
referrer: z.ZodOptional<z.ZodString>;
|
|
53
|
+
utm_source: z.ZodOptional<z.ZodString>;
|
|
54
|
+
utm_medium: z.ZodOptional<z.ZodString>;
|
|
55
|
+
utm_campaign: z.ZodOptional<z.ZodString>;
|
|
56
|
+
landing_page: z.ZodOptional<z.ZodString>;
|
|
57
|
+
current_page: z.ZodOptional<z.ZodString>;
|
|
58
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
59
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
60
|
+
distinct_id: z.ZodOptional<z.ZodString>;
|
|
61
|
+
gclid: z.ZodOptional<z.ZodString>;
|
|
62
|
+
fbclid: z.ZodOptional<z.ZodString>;
|
|
63
|
+
fbc: z.ZodOptional<z.ZodString>;
|
|
64
|
+
fbp: z.ZodOptional<z.ZodString>;
|
|
65
|
+
}, z.core.$strip>>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
declare const addressSchema: z.ZodObject<{
|
|
68
|
+
full_address: z.ZodString;
|
|
69
|
+
source: z.ZodEnum<{
|
|
70
|
+
policy_review: "policy_review";
|
|
71
|
+
address_check: "address_check";
|
|
72
|
+
contact: "contact";
|
|
73
|
+
signup: "signup";
|
|
74
|
+
consultation: "consultation";
|
|
75
|
+
quote: "quote";
|
|
76
|
+
}>;
|
|
77
|
+
street_address: z.ZodOptional<z.ZodString>;
|
|
78
|
+
city: z.ZodOptional<z.ZodString>;
|
|
79
|
+
state: z.ZodOptional<z.ZodString>;
|
|
80
|
+
zip_code: z.ZodOptional<z.ZodString>;
|
|
81
|
+
county: z.ZodOptional<z.ZodString>;
|
|
82
|
+
country: z.ZodOptional<z.ZodString>;
|
|
83
|
+
extra_data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
declare const trackLeadAndAddressSchema: z.ZodObject<{
|
|
86
|
+
lead: z.ZodOptional<z.ZodObject<{
|
|
87
|
+
lead_type: z.ZodEnum<{
|
|
88
|
+
policy_review: "policy_review";
|
|
89
|
+
address_check: "address_check";
|
|
90
|
+
contact: "contact";
|
|
91
|
+
signup: "signup";
|
|
92
|
+
consultation: "consultation";
|
|
93
|
+
quote: "quote";
|
|
94
|
+
}>;
|
|
95
|
+
first_name: z.ZodOptional<z.ZodString>;
|
|
96
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
97
|
+
email: z.ZodOptional<z.ZodString>;
|
|
98
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
99
|
+
extra_data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
100
|
+
session_data: z.ZodOptional<z.ZodObject<{
|
|
101
|
+
ip: z.ZodOptional<z.ZodString>;
|
|
102
|
+
user_agent: z.ZodOptional<z.ZodString>;
|
|
103
|
+
browser: z.ZodOptional<z.ZodString>;
|
|
104
|
+
browser_version: z.ZodOptional<z.ZodString>;
|
|
105
|
+
os: z.ZodOptional<z.ZodString>;
|
|
106
|
+
device: z.ZodOptional<z.ZodString>;
|
|
107
|
+
referrer: z.ZodOptional<z.ZodString>;
|
|
108
|
+
utm_source: z.ZodOptional<z.ZodString>;
|
|
109
|
+
utm_medium: z.ZodOptional<z.ZodString>;
|
|
110
|
+
utm_campaign: z.ZodOptional<z.ZodString>;
|
|
111
|
+
landing_page: z.ZodOptional<z.ZodString>;
|
|
112
|
+
current_page: z.ZodOptional<z.ZodString>;
|
|
113
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
114
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
115
|
+
distinct_id: z.ZodOptional<z.ZodString>;
|
|
116
|
+
gclid: z.ZodOptional<z.ZodString>;
|
|
117
|
+
fbclid: z.ZodOptional<z.ZodString>;
|
|
118
|
+
fbc: z.ZodOptional<z.ZodString>;
|
|
119
|
+
fbp: z.ZodOptional<z.ZodString>;
|
|
120
|
+
}, z.core.$strip>>;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
address: z.ZodOptional<z.ZodObject<{
|
|
123
|
+
full_address: z.ZodString;
|
|
124
|
+
source: z.ZodEnum<{
|
|
125
|
+
policy_review: "policy_review";
|
|
126
|
+
address_check: "address_check";
|
|
127
|
+
contact: "contact";
|
|
128
|
+
signup: "signup";
|
|
129
|
+
consultation: "consultation";
|
|
130
|
+
quote: "quote";
|
|
131
|
+
}>;
|
|
132
|
+
street_address: z.ZodOptional<z.ZodString>;
|
|
133
|
+
city: z.ZodOptional<z.ZodString>;
|
|
134
|
+
state: z.ZodOptional<z.ZodString>;
|
|
135
|
+
zip_code: z.ZodOptional<z.ZodString>;
|
|
136
|
+
county: z.ZodOptional<z.ZodString>;
|
|
137
|
+
country: z.ZodOptional<z.ZodString>;
|
|
138
|
+
extra_data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
139
|
+
}, z.core.$strip>>;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
export declare function validateTrackLeadParams(data: unknown): {
|
|
142
|
+
lead_type: "policy_review" | "address_check" | "contact" | "signup" | "consultation" | "quote";
|
|
143
|
+
first_name?: string | undefined;
|
|
144
|
+
last_name?: string | undefined;
|
|
145
|
+
email?: string | undefined;
|
|
146
|
+
phone?: string | undefined;
|
|
147
|
+
extra_data?: Record<string, any> | undefined;
|
|
148
|
+
session_data?: {
|
|
149
|
+
ip?: string | undefined;
|
|
150
|
+
user_agent?: string | undefined;
|
|
151
|
+
browser?: string | undefined;
|
|
152
|
+
browser_version?: string | undefined;
|
|
153
|
+
os?: string | undefined;
|
|
154
|
+
device?: string | undefined;
|
|
155
|
+
referrer?: string | undefined;
|
|
156
|
+
utm_source?: string | undefined;
|
|
157
|
+
utm_medium?: string | undefined;
|
|
158
|
+
utm_campaign?: string | undefined;
|
|
159
|
+
landing_page?: string | undefined;
|
|
160
|
+
current_page?: string | undefined;
|
|
161
|
+
session_id?: string | undefined;
|
|
162
|
+
timestamp?: string | undefined;
|
|
163
|
+
distinct_id?: string | undefined;
|
|
164
|
+
gclid?: string | undefined;
|
|
165
|
+
fbclid?: string | undefined;
|
|
166
|
+
fbc?: string | undefined;
|
|
167
|
+
fbp?: string | undefined;
|
|
168
|
+
} | undefined;
|
|
169
|
+
};
|
|
170
|
+
export declare function validateAddress(data: unknown): {
|
|
171
|
+
full_address: string;
|
|
172
|
+
source: "policy_review" | "address_check" | "contact" | "signup" | "consultation" | "quote";
|
|
173
|
+
street_address?: string | undefined;
|
|
174
|
+
city?: string | undefined;
|
|
175
|
+
state?: string | undefined;
|
|
176
|
+
zip_code?: string | undefined;
|
|
177
|
+
county?: string | undefined;
|
|
178
|
+
country?: string | undefined;
|
|
179
|
+
extra_data?: Record<string, any> | undefined;
|
|
180
|
+
};
|
|
181
|
+
export declare function validateTrackLeadAndAddress(lead: unknown, address: unknown): {
|
|
182
|
+
lead?: {
|
|
183
|
+
lead_type: "policy_review" | "address_check" | "contact" | "signup" | "consultation" | "quote";
|
|
184
|
+
first_name?: string | undefined;
|
|
185
|
+
last_name?: string | undefined;
|
|
186
|
+
email?: string | undefined;
|
|
187
|
+
phone?: string | undefined;
|
|
188
|
+
extra_data?: Record<string, any> | undefined;
|
|
189
|
+
session_data?: {
|
|
190
|
+
ip?: string | undefined;
|
|
191
|
+
user_agent?: string | undefined;
|
|
192
|
+
browser?: string | undefined;
|
|
193
|
+
browser_version?: string | undefined;
|
|
194
|
+
os?: string | undefined;
|
|
195
|
+
device?: string | undefined;
|
|
196
|
+
referrer?: string | undefined;
|
|
197
|
+
utm_source?: string | undefined;
|
|
198
|
+
utm_medium?: string | undefined;
|
|
199
|
+
utm_campaign?: string | undefined;
|
|
200
|
+
landing_page?: string | undefined;
|
|
201
|
+
current_page?: string | undefined;
|
|
202
|
+
session_id?: string | undefined;
|
|
203
|
+
timestamp?: string | undefined;
|
|
204
|
+
distinct_id?: string | undefined;
|
|
205
|
+
gclid?: string | undefined;
|
|
206
|
+
fbclid?: string | undefined;
|
|
207
|
+
fbc?: string | undefined;
|
|
208
|
+
fbp?: string | undefined;
|
|
209
|
+
} | undefined;
|
|
210
|
+
} | undefined;
|
|
211
|
+
address?: {
|
|
212
|
+
full_address: string;
|
|
213
|
+
source: "policy_review" | "address_check" | "contact" | "signup" | "consultation" | "quote";
|
|
214
|
+
street_address?: string | undefined;
|
|
215
|
+
city?: string | undefined;
|
|
216
|
+
state?: string | undefined;
|
|
217
|
+
zip_code?: string | undefined;
|
|
218
|
+
county?: string | undefined;
|
|
219
|
+
country?: string | undefined;
|
|
220
|
+
extra_data?: Record<string, any> | undefined;
|
|
221
|
+
} | undefined;
|
|
222
|
+
};
|
|
223
|
+
export declare function safeValidateTrackLeadParams(data: unknown): z.ZodSafeParseResult<{
|
|
224
|
+
lead_type: "policy_review" | "address_check" | "contact" | "signup" | "consultation" | "quote";
|
|
225
|
+
first_name?: string | undefined;
|
|
226
|
+
last_name?: string | undefined;
|
|
227
|
+
email?: string | undefined;
|
|
228
|
+
phone?: string | undefined;
|
|
229
|
+
extra_data?: Record<string, any> | undefined;
|
|
230
|
+
session_data?: {
|
|
231
|
+
ip?: string | undefined;
|
|
232
|
+
user_agent?: string | undefined;
|
|
233
|
+
browser?: string | undefined;
|
|
234
|
+
browser_version?: string | undefined;
|
|
235
|
+
os?: string | undefined;
|
|
236
|
+
device?: string | undefined;
|
|
237
|
+
referrer?: string | undefined;
|
|
238
|
+
utm_source?: string | undefined;
|
|
239
|
+
utm_medium?: string | undefined;
|
|
240
|
+
utm_campaign?: string | undefined;
|
|
241
|
+
landing_page?: string | undefined;
|
|
242
|
+
current_page?: string | undefined;
|
|
243
|
+
session_id?: string | undefined;
|
|
244
|
+
timestamp?: string | undefined;
|
|
245
|
+
distinct_id?: string | undefined;
|
|
246
|
+
gclid?: string | undefined;
|
|
247
|
+
fbclid?: string | undefined;
|
|
248
|
+
fbc?: string | undefined;
|
|
249
|
+
fbp?: string | undefined;
|
|
250
|
+
} | undefined;
|
|
251
|
+
}>;
|
|
252
|
+
export declare function safeValidateAddress(data: unknown): z.ZodSafeParseResult<{
|
|
253
|
+
full_address: string;
|
|
254
|
+
source: "policy_review" | "address_check" | "contact" | "signup" | "consultation" | "quote";
|
|
255
|
+
street_address?: string | undefined;
|
|
256
|
+
city?: string | undefined;
|
|
257
|
+
state?: string | undefined;
|
|
258
|
+
zip_code?: string | undefined;
|
|
259
|
+
county?: string | undefined;
|
|
260
|
+
country?: string | undefined;
|
|
261
|
+
extra_data?: Record<string, any> | undefined;
|
|
262
|
+
}>;
|
|
263
|
+
export declare function safeValidateTrackLeadAndAddress(lead: unknown, address: unknown): z.ZodSafeParseResult<{
|
|
264
|
+
lead?: {
|
|
265
|
+
lead_type: "policy_review" | "address_check" | "contact" | "signup" | "consultation" | "quote";
|
|
266
|
+
first_name?: string | undefined;
|
|
267
|
+
last_name?: string | undefined;
|
|
268
|
+
email?: string | undefined;
|
|
269
|
+
phone?: string | undefined;
|
|
270
|
+
extra_data?: Record<string, any> | undefined;
|
|
271
|
+
session_data?: {
|
|
272
|
+
ip?: string | undefined;
|
|
273
|
+
user_agent?: string | undefined;
|
|
274
|
+
browser?: string | undefined;
|
|
275
|
+
browser_version?: string | undefined;
|
|
276
|
+
os?: string | undefined;
|
|
277
|
+
device?: string | undefined;
|
|
278
|
+
referrer?: string | undefined;
|
|
279
|
+
utm_source?: string | undefined;
|
|
280
|
+
utm_medium?: string | undefined;
|
|
281
|
+
utm_campaign?: string | undefined;
|
|
282
|
+
landing_page?: string | undefined;
|
|
283
|
+
current_page?: string | undefined;
|
|
284
|
+
session_id?: string | undefined;
|
|
285
|
+
timestamp?: string | undefined;
|
|
286
|
+
distinct_id?: string | undefined;
|
|
287
|
+
gclid?: string | undefined;
|
|
288
|
+
fbclid?: string | undefined;
|
|
289
|
+
fbc?: string | undefined;
|
|
290
|
+
fbp?: string | undefined;
|
|
291
|
+
} | undefined;
|
|
292
|
+
} | undefined;
|
|
293
|
+
address?: {
|
|
294
|
+
full_address: string;
|
|
295
|
+
source: "policy_review" | "address_check" | "contact" | "signup" | "consultation" | "quote";
|
|
296
|
+
street_address?: string | undefined;
|
|
297
|
+
city?: string | undefined;
|
|
298
|
+
state?: string | undefined;
|
|
299
|
+
zip_code?: string | undefined;
|
|
300
|
+
county?: string | undefined;
|
|
301
|
+
country?: string | undefined;
|
|
302
|
+
extra_data?: Record<string, any> | undefined;
|
|
303
|
+
} | undefined;
|
|
304
|
+
}>;
|
|
305
|
+
export { leadTypeEnum, trackLeadParamsSchema, addressSchema, trackLeadAndAddressSchema, sessionDataSchema };
|
|
306
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,QAAA,MAAM,YAAY;;;;;;;EAOhB,CAAC;AAGH,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;iBAoBrB,CAAC;AAGH,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAc1B,CAAC;AAGF,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;iBAUjB,CAAC;AAGH,QAAA,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAS9B,CAAC;AAGF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEpD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;EAE5C;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE1E;AAGD,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAExD;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;GAEhD;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAE9E;AAGD,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,yBAAyB,EACzB,iBAAiB,EAClB,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sessionDataSchema = exports.trackLeadAndAddressSchema = exports.addressSchema = exports.trackLeadParamsSchema = exports.leadTypeEnum = void 0;
|
|
4
|
+
exports.validateTrackLeadParams = validateTrackLeadParams;
|
|
5
|
+
exports.validateAddress = validateAddress;
|
|
6
|
+
exports.validateTrackLeadAndAddress = validateTrackLeadAndAddress;
|
|
7
|
+
exports.safeValidateTrackLeadParams = safeValidateTrackLeadParams;
|
|
8
|
+
exports.safeValidateAddress = safeValidateAddress;
|
|
9
|
+
exports.safeValidateTrackLeadAndAddress = safeValidateTrackLeadAndAddress;
|
|
10
|
+
const zod_1 = require("zod");
|
|
11
|
+
const leadTypeEnum = zod_1.z.enum([
|
|
12
|
+
'policy_review',
|
|
13
|
+
'address_check',
|
|
14
|
+
'contact',
|
|
15
|
+
'signup',
|
|
16
|
+
'consultation',
|
|
17
|
+
'quote'
|
|
18
|
+
]);
|
|
19
|
+
exports.leadTypeEnum = leadTypeEnum;
|
|
20
|
+
const sessionDataSchema = zod_1.z.object({
|
|
21
|
+
ip: zod_1.z.string().optional(),
|
|
22
|
+
user_agent: zod_1.z.string().optional(),
|
|
23
|
+
browser: zod_1.z.string().optional(),
|
|
24
|
+
browser_version: zod_1.z.string().optional(),
|
|
25
|
+
os: zod_1.z.string().optional(),
|
|
26
|
+
device: zod_1.z.string().optional(),
|
|
27
|
+
referrer: zod_1.z.string().optional(),
|
|
28
|
+
utm_source: zod_1.z.string().optional(),
|
|
29
|
+
utm_medium: zod_1.z.string().optional(),
|
|
30
|
+
utm_campaign: zod_1.z.string().optional(),
|
|
31
|
+
landing_page: zod_1.z.string().optional(),
|
|
32
|
+
current_page: zod_1.z.string().optional(),
|
|
33
|
+
session_id: zod_1.z.string().optional(),
|
|
34
|
+
timestamp: zod_1.z.string().optional(),
|
|
35
|
+
distinct_id: zod_1.z.string().optional(),
|
|
36
|
+
gclid: zod_1.z.string().optional(),
|
|
37
|
+
fbclid: zod_1.z.string().optional(),
|
|
38
|
+
fbc: zod_1.z.string().optional(),
|
|
39
|
+
fbp: zod_1.z.string().optional(),
|
|
40
|
+
});
|
|
41
|
+
exports.sessionDataSchema = sessionDataSchema;
|
|
42
|
+
const trackLeadParamsSchema = zod_1.z.object({
|
|
43
|
+
lead_type: leadTypeEnum,
|
|
44
|
+
first_name: zod_1.z.string().min(1).optional(),
|
|
45
|
+
last_name: zod_1.z.string().min(1).optional(),
|
|
46
|
+
email: zod_1.z.string().email().optional(),
|
|
47
|
+
phone: zod_1.z.string().min(1).optional(),
|
|
48
|
+
extra_data: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
49
|
+
session_data: sessionDataSchema.optional(),
|
|
50
|
+
}).refine((data) => data.email || data.phone, {
|
|
51
|
+
message: "Either email or phone is required",
|
|
52
|
+
path: ["email", "phone"],
|
|
53
|
+
});
|
|
54
|
+
exports.trackLeadParamsSchema = trackLeadParamsSchema;
|
|
55
|
+
const addressSchema = zod_1.z.object({
|
|
56
|
+
full_address: zod_1.z.string().min(1, "Full address is required"),
|
|
57
|
+
source: leadTypeEnum,
|
|
58
|
+
street_address: zod_1.z.string().optional(),
|
|
59
|
+
city: zod_1.z.string().optional(),
|
|
60
|
+
state: zod_1.z.string().optional(),
|
|
61
|
+
zip_code: zod_1.z.string().optional(),
|
|
62
|
+
county: zod_1.z.string().optional(),
|
|
63
|
+
country: zod_1.z.string().optional(),
|
|
64
|
+
extra_data: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
65
|
+
});
|
|
66
|
+
exports.addressSchema = addressSchema;
|
|
67
|
+
const trackLeadAndAddressSchema = zod_1.z.object({
|
|
68
|
+
lead: trackLeadParamsSchema.optional(),
|
|
69
|
+
address: addressSchema.optional(),
|
|
70
|
+
}).refine((data) => data.lead || data.address, {
|
|
71
|
+
message: "Either lead or address data is required",
|
|
72
|
+
path: ["lead", "address"],
|
|
73
|
+
});
|
|
74
|
+
exports.trackLeadAndAddressSchema = trackLeadAndAddressSchema;
|
|
75
|
+
function validateTrackLeadParams(data) {
|
|
76
|
+
return trackLeadParamsSchema.parse(data);
|
|
77
|
+
}
|
|
78
|
+
function validateAddress(data) {
|
|
79
|
+
return addressSchema.parse(data);
|
|
80
|
+
}
|
|
81
|
+
function validateTrackLeadAndAddress(lead, address) {
|
|
82
|
+
return trackLeadAndAddressSchema.parse({ lead, address });
|
|
83
|
+
}
|
|
84
|
+
function safeValidateTrackLeadParams(data) {
|
|
85
|
+
return trackLeadParamsSchema.safeParse(data);
|
|
86
|
+
}
|
|
87
|
+
function safeValidateAddress(data) {
|
|
88
|
+
return addressSchema.safeParse(data);
|
|
89
|
+
}
|
|
90
|
+
function safeValidateTrackLeadAndAddress(lead, address) {
|
|
91
|
+
return trackLeadAndAddressSchema.safeParse({ lead, address });
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":";;;AAiFA,0DAEC;AAED,0CAEC;AAED,kEAEC;AAGD,kEAEC;AAED,kDAEC;AAED,0EAEC;AArGD,6BAAwB;AAGxB,MAAM,YAAY,GAAG,OAAC,CAAC,IAAI,CAAC;IAC1B,eAAe;IACf,eAAe;IACf,SAAS;IACT,QAAQ;IACR,cAAc;IACd,OAAO;CACR,CAAC,CAAC;AA+FD,oCAAY;AA5Fd,MAAM,iBAAiB,GAAG,OAAC,CAAC,MA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C,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AAChE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aacigroup/aaci_shared",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Shared tracking utilities for AACI Group projects",
|
|
3
|
+
"version": "2.6.0",
|
|
4
|
+
"description": "Shared tracking utilities for AACI Group projects with React Context support",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -22,7 +22,10 @@
|
|
|
22
22
|
"posthog",
|
|
23
23
|
"gtm",
|
|
24
24
|
"lead-capture",
|
|
25
|
-
"error-tracking"
|
|
25
|
+
"error-tracking",
|
|
26
|
+
"react",
|
|
27
|
+
"context",
|
|
28
|
+
"hooks"
|
|
26
29
|
],
|
|
27
30
|
"author": "AACI Group",
|
|
28
31
|
"license": "ISC",
|
|
@@ -32,14 +35,25 @@
|
|
|
32
35
|
},
|
|
33
36
|
"homepage": "https://github.com/AACI-Group/aaci_shared#readme",
|
|
34
37
|
"devDependencies": {
|
|
38
|
+
"@types/react": "^19.2.0",
|
|
39
|
+
"react": "^19.2.0",
|
|
35
40
|
"typescript": "^5.9.3"
|
|
36
41
|
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"react": ">=16.8.0"
|
|
44
|
+
},
|
|
45
|
+
"peerDependenciesMeta": {
|
|
46
|
+
"react": {
|
|
47
|
+
"optional": true
|
|
48
|
+
}
|
|
49
|
+
},
|
|
37
50
|
"publishConfig": {
|
|
38
51
|
"access": "public",
|
|
39
52
|
"registry": "https://registry.npmjs.org/"
|
|
40
53
|
},
|
|
41
54
|
"dependencies": {
|
|
42
|
-
"posthog-js": "^1.274.1"
|
|
55
|
+
"posthog-js": "^1.274.1",
|
|
56
|
+
"zod": "^4.1.12"
|
|
43
57
|
},
|
|
44
58
|
"exports": {
|
|
45
59
|
".": {
|
|
@@ -47,6 +61,11 @@
|
|
|
47
61
|
"require": "./dist/index.js",
|
|
48
62
|
"types": "./dist/index.d.ts"
|
|
49
63
|
},
|
|
64
|
+
"./react": {
|
|
65
|
+
"import": "./dist/react.js",
|
|
66
|
+
"require": "./dist/react.js",
|
|
67
|
+
"types": "./dist/react.d.ts"
|
|
68
|
+
},
|
|
50
69
|
"./track/*": {
|
|
51
70
|
"import": "./dist/track/*.js",
|
|
52
71
|
"require": "./dist/track/*.js",
|