@tagadapay/headless-sdk 1.14.1 → 1.17.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.
Files changed (201) hide show
  1. package/dist/core/client.d.ts +12 -0
  2. package/dist/core/client.d.ts.map +1 -1
  3. package/dist/core/client.js +16 -4
  4. package/dist/core/client.js.map +1 -1
  5. package/dist/core/http.d.ts +2 -0
  6. package/dist/core/http.d.ts.map +1 -1
  7. package/dist/core/http.js +21 -5
  8. package/dist/core/http.js.map +1 -1
  9. package/dist/core/index.d.ts +7 -1
  10. package/dist/core/index.d.ts.map +1 -1
  11. package/dist/core/index.js +3 -0
  12. package/dist/core/index.js.map +1 -1
  13. package/dist/core/modules/checkout.d.ts +5 -1
  14. package/dist/core/modules/checkout.d.ts.map +1 -1
  15. package/dist/core/modules/checkout.js +22 -1
  16. package/dist/core/modules/checkout.js.map +1 -1
  17. package/dist/core/modules/commerce.d.ts +4 -0
  18. package/dist/core/modules/commerce.d.ts.map +1 -0
  19. package/dist/core/modules/commerce.js +5 -0
  20. package/dist/core/modules/commerce.js.map +1 -0
  21. package/dist/core/modules/customer.d.ts +47 -1
  22. package/dist/core/modules/customer.d.ts.map +1 -1
  23. package/dist/core/modules/customer.js +60 -3
  24. package/dist/core/modules/customer.js.map +1 -1
  25. package/dist/core/modules/experiments.d.ts +21 -0
  26. package/dist/core/modules/experiments.d.ts.map +1 -0
  27. package/dist/core/modules/experiments.js +85 -0
  28. package/dist/core/modules/experiments.js.map +1 -0
  29. package/dist/core/modules/funnel.d.ts +2 -1
  30. package/dist/core/modules/funnel.d.ts.map +1 -1
  31. package/dist/core/modules/funnel.js +6 -1
  32. package/dist/core/modules/funnel.js.map +1 -1
  33. package/dist/core/modules/lazyCommerce.d.ts +16 -0
  34. package/dist/core/modules/lazyCommerce.d.ts.map +1 -0
  35. package/dist/core/modules/lazyCommerce.js +20 -0
  36. package/dist/core/modules/lazyCommerce.js.map +1 -0
  37. package/dist/core/modules/offers.d.ts +30 -5
  38. package/dist/core/modules/offers.d.ts.map +1 -1
  39. package/dist/core/modules/offers.js +66 -7
  40. package/dist/core/modules/offers.js.map +1 -1
  41. package/dist/core/modules/payment.d.ts +19 -1
  42. package/dist/core/modules/payment.d.ts.map +1 -1
  43. package/dist/core/modules/payment.js +42 -3
  44. package/dist/core/modules/payment.js.map +1 -1
  45. package/dist/core/modules/portal/index.d.ts +102 -0
  46. package/dist/core/modules/portal/index.d.ts.map +1 -0
  47. package/dist/core/modules/portal/index.js +166 -0
  48. package/dist/core/modules/portal/index.js.map +1 -0
  49. package/dist/core/modules/portal/types.d.ts +617 -0
  50. package/dist/core/modules/portal/types.d.ts.map +1 -0
  51. package/dist/core/modules/portal/types.js +11 -0
  52. package/dist/core/modules/portal/types.js.map +1 -0
  53. package/dist/core/modules/rx.d.ts +32 -1
  54. package/dist/core/modules/rx.d.ts.map +1 -1
  55. package/dist/core/modules/rx.js +17 -1
  56. package/dist/core/modules/rx.js.map +1 -1
  57. package/dist/core/modules/track.d.ts +135 -0
  58. package/dist/core/modules/track.d.ts.map +1 -0
  59. package/dist/core/modules/track.js +412 -0
  60. package/dist/core/modules/track.js.map +1 -0
  61. package/dist/core/types.d.ts +13 -0
  62. package/dist/core/types.d.ts.map +1 -1
  63. package/dist/core/types.js +0 -3
  64. package/dist/core/types.js.map +1 -1
  65. package/dist/core/version.d.ts +4 -0
  66. package/dist/core/version.d.ts.map +1 -0
  67. package/dist/core/version.js +4 -0
  68. package/dist/core/version.js.map +1 -0
  69. package/dist/pixels/engine.d.ts +56 -0
  70. package/dist/pixels/engine.d.ts.map +1 -0
  71. package/dist/pixels/engine.js +263 -0
  72. package/dist/pixels/engine.js.map +1 -0
  73. package/dist/pixels/index.d.ts +10 -0
  74. package/dist/pixels/index.d.ts.map +1 -0
  75. package/dist/pixels/index.js +5 -0
  76. package/dist/pixels/index.js.map +1 -0
  77. package/dist/pixels/metaEventId.d.ts +15 -0
  78. package/dist/pixels/metaEventId.d.ts.map +1 -0
  79. package/dist/pixels/metaEventId.js +17 -0
  80. package/dist/pixels/metaEventId.js.map +1 -0
  81. package/dist/pixels/pixelIdentity.d.ts +34 -0
  82. package/dist/pixels/pixelIdentity.d.ts.map +1 -0
  83. package/dist/pixels/pixelIdentity.js +65 -0
  84. package/dist/pixels/pixelIdentity.js.map +1 -0
  85. package/dist/pixels/pixelMapping.d.ts +172 -0
  86. package/dist/pixels/pixelMapping.d.ts.map +1 -0
  87. package/dist/pixels/pixelMapping.js +574 -0
  88. package/dist/pixels/pixelMapping.js.map +1 -0
  89. package/dist/pixels/pixelTracker.d.ts +81 -0
  90. package/dist/pixels/pixelTracker.d.ts.map +1 -0
  91. package/dist/pixels/pixelTracker.js +797 -0
  92. package/dist/pixels/pixelTracker.js.map +1 -0
  93. package/dist/pixels/types.d.ts +103 -0
  94. package/dist/pixels/types.d.ts.map +1 -0
  95. package/dist/pixels/types.js +14 -0
  96. package/dist/pixels/types.js.map +1 -0
  97. package/dist/react/hooks/useStep.d.ts +7 -0
  98. package/dist/react/hooks/useStep.d.ts.map +1 -0
  99. package/dist/react/hooks/useStep.js +14 -0
  100. package/dist/react/hooks/useStep.js.map +1 -0
  101. package/dist/react/index.d.ts +1 -0
  102. package/dist/react/index.d.ts.map +1 -1
  103. package/dist/react/index.js +1 -0
  104. package/dist/react/index.js.map +1 -1
  105. package/dist/stripe/index.d.ts +3 -1
  106. package/dist/stripe/index.d.ts.map +1 -1
  107. package/dist/stripe/index.js +13 -6
  108. package/dist/stripe/index.js.map +1 -1
  109. package/dist/stripe/useStripeExpress.d.ts.map +1 -1
  110. package/dist/stripe/useStripeExpress.js +15 -1
  111. package/dist/stripe/useStripeExpress.js.map +1 -1
  112. package/dist/tagada-headless-commerce.min.js +8 -0
  113. package/dist/tagada-headless-commerce.min.js.map +7 -0
  114. package/dist/tagada-headless-react.min.js +2 -2
  115. package/dist/tagada-headless-react.min.js.map +4 -4
  116. package/dist/tagada-headless.js +722 -288
  117. package/dist/tagada-headless.min.js +2 -2
  118. package/dist/tagada-headless.min.js.map +4 -4
  119. package/dist/tagada-pixels.min.js +7 -0
  120. package/dist/tagada-pixels.min.js.map +7 -0
  121. package/dist/tgd/contract/attribution.d.ts +28 -0
  122. package/dist/tgd/contract/attribution.d.ts.map +1 -0
  123. package/dist/tgd/contract/attribution.js +44 -0
  124. package/dist/tgd/contract/attribution.js.map +1 -0
  125. package/dist/tgd/contract/browser-api.d.ts +57 -0
  126. package/dist/tgd/contract/browser-api.d.ts.map +1 -0
  127. package/dist/tgd/contract/browser-api.js +2 -0
  128. package/dist/tgd/contract/browser-api.js.map +1 -0
  129. package/dist/tgd/contract/canvas.d.ts +120 -0
  130. package/dist/tgd/contract/canvas.d.ts.map +1 -0
  131. package/dist/tgd/contract/canvas.js +12 -0
  132. package/dist/tgd/contract/canvas.js.map +1 -0
  133. package/dist/tgd/contract/dedup-keys.d.ts +24 -0
  134. package/dist/tgd/contract/dedup-keys.d.ts.map +1 -0
  135. package/dist/tgd/contract/dedup-keys.js +23 -0
  136. package/dist/tgd/contract/dedup-keys.js.map +1 -0
  137. package/dist/tgd/contract/destination-names.d.ts +4 -0
  138. package/dist/tgd/contract/destination-names.d.ts.map +1 -0
  139. package/dist/tgd/contract/destination-names.js +66 -0
  140. package/dist/tgd/contract/destination-names.js.map +1 -0
  141. package/dist/tgd/contract/destinations.d.ts +124 -0
  142. package/dist/tgd/contract/destinations.d.ts.map +1 -0
  143. package/dist/tgd/contract/destinations.js +63 -0
  144. package/dist/tgd/contract/destinations.js.map +1 -0
  145. package/dist/tgd/contract/envelope.d.ts +203 -0
  146. package/dist/tgd/contract/envelope.d.ts.map +1 -0
  147. package/dist/tgd/contract/envelope.js +103 -0
  148. package/dist/tgd/contract/envelope.js.map +1 -0
  149. package/dist/tgd/contract/experiments.d.ts +87 -0
  150. package/dist/tgd/contract/experiments.d.ts.map +1 -0
  151. package/dist/tgd/contract/experiments.js +2 -0
  152. package/dist/tgd/contract/experiments.js.map +1 -0
  153. package/dist/tgd/contract/index.d.ts +20 -0
  154. package/dist/tgd/contract/index.d.ts.map +1 -0
  155. package/dist/tgd/contract/index.js +20 -0
  156. package/dist/tgd/contract/index.js.map +1 -0
  157. package/dist/tgd/contract/is-test.d.ts +2 -0
  158. package/dist/tgd/contract/is-test.d.ts.map +1 -0
  159. package/dist/tgd/contract/is-test.js +3 -0
  160. package/dist/tgd/contract/is-test.js.map +1 -0
  161. package/dist/tgd/contract/junk-ids.d.ts +4 -0
  162. package/dist/tgd/contract/junk-ids.d.ts.map +1 -0
  163. package/dist/tgd/contract/junk-ids.js +7 -0
  164. package/dist/tgd/contract/junk-ids.js.map +1 -0
  165. package/dist/tgd/contract/limits.d.ts +19 -0
  166. package/dist/tgd/contract/limits.d.ts.map +1 -0
  167. package/dist/tgd/contract/limits.js +20 -0
  168. package/dist/tgd/contract/limits.js.map +1 -0
  169. package/dist/tgd/contract/names.d.ts +13 -0
  170. package/dist/tgd/contract/names.d.ts.map +1 -0
  171. package/dist/tgd/contract/names.js +15 -0
  172. package/dist/tgd/contract/names.js.map +1 -0
  173. package/dist/tgd/contract/registry.d.ts +116 -0
  174. package/dist/tgd/contract/registry.d.ts.map +1 -0
  175. package/dist/tgd/contract/registry.js +59 -0
  176. package/dist/tgd/contract/registry.js.map +1 -0
  177. package/dist/tgd/contract/signed-ids.d.ts +33 -0
  178. package/dist/tgd/contract/signed-ids.d.ts.map +1 -0
  179. package/dist/tgd/contract/signed-ids.js +26 -0
  180. package/dist/tgd/contract/signed-ids.js.map +1 -0
  181. package/dist/tgd/contract/snapshots.d.ts +69 -0
  182. package/dist/tgd/contract/snapshots.d.ts.map +1 -0
  183. package/dist/tgd/contract/snapshots.js +2 -0
  184. package/dist/tgd/contract/snapshots.js.map +1 -0
  185. package/dist/tgd/contract/time.d.ts +9 -0
  186. package/dist/tgd/contract/time.d.ts.map +1 -0
  187. package/dist/tgd/contract/time.js +9 -0
  188. package/dist/tgd/contract/time.js.map +1 -0
  189. package/dist/tgd/contract/unions.d.ts +21 -0
  190. package/dist/tgd/contract/unions.d.ts.map +1 -0
  191. package/dist/tgd/contract/unions.js +17 -0
  192. package/dist/tgd/contract/unions.js.map +1 -0
  193. package/dist/tgd/contract/unit.d.ts +12 -0
  194. package/dist/tgd/contract/unit.d.ts.map +1 -0
  195. package/dist/tgd/contract/unit.js +18 -0
  196. package/dist/tgd/contract/unit.js.map +1 -0
  197. package/dist/tgd/contract/wire.d.ts +59 -0
  198. package/dist/tgd/contract/wire.d.ts.map +1 -0
  199. package/dist/tgd/contract/wire.js +2 -0
  200. package/dist/tgd/contract/wire.js.map +1 -0
  201. package/package.json +8 -1
