@aranova/tracking-react 1.13.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/dist/{bookings-C1HMPjQl.d.ts → bookings-Bw2ImtPd.d.ts} +1 -1
- package/dist/{bookings-CHpplXU7.d.mts → bookings-CDGNZUaH.d.mts} +1 -1
- package/dist/client.d.mts +5 -4
- package/dist/client.d.ts +5 -4
- package/dist/client.js +365 -40
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +363 -39
- package/dist/client.mjs.map +1 -1
- package/dist/{form-submit-CX-CxJjQ.d.mts → form-submit-C_vJXCxh.d.mts} +11 -1
- package/dist/{form-submit-CX-CxJjQ.d.ts → form-submit-C_vJXCxh.d.ts} +11 -1
- package/dist/index.d.mts +9 -180
- package/dist/index.d.ts +9 -180
- package/dist/index.js +28 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -3
- package/dist/index.mjs.map +1 -1
- package/dist/{phone-utils-D12FW8tT.d.ts → phone-utils-Cfdx474X.d.mts} +178 -3
- package/dist/{phone-utils-BNiSqeF7.d.mts → phone-utils-D2TGPCQW.d.ts} +178 -3
- package/dist/phone.d.mts +2 -2
- package/dist/phone.d.ts +2 -2
- package/dist/phone.js +2 -2
- package/dist/phone.js.map +1 -1
- package/dist/phone.mjs +2 -2
- package/dist/phone.mjs.map +1 -1
- package/dist/{sales-YUH3bQl9.d.mts → sales-D4aU73mR.d.mts} +1 -1
- package/dist/{sales-CNvzyF5T.d.ts → sales-DkdrGIUS.d.ts} +1 -1
- package/dist/sales.d.mts +3 -3
- package/dist/sales.d.ts +3 -3
- package/dist/sales.js.map +1 -1
- package/dist/sales.mjs.map +1 -1
- package/dist/{ingest-typed-Ckt4R731.d.mts → submit-DuvP5AGN.d.ts} +161 -4
- package/dist/{ingest-typed-sCDoPInT.d.ts → submit-rqgXl-Wg.d.mts} +161 -4
- package/package.json +1 -1
|
@@ -10,6 +10,12 @@ import * as z from 'zod/mini';
|
|
|
10
10
|
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
11
11
|
[key: string]: JsonValue;
|
|
12
12
|
};
|
|
13
|
+
/** What the SDK's ladder found wrong with a submit it sent anyway (ADR-0024 §6). */
|
|
14
|
+
declare const contractViolationSchema: z.ZodMiniObject<{
|
|
15
|
+
role: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
16
|
+
rule: z.ZodMiniString<string>;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
type FormContractViolation = z.infer<typeof contractViolationSchema>;
|
|
13
19
|
declare const formSubmitMetadataSchema: z.ZodMiniObject<{
|
|
14
20
|
form: z.ZodMiniObject<{
|
|
15
21
|
id: z.ZodMiniString<string>;
|
|
@@ -29,6 +35,10 @@ declare const formSubmitMetadataSchema: z.ZodMiniObject<{
|
|
|
29
35
|
label: z.ZodMiniString<string>;
|
|
30
36
|
value: z.ZodMiniType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
31
37
|
}, z.core.$strict>>>>;
|
|
38
|
+
contract_violations: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniArray<z.ZodMiniObject<{
|
|
39
|
+
role: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
40
|
+
rule: z.ZodMiniString<string>;
|
|
41
|
+
}, z.core.$strict>>>>;
|
|
32
42
|
}, z.core.$strict>;
|
|
33
43
|
page: z.ZodMiniObject<{
|
|
34
44
|
path: z.ZodMiniString<string>;
|
|
@@ -44,4 +54,4 @@ type FormSubmitMetadata = z.infer<typeof formSubmitMetadataSchema>;
|
|
|
44
54
|
declare const formSubmitConfigSchema: z.ZodMiniObject<{}, z.core.$strict>;
|
|
45
55
|
type FormSubmitConfig = z.infer<typeof formSubmitConfigSchema>;
|
|
46
56
|
|
|
47
|
-
export type {
|
|
57
|
+
export type { FormContractViolation as F, JsonValue as J, FormSubmitConfig as a, FormSubmitMetadata as b };
|
|
@@ -10,6 +10,12 @@ import * as z from 'zod/mini';
|
|
|
10
10
|
type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
11
11
|
[key: string]: JsonValue;
|
|
12
12
|
};
|
|
13
|
+
/** What the SDK's ladder found wrong with a submit it sent anyway (ADR-0024 §6). */
|
|
14
|
+
declare const contractViolationSchema: z.ZodMiniObject<{
|
|
15
|
+
role: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
16
|
+
rule: z.ZodMiniString<string>;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
type FormContractViolation = z.infer<typeof contractViolationSchema>;
|
|
13
19
|
declare const formSubmitMetadataSchema: z.ZodMiniObject<{
|
|
14
20
|
form: z.ZodMiniObject<{
|
|
15
21
|
id: z.ZodMiniString<string>;
|
|
@@ -29,6 +35,10 @@ declare const formSubmitMetadataSchema: z.ZodMiniObject<{
|
|
|
29
35
|
label: z.ZodMiniString<string>;
|
|
30
36
|
value: z.ZodMiniType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
31
37
|
}, z.core.$strict>>>>;
|
|
38
|
+
contract_violations: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniArray<z.ZodMiniObject<{
|
|
39
|
+
role: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
40
|
+
rule: z.ZodMiniString<string>;
|
|
41
|
+
}, z.core.$strict>>>>;
|
|
32
42
|
}, z.core.$strict>;
|
|
33
43
|
page: z.ZodMiniObject<{
|
|
34
44
|
path: z.ZodMiniString<string>;
|
|
@@ -44,4 +54,4 @@ type FormSubmitMetadata = z.infer<typeof formSubmitMetadataSchema>;
|
|
|
44
54
|
declare const formSubmitConfigSchema: z.ZodMiniObject<{}, z.core.$strict>;
|
|
45
55
|
type FormSubmitConfig = z.infer<typeof formSubmitConfigSchema>;
|
|
46
56
|
|
|
47
|
-
export type {
|
|
57
|
+
export type { FormContractViolation as F, JsonValue as J, FormSubmitConfig as a, FormSubmitMetadata as b };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { AdPlatformTracking, AdPlatformTrackingProps, BookedAttempt, BookingHandoffLink, BookingHandoffLinkProps, BookingHandoffOptions, BookingSubmitState, BookingSubmitStatus, ConsentBanner, ConsentBannerProps, CreateTrackingOptions, CreateTrackingResult, GoogleAdsTracking, GoogleAdsTrackingProps, PhoneField, PhoneFieldApi, PhoneFieldProps, PhoneInputProps, TrackingProviderProps, UseConsentResult, UseCookiePreferencesOptions, UseCookiePreferencesResult, UsePhoneFieldOptions, createTracking, useBookingHandoffUrl, useBookingIntegration, useBookingSlots, useBookingSubmit, useConsent, useConsentState, useCookiePreferences, useGclid, usePhoneConfig, usePhoneField, useTrackingParams } from '@aranova/tracking-react/client';
|
|
2
|
-
import { T as TrackingParams, a as TrackingInstallSurface, b as TrackingEnvironment, c as TrackingClientContext, d as TrackingEventCreatePayload, e as TrackingSessionUpsertPayload } from './phone-utils-
|
|
3
|
-
export { C as ConsentChoice, f as ConsentChoiceState, g as ConsentSource, h as ConsentState, D as DEFAULT_DECLINE_TTL_DAYS, i as DEFAULT_PHONE_COUNTRY, G as GtagEnvironmentMap, M as MetaPixelEnvironmentMap, P as ParsedPhone,
|
|
4
|
-
export { A as AranovaApiError, B as BusinessConfig, a as BusinessConfigFeatures, b as BusinessConfigService, C as CompareTo, c as ConversionUserData, 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, af as clearStashedUserData, 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, ar as stashUserData, as as toMinor } from './sales-
|
|
5
|
-
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, C as ConversionConfig, l as ConversionConfigStore, F as FormSubmitField, S as SalesBookingsClient, T as TrackingConfigReference, m as getTrackingConfigRuntime, n as newBookingAttemptKey, r as resolveConversionConfig, o as resolveTrackingConfigUrl } from './bookings-
|
|
6
|
-
export { A as AutomaticEventName, B as BookableDay, a as BookingHandoffPrefill, b as BookingIntegration, c as BookingOption, d as BookingOptionGroup, e as BookingProvider, f as BookingRules, C as CtaClickConfig, g as CtaClickMetadata, E as EVENT_SEMANTICS, h as EventCategory, i as EventClientVisibility, j as EventConfig, k as EventKind, l as EventMetadata, m as EventName, n as EventOutcomeRole, o as EventSemantics, F as FormStartConfig, p as FormStartMetadata, q as FormStepConfig, r as FormStepMetadata, M as ManualEventName,
|
|
7
|
-
export { F as
|
|
8
|
-
import * as z from 'zod/mini';
|
|
1
|
+
export { AdPlatformTracking, AdPlatformTrackingProps, BookedAttempt, BookingHandoffLink, BookingHandoffLinkProps, BookingHandoffOptions, BookingSubmitState, BookingSubmitStatus, ConsentBanner, ConsentBannerProps, CreateTrackingOptions, CreateTrackingResult, GoogleAdsTracking, GoogleAdsTrackingProps, PhoneField, PhoneFieldApi, PhoneFieldProps, PhoneInputProps, TrackingProviderProps, UseConsentResult, UseCookiePreferencesOptions, UseCookiePreferencesResult, UsePhoneFieldOptions, createLeadFormSubmit, createTracking, useBookingHandoffUrl, useBookingIntegration, useBookingSlots, useBookingSubmit, useConsent, useConsentState, useCookiePreferences, useGclid, usePhoneConfig, usePhoneField, useTrackingParams } from '@aranova/tracking-react/client';
|
|
2
|
+
import { T as TrackingParams, a as TrackingInstallSurface, b as TrackingEnvironment, c as TrackingClientContext, d as TrackingEventCreatePayload, e as TrackingSessionUpsertPayload } from './phone-utils-Cfdx474X.mjs';
|
|
3
|
+
export { C as ConsentChoice, f as ConsentChoiceState, g as ConsentSource, h as ConsentState, D as DEFAULT_DECLINE_TTL_DAYS, i as DEFAULT_PHONE_COUNTRY, G as GtagEnvironmentMap, L as LEAD_FORM_KINDS, j as LEAD_FORM_PRIMITIVES, k as LEAD_FORM_REGISTRY_VERSION, l as LEAD_FORM_ROLES, m as LEAD_FORM_ROLE_SPECS, n as LeadFormKind, o as LeadFormPrimitive, p as LeadFormRole, q as LeadFormRoleOption, r as LeadFormRoleSpec, M as MetaPixelEnvironmentMap, P as ParsedPhone, s as PhoneConfig, t as PhoneDisplayFormat, S as SetConsentOptions, u as TrackedField, v as TrackingInitConfig, w as formatPhone, x as formatPhoneAsTyped, y as getConsentChoice, z as getConsentState, A as leadFormPrimitiveSchemas, B as onConsentChange, E as optIn, F as optOut, H as parsePhone, I as phoneField, J as resetConsent, K as setConsentState, N as toE164 } from './phone-utils-Cfdx474X.mjs';
|
|
4
|
+
export { A as AranovaApiError, B as BusinessConfig, a as BusinessConfigFeatures, b as BusinessConfigService, C as CompareTo, c as ConversionUserData, 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, af as clearStashedUserData, 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, ar as stashUserData, as as toMinor } from './sales-D4aU73mR.mjs';
|
|
5
|
+
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, C as ConversionConfig, l as ConversionConfigStore, F as FormSubmitField, S as SalesBookingsClient, T as TrackingConfigReference, m as getTrackingConfigRuntime, n as newBookingAttemptKey, r as resolveConversionConfig, o as resolveTrackingConfigUrl } from './bookings-CDGNZUaH.mjs';
|
|
6
|
+
export { A as AutomaticEventName, B as BookableDay, a as BookingHandoffPrefill, b as BookingIntegration, c as BookingOption, d as BookingOptionGroup, e as BookingProvider, f as BookingRules, C as CtaClickConfig, g as CtaClickMetadata, E as EVENT_SEMANTICS, h as EventCategory, i as EventClientVisibility, j as EventConfig, k as EventKind, l as EventMetadata, m as EventName, n as EventOutcomeRole, o as EventSemantics, F as FormStartConfig, p as FormStartMetadata, q as FormStepConfig, r as FormStepMetadata, L as LeadFormAddress, s as LeadFormContracts, t as LeadFormExtraField, u as LeadFormFields, v as LeadFormKindDecl, w as LeadFormRequirementDecl, x as LeadFormSubmitInput, y as LeadFormSubmitOptions, z as LeadFormSubmitter, D as LeadFormTimeWindow, G as LeadFormTracking, H as LeadFormValue, M as ManualEventName, I as MultiPageSessionConfig, J as MultiPageSessionMetadata, P as PageExitConfig, K as PageExitMetadata, N as PageIdentity, O as PageViewConfig, Q as PageViewMetadata, R as PhoneClickConfig, S as PhoneClickMetadata, T as RegisteredAutomaticEvents, U as RegisteredManualEvents, V as ScrollDepthConfig, W as ScrollDepthMetadata, X as SdkHeartbeatConfig, Y as SdkHeartbeatMetadata, Z as SiteLinkArrivalConfig, _ as SiteLinkArrivalMetadata, $ as SiteLinkClickConfig, a0 as SiteLinkClickMetadata, a1 as SpecificPageName, a2 as SpecificPageVisitConfig, a3 as SpecificPageVisitMetadata, a4 as TimeOnSiteConfig, a5 as TimeOnSiteMetadata, a6 as TrackableEvent, a7 as TriggerRegistryConfig, a8 as TypedTrackEventOptions, a9 as TypedTrackingClient, aa as bookableSlots, ab as buildBookingHandoffUrl, ac as getBookingIntegration, ad as getEventSemantics, ae as groupBookingOptions, af as shopToday, ag as slotFields, ah as timeWindow } from './submit-rqgXl-Wg.mjs';
|
|
7
|
+
export { F as FormContractViolation, a as FormSubmitConfig, b as FormSubmitMetadata, J as JsonValue } from './form-submit-C_vJXCxh.mjs';
|
|
9
8
|
export { CountryCode } from 'libphonenumber-js';
|
|
9
|
+
import 'zod/mini';
|
|
10
10
|
import 'zod/v4/core';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -100,175 +100,4 @@ interface TrackingClient {
|
|
|
100
100
|
destroy: () => void;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
declare const LEAD_FORM_REGISTRY_VERSION = 2;
|
|
105
|
-
declare const LEAD_FORM_KINDS: readonly ["booking", "quote", "contact", "consult", "callback"];
|
|
106
|
-
/** What a form is for; `form_id` stays the instance handle. */
|
|
107
|
-
type LeadFormKind = (typeof LEAD_FORM_KINDS)[number];
|
|
108
|
-
declare const LEAD_FORM_ROLES: readonly ["given_name", "family_name", "phone", "email", "service", "preferred_date", "preferred_time", "note", "visit", "intent", "vehicle", "drop_off", "address", "patient_type", "matter", "language", "products", "goal", "business_type", "lead_volume", "attribution"];
|
|
109
|
-
/** A role from the registry, or `add_on:<key>` for a yes/no extra with its own label. */
|
|
110
|
-
type LeadFormRole = (typeof LEAD_FORM_ROLES)[number] | `add_on:${string}`;
|
|
111
|
-
declare const LEAD_FORM_PRIMITIVES: readonly ["string", "text", "enum", "multi_enum", "bool", "date", "time_window", "phone", "email", "address", "number"];
|
|
112
|
-
type LeadFormPrimitive = (typeof LEAD_FORM_PRIMITIVES)[number];
|
|
113
|
-
/** The wire schema of each primitive's value. */
|
|
114
|
-
declare const leadFormPrimitiveSchemas: {
|
|
115
|
-
readonly string: z.ZodMiniString<string>;
|
|
116
|
-
readonly text: z.ZodMiniString<string>;
|
|
117
|
-
readonly enum: z.ZodMiniString<string>;
|
|
118
|
-
readonly multi_enum: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
119
|
-
readonly bool: z.ZodMiniBoolean<boolean>;
|
|
120
|
-
readonly date: z.ZodMiniString<string>;
|
|
121
|
-
readonly time_window: z.ZodMiniObject<{
|
|
122
|
-
start: z.ZodMiniString<string>;
|
|
123
|
-
end: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
124
|
-
label: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
125
|
-
}, z.core.$strict>;
|
|
126
|
-
readonly phone: z.ZodMiniString<string>;
|
|
127
|
-
readonly email: z.ZodMiniString<string>;
|
|
128
|
-
readonly address: z.ZodMiniObject<{
|
|
129
|
-
line1: z.ZodMiniString<string>;
|
|
130
|
-
line2: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
131
|
-
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
132
|
-
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
133
|
-
postal_code: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
134
|
-
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
135
|
-
}, z.core.$strict>;
|
|
136
|
-
readonly number: z.ZodMiniNumber<number>;
|
|
137
|
-
};
|
|
138
|
-
interface LeadFormRoleOption {
|
|
139
|
-
key: string;
|
|
140
|
-
label: string;
|
|
141
|
-
isNonAnswer?: true;
|
|
142
|
-
}
|
|
143
|
-
interface LeadFormRoleSpec {
|
|
144
|
-
primitive: LeadFormPrimitive;
|
|
145
|
-
smsLabel: string;
|
|
146
|
-
contactIdentity?: true;
|
|
147
|
-
uninteresting?: true;
|
|
148
|
-
options?: readonly LeadFormRoleOption[];
|
|
149
|
-
}
|
|
150
|
-
/** Every role's primitive and text label; `add_on` is the template for `add_on:<key>`. */
|
|
151
|
-
declare const LEAD_FORM_ROLE_SPECS: {
|
|
152
|
-
readonly given_name: {
|
|
153
|
-
readonly primitive: "string";
|
|
154
|
-
readonly smsLabel: "";
|
|
155
|
-
readonly contactIdentity: true;
|
|
156
|
-
};
|
|
157
|
-
readonly family_name: {
|
|
158
|
-
readonly primitive: "string";
|
|
159
|
-
readonly smsLabel: "";
|
|
160
|
-
readonly contactIdentity: true;
|
|
161
|
-
};
|
|
162
|
-
readonly phone: {
|
|
163
|
-
readonly primitive: "phone";
|
|
164
|
-
readonly smsLabel: "";
|
|
165
|
-
readonly contactIdentity: true;
|
|
166
|
-
};
|
|
167
|
-
readonly email: {
|
|
168
|
-
readonly primitive: "email";
|
|
169
|
-
readonly smsLabel: "";
|
|
170
|
-
readonly contactIdentity: true;
|
|
171
|
-
};
|
|
172
|
-
readonly service: {
|
|
173
|
-
readonly primitive: "multi_enum";
|
|
174
|
-
readonly smsLabel: "Service";
|
|
175
|
-
};
|
|
176
|
-
readonly preferred_date: {
|
|
177
|
-
readonly primitive: "date";
|
|
178
|
-
readonly smsLabel: "Date";
|
|
179
|
-
};
|
|
180
|
-
readonly preferred_time: {
|
|
181
|
-
readonly primitive: "time_window";
|
|
182
|
-
readonly smsLabel: "Time";
|
|
183
|
-
};
|
|
184
|
-
readonly note: {
|
|
185
|
-
readonly primitive: "text";
|
|
186
|
-
readonly smsLabel: "Note";
|
|
187
|
-
};
|
|
188
|
-
readonly visit: {
|
|
189
|
-
readonly primitive: "enum";
|
|
190
|
-
readonly smsLabel: "Visit";
|
|
191
|
-
readonly options: readonly [{
|
|
192
|
-
readonly key: "in-shop";
|
|
193
|
-
readonly label: "In shop";
|
|
194
|
-
}, {
|
|
195
|
-
readonly key: "in-home";
|
|
196
|
-
readonly label: "In home";
|
|
197
|
-
}, {
|
|
198
|
-
readonly key: "remote";
|
|
199
|
-
readonly label: "Remote";
|
|
200
|
-
}, {
|
|
201
|
-
readonly key: "on-site";
|
|
202
|
-
readonly label: "On site";
|
|
203
|
-
}];
|
|
204
|
-
};
|
|
205
|
-
readonly intent: {
|
|
206
|
-
readonly primitive: "enum";
|
|
207
|
-
readonly smsLabel: "Wants";
|
|
208
|
-
readonly options: readonly [{
|
|
209
|
-
readonly key: "book";
|
|
210
|
-
readonly label: "Book";
|
|
211
|
-
}, {
|
|
212
|
-
readonly key: "quote";
|
|
213
|
-
readonly label: "Quote";
|
|
214
|
-
}];
|
|
215
|
-
};
|
|
216
|
-
readonly vehicle: {
|
|
217
|
-
readonly primitive: "string";
|
|
218
|
-
readonly smsLabel: "Vehicle";
|
|
219
|
-
};
|
|
220
|
-
readonly drop_off: {
|
|
221
|
-
readonly primitive: "enum";
|
|
222
|
-
readonly smsLabel: "Drop-off";
|
|
223
|
-
readonly options: readonly [{
|
|
224
|
-
readonly key: "wait-for-it";
|
|
225
|
-
readonly label: "Waiting";
|
|
226
|
-
}, {
|
|
227
|
-
readonly key: "drop-off";
|
|
228
|
-
readonly label: "Dropping off";
|
|
229
|
-
}];
|
|
230
|
-
};
|
|
231
|
-
readonly address: {
|
|
232
|
-
readonly primitive: "address";
|
|
233
|
-
readonly smsLabel: "Address";
|
|
234
|
-
};
|
|
235
|
-
readonly patient_type: {
|
|
236
|
-
readonly primitive: "enum";
|
|
237
|
-
readonly smsLabel: "Patient";
|
|
238
|
-
};
|
|
239
|
-
readonly matter: {
|
|
240
|
-
readonly primitive: "enum";
|
|
241
|
-
readonly smsLabel: "Matter";
|
|
242
|
-
};
|
|
243
|
-
readonly language: {
|
|
244
|
-
readonly primitive: "enum";
|
|
245
|
-
readonly smsLabel: "Language";
|
|
246
|
-
};
|
|
247
|
-
readonly products: {
|
|
248
|
-
readonly primitive: "multi_enum";
|
|
249
|
-
readonly smsLabel: "Products";
|
|
250
|
-
};
|
|
251
|
-
readonly goal: {
|
|
252
|
-
readonly primitive: "enum";
|
|
253
|
-
readonly smsLabel: "Goal";
|
|
254
|
-
};
|
|
255
|
-
readonly business_type: {
|
|
256
|
-
readonly primitive: "enum";
|
|
257
|
-
readonly smsLabel: "Business";
|
|
258
|
-
};
|
|
259
|
-
readonly lead_volume: {
|
|
260
|
-
readonly primitive: "enum";
|
|
261
|
-
readonly smsLabel: "Lead volume";
|
|
262
|
-
};
|
|
263
|
-
readonly add_on: {
|
|
264
|
-
readonly primitive: "bool";
|
|
265
|
-
readonly smsLabel: "";
|
|
266
|
-
};
|
|
267
|
-
readonly attribution: {
|
|
268
|
-
readonly primitive: "enum";
|
|
269
|
-
readonly smsLabel: "";
|
|
270
|
-
readonly uninteresting: true;
|
|
271
|
-
};
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
export { LEAD_FORM_KINDS, LEAD_FORM_PRIMITIVES, LEAD_FORM_REGISTRY_VERSION, LEAD_FORM_ROLES, LEAD_FORM_ROLE_SPECS, type LeadFormKind, type LeadFormPrimitive, type LeadFormRole, type LeadFormRoleOption, type LeadFormRoleSpec, TRACKING_PARAM_KEYS, type TrackingClient, TrackingClientContext, TrackingEventCreatePayload, TrackingInstallSurface, TrackingParams, TrackingSessionUpsertPayload, captureTrackingParamsFromLocation, createTrackingClientContext, createTrackingEventCreatePayload, createTrackingSessionUpsertPayload, leadFormPrimitiveSchemas };
|
|
103
|
+
export { TRACKING_PARAM_KEYS, type TrackingClient, TrackingClientContext, TrackingEventCreatePayload, TrackingInstallSurface, TrackingParams, TrackingSessionUpsertPayload, captureTrackingParamsFromLocation, createTrackingClientContext, createTrackingEventCreatePayload, createTrackingSessionUpsertPayload };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { AdPlatformTracking, AdPlatformTrackingProps, BookedAttempt, BookingHandoffLink, BookingHandoffLinkProps, BookingHandoffOptions, BookingSubmitState, BookingSubmitStatus, ConsentBanner, ConsentBannerProps, CreateTrackingOptions, CreateTrackingResult, GoogleAdsTracking, GoogleAdsTrackingProps, PhoneField, PhoneFieldApi, PhoneFieldProps, PhoneInputProps, TrackingProviderProps, UseConsentResult, UseCookiePreferencesOptions, UseCookiePreferencesResult, UsePhoneFieldOptions, createTracking, useBookingHandoffUrl, useBookingIntegration, useBookingSlots, useBookingSubmit, useConsent, useConsentState, useCookiePreferences, useGclid, usePhoneConfig, usePhoneField, useTrackingParams } from '@aranova/tracking-react/client';
|
|
2
|
-
import { T as TrackingParams, a as TrackingInstallSurface, b as TrackingEnvironment, c as TrackingClientContext, d as TrackingEventCreatePayload, e as TrackingSessionUpsertPayload } from './phone-utils-
|
|
3
|
-
export { C as ConsentChoice, f as ConsentChoiceState, g as ConsentSource, h as ConsentState, D as DEFAULT_DECLINE_TTL_DAYS, i as DEFAULT_PHONE_COUNTRY, G as GtagEnvironmentMap, M as MetaPixelEnvironmentMap, P as ParsedPhone,
|
|
4
|
-
export { A as AranovaApiError, B as BusinessConfig, a as BusinessConfigFeatures, b as BusinessConfigService, C as CompareTo, c as ConversionUserData, 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, af as clearStashedUserData, 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, ar as stashUserData, as as toMinor } from './sales-
|
|
5
|
-
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, C as ConversionConfig, l as ConversionConfigStore, F as FormSubmitField, S as SalesBookingsClient, T as TrackingConfigReference, m as getTrackingConfigRuntime, n as newBookingAttemptKey, r as resolveConversionConfig, o as resolveTrackingConfigUrl } from './bookings-
|
|
6
|
-
export { A as AutomaticEventName, B as BookableDay, a as BookingHandoffPrefill, b as BookingIntegration, c as BookingOption, d as BookingOptionGroup, e as BookingProvider, f as BookingRules, C as CtaClickConfig, g as CtaClickMetadata, E as EVENT_SEMANTICS, h as EventCategory, i as EventClientVisibility, j as EventConfig, k as EventKind, l as EventMetadata, m as EventName, n as EventOutcomeRole, o as EventSemantics, F as FormStartConfig, p as FormStartMetadata, q as FormStepConfig, r as FormStepMetadata, M as ManualEventName,
|
|
7
|
-
export { F as
|
|
8
|
-
import * as z from 'zod/mini';
|
|
1
|
+
export { AdPlatformTracking, AdPlatformTrackingProps, BookedAttempt, BookingHandoffLink, BookingHandoffLinkProps, BookingHandoffOptions, BookingSubmitState, BookingSubmitStatus, ConsentBanner, ConsentBannerProps, CreateTrackingOptions, CreateTrackingResult, GoogleAdsTracking, GoogleAdsTrackingProps, PhoneField, PhoneFieldApi, PhoneFieldProps, PhoneInputProps, TrackingProviderProps, UseConsentResult, UseCookiePreferencesOptions, UseCookiePreferencesResult, UsePhoneFieldOptions, createLeadFormSubmit, createTracking, useBookingHandoffUrl, useBookingIntegration, useBookingSlots, useBookingSubmit, useConsent, useConsentState, useCookiePreferences, useGclid, usePhoneConfig, usePhoneField, useTrackingParams } from '@aranova/tracking-react/client';
|
|
2
|
+
import { T as TrackingParams, a as TrackingInstallSurface, b as TrackingEnvironment, c as TrackingClientContext, d as TrackingEventCreatePayload, e as TrackingSessionUpsertPayload } from './phone-utils-D2TGPCQW.js';
|
|
3
|
+
export { C as ConsentChoice, f as ConsentChoiceState, g as ConsentSource, h as ConsentState, D as DEFAULT_DECLINE_TTL_DAYS, i as DEFAULT_PHONE_COUNTRY, G as GtagEnvironmentMap, L as LEAD_FORM_KINDS, j as LEAD_FORM_PRIMITIVES, k as LEAD_FORM_REGISTRY_VERSION, l as LEAD_FORM_ROLES, m as LEAD_FORM_ROLE_SPECS, n as LeadFormKind, o as LeadFormPrimitive, p as LeadFormRole, q as LeadFormRoleOption, r as LeadFormRoleSpec, M as MetaPixelEnvironmentMap, P as ParsedPhone, s as PhoneConfig, t as PhoneDisplayFormat, S as SetConsentOptions, u as TrackedField, v as TrackingInitConfig, w as formatPhone, x as formatPhoneAsTyped, y as getConsentChoice, z as getConsentState, A as leadFormPrimitiveSchemas, B as onConsentChange, E as optIn, F as optOut, H as parsePhone, I as phoneField, J as resetConsent, K as setConsentState, N as toE164 } from './phone-utils-D2TGPCQW.js';
|
|
4
|
+
export { A as AranovaApiError, B as BusinessConfig, a as BusinessConfigFeatures, b as BusinessConfigService, C as CompareTo, c as ConversionUserData, 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, af as clearStashedUserData, 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, ar as stashUserData, as as toMinor } from './sales-DkdrGIUS.js';
|
|
5
|
+
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, C as ConversionConfig, l as ConversionConfigStore, F as FormSubmitField, S as SalesBookingsClient, T as TrackingConfigReference, m as getTrackingConfigRuntime, n as newBookingAttemptKey, r as resolveConversionConfig, o as resolveTrackingConfigUrl } from './bookings-Bw2ImtPd.js';
|
|
6
|
+
export { A as AutomaticEventName, B as BookableDay, a as BookingHandoffPrefill, b as BookingIntegration, c as BookingOption, d as BookingOptionGroup, e as BookingProvider, f as BookingRules, C as CtaClickConfig, g as CtaClickMetadata, E as EVENT_SEMANTICS, h as EventCategory, i as EventClientVisibility, j as EventConfig, k as EventKind, l as EventMetadata, m as EventName, n as EventOutcomeRole, o as EventSemantics, F as FormStartConfig, p as FormStartMetadata, q as FormStepConfig, r as FormStepMetadata, L as LeadFormAddress, s as LeadFormContracts, t as LeadFormExtraField, u as LeadFormFields, v as LeadFormKindDecl, w as LeadFormRequirementDecl, x as LeadFormSubmitInput, y as LeadFormSubmitOptions, z as LeadFormSubmitter, D as LeadFormTimeWindow, G as LeadFormTracking, H as LeadFormValue, M as ManualEventName, I as MultiPageSessionConfig, J as MultiPageSessionMetadata, P as PageExitConfig, K as PageExitMetadata, N as PageIdentity, O as PageViewConfig, Q as PageViewMetadata, R as PhoneClickConfig, S as PhoneClickMetadata, T as RegisteredAutomaticEvents, U as RegisteredManualEvents, V as ScrollDepthConfig, W as ScrollDepthMetadata, X as SdkHeartbeatConfig, Y as SdkHeartbeatMetadata, Z as SiteLinkArrivalConfig, _ as SiteLinkArrivalMetadata, $ as SiteLinkClickConfig, a0 as SiteLinkClickMetadata, a1 as SpecificPageName, a2 as SpecificPageVisitConfig, a3 as SpecificPageVisitMetadata, a4 as TimeOnSiteConfig, a5 as TimeOnSiteMetadata, a6 as TrackableEvent, a7 as TriggerRegistryConfig, a8 as TypedTrackEventOptions, a9 as TypedTrackingClient, aa as bookableSlots, ab as buildBookingHandoffUrl, ac as getBookingIntegration, ad as getEventSemantics, ae as groupBookingOptions, af as shopToday, ag as slotFields, ah as timeWindow } from './submit-DuvP5AGN.js';
|
|
7
|
+
export { F as FormContractViolation, a as FormSubmitConfig, b as FormSubmitMetadata, J as JsonValue } from './form-submit-C_vJXCxh.js';
|
|
9
8
|
export { CountryCode } from 'libphonenumber-js';
|
|
9
|
+
import 'zod/mini';
|
|
10
10
|
import 'zod/v4/core';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -100,175 +100,4 @@ interface TrackingClient {
|
|
|
100
100
|
destroy: () => void;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
declare const LEAD_FORM_REGISTRY_VERSION = 2;
|
|
105
|
-
declare const LEAD_FORM_KINDS: readonly ["booking", "quote", "contact", "consult", "callback"];
|
|
106
|
-
/** What a form is for; `form_id` stays the instance handle. */
|
|
107
|
-
type LeadFormKind = (typeof LEAD_FORM_KINDS)[number];
|
|
108
|
-
declare const LEAD_FORM_ROLES: readonly ["given_name", "family_name", "phone", "email", "service", "preferred_date", "preferred_time", "note", "visit", "intent", "vehicle", "drop_off", "address", "patient_type", "matter", "language", "products", "goal", "business_type", "lead_volume", "attribution"];
|
|
109
|
-
/** A role from the registry, or `add_on:<key>` for a yes/no extra with its own label. */
|
|
110
|
-
type LeadFormRole = (typeof LEAD_FORM_ROLES)[number] | `add_on:${string}`;
|
|
111
|
-
declare const LEAD_FORM_PRIMITIVES: readonly ["string", "text", "enum", "multi_enum", "bool", "date", "time_window", "phone", "email", "address", "number"];
|
|
112
|
-
type LeadFormPrimitive = (typeof LEAD_FORM_PRIMITIVES)[number];
|
|
113
|
-
/** The wire schema of each primitive's value. */
|
|
114
|
-
declare const leadFormPrimitiveSchemas: {
|
|
115
|
-
readonly string: z.ZodMiniString<string>;
|
|
116
|
-
readonly text: z.ZodMiniString<string>;
|
|
117
|
-
readonly enum: z.ZodMiniString<string>;
|
|
118
|
-
readonly multi_enum: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
119
|
-
readonly bool: z.ZodMiniBoolean<boolean>;
|
|
120
|
-
readonly date: z.ZodMiniString<string>;
|
|
121
|
-
readonly time_window: z.ZodMiniObject<{
|
|
122
|
-
start: z.ZodMiniString<string>;
|
|
123
|
-
end: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
124
|
-
label: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
125
|
-
}, z.core.$strict>;
|
|
126
|
-
readonly phone: z.ZodMiniString<string>;
|
|
127
|
-
readonly email: z.ZodMiniString<string>;
|
|
128
|
-
readonly address: z.ZodMiniObject<{
|
|
129
|
-
line1: z.ZodMiniString<string>;
|
|
130
|
-
line2: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
131
|
-
city: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
132
|
-
region: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
133
|
-
postal_code: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
134
|
-
country: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
135
|
-
}, z.core.$strict>;
|
|
136
|
-
readonly number: z.ZodMiniNumber<number>;
|
|
137
|
-
};
|
|
138
|
-
interface LeadFormRoleOption {
|
|
139
|
-
key: string;
|
|
140
|
-
label: string;
|
|
141
|
-
isNonAnswer?: true;
|
|
142
|
-
}
|
|
143
|
-
interface LeadFormRoleSpec {
|
|
144
|
-
primitive: LeadFormPrimitive;
|
|
145
|
-
smsLabel: string;
|
|
146
|
-
contactIdentity?: true;
|
|
147
|
-
uninteresting?: true;
|
|
148
|
-
options?: readonly LeadFormRoleOption[];
|
|
149
|
-
}
|
|
150
|
-
/** Every role's primitive and text label; `add_on` is the template for `add_on:<key>`. */
|
|
151
|
-
declare const LEAD_FORM_ROLE_SPECS: {
|
|
152
|
-
readonly given_name: {
|
|
153
|
-
readonly primitive: "string";
|
|
154
|
-
readonly smsLabel: "";
|
|
155
|
-
readonly contactIdentity: true;
|
|
156
|
-
};
|
|
157
|
-
readonly family_name: {
|
|
158
|
-
readonly primitive: "string";
|
|
159
|
-
readonly smsLabel: "";
|
|
160
|
-
readonly contactIdentity: true;
|
|
161
|
-
};
|
|
162
|
-
readonly phone: {
|
|
163
|
-
readonly primitive: "phone";
|
|
164
|
-
readonly smsLabel: "";
|
|
165
|
-
readonly contactIdentity: true;
|
|
166
|
-
};
|
|
167
|
-
readonly email: {
|
|
168
|
-
readonly primitive: "email";
|
|
169
|
-
readonly smsLabel: "";
|
|
170
|
-
readonly contactIdentity: true;
|
|
171
|
-
};
|
|
172
|
-
readonly service: {
|
|
173
|
-
readonly primitive: "multi_enum";
|
|
174
|
-
readonly smsLabel: "Service";
|
|
175
|
-
};
|
|
176
|
-
readonly preferred_date: {
|
|
177
|
-
readonly primitive: "date";
|
|
178
|
-
readonly smsLabel: "Date";
|
|
179
|
-
};
|
|
180
|
-
readonly preferred_time: {
|
|
181
|
-
readonly primitive: "time_window";
|
|
182
|
-
readonly smsLabel: "Time";
|
|
183
|
-
};
|
|
184
|
-
readonly note: {
|
|
185
|
-
readonly primitive: "text";
|
|
186
|
-
readonly smsLabel: "Note";
|
|
187
|
-
};
|
|
188
|
-
readonly visit: {
|
|
189
|
-
readonly primitive: "enum";
|
|
190
|
-
readonly smsLabel: "Visit";
|
|
191
|
-
readonly options: readonly [{
|
|
192
|
-
readonly key: "in-shop";
|
|
193
|
-
readonly label: "In shop";
|
|
194
|
-
}, {
|
|
195
|
-
readonly key: "in-home";
|
|
196
|
-
readonly label: "In home";
|
|
197
|
-
}, {
|
|
198
|
-
readonly key: "remote";
|
|
199
|
-
readonly label: "Remote";
|
|
200
|
-
}, {
|
|
201
|
-
readonly key: "on-site";
|
|
202
|
-
readonly label: "On site";
|
|
203
|
-
}];
|
|
204
|
-
};
|
|
205
|
-
readonly intent: {
|
|
206
|
-
readonly primitive: "enum";
|
|
207
|
-
readonly smsLabel: "Wants";
|
|
208
|
-
readonly options: readonly [{
|
|
209
|
-
readonly key: "book";
|
|
210
|
-
readonly label: "Book";
|
|
211
|
-
}, {
|
|
212
|
-
readonly key: "quote";
|
|
213
|
-
readonly label: "Quote";
|
|
214
|
-
}];
|
|
215
|
-
};
|
|
216
|
-
readonly vehicle: {
|
|
217
|
-
readonly primitive: "string";
|
|
218
|
-
readonly smsLabel: "Vehicle";
|
|
219
|
-
};
|
|
220
|
-
readonly drop_off: {
|
|
221
|
-
readonly primitive: "enum";
|
|
222
|
-
readonly smsLabel: "Drop-off";
|
|
223
|
-
readonly options: readonly [{
|
|
224
|
-
readonly key: "wait-for-it";
|
|
225
|
-
readonly label: "Waiting";
|
|
226
|
-
}, {
|
|
227
|
-
readonly key: "drop-off";
|
|
228
|
-
readonly label: "Dropping off";
|
|
229
|
-
}];
|
|
230
|
-
};
|
|
231
|
-
readonly address: {
|
|
232
|
-
readonly primitive: "address";
|
|
233
|
-
readonly smsLabel: "Address";
|
|
234
|
-
};
|
|
235
|
-
readonly patient_type: {
|
|
236
|
-
readonly primitive: "enum";
|
|
237
|
-
readonly smsLabel: "Patient";
|
|
238
|
-
};
|
|
239
|
-
readonly matter: {
|
|
240
|
-
readonly primitive: "enum";
|
|
241
|
-
readonly smsLabel: "Matter";
|
|
242
|
-
};
|
|
243
|
-
readonly language: {
|
|
244
|
-
readonly primitive: "enum";
|
|
245
|
-
readonly smsLabel: "Language";
|
|
246
|
-
};
|
|
247
|
-
readonly products: {
|
|
248
|
-
readonly primitive: "multi_enum";
|
|
249
|
-
readonly smsLabel: "Products";
|
|
250
|
-
};
|
|
251
|
-
readonly goal: {
|
|
252
|
-
readonly primitive: "enum";
|
|
253
|
-
readonly smsLabel: "Goal";
|
|
254
|
-
};
|
|
255
|
-
readonly business_type: {
|
|
256
|
-
readonly primitive: "enum";
|
|
257
|
-
readonly smsLabel: "Business";
|
|
258
|
-
};
|
|
259
|
-
readonly lead_volume: {
|
|
260
|
-
readonly primitive: "enum";
|
|
261
|
-
readonly smsLabel: "Lead volume";
|
|
262
|
-
};
|
|
263
|
-
readonly add_on: {
|
|
264
|
-
readonly primitive: "bool";
|
|
265
|
-
readonly smsLabel: "";
|
|
266
|
-
};
|
|
267
|
-
readonly attribution: {
|
|
268
|
-
readonly primitive: "enum";
|
|
269
|
-
readonly smsLabel: "";
|
|
270
|
-
readonly uninteresting: true;
|
|
271
|
-
};
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
export { LEAD_FORM_KINDS, LEAD_FORM_PRIMITIVES, LEAD_FORM_REGISTRY_VERSION, LEAD_FORM_ROLES, LEAD_FORM_ROLE_SPECS, type LeadFormKind, type LeadFormPrimitive, type LeadFormRole, type LeadFormRoleOption, type LeadFormRoleSpec, TRACKING_PARAM_KEYS, type TrackingClient, TrackingClientContext, TrackingEventCreatePayload, TrackingInstallSurface, TrackingParams, TrackingSessionUpsertPayload, captureTrackingParamsFromLocation, createTrackingClientContext, createTrackingEventCreatePayload, createTrackingSessionUpsertPayload, leadFormPrimitiveSchemas };
|
|
103
|
+
export { TRACKING_PARAM_KEYS, type TrackingClient, TrackingClientContext, TrackingEventCreatePayload, TrackingInstallSurface, TrackingParams, TrackingSessionUpsertPayload, captureTrackingParamsFromLocation, createTrackingClientContext, createTrackingEventCreatePayload, createTrackingSessionUpsertPayload };
|
package/dist/index.js
CHANGED
|
@@ -53,6 +53,7 @@ __export(src_exports, {
|
|
|
53
53
|
buildBookingHandoffUrl: () => buildBookingHandoffUrl,
|
|
54
54
|
captureTrackingParamsFromLocation: () => captureTrackingParamsFromLocation,
|
|
55
55
|
clearStashedUserData: () => clearStashedUserData,
|
|
56
|
+
createLeadFormSubmit: () => import_client4.createLeadFormSubmit,
|
|
56
57
|
createSalesClient: () => createSalesClient,
|
|
57
58
|
createTracking: () => import_client.createTracking,
|
|
58
59
|
createTrackingClientContext: () => createTrackingClientContext,
|
|
@@ -88,7 +89,9 @@ __export(src_exports, {
|
|
|
88
89
|
salesRequest: () => salesRequest,
|
|
89
90
|
setConsentState: () => setConsentState,
|
|
90
91
|
shopToday: () => shopToday,
|
|
92
|
+
slotFields: () => slotFields,
|
|
91
93
|
stashUserData: () => stashUserData,
|
|
94
|
+
timeWindow: () => timeWindow,
|
|
92
95
|
toE164: () => toE164,
|
|
93
96
|
toMinor: () => toMinor,
|
|
94
97
|
useBookingHandoffUrl: () => import_client3.useBookingHandoffUrl,
|
|
@@ -327,7 +330,8 @@ var TRACKING_CAPABILITIES = [
|
|
|
327
330
|
"cta_click_capture",
|
|
328
331
|
"form_capture",
|
|
329
332
|
"phone_click_capture",
|
|
330
|
-
"phone_fields"
|
|
333
|
+
"phone_fields",
|
|
334
|
+
"typed_form_submit"
|
|
331
335
|
];
|
|
332
336
|
var CAPABILITY_DOM_ATTRIBUTE = "data-aranova-capability";
|
|
333
337
|
var registered = /* @__PURE__ */ new Set();
|
|
@@ -2730,13 +2734,31 @@ async function fetchServices(config) {
|
|
|
2730
2734
|
}
|
|
2731
2735
|
|
|
2732
2736
|
// ../tracking-core/src/phone-field.ts
|
|
2733
|
-
function phoneField(name, raw, country) {
|
|
2734
|
-
return { name, type: "phone", value: toE164(raw, country) };
|
|
2737
|
+
function phoneField(name, raw, country, label = null) {
|
|
2738
|
+
return { name, type: "phone", label, value: toE164(raw, country) };
|
|
2739
|
+
}
|
|
2740
|
+
|
|
2741
|
+
// ../tracking-core/src/lead-forms/submit.ts
|
|
2742
|
+
var import_mini = require("zod/mini");
|
|
2743
|
+
var KNOWN_ROLES = new Set(LEAD_FORM_ROLES);
|
|
2744
|
+
var ROLE_ORDER = new Map(LEAD_FORM_ROLES.map((role, index) => [role, index]));
|
|
2745
|
+
function slotFields(dateTime) {
|
|
2746
|
+
const written = /^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::\d{2}(?:\.\d+)?)?$/.exec(dateTime);
|
|
2747
|
+
if (!written) {
|
|
2748
|
+
throw new TypeError(
|
|
2749
|
+
`slotFields needs the slot's wall time without an offset ("2026-10-13T09:30"), got "${dateTime}"`
|
|
2750
|
+
);
|
|
2751
|
+
}
|
|
2752
|
+
return { preferred_date: written[1], preferred_time: { start: written[2], end: null } };
|
|
2753
|
+
}
|
|
2754
|
+
function timeWindow(start, end, label) {
|
|
2755
|
+
return { start, end: end ?? null, ...label ? { label } : {} };
|
|
2735
2756
|
}
|
|
2736
2757
|
|
|
2737
2758
|
// src/index.ts
|
|
2738
2759
|
var import_client2 = require("@aranova/tracking-react/client");
|
|
2739
2760
|
var import_client3 = require("@aranova/tracking-react/client");
|
|
2761
|
+
var import_client4 = require("@aranova/tracking-react/client");
|
|
2740
2762
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2741
2763
|
0 && (module.exports = {
|
|
2742
2764
|
AdPlatformTracking,
|
|
@@ -2762,6 +2784,7 @@ var import_client3 = require("@aranova/tracking-react/client");
|
|
|
2762
2784
|
buildBookingHandoffUrl,
|
|
2763
2785
|
captureTrackingParamsFromLocation,
|
|
2764
2786
|
clearStashedUserData,
|
|
2787
|
+
createLeadFormSubmit,
|
|
2765
2788
|
createSalesClient,
|
|
2766
2789
|
createTracking,
|
|
2767
2790
|
createTrackingClientContext,
|
|
@@ -2797,7 +2820,9 @@ var import_client3 = require("@aranova/tracking-react/client");
|
|
|
2797
2820
|
salesRequest,
|
|
2798
2821
|
setConsentState,
|
|
2799
2822
|
shopToday,
|
|
2823
|
+
slotFields,
|
|
2800
2824
|
stashUserData,
|
|
2825
|
+
timeWindow,
|
|
2801
2826
|
toE164,
|
|
2802
2827
|
toMinor,
|
|
2803
2828
|
useBookingHandoffUrl,
|