@aranova/tracking-react 1.14.0 → 1.15.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.
@@ -1,7 +1,60 @@
1
- import { J as JsonValue } from './form-submit-C_vJXCxh.js';
2
1
  import * as z from 'zod/mini';
3
2
  import { CountryCode } from 'libphonenumber-js';
4
3
 
4
+ /**
5
+ * JSON-serializable value accepted by `form_submit.fields[].value`.
6
+ *
7
+ * This intentionally excludes `undefined`, functions, symbols, `Date`
8
+ * instances, and non-finite numbers. Values are stored in PostgreSQL JSONB, so
9
+ * consumers should send only data that has a stable JSON representation.
10
+ */
11
+ type JsonValue = string | number | boolean | null | JsonValue[] | {
12
+ [key: string]: JsonValue;
13
+ };
14
+ /** What the SDK's ladder found wrong with a submit it sent anyway (ADR-0024 §6). */
15
+ declare const contractViolationSchema: z.ZodMiniObject<{
16
+ role: z.ZodMiniNullable<z.ZodMiniString<string>>;
17
+ rule: z.ZodMiniString<string>;
18
+ }, z.core.$strict>;
19
+ type FormContractViolation = z.infer<typeof contractViolationSchema>;
20
+ declare const formSubmitMetadataSchema: z.ZodMiniObject<{
21
+ form: z.ZodMiniObject<{
22
+ id: z.ZodMiniString<string>;
23
+ action: z.ZodMiniNullable<z.ZodMiniString<string>>;
24
+ fields: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
25
+ name: z.ZodMiniString<string>;
26
+ type: z.ZodMiniString<string>;
27
+ label: z.ZodMiniNullable<z.ZodMiniString<string>>;
28
+ value: z.ZodMiniType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
29
+ role: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
30
+ }, z.core.$strict>>>;
31
+ kind: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
32
+ contract_version: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniInt>>;
33
+ contract_hash: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
34
+ extra: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniArray<z.ZodMiniObject<{
35
+ key: z.ZodMiniString<string>;
36
+ label: z.ZodMiniString<string>;
37
+ value: z.ZodMiniType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
38
+ }, z.core.$strict>>>>;
39
+ contract_violations: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniArray<z.ZodMiniObject<{
40
+ role: z.ZodMiniNullable<z.ZodMiniString<string>>;
41
+ rule: z.ZodMiniString<string>;
42
+ }, z.core.$strict>>>>;
43
+ }, z.core.$strict>;
44
+ page: z.ZodMiniObject<{
45
+ path: z.ZodMiniString<string>;
46
+ }, z.core.$strict>;
47
+ }, z.core.$strict>;
48
+ type FormSubmitMetadata = z.infer<typeof formSubmitMetadataSchema>;
49
+ /**
50
+ * Registration config for `form_submit`.
51
+ *
52
+ * This event is manual-only and currently has no registration options. The
53
+ * empty object enables typed `trackEvent('form_submit', ...)` calls.
54
+ */
55
+ declare const formSubmitConfigSchema: z.ZodMiniObject<{}, z.core.$strict>;
56
+ type FormSubmitConfig = z.infer<typeof formSubmitConfigSchema>;
57
+
5
58
  /** Bump-on-change registry version; travels on every contract-typed form_submit. */
6
59
  declare const LEAD_FORM_REGISTRY_VERSION = 2;
7
60
  declare const LEAD_FORM_KINDS: readonly ["booking", "quote", "contact", "consult", "callback"];
@@ -569,4 +622,4 @@ declare function optOut(options?: SetConsentOptions): void;
569
622
  */
570
623
  declare function resetConsent(): void;
571
624
 
