@aranova/tracking-react 0.27.0 → 1.1.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 (35) hide show
  1. package/dist/client.d.mts +11 -4
  2. package/dist/client.d.ts +11 -4
  3. package/dist/client.js +620 -350
  4. package/dist/client.js.map +1 -1
  5. package/dist/client.mjs +610 -350
  6. package/dist/client.mjs.map +1 -1
  7. package/dist/index.d.mts +7 -6
  8. package/dist/index.d.ts +7 -6
  9. package/dist/index.js +339 -393
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.mjs +328 -393
  12. package/dist/index.mjs.map +1 -1
  13. package/dist/ingest-typed-MBuMe9Pn.d.ts +883 -0
  14. package/dist/ingest-typed-UA13xTfI.d.mts +883 -0
  15. package/dist/{phone-utils-BVzSNBf1.d.mts → phone-utils-C0ds6cqZ.d.mts} +24 -78
  16. package/dist/{phone-utils-BVzSNBf1.d.ts → phone-utils-C0ds6cqZ.d.ts} +24 -78
  17. package/dist/phone.d.mts +2 -2
  18. package/dist/phone.d.ts +2 -2
  19. package/dist/phone.js +0 -464
  20. package/dist/phone.js.map +1 -1
  21. package/dist/phone.mjs +0 -464
  22. package/dist/phone.mjs.map +1 -1
  23. package/dist/{sales-D4TB9gRS.d.ts → sales-BuKD_bdo.d.mts} +90 -329
  24. package/dist/{sales-cYjB07y8.d.mts → sales-C3O_xxZ_.d.ts} +90 -329
  25. package/dist/sales.d.mts +3 -3
  26. package/dist/sales.d.ts +3 -3
  27. package/dist/sales.js +270 -127
  28. package/dist/sales.js.map +1 -1
  29. package/dist/sales.mjs +259 -127
  30. package/dist/sales.mjs.map +1 -1
  31. package/dist/{tracking-config-runtime-D7prdTE1.d.mts → tracking-config-runtime-C6H7ofmo.d.mts} +6 -0
  32. package/dist/{tracking-config-runtime-D7prdTE1.d.ts → tracking-config-runtime-C6H7ofmo.d.ts} +6 -0
  33. package/package.json +2 -2
  34. package/dist/ingest-typed-BxLFlZ7N.d.mts +0 -1371
  35. package/dist/ingest-typed-ByQVRMvP.d.ts +0 -1371
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod/mini';
2
2
  import { CountryCode } from 'libphonenumber-js';
3
3
 
4
4
  /**
@@ -11,7 +11,7 @@ import { CountryCode } from 'libphonenumber-js';
11
11
  type JsonValue = string | number | boolean | null | JsonValue[] | {
12
12
  [key: string]: JsonValue;
13
13
  };
14
- declare const jsonValueSchema: z.ZodType<JsonValue>;
14
+ declare const jsonValueSchema: z.ZodMiniType<JsonValue>;
15
15
  /**
16
16
  * Metadata for a manually fired `form_submit` event.
17
17
  *
@@ -49,81 +49,21 @@ declare const jsonValueSchema: z.ZodType<JsonValue>;
49
49
  * });
50
50
  * ```
51
51
  */
52
- declare const formSubmitMetadataSchema: z.ZodObject<{
53
- form: z.ZodObject<{
54
- id: z.ZodString;
55
- action: z.ZodNullable<z.ZodString>;
56
- fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
57
- name: z.ZodString;
58
- type: z.ZodString;
59
- label: z.ZodNullable<z.ZodString>;
60
- value: z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>;
61
- }, "strict", z.ZodTypeAny, {
62
- value: JsonValue;
63
- type: string;
64
- name: string;
65
- label: string | null;
66
- }, {
67
- value: JsonValue;
68
- type: string;
69
- name: string;
70
- label: string | null;
71
- }>, "many">>;
72
- }, "strict", z.ZodTypeAny, {
73
- id: string;
74
- action: string | null;
75
- fields?: {
76
- value: JsonValue;
77
- type: string;
78
- name: string;
79
- label: string | null;
80
- }[] | undefined;
81
- }, {
82
- id: string;
83
- action: string | null;
84
- fields?: {
85
- value: JsonValue;
86
- type: string;
87
- name: string;
88
- label: string | null;
89
- }[] | undefined;
90
- }>;
91
- page: z.ZodObject<{
92
- path: z.ZodString;
93
- }, "strict", z.ZodTypeAny, {
94
- path: string;
95
- }, {
96
- path: string;
97
- }>;
98
- }, "strict", z.ZodTypeAny, {
99
- form: {
100
- id: string;
101
- action: string | null;
102
- fields?: {
103
- value: JsonValue;
104
- type: string;
105
- name: string;
106
- label: string | null;
107
- }[] | undefined;
108
- };
109
- page: {
110
- path: string;
111
- };
112
- }, {
113
- form: {
114
- id: string;
115
- action: string | null;
116
- fields?: {
117
- value: JsonValue;
118
- type: string;
119
- name: string;
120
- label: string | null;
121
- }[] | undefined;
122
- };
123
- page: {
124
- path: string;
125
- };
126
- }>;
52
+ declare const formSubmitMetadataSchema: z.ZodMiniObject<{
53
+ form: z.ZodMiniObject<{
54
+ id: z.ZodMiniString<string>;
55
+ action: z.ZodMiniNullable<z.ZodMiniString<string>>;
56
+ fields: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
57
+ name: z.ZodMiniString<string>;
58
+ type: z.ZodMiniString<string>;
59
+ label: z.ZodMiniNullable<z.ZodMiniString<string>>;
60
+ value: z.ZodMiniType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
61
+ }, z.core.$strict>>>;
62
+ }, z.core.$strict>;
63
+ page: z.ZodMiniObject<{
64
+ path: z.ZodMiniString<string>;
65
+ }, z.core.$strict>;
66
+ }, z.core.$strict>;
127
67
  type FormSubmitMetadata = z.infer<typeof formSubmitMetadataSchema>;
