@aranova/tracking-react 1.5.0 → 1.7.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 +13 -3
- package/dist/{bookings-aJuXoVwX.d.ts → bookings-B50X7GSG.d.ts} +16 -1
- package/dist/{bookings-CGWiBxnC.d.mts → bookings-n8UUzrak.d.mts} +16 -1
- package/dist/client.d.mts +4 -3
- package/dist/client.d.ts +4 -3
- package/dist/client.js +11 -2
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +11 -2
- package/dist/client.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +38 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -36
- package/dist/index.mjs.map +1 -1
- package/dist/{ingest-typed-CytXGVw4.d.mts → ingest-typed-ABH28Ips.d.mts} +1 -1
- package/dist/{ingest-typed-DpT-uFme.d.ts → ingest-typed-vP-DqpxO.d.ts} +1 -1
- package/dist/{sales-Dvh-tPsk.d.ts → sales-D4QRnpdz.d.ts} +1 -1
- package/dist/{sales-BdU9BRdG.d.mts → sales-DByfvgzT.d.mts} +1 -1
- package/dist/sales.d.mts +2 -2
- package/dist/sales.d.ts +2 -2
- package/dist/sales.js +38 -36
- package/dist/sales.js.map +1 -1
- package/dist/sales.mjs +38 -36
- package/dist/sales.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { AdPlatformTracking, AdPlatformTrackingProps, 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
2
|
import { T as TrackingParams, a as TrackingInstallSurface, b as TrackingEnvironment, c as TrackingClientContext, d as TrackingEventCreatePayload, e as TrackingSessionUpsertPayload } from './phone-utils-CM8eUPz8.mjs';
|
|
3
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, j as PhoneConfig, k as PhoneDisplayFormat, S as SetConsentOptions, l as TrackedField, m as TrackingInitConfig, n as formatPhone, o as formatPhoneAsTyped, p as getConsentChoice, q as getConsentState, r as onConsentChange, s as optIn, t as optOut, u as parsePhone, v as phoneField, w as resetConsent, x as setConsentState, y as toE164 } from './phone-utils-CM8eUPz8.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-
|
|
5
|
-
export { B as BookingDropOff, a as BookingFormSubmit, b as BookingInput, c as BookingMode, d as BookingOutcome, e as BookingSimulation, f as BookingSubmitOptions, C as ConversionConfig, g as ConversionConfigStore, S as SalesBookingsClient, T as TrackingConfigReference, h as getTrackingConfigRuntime, n as newBookingAttemptKey, r as resolveConversionConfig, i 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, s as MultiPageSessionConfig, t as MultiPageSessionMetadata, P as PageExitConfig, u as PageExitMetadata, v as PageIdentity, w as PageViewConfig, x as PageViewMetadata, y as PhoneClickConfig, z as PhoneClickMetadata, R as RegisteredAutomaticEvents, D as RegisteredManualEvents, S as ScrollDepthConfig, G as ScrollDepthMetadata, H as SdkHeartbeatConfig, I as SdkHeartbeatMetadata, J as SiteLinkArrivalConfig, K as SiteLinkArrivalMetadata, L as SiteLinkClickConfig, N as SiteLinkClickMetadata, O as SpecificPageName, Q as SpecificPageVisitConfig, T as SpecificPageVisitMetadata, U as TimeOnSiteConfig, V as TimeOnSiteMetadata, W as TrackableEvent, X as TriggerRegistryConfig, Y as TypedTrackEventOptions, Z as TypedTrackingClient, _ as bookableSlots, $ as buildBookingHandoffUrl, a0 as getBookingIntegration, a1 as getEventSemantics, a2 as groupBookingOptions, a3 as shopToday } from './ingest-typed-
|
|
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-DByfvgzT.mjs';
|
|
5
|
+
export { B as BookingDropOff, a as BookingFormSubmit, b as BookingInput, c as BookingMode, d as BookingOutcome, e as BookingSimulation, f as BookingSubmitOptions, C as ConversionConfig, g as ConversionConfigStore, F as FormSubmitField, S as SalesBookingsClient, T as TrackingConfigReference, h as getTrackingConfigRuntime, n as newBookingAttemptKey, r as resolveConversionConfig, i as resolveTrackingConfigUrl } from './bookings-n8UUzrak.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, M as ManualEventName, s as MultiPageSessionConfig, t as MultiPageSessionMetadata, P as PageExitConfig, u as PageExitMetadata, v as PageIdentity, w as PageViewConfig, x as PageViewMetadata, y as PhoneClickConfig, z as PhoneClickMetadata, R as RegisteredAutomaticEvents, D as RegisteredManualEvents, S as ScrollDepthConfig, G as ScrollDepthMetadata, H as SdkHeartbeatConfig, I as SdkHeartbeatMetadata, J as SiteLinkArrivalConfig, K as SiteLinkArrivalMetadata, L as SiteLinkClickConfig, N as SiteLinkClickMetadata, O as SpecificPageName, Q as SpecificPageVisitConfig, T as SpecificPageVisitMetadata, U as TimeOnSiteConfig, V as TimeOnSiteMetadata, W as TrackableEvent, X as TriggerRegistryConfig, Y as TypedTrackEventOptions, Z as TypedTrackingClient, _ as bookableSlots, $ as buildBookingHandoffUrl, a0 as getBookingIntegration, a1 as getEventSemantics, a2 as groupBookingOptions, a3 as shopToday } from './ingest-typed-ABH28Ips.mjs';
|
|
7
7
|
export { F as FormSubmitConfig, a as FormSubmitMetadata, J as JsonValue } from './form-submit-BLb28aCk.mjs';
|
|
8
8
|
export { CountryCode } from 'libphonenumber-js';
|
|
9
9
|
import 'zod/mini';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { AdPlatformTracking, AdPlatformTrackingProps, 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
2
|
import { T as TrackingParams, a as TrackingInstallSurface, b as TrackingEnvironment, c as TrackingClientContext, d as TrackingEventCreatePayload, e as TrackingSessionUpsertPayload } from './phone-utils-l8ey3Zdm.js';
|
|
3
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, j as PhoneConfig, k as PhoneDisplayFormat, S as SetConsentOptions, l as TrackedField, m as TrackingInitConfig, n as formatPhone, o as formatPhoneAsTyped, p as getConsentChoice, q as getConsentState, r as onConsentChange, s as optIn, t as optOut, u as parsePhone, v as phoneField, w as resetConsent, x as setConsentState, y as toE164 } from './phone-utils-l8ey3Zdm.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-
|
|
5
|
-
export { B as BookingDropOff, a as BookingFormSubmit, b as BookingInput, c as BookingMode, d as BookingOutcome, e as BookingSimulation, f as BookingSubmitOptions, C as ConversionConfig, g as ConversionConfigStore, S as SalesBookingsClient, T as TrackingConfigReference, h as getTrackingConfigRuntime, n as newBookingAttemptKey, r as resolveConversionConfig, i 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, s as MultiPageSessionConfig, t as MultiPageSessionMetadata, P as PageExitConfig, u as PageExitMetadata, v as PageIdentity, w as PageViewConfig, x as PageViewMetadata, y as PhoneClickConfig, z as PhoneClickMetadata, R as RegisteredAutomaticEvents, D as RegisteredManualEvents, S as ScrollDepthConfig, G as ScrollDepthMetadata, H as SdkHeartbeatConfig, I as SdkHeartbeatMetadata, J as SiteLinkArrivalConfig, K as SiteLinkArrivalMetadata, L as SiteLinkClickConfig, N as SiteLinkClickMetadata, O as SpecificPageName, Q as SpecificPageVisitConfig, T as SpecificPageVisitMetadata, U as TimeOnSiteConfig, V as TimeOnSiteMetadata, W as TrackableEvent, X as TriggerRegistryConfig, Y as TypedTrackEventOptions, Z as TypedTrackingClient, _ as bookableSlots, $ as buildBookingHandoffUrl, a0 as getBookingIntegration, a1 as getEventSemantics, a2 as groupBookingOptions, a3 as shopToday } from './ingest-typed-
|
|
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-D4QRnpdz.js';
|
|
5
|
+
export { B as BookingDropOff, a as BookingFormSubmit, b as BookingInput, c as BookingMode, d as BookingOutcome, e as BookingSimulation, f as BookingSubmitOptions, C as ConversionConfig, g as ConversionConfigStore, F as FormSubmitField, S as SalesBookingsClient, T as TrackingConfigReference, h as getTrackingConfigRuntime, n as newBookingAttemptKey, r as resolveConversionConfig, i as resolveTrackingConfigUrl } from './bookings-B50X7GSG.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, M as ManualEventName, s as MultiPageSessionConfig, t as MultiPageSessionMetadata, P as PageExitConfig, u as PageExitMetadata, v as PageIdentity, w as PageViewConfig, x as PageViewMetadata, y as PhoneClickConfig, z as PhoneClickMetadata, R as RegisteredAutomaticEvents, D as RegisteredManualEvents, S as ScrollDepthConfig, G as ScrollDepthMetadata, H as SdkHeartbeatConfig, I as SdkHeartbeatMetadata, J as SiteLinkArrivalConfig, K as SiteLinkArrivalMetadata, L as SiteLinkClickConfig, N as SiteLinkClickMetadata, O as SpecificPageName, Q as SpecificPageVisitConfig, T as SpecificPageVisitMetadata, U as TimeOnSiteConfig, V as TimeOnSiteMetadata, W as TrackableEvent, X as TriggerRegistryConfig, Y as TypedTrackEventOptions, Z as TypedTrackingClient, _ as bookableSlots, $ as buildBookingHandoffUrl, a0 as getBookingIntegration, a1 as getEventSemantics, a2 as groupBookingOptions, a3 as shopToday } from './ingest-typed-vP-DqpxO.js';
|
|
7
7
|
export { F as FormSubmitConfig, a as FormSubmitMetadata, J as JsonValue } from './form-submit-BLb28aCk.js';
|
|
8
8
|
export { CountryCode } from 'libphonenumber-js';
|
|
9
9
|
import 'zod/mini';
|
package/dist/index.js
CHANGED
|
@@ -1822,7 +1822,7 @@ function outcomeOf(body) {
|
|
|
1822
1822
|
if (body.status === "pending") return { status: "pending", id: body.id, mode };
|
|
1823
1823
|
return { status: "failed", id: body.id, fallbackUrl: body.fallback_url, mode };
|
|
1824
1824
|
}
|
|
1825
|
-
function formSubmitPayload(input,
|
|
1825
|
+
function formSubmitPayload(input, formSubmit, labels) {
|
|
1826
1826
|
const vehicle = input.vehicle ? `${input.vehicle.year} ${input.vehicle.make} ${input.vehicle.model}` : "";
|
|
1827
1827
|
const field = (name, type, label, value) => ({
|
|
1828
1828
|
name,
|
|
@@ -1830,32 +1830,31 @@ function formSubmitPayload(input, formId, labels) {
|
|
|
1830
1830
|
label,
|
|
1831
1831
|
value
|
|
1832
1832
|
});
|
|
1833
|
+
const fields = [
|
|
1834
|
+
field("first_name", "text", "First name", input.firstName),
|
|
1835
|
+
field("last_name", "text", "Last name", input.lastName),
|
|
1836
|
+
// E.164 on the wire: it keys the customer and enhanced-conversion matching.
|
|
1837
|
+
field("phone", "tel", "Phone", toE164(input.phone) ?? input.phone),
|
|
1838
|
+
field("email", "email", "Email", input.email ?? ""),
|
|
1839
|
+
field(
|
|
1840
|
+
"service",
|
|
1841
|
+
"select",
|
|
1842
|
+
"Service",
|
|
1843
|
+
input.services.map((key) => labels.get(key) ?? key).join(", ")
|
|
1844
|
+
),
|
|
1845
|
+
field("vehicle", "text", "Vehicle", vehicle),
|
|
1846
|
+
field(
|
|
1847
|
+
"start",
|
|
1848
|
+
"text",
|
|
1849
|
+
"Requested time",
|
|
1850
|
+
`${input.startDate} ${String(input.startHour).padStart(2, "0")}:00`
|
|
1851
|
+
),
|
|
1852
|
+
field("note", "textarea", "Notes", input.notes ?? "")
|
|
1853
|
+
];
|
|
1854
|
+
const reported = new Set(fields.map((item) => item.name));
|
|
1855
|
+
const extra = (formSubmit.extraFields ?? []).filter((item) => !reported.has(item.name));
|
|
1833
1856
|
return {
|
|
1834
|
-
form: {
|
|
1835
|
-
id: formId,
|
|
1836
|
-
action: "/tracking/bookings",
|
|
1837
|
-
fields: [
|
|
1838
|
-
field("first_name", "text", "First name", input.firstName),
|
|
1839
|
-
field("last_name", "text", "Last name", input.lastName),
|
|
1840
|
-
// E.164 on the wire: it keys the customer and enhanced-conversion matching.
|
|
1841
|
-
field("phone", "tel", "Phone", toE164(input.phone) ?? input.phone),
|
|
1842
|
-
field("email", "email", "Email", input.email ?? ""),
|
|
1843
|
-
field(
|
|
1844
|
-
"service",
|
|
1845
|
-
"select",
|
|
1846
|
-
"Service",
|
|
1847
|
-
input.services.map((key) => labels.get(key) ?? key).join(", ")
|
|
1848
|
-
),
|
|
1849
|
-
field("vehicle", "text", "Vehicle", vehicle),
|
|
1850
|
-
field(
|
|
1851
|
-
"start",
|
|
1852
|
-
"text",
|
|
1853
|
-
"Requested time",
|
|
1854
|
-
`${input.startDate} ${String(input.startHour).padStart(2, "0")}:00`
|
|
1855
|
-
),
|
|
1856
|
-
field("note", "textarea", "Notes", input.notes ?? "")
|
|
1857
|
-
]
|
|
1858
|
-
},
|
|
1857
|
+
form: { id: formSubmit.formId, action: "/tracking/bookings", fields: [...fields, ...extra] },
|
|
1859
1858
|
page: { path: typeof window === "undefined" ? "/" : window.location.pathname }
|
|
1860
1859
|
};
|
|
1861
1860
|
}
|
|
@@ -1943,7 +1942,7 @@ function createSalesBookingsClient(config, firing) {
|
|
|
1943
1942
|
return failedBeforeSend(input);
|
|
1944
1943
|
}
|
|
1945
1944
|
return {
|
|
1946
|
-
async submit(input, { attemptKey, formSubmit, simulate }) {
|
|
1945
|
+
async submit(input, { attemptKey, formSubmit, simulate, onPending }) {
|
|
1947
1946
|
registerCapability("booking_integration");
|
|
1948
1947
|
const runtime = runtimeOf(firing);
|
|
1949
1948
|
warnOnSetupMismatch(runtime);
|
|
@@ -1954,10 +1953,7 @@ function createSalesBookingsClient(config, firing) {
|
|
|
1954
1953
|
if (formSubmit && !submittedForms.has(attemptKey)) {
|
|
1955
1954
|
submittedForms.add(attemptKey);
|
|
1956
1955
|
const labels = new Map(booking.options.map((option) => [option.key, option.label]));
|
|
1957
|
-
formSubmit.tracking.trackEvent(
|
|
1958
|
-
"form_submit",
|
|
1959
|
-
formSubmitPayload(input, formSubmit.formId, labels)
|
|
1960
|
-
);
|
|
1956
|
+
formSubmit.tracking.trackEvent("form_submit", formSubmitPayload(input, formSubmit, labels));
|
|
1961
1957
|
}
|
|
1962
1958
|
const body = {
|
|
1963
1959
|
idempotency_key: attemptKey,
|
|
@@ -1991,10 +1987,9 @@ function createSalesBookingsClient(config, firing) {
|
|
|
1991
1987
|
return rejected(error, input, attemptKey, runtime);
|
|
1992
1988
|
}
|
|
1993
1989
|
const outcome = outcomeOf(response);
|
|
1994
|
-
return withHandoff(
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
);
|
|
1990
|
+
if (outcome.status !== "pending") return withHandoff(outcome, input);
|
|
1991
|
+
onPending?.(outcome);
|
|
1992
|
+
return withHandoff(await poll(outcome.id, outcome.mode), input);
|
|
1998
1993
|
},
|
|
1999
1994
|
async status(id) {
|
|
2000
1995
|
return outcomeOf(
|
|
@@ -2303,7 +2298,14 @@ var zSmsWithheldReason = z2.enum([
|
|
|
2303
2298
|
"a2p_registration_required",
|
|
2304
2299
|
"alert_recipient_cannot_receive_sms",
|
|
2305
2300
|
"line_type_unresolved",
|
|
2306
|
-
"sale_source_sends_own_messages"
|
|
2301
|
+
"sale_source_sends_own_messages",
|
|
2302
|
+
"form_lead_disabled",
|
|
2303
|
+
"source_not_enabled",
|
|
2304
|
+
"confirmed_by_integration",
|
|
2305
|
+
"test_or_bot_session",
|
|
2306
|
+
"invalid_phone",
|
|
2307
|
+
"quiet_hours",
|
|
2308
|
+
"recently_texted"
|
|
2307
2309
|
]);
|
|
2308
2310
|
var zSaleSmsStatusSchema = z2.object({
|
|
2309
2311
|
can_send_now: z2._default(z2.boolean(), false),
|