572
- export { leadFormPrimitiveSchemas as A, onConsentChange as B, type ConsentChoice as C, DEFAULT_DECLINE_TTL_DAYS as D, optIn as E, optOut as F, type GtagEnvironmentMap as G, parsePhone as H, phoneField as I, resetConsent as J, setConsentState as K, LEAD_FORM_KINDS as L, type MetaPixelEnvironmentMap as M, toE164 as N, type ParsedPhone as P, type SetConsentOptions as S, type TrackingParams as T, type TrackingInstallSurface as a, type TrackingEnvironment as b, type TrackingClientContext as c, type TrackingEventCreatePayload as d, type TrackingSessionUpsertPayload as e, type ConsentChoiceState as f, type ConsentSource as g, type ConsentState as h, DEFAULT_PHONE_COUNTRY as i, LEAD_FORM_PRIMITIVES as j, LEAD_FORM_REGISTRY_VERSION as k, LEAD_FORM_ROLES as l, LEAD_FORM_ROLE_SPECS as m, type LeadFormKind as n, type LeadFormPrimitive as o, type LeadFormRole as p, type LeadFormRoleOption as q, type LeadFormRoleSpec as r, type PhoneConfig as s, type PhoneDisplayFormat as t, type TrackedField as u, type TrackingInitConfig as v, formatPhone as w, formatPhoneAsTyped as x, getConsentChoice as y, getConsentState as z };
625
+ export { getConsentChoice as A, getConsentState as B, type ConsentChoice as C, DEFAULT_DECLINE_TTL_DAYS as D, leadFormPrimitiveSchemas as E, type FormContractViolation as F, type GtagEnvironmentMap as G, onConsentChange as H, optIn as I, type JsonValue as J, optOut as K, LEAD_FORM_KINDS as L, type MetaPixelEnvironmentMap as M, parsePhone as N, phoneField as O, type ParsedPhone as P, resetConsent as Q, setConsentState as R, type SetConsentOptions as S, type TrackingParams as T, toE164 as U, type TrackingInstallSurface as a, type TrackingEnvironment as b, type TrackingClientContext as c, type TrackingEventCreatePayload as d, type TrackingSessionUpsertPayload as e, type ConsentChoiceState as f, type ConsentSource as g, type ConsentState as h, DEFAULT_PHONE_COUNTRY as i, type FormSubmitConfig as j, type FormSubmitMetadata as k, LEAD_FORM_PRIMITIVES as l, LEAD_FORM_REGISTRY_VERSION as m, LEAD_FORM_ROLES as n, LEAD_FORM_ROLE_SPECS as o, type LeadFormKind as p, type LeadFormPrimitive as q, type LeadFormRole as r, type LeadFormRoleOption as s, type LeadFormRoleSpec as t, type PhoneConfig as u, type PhoneDisplayFormat as v, type TrackedField as w, type TrackingInitConfig as x, formatPhone as y, formatPhoneAsTyped as z };
package/dist/phone.d.mts CHANGED
@@ -1,4 +1,3 @@
1
- export { i as DEFAULT_PHONE_COUNTRY, P as ParsedPhone, s as PhoneConfig, t as PhoneDisplayFormat, u as TrackedField, w as formatPhone, x as formatPhoneAsTyped, H as parsePhone, I as phoneField, N as toE164 } from './phone-utils-Cfdx474X.mjs';
1
+ export { i as DEFAULT_PHONE_COUNTRY, P as ParsedPhone, u as PhoneConfig, v as PhoneDisplayFormat, w as TrackedField, y as formatPhone, z as formatPhoneAsTyped, N as parsePhone, O as phoneField, U as toE164 } from './phone-utils-CYr6AmEP.mjs';
2
2
  export { CountryCode } from 'libphonenumber-js';
3
- import './form-submit-C_vJXCxh.mjs';
4
3
  import 'zod/mini';
package/dist/phone.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export { i as DEFAULT_PHONE_COUNTRY, P as ParsedPhone, s as PhoneConfig, t as PhoneDisplayFormat, u as TrackedField, w as formatPhone, x as formatPhoneAsTyped, H as parsePhone, I as phoneField, N as toE164 } from './phone-utils-D2TGPCQW.js';
1
+ export { i as DEFAULT_PHONE_COUNTRY, P as ParsedPhone, u as PhoneConfig, v as PhoneDisplayFormat, w as TrackedField, y as formatPhone, z as formatPhoneAsTyped, N as parsePhone, O as phoneField, U as toE164 } from './phone-utils-CYr6AmEP.js';
2
2
  export { CountryCode } from 'libphonenumber-js';
3
- import './form-submit-C_vJXCxh.js';
4
3
  import 'zod/mini';
@@ -1,5 +1,5 @@
1
1
  import * as z from 'zod/mini';
2
- import { S as SalesBookingsClient, l as ConversionConfigStore, s as TrackingConfigRuntime } from './bookings-Bw2ImtPd.js';
2
+ import { S as SalesBookingsClient, w as ConversionConfigStore, _ as TrackingConfigRuntime } from './bookings-CkfA5XOM.js';
3
3
  import { CountryCode } from 'libphonenumber-js';