128
68
  /**
129
69
  * Registration config for `form_submit`.
@@ -131,7 +71,7 @@ type FormSubmitMetadata = z.infer<typeof formSubmitMetadataSchema>;
131
71
  * This event is manual-only and currently has no registration options. The
132
72
  * empty object enables typed `trackEvent('form_submit', ...)` calls.
133
73
  */
134
- declare const formSubmitConfigSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
74
+ declare const formSubmitConfigSchema: z.ZodMiniObject<{}, z.core.$strict>;
135
75
  type FormSubmitConfig = z.infer<typeof formSubmitConfigSchema>;
136
76
 
137
77
  /**
@@ -345,6 +285,10 @@ interface TrackingSessionUpsertPayload {
345
285
  landing_utm_campaign?: string | null;
346
286
  landing_utm_term?: string | null;
347
287
  landing_utm_content?: string | null;
288
+ /** The sibling-site session this one arrived from (fresh linker token); first-wins server-side. */
289
+ origin_session_id?: string | null;
290
+ origin_visitor_id?: string | null;
291
+ origin_linked_at?: string | null;
348
292
  first_page: string | null;
349
293
  consent_state: Record<string, unknown> | null;
350
294
  context: TrackingClientContext;
@@ -426,6 +370,8 @@ declare global {
426
370
  optOut: (options?: SetConsentOptions) => void;
427
371
  resetConsent: () => void;
428
372
  trackEvent: (eventType: string, metadata: Record<string, unknown>) => void;
373
+ /** Append the cross-site identity token to a sibling-site URL. */
374
+ decorateUrl: (url: string) => string;
429
375
  };
430
376
  }
431
377
  }
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod/mini';
2
2
  import { CountryCode } from 'libphonenumber-js';
3
3
 
4
4
  /**
@@ -11,7 +11,7 @@ import { CountryCode } from 'libphonenumber-js';
11
11
  type JsonValue = string | number | boolean | null | JsonValue[] | {
12
12
  [key: string]: JsonValue;
13
13
  };
14
- declare const jsonValueSchema: z.ZodType<JsonValue>;
14
+ declare const jsonValueSchema: z.ZodMiniType<JsonValue>;
15
15
  /**
16
16
  * Metadata for a manually fired `form_submit` event.
17
17
  *
@@ -49,81 +49,21 @@ declare const jsonValueSchema: z.ZodType<JsonValue>;
49
49
  * });
50
50
  * ```
51
51
  */
