@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/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).