@active-reach/web-sdk 1.42.0 → 1.43.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/package.json +1 -1
- package/dist/aegis-push.min.js +0 -2
- package/dist/aegis-push.min.js.map +0 -1
- package/dist/aegis-sw.js +0 -1
- package/dist/aegis.min.js +0 -2
- package/dist/aegis.min.js.map +0 -1
- package/dist/analytics-C-Go3Pm5.mjs +0 -3509
- package/dist/analytics-C-Go3Pm5.mjs.map +0 -1
- package/dist/cdn.d.ts +0 -26
- package/dist/cdn.d.ts.map +0 -1
- package/dist/chat/AegisChat.d.ts +0 -169
- package/dist/chat/AegisChat.d.ts.map +0 -1
- package/dist/chat/index.d.ts +0 -3
- package/dist/chat/index.d.ts.map +0 -1
- package/dist/core/analytics.d.ts +0 -320
- package/dist/core/analytics.d.ts.map +0 -1
- package/dist/core/bootstrap.d.ts +0 -96
- package/dist/core/bootstrap.d.ts.map +0 -1
- package/dist/core/prefetch-bundle-client.d.ts +0 -175
- package/dist/core/prefetch-bundle-client.d.ts.map +0 -1
- package/dist/core/queue.d.ts +0 -35
- package/dist/core/queue.d.ts.map +0 -1
- package/dist/core/rate-limiter.d.ts +0 -45
- package/dist/core/rate-limiter.d.ts.map +0 -1
- package/dist/core/sdk-config-poller.d.ts +0 -59
- package/dist/core/sdk-config-poller.d.ts.map +0 -1
- package/dist/core/session.d.ts +0 -52
- package/dist/core/session.d.ts.map +0 -1
- package/dist/core/transport.d.ts +0 -50
- package/dist/core/transport.d.ts.map +0 -1
- package/dist/core/user-namespace.d.ts +0 -48
- package/dist/core/user-namespace.d.ts.map +0 -1
- package/dist/ecommerce/index.d.ts +0 -94
- package/dist/ecommerce/index.d.ts.map +0 -1
- package/dist/ecommerce/types.d.ts +0 -81
- package/dist/ecommerce/types.d.ts.map +0 -1
- package/dist/governance/bloom-filter.d.ts +0 -47
- package/dist/governance/bloom-filter.d.ts.map +0 -1
- package/dist/governance/index.d.ts +0 -8
- package/dist/governance/index.d.ts.map +0 -1
- package/dist/governance/murmur3.d.ts +0 -43
- package/dist/governance/murmur3.d.ts.map +0 -1
- package/dist/governance/name-governor.d.ts +0 -98
- package/dist/governance/name-governor.d.ts.map +0 -1
- package/dist/governance/trait-governor.d.ts +0 -63
- package/dist/governance/trait-governor.d.ts.map +0 -1
- package/dist/inapp/AegisInAppManager.d.ts +0 -888
- package/dist/inapp/AegisInAppManager.d.ts.map +0 -1
- package/dist/inapp/actions.d.ts +0 -91
- package/dist/inapp/actions.d.ts.map +0 -1
- package/dist/inapp/devicePairing.d.ts +0 -70
- package/dist/inapp/devicePairing.d.ts.map +0 -1
- package/dist/inapp/eval-throttle.d.ts +0 -33
- package/dist/inapp/eval-throttle.d.ts.map +0 -1
- package/dist/inapp/font.d.ts +0 -16
- package/dist/inapp/font.d.ts.map +0 -1
- package/dist/inapp/index.d.ts +0 -8
- package/dist/inapp/index.d.ts.map +0 -1
- package/dist/inapp/lucide-svg.d.ts +0 -46
- package/dist/inapp/lucide-svg.d.ts.map +0 -1
- package/dist/inapp/renderPreview.d.ts +0 -40
- package/dist/inapp/renderPreview.d.ts.map +0 -1
- package/dist/inapp/renderers/active-web-chat.d.ts +0 -45
- package/dist/inapp/renderers/active-web-chat.d.ts.map +0 -1
- package/dist/inapp/renderers/card-style.d.ts +0 -31
- package/dist/inapp/renderers/card-style.d.ts.map +0 -1
- package/dist/inapp/renderers/card-template.d.ts +0 -233
- package/dist/inapp/renderers/card-template.d.ts.map +0 -1
- package/dist/inapp/renderers/carousel-cards.d.ts +0 -15
- package/dist/inapp/renderers/carousel-cards.d.ts.map +0 -1
- package/dist/inapp/renderers/coachmark-tour.d.ts +0 -24
- package/dist/inapp/renderers/coachmark-tour.d.ts.map +0 -1
- package/dist/inapp/renderers/games.d.ts +0 -27
- package/dist/inapp/renderers/games.d.ts.map +0 -1
- package/dist/inapp/renderers/hero.d.ts +0 -23
- package/dist/inapp/renderers/hero.d.ts.map +0 -1
- package/dist/inapp/renderers/index.d.ts +0 -22
- package/dist/inapp/renderers/index.d.ts.map +0 -1
- package/dist/inapp/renderers/interactive-contract.d.ts +0 -48
- package/dist/inapp/renderers/interactive-contract.d.ts.map +0 -1
- package/dist/inapp/renderers/product-recommendation.d.ts +0 -37
- package/dist/inapp/renderers/product-recommendation.d.ts.map +0 -1
- package/dist/inapp/renderers/progress-bar.d.ts +0 -38
- package/dist/inapp/renderers/progress-bar.d.ts.map +0 -1
- package/dist/inapp/renderers/progress-core.d.ts +0 -80
- package/dist/inapp/renderers/progress-core.d.ts.map +0 -1
- package/dist/inapp/renderers/reviews.d.ts +0 -38
- package/dist/inapp/renderers/reviews.d.ts.map +0 -1
- package/dist/inapp/renderers/sticky-bar.d.ts +0 -14
- package/dist/inapp/renderers/sticky-bar.d.ts.map +0 -1
- package/dist/inapp/renderers/stories.d.ts +0 -31
- package/dist/inapp/renderers/stories.d.ts.map +0 -1
- package/dist/inapp/renderers/types.d.ts +0 -147
- package/dist/inapp/renderers/types.d.ts.map +0 -1
- package/dist/inapp/renderers/video.d.ts +0 -20
- package/dist/inapp/renderers/video.d.ts.map +0 -1
- package/dist/inbox/AegisInbox.d.ts +0 -106
- package/dist/inbox/AegisInbox.d.ts.map +0 -1
- package/dist/inbox/index.d.ts +0 -3
- package/dist/inbox/index.d.ts.map +0 -1
- package/dist/index.d.ts +0 -40
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -15311
- package/dist/index.js.map +0 -1
- package/dist/integrations/react.d.ts +0 -19
- package/dist/integrations/react.d.ts.map +0 -1
- package/dist/loyalty/AegisLoyaltyManager.d.ts +0 -120
- package/dist/loyalty/AegisLoyaltyManager.d.ts.map +0 -1
- package/dist/loyalty/index.d.ts +0 -3
- package/dist/loyalty/index.d.ts.map +0 -1
- package/dist/plugins/registry.d.ts +0 -13
- package/dist/plugins/registry.d.ts.map +0 -1
- package/dist/push/AegisWebPush.d.ts +0 -199
- package/dist/push/AegisWebPush.d.ts.map +0 -1
- package/dist/push/AegisWebPush.js +0 -542
- package/dist/push/AegisWebPush.js.map +0 -1
- package/dist/push/cdn-push.d.ts +0 -21
- package/dist/push/cdn-push.d.ts.map +0 -1
- package/dist/react.js +0 -70
- package/dist/react.js.map +0 -1
- package/dist/runtime/AegisMessageRuntime.d.ts +0 -276
- package/dist/runtime/AegisMessageRuntime.d.ts.map +0 -1
- package/dist/runtime/index.d.ts +0 -3
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/snippet.min.js +0 -1
- package/dist/state/intent_ledger.d.ts +0 -136
- package/dist/state/intent_ledger.d.ts.map +0 -1
- package/dist/triggers/ContactScoresFetcher.d.ts +0 -113
- package/dist/triggers/ContactScoresFetcher.d.ts.map +0 -1
- package/dist/triggers/IntentRuleEvaluator.d.ts +0 -213
- package/dist/triggers/IntentRuleEvaluator.d.ts.map +0 -1
- package/dist/triggers/IntentSnapshotCollector.d.ts +0 -83
- package/dist/triggers/IntentSnapshotCollector.d.ts.map +0 -1
- package/dist/triggers/SelectorBinder.d.ts +0 -118
- package/dist/triggers/SelectorBinder.d.ts.map +0 -1
- package/dist/triggers/TriggerEngine.d.ts +0 -296
- package/dist/triggers/TriggerEngine.d.ts.map +0 -1
- package/dist/triggers/behaviouralTriggers.d.ts +0 -44
- package/dist/triggers/behaviouralTriggers.d.ts.map +0 -1
- package/dist/triggers/index.d.ts +0 -11
- package/dist/triggers/index.d.ts.map +0 -1
- package/dist/triggers/microIntentTriggers.d.ts +0 -80
- package/dist/triggers/microIntentTriggers.d.ts.map +0 -1
- package/dist/types/config.d.ts +0 -77
- package/dist/types/config.d.ts.map +0 -1
- package/dist/types/events.d.ts +0 -147
- package/dist/types/events.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -5
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/plugin.d.ts +0 -21
- package/dist/types/plugin.d.ts.map +0 -1
- package/dist/types/type-safe-events.d.ts +0 -14
- package/dist/types/type-safe-events.d.ts.map +0 -1
- package/dist/utils/canonical-identity.d.ts +0 -29
- package/dist/utils/canonical-identity.d.ts.map +0 -1
- package/dist/utils/consent.d.ts +0 -40
- package/dist/utils/consent.d.ts.map +0 -1
- package/dist/utils/debounce.d.ts +0 -3
- package/dist/utils/debounce.d.ts.map +0 -1
- package/dist/utils/device.d.ts +0 -6
- package/dist/utils/device.d.ts.map +0 -1
- package/dist/utils/identity.d.ts +0 -27
- package/dist/utils/identity.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -7
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/logger.d.ts +0 -15
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/meta-cookies.d.ts +0 -65
- package/dist/utils/meta-cookies.d.ts.map +0 -1
- package/dist/utils/redact-url.d.ts +0 -56
- package/dist/utils/redact-url.d.ts.map +0 -1
- package/dist/utils/storage.d.ts +0 -20
- package/dist/utils/storage.d.ts.map +0 -1
- package/dist/utils/url-parser.d.ts +0 -61
- package/dist/utils/url-parser.d.ts.map +0 -1
- package/dist/utils/uuid.d.ts +0 -4
- package/dist/utils/uuid.d.ts.map +0 -1
- package/dist/utils/visitor.d.ts +0 -43
- package/dist/utils/visitor.d.ts.map +0 -1
- package/dist/widgets/AegisWidgetManager.d.ts +0 -209
- package/dist/widgets/AegisWidgetManager.d.ts.map +0 -1
- package/dist/widgets/index.d.ts +0 -3
- package/dist/widgets/index.d.ts.map +0 -1
package/dist/types/events.d.ts
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
export type EventType = 'track' | 'identify' | 'page' | 'group' | 'alias' | 'screen';
|
|
2
|
-
export interface EventContext {
|
|
3
|
-
library: {
|
|
4
|
-
name: string;
|
|
5
|
-
version: string;
|
|
6
|
-
};
|
|
7
|
-
page: {
|
|
8
|
-
path: string;
|
|
9
|
-
referrer: string;
|
|
10
|
-
search: string;
|
|
11
|
-
title: string;
|
|
12
|
-
url: string;
|
|
13
|
-
hash: string;
|
|
14
|
-
};
|
|
15
|
-
userAgent: string;
|
|
16
|
-
locale: string;
|
|
17
|
-
timezone: string;
|
|
18
|
-
screen: {
|
|
19
|
-
width: number;
|
|
20
|
-
height: number;
|
|
21
|
-
density: number;
|
|
22
|
-
};
|
|
23
|
-
viewport: {
|
|
24
|
-
width: number;
|
|
25
|
-
height: number;
|
|
26
|
-
};
|
|
27
|
-
campaign?: {
|
|
28
|
-
source?: string;
|
|
29
|
-
medium?: string;
|
|
30
|
-
campaign?: string;
|
|
31
|
-
term?: string;
|
|
32
|
-
content?: string;
|
|
33
|
-
name?: string;
|
|
34
|
-
};
|
|
35
|
-
network?: {
|
|
36
|
-
effectiveType?: string;
|
|
37
|
-
downlink?: number;
|
|
38
|
-
rtt?: number;
|
|
39
|
-
};
|
|
40
|
-
device?: {
|
|
41
|
-
type: 'desktop' | 'mobile' | 'tablet';
|
|
42
|
-
vendor?: string;
|
|
43
|
-
model?: string;
|
|
44
|
-
};
|
|
45
|
-
os?: {
|
|
46
|
-
name: string;
|
|
47
|
-
version: string;
|
|
48
|
-
};
|
|
49
|
-
browser?: {
|
|
50
|
-
name: string;
|
|
51
|
-
version: string;
|
|
52
|
-
};
|
|
53
|
-
cell?: {
|
|
54
|
-
region: string;
|
|
55
|
-
endpoint: string;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
export interface BaseEvent {
|
|
59
|
-
type: EventType;
|
|
60
|
-
messageId: string;
|
|
61
|
-
timestamp: string;
|
|
62
|
-
anonymousId: string;
|
|
63
|
-
userId?: string;
|
|
64
|
-
sessionId: string;
|
|
65
|
-
/**
|
|
66
|
-
* Brand-tenant identifier. Under the post-2026-05-26 hierarchy
|
|
67
|
-
* (workspace = brand-tenant, location = outlet), this is the BRAND
|
|
68
|
-
* dimension. Use `location_id` for the outlet (within-brand)
|
|
69
|
-
* dimension. The two are independent — both can be set on the
|
|
70
|
-
* same event.
|
|
71
|
-
*/
|
|
72
|
-
workspace_id?: string | null;
|
|
73
|
-
/**
|
|
74
|
-
* P15.1 — outlet identifier (location within a brand). Stamped by
|
|
75
|
-
* the SDK when the storefront has resolved an active outlet via
|
|
76
|
-
* `aegis.setLocation(location_id)` OR when the SDK detects the
|
|
77
|
-
* outlet code from the URL path segment (`{brand}.actii.me/{outlet}/...`)
|
|
78
|
-
* and the bootstrap response surfaces a `locationCodes` allowlist.
|
|
79
|
-
*
|
|
80
|
-
* Independent of workspace_id — both can be set simultaneously on
|
|
81
|
-
* the same event. Required for per-outlet attribution on events
|
|
82
|
-
* consumed by analytics, journey triggers, and the activation
|
|
83
|
-
* matrix UI.
|
|
84
|
-
*/
|
|
85
|
-
location_id?: string | null;
|
|
86
|
-
context: EventContext;
|
|
87
|
-
integrations?: Record<string, boolean>;
|
|
88
|
-
}
|
|
89
|
-
export interface TrackEvent extends BaseEvent {
|
|
90
|
-
type: 'track';
|
|
91
|
-
event: string;
|
|
92
|
-
properties?: Record<string, any>;
|
|
93
|
-
}
|
|
94
|
-
export interface IdentifyEvent extends BaseEvent {
|
|
95
|
-
type: 'identify';
|
|
96
|
-
traits?: Record<string, any>;
|
|
97
|
-
}
|
|
98
|
-
export interface PageEvent extends BaseEvent {
|
|
99
|
-
type: 'page';
|
|
100
|
-
name?: string;
|
|
101
|
-
category?: string;
|
|
102
|
-
properties?: Record<string, any>;
|
|
103
|
-
}
|
|
104
|
-
export interface GroupEvent extends BaseEvent {
|
|
105
|
-
type: 'group';
|
|
106
|
-
groupId: string;
|
|
107
|
-
traits?: Record<string, any>;
|
|
108
|
-
}
|
|
109
|
-
export interface AliasEvent extends BaseEvent {
|
|
110
|
-
type: 'alias';
|
|
111
|
-
previousId: string;
|
|
112
|
-
}
|
|
113
|
-
export interface ScreenEvent extends BaseEvent {
|
|
114
|
-
type: 'screen';
|
|
115
|
-
name: string;
|
|
116
|
-
properties?: Record<string, any>;
|
|
117
|
-
}
|
|
118
|
-
export type AegisEvent = TrackEvent | IdentifyEvent | PageEvent | GroupEvent | AliasEvent | ScreenEvent;
|
|
119
|
-
export interface BatchPayload {
|
|
120
|
-
batch: AegisEvent[];
|
|
121
|
-
sentAt: string;
|
|
122
|
-
writeKey: string;
|
|
123
|
-
context?: {
|
|
124
|
-
cell?: {
|
|
125
|
-
region: string;
|
|
126
|
-
endpoint: string;
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
export interface EventResponse {
|
|
131
|
-
success: boolean;
|
|
132
|
-
messageId?: string;
|
|
133
|
-
error?: {
|
|
134
|
-
code: string;
|
|
135
|
-
message: string;
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
export interface BatchResponse {
|
|
139
|
-
success: boolean;
|
|
140
|
-
processedCount: number;
|
|
141
|
-
failedCount: number;
|
|
142
|
-
errors?: Array<{
|
|
143
|
-
messageId: string;
|
|
144
|
-
error: string;
|
|
145
|
-
}>;
|
|
146
|
-
}
|
|
147
|
-
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/types/events.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;AAErF,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAA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AW,CAAC;AAEhB,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE;YACL,MAAM,EAAE,MAAM,CAAC;YACf,QAAQ,EAAE,MAAM,CAAC;SAClB,CAAC;KACH,CAAC;CACH;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;CACJ"}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC"}
|
package/dist/types/plugin.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { AegisEvent } from './events';
|
|
2
|
-
import { AegisConfigInternal } from './config';
|
|
3
|
-
export interface Plugin {
|
|
4
|
-
name: string;
|
|
5
|
-
version: string;
|
|
6
|
-
init?(config: AegisConfigInternal): void | Promise<void>;
|
|
7
|
-
beforeEventCapture?(event: AegisEvent): AegisEvent | null;
|
|
8
|
-
afterEventCapture?(event: AegisEvent): void;
|
|
9
|
-
beforeBatchSend?(events: AegisEvent[]): AegisEvent[];
|
|
10
|
-
afterBatchSend?(success: boolean, events: AegisEvent[]): void;
|
|
11
|
-
onError?(error: Error, context?: any): void;
|
|
12
|
-
destroy?(): void;
|
|
13
|
-
}
|
|
14
|
-
export interface PluginRegistry {
|
|
15
|
-
register(plugin: Plugin): void;
|
|
16
|
-
unregister(pluginName: string): void;
|
|
17
|
-
get(pluginName: string): Plugin | undefined;
|
|
18
|
-
getAll(): Plugin[];
|
|
19
|
-
executeHook<T>(hookName: keyof Plugin, ...args: any[]): T | Promise<T>;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/types/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAEhB,IAAI,CAAC,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzD,kBAAkB,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,CAAC;IAE1D,iBAAiB,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IAE5C,eAAe,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,UAAU,EAAE,CAAC;IAErD,cAAc,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAE9D,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;IAE5C,OAAO,CAAC,IAAI,IAAI,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC5C,MAAM,IAAI,MAAM,EAAE,CAAC;IACnB,WAAW,CAAC,CAAC,EACX,QAAQ,EAAE,MAAM,MAAM,EACtB,GAAG,IAAI,EAAE,GAAG,EAAE,GACb,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACnB"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface TrackEventProperties {
|
|
2
|
-
[eventName: string]: Record<string, any>;
|
|
3
|
-
}
|
|
4
|
-
export interface IdentifyTraits extends Record<string, any> {
|
|
5
|
-
}
|
|
6
|
-
export interface PageProperties extends Record<string, any> {
|
|
7
|
-
}
|
|
8
|
-
export interface GroupTraits extends Record<string, any> {
|
|
9
|
-
}
|
|
10
|
-
export type TypeSafeTrack<T extends TrackEventProperties = TrackEventProperties> = <K extends keyof T>(eventName: K, properties?: T[K]) => void;
|
|
11
|
-
export type TypeSafeIdentify = (userId: string, traits?: IdentifyTraits) => void;
|
|
12
|
-
export type TypeSafePage = (name?: string, properties?: PageProperties) => void;
|
|
13
|
-
export type TypeSafeGroup = (groupId: string, traits?: GroupTraits) => void;
|
|
14
|
-
//# sourceMappingURL=type-safe-events.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type-safe-events.d.ts","sourceRoot":"","sources":["../../src/types/type-safe-events.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,cAAe,SAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAAG;AAE9D,MAAM,WAAW,cAAe,SAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAAG;AAE9D,MAAM,WAAW,WAAY,SAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAAG;AAE3D,MAAM,MAAM,aAAa,CACvB,CAAC,SAAS,oBAAoB,GAAG,oBAAoB,IACnD,CAAC,CAAC,SAAS,MAAM,CAAC,EACpB,SAAS,EAAE,CAAC,EACZ,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KACd,IAAI,CAAC;AAEV,MAAM,MAAM,gBAAgB,GAAG,CAC7B,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,cAAc,KACpB,IAAI,CAAC;AAEV,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,CAAC,EAAE,MAAM,EACb,UAAU,CAAC,EAAE,cAAc,KACxB,IAAI,CAAC;AAEV,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,WAAW,KACjB,IAAI,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export interface CanonicalIdentity {
|
|
2
|
-
status: 'identified' | 'anonymous' | 'pseudonymous';
|
|
3
|
-
has_pii: boolean;
|
|
4
|
-
classification_reason: 'producer_pii' | 'producer_anonymous' | 'fallback';
|
|
5
|
-
evidence: {
|
|
6
|
-
email?: string;
|
|
7
|
-
phone?: string;
|
|
8
|
-
user_id?: string;
|
|
9
|
-
customer_id?: string;
|
|
10
|
-
};
|
|
11
|
-
anonymous_ids: {
|
|
12
|
-
cookie_id?: string;
|
|
13
|
-
session_id?: string;
|
|
14
|
-
device_id?: string;
|
|
15
|
-
fingerprint_id?: string;
|
|
16
|
-
};
|
|
17
|
-
resolution_source: 'producer';
|
|
18
|
-
}
|
|
19
|
-
export declare function buildCanonicalIdentity(params: {
|
|
20
|
-
email?: string;
|
|
21
|
-
phone?: string;
|
|
22
|
-
user_id?: string;
|
|
23
|
-
customer_id?: string;
|
|
24
|
-
cookie_id?: string;
|
|
25
|
-
session_id?: string;
|
|
26
|
-
device_id?: string;
|
|
27
|
-
fingerprint_id?: string;
|
|
28
|
-
}): CanonicalIdentity;
|
|
29
|
-
//# sourceMappingURL=canonical-identity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"canonical-identity.d.ts","sourceRoot":"","sources":["../../src/utils/canonical-identity.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,YAAY,GAAG,WAAW,GAAG,cAAc,CAAC;IACpD,OAAO,EAAE,OAAO,CAAC;IACjB,qBAAqB,EAAE,cAAc,GAAG,oBAAoB,GAAG,UAAU,CAAC;IAC1E,QAAQ,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,aAAa,EAAE;QACb,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,iBAAiB,EAAE,UAAU,CAAC;CAC/B;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,iBAAiB,CAiDpB"}
|
package/dist/utils/consent.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Storage } from './storage';
|
|
2
|
-
export type ConsentCategory = 'analytics' | 'marketing' | 'functional' | 'necessary';
|
|
3
|
-
export interface ConsentPreferences {
|
|
4
|
-
analytics: boolean;
|
|
5
|
-
marketing: boolean;
|
|
6
|
-
functional: boolean;
|
|
7
|
-
necessary: boolean;
|
|
8
|
-
}
|
|
9
|
-
export type ConsentStatus = 'granted' | 'denied' | 'pending';
|
|
10
|
-
export interface ConsentManagerConfig {
|
|
11
|
-
defaultConsent?: Partial<ConsentPreferences>;
|
|
12
|
-
waitForConsent?: boolean;
|
|
13
|
-
consentStorageKey?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare class ConsentManager {
|
|
16
|
-
private storage;
|
|
17
|
-
private config;
|
|
18
|
-
private preferences;
|
|
19
|
-
private listeners;
|
|
20
|
-
constructor(storage: Storage, config?: ConsentManagerConfig);
|
|
21
|
-
private loadPreferences;
|
|
22
|
-
private getDefaultPreferences;
|
|
23
|
-
private mergeWithDefaults;
|
|
24
|
-
private savePreferences;
|
|
25
|
-
setConsent(preferences: Partial<ConsentPreferences>): void;
|
|
26
|
-
grantAll(): void;
|
|
27
|
-
denyAll(): void;
|
|
28
|
-
hasConsent(category: ConsentCategory): boolean;
|
|
29
|
-
getPreferences(): ConsentPreferences;
|
|
30
|
-
getStatus(category: ConsentCategory): ConsentStatus;
|
|
31
|
-
isAnalyticsEnabled(): boolean;
|
|
32
|
-
isMarketingEnabled(): boolean;
|
|
33
|
-
onChange(callback: (preferences: ConsentPreferences) => void): () => void;
|
|
34
|
-
private notifyListeners;
|
|
35
|
-
reset(): void;
|
|
36
|
-
integrateOneTrust(): void;
|
|
37
|
-
integrateCookiebot(): void;
|
|
38
|
-
integrateGoogleConsentMode(): void;
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=consent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"consent.d.ts","sourceRoot":"","sources":["../../src/utils/consent.ts"],"names":[],"mappings":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IAUvB,KAAK,IAAI,IAAI;IAOb,iBAAiB,IAAI,IAAI;IAmCzB,kBAAkB,IAAI,IAAI;IA8B1B,0BAA0B,IAAI,IAAI;CA2CnC"}
|
package/dist/utils/debounce.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare function debounce<T extends (...args: any[]) => any>(func: T, wait: number): (...args: Parameters<T>) => void;
|
|
2
|
-
export declare function throttle<T extends (...args: any[]) => any>(func: T, limit: number): (...args: Parameters<T>) => void;
|
|
3
|
-
//# sourceMappingURL=debounce.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../src/utils/debounce.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACxD,IAAI,EAAE,CAAC,EACP,IAAI,EAAE,MAAM,GACX,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAalC;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACxD,IAAI,EAAE,CAAC,EACP,KAAK,EAAE,MAAM,GACZ,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAYlC"}
|
package/dist/utils/device.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { EventContext } from '../types/events';
|
|
2
|
-
import { AegisConfigInternal } from '../types/config';
|
|
3
|
-
import type { SessionManager } from '../core/session';
|
|
4
|
-
export declare function buildContext(config: AegisConfigInternal, session?: SessionManager): EventContext;
|
|
5
|
-
export declare function isBot(): boolean;
|
|
6
|
-
//# sourceMappingURL=device.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../src/utils/device.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,wBAAgB,YAAY,CAAC,MAAM,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,YAAY,CAwDhG;AAwGD,wBAAgB,KAAK,IAAI,OAAO,CAyB/B"}
|
package/dist/utils/identity.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Storage } from './storage';
|
|
2
|
-
export interface IdentityState {
|
|
3
|
-
anonymousId: string;
|
|
4
|
-
userId: string | null;
|
|
5
|
-
traits: Record<string, any>;
|
|
6
|
-
}
|
|
7
|
-
export declare class Identity {
|
|
8
|
-
private storage;
|
|
9
|
-
private anonymousId;
|
|
10
|
-
private userId;
|
|
11
|
-
private traits;
|
|
12
|
-
constructor(storage: Storage);
|
|
13
|
-
private getOrCreateAnonymousId;
|
|
14
|
-
private loadUserIdentity;
|
|
15
|
-
getAnonymousId(): string;
|
|
16
|
-
setUserId(userId: string, traits?: Record<string, any>): void;
|
|
17
|
-
getUserId(): string | null;
|
|
18
|
-
setTraits(traits: Record<string, any>): void;
|
|
19
|
-
getTraits(): Record<string, any>;
|
|
20
|
-
reset(): void;
|
|
21
|
-
alias(newUserId: string): {
|
|
22
|
-
previousId: string;
|
|
23
|
-
newUserId: string;
|
|
24
|
-
};
|
|
25
|
-
getState(): IdentityState;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=identity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../src/utils/identity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B;AAED,qBAAa,QAAQ;IACnB,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,MAAM,CAA2B;gBAE7B,OAAO,EAAE,OAAO;IAM5B,OAAO,CAAC,sBAAsB;IAc9B,OAAO,CAAC,gBAAgB;IAoBxB,cAAc,IAAI,MAAM;IAIxB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IAU7D,SAAS,IAAI,MAAM,GAAG,IAAI;IAI1B,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IAM5C,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAIhC,KAAK,IAAI,IAAI;IAYb,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE;IAUnE,QAAQ,IAAI,aAAa;CAO1B"}
|
package/dist/utils/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
|
package/dist/utils/logger.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
2
|
-
declare class Logger {
|
|
3
|
-
private enabled;
|
|
4
|
-
private prefix;
|
|
5
|
-
enable(): void;
|
|
6
|
-
disable(): void;
|
|
7
|
-
isEnabled(): boolean;
|
|
8
|
-
debug(message: string, ...args: any[]): void;
|
|
9
|
-
info(message: string, ...args: any[]): void;
|
|
10
|
-
warn(message: string, ...args: any[]): void;
|
|
11
|
-
error(message: string, ...args: any[]): void;
|
|
12
|
-
}
|
|
13
|
-
export declare const logger: Logger;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D,cAAM,MAAM;IACV,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,MAAM,CAAgC;IAE9C,MAAM,IAAI,IAAI;IAId,OAAO,IAAI,IAAI;IAIf,SAAS,IAAI,OAAO;IAIpB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAK5C,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAK3C,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAI3C,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;CAG7C;AAED,eAAO,MAAM,MAAM,QAAe,CAAC"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Meta Pixel companion cookies (_fbp, _fbc) — B1.2 of META_CAPI_PHASE1_TRACKER.
|
|
3
|
-
*
|
|
4
|
-
* We do NOT fire `fbq()` browser-side. We write the cookies Meta uses to
|
|
5
|
-
* identify the same browser so server-side CAPI events (forwarded from
|
|
6
|
-
* `meta_conversions_api_service.py`) carry the high-EMQ match keys
|
|
7
|
-
* (fbp + fbc) without the cost of running a full Meta Pixel.
|
|
8
|
-
*
|
|
9
|
-
* Cookie spec (Meta docs, verified May 2026):
|
|
10
|
-
* _fbp = fb.<subdomain_index>.<creation_ms>.<random>
|
|
11
|
-
* _fbc = fb.<subdomain_index>.<click_ms>.<fbclid>
|
|
12
|
-
* subdomain_index = number of dots in cookie domain
|
|
13
|
-
* (example.com → 1, sub.example.com → 2)
|
|
14
|
-
* random = 10-digit random integer
|
|
15
|
-
* Lifetime: 90 days (Meta's default; longer doesn't increase EMQ)
|
|
16
|
-
*
|
|
17
|
-
* Reasoning for raw document.cookie writes (instead of utils/storage.ts):
|
|
18
|
-
* The Storage helper prefixes every key with `aegis_` so writes go to
|
|
19
|
-
* `aegis__fbp` / `aegis__fbc`. Meta only honors the exact names
|
|
20
|
-
* `_fbp` and `_fbc`. We bypass the helper and write directly.
|
|
21
|
-
*
|
|
22
|
-
* Domain scope: written to the eTLD+1 (root domain) so a tenant who
|
|
23
|
-
* later wires their own Meta Pixel via GTM sees the same cookies a
|
|
24
|
-
* subdomain-rooted set would not.
|
|
25
|
-
*
|
|
26
|
-
* SSR-safe: every helper is no-op when `document` / `window` are
|
|
27
|
-
* undefined. Callers don't need to guard.
|
|
28
|
-
*/
|
|
29
|
-
export interface MetaCookies {
|
|
30
|
-
fbp: string | null;
|
|
31
|
-
fbc: string | null;
|
|
32
|
-
fbclid: string | null;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Read `_fbp` from cookies, write a fresh one if absent.
|
|
36
|
-
* Returns the resulting `_fbp` value or null if cookies unavailable.
|
|
37
|
-
*/
|
|
38
|
-
export declare function ensureFbp(): string | null;
|
|
39
|
-
/**
|
|
40
|
-
* Read `_fbc` from cookies. If absent and the URL carries `fbclid`, write
|
|
41
|
-
* a fresh `_fbc` per Meta's spec. Returns the resulting value or null.
|
|
42
|
-
*
|
|
43
|
-
* Note: `_fbc` has no value to write without an `fbclid` source — unlike
|
|
44
|
-
* `_fbp` which is browser-identity-only and can be self-generated.
|
|
45
|
-
*/
|
|
46
|
-
export declare function ensureFbc(): string | null;
|
|
47
|
-
/** Pull `fbclid` from `?fbclid=...` query string. Null if absent or SSR. */
|
|
48
|
-
export declare function readFbclidFromUrl(): string | null;
|
|
49
|
-
/**
|
|
50
|
-
* Single call that returns `{fbp, fbc, fbclid}` for injection into every
|
|
51
|
-
* event's `properties` (which lands in ClickHouse `in_app_events.metadata`,
|
|
52
|
-
* which the cell-side CAPI service reads directly).
|
|
53
|
-
*
|
|
54
|
-
* Side effects: ensures both cookies are present before returning. Idempotent
|
|
55
|
-
* — safe to call on every event capture.
|
|
56
|
-
*/
|
|
57
|
-
export declare function captureMetaCookies(): MetaCookies;
|
|
58
|
-
/**
|
|
59
|
-
* A copy of `event` safe to hand to a logger: `properties.fbc` / `properties.fbp`
|
|
60
|
-
* masked. They are Meta cookie values — match keys for CAPI only, and must
|
|
61
|
-
* stay out of every log line (ACS tracking tracker §V.3). The event itself is
|
|
62
|
-
* never mutated; only the logged copy is.
|
|
63
|
-
*/
|
|
64
|
-
export declare function redactMetaCookies<T>(event: T): T;
|
|
65
|
-
//# sourceMappingURL=meta-cookies.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta-cookies.d.ts","sourceRoot":"","sources":["../../src/utils/meta-cookies.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAMH,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AA8ED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,MAAM,GAAG,IAAI,CAMzC;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,IAAI,MAAM,GAAG,IAAI,CAQzC;AAED,4EAA4E;AAC5E,wBAAgB,iBAAiB,IAAI,MAAM,GAAG,IAAI,CAOjD;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,WAAW,CAMhD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAOhD"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* URL credential redaction — the browser-SDK layer (Aman 2026-09-13).
|
|
3
|
-
*
|
|
4
|
-
* A landing URL can carry a credential: `k` (one order's view key), `t` (the
|
|
5
|
-
* server-verified landing token), `code` / `session_code` (claim codes),
|
|
6
|
-
* `aegis_pair` (a device-pairing code) and `u` (a contact token). The SDK must
|
|
7
|
-
* never SEND one of those values — not in a page object, an event property, a
|
|
8
|
-
* beacon or a query string to our own API. What it sends instead is the key
|
|
9
|
-
* with its value replaced by `REDACTED`, so the shape of the URL (and the fact
|
|
10
|
-
* that a credential was present) survives while the secret does not.
|
|
11
|
-
*
|
|
12
|
-
* The server twin is `libs/data-governance/data_governance/credential_params.py`
|
|
13
|
-
* (`CREDENTIAL_URL_PARAMS`, `REDACTED`). The two lists MUST stay identical; a
|
|
14
|
-
* parity guard compares them. Change both in the same commit or neither.
|
|
15
|
-
*
|
|
16
|
-
* Deliberately NOT in the list: `aegis_code`. It is the attribution join key
|
|
17
|
-
* (the short link's own code), not a credential — redacting it would sever
|
|
18
|
-
* the link from the order it brought in.
|
|
19
|
-
*
|
|
20
|
-
* Reading is untouched. The SDK's own inbound param readers (`aegis_code`,
|
|
21
|
-
* gclid / fbclid, utm, `aegis_pair` for pairing) still read `location.search`
|
|
22
|
-
* directly; only what leaves the browser is redacted.
|
|
23
|
-
*
|
|
24
|
-
* Why a targeted regex and not `new URL()`: a URL round-trip re-encodes and
|
|
25
|
-
* reorders the rest of the string, so the value we send would no longer be
|
|
26
|
-
* the page the visitor was on. The regex touches only the credential values.
|
|
27
|
-
*
|
|
28
|
-
* What it does not see: a percent-encoded key (`%6B=` for `k`), a `;`
|
|
29
|
-
* separator, or a key whose case differs (`K=`). The server list has the same
|
|
30
|
-
* shape, so both layers agree on what counts as a match.
|
|
31
|
-
*/
|
|
32
|
-
export declare const CREDENTIAL_URL_PARAMS: readonly ["t", "k", "code", "session_code", "aegis_pair", "u", "carrier_token"];
|
|
33
|
-
export declare const REDACTED = "REDACTED";
|
|
34
|
-
/**
|
|
35
|
-
* Replace the value of every credential query param with `REDACTED`.
|
|
36
|
-
* Idempotent, fragment-preserving, and it never throws: input it cannot
|
|
37
|
-
* handle is returned unchanged.
|
|
38
|
-
*/
|
|
39
|
-
export declare function redactUrl(value: string): string;
|
|
40
|
-
/**
|
|
41
|
-
* Walk plain objects / arrays and apply `redactUrl` to every string — the TS
|
|
42
|
-
* twin of the server's `redact_credentials_deep` (same depth cap, 12).
|
|
43
|
-
*
|
|
44
|
-
* Added for the SERVER consumers of `channel.delivery.status_{cell}` (BK-87,
|
|
45
|
-
* 2026-09-13): that topic is a dual-route that never passes the governance
|
|
46
|
-
* engine, and its click/receipt payloads carry URLs (`metadata.original_url`,
|
|
47
|
-
* `referrer`, provider echoes). analytics-consumer and event-ingress's
|
|
48
|
-
* delivery-status bridge import THIS module by relative path, so there is one
|
|
49
|
-
* TS rule, not a copy. Redacting per string value (before serialisation) keeps
|
|
50
|
-
* JSON valid even when a value itself holds escaped JSON.
|
|
51
|
-
*
|
|
52
|
-
* Only plain objects and arrays are walked; anything else (Date, Buffer, class
|
|
53
|
-
* instances) is returned as is.
|
|
54
|
-
*/
|
|
55
|
-
export declare function redactCredentialsDeep<T>(value: T, depth?: number): T;
|
|
56
|
-
//# sourceMappingURL=redact-url.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"redact-url.d.ts","sourceRoot":"","sources":["../../src/utils/redact-url.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,eAAO,MAAM,qBAAqB,iFAWxB,CAAC;AAEX,eAAO,MAAM,QAAQ,aAAa,CAAC;AAenC;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAO/C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,SAAI,GAAG,CAAC,CAc/D"}
|
package/dist/utils/storage.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export interface StorageOptions {
|
|
2
|
-
cookieDomain?: string | null;
|
|
3
|
-
secureCookie?: boolean;
|
|
4
|
-
crossDomain?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare class Storage {
|
|
7
|
-
private useLocalStorage;
|
|
8
|
-
private options;
|
|
9
|
-
constructor(options?: StorageOptions);
|
|
10
|
-
private isLocalStorageAvailable;
|
|
11
|
-
set(key: string, value: string, expiryDays?: number): void;
|
|
12
|
-
get(key: string): string | null;
|
|
13
|
-
remove(key: string): void;
|
|
14
|
-
clear(): void;
|
|
15
|
-
private setCookie;
|
|
16
|
-
private getCookie;
|
|
17
|
-
private deleteCookie;
|
|
18
|
-
private getRootDomain;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/utils/storage.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,qBAAa,OAAO;IAClB,OAAO,CAAC,eAAe,CAAU;IACjC,OAAO,CAAC,OAAO,CAAiB;gBAEpB,OAAO,GAAE,cAAmB;IAKxC,OAAO,CAAC,uBAAuB;IAW/B,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,GAAE,MAAY,GAAG,IAAI;IAkB/D,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAsB/B,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAczB,KAAK,IAAI,IAAI;IAuBb,OAAO,CAAC,SAAS;IA6BjB,OAAO,CAAC,SAAS;IAqBjB,OAAO,CAAC,YAAY;IAmBpB,OAAO,CAAC,aAAa;CAwBtB"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
export interface UTMParams {
|
|
2
|
-
source?: string;
|
|
3
|
-
medium?: string;
|
|
4
|
-
campaign?: string;
|
|
5
|
-
term?: string;
|
|
6
|
-
content?: string;
|
|
7
|
-
name?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function parseUTMParameters(url?: string): UTMParams;
|
|
10
|
-
export declare function parseQueryParameters(url?: string): Record<string, string>;
|
|
11
|
-
/**
|
|
12
|
-
* The page's URL for REPORTING — so it is credential-redacted (`redactUrl`),
|
|
13
|
-
* the canonical `<link>` included. No caller in the SDK today; redacted so a
|
|
14
|
-
* future one cannot send a raw `?k=` / `?t=` by reaching for this helper.
|
|
15
|
-
*/
|
|
16
|
-
export declare function getCanonicalURL(): string;
|
|
17
|
-
export declare function stripQueryParameters(url: string): string;
|
|
18
|
-
export interface AdClickIDs {
|
|
19
|
-
gclid?: string;
|
|
20
|
-
/** Google click id for iOS app→web traffic (Apple ATT). NOT a gclid. */
|
|
21
|
-
gbraid?: string;
|
|
22
|
-
/** Google click id for iOS web→app traffic (Apple ATT). NOT a gclid. */
|
|
23
|
-
wbraid?: string;
|
|
24
|
-
fbclid?: string;
|
|
25
|
-
msclkid?: string;
|
|
26
|
-
ctwa_clid?: string;
|
|
27
|
-
ttclid?: string;
|
|
28
|
-
li_fat_id?: string;
|
|
29
|
-
}
|
|
30
|
-
export declare function parseAdClickIDs(url?: string): AdClickIDs;
|
|
31
|
-
export declare function hasAdClickIDs(adClickIDs: AdClickIDs): boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Which Aegis send brought the visitor — the `aegis_*` params the short-link
|
|
34
|
-
* redirect stamps from the LINK row (`link_shortener` `aegis_params`).
|
|
35
|
-
*
|
|
36
|
-
* `aegis_code` is the join key (the short link's own code); the send is then
|
|
37
|
-
* `aegis_campaign` (campaign sends only) OR `aegis_journey` (journey sends —
|
|
38
|
-
* order confirmation, delivery, win-back). Present only when the link row has
|
|
39
|
-
* a value, so never assume `aegis_campaign` exists.
|
|
40
|
-
*
|
|
41
|
-
* Deliberately NOT read here:
|
|
42
|
-
* - `utm_*` — the tenant's own / third-party analytics; never identifies an
|
|
43
|
-
* Aegis send (a tenant-set utm can sit on our own link).
|
|
44
|
-
* - `k` — a credential for ONE order. Never read, copied or logged.
|
|
45
|
-
* - `t` — server-verified landing token; never parsed client-side.
|
|
46
|
-
* - `u` — consumed at the redirect, never forwarded.
|
|
47
|
-
*/
|
|
48
|
-
export interface LinkAttribution {
|
|
49
|
-
aegis_code?: string;
|
|
50
|
-
aegis_campaign?: string;
|
|
51
|
-
aegis_journey?: string;
|
|
52
|
-
aegis_playbook?: string;
|
|
53
|
-
aegis_button?: string;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Parse the landing URL's Aegis link attribution. Returns `{}` unless
|
|
57
|
-
* `aegis_code` is present — the rest of the set only means something as the
|
|
58
|
-
* attributes OF that code.
|
|
59
|
-
*/
|
|
60
|
-
export declare function parseLinkAttribution(url?: string): LinkAttribution;
|
|
61
|
-
//# sourceMappingURL=url-parser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"url-parser.d.ts","sourceRoot":"","sources":["../../src/utils/url-parser.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;I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Ae,CAoBlE"}
|
package/dist/utils/uuid.d.ts
DELETED
package/dist/utils/uuid.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../src/utils/uuid.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,IAAI,MAAM,CAUrC;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C"}
|