52
- declare const formSubmitMetadataSchema: z.ZodObject<{
53
- form: z.ZodObject<{
54
- id: z.ZodString;
55
- action: z.ZodNullable<z.ZodString>;
56
- fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
57
- name: z.ZodString;
58
- type: z.ZodString;
59
- label: z.ZodNullable<z.ZodString>;
60
- value: z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>;
61
- }, "strict", z.ZodTypeAny, {
62
- value: JsonValue;
63
- type: string;
64
- name: string;
65
- label: string | null;
66
- }, {
67
- value: JsonValue;
68
- type: string;
69
- name: string;
70
- label: string | null;
71
- }>, "many">>;
72
- }, "strict", z.ZodTypeAny, {
73
- id: string;
74
- action: string | null;
75
- fields?: {
76
- value: JsonValue;
77
- type: string;
78
- name: string;
79
- label: string | null;
80
- }[] | undefined;
81
- }, {
82
- id: string;
83
- action: string | null;
84
- fields?: {
85
- value: JsonValue;
86
- type: string;
87
- name: string;
88
- label: string | null;
89
- }[] | undefined;
90
- }>;
91
- page: z.ZodObject<{
92
- path: z.ZodString;
93
- }, "strict", z.ZodTypeAny, {
94
- path: string;
95
- }, {
96
- path: string;
97
- }>;
98
- }, "strict", z.ZodTypeAny, {
99
- form: {
100
- id: string;
101
- action: string | null;
102
- fields?: {
103
- value: JsonValue;
104
- type: string;
105
- name: string;
106
- label: string | null;
107
- }[] | undefined;
108
- };
109
- page: {
110
- path: string;
111
- };
112
- }, {
113
- form: {
114
- id: string;
115
- action: string | null;
116
- fields?: {
117
- value: JsonValue;
118
- type: string;
119
- name: string;
120
- label: string | null;
121
- }[] | undefined;
122
- };
123
- page: {
124
- path: string;
125
- };
126
- }>;
52
+ declare const formSubmitMetadataSchema: z.ZodMiniObject<{
53
+ form: z.ZodMiniObject<{
54
+ id: z.ZodMiniString<string>;
55
+ action: z.ZodMiniNullable<z.ZodMiniString<string>>;
56
+ fields: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
57
+ name: z.ZodMiniString<string>;
58
+ type: z.ZodMiniString<string>;
59
+ label: z.ZodMiniNullable<z.ZodMiniString<string>>;
60
+ value: z.ZodMiniType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
61
+ }, z.core.$strict>>>;
62
+ }, z.core.$strict>;
63
+ page: z.ZodMiniObject<{
64
+ path: z.ZodMiniString<string>;
65
+ }, z.core.$strict>;
66
+ }, z.core.$strict>;
127
67
  type FormSubmitMetadata = z.infer<typeof formSubmitMetadataSchema>;
128
68
  /**
129
69
  * Registration config for `form_submit`.
@@ -131,7 +71,7 @@ type FormSubmitMetadata = z.infer<typeof formSubmitMetadataSchema>;
131
71
  * This event is manual-only and currently has no registration options. The
132
72
  * empty object enables typed `trackEvent('form_submit', ...)` calls.
133
73
  */
134
- declare const formSubmitConfigSchema: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
74
+ declare const formSubmitConfigSchema: z.ZodMiniObject<{}, z.core.$strict>;
135
75
  type FormSubmitConfig = z.infer<typeof formSubmitConfigSchema>;
136
76
 
137
77
  /**
@@ -345,6 +285,10 @@ interface TrackingSessionUpsertPayload {
345
285
  landing_utm_campaign?: string | null;
346
286
  landing_utm_term?: string | null;
347
287
  landing_utm_content?: string | null;
288
+ /** The sibling-site session this one arrived from (fresh linker token); first-wins server-side. */
289
+ origin_session_id?: string | null;
290
+ origin_visitor_id?: string | null;
291
+ origin_linked_at?: string | null;
348
292
  first_page: string | null;
349
293
  consent_state: Record<string, unknown> | null;
350
294
  context: TrackingClientContext;
@@ -426,6 +370,8 @@ declare global {
426
370
  optOut: (options?: SetConsentOptions) => void;
427
371
  resetConsent: () => void;
428
372
  trackEvent: (eventType: string, metadata: Record<string, unknown>) => void;
373
+ /** Append the cross-site identity token to a sibling-site URL. */
374
+ decorateUrl: (url: string) => string;
429
375
  };
430
376
  }
431
377
  }
package/dist/phone.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- export { i as DEFAULT_PHONE_COUNTRY, P as ParsedPhone, k as PhoneConfig, l as PhoneDisplayFormat, m as TrackedField, q as formatPhone, r as formatPhoneAsTyped, y as parsePhone, z as phoneField, E as toE164 } from './phone-utils-BVzSNBf1.mjs';
1
+ export { i as DEFAULT_PHONE_COUNTRY, P as ParsedPhone, k as PhoneConfig, l as PhoneDisplayFormat, m as TrackedField, q as formatPhone, r as formatPhoneAsTyped, y as parsePhone, z as phoneField, E as toE164 } from './phone-utils-C0ds6cqZ.mjs';
2
2
  export { CountryCode } from 'libphonenumber-js';
3
- import 'zod';
3
+ import 'zod/mini';
package/dist/phone.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { i as DEFAULT_PHONE_COUNTRY, P as ParsedPhone, k as PhoneConfig, l as PhoneDisplayFormat, m as TrackedField, q as formatPhone, r as formatPhoneAsTyped, y as parsePhone, z as phoneField, E as toE164 } from './phone-utils-BVzSNBf1.js';
1
+ export { i as DEFAULT_PHONE_COUNTRY, P as ParsedPhone, k as PhoneConfig, l as PhoneDisplayFormat, m as TrackedField, q as formatPhone, r as formatPhoneAsTyped, y as parsePhone, z as phoneField, E as toE164 } from './phone-utils-C0ds6cqZ.js';
2
2
  export { CountryCode } from 'libphonenumber-js';
3
- import 'zod';
3
+ import 'zod/mini';