@aranova/tracking-next 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
@@ -2112,7 +2112,10 @@ var saleCreateSchema = z12.object({
2112
2112
  metadata: metadataSchema.nullable().optional(),
2113
2113
  customer_name: customerNameSchema.nullable().optional(),
2114
2114
  customer_phone: customerPhoneSchema.nullable().optional(),
2115
- customer_email: customerEmailSchema.nullable().optional()
2115
+ customer_email: customerEmailSchema.nullable().optional(),
2116
+ // CASL consent attestation: the customer agreed to receive SMS. Recorded
2117
+ // with a timestamp server-side; every SMS send path gates on it.
2118
+ sms_consent: z12.boolean().default(false)
2116
2119
  }).strict().superRefine((val, ctx) => refineServiceXor(val, ctx, { requireAmount: true }));
2117
2120
  var saleUpdateSchema = z12.object({
2118
2121
  description: z12.string().nullable().optional(),
@@ -2125,7 +2128,9 @@ var saleUpdateSchema = z12.object({
2125
2128
  metadata: metadataSchema.nullable().optional(),
2126
2129
  customer_name: customerNameSchema.nullable().optional(),
2127
2130
  customer_phone: customerPhoneSchema.nullable().optional(),
2128
- customer_email: customerEmailSchema.nullable().optional()
2131
+ customer_email: customerEmailSchema.nullable().optional(),
2132
+ // NOT NULL server-side: omit to leave unchanged (explicit null is rejected).
2133
+ sms_consent: z12.boolean().optional()
2129
2134
  }).strict().superRefine((val, ctx) => refineServiceXor(val, ctx, { requireAmount: false }));
2130
2135
  var TRACKING_RANGES = ["24h", "7d", "30d"];
2131
2136
  var NAMED_RANGES = [
@@ -2523,7 +2528,7 @@ function GoogleAdsTracking(props) {
2523
2528
  import { usePathname, useSearchParams } from "next/navigation";
2524
2529
 
2525
2530
  // package.json
2526
- var version = "0.16.2";
2531
+ var version = "0.17.0";
2527
2532
 
2528
2533
  // src/factory.tsx
2529
2534
  import {