4
4
 
5
5
  /** Raw identifiers a caller may hand us (normalized before use). */
@@ -1,5 +1,5 @@
1
1
  import * as z from 'zod/mini';
2
- import { S as SalesBookingsClient, l as ConversionConfigStore, s as TrackingConfigRuntime } from './bookings-CDGNZUaH.mjs';
2
+ import { S as SalesBookingsClient, w as ConversionConfigStore, _ as TrackingConfigRuntime } from './bookings-DFz3BUiP.mjs';
3
3
  import { CountryCode } from 'libphonenumber-js';
4
4
 
5
5
  /** Raw identifiers a caller may hand us (normalized before use). */
package/dist/sales.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- export { A as AranovaApiError, B as BusinessConfig, a as BusinessConfigFeatures, b as BusinessConfigService, C as CompareTo, d as CurrencyRevenue, e as CustomerCurrencyDelta, f as CustomerCurrencyTotal, g as CustomerGetOptions, h as CustomerGetResult, i as CustomerKpis, j as CustomerKpisDeltas, k as CustomerKpisPrevious, l as CustomerListPage, m as CustomerListQuery, n as CustomerProfile, o as CustomerSegment, p as CustomerSegmentCount, q as CustomerSortField, r as CustomerSummary, s as CustomerSummaryQuery, D as DistinctCustomersByCurrency, E as EffectiveSaleProperty, G as Granularity, N as NAMED_RANGES, t as NamedRange, P as PublicServiceItem, S as SALE_SOURCES, u as SUPPORTED_CURRENCIES, v as Sale, w as SaleBuiltinRequirableField, x as SaleCursorPage, y as SaleFilters, z as SaleInput, F as SaleItem, H as SaleItemInput, I as SaleKeysetSortField, J as SaleListPage, K as SaleListQuery, L as SaleListQueryV2, M as SalePropertyOption, O as SalePropertyType, Q as SaleService, R as SaleServiceInput, T as SaleSortField, U as SaleSortOrder, V as SaleSource, W as SaleSourceFacts, X as SaleSummary, Y as SaleSummaryPrevious, Z as SaleSummaryQuery, _ as SaleSummaryQueryV2, $ as SaleSummaryV2, a0 as SaleUpdateInput, a1 as SalesBusinessClient, a2 as SalesCategoryBreakdown, a3 as SalesClient, a4 as SalesClientConfig, a5 as SalesCustomersClient, a6 as SalesServiceBreakdown, a7 as SalesTransportConfig, a8 as SalesTrendPoint, a9 as SummaryCurrencyDelta, aa as SummaryDeltas, ab as SummaryWindow, ac as SupportedCurrency, ad as TRACKING_RANGES, ae as TrackingOverviewRange, ag as createSalesClient, ah as currencySchema, ai as fetchServices, aj as formatDateInTz, ak as formatMoney, al as fromMinor, am as saleCreateSchema, an as saleItemSchema, ao as saleServiceSchema, ap as saleUpdateSchema, aq as salesRequest, as as toMinor } from './sales-D4aU73mR.mjs';
2
- export { B as BookingDetailsFailure, a as BookingDetailsInput, b as BookingDetailsOptions, c as BookingDetailsOutcome, d as BookingDetailsStatus, e as BookingDropOff, f as BookingFormSubmit, g as BookingInput, h as BookingMode, i as BookingOutcome, j as BookingSimulation, k as BookingSubmitOptions, F as FormSubmitField, S as SalesBookingsClient, n as newBookingAttemptKey } from './bookings-CDGNZUaH.mjs';
1
+ export { A as AranovaApiError, B as BusinessConfig, a as BusinessConfigFeatures, b as BusinessConfigService, C as CompareTo, d as CurrencyRevenue, e as CustomerCurrencyDelta, f as CustomerCurrencyTotal, g as CustomerGetOptions, h as CustomerGetResult, i as CustomerKpis, j as CustomerKpisDeltas, k as CustomerKpisPrevious, l as CustomerListPage, m as CustomerListQuery, n as CustomerProfile, o as CustomerSegment, p as CustomerSegmentCount, q as CustomerSortField, r as CustomerSummary, s as CustomerSummaryQuery, D as DistinctCustomersByCurrency, E as EffectiveSaleProperty, G as Granularity, N as NAMED_RANGES, t as NamedRange, P as PublicServiceItem, S as SALE_SOURCES, u as SUPPORTED_CURRENCIES, v as Sale, w as SaleBuiltinRequirableField, x as SaleCursorPage, y as SaleFilters, z as SaleInput, F as SaleItem, H as SaleItemInput, I as SaleKeysetSortField, J as SaleListPage, K as SaleListQuery, L as SaleListQueryV2, M as SalePropertyOption, O as SalePropertyType, Q as SaleService, R as SaleServiceInput, T as SaleSortField, U as SaleSortOrder, V as SaleSource, W as SaleSourceFacts, X as SaleSummary, Y as SaleSummaryPrevious, Z as SaleSummaryQuery, _ as SaleSummaryQueryV2, $ as SaleSummaryV2, a0 as SaleUpdateInput, a1 as SalesBusinessClient, a2 as SalesCategoryBreakdown, a3 as SalesClient, a4 as SalesClientConfig, a5 as SalesCustomersClient, a6 as SalesServiceBreakdown, a7 as SalesTransportConfig, a8 as SalesTrendPoint, a9 as SummaryCurrencyDelta, aa as SummaryDeltas, ab as SummaryWindow, ac as SupportedCurrency, ad as TRACKING_RANGES, ae as TrackingOverviewRange, ag as createSalesClient, ah as currencySchema, ai as fetchServices, aj as formatDateInTz, ak as formatMoney, al as fromMinor, am as saleCreateSchema, an as saleItemSchema, ao as saleServiceSchema, ap as saleUpdateSchema, aq as salesRequest, as as toMinor } from './sales-KbTcowYa.mjs';
2
+ export { a as BookingDetailsFailure, b as BookingDetailsInput, c as BookingDetailsOptions, d as BookingDetailsOutcome, e as BookingDetailsStatus, f as BookingDropOff, g as BookingFormSubmit, i as BookingInput, j as BookingInputFor, l as BookingMode, p as BookingOutcome, s as BookingServiceKey, t as BookingSimulation, u as BookingSubmitOptions, v as BookingVehicle, F as FormSubmitField, S as SalesBookingsClient, R as newBookingAttemptKey } from './bookings-DFz3BUiP.mjs';
3
3
  import 'zod/mini';
