@aranova/tracking-react 0.21.0 → 0.22.2
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/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +163 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +163 -24
- package/dist/index.mjs.map +1 -1
- package/dist/{phone-utils-B2vHJkNz.d.mts → phone-utils-BhWfNuPS.d.mts} +8 -0
- package/dist/{phone-utils-B2vHJkNz.d.ts → phone-utils-BhWfNuPS.d.ts} +8 -0
- package/dist/phone.d.mts +1 -1
- package/dist/phone.d.ts +1 -1
- package/dist/phone.js +3 -0
- package/dist/phone.js.map +1 -1
- package/dist/phone.mjs +3 -0
- package/dist/phone.mjs.map +1 -1
- package/dist/{sales-CBQJ2SBT.d.mts → sales-BfmXpXem.d.mts} +13 -4
- package/dist/{sales-CBQJ2SBT.d.ts → sales-BfmXpXem.d.ts} +13 -4
- package/dist/sales.d.mts +1 -1
- package/dist/sales.d.ts +1 -1
- package/dist/sales.js +10 -0
- package/dist/sales.js.map +1 -1
- package/dist/sales.mjs +10 -0
- package/dist/sales.mjs.map +1 -1
- package/package.json +1 -1
package/dist/sales.mjs
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
// ../tracking-core/src/capabilities.ts
|
|
2
|
+
var registered = /* @__PURE__ */ new Set();
|
|
3
|
+
function registerCapability(capability) {
|
|
4
|
+
registered.add(capability);
|
|
5
|
+
}
|
|
6
|
+
|
|
1
7
|
// ../tracking-core/src/phone.ts
|
|
2
8
|
import { AsYouType, parsePhoneNumberFromString } from "libphonenumber-js";
|
|
3
9
|
var DEFAULT_PHONE_COUNTRY = "CA";
|
|
@@ -316,6 +322,7 @@ function fireRecordedConversions(firing, input, recorded, sale, currency) {
|
|
|
316
322
|
}
|
|
317
323
|
}
|
|
318
324
|
function createSalesClient(config) {
|
|
325
|
+
if (config.firing) registerCapability("conversion_goals_manual");
|
|
319
326
|
async function record(input) {
|
|
320
327
|
const currency = input.currency ?? config.defaultCurrency;
|
|
321
328
|
if (!currency) {
|
|
@@ -559,6 +566,9 @@ var saleUpdateSchema = z2.object({
|
|
|
559
566
|
items: z2.array(saleItemSchema).optional(),
|
|
560
567
|
metadata: metadataSchema.nullable().optional(),
|
|
561
568
|
customer_name: customerNameSchema.nullable().optional(),
|
|
569
|
+
// Re-attest when changing a filler-looking name; the server clears the
|
|
570
|
+
// prior attestation whenever `customer_name` changes.
|
|
571
|
+
customer_name_placeholder_confirmed: z2.boolean().optional(),
|
|
562
572
|
customer_phone: customerPhoneSchema.nullable().optional(),
|
|
563
573
|
customer_email: customerEmailSchema.nullable().optional(),
|
|
564
574
|
// NOT NULL server-side: omit to leave unchanged (explicit null is rejected).
|