@aranova/tracking-react 0.16.2 → 0.17.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/dist/index.mjs CHANGED
@@ -2341,7 +2341,10 @@ var saleCreateSchema = z12.object({
2341
2341
  metadata: metadataSchema.nullable().optional(),
2342
2342
  customer_name: customerNameSchema.nullable().optional(),
2343
2343
  customer_phone: customerPhoneSchema.nullable().optional(),
2344
- customer_email: customerEmailSchema.nullable().optional()
2344
+ customer_email: customerEmailSchema.nullable().optional(),
2345
+ // CASL consent attestation: the customer agreed to receive SMS. Recorded
2346
+ // with a timestamp server-side; every SMS send path gates on it.
2347
+ sms_consent: z12.boolean().default(false)
2345
2348
  }).strict().superRefine((val, ctx) => refineServiceXor(val, ctx, { requireAmount: true }));
2346
2349
  var saleUpdateSchema = z12.object({
2347
2350
  description: z12.string().nullable().optional(),
@@ -2354,7 +2357,9 @@ var saleUpdateSchema = z12.object({
2354
2357
  metadata: metadataSchema.nullable().optional(),
2355
2358
  customer_name: customerNameSchema.nullable().optional(),
2356
2359
  customer_phone: customerPhoneSchema.nullable().optional(),
2357
- customer_email: customerEmailSchema.nullable().optional()
2360
+ customer_email: customerEmailSchema.nullable().optional(),
2361
+ // NOT NULL server-side: omit to leave unchanged (explicit null is rejected).
2362
+ sms_consent: z12.boolean().optional()
2358
2363
  }).strict().superRefine((val, ctx) => refineServiceXor(val, ctx, { requireAmount: false }));
2359
2364
  var TRACKING_RANGES = ["24h", "7d", "30d"];
2360
2365
  var NAMED_RANGES = [
@@ -2738,7 +2743,7 @@ function GoogleAdsTracking(props) {
2738
2743
  import { createContext as createContext2, useContext as useContext2, useEffect as useEffect5, useMemo as useMemo4 } from "react";
2739
2744
 
2740
2745
  // package.json
2741
- var version = "0.16.2";
2746
+ var version = "0.17.0";
2742
2747
 
2743
2748
  // ../tracking-core/src/phone-react.tsx
2744
2749
  import {