4
4
  import 'libphonenumber-js';
5
- import './form-submit-C_vJXCxh.mjs';
5
+ import './phone-utils-CYr6AmEP.mjs';
package/dist/sales.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { A as AranovaApiError, B as BusinessConfig, a as BusinessConfigFeatures, b as BusinessConfigService, C as CompareTo, d as CurrencyRevenue, e as CustomerCurrencyDelta, f as CustomerCurrencyTotal, g as CustomerGetOptions, h as CustomerGetResult, i as CustomerKpis, j as CustomerKpisDeltas, k as CustomerKpisPrevious, l as CustomerListPage, m as CustomerListQuery, n as CustomerProfile, o as CustomerSegment, p as CustomerSegmentCount, q as CustomerSortField, r as CustomerSummary, s as CustomerSummaryQuery, D as DistinctCustomersByCurrency, E as EffectiveSaleProperty, G as Granularity, N as NAMED_RANGES, t as NamedRange, P as PublicServiceItem, S as SALE_SOURCES, u as SUPPORTED_CURRENCIES, v as Sale, w as SaleBuiltinRequirableField, x as SaleCursorPage, y as SaleFilters, z as SaleInput, F as SaleItem, H as SaleItemInput, I as SaleKeysetSortField, J as SaleListPage, K as SaleListQuery, L as SaleListQueryV2, M as SalePropertyOption, O as SalePropertyType, Q as SaleService, R as SaleServiceInput, T as SaleSortField, U as SaleSortOrder, V as SaleSource, W as SaleSourceFacts, X as SaleSummary, Y as SaleSummaryPrevious, Z as SaleSummaryQuery, _ as SaleSummaryQueryV2, $ as SaleSummaryV2, a0 as SaleUpdateInput, a1 as SalesBusinessClient, a2 as SalesCategoryBreakdown, a3 as SalesClient, a4 as SalesClientConfig, a5 as SalesCustomersClient, a6 as SalesServiceBreakdown, a7 as SalesTransportConfig, a8 as SalesTrendPoint, a9 as SummaryCurrencyDelta, aa as SummaryDeltas, ab as SummaryWindow, ac as SupportedCurrency, ad as TRACKING_RANGES, ae as TrackingOverviewRange, ag as createSalesClient, ah as currencySchema, ai as fetchServices, aj as formatDateInTz, ak as formatMoney, al as fromMinor, am as saleCreateSchema, an as saleItemSchema, ao as saleServiceSchema, ap as saleUpdateSchema, aq as salesRequest, as as toMinor } from './sales-DkdrGIUS.js';
2
- export { B as BookingDetailsFailure, a as BookingDetailsInput, b as BookingDetailsOptions, c as BookingDetailsOutcome, d as BookingDetailsStatus, e as BookingDropOff, f as BookingFormSubmit, g as BookingInput, h as BookingMode, i as BookingOutcome, j as BookingSimulation, k as BookingSubmitOptions, F as FormSubmitField, S as SalesBookingsClient, n as newBookingAttemptKey } from './bookings-Bw2ImtPd.js';
1
+ export { A as AranovaApiError, B as BusinessConfig, a as BusinessConfigFeatures, b as BusinessConfigService, C as CompareTo, d as CurrencyRevenue, e as CustomerCurrencyDelta, f as CustomerCurrencyTotal, g as CustomerGetOptions, h as CustomerGetResult, i as CustomerKpis, j as CustomerKpisDeltas, k as CustomerKpisPrevious, l as CustomerListPage, m as CustomerListQuery, n as CustomerProfile, o as CustomerSegment, p as CustomerSegmentCount, q as CustomerSortField, r as CustomerSummary, s as CustomerSummaryQuery, D as DistinctCustomersByCurrency, E as EffectiveSaleProperty, G as Granularity, N as NAMED_RANGES, t as NamedRange, P as PublicServiceItem, S as SALE_SOURCES, u as SUPPORTED_CURRENCIES, v as Sale, w as SaleBuiltinRequirableField, x as SaleCursorPage, y as SaleFilters, z as SaleInput, F as SaleItem, H as SaleItemInput, I as SaleKeysetSortField, J as SaleListPage, K as SaleListQuery, L as SaleListQueryV2, M as SalePropertyOption, O as SalePropertyType, Q as SaleService, R as SaleServiceInput, T as SaleSortField, U as SaleSortOrder, V as SaleSource, W as SaleSourceFacts, X as SaleSummary, Y as SaleSummaryPrevious, Z as SaleSummaryQuery, _ as SaleSummaryQueryV2, $ as SaleSummaryV2, a0 as SaleUpdateInput, a1 as SalesBusinessClient, a2 as SalesCategoryBreakdown, a3 as SalesClient, a4 as SalesClientConfig, a5 as SalesCustomersClient, a6 as SalesServiceBreakdown, a7 as SalesTransportConfig, a8 as SalesTrendPoint, a9 as SummaryCurrencyDelta, aa as SummaryDeltas, ab as SummaryWindow, ac as SupportedCurrency, ad as TRACKING_RANGES, ae as TrackingOverviewRange, ag as createSalesClient, ah as currencySchema, ai as fetchServices, aj as formatDateInTz, ak as formatMoney, al as fromMinor, am as saleCreateSchema, an as saleItemSchema, ao as saleServiceSchema, ap as saleUpdateSchema, aq as salesRequest, as as toMinor } from './sales-C0FMkN4m.js';
2
+ export { a as BookingDetailsFailure, b as BookingDetailsInput, c as BookingDetailsOptions, d as BookingDetailsOutcome, e as BookingDetailsStatus, f as BookingDropOff, g as BookingFormSubmit, i as BookingInput, j as BookingInputFor, l as BookingMode, p as BookingOutcome, s as BookingServiceKey, t as BookingSimulation, u as BookingSubmitOptions, v as BookingVehicle, F as FormSubmitField, S as SalesBookingsClient, R as newBookingAttemptKey } from './bookings-CkfA5XOM.js';
3
3
  import 'zod/mini';
4
4
  import 'libphonenumber-js';
5
- import './form-submit-C_vJXCxh.js';
5
+ import './phone-utils-CYr6AmEP.js';