@aranova/tracking-react 1.16.1 → 1.18.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 +16 -0
- package/dist/{bookings-CkfA5XOM.d.ts → bookings-CCGpXhYE.d.ts} +52 -5
- package/dist/{bookings-DFz3BUiP.d.mts → bookings-CVvpj_8K.d.mts} +52 -5
- package/dist/client.d.mts +4 -4
- package/dist/client.d.ts +4 -4
- package/dist/client.js +274 -189
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +274 -189
- package/dist/client.mjs.map +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +60 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +60 -36
- package/dist/index.mjs.map +1 -1
- package/dist/{ingest-typed-BO6Arbw-.d.mts → ingest-typed-C3XAjHlH.d.ts} +92 -2
- package/dist/{ingest-typed-D7I4aQ7p.d.ts → ingest-typed-CoCjTqJs.d.mts} +92 -2
- package/dist/{phone-utils-CYr6AmEP.d.mts → phone-utils-BlWj8oxq.d.mts} +1 -0
- package/dist/{phone-utils-CYr6AmEP.d.ts → phone-utils-BlWj8oxq.d.ts} +1 -0
- package/dist/phone.d.mts +1 -1
- package/dist/phone.d.ts +1 -1
- package/dist/{sales-J_ItVjgE.d.mts → sales-B1ONR-Yi.d.mts} +1 -1
- package/dist/{sales-DGSi7IqU.d.ts → sales-Dlc_umAV.d.ts} +1 -1
- package/dist/sales.d.mts +3 -3
- package/dist/sales.d.ts +3 -3
- package/dist/sales.js +51 -35
- package/dist/sales.js.map +1 -1
- package/dist/sales.mjs +51 -35
- package/dist/sales.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as zod_v4_core from 'zod/v4/core';
|
|
2
2
|
import * as z from 'zod/mini';
|
|
3
|
-
import { J as JsonValue, j as FormSubmitConfig, k as FormSubmitMetadata } from './phone-utils-
|
|
3
|
+
import { J as JsonValue, j as FormSubmitConfig, k as FormSubmitMetadata } from './phone-utils-BlWj8oxq.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Metadata for a manually fired `cta_click` event.
|
|
@@ -92,6 +92,48 @@ declare const formStartConfigSchema: z.ZodMiniObject<{
|
|
|
92
92
|
}, z.core.$strict>;
|
|
93
93
|
type FormStartConfig = z.infer<typeof formStartConfigSchema>;
|
|
94
94
|
|
|
95
|
+
/**
|
|
96
|
+
* A manual `form_details`: optional answers the API folds into the `form_submit` whose
|
|
97
|
+
* `submission_id` it names (add-only, never a lead). Built by `leadForms.addDetails()`.
|
|
98
|
+
*/
|
|
99
|
+
declare const formDetailsMetadataSchema: z.ZodMiniObject<{
|
|
100
|
+
form: z.ZodMiniObject<{
|
|
101
|
+
id: z.ZodMiniString<string>;
|
|
102
|
+
submission_id: z.ZodMiniUUID;
|
|
103
|
+
kind: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
104
|
+
fields: z.ZodMiniArray<z.ZodMiniObject<{
|
|
105
|
+
name: z.ZodMiniString<string>;
|
|
106
|
+
type: z.ZodMiniString<string>;
|
|
107
|
+
label: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
108
|
+
value: z.ZodMiniType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
109
|
+
role: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
110
|
+
}, z.core.$strict>>;
|
|
111
|
+
contract_version: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniInt>>;
|
|
112
|
+
contract_hash: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
113
|
+
extra: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniArray<z.ZodMiniObject<{
|
|
114
|
+
key: z.ZodMiniString<string>;
|
|
115
|
+
label: z.ZodMiniString<string>;
|
|
116
|
+
value: z.ZodMiniType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
117
|
+
}, z.core.$strict>>>>;
|
|
118
|
+
contract_violations: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniArray<z.ZodMiniObject<{
|
|
119
|
+
role: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
120
|
+
rule: z.ZodMiniString<string>;
|
|
121
|
+
}, z.core.$strict>>>>;
|
|
122
|
+
}, z.core.$strict>;
|
|
123
|
+
page: z.ZodMiniObject<{
|
|
124
|
+
path: z.ZodMiniString<string>;
|
|
125
|
+
}, z.core.$strict>;
|
|
126
|
+
}, z.core.$strict>;
|
|
127
|
+
type FormDetailsMetadata = z.infer<typeof formDetailsMetadataSchema>;
|
|
128
|
+
/**
|
|
129
|
+
* Registration config for `form_details`.
|
|
130
|
+
*
|
|
131
|
+
* Manual-only with no options; the empty object enables typed
|
|
132
|
+
* `trackEvent('form_details', ...)` calls.
|
|
133
|
+
*/
|
|
134
|
+
declare const formDetailsConfigSchema: z.ZodMiniObject<{}, z.core.$strict>;
|
|
135
|
+
type FormDetailsConfig = z.infer<typeof formDetailsConfigSchema>;
|
|
136
|
+
|
|
95
137
|
/**
|
|
96
138
|
* Metadata for a manually fired `form_step` event.
|
|
97
139
|
*
|
|
@@ -414,6 +456,12 @@ declare const EVENT_SEMANTICS: {
|
|
|
414
456
|
readonly outcomeRole: "engagement";
|
|
415
457
|
readonly clientVisibility: "detailed";
|
|
416
458
|
};
|
|
459
|
+
readonly form_details: {
|
|
460
|
+
readonly label: "Form details added";
|
|
461
|
+
readonly category: "lead";
|
|
462
|
+
readonly outcomeRole: "engagement";
|
|
463
|
+
readonly clientVisibility: "detailed";
|
|
464
|
+
};
|
|
417
465
|
readonly form_submit: {
|
|
418
466
|
readonly label: "Form submitted";
|
|
419
467
|
readonly category: "lead";
|
|
@@ -686,6 +734,7 @@ declare const EVENT_REGISTRY: {
|
|
|
686
734
|
role: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
687
735
|
rule: z.ZodMiniString<string>;
|
|
688
736
|
}, zod_v4_core.$strict>>>>;
|
|
737
|
+
submission_id: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUUID>>;
|
|
689
738
|
}, zod_v4_core.$strict>;
|
|
690
739
|
page: z.ZodMiniObject<{
|
|
691
740
|
path: z.ZodMiniString<string>;
|
|
@@ -721,6 +770,44 @@ declare const EVENT_REGISTRY: {
|
|
|
721
770
|
}, zod_v4_core.$strict>;
|
|
722
771
|
readonly configSchema: z.ZodMiniObject<{}, zod_v4_core.$strict>;
|
|
723
772
|
};
|
|
773
|
+
readonly form_details: {
|
|
774
|
+
readonly kind: "manual";
|
|
775
|
+
readonly semantics: {
|
|
776
|
+
readonly label: "Form details added";
|
|
777
|
+
readonly category: "lead";
|
|
778
|
+
readonly outcomeRole: "engagement";
|
|
779
|
+
readonly clientVisibility: "detailed";
|
|
780
|
+
};
|
|
781
|
+
readonly metadataSchema: z.ZodMiniObject<{
|
|
782
|
+
form: z.ZodMiniObject<{
|
|
783
|
+
id: z.ZodMiniString<string>;
|
|
784
|
+
submission_id: z.ZodMiniUUID;
|
|
785
|
+
kind: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
786
|
+
fields: z.ZodMiniArray<z.ZodMiniObject<{
|
|
787
|
+
name: z.ZodMiniString<string>;
|
|
788
|
+
type: z.ZodMiniString<string>;
|
|
789
|
+
label: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
790
|
+
value: z.ZodMiniType<JsonValue, unknown, zod_v4_core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
791
|
+
role: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
792
|
+
}, zod_v4_core.$strict>>;
|
|
793
|
+
contract_version: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniInt>>;
|
|
794
|
+
contract_hash: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
795
|
+
extra: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniArray<z.ZodMiniObject<{
|
|
796
|
+
key: z.ZodMiniString<string>;
|
|
797
|
+
label: z.ZodMiniString<string>;
|
|
798
|
+
value: z.ZodMiniType<JsonValue, unknown, zod_v4_core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
799
|
+
}, zod_v4_core.$strict>>>>;
|
|
800
|
+
contract_violations: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniArray<z.ZodMiniObject<{
|
|
801
|
+
role: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
802
|
+
rule: z.ZodMiniString<string>;
|
|
803
|
+
}, zod_v4_core.$strict>>>>;
|
|
804
|
+
}, zod_v4_core.$strict>;
|
|
805
|
+
page: z.ZodMiniObject<{
|
|
806
|
+
path: z.ZodMiniString<string>;
|
|
807
|
+
}, zod_v4_core.$strict>;
|
|
808
|
+
}, zod_v4_core.$strict>;
|
|
809
|
+
readonly configSchema: z.ZodMiniObject<{}, zod_v4_core.$strict>;
|
|
810
|
+
};
|
|
724
811
|
readonly phone_click: {
|
|
725
812
|
readonly kind: "manual";
|
|
726
813
|
readonly semantics: {
|
|
@@ -794,6 +881,7 @@ type MetadataByName = {
|
|
|
794
881
|
site_link_arrival: SiteLinkArrivalMetadata;
|
|
795
882
|
form_submit: FormSubmitMetadata;
|
|
796
883
|
form_step: FormStepMetadata;
|
|
884
|
+
form_details: FormDetailsMetadata;
|
|
797
885
|
phone_click: PhoneClickMetadata;
|
|
798
886
|
cta_click: CtaClickMetadata;
|
|
799
887
|
};
|
|
@@ -810,6 +898,7 @@ type ConfigByName = {
|
|
|
810
898
|
site_link_arrival: SiteLinkArrivalConfig;
|
|
811
899
|
form_submit: FormSubmitConfig;
|
|
812
900
|
form_step: FormStepConfig;
|
|
901
|
+
form_details: FormDetailsConfig;
|
|
813
902
|
phone_click: PhoneClickConfig;
|
|
814
903
|
cta_click: CtaClickConfig;
|
|
815
904
|
};
|
|
@@ -864,6 +953,7 @@ type TriggerRegistryConfig = {
|
|
|
864
953
|
manual?: Partial<{
|
|
865
954
|
form_submit: EventConfig<"form_submit">;
|
|
866
955
|
form_step: EventConfig<"form_step">;
|
|
956
|
+
form_details: EventConfig<"form_details">;
|
|
867
957
|
phone_click: EventConfig<"phone_click">;
|
|
868
958
|
cta_click: EventConfig<"cta_click">;
|
|
869
959
|
}>;
|
|
@@ -933,4 +1023,4 @@ interface TypedTrackingClient<TRegistry extends TriggerRegistryConfig> {
|
|
|
933
1023
|
getVisitorId(): string;
|
|
934
1024
|
}
|
|
935
1025
|
|
|
936
|
-
export { type AutomaticEventName as A, type
|
|
1026
|
+
export { type AutomaticEventName as A, type SiteLinkArrivalConfig as B, type CtaClickConfig as C, type SiteLinkArrivalMetadata as D, EVENT_SEMANTICS as E, type FormDetailsConfig as F, type SiteLinkClickConfig as G, type SiteLinkClickMetadata as H, type SpecificPageName as I, type SpecificPageVisitConfig as J, type SpecificPageVisitMetadata as K, type TimeOnSiteMetadata as L, type ManualEventName as M, type TrackableEvent as N, type TriggerRegistryConfig as O, type PageExitConfig as P, type TypedTrackEventOptions as Q, type RegisteredAutomaticEvents as R, type ScrollDepthConfig as S, type TimeOnSiteConfig as T, type TypedTrackingClient as U, getEventSemantics as V, type CtaClickMetadata as a, type EventCategory as b, type EventClientVisibility as c, type EventConfig as d, type EventKind as e, type EventMetadata as f, type EventName as g, type EventOutcomeRole as h, type EventSemantics as i, type FormDetailsMetadata as j, type FormStartConfig as k, type FormStartMetadata as l, type FormStepConfig as m, type FormStepMetadata as n, type MultiPageSessionConfig as o, type MultiPageSessionMetadata as p, type PageExitMetadata as q, type PageIdentity as r, type PageViewConfig as s, type PageViewMetadata as t, type PhoneClickConfig as u, type PhoneClickMetadata as v, type RegisteredManualEvents as w, type ScrollDepthMetadata as x, type SdkHeartbeatConfig as y, type SdkHeartbeatMetadata as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as zod_v4_core from 'zod/v4/core';
|
|
2
2
|
import * as z from 'zod/mini';
|
|
3
|
-
import { J as JsonValue, j as FormSubmitConfig, k as FormSubmitMetadata } from './phone-utils-
|
|
3
|
+
import { J as JsonValue, j as FormSubmitConfig, k as FormSubmitMetadata } from './phone-utils-BlWj8oxq.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Metadata for a manually fired `cta_click` event.
|
|
@@ -92,6 +92,48 @@ declare const formStartConfigSchema: z.ZodMiniObject<{
|
|
|
92
92
|
}, z.core.$strict>;
|
|
93
93
|
type FormStartConfig = z.infer<typeof formStartConfigSchema>;
|
|
94
94
|
|
|
95
|
+
/**
|
|
96
|
+
* A manual `form_details`: optional answers the API folds into the `form_submit` whose
|
|
97
|
+
* `submission_id` it names (add-only, never a lead). Built by `leadForms.addDetails()`.
|
|
98
|
+
*/
|
|
99
|
+
declare const formDetailsMetadataSchema: z.ZodMiniObject<{
|
|
100
|
+
form: z.ZodMiniObject<{
|
|
101
|
+
id: z.ZodMiniString<string>;
|
|
102
|
+
submission_id: z.ZodMiniUUID;
|
|
103
|
+
kind: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
104
|
+
fields: z.ZodMiniArray<z.ZodMiniObject<{
|
|
105
|
+
name: z.ZodMiniString<string>;
|
|
106
|
+
type: z.ZodMiniString<string>;
|
|
107
|
+
label: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
108
|
+
value: z.ZodMiniType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
109
|
+
role: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
110
|
+
}, z.core.$strict>>;
|
|
111
|
+
contract_version: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniInt>>;
|
|
112
|
+
contract_hash: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
113
|
+
extra: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniArray<z.ZodMiniObject<{
|
|
114
|
+
key: z.ZodMiniString<string>;
|
|
115
|
+
label: z.ZodMiniString<string>;
|
|
116
|
+
value: z.ZodMiniType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
117
|
+
}, z.core.$strict>>>>;
|
|
118
|
+
contract_violations: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniArray<z.ZodMiniObject<{
|
|
119
|
+
role: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
120
|
+
rule: z.ZodMiniString<string>;
|
|
121
|
+
}, z.core.$strict>>>>;
|
|
122
|
+
}, z.core.$strict>;
|
|
123
|
+
page: z.ZodMiniObject<{
|
|
124
|
+
path: z.ZodMiniString<string>;
|
|
125
|
+
}, z.core.$strict>;
|
|
126
|
+
}, z.core.$strict>;
|
|
127
|
+
type FormDetailsMetadata = z.infer<typeof formDetailsMetadataSchema>;
|
|
128
|
+
/**
|
|
129
|
+
* Registration config for `form_details`.
|
|
130
|
+
*
|
|
131
|
+
* Manual-only with no options; the empty object enables typed
|
|
132
|
+
* `trackEvent('form_details', ...)` calls.
|
|
133
|
+
*/
|
|
134
|
+
declare const formDetailsConfigSchema: z.ZodMiniObject<{}, z.core.$strict>;
|
|
135
|
+
type FormDetailsConfig = z.infer<typeof formDetailsConfigSchema>;
|
|
136
|
+
|
|
95
137
|
/**
|
|
96
138
|
* Metadata for a manually fired `form_step` event.
|
|
97
139
|
*
|
|
@@ -414,6 +456,12 @@ declare const EVENT_SEMANTICS: {
|
|
|
414
456
|
readonly outcomeRole: "engagement";
|
|
415
457
|
readonly clientVisibility: "detailed";
|
|
416
458
|
};
|
|
459
|
+
readonly form_details: {
|
|
460
|
+
readonly label: "Form details added";
|
|
461
|
+
readonly category: "lead";
|
|
462
|
+
readonly outcomeRole: "engagement";
|
|
463
|
+
readonly clientVisibility: "detailed";
|
|
464
|
+
};
|
|
417
465
|
readonly form_submit: {
|
|
418
466
|
readonly label: "Form submitted";
|
|
419
467
|
readonly category: "lead";
|
|
@@ -686,6 +734,7 @@ declare const EVENT_REGISTRY: {
|
|
|
686
734
|
role: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
687
735
|
rule: z.ZodMiniString<string>;
|
|
688
736
|
}, zod_v4_core.$strict>>>>;
|
|
737
|
+
submission_id: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUUID>>;
|
|
689
738
|
}, zod_v4_core.$strict>;
|
|
690
739
|
page: z.ZodMiniObject<{
|
|
691
740
|
path: z.ZodMiniString<string>;
|
|
@@ -721,6 +770,44 @@ declare const EVENT_REGISTRY: {
|
|
|
721
770
|
}, zod_v4_core.$strict>;
|
|
722
771
|
readonly configSchema: z.ZodMiniObject<{}, zod_v4_core.$strict>;
|
|
723
772
|
};
|
|
773
|
+
readonly form_details: {
|
|
774
|
+
readonly kind: "manual";
|
|
775
|
+
readonly semantics: {
|
|
776
|
+
readonly label: "Form details added";
|
|
777
|
+
readonly category: "lead";
|
|
778
|
+
readonly outcomeRole: "engagement";
|
|
779
|
+
readonly clientVisibility: "detailed";
|
|
780
|
+
};
|
|
781
|
+
readonly metadataSchema: z.ZodMiniObject<{
|
|
782
|
+
form: z.ZodMiniObject<{
|
|
783
|
+
id: z.ZodMiniString<string>;
|
|
784
|
+
submission_id: z.ZodMiniUUID;
|
|
785
|
+
kind: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
786
|
+
fields: z.ZodMiniArray<z.ZodMiniObject<{
|
|
787
|
+
name: z.ZodMiniString<string>;
|
|
788
|
+
type: z.ZodMiniString<string>;
|
|
789
|
+
label: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
790
|
+
value: z.ZodMiniType<JsonValue, unknown, zod_v4_core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
791
|
+
role: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
792
|
+
}, zod_v4_core.$strict>>;
|
|
793
|
+
contract_version: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniInt>>;
|
|
794
|
+
contract_hash: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
795
|
+
extra: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniArray<z.ZodMiniObject<{
|
|
796
|
+
key: z.ZodMiniString<string>;
|
|
797
|
+
label: z.ZodMiniString<string>;
|
|
798
|
+
value: z.ZodMiniType<JsonValue, unknown, zod_v4_core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
799
|
+
}, zod_v4_core.$strict>>>>;
|
|
800
|
+
contract_violations: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniArray<z.ZodMiniObject<{
|
|
801
|
+
role: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
802
|
+
rule: z.ZodMiniString<string>;
|
|
803
|
+
}, zod_v4_core.$strict>>>>;
|
|
804
|
+
}, zod_v4_core.$strict>;
|
|
805
|
+
page: z.ZodMiniObject<{
|
|
806
|
+
path: z.ZodMiniString<string>;
|
|
807
|
+
}, zod_v4_core.$strict>;
|
|
808
|
+
}, zod_v4_core.$strict>;
|
|
809
|
+
readonly configSchema: z.ZodMiniObject<{}, zod_v4_core.$strict>;
|
|
810
|
+
};
|
|
724
811
|
readonly phone_click: {
|
|
725
812
|
readonly kind: "manual";
|
|
726
813
|
readonly semantics: {
|
|
@@ -794,6 +881,7 @@ type MetadataByName = {
|
|
|
794
881
|
site_link_arrival: SiteLinkArrivalMetadata;
|
|
795
882
|
form_submit: FormSubmitMetadata;
|
|
796
883
|
form_step: FormStepMetadata;
|
|
884
|
+
form_details: FormDetailsMetadata;
|
|
797
885
|
phone_click: PhoneClickMetadata;
|
|
798
886
|
cta_click: CtaClickMetadata;
|
|
799
887
|
};
|
|
@@ -810,6 +898,7 @@ type ConfigByName = {
|
|
|
810
898
|
site_link_arrival: SiteLinkArrivalConfig;
|
|
811
899
|
form_submit: FormSubmitConfig;
|
|
812
900
|
form_step: FormStepConfig;
|
|
901
|
+
form_details: FormDetailsConfig;
|
|
813
902
|
phone_click: PhoneClickConfig;
|
|
814
903
|
cta_click: CtaClickConfig;
|
|
815
904
|
};
|
|
@@ -864,6 +953,7 @@ type TriggerRegistryConfig = {
|
|
|
864
953
|
manual?: Partial<{
|
|
865
954
|
form_submit: EventConfig<"form_submit">;
|
|
866
955
|
form_step: EventConfig<"form_step">;
|
|
956
|
+
form_details: EventConfig<"form_details">;
|
|
867
957
|
phone_click: EventConfig<"phone_click">;
|
|
868
958
|
cta_click: EventConfig<"cta_click">;
|
|
869
959
|
}>;
|
|
@@ -933,4 +1023,4 @@ interface TypedTrackingClient<TRegistry extends TriggerRegistryConfig> {
|
|
|
933
1023
|
getVisitorId(): string;
|
|
934
1024
|
}
|
|
935
1025
|
|
|
936
|
-
export { type AutomaticEventName as A, type
|
|
1026
|
+
export { type AutomaticEventName as A, type SiteLinkArrivalConfig as B, type CtaClickConfig as C, type SiteLinkArrivalMetadata as D, EVENT_SEMANTICS as E, type FormDetailsConfig as F, type SiteLinkClickConfig as G, type SiteLinkClickMetadata as H, type SpecificPageName as I, type SpecificPageVisitConfig as J, type SpecificPageVisitMetadata as K, type TimeOnSiteMetadata as L, type ManualEventName as M, type TrackableEvent as N, type TriggerRegistryConfig as O, type PageExitConfig as P, type TypedTrackEventOptions as Q, type RegisteredAutomaticEvents as R, type ScrollDepthConfig as S, type TimeOnSiteConfig as T, type TypedTrackingClient as U, getEventSemantics as V, type CtaClickMetadata as a, type EventCategory as b, type EventClientVisibility as c, type EventConfig as d, type EventKind as e, type EventMetadata as f, type EventName as g, type EventOutcomeRole as h, type EventSemantics as i, type FormDetailsMetadata as j, type FormStartConfig as k, type FormStartMetadata as l, type FormStepConfig as m, type FormStepMetadata as n, type MultiPageSessionConfig as o, type MultiPageSessionMetadata as p, type PageExitMetadata as q, type PageIdentity as r, type PageViewConfig as s, type PageViewMetadata as t, type PhoneClickConfig as u, type PhoneClickMetadata as v, type RegisteredManualEvents as w, type ScrollDepthMetadata as x, type SdkHeartbeatConfig as y, type SdkHeartbeatMetadata as z };
|
|
@@ -40,6 +40,7 @@ declare const formSubmitMetadataSchema: z.ZodMiniObject<{
|
|
|
40
40
|
role: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
41
41
|
rule: z.ZodMiniString<string>;
|
|
42
42
|
}, z.core.$strict>>>>;
|
|
43
|
+
submission_id: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUUID>>;
|
|
43
44
|
}, z.core.$strict>;
|
|
44
45
|
page: z.ZodMiniObject<{
|
|
45
46
|
path: z.ZodMiniString<string>;
|
|
@@ -40,6 +40,7 @@ declare const formSubmitMetadataSchema: z.ZodMiniObject<{
|
|
|
40
40
|
role: z.ZodMiniNullable<z.ZodMiniString<string>>;
|
|
41
41
|
rule: z.ZodMiniString<string>;
|
|
42
42
|
}, z.core.$strict>>>>;
|
|
43
|
+
submission_id: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUUID>>;
|
|
43
44
|
}, z.core.$strict>;
|
|
44
45
|
page: z.ZodMiniObject<{
|
|
45
46
|
path: z.ZodMiniString<string>;
|
package/dist/phone.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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-
|
|
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-BlWj8oxq.mjs';
|
|
2
2
|
export { CountryCode } from 'libphonenumber-js';
|
|
3
3
|
import 'zod/mini';
|
package/dist/phone.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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-
|
|
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-BlWj8oxq.js';
|
|
2
2
|
export { CountryCode } from 'libphonenumber-js';
|
|
3
3
|
import 'zod/mini';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as z from 'zod/mini';
|
|
2
|
-
import { S as SalesBookingsClient, w as ConversionConfigStore,
|
|
2
|
+
import { S as SalesBookingsClient, w as ConversionConfigStore, a2 as TrackingConfigRuntime } from './bookings-CVvpj_8K.mjs';
|
|
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, w as ConversionConfigStore,
|
|
2
|
+
import { S as SalesBookingsClient, w as ConversionConfigStore, a2 as TrackingConfigRuntime } from './bookings-CCGpXhYE.js';
|
|
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-
|
|
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,
|
|
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-B1ONR-Yi.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, X as newBookingAttemptKey } from './bookings-CVvpj_8K.mjs';
|
|
3
3
|
import 'zod/mini';
|
|
4
4
|
import 'libphonenumber-js';
|
|
5
|
-
import './phone-utils-
|
|
5
|
+
import './phone-utils-BlWj8oxq.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-
|
|
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,
|
|
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-Dlc_umAV.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, X as newBookingAttemptKey } from './bookings-CCGpXhYE.js';
|
|
3
3
|
import 'zod/mini';
|
|
4
4
|
import 'libphonenumber-js';
|
|
5
|
-
import './phone-utils-
|
|
5
|
+
import './phone-utils-BlWj8oxq.js';
|
package/dist/sales.js
CHANGED
|
@@ -283,7 +283,6 @@ var jsonValueSchema = z.lazy(
|
|
|
283
283
|
])
|
|
284
284
|
).register(z.globalRegistry, { id: "JsonSerializableValue" });
|
|
285
285
|
var contractNameSchema = z.string().check(z.regex(/^[a-z][a-z0-9_]{0,47}(:[a-z0-9_-]{1,48})?$/));
|
|
286
|
-
var contractName = contractNameSchema;
|
|
287
286
|
var violationRole = z.string().check(
|
|
288
287
|
z.maxLength(200),
|
|
289
288
|
z.regex(
|
|
@@ -295,38 +294,41 @@ var contractViolationSchema = z.strictObject({
|
|
|
295
294
|
role: z.nullable(violationRole),
|
|
296
295
|
rule: z.string().check(z.regex(/^[a-z][a-z_]{0,47}$/))
|
|
297
296
|
});
|
|
297
|
+
var formFieldSchema = z.strictObject({
|
|
298
|
+
name: z.string(),
|
|
299
|
+
type: z.string(),
|
|
300
|
+
label: z.nullable(z.string()),
|
|
301
|
+
value: jsonValueSchema,
|
|
302
|
+
role: z.optional(z.nullable(contractNameSchema))
|
|
303
|
+
});
|
|
304
|
+
var formExtraSchema = z.optional(
|
|
305
|
+
z.nullable(
|
|
306
|
+
z.array(
|
|
307
|
+
z.strictObject({
|
|
308
|
+
key: z.string().check(z.maxLength(64)),
|
|
309
|
+
label: z.string().check(z.maxLength(200)),
|
|
310
|
+
value: jsonValueSchema
|
|
311
|
+
})
|
|
312
|
+
).check(z.maxLength(20))
|
|
313
|
+
)
|
|
314
|
+
);
|
|
315
|
+
var contractVersionSchema = z.optional(z.nullable(z.int().check(z.gte(1))));
|
|
316
|
+
var contractHashSchema = z.optional(z.nullable(z.string().check(z.maxLength(64))));
|
|
317
|
+
var formContractViolationsSchema = z.optional(
|
|
318
|
+
z.nullable(z.array(contractViolationSchema).check(z.maxLength(MAX_CONTRACT_VIOLATIONS)))
|
|
319
|
+
);
|
|
298
320
|
var formSubmitMetadataSchema = z.strictObject({
|
|
299
321
|
form: z.strictObject({
|
|
300
322
|
id: z.string(),
|
|
301
323
|
action: z.nullable(z.string()),
|
|
302
|
-
fields: z.optional(
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
})
|
|
311
|
-
)
|
|
312
|
-
),
|
|
313
|
-
kind: z.optional(z.nullable(contractName)),
|
|
314
|
-
contract_version: z.optional(z.nullable(z.int().check(z.gte(1)))),
|
|
315
|
-
contract_hash: z.optional(z.nullable(z.string().check(z.maxLength(64)))),
|
|
316
|
-
extra: z.optional(
|
|
317
|
-
z.nullable(
|
|
318
|
-
z.array(
|
|
319
|
-
z.strictObject({
|
|
320
|
-
key: z.string().check(z.maxLength(64)),
|
|
321
|
-
label: z.string().check(z.maxLength(200)),
|
|
322
|
-
value: jsonValueSchema
|
|
323
|
-
})
|
|
324
|
-
).check(z.maxLength(20))
|
|
325
|
-
)
|
|
326
|
-
),
|
|
327
|
-
contract_violations: z.optional(
|
|
328
|
-
z.nullable(z.array(contractViolationSchema).check(z.maxLength(MAX_CONTRACT_VIOLATIONS)))
|
|
329
|
-
)
|
|
324
|
+
fields: z.optional(z.array(formFieldSchema)),
|
|
325
|
+
kind: z.optional(z.nullable(contractNameSchema)),
|
|
326
|
+
contract_version: contractVersionSchema,
|
|
327
|
+
contract_hash: contractHashSchema,
|
|
328
|
+
extra: formExtraSchema,
|
|
329
|
+
contract_violations: formContractViolationsSchema,
|
|
330
|
+
// Minted per submit; a later `form_details` names it to add answers to this lead.
|
|
331
|
+
submission_id: z.optional(z.nullable(z.uuidv4()))
|
|
330
332
|
}),
|
|
331
333
|
page: z.strictObject({
|
|
332
334
|
path: z.string()
|
|
@@ -378,7 +380,8 @@ function camelRules(rules) {
|
|
|
378
380
|
specialHours: rules.special_hours,
|
|
379
381
|
vehicleRequired: rules.vehicle_required,
|
|
380
382
|
vehicleDeferred: rules.vehicle_deferred,
|
|
381
|
-
dropOffOptions: rules.drop_off_options
|
|
383
|
+
dropOffOptions: rules.drop_off_options,
|
|
384
|
+
bookedCounts: rules.booked_counts ?? {}
|
|
382
385
|
};
|
|
383
386
|
}
|
|
384
387
|
function buildBookingHandoffUrl(fallbackUrl, prefill = {}) {
|
|
@@ -640,9 +643,18 @@ function parseBookingRules(value) {
|
|
|
640
643
|
special_hours: parseWindowsMap(r.special_hours),
|
|
641
644
|
vehicle_required: r.vehicle_required === true,
|
|
642
645
|
vehicle_deferred: r.vehicle_deferred === true,
|
|
643
|
-
drop_off_options: isStringList(r.drop_off_options) ? r.drop_off_options : []
|
|
646
|
+
drop_off_options: isStringList(r.drop_off_options) ? r.drop_off_options : [],
|
|
647
|
+
booked_counts: parseCounts(r.booked_counts)
|
|
644
648
|
};
|
|
645
649
|
}
|
|
650
|
+
function parseCounts(value) {
|
|
651
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return {};
|
|
652
|
+
const counts = {};
|
|
653
|
+
for (const [date, count] of Object.entries(value)) {
|
|
654
|
+
if (typeof count === "number" && Number.isInteger(count) && count >= 0) counts[date] = count;
|
|
655
|
+
}
|
|
656
|
+
return counts;
|
|
657
|
+
}
|
|
646
658
|
function parseBookingOption(value) {
|
|
647
659
|
if (!value || typeof value !== "object") return [];
|
|
648
660
|
const o = value;
|
|
@@ -1330,10 +1342,10 @@ var KNOWN_ROLES = new Set(LEAD_FORM_ROLES);
|
|
|
1330
1342
|
var ROLE_ORDER = new Map(LEAD_FORM_ROLES.map((role, index) => [role, index]));
|
|
1331
1343
|
var ADD_ON = /^add_on:[a-z0-9_-]{1,48}$/;
|
|
1332
1344
|
var CONTRACT_NAME = /^[a-z][a-z0-9_]{0,47}(:[a-z0-9_-]{1,48})?$/;
|
|
1333
|
-
function judgeLeadForm(kind, formId, fields, contracts, settings) {
|
|
1345
|
+
function judgeLeadForm(kind, formId, fields, contracts, settings, { partial = false } = {}) {
|
|
1334
1346
|
const generated = contracts?.contracts[kind];
|
|
1335
1347
|
const live = liveContract(settings.trackingConfig, kind);
|
|
1336
|
-
const violations = check(live === void 0 ? generated : fromLive(live), fields);
|
|
1348
|
+
const violations = check(live === void 0 ? generated : fromLive(live), fields, partial);
|
|
1337
1349
|
const liveHash = live === void 0 ? void 0 : live?.contract_hash ?? null;
|
|
1338
1350
|
if (contracts && (liveHash !== void 0 && (generated?.hash ?? null) !== liveHash || contracts.registryVersion !== LEAD_FORM_REGISTRY_VERSION)) {
|
|
1339
1351
|
violations.push({ role: null, rule: "contract_behind" });
|
|
@@ -1365,7 +1377,7 @@ function fromLive(live) {
|
|
|
1365
1377
|
options: Object.fromEntries(live.options.map((o) => [o.role, o.options.map((x) => x.key)]))
|
|
1366
1378
|
};
|
|
1367
1379
|
}
|
|
1368
|
-
function check(contract, fields) {
|
|
1380
|
+
function check(contract, fields, partial) {
|
|
1369
1381
|
const answered = new Map(fields);
|
|
1370
1382
|
const violations = [];
|
|
1371
1383
|
for (const [role, value] of fields) {
|
|
@@ -1383,6 +1395,7 @@ function check(contract, fields) {
|
|
|
1383
1395
|
violations.push({ role, rule: "unknown_option" });
|
|
1384
1396
|
}
|
|
1385
1397
|
}
|
|
1398
|
+
if (partial) return violations;
|
|
1386
1399
|
for (const { role, requiredWhen } of contract?.requires ?? []) {
|
|
1387
1400
|
const owing = requiredWhen === null || optionKeys(answered.get(requiredWhen.role)).some((key) => requiredWhen.anyOf.includes(key));
|
|
1388
1401
|
if (owing && !answered.has(role)) violations.push({ role, rule: "missing_required" });
|
|
@@ -2046,12 +2059,15 @@ var zSmsWithheldReason = z4.enum([
|
|
|
2046
2059
|
"test_or_bot_session",
|
|
2047
2060
|
"invalid_phone",
|
|
2048
2061
|
"recently_texted",
|
|
2062
|
+
"owner_not_alerted",
|
|
2063
|
+
"no_new_details",
|
|
2049
2064
|
"do_not_contact",
|
|
2050
2065
|
"do_not_text_tag",
|
|
2051
2066
|
"missing_value",
|
|
2052
2067
|
"us_texting_pending",
|
|
2053
2068
|
"us_texting_rejected",
|
|
2054
|
-
"texts_paused"
|
|
2069
|
+
"texts_paused",
|
|
2070
|
+
"outside_nanp"
|
|
2055
2071
|
]);
|
|
2056
2072
|
var zSaleSmsStatusSchema = z4.object({
|
|
2057
2073
|
can_send_now: z4._default(z4.boolean(), false),
|