@@ -0,0 +1,120 @@
1
+ import type { ExperimentStatus, Goal, Guardrail, TargetingCondition } from './experiments.js';
2
+ /** `node.metadata.canvasSplit`, `node.metadata.canvasPageTest`, `node.metadata.canvasPageVariantOf`,
3
+ * `edge.metadata.splitArm`, `edge.metadata.pageVariantEdgeOf` (A11). The canvas compile is their only writer. */
4
+ export declare const CANVAS_SPLIT_KEY: "canvasSplit";
5
+ export declare const CANVAS_PAGE_TEST_KEY: "canvasPageTest";
6
+ export declare const CANVAS_PAGE_VARIANT_OF_KEY: "canvasPageVariantOf";
7
+ export declare const SPLIT_ARM_KEY: "splitArm";
8
+ export declare const PAGE_VARIANT_EDGE_OF_KEY: "pageVariantEdgeOf";
9
+ /** Arm keys the canvas mints, in order. The first one is always the control. */
10
+ export declare const CANVAS_ARM_KEYS: readonly ["control", "b", "c", "d", "e"];
11
+ export declare const ARM_KEY_PATTERN: RegExp;
12
+ export declare const MAX_ARMS = 5;
13
+ export interface CompiledExperimentCore {
14
+ experimentId: string;
15
+ status: ExperimentStatus;
16
+ phase: number;
17
+ seed: string;
18
+ controlArm: string;
19
+ shippedArm: string | null;
20
+ holdoutBp: number;
21
+ targeting: TargetingCondition[];
22
+ namespace: {
23
+ name: string;
24
+ startBp: number;
25
+ endBp: number;
26
+ } | null;
27
+ goals: Goal[];
28
+ guardrails: Guardrail[];
29
+ conversionWindowHours: number;
30
+ }
31
+ export interface CompiledSplitArm {
32
+ key: string;
33
+ label: string;
34
+ weightBp: number;
35
+ }
36
+ export interface CompiledSplitMeta extends CompiledExperimentCore {
37
+ arms: CompiledSplitArm[];
38
+ }
39
+ export interface CompiledPageTestArm {
40
+ key: string;
41
+ nodeId: string;
42
+ weightBp: number;
43
+ }
44
+ export interface CompiledPageTestMeta extends CompiledExperimentCore {
45
+ arms: CompiledPageTestArm[];
46
+ }
47
+ export interface CompiledPageVariantOf {
48
+ controlNodeId: string;
49
+ armKey: string;
50
+ }
51
+ /**
52
+ * The patch of `set { split }` and `set { pageTest }` (section 5.2). Same name as ab-engine.md §18.1.
53
+ * `phase` is an optional CHECK: the compile derives the phase (section 6.5) and refuses with `stale`
54
+ * when the caller's value differs. `arms` carries weights (both kinds) and labels (split only).
55
+ */
56
+ export interface CanvasExperimentLifecyclePatch {
57
+ status?: Exclude<ExperimentStatus, 'draft'>;
58
+ phase?: number;
59
+ arms?: Array<{
60
+ key: string;
61
+ weightBp?: number;
62
+ label?: string;
63
+ }>;
64
+ shippedArm?: string | null;
65
+ holdoutBp?: number;
66
+ targeting?: TargetingCondition[];
67
+ namespace?: {
68
+ name: string;
69
+ startBp: number;
70
+ endBp: number;
71
+ } | null;
72
+ goals?: Goal[];
73
+ guardrails?: Guardrail[];
74
+ conversionWindowHours?: number;
75
+ name?: string;
76
+ }
77
+ /** Every command of this doc, in the input form (`experimentId` may be omitted: the server mints it). */
78
+ export type CanvasExperimentCommand = {
79
+ type: 'add';
80
+ kind: 'split';
81
+ after?: {
82
+ node: string;
83
+ exit: string;
84
+ };
85
+ props: {
86
+ name: string;
87
+ experimentId?: string;
88
+ };
89
+ } | {
90
+ type: 'add';
91
+ kind: 'page.checkout' | 'page.offer' | 'page.landing' | 'page.thankyou' | 'page.custom';
92
+ variantOf: {
93
+ node: string;
94
+ experimentId?: string;
95
+ };
96
+ props: {
97
+ name: string;
98
+ template?: string;
99
+ path?: string;
100
+ };
101
+ } | {
102
+ type: 'set';
103
+ id: string;
104
+ target?: 'node';
105
+ patch: {
106
+ split: CanvasExperimentLifecyclePatch;
107
+ };
108
+ } | {
109
+ type: 'set';
110
+ id: string;
111
+ target?: 'node';
112
+ patch: {
113
+ pageTest: CanvasExperimentLifecyclePatch;
114
+ };
115
+ } | {
116
+ type: 'remove';
117
+ id: string;
118
+ target?: 'node';
119
+ };
120
+ //# sourceMappingURL=canvas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canvas.d.ts","sourceRoot":"","sources":["../../../src/tgd/contract/canvas.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE9F;kHACkH;AAClH,eAAO,MAAM,gBAAgB,EAAG,aAAsB,CAAC;AACvD,eAAO,MAAM,oBAAoB,EAAG,gBAAyB,CAAC;AAC9D,eAAO,MAAM,0BAA0B,EAAG,qBAA8B,CAAC;AACzE,eAAO,MAAM,aAAa,EAAG,UAAmB,CAAC;AACjD,eAAO,MAAM,wBAAwB,EAAG,mBAA4B,CAAC;AAErE,gFAAgF;AAChF,eAAO,MAAM,eAAe,0CAA2C,CAAC;AACxE,eAAO,MAAM,eAAe,QAAuB,CAAC;AACpD,eAAO,MAAM,QAAQ,IAAI,CAAC;AAE1B,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC,SAAS,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,K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AAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ /** `node.metadata.canvasSplit`, `node.metadata.canvasPageTest`, `node.metadata.canvasPageVariantOf`,
2
+ * `edge.metadata.splitArm`, `edge.metadata.pageVariantEdgeOf` (A11). The canvas compile is their only writer. */
3
+ export const CANVAS_SPLIT_KEY = 'canvasSplit';
4
+ export const CANVAS_PAGE_TEST_KEY = 'canvasPageTest';
5
+ export const CANVAS_PAGE_VARIANT_OF_KEY = 'canvasPageVariantOf';
6
+ export const SPLIT_ARM_KEY = 'splitArm';
7
+ export const PAGE_VARIANT_EDGE_OF_KEY = 'pageVariantEdgeOf';
8
+ /** Arm keys the canvas mints, in order. The first one is always the control. */
9
+ export const CANVAS_ARM_KEYS = ['control', 'b', 'c', 'd', 'e'];
10
+ export const ARM_KEY_PATTERN = /^[a-z0-9_-]{1,32}$/;
11
+ export const MAX_ARMS = 5;
12
+ //# sourceMappingURL=canvas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canvas.js","sourceRoot":"","sources":["../../../src/tgd/contract/canvas.ts"],"names":[],"mappings":"AAGA;kHACkH;AAClH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAsB,CAAC;AACvD,MAAM,CAAC,MAAM,oBAAoB,GAAG,gBAAyB,CAAC;AAC9D,MAAM,CAAC,MAAM,0BAA0B,GAAG,qBAA8B,CAAC;AACzE,MAAM,CAAC,MAAM,aAAa,GAAG,UAAmB,CAAC;AACjD,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAA4B,CAAC;AAErE,gFAAgF;AAChF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU,CAAC;AACxE,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB,CAAC;AACpD,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { UnitType } from './unions.js';
2
+ export declare const dkFsStarted: (fsid: string) => string;
3
+ export declare const dkStepViewed: (fsid: string, stepId: string, tsMs: number) => string;
4
+ export declare const dkStepEntered: (fsid: string, stepId: string, navMs: number) => string;
5
+ export declare const dkCheckoutStarted: (csid: string) => string;
6
+ export declare const dkCheckoutEmail: (csid: string, emailSha256: string) => string;
7
+ export declare const dkAttempt: (paymentId: string) => string;
8
+ export declare const dkOrder: (orderId: string) => string;
9
+ export declare const dkSubCreated: (subscriptionId: string) => string;
10
+ export declare const dkSubCanceled: (subscriptionId: string) => string;
11
+ export declare const dkSubRebilled: (paymentId: string) => string;
12
+ export declare const dkExposure: (expId: string, phase: number, unitType: UnitType, unitId: string) => string;
13
+ export declare const dkExternal: (storeId: string, idempotencyKey: string) => string;
14
+ export declare const dkLegacy: (appEventsRawId: string) => string;
15
+ export declare const dkEmailSent: (m: string) => string;
16
+ export declare const dkEmailDelivered: (m: string) => string;
17
+ export declare const dkEmailBounced: (m: string) => string;
18
+ export declare const dkEmailComplained: (m: string) => string;
19
+ export declare const dkEmailOpened: (m: string, svixId: string) => string;
20
+ export declare const dkEmailClicked: (m: string, linkIndex: number, tsMs: number) => string;
21
+ export declare const dkEmailUnsubscribed: (m: string) => string;
22
+ /** Conversion-key prefixes owned by conversions-ledger.md. Listed so no event key reuses them. */
23
+ export declare const CONVERSION_KEY_PREFIXES: readonly ["payment:", "refund:", "chargeback:"];
24
+ //# sourceMappingURL=dedup-keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dedup-keys.d.ts","sourceRoot":"","sources":["../../../src/tgd/contract/dedup-keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,WAAyB,CAAC;AAClE,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,QAAQ,MAAM,EAAE,MAAM,MAAM,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E,kGAAkG;AAClG,eAAO,MAAM,uBAAuB,iDAAkD,CAAC"}
@@ -0,0 +1,23 @@
1
+ export const dkFsStarted = (fsid) => `fs_started:${fsid}`;
2
+ export const dkStepViewed = (fsid, stepId, tsMs) => `step_viewed:${fsid}:${stepId}:${Math.floor(tsMs / 1000)}`;
3
+ export const dkStepEntered = (fsid, stepId, navMs) => `step_entered:${fsid}:${stepId}:${navMs}`;
4
+ export const dkCheckoutStarted = (csid) => `checkout_started:${csid}`;
5
+ export const dkCheckoutEmail = (csid, emailSha256) => `checkout_email:${csid}:${emailSha256}`;
6
+ export const dkAttempt = (paymentId) => `attempt:${paymentId}`;
7
+ export const dkOrder = (orderId) => `order:${orderId}`;
8
+ export const dkSubCreated = (subscriptionId) => `sub_created:${subscriptionId}`;
9
+ export const dkSubCanceled = (subscriptionId) => `sub_canceled:${subscriptionId}`;
10
+ export const dkSubRebilled = (paymentId) => `sub_rebilled:${paymentId}`;
11
+ export const dkExposure = (expId, phase, unitType, unitId) => `exp:${expId}:${phase}:${unitType}:${unitId}`;
12
+ export const dkExternal = (storeId, idempotencyKey) => `ext:${storeId}:${idempotencyKey}`;
13
+ export const dkLegacy = (appEventsRawId) => `legacy:${appEventsRawId}`;
14
+ export const dkEmailSent = (m) => `email_sent:${m}`;
15
+ export const dkEmailDelivered = (m) => `email_delivered:${m}`;
16
+ export const dkEmailBounced = (m) => `email_bounced:${m}`;
17
+ export const dkEmailComplained = (m) => `email_complained:${m}`;
18
+ export const dkEmailOpened = (m, svixId) => `email_opened:${m}:${svixId}`;
19
+ export const dkEmailClicked = (m, linkIndex, tsMs) => `email_clicked:${m}:${linkIndex}:${Math.floor(tsMs / 1000)}`;
20
+ export const dkEmailUnsubscribed = (m) => `email_unsubscribed:${m}`;
21
+ /** Conversion-key prefixes owned by conversions-ledger.md. Listed so no event key reuses them. */
22
+ export const CONVERSION_KEY_PREFIXES = ['payment:', 'refund:', 'chargeback:']; // (new name, this lane)
23
+ //# sourceMappingURL=dedup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"}
@@ -0,0 +1,4 @@
1
+ import type { TgdEventV1 } from './envelope.js';
2
+ export declare const DESTINATION_EVENT_NAMES: Readonly<Record<'meta' | 'ga4' | 'tiktok' | 'snap' | 'pinterest_tag' | 'pinterest_capi', Partial<Record<'page_view' | 'checkout_started' | 'checkout_email_entered' | 'order_completed' | 'subscription_created' | 'lead' | 'product_viewed' | 'added_to_cart', string>>>>;
3
+ export declare function destinationDedupId(ev: TgdEventV1): string | null;
4
+ //# sourceMappingURL=destination-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"destination-names.d.ts","sourceRoot":"","sources":["../../../src/tgd/contract/destination-names.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,eAAe,GAAG,gBAAgB,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,GAAG,kBAAkB,GAAG,wBAAwB,GAAG,iBAAiB,GAAG,sBAAsB,GAAG,MAAM,GAAG,gBAAgB,GAAG,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC,CAsD9S,CAAC;AAGF,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAQhE"}
@@ -0,0 +1,66 @@
1
+ export const DESTINATION_EVENT_NAMES = {
2
+ "meta": {
3
+ "page_view": "PageView",
4
+ "checkout_started": "InitiateCheckout",
5
+ "checkout_email_entered": "CheckoutEmailValidated",
6
+ "order_completed": "Purchase",
7
+ "subscription_created": "Subscribe",
8
+ "lead": "Lead",
9
+ "product_viewed": "ViewContent",
10
+ "added_to_cart": "AddToCart"
11
+ },
12
+ "ga4": {
13
+ "page_view": "page_view",
14
+ "checkout_started": "begin_checkout",
15
+ "order_completed": "purchase",
16
+ "lead": "generate_lead",
17
+ "product_viewed": "view_item",
18
+ "added_to_cart": "add_to_cart"
19
+ },
20
+ "tiktok": {
21
+ "page_view": "Pageview",
22
+ "checkout_started": "InitiateCheckout",
23
+ "order_completed": "Purchase",
24
+ "subscription_created": "Subscribe",
25
+ "lead": "SubmitForm",
26
+ "product_viewed": "ViewContent",
27
+ "added_to_cart": "AddToCart"
28
+ },
29
+ "snap": {
30
+ "page_view": "PAGE_VIEW",
31
+ "checkout_started": "START_CHECKOUT",
32
+ "order_completed": "PURCHASE",
33
+ "subscription_created": "SUBSCRIBE",
34
+ "lead": "LEAD",
35
+ "product_viewed": "VIEW_CONTENT",
36
+ "added_to_cart": "ADD_CART"
37
+ },
38
+ "pinterest_tag": {
39
+ "page_view": "pagevisit",
40
+ "checkout_started": "initiatecheckout",
41
+ "order_completed": "checkout",
42
+ "lead": "lead",
43
+ "product_viewed": "viewcontent",
44
+ "added_to_cart": "addtocart"
45
+ },
46
+ "pinterest_capi": {
47
+ "page_view": "page_visit",
48
+ "checkout_started": "initiate_checkout",
49
+ "order_completed": "checkout",
50
+ "subscription_created": "subscribe",
51
+ "lead": "lead",
52
+ "product_viewed": "view_content",
53
+ "added_to_cart": "add_to_cart"
54
+ }
55
+ };
56
+ const makeMetaEventId = (name, id) => `${name}_${id}`;
57
+ export function destinationDedupId(ev) {
58
+ switch (ev.event_name) {
59
+ case 'checkout_started': return ev.checkout_session_id ? makeMetaEventId('InitiateCheckout', ev.checkout_session_id) : null;
60
+ case 'checkout_email_entered': return ev.checkout_session_id ? makeMetaEventId('CheckoutEmailValidated', ev.checkout_session_id) : null;
61
+ case 'order_completed': return ev.order_id ? makeMetaEventId('Purchase', ev.order_id) : null;
62
+ case 'subscription_created': return ev.subscription_id ? makeMetaEventId('Subscribe', ev.subscription_id) : null;
63
+ default: return null;
64
+ }
65
+ }
66
+ //# sourceMappingURL=destination-names.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"destination-names.js","sourceRoot":"","sources":["../../../src/tgd/contract/destination-names.ts"],"names":[],"mappings":"AA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E,aAAa;KAC/B;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,IAAY,EAAE,EAAU,EAAE,EAAE,CAAC,GAAG,IAAI,IAAI,EAAE,EAAE,CAAC;AACtE,MAAM,UAAU,kBAAkB,CAAC,EAAc;IAC/C,QAAQ,EAAE,CAAC,UAAU,EAAE,CAAC;QACtB,KAAK,kBAAkB,CAAC,CAAC,OAAO,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC,eAAe,CAAC,kBAAkB,EAAE,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC5H,KAAK,wBAAwB,CAAC,CAAC,OAAO,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC,eAAe,CAAC,wBAAwB,EAAE,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACxI,KAAK,iBAAiB,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,UAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC7F,KAAK,sBAAsB,CAAC,CAAC,OAAO,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC,WAAW,EAAE,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACjH,OAAO,CAAC,CAAC,OAAO,IAAI,CAAC;IACvB,CAAC;AACH,CAAC"}
@@ -0,0 +1,124 @@
1
+ export declare const DESTINATION_ADAPTER_IDS: readonly ["meta", "klaviyo", "triplewhale", "hyros", "awin", "converge", "clickflare", "voluum", "binom", "redtrack", "clickmagick", "tiktok", "snap", "pinterest", "reddit", "x", "google_ads", "ga4", "microsoft_ads", "linkedin"];
2
+ export type DestinationAdapterId = (typeof DESTINATION_ADAPTER_IDS)[number];
3
+ /** Values of analytics_v2_destinations.provider when kind = 'ad_account', and of av2_ad_spend.provider (A36, §18).
4
+ * Underscore, never '-': analytics_v2_destinations has CHECK provider ~ '^[a-z0-9_]{1,40}$' (postgres-schema.md §3).
5
+ * Declared once, in attribution.ts (attribution.md §2.2: AD_SPEND_PROVIDERS = ['meta', 'google_ads', 'tiktok']);
6
+ * this file re-exports it under the name this doc uses (P1-L1 kernel decision K2). Test: same array reference. */
7
+ export { AD_SPEND_PROVIDERS as AD_ACCOUNT_PROVIDERS } from './attribution.js';
8
+ export type { AdSpendProvider as AdAccountProvider } from './attribution.js';
9
+ export declare const DESTINATION_TOPICS: readonly ["order/paid", "order/refunded", "checkout/initiated", "checkout/emailValidated", "checkout/abandonedCart", "subscription/created", "subscription/canceled", "subscription/pastDue", "subscription/paused", "subscription/resumed", "subscription/rebillUpcoming", "subscription/rebillSucceeded", "club/membershipActivated"];
10
+ export type DestinationTopic = (typeof DESTINATION_TOPICS)[number];
11
+ /** A zod 3 schema satisfies this. tgd-core never imports zod (A26). */
12
+ export interface ConfigParser<Cfg> {
13
+ parse(input: unknown): Cfg;
14
+ }
15
+ /** What `configSchema.parse` receives. Kind 'integration': integrations.credentials / .settings.
16
+ * Kind 'destination': getDestinationCredentials() / analytics_v2_destinations.config / .provider_account_id. */
17
+ export interface DestinationConfigSource {
18
+ readonly credentials: Readonly<Record<string, unknown>>;
19
+ readonly settings: Readonly<Record<string, unknown>>;
20
+ readonly providerAccountId: string | null;
21
+ }
22
+ /** One HTTP call. It never contains a secret: secrets are added by `authorize` after logging (§8.3). */
23
+ export interface DestinationRequest {
24
+ readonly method: 'GET' | 'POST';
25
+ readonly url: string;
26
+ readonly headers: Readonly<Record<string, string>>;
27
+ readonly body?: unknown;
28
+ readonly eventName: string;
29
+ }
30
+ export declare const SKIP_REASONS: readonly ["not_found", "no_customer", "no_identifier", "no_click_id", "cart_not_priced", "event_disabled", "returning_customer", "order_open", "no_amount", "not_configured", "invalid_config", "already_sent", "unsupported_topic"];
31
+ export type SkipReason = (typeof SKIP_REASONS)[number];
32
+ export type MapResult = {
33
+ readonly kind: 'send';
34
+ readonly requests: readonly DestinationRequest[];
35
+ } | {
36
+ readonly kind: 'skip';
37
+ readonly reason: SkipReason;
38
+ };
39
+ export interface ProviderResponse {
40
+ readonly kind: 'response';
41
+ readonly status: number;
42
+ readonly headers: Readonly<Record<string, string>>;
43
+ readonly body: unknown;
44
+ }
45
+ export interface NetworkFailure {
46
+ readonly kind: 'network';
47
+ readonly code: string;
48
+ readonly message: string;
49
+ }
50
+ export type Verdict = {
51
+ readonly kind: 'success';
52
+ readonly providerRequestId?: string;
53
+ } | {
54
+ readonly kind: 'retry';
55
+ readonly reason: 'throttled' | 'server' | 'network' | 'timeout';
56
+ readonly retryAfterMs?: number;
57
+ readonly message?: string;
58
+ } | {
59
+ readonly kind: 'abort';
60
+ readonly reason: 'auth' | 'payload' | 'too_old' | 'not_found' | 'unknown_4xx';
61
+ readonly message?: string;
62
+ };
63
+ export interface AuthPatch {
64
+ readonly headers?: Readonly<Record<string, string>>;
65
+ readonly query?: Readonly<Record<string, string>>;
66
+ }
67
+ export type ValidationStatus = 'validated' | 'skipped:no-test-key' | 'invalid';
68
+ export interface ValidationResult {
69
+ readonly status: ValidationStatus;
70
+ readonly reason?: string;
71
+ }
72
+ export type FetchLike = (url: string, init: {
73
+ method: 'GET' | 'POST';
74
+ headers: Record<string, string>;
75
+ body?: string;
76
+ signal?: AbortSignal;
77
+ }) => Promise<{
78
+ status: number;
79
+ headers: {
80
+ get(name: string): string | null;
81
+ };
82
+ text(): Promise<string>;
83
+ }>;
84
+ export interface MapContext {
85
+ readonly mode: 'shadow' | 'live';
86
+ readonly attempt: number;
87
+ readonly nowMs: number;
88
+ }
89
+ export interface DestinationAdapter<Cfg = unknown, In = unknown> {
90
+ readonly id: DestinationAdapterId;
91
+ readonly kind: 'integration' | 'destination';
92
+ readonly integrationProvider: string | null;
93
+ readonly integrationType: string | null;
94
+ readonly logService: string | null;
95
+ readonly topics: readonly DestinationTopic[];
96
+ readonly configSchema: ConfigParser<Cfg>;
97
+ /** Pure and synchronous. No I/O, no Date.now(), no Math.random(). */
98
+ map(input: In, config: Cfg, ctx: MapContext): MapResult;
99
+ /** Adds secrets at send time (tokens, api keys, OAuth access token). Called only in live mode and by validate. */
100
+ authorize?(config: Cfg, fetchImpl: FetchLike): Promise<AuthPatch>;
101
+ /** Owns all provider knowledge about responses. Never throws. */
102
+ classify(result: ProviderResponse | NetworkFailure, request: DestinationRequest): Verdict;
103
+ /** A35: calls the provider's test/validation endpoint with `sample`. Never touches production data of the merchant. */
104
+ validate(sample: In, config: Cfg, fetchImpl: FetchLike): Promise<ValidationResult>;
105
+ readonly batch: {
106
+ readonly maxItems: 1;
107
+ };
108
+ readonly verified: 'replay' | 'validated' | 'unverified';
109
+ readonly maxEventAgeSec: number;
110
+ readonly timeoutMs: number;
111
+ }
112
+ export declare const DISPATCH_EVENT_NAME: "analytics-v2/destinations.dispatch";
113
+ export declare function destinationIdempotencyKey(p: {
114
+ provider: DestinationAdapterId;
115
+ targetId: string;
116
+ topic: DestinationTopic;
117
+ entityKey: string;
118
+ }): string;
119
+ /** §6.3. Returns null when the topic data lacks the id the key needs (the observer then skips). */
120
+ export declare function destinationEntityKey(topic: DestinationTopic, data: Readonly<Record<string, unknown>>, event: {
121
+ readonly id: string;
122
+ readonly timestamp: string;
123
+ }): string | null;
124
+ //# sourceMappingURL=destinations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"destinations.d.ts","sourceRoot":"","sources":["../../../src/tgd/contract/destinations.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,sOAK1B,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E;;;mHAGmH;AACnH,OAAO,EAAE,kBAAkB,IAAI,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC9E,YAAY,EAAE,eAAe,IAAI,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,eAAO,MAAM,kBAAkB,yUAOrB,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ACzD,MAAM,GAAG,IAAI,CAef"}
@@ -0,0 +1,63 @@
1
+ // packages/tgd-core/src/contract/destinations.ts (new — P1-L1 kernel)
2
+ export const DESTINATION_ADAPTER_IDS = [
3
+ 'meta', 'klaviyo', 'triplewhale', 'hyros', 'awin', 'converge',
4
+ 'clickflare', 'voluum', 'binom', 'redtrack', 'clickmagick',
5
+ 'tiktok', 'snap', 'pinterest', 'reddit', 'x',
6
+ 'google_ads', 'ga4', 'microsoft_ads', 'linkedin',
7
+ ];
8
+ /** Values of analytics_v2_destinations.provider when kind = 'ad_account', and of av2_ad_spend.provider (A36, §18).
9
+ * Underscore, never '-': analytics_v2_destinations has CHECK provider ~ '^[a-z0-9_]{1,40}$' (postgres-schema.md §3).
10
+ * Declared once, in attribution.ts (attribution.md §2.2: AD_SPEND_PROVIDERS = ['meta', 'google_ads', 'tiktok']);
11
+ * this file re-exports it under the name this doc uses (P1-L1 kernel decision K2). Test: same array reference. */
12
+ export { AD_SPEND_PROVIDERS as AD_ACCOUNT_PROVIDERS } from './attribution.js';
13
+ export const DESTINATION_TOPICS = [
14
+ 'order/paid', 'order/refunded',
15
+ 'checkout/initiated', 'checkout/emailValidated', 'checkout/abandonedCart',
16
+ 'subscription/created', 'subscription/canceled', 'subscription/pastDue',
17
+ 'subscription/paused', 'subscription/resumed',
18
+ 'subscription/rebillUpcoming', 'subscription/rebillSucceeded',
19
+ 'club/membershipActivated',
20
+ ];
21
+ export const SKIP_REASONS = [
22
+ 'not_found', // entity row missing
23
+ 'no_customer', // entity has no customer
24
+ 'no_identifier', // nothing the provider can match on (no email/phone/click id/ip+ua)
25
+ 'no_click_id', // click-id-only provider (Awin, postbacks) and none found
26
+ 'cart_not_priced', // checkout/initiated before the cart is priced (§6.3)
27
+ 'event_disabled', // merchant config turns this event off (TW allowedEvents, v2 destination settings.events, Meta sendSubscribe=false)
28
+ 'returning_customer', // newCustomersOnly / publishPurchaseIfNewCustomerOnly
29
+ 'order_open', // TW: order.status = 'open'
30
+ 'no_amount', // missing paid amount or currency
31
+ 'not_configured', // optional event with no conversion id configured (X, LinkedIn)
32
+ 'invalid_config', // configSchema.parse threw on the stored credentials/settings
33
+ 'already_sent', // live send-guard found an 'ok' row with the same idempotency key (§6.5)
34
+ 'unsupported_topic', // adapter does not map this topic (defensive; the observer should not send it)
35
+ ];
36
+ export const DISPATCH_EVENT_NAME = 'analytics-v2/destinations.dispatch';
37
+ export function destinationIdempotencyKey(p) {
38
+ return `${p.provider}:${p.targetId}:${p.topic}:${p.entityKey}`; // A25, verbatim
39
+ }
40
+ /** §6.3. Returns null when the topic data lacks the id the key needs (the observer then skips). */
41
+ export function destinationEntityKey(topic, data, event) {
42
+ const id = (key) => typeof data[key] === 'string' && data[key] !== '' ? data[key] : null;
43
+ if (topic === 'club/membershipActivated') {
44
+ const club = id('clubId'), customer = id('customerId');
45
+ return club && customer ? `${club}:${customer}` : null;
46
+ }
47
+ const entity = id(topic.startsWith('order/') ? 'orderId' : topic.startsWith('checkout/') ? 'checkoutSessionId' : 'subscriptionId');
48
+ if (!entity)
49
+ return null;
50
+ switch (topic) {
51
+ case 'order/refunded':
52
+ case 'checkout/initiated':
53
+ case 'subscription/pastDue':
54
+ case 'subscription/paused':
55
+ case 'subscription/resumed':
56
+ return `${entity}:${event.id}`;
57
+ case 'subscription/rebillUpcoming':
58
+ case 'subscription/rebillSucceeded':
59
+ return `${entity}:${new Date(event.timestamp).toISOString().slice(0, 10)}`;
60
+ default: return entity;
61
+ }
62
+ }
63
+ //# sourceMappingURL=destinations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"destinations.js","sourceRoot":"","sources":["../../../src/tgd/contract/destinations.ts"],"names":[],"mappings":"AAAA,uEAAuE;AAEvE,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU;IAC7D,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,aA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