@aranova/tracking-react 1.17.0 → 1.19.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-2ZKfenQ7.d.ts → bookings-BDLyF70h.d.ts} +61 -5
- package/dist/{bookings-DOh1WMhH.d.mts → bookings-v3HA8gsC.d.mts} +61 -5
- package/dist/client.d.mts +122 -5
- package/dist/client.d.ts +122 -5
- package/dist/client.js +1917 -193
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +1919 -193
- package/dist/client.mjs.map +1 -1
- package/dist/index.d.mts +17 -41
- package/dist/index.d.ts +17 -41
- package/dist/index.js +220 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +218 -39
- package/dist/index.mjs.map +1 -1
- package/dist/{ingest-typed-D7I4aQ7p.d.ts → ingest-typed-BEFQd3WM.d.mts} +290 -2
- package/dist/{ingest-typed-BO6Arbw-.d.mts → ingest-typed-DChvvgwd.d.ts} +290 -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-B1u_IHLZ.d.mts → sales-Cu8M8I8k.d.ts} +1 -1
- package/dist/{sales-I2jXSS-l.d.ts → sales-DriCnCbM.d.mts} +1 -1
- package/dist/sales.d.mts +3 -3
- package/dist/sales.d.ts +3 -3
- package/dist/sales.js +150 -38
- package/dist/sales.js.map +1 -1
- package/dist/sales.mjs +150 -38
- package/dist/sales.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -233,7 +233,8 @@ var TRACKING_CAPABILITIES = [
|
|
|
233
233
|
"form_capture",
|
|
234
234
|
"phone_click_capture",
|
|
235
235
|
"phone_fields",
|
|
236
|
-
"typed_form_submit"
|
|
236
|
+
"typed_form_submit",
|
|
237
|
+
"video_tracking"
|
|
237
238
|
];
|
|
238
239
|
var CAPABILITY_DOM_ATTRIBUTE = "data-aranova-capability";
|
|
239
240
|
var registered = /* @__PURE__ */ new Set();
|
|
@@ -774,8 +775,48 @@ function parseTrigger(value) {
|
|
|
774
775
|
if (typeof t.threshold_seconds === "number") spec.threshold_seconds = t.threshold_seconds;
|
|
775
776
|
if (typeof t.page_threshold === "number") spec.page_threshold = t.page_threshold;
|
|
776
777
|
if (typeof t.page_name === "string") spec.page_name = t.page_name;
|
|
778
|
+
if (t.metric === "percent" || t.metric === "seconds") spec.metric = t.metric;
|
|
779
|
+
if (typeof t.threshold === "number") spec.threshold = t.threshold;
|
|
780
|
+
if (typeof t.video_id === "string" || t.video_id === null) spec.video_id = t.video_id;
|
|
777
781
|
return spec;
|
|
778
782
|
}
|
|
783
|
+
function parseVideoEntry(fallbackKey2, entry) {
|
|
784
|
+
const key = typeof entry.key === "string" && entry.key ? entry.key : fallbackKey2;
|
|
785
|
+
if (!key) return null;
|
|
786
|
+
const host = typeof entry.host === "string" ? entry.host : "";
|
|
787
|
+
const title = typeof entry.title === "string" && entry.title ? entry.title : key;
|
|
788
|
+
const sourcesRaw = isRecord(entry.sources) ? entry.sources : null;
|
|
789
|
+
const desktop = sourcesRaw && typeof sourcesRaw.desktop === "string" ? sourcesRaw.desktop : typeof entry.desktop_uid === "string" ? entry.desktop_uid : "";
|
|
790
|
+
if (!host || !desktop) return null;
|
|
791
|
+
const mobile = sourcesRaw && typeof sourcesRaw.mobile === "string" ? sourcesRaw.mobile : typeof entry.mobile_uid === "string" ? entry.mobile_uid : null;
|
|
792
|
+
const posterTime = typeof entry.poster_time === "number" ? entry.poster_time : typeof entry.poster_time_s === "number" ? entry.poster_time_s : 4;
|
|
793
|
+
return {
|
|
794
|
+
key,
|
|
795
|
+
title,
|
|
796
|
+
host,
|
|
797
|
+
sources: { desktop, mobile },
|
|
798
|
+
poster_time: posterTime,
|
|
799
|
+
duration_s: typeof entry.duration_s === "number" ? entry.duration_s : null
|
|
800
|
+
};
|
|
801
|
+
}
|
|
802
|
+
function parseVideos(value) {
|
|
803
|
+
const out = {};
|
|
804
|
+
if (Array.isArray(value)) {
|
|
805
|
+
for (const item of value) {
|
|
806
|
+
if (!isRecord(item)) continue;
|
|
807
|
+
const parsed = parseVideoEntry("", item);
|
|
808
|
+
if (parsed) out[parsed.key] = parsed;
|
|
809
|
+
}
|
|
810
|
+
return out;
|
|
811
|
+
}
|
|
812
|
+
if (!isRecord(value)) return out;
|
|
813
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
814
|
+
if (!isRecord(entry)) continue;
|
|
815
|
+
const parsed = parseVideoEntry(key, entry);
|
|
816
|
+
if (parsed) out[parsed.key] = parsed;
|
|
817
|
+
}
|
|
818
|
+
return out;
|
|
819
|
+
}
|
|
779
820
|
function parseConversionConfig(raw) {
|
|
780
821
|
if (!raw || typeof raw !== "object") return null;
|
|
781
822
|
const obj = raw;
|
|
@@ -826,7 +867,8 @@ function parseConversionConfig(raw) {
|
|
|
826
867
|
goals,
|
|
827
868
|
linked_hostnames: Array.isArray(obj.linked_hostnames) ? obj.linked_hostnames.filter((h) => typeof h === "string" && h.length > 0) : [],
|
|
828
869
|
integrations: parseIntegrations(obj.integrations),
|
|
829
|
-
lead_forms: parseLeadForms(obj.lead_forms)
|
|
870
|
+
lead_forms: parseLeadForms(obj.lead_forms),
|
|
871
|
+
videos: parseVideos(obj.videos)
|
|
830
872
|
};
|
|
831
873
|
}
|
|
832
874
|
function parseLeadForms(value) {
|
|
@@ -1072,6 +1114,21 @@ function automaticThresholdMet(goal, eventType, metadata) {
|
|
|
1072
1114
|
case "form_start":
|
|
1073
1115
|
case "phone_click":
|
|
1074
1116
|
return true;
|
|
1117
|
+
case "video_play":
|
|
1118
|
+
return trigger.video_id == null || hasStringField(metadata, "video_id") && metadata.video_id === trigger.video_id;
|
|
1119
|
+
case "video_progress": {
|
|
1120
|
+
if (trigger.video_id != null && (!hasStringField(metadata, "video_id") || metadata.video_id !== trigger.video_id)) {
|
|
1121
|
+
return false;
|
|
1122
|
+
}
|
|
1123
|
+
if (typeof trigger.threshold !== "number") return false;
|
|
1124
|
+
if (trigger.metric === "seconds") {
|
|
1125
|
+
return hasNumberField(metadata, "watched_s") && metadata.watched_s >= trigger.threshold;
|
|
1126
|
+
}
|
|
1127
|
+
if (trigger.metric === "percent") {
|
|
1128
|
+
return hasNumberField(metadata, "max_percent") && metadata.max_percent >= trigger.threshold || hasNumberField(metadata, "watched_percent") && metadata.watched_percent >= trigger.threshold;
|
|
1129
|
+
}
|
|
1130
|
+
return false;
|
|
1131
|
+
}
|
|
1075
1132
|
default:
|
|
1076
1133
|
return false;
|
|
1077
1134
|
}
|
|
@@ -1131,6 +1188,9 @@ var RETRY_BASE_MS = 5e3;
|
|
|
1131
1188
|
var RETRY_MAX_MS = 5 * 6e4;
|
|
1132
1189
|
var runtimes = /* @__PURE__ */ new Map();
|
|
1133
1190
|
var configuredIds = /* @__PURE__ */ new Set();
|
|
1191
|
+
var EMPTY_GOALS = [];
|
|
1192
|
+
var EMPTY_STRINGS = [];
|
|
1193
|
+
var EMPTY_VIDEOS = {};
|
|
1134
1194
|
var scriptLoad = null;
|
|
1135
1195
|
var jsInitialized = false;
|
|
1136
1196
|
function cacheKey2(url) {
|
|
@@ -1321,11 +1381,11 @@ var TrackingConfigRuntime = class {
|
|
|
1321
1381
|
void this.flush();
|
|
1322
1382
|
}
|
|
1323
1383
|
listGoals() {
|
|
1324
|
-
return this.current?.goals ??
|
|
1384
|
+
return this.current?.goals ?? EMPTY_GOALS;
|
|
1325
1385
|
}
|
|
1326
1386
|
/** Sibling hostnames for the linker — read from the cached object even while unconfirmed. */
|
|
1327
1387
|
linkedHostnames() {
|
|
1328
|
-
return this.current?.linked_hostnames ??
|
|
1388
|
+
return this.current?.linked_hostnames ?? EMPTY_STRINGS;
|
|
1329
1389
|
}
|
|
1330
1390
|
/**
|
|
1331
1391
|
* Integration blocks, from the cached object even while unconfirmed: the booking fallback
|
|
@@ -1338,6 +1398,14 @@ var TrackingConfigRuntime = class {
|
|
|
1338
1398
|
leadForms() {
|
|
1339
1399
|
return this.current?.lead_forms ?? null;
|
|
1340
1400
|
}
|
|
1401
|
+
/** Configured Cloudflare Stream tracked videos for this site. */
|
|
1402
|
+
videos() {
|
|
1403
|
+
return this.current?.videos ?? EMPTY_VIDEOS;
|
|
1404
|
+
}
|
|
1405
|
+
/** Look up one configured Cloudflare Stream tracked video by key. */
|
|
1406
|
+
getVideo(key) {
|
|
1407
|
+
return this.current?.videos?.[key] ?? null;
|
|
1408
|
+
}
|
|
1341
1409
|
async revalidateNow() {
|
|
1342
1410
|
try {
|
|
1343
1411
|
const headers = {};
|
|
@@ -1494,6 +1562,16 @@ var TrackingConfigRuntime = class {
|
|
|
1494
1562
|
this.scheduleRetry();
|
|
1495
1563
|
return;
|
|
1496
1564
|
}
|
|
1565
|
+
if (outcome === "fired" && typeof window !== "undefined" && typeof window.fbq === "function") {
|
|
1566
|
+
try {
|
|
1567
|
+
window.fbq("trackCustom", item.key, {
|
|
1568
|
+
...value != null ? { value } : {},
|
|
1569
|
+
...currency ? { currency } : {},
|
|
1570
|
+
...item.transactionId ? { transaction_id: item.transactionId } : {}
|
|
1571
|
+
});
|
|
1572
|
+
} catch {
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1497
1575
|
this.conversionQueue.shift();
|
|
1498
1576
|
}
|
|
1499
1577
|
}
|
|
@@ -1680,6 +1758,13 @@ var EVENT_SEMANTICS = {
|
|
|
1680
1758
|
outcomeRole: "engagement",
|
|
1681
1759
|
clientVisibility: "detailed"
|
|
1682
1760
|
},
|
|
1761
|
+
// Adds to the submit it names; counting it as a lead would double every lead.
|
|
1762
|
+
form_details: {
|
|
1763
|
+
label: "Form details added",
|
|
1764
|
+
category: "lead",
|
|
1765
|
+
outcomeRole: "engagement",
|
|
1766
|
+
clientVisibility: "detailed"
|
|
1767
|
+
},
|
|
1683
1768
|
form_submit: {
|
|
1684
1769
|
label: "Form submitted",
|
|
1685
1770
|
category: "lead",
|
|
@@ -1709,6 +1794,18 @@ var EVENT_SEMANTICS = {
|
|
|
1709
1794
|
category: "page",
|
|
1710
1795
|
outcomeRole: "navigation",
|
|
1711
1796
|
clientVisibility: "simple"
|
|
1797
|
+
},
|
|
1798
|
+
video_play: {
|
|
1799
|
+
label: "Video played",
|
|
1800
|
+
category: "engagement",
|
|
1801
|
+
outcomeRole: "engagement",
|
|
1802
|
+
clientVisibility: "simple"
|
|
1803
|
+
},
|
|
1804
|
+
video_progress: {
|
|
1805
|
+
label: "Video watched",
|
|
1806
|
+
category: "engagement",
|
|
1807
|
+
outcomeRole: "engagement",
|
|
1808
|
+
clientVisibility: "detailed"
|
|
1712
1809
|
}
|
|
1713
1810
|
};
|
|
1714
1811
|
function getEventSemantics(eventName) {
|
|
@@ -1738,7 +1835,6 @@ var jsonValueSchema = z2.lazy(
|
|
|
1738
1835
|
])
|
|
1739
1836
|
).register(z2.globalRegistry, { id: "JsonSerializableValue" });
|
|
1740
1837
|
var contractNameSchema = z2.string().check(z2.regex(/^[a-z][a-z0-9_]{0,47}(:[a-z0-9_-]{1,48})?$/));
|
|
1741
|
-
var contractName = contractNameSchema;
|
|
1742
1838
|
var violationRole = z2.string().check(
|
|
1743
1839
|
z2.maxLength(200),
|
|
1744
1840
|
z2.regex(
|
|
@@ -1750,38 +1846,41 @@ var contractViolationSchema = z2.strictObject({
|
|
|
1750
1846
|
role: z2.nullable(violationRole),
|
|
1751
1847
|
rule: z2.string().check(z2.regex(/^[a-z][a-z_]{0,47}$/))
|
|
1752
1848
|
});
|
|
1849
|
+
var formFieldSchema = z2.strictObject({
|
|
1850
|
+
name: z2.string(),
|
|
1851
|
+
type: z2.string(),
|
|
1852
|
+
label: z2.nullable(z2.string()),
|
|
1853
|
+
value: jsonValueSchema,
|
|
1854
|
+
role: z2.optional(z2.nullable(contractNameSchema))
|
|
1855
|
+
});
|
|
1856
|
+
var formExtraSchema = z2.optional(
|
|
1857
|
+
z2.nullable(
|
|
1858
|
+
z2.array(
|
|
1859
|
+
z2.strictObject({
|
|
1860
|
+
key: z2.string().check(z2.maxLength(64)),
|
|
1861
|
+
label: z2.string().check(z2.maxLength(200)),
|
|
1862
|
+
value: jsonValueSchema
|
|
1863
|
+
})
|
|
1864
|
+
).check(z2.maxLength(20))
|
|
1865
|
+
)
|
|
1866
|
+
);
|
|
1867
|
+
var contractVersionSchema = z2.optional(z2.nullable(z2.int().check(z2.gte(1))));
|
|
1868
|
+
var contractHashSchema = z2.optional(z2.nullable(z2.string().check(z2.maxLength(64))));
|
|
1869
|
+
var formContractViolationsSchema = z2.optional(
|
|
1870
|
+
z2.nullable(z2.array(contractViolationSchema).check(z2.maxLength(MAX_CONTRACT_VIOLATIONS)))
|
|
1871
|
+
);
|
|
1753
1872
|
var formSubmitMetadataSchema = z2.strictObject({
|
|
1754
1873
|
form: z2.strictObject({
|
|
1755
1874
|
id: z2.string(),
|
|
1756
1875
|
action: z2.nullable(z2.string()),
|
|
1757
|
-
fields: z2.optional(
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
})
|
|
1766
|
-
)
|
|
1767
|
-
),
|
|
1768
|
-
kind: z2.optional(z2.nullable(contractName)),
|
|
1769
|
-
contract_version: z2.optional(z2.nullable(z2.int().check(z2.gte(1)))),
|
|
1770
|
-
contract_hash: z2.optional(z2.nullable(z2.string().check(z2.maxLength(64)))),
|
|
1771
|
-
extra: z2.optional(
|
|
1772
|
-
z2.nullable(
|
|
1773
|
-
z2.array(
|
|
1774
|
-
z2.strictObject({
|
|
1775
|
-
key: z2.string().check(z2.maxLength(64)),
|
|
1776
|
-
label: z2.string().check(z2.maxLength(200)),
|
|
1777
|
-
value: jsonValueSchema
|
|
1778
|
-
})
|
|
1779
|
-
).check(z2.maxLength(20))
|
|
1780
|
-
)
|
|
1781
|
-
),
|
|
1782
|
-
contract_violations: z2.optional(
|
|
1783
|
-
z2.nullable(z2.array(contractViolationSchema).check(z2.maxLength(MAX_CONTRACT_VIOLATIONS)))
|
|
1784
|
-
)
|
|
1876
|
+
fields: z2.optional(z2.array(formFieldSchema)),
|
|
1877
|
+
kind: z2.optional(z2.nullable(contractNameSchema)),
|
|
1878
|
+
contract_version: contractVersionSchema,
|
|
1879
|
+
contract_hash: contractHashSchema,
|
|
1880
|
+
extra: formExtraSchema,
|
|
1881
|
+
contract_violations: formContractViolationsSchema,
|
|
1882
|
+
// Minted per submit; a later `form_details` names it to add answers to this lead.
|
|
1883
|
+
submission_id: z2.optional(z2.nullable(z2.uuidv4()))
|
|
1785
1884
|
}),
|
|
1786
1885
|
page: z2.strictObject({
|
|
1787
1886
|
path: z2.string()
|
|
@@ -1789,6 +1888,36 @@ var formSubmitMetadataSchema = z2.strictObject({
|
|
|
1789
1888
|
});
|
|
1790
1889
|
var formSubmitConfigSchema = z2.strictObject({});
|
|
1791
1890
|
|
|
1891
|
+
// ../tracking-core/src/video-ranges.ts
|
|
1892
|
+
function roundVideoSeconds(value) {
|
|
1893
|
+
if (!Number.isFinite(value) || value < 0) return 0;
|
|
1894
|
+
return Math.round(value * 100) / 100;
|
|
1895
|
+
}
|
|
1896
|
+
function mergeVideoRanges(ranges, epsilonSeconds = 0.25) {
|
|
1897
|
+
const valid = ranges.filter((r) => Number.isFinite(r.start_s) && Number.isFinite(r.end_s) && r.end_s > r.start_s).map((r) => ({
|
|
1898
|
+
start_s: roundVideoSeconds(r.start_s),
|
|
1899
|
+
end_s: roundVideoSeconds(r.end_s)
|
|
1900
|
+
})).filter((r) => r.end_s - r.start_s >= 0.05).sort((a, b) => a.start_s - b.start_s || a.end_s - b.end_s);
|
|
1901
|
+
if (valid.length === 0) return [];
|
|
1902
|
+
const merged = [{ ...valid[0] }];
|
|
1903
|
+
for (let i = 1; i < valid.length; i += 1) {
|
|
1904
|
+
const cur = valid[i];
|
|
1905
|
+
const last = merged[merged.length - 1];
|
|
1906
|
+
if (cur.start_s <= last.end_s + epsilonSeconds) {
|
|
1907
|
+
last.end_s = roundVideoSeconds(Math.max(last.end_s, cur.end_s));
|
|
1908
|
+
} else {
|
|
1909
|
+
merged.push({ ...cur });
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1912
|
+
return merged;
|
|
1913
|
+
}
|
|
1914
|
+
function sumVideoRangesSeconds(ranges, durationSeconds = 0) {
|
|
1915
|
+
const merged = mergeVideoRanges(ranges);
|
|
1916
|
+
const raw = merged.reduce((acc, r) => acc + Math.max(0, r.end_s - r.start_s), 0);
|
|
1917
|
+
const clamped = durationSeconds > 0 ? Math.min(raw, durationSeconds) : raw;
|
|
1918
|
+
return roundVideoSeconds(clamped);
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1792
1921
|
// ../tracking-core/src/ingest-typed.ts
|
|
1793
1922
|
var clientSettings = /* @__PURE__ */ new WeakMap();
|
|
1794
1923
|
function typedClientSettings(client) {
|
|
@@ -1913,10 +2042,10 @@ var KNOWN_ROLES = new Set(LEAD_FORM_ROLES);
|
|
|
1913
2042
|
var ROLE_ORDER = new Map(LEAD_FORM_ROLES.map((role, index) => [role, index]));
|
|
1914
2043
|
var ADD_ON = /^add_on:[a-z0-9_-]{1,48}$/;
|
|
1915
2044
|
var CONTRACT_NAME = /^[a-z][a-z0-9_]{0,47}(:[a-z0-9_-]{1,48})?$/;
|
|
1916
|
-
function judgeLeadForm(kind, formId, fields, contracts, settings) {
|
|
2045
|
+
function judgeLeadForm(kind, formId, fields, contracts, settings, { partial = false } = {}) {
|
|
1917
2046
|
const generated = contracts?.contracts[kind];
|
|
1918
2047
|
const live = liveContract(settings.trackingConfig, kind);
|
|
1919
|
-
const violations = check(live === void 0 ? generated : fromLive(live), fields);
|
|
2048
|
+
const violations = check(live === void 0 ? generated : fromLive(live), fields, partial);
|
|
1920
2049
|
const liveHash = live === void 0 ? void 0 : live?.contract_hash ?? null;
|
|
1921
2050
|
if (contracts && (liveHash !== void 0 && (generated?.hash ?? null) !== liveHash || contracts.registryVersion !== LEAD_FORM_REGISTRY_VERSION)) {
|
|
1922
2051
|
violations.push({ role: null, rule: "contract_behind" });
|
|
@@ -1948,7 +2077,7 @@ function fromLive(live) {
|
|
|
1948
2077
|
options: Object.fromEntries(live.options.map((o) => [o.role, o.options.map((x) => x.key)]))
|
|
1949
2078
|
};
|
|
1950
2079
|
}
|
|
1951
|
-
function check(contract, fields) {
|
|
2080
|
+
function check(contract, fields, partial) {
|
|
1952
2081
|
const answered = new Map(fields);
|
|
1953
2082
|
const violations = [];
|
|
1954
2083
|
for (const [role, value] of fields) {
|
|
@@ -1966,6 +2095,7 @@ function check(contract, fields) {
|
|
|
1966
2095
|
violations.push({ role, rule: "unknown_option" });
|
|
1967
2096
|
}
|
|
1968
2097
|
}
|
|
2098
|
+
if (partial) return violations;
|
|
1969
2099
|
for (const { role, requiredWhen } of contract?.requires ?? []) {
|
|
1970
2100
|
const owing = requiredWhen === null || optionKeys(answered.get(requiredWhen.role)).some((key) => requiredWhen.anyOf.includes(key));
|
|
1971
2101
|
if (owing && !answered.has(role)) violations.push({ role, rule: "missing_required" });
|
|
@@ -2570,7 +2700,7 @@ var zSaleItemEntitySchema = z4.object({
|
|
|
2570
2700
|
external_item_id: z4.nullable(z4.string()),
|
|
2571
2701
|
id: z4.uuid(),
|
|
2572
2702
|
name: z4.nullable(z4.string()),
|
|
2573
|
-
quantity: z4.string()
|
|
2703
|
+
quantity: z4.string(),
|
|
2574
2704
|
unit_cost_cents: z4.nullable(z4.int()),
|
|
2575
2705
|
unit_price_cents: z4.int()
|
|
2576
2706
|
});
|
|
@@ -2634,12 +2764,15 @@ var zSmsWithheldReason = z4.enum([
|
|
|
2634
2764
|
"test_or_bot_session",
|
|
2635
2765
|
"invalid_phone",
|
|
2636
2766
|
"recently_texted",
|
|
2767
|
+
"owner_not_alerted",
|
|
2768
|
+
"no_new_details",
|
|
2637
2769
|
"do_not_contact",
|
|
2638
2770
|
"do_not_text_tag",
|
|
2639
2771
|
"missing_value",
|
|
2640
2772
|
"us_texting_pending",
|
|
2641
2773
|
"us_texting_rejected",
|
|
2642
|
-
"texts_paused"
|
|
2774
|
+
"texts_paused",
|
|
2775
|
+
"outside_nanp"
|
|
2643
2776
|
]);
|
|
2644
2777
|
var zSaleSmsStatusSchema = z4.object({
|
|
2645
2778
|
can_send_now: z4._default(z4.boolean(), false),
|
|
@@ -2689,6 +2822,17 @@ var zApiErrorSchema = z4.object({
|
|
|
2689
2822
|
errors: z4._default(z4.nullish(z4.array(zValidationErrorItem)), null),
|
|
2690
2823
|
request_id: z4._default(z4.nullish(z4.string()), null)
|
|
2691
2824
|
});
|
|
2825
|
+
var zWritebackCorrectionAction = z4.enum(["retry", "restate_now"]);
|
|
2826
|
+
var zWritebackCorrectionState = z4.enum([
|
|
2827
|
+
"queued",
|
|
2828
|
+
"sent",
|
|
2829
|
+
"restated",
|
|
2830
|
+
"failed",
|
|
2831
|
+
"limit_reached",
|
|
2832
|
+
"voided",
|
|
2833
|
+
"date_changed",
|
|
2834
|
+
"dry_run_ok"
|
|
2835
|
+
]);
|
|
2692
2836
|
var zWritebackEmailSource = z4.enum(["NONE", "SALE", "CUSTOMER", "HARVESTED"]);
|
|
2693
2837
|
var zWritebackEnrichmentStatus = z4.enum(["NONE", "MATCHED", "AMBIGUOUS"]);
|
|
2694
2838
|
var zWritebackSaleUploadCounts = z4.object({
|
|
@@ -2699,9 +2843,28 @@ var zWritebackSaleUploadCounts = z4.object({
|
|
|
2699
2843
|
total: z4._default(z4.int(), 0),
|
|
2700
2844
|
uploaded: z4._default(z4.int(), 0)
|
|
2701
2845
|
});
|
|
2846
|
+
var zWritebackValueDrift = z4.enum(["none", "open", "failed"]);
|
|
2847
|
+
var zWritebackCorrectionSchema = z4.object({
|
|
2848
|
+
action: z4.nullable(zWritebackCorrectionAction),
|
|
2849
|
+
can_restate: z4._default(z4.boolean(), false),
|
|
2850
|
+
drift: zWritebackValueDrift,
|
|
2851
|
+
error_message: z4.nullable(z4.string()),
|
|
2852
|
+
google_currency: z4.string(),
|
|
2853
|
+
google_value_cents: z4.int(),
|
|
2854
|
+
restated_at: z4.nullable(z4.iso.datetime({ offset: true })),
|
|
2855
|
+
restated_from_cents: z4.nullable(z4.int()),
|
|
2856
|
+
restatement_limit: z4.int(),
|
|
2857
|
+
restatements_used: z4.int(),
|
|
2858
|
+
sale_currency: z4.string(),
|
|
2859
|
+
sale_value_cents: z4.int(),
|
|
2860
|
+
sends_at: z4.nullable(z4.iso.datetime({ offset: true })),
|
|
2861
|
+
state: zWritebackCorrectionState,
|
|
2862
|
+
upload_id: z4.uuid()
|
|
2863
|
+
});
|
|
2702
2864
|
var zSaleWritebackStatusSchema = z4.object({
|
|
2703
2865
|
blocked_reason: z4.nullable(z4.string()),
|
|
2704
2866
|
can_dispatch: z4._default(z4.boolean(), false),
|
|
2867
|
+
correction: z4.nullable(zWritebackCorrectionSchema),
|
|
2705
2868
|
email_source: z4.nullable(zWritebackEmailSource),
|
|
2706
2869
|
enrichment_status: z4.nullable(zWritebackEnrichmentStatus),
|
|
2707
2870
|
gclid_attached: z4._default(z4.boolean(), false),
|
|
@@ -2719,7 +2882,6 @@ var zSaleWritebackStatusSchema = z4.object({
|
|
|
2719
2882
|
"out_of_window",
|
|
2720
2883
|
"blocked"
|
|
2721
2884
|
]),
|
|
2722
|
-
stale: z4._default(z4.boolean(), false),
|
|
2723
2885
|
uncovered_service_ids: z4.array(z4.uuid()),
|
|
2724
2886
|
uploads: zWritebackSaleUploadCounts
|
|
2725
2887
|
});
|
|
@@ -2856,6 +3018,14 @@ import {
|
|
|
2856
3018
|
useBookingSubmit
|
|
2857
3019
|
} from "@aranova/tracking-react/client";
|
|
2858
3020
|
import { createLeadFormSubmit } from "@aranova/tracking-react/client";
|
|
3021
|
+
import {
|
|
3022
|
+
DEFAULT_VIDEO_CHECKPOINTS,
|
|
3023
|
+
streamManifestUrl,
|
|
3024
|
+
streamPosterUrl,
|
|
3025
|
+
TrackedVideo,
|
|
3026
|
+
TrackedVideoStage,
|
|
3027
|
+
useTrackedVideoConfig
|
|
3028
|
+
} from "@aranova/tracking-react/client";
|
|
2859
3029
|
export {
|
|
2860
3030
|
AdPlatformTracking,
|
|
2861
3031
|
AranovaApiError,
|
|
@@ -2863,6 +3033,7 @@ export {
|
|
|
2863
3033
|
ConsentBanner,
|
|
2864
3034
|
DEFAULT_DECLINE_TTL_DAYS,
|
|
2865
3035
|
DEFAULT_PHONE_COUNTRY,
|
|
3036
|
+
DEFAULT_VIDEO_CHECKPOINTS,
|
|
2866
3037
|
EVENT_SEMANTICS,
|
|
2867
3038
|
GoogleAdsTracking,
|
|
2868
3039
|
LEAD_FORM_KINDS,
|
|
@@ -2876,6 +3047,8 @@ export {
|
|
|
2876
3047
|
SUPPORTED_CURRENCIES,
|
|
2877
3048
|
TRACKING_PARAM_KEYS,
|
|
2878
3049
|
TRACKING_RANGES,
|
|
3050
|
+
TrackedVideo,
|
|
3051
|
+
TrackedVideoStage,
|
|
2879
3052
|
bookableSlots,
|
|
2880
3053
|
buildBookingHandoffUrl,
|
|
2881
3054
|
captureTrackingParamsFromLocation,
|
|
@@ -2900,6 +3073,7 @@ export {
|
|
|
2900
3073
|
getTrackingConfigRuntime,
|
|
2901
3074
|
groupBookingOptions,
|
|
2902
3075
|
leadFormPrimitiveSchemas,
|
|
3076
|
+
mergeVideoRanges,
|
|
2903
3077
|
newBookingAttemptKey,
|
|
2904
3078
|
onConsentChange,
|
|
2905
3079
|
optIn,
|
|
@@ -2909,6 +3083,7 @@ export {
|
|
|
2909
3083
|
resetConsent,
|
|
2910
3084
|
resolveConversionConfig,
|
|
2911
3085
|
resolveTrackingConfigUrl,
|
|
3086
|
+
roundVideoSeconds,
|
|
2912
3087
|
saleCreateSchema,
|
|
2913
3088
|
saleItemSchema,
|
|
2914
3089
|
saleServiceSchema,
|
|
@@ -2918,6 +3093,9 @@ export {
|
|
|
2918
3093
|
shopToday,
|
|
2919
3094
|
slotFields,
|
|
2920
3095
|
stashUserData,
|
|
3096
|
+
streamManifestUrl,
|
|
3097
|
+
streamPosterUrl,
|
|
3098
|
+
sumVideoRangesSeconds,
|
|
2921
3099
|
timeWindow,
|
|
2922
3100
|
toE164,
|
|
2923
3101
|
toMinor,
|
|
@@ -2931,6 +3109,7 @@ export {
|
|
|
2931
3109
|
useGclid,
|
|
2932
3110
|
usePhoneConfig,
|
|
2933
3111
|
usePhoneField,
|
|
3112
|
+
useTrackedVideoConfig,
|
|
2934
3113
|
useTrackingParams
|
|
2935
3114
|
};
|
|
2936
3115
|
//# sourceMappingURL=index.mjs.map
|