@rebuy/rebuy 3.55.0 → 3.56.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.
Files changed (31) hide show
  1. package/dist/index.cjs +317 -273
  2. package/dist/index.mjs +317 -273
  3. package/dist/schema/index.d.ts +1 -0
  4. package/dist/schema/postPurchaseAdmission.d.ts +5 -5
  5. package/dist/schema/postPurchaseLedger.d.ts +56 -0
  6. package/dist/schema/postPurchaseProduct.d.ts +2 -0
  7. package/dist/schema/postPurchaseProductCollectionView.d.ts +3 -0
  8. package/dist/schema/postPurchaseProductView.d.ts +5 -1
  9. package/dist/schema/postPurchaseSession.d.ts +14 -0
  10. package/dist/schema/postPurchaseSubscription.d.ts +1 -0
  11. package/dist/schema/postPurchaseSubscriptionProduct.d.ts +2 -0
  12. package/dist/server/index.cjs +69 -23
  13. package/dist/server/index.mjs +69 -23
  14. package/dist/server/normalizePostPurchaseProduct.d.ts +16 -1
  15. package/dist/server/postPurchaseCardSections.d.ts +2 -2
  16. package/dist/server/postPurchaseSts.d.ts +6 -0
  17. package/dist/server/prepareNormalizedSubscription.d.ts +2 -1
  18. package/dist/server/preparePostPurchaseAdmissionView.d.ts +3 -0
  19. package/dist/server/preparePostPurchaseCollectionGroup.d.ts +3 -0
  20. package/dist/server/preparePostPurchaseCollectionView.d.ts +3 -0
  21. package/dist/server/preparePostPurchaseGroupAdmissionView.d.ts +3 -0
  22. package/dist/server/preparePostPurchaseGroupDefault.d.ts +3 -0
  23. package/dist/server/preparePostPurchaseGroupView.d.ts +3 -0
  24. package/dist/server/preparePostPurchaseMemberView.d.ts +12 -0
  25. package/dist/server/preparePostPurchaseQuantityAdmissionView.d.ts +3 -0
  26. package/dist/server/preparePostPurchaseQuantityView.d.ts +3 -0
  27. package/dist/server/preparePostPurchaseStsMember.d.ts +3 -0
  28. package/dist/server/preparePostPurchaseSubscription.d.ts +1 -0
  29. package/dist/transforms/index.cjs +17 -11
  30. package/dist/transforms/index.mjs +17 -11
  31. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -2324,7 +2324,9 @@ var PostPurchaseSubscriptionTerms = z21.object({
2324
2324
  intervalLabel: z21.string().min(1),
2325
2325
  name: z21.string().min(1),
2326
2326
  recurringShippingPrice: z21.number().nonnegative(),
2327
- shippingOption: z21.object({ presentmentTitle: z21.string(), title: z21.string() })
2327
+ shippingOption: z21.object({ presentmentTitle: z21.string(), title: z21.string() }),
2328
+ /** A switch to subscription (STS): the one subscription that charges no initial shipping (L122). */
2329
+ sts: z21.literal(true).optional()
2328
2330
  });
2329
2331
 
2330
2332
  // src/schema/postPurchaseProduct.ts
@@ -4068,6 +4070,7 @@ var CABRootSection = CABLayoutSection.extend({
4068
4070
  });
4069
4071
 
4070
4072
  // src/schema/postPurchaseProductView.ts
4073
+ var StsMarker = z69.literal(true).optional();
4071
4074
  var PostPurchaseProductView = z69.union([
4072
4075
  z69.object({
4073
4076
  changeset: PostPurchaseProductChangeset.optional(),
@@ -4083,6 +4086,7 @@ var PostPurchaseProductView = z69.union([
4083
4086
  }),
4084
4087
  purchaseOptions: PostPurchaseOptions.optional(),
4085
4088
  sections: CABRootSection,
4089
+ sts: StsMarker,
4086
4090
  variantCatalog: PostPurchaseVariantCatalog.optional()
4087
4091
  }),
4088
4092
  z69.object({
@@ -4095,6 +4099,7 @@ var PostPurchaseProductView = z69.union([
4095
4099
  purchaseOptions: PostPurchaseOptions.optional(),
4096
4100
  /** A choice-level unavailable product keeps its card (values resolve blank); configuration failures send null. */
4097
4101
  sections: CABRootSection.nullable(),
4102
+ sts: StsMarker,
4098
4103
  variantCatalog: PostPurchaseVariantCatalog.optional()
4099
4104
  })
4100
4105
  ]);
@@ -4242,102 +4247,129 @@ var HealthResultResponseSchema = z74.object({
4242
4247
  successful: z74.literal(true)
4243
4248
  });
4244
4249
 
4245
- // src/schema/postPurchaseLifecycle.ts
4250
+ // src/schema/postPurchaseLedger.ts
4246
4251
  import { z as z75 } from "zod";
4247
- var Presentation = z75.strictObject({
4252
+ var CLIENT_LEDGER_MAX_EVENTS = 16;
4253
+ var CLIENT_LEDGER_TYPES = [
4254
+ "decision.verdict",
4255
+ "error.flow",
4256
+ "error.schema",
4257
+ "offer.decline",
4258
+ "render.gate",
4259
+ "shouldRender.selectedFlow"
4260
+ ];
4261
+ var ClientLedgerPayloadValueSchema = z75.union([z75.string().max(256), z75.number().finite(), z75.boolean()]);
4262
+ var ClientLedgerEventSchema = z75.strictObject({
4263
+ /** The client's diagnostic id for one Shopify context; `(instance, seq)` names a row. */
4264
+ instance: z75.string().regex(/^[A-Za-z0-9_-]{1,64}$/),
4265
+ payload: z75.record(z75.string().regex(/^[A-Za-z][A-Za-z0-9_.()]{0,63}$/), ClientLedgerPayloadValueSchema).refine((payload) => Object.keys(payload).length <= 24, "At most 24 payload members"),
4266
+ phase: z75.enum(["render", "shouldRender"]),
4267
+ /** `-1` is the dev-store runtime probe's row (cab-post-purchase `dev-store/runtimeProbe.ts`). */
4268
+ seq: z75.number().int().min(-1).max(1e5),
4269
+ /** The client's clock when it observed the row, as the legacy client rows carry it. */
4270
+ ts: z75.iso.datetime(),
4271
+ type: z75.enum(CLIENT_LEDGER_TYPES)
4272
+ });
4273
+ var ClientLedgerRequestSchema = z75.object({
4274
+ events: z75.array(ClientLedgerEventSchema).min(1).max(CLIENT_LEDGER_MAX_EVENTS)
4275
+ });
4276
+
4277
+ // src/schema/postPurchaseLifecycle.ts
4278
+ import { z as z76 } from "zod";
4279
+ var Presentation = z76.strictObject({
4248
4280
  member: PostPurchaseMemberIdentity,
4249
4281
  selectedProductId: PostPurchaseMemberIdentity.shape.productId.optional(),
4250
4282
  variant: PostPurchaseVariantSelector
4251
4283
  });
4252
4284
  var LifecycleObservationRequestSchema = DecideRequestSchema.extend({
4253
4285
  entryRevision: PostPurchaseProgressSchema.shape.entryRevision,
4254
- eventType: z75.enum(["OFFER_VIEWED", "OFFER_TIMER_EXPIRED"]),
4286
+ eventType: z76.enum(["OFFER_VIEWED", "OFFER_TIMER_EXPIRED"]),
4255
4287
  presentation: Presentation.nullable(),
4256
4288
  progressRevision: PostPurchaseProgressSchema.shape.revision,
4257
- requestId: z75.uuid()
4289
+ requestId: z76.uuid()
4258
4290
  }).strict().refine(
4259
4291
  ({ eventType, presentation }) => eventType !== "OFFER_VIEWED" || presentation !== null,
4260
4292
  "Viewed observations require a presented product"
4261
4293
  );
4262
- var LifecycleObservationResponseSchema = z75.object({
4263
- data: z75.strictObject({
4294
+ var LifecycleObservationResponseSchema = z76.object({
4295
+ data: z76.strictObject({
4264
4296
  requestId: LifecycleObservationRequestSchema.shape.requestId,
4265
- status: z75.union([AcceptedEventOutcomeSchema, z75.literal("unavailable")])
4297
+ status: z76.union([AcceptedEventOutcomeSchema, z76.literal("unavailable")])
4266
4298
  }),
4267
- successful: z75.literal(true)
4299
+ successful: z76.literal(true)
4268
4300
  });
4269
4301
 
4270
4302
  // src/schema/postPurchaseOffer.ts
4271
- import { z as z76 } from "zod";
4303
+ import { z as z77 } from "zod";
4272
4304
  var OfferPreparationRequestSchema = DecideRequestSchema.strict();
4273
- var OfferPreparationResponseSchema = z76.object({
4274
- data: z76.object({ attemptedSkips: PostPurchaseSkipTraceSchema.optional(), progress: PostPurchaseProgressSchema }),
4275
- successful: z76.literal(true)
4305
+ var OfferPreparationResponseSchema = z77.object({
4306
+ data: z77.object({ attemptedSkips: PostPurchaseSkipTraceSchema.optional(), progress: PostPurchaseProgressSchema }),
4307
+ successful: z77.literal(true)
4276
4308
  });
4277
4309
 
4278
4310
  // src/schema/postPurchaseOfferEligibility.ts
4279
- import { z as z77 } from "zod";
4311
+ import { z as z78 } from "zod";
4280
4312
  var selection2 = PreparedPostPurchaseProduct.shape.selection;
4281
- var PostPurchaseOfferSkipReason = z77.enum(["empty", "no-eligible-subscription"]);
4282
- var PostPurchaseOfferEligibilityContext = z77.object({
4313
+ var PostPurchaseOfferSkipReason = z78.enum(["empty", "no-eligible-subscription"]);
4314
+ var PostPurchaseOfferEligibilityContext = z78.object({
4283
4315
  excludedProductIds: PostPurchaseExcludedProductIds,
4284
- originalLineItems: z77.array(selection2.pick({ productId: true, sellingPlanId: true, variantId: true }))
4316
+ originalLineItems: z78.array(selection2.pick({ productId: true, sellingPlanId: true, variantId: true }))
4285
4317
  });
4286
- var PostPurchaseStsOptions = z77.object({ sts: z77.boolean().optional() }).strict();
4287
- var PostPurchaseStsContext = z77.object({
4288
- originalLineItems: z77.array(
4318
+ var PostPurchaseStsOptions = z78.object({ sts: z78.boolean().optional() }).strict();
4319
+ var PostPurchaseStsContext = z78.object({
4320
+ originalLineItems: z78.array(
4289
4321
  selection2.pick({ productId: true, quantity: true, sellingPlanId: true, variantId: true })
4290
4322
  )
4291
4323
  });
4292
- var PostPurchaseOfferEligibility = z77.discriminatedUnion("status", [
4293
- z77.object({
4294
- members: z77.array(
4295
- z77.object({ productId: selection2.shape.productId, productIndex: z77.number().int().nonnegative() })
4324
+ var PostPurchaseOfferEligibility = z78.discriminatedUnion("status", [
4325
+ z78.object({
4326
+ members: z78.array(
4327
+ z78.object({ productId: selection2.shape.productId, productIndex: z78.number().int().nonnegative() })
4296
4328
  ),
4297
4329
  /** Present only with STS on: each member switches one original one-time line to subscription. */
4298
- mode: z77.literal("sts").optional(),
4299
- status: z77.literal("retain")
4330
+ mode: z78.literal("sts").optional(),
4331
+ status: z78.literal("retain")
4300
4332
  }),
4301
- z77.object({ reason: PostPurchaseOfferSkipReason, status: z77.literal("skip") }),
4302
- z77.object({ reason: z77.literal("eligible-sts").optional(), status: z77.literal("unavailable") })
4333
+ z78.object({ reason: PostPurchaseOfferSkipReason, status: z78.literal("skip") }),
4334
+ z78.object({ reason: z78.literal("eligible-sts").optional(), status: z78.literal("unavailable") })
4303
4335
  ]);
4304
4336
 
4305
4337
  // src/schema/postPurchaseOfferPresentation.ts
4306
- import { z as z78 } from "zod";
4338
+ import { z as z79 } from "zod";
4307
4339
  var language2 = PostPurchaseSettings.shape.language.shape.global.unwrap().unwrap();
4308
- var PostPurchaseOfferPresentation = z78.strictObject({
4340
+ var PostPurchaseOfferPresentation = z79.strictObject({
4309
4341
  labels: language2.pick({ declineAll: true, declineThisOffer: true }),
4310
4342
  layout: PostPurchaseSettings.shape.offersLayout,
4311
4343
  sections: CABRootSection.nullable(),
4312
4344
  showDeclineAll: PostPurchaseSettings.shape.productOptions.shape.showDeclineAll
4313
4345
  });
4314
4346
  var OfferPresentationRequestSchema = DecideRequestSchema.strict();
4315
- var OfferPresentationResponseSchema = z78.object({
4316
- data: z78.strictObject({
4347
+ var OfferPresentationResponseSchema = z79.object({
4348
+ data: z79.strictObject({
4317
4349
  presentation: PostPurchaseOfferPresentation.nullable(),
4318
4350
  progress: PostPurchaseProgressSchema.nullable(),
4319
4351
  serverNow: PostPurchaseTimestampSchema
4320
4352
  }),
4321
- successful: z78.literal(true)
4353
+ successful: z79.literal(true)
4322
4354
  });
4323
4355
 
4324
4356
  // src/schema/postPurchaseOrderDecision.ts
4325
- import { z as z79 } from "zod";
4326
- var OrderDecisionSchema = z79.discriminatedUnion("owner", [
4327
- z79.object({ owner: z79.literal("session"), sessionId: PostPurchaseSessionIdSchema }),
4328
- z79.object({ owner: z79.literal("release"), sessionId: z79.null() })
4357
+ import { z as z80 } from "zod";
4358
+ var OrderDecisionSchema = z80.discriminatedUnion("owner", [
4359
+ z80.object({ owner: z80.literal("session"), sessionId: PostPurchaseSessionIdSchema }),
4360
+ z80.object({ owner: z80.literal("release"), sessionId: z80.null() })
4329
4361
  ]);
4330
4362
 
4331
4363
  // src/schema/postPurchasePolicy.ts
4332
- import { z as z80 } from "zod";
4333
- var HoldSettingSchema = z80.discriminatedUnion("enabled", [
4334
- z80.object({ durationMinutes: z80.number().int().min(1).max(60), enabled: z80.literal(true) }),
4335
- z80.object({ durationMinutes: z80.null(), enabled: z80.literal(false) })
4364
+ import { z as z81 } from "zod";
4365
+ var HoldSettingSchema = z81.discriminatedUnion("enabled", [
4366
+ z81.object({ durationMinutes: z81.number().int().min(1).max(60), enabled: z81.literal(true) }),
4367
+ z81.object({ durationMinutes: z81.null(), enabled: z81.literal(false) })
4336
4368
  ]);
4337
- var TimingSettingsSchema = z80.object({ flowHold: HoldSettingSchema, shopHold: HoldSettingSchema });
4369
+ var TimingSettingsSchema = z81.object({ flowHold: HoldSettingSchema, shopHold: HoldSettingSchema });
4338
4370
  var SessionPolicySchema = TimingSettingsSchema.extend({
4339
- durationMinutes: z80.number().int().min(1).max(60).nullable(),
4340
- source: z80.enum(["shop", "flow", "native"])
4371
+ durationMinutes: z81.number().int().min(1).max(60).nullable(),
4372
+ source: z81.enum(["shop", "flow", "native"])
4341
4373
  }).refine(
4342
4374
  (policy) => {
4343
4375
  const expectedSource = policy.shopHold.enabled ? "shop" : policy.flowHold.enabled ? "flow" : "native";
@@ -4351,8 +4383,8 @@ var SessionPolicySchema = TimingSettingsSchema.extend({
4351
4383
  );
4352
4384
 
4353
4385
  // src/schema/postPurchasePreparationOptions.ts
4354
- import { z as z81 } from "zod";
4355
- var PostPurchasePreparationOptions = z81.object({
4386
+ import { z as z82 } from "zod";
4387
+ var PostPurchasePreparationOptions = z82.object({
4356
4388
  choice: PostPurchaseChoice.optional(),
4357
4389
  member: PostPurchaseMemberSelector.strict().optional(),
4358
4390
  quantity: PreparedPostPurchaseProduct.shape.selection.shape.quantity.optional(),
@@ -4364,8 +4396,8 @@ var PostPurchasePreparationOptions = z81.object({
4364
4396
  );
4365
4397
 
4366
4398
  // src/schema/postPurchaseProductSettings.ts
4367
- import { z as z82 } from "zod";
4368
- var amount = z82.union([z82.number().nonnegative(), PostPurchaseAmount.transform(Number)]);
4399
+ import { z as z83 } from "zod";
4400
+ var amount = z83.union([z83.number().nonnegative(), PostPurchaseAmount.transform(Number)]);
4369
4401
  var PostPurchaseProductSettings = PostPurchaseSettings.pick({
4370
4402
  discountedFrom: true,
4371
4403
  language: true,
@@ -4377,30 +4409,30 @@ var PostPurchaseProductSettings = PostPurchaseSettings.pick({
4377
4409
  subscriptionIsDefault: true,
4378
4410
  upgradeToSubscription: true
4379
4411
  }).extend({
4380
- advance: z82.unknown().default({}),
4381
- blocks: z82.array(z82.unknown()).optional(),
4412
+ advance: z83.unknown().default({}),
4413
+ blocks: z83.array(z83.unknown()).optional(),
4382
4414
  discount: PostPurchaseSettings.shape.discount.extend({ amount: amount.default(30) }),
4383
- integrations: z82.unknown().default({}),
4415
+ integrations: z83.unknown().default({}),
4384
4416
  shipping: PostPurchaseSettings.shape.shipping.extend({ amount: amount.default(10) }),
4385
- styles: z82.unknown().default({}),
4417
+ styles: z83.unknown().default({}),
4386
4418
  subImages: PostPurchaseSettings.shape.subImages.catch(null),
4387
- subscription: z82.unknown().default(PostPurchaseSettings.shape.subscription.parse(void 0))
4419
+ subscription: z83.unknown().default(PostPurchaseSettings.shape.subscription.parse(void 0))
4388
4420
  });
4389
4421
 
4390
4422
  // src/schema/postPurchaseRecovery.ts
4391
- import { z as z83 } from "zod";
4392
- var RecoveredFollowupsSchema = z83.strictObject({
4393
- acceptedEvent: z83.union([AcceptedEventAttemptProgressSchema, AcceptedEventResultProgressSchema]).nullable(),
4394
- acceptedMetafield: z83.union([AcceptedMetafieldOutcomeSchema, z83.literal("attempted")]).nullable()
4423
+ import { z as z84 } from "zod";
4424
+ var RecoveredFollowupsSchema = z84.strictObject({
4425
+ acceptedEvent: z84.union([AcceptedEventAttemptProgressSchema, AcceptedEventResultProgressSchema]).nullable(),
4426
+ acceptedMetafield: z84.union([AcceptedMetafieldOutcomeSchema, z84.literal("attempted")]).nullable()
4395
4427
  });
4396
4428
  var PurchaseRecoveryRequestSchema = DecideRequestSchema.strict();
4397
- var PurchaseRecoveryResponseSchema = z83.object({
4398
- data: z83.object({
4429
+ var PurchaseRecoveryResponseSchema = z84.object({
4430
+ data: z84.object({
4399
4431
  /**
4400
4432
  * Strict, so a client pinned before a new optional field rejects a reply that carries it rather than
4401
4433
  * stripping it. Release the client before rebuy-api starts emitting a field added here.
4402
4434
  */
4403
- operation: z83.object({
4435
+ operation: z84.object({
4404
4436
  /** Absent from a rebuy-api that predates it. */
4405
4437
  followups: RecoveredFollowupsSchema.optional(),
4406
4438
  observation: RecordedPurchaseObservationSchema.nullable(),
@@ -4423,41 +4455,41 @@ var PurchaseRecoveryResponseSchema = z83.object({
4423
4455
  ).nullable(),
4424
4456
  progress: PostPurchaseProgressSchema.nullable().optional()
4425
4457
  }),
4426
- successful: z83.literal(true)
4458
+ successful: z84.literal(true)
4427
4459
  });
4428
4460
 
4429
4461
  // src/schema/postPurchaseReleaseClaim.ts
4430
- import { z as z84 } from "zod";
4462
+ import { z as z85 } from "zod";
4431
4463
  var ReleaseClaimRequestSchema = ReleaseAuthorityRequestSchema;
4432
- var ReleaseClaimResponseSchema = z84.object({
4433
- data: z84.discriminatedUnion("status", [
4434
- z84.object({ status: z84.literal("release-permitted") }),
4464
+ var ReleaseClaimResponseSchema = z85.object({
4465
+ data: z85.discriminatedUnion("status", [
4466
+ z85.object({ status: z85.literal("release-permitted") }),
4435
4467
  PendingReleaseAuthoritySchema,
4436
4468
  ReadyReleaseAuthoritySchema
4437
4469
  ]),
4438
- successful: z84.literal(true)
4470
+ successful: z85.literal(true)
4439
4471
  });
4440
4472
 
4441
4473
  // src/schema/postPurchaseSelection.ts
4442
- import { z as z85 } from "zod";
4474
+ import { z as z86 } from "zod";
4443
4475
  var SelectionClaimsSchema = DecideRequestSchema.extend({
4444
4476
  appId: PostPurchaseAppIdSchema,
4445
4477
  entry: DecisionEntrySchema,
4446
- iss: z85.literal("rebuy-api"),
4447
- purpose: z85.literal("post-purchase-selection")
4478
+ iss: z86.literal("rebuy-api"),
4479
+ purpose: z86.literal("post-purchase-selection")
4448
4480
  });
4449
4481
  var SessionStartRequestSchema = DecideRequestSchema.extend({
4450
- selectionToken: z85.string().min(1).max(8192).optional()
4482
+ selectionToken: z86.string().min(1).max(8192).optional()
4451
4483
  }).strict();
4452
4484
 
4453
4485
  // src/schema/postPurchaseSession.ts
4454
- import { z as z86 } from "zod";
4486
+ import { z as z87 } from "zod";
4455
4487
  var SessionIdentitySchema = DecideRequestSchema.extend({ appId: PostPurchaseAppIdSchema });
4456
- var SessionOrderTimingSchema = z86.object({
4488
+ var SessionOrderTimingSchema = z87.object({
4457
4489
  nativeDeadline: PostPurchaseTimestampSchema,
4458
4490
  orderCreatedAt: PostPurchaseTimestampSchema,
4459
4491
  orderId: PostPurchaseOrderIdSchema,
4460
- timingSource: z86.literal("shopify-order-created-at")
4492
+ timingSource: z87.literal("shopify-order-created-at")
4461
4493
  });
4462
4494
  var ReadySessionTimingSchema = SessionOrderTimingSchema.extend({
4463
4495
  deadline: PostPurchaseTimestampSchema,
@@ -4474,33 +4506,39 @@ var ReadySessionTimingSchema = SessionOrderTimingSchema.extend({
4474
4506
  message: "deadline must not exceed nativeDeadline",
4475
4507
  path: ["deadline"]
4476
4508
  });
4477
- var SessionStartResponseSchema = z86.object({
4478
- data: z86.object({
4479
- phase: z86.literal("render"),
4509
+ var SessionStartResponseSchema = z87.object({
4510
+ data: z87.object({
4511
+ phase: z87.literal("render"),
4480
4512
  serverNow: PostPurchaseTimestampSchema,
4481
4513
  session: ReadySessionTimingSchema,
4482
- workflowPhase: z86.literal("start")
4514
+ workflowPhase: z87.literal("start")
4483
4515
  }),
4484
- successful: z86.literal(true)
4516
+ successful: z87.literal(true)
4517
+ });
4518
+ var PostPurchaseOrderPendingSchema = z87.object({
4519
+ errors: z87.array(z87.object({ message: z87.string() })),
4520
+ message: z87.string(),
4521
+ reason: z87.literal("order-pending"),
4522
+ successful: z87.literal(false)
4485
4523
  });
4486
4524
 
4487
4525
  // src/schema/postPurchaseShadow.ts
4488
- import { z as z87 } from "zod";
4489
- var PostPurchaseShadowSelectionSchema = z87.discriminatedUnion("verdict", [
4490
- z87.object({ entry: DecisionEntrySchema, verdict: z87.literal("render") }),
4491
- z87.object({ verdict: z87.literal("skip") })
4526
+ import { z as z88 } from "zod";
4527
+ var PostPurchaseShadowSelectionSchema = z88.discriminatedUnion("verdict", [
4528
+ z88.object({ entry: DecisionEntrySchema, verdict: z88.literal("render") }),
4529
+ z88.object({ verdict: z88.literal("skip") })
4492
4530
  ]);
4493
- var PostPurchaseShadowReportFields = z87.object({
4494
- differences: z87.array(z87.enum(["verdict", "entry", "targeting", "incomplete-capture", "unsupported-configuration"])).refine((differences) => new Set(differences).size === differences.length, {
4531
+ var PostPurchaseShadowReportFields = z88.object({
4532
+ differences: z88.array(z88.enum(["verdict", "entry", "targeting", "incomplete-capture", "unsupported-configuration"])).refine((differences) => new Set(differences).size === differences.length, {
4495
4533
  message: "differences must not contain duplicate entries"
4496
4534
  }),
4497
4535
  legacySelection: PostPurchaseShadowSelectionSchema,
4498
- phase: z87.literal("shouldRender"),
4499
- sampleId: z87.string(),
4536
+ phase: z88.literal("shouldRender"),
4537
+ sampleId: z88.string(),
4500
4538
  serverSelection: PostPurchaseShadowSelectionSchema.optional(),
4501
- status: z87.enum(["match", "diverged", "incomplete"]),
4502
- targetingFlowIds: z87.array(z87.number().int().positive()),
4503
- workflowPhase: z87.literal("decide")
4539
+ status: z88.enum(["match", "diverged", "incomplete"]),
4540
+ targetingFlowIds: z88.array(z88.number().int().positive()),
4541
+ workflowPhase: z88.literal("decide")
4504
4542
  });
4505
4543
  var PostPurchaseShadowReportSchema = PostPurchaseShadowReportFields.refine(
4506
4544
  (report) => report.status !== "match" || report.differences.length === 0,
@@ -4514,13 +4552,14 @@ var PostPurchaseShadowReportSchema = PostPurchaseShadowReportFields.refine(
4514
4552
  });
4515
4553
 
4516
4554
  // src/schema/postPurchaseSubscriptionProduct.ts
4517
- import { z as z88 } from "zod";
4555
+ import { z as z89 } from "zod";
4518
4556
  var PreparedPostPurchaseSubscription = PreparedPostPurchaseProduct.extend({
4519
- selection: PreparedPostPurchaseProduct.shape.selection.extend({ sellingPlanId: z88.number().int().positive() }),
4557
+ selection: PreparedPostPurchaseProduct.shape.selection.extend({ sellingPlanId: z89.number().int().positive() }),
4520
4558
  terms: PreparedPostPurchaseProduct.shape.terms.extend({
4521
4559
  subscription: PostPurchaseSubscriptionTerms
4522
4560
  }).refine(
4523
- ({ discount, shipping, subscription }) => (discount.type !== "none" || discount.amount === 0) && shipping.amount === subscription.initialShippingPrice && shipping.amount === subscription.recurringShippingPrice && (shipping.type !== "free" || shipping.amount === 0)
4561
+ ({ discount, shipping, subscription }) => (discount.type !== "none" || discount.amount === 0) && // A switch to subscription charges no initial shipping (L122); any other subscription charges it.
4562
+ subscription.initialShippingPrice === (subscription.sts ? 0 : shipping.amount) && shipping.amount === subscription.recurringShippingPrice && (shipping.type !== "free" || shipping.amount === 0)
4524
4563
  )
4525
4564
  });
4526
4565
  var readPostPurchaseSubscription = (prepared) => {
@@ -4529,93 +4568,93 @@ var readPostPurchaseSubscription = (prepared) => {
4529
4568
  };
4530
4569
 
4531
4570
  // src/schema/postPurchaseVariantDefault.ts
4532
- import { z as z89 } from "zod";
4571
+ import { z as z90 } from "zod";
4533
4572
  var values = PostPurchaseVariantValues.partial().extend({
4534
4573
  option1: PostPurchaseVariantValues.shape.option1.nullish()
4535
4574
  });
4536
4575
  var variant = values.extend({
4537
4576
  id: PostPurchaseVariantId,
4538
- inventoryManagement: z89.string().nullable(),
4539
- inventoryPolicy: z89.string(),
4540
- inventoryQuantity: z89.number()
4577
+ inventoryManagement: z90.string().nullable(),
4578
+ inventoryPolicy: z90.string(),
4579
+ inventoryQuantity: z90.number()
4541
4580
  });
4542
- var options = z89.array(PostPurchaseVariantOption.pick({ name: true, values: true }));
4543
- var PostPurchaseVariantDefaultProduct = z89.object({
4581
+ var options = z90.array(PostPurchaseVariantOption.pick({ name: true, values: true }));
4582
+ var PostPurchaseVariantDefaultProduct = z90.object({
4544
4583
  id: PostPurchaseProductId,
4545
4584
  options,
4546
4585
  selectedVariant: variant.optional(),
4547
- variants: z89.array(variant)
4586
+ variants: z90.array(variant)
4548
4587
  });
4549
4588
  var PostPurchaseVariantDefaultSettings = PostPurchaseSettings.shape.productOptions.pick({
4550
4589
  hideOutOfStockVariants: true,
4551
4590
  matchVariant: true
4552
4591
  });
4553
- var PostPurchaseOrderAttributes = z89.record(z89.string(), z89.array(z89.string())).default({});
4554
- var PostPurchaseOriginalVariants = z89.array(
4555
- z89.object({ productId: PostPurchaseProductId, variantId: PostPurchaseVariantId })
4592
+ var PostPurchaseOrderAttributes = z90.record(z90.string(), z90.array(z90.string())).default({});
4593
+ var PostPurchaseOriginalVariants = z90.array(
4594
+ z90.object({ productId: PostPurchaseProductId, variantId: PostPurchaseVariantId })
4556
4595
  );
4557
- var PostPurchaseAttributeProducts = z89.array(
4558
- z89.object({ id: PostPurchaseProductId, options, variants: z89.array(values.extend({ id: PostPurchaseVariantId })) })
4596
+ var PostPurchaseAttributeProducts = z90.array(
4597
+ z90.object({ id: PostPurchaseProductId, options, variants: z90.array(values.extend({ id: PostPurchaseVariantId })) })
4559
4598
  );
4560
4599
 
4561
4600
  // src/schema/postPurchaseVariantDefaultContext.ts
4562
- import { z as z90 } from "zod";
4563
- var PostPurchaseVariantDefaultContext = z90.object({
4564
- enrichedLineItems: z90.unknown().optional(),
4601
+ import { z as z91 } from "zod";
4602
+ var PostPurchaseVariantDefaultContext = z91.object({
4603
+ enrichedLineItems: z91.unknown().optional(),
4565
4604
  originalVariants: PostPurchaseOriginalVariants
4566
4605
  });
4567
4606
 
4568
4607
  // src/schema/shopConfig.ts
4569
- import { z as z91 } from "zod";
4570
- var ShopConfig = z91.object({
4571
- activeExperiments: z91.array(
4572
- z91.object({
4573
- data: z91.array(
4574
- z91.object({
4575
- aliasName: z91.string(),
4576
- cssInput: z91.string().nullish(),
4577
- elementId: z91.coerce.number(),
4578
- id: z91.coerce.number(),
4579
- javascriptInput: z91.string().nullish(),
4580
- traffic: z91.coerce.number()
4608
+ import { z as z92 } from "zod";
4609
+ var ShopConfig = z92.object({
4610
+ activeExperiments: z92.array(
4611
+ z92.object({
4612
+ data: z92.array(
4613
+ z92.object({
4614
+ aliasName: z92.string(),
4615
+ cssInput: z92.string().nullish(),
4616
+ elementId: z92.coerce.number(),
4617
+ id: z92.coerce.number(),
4618
+ javascriptInput: z92.string().nullish(),
4619
+ traffic: z92.coerce.number()
4581
4620
  })
4582
4621
  ),
4583
- id: z91.coerce.number(),
4584
- name: z91.string(),
4585
- pageTarget: z91.string().nullable(),
4586
- pageTargetUrl: z91.string().nullable(),
4587
- placeholderId: z91.coerce.number().nullable(),
4588
- type: z91.string()
4622
+ id: z92.coerce.number(),
4623
+ name: z92.string(),
4624
+ pageTarget: z92.string().nullable(),
4625
+ pageTargetUrl: z92.string().nullable(),
4626
+ placeholderId: z92.coerce.number().nullable(),
4627
+ type: z92.string()
4589
4628
  })
4590
4629
  ),
4591
- activePackages: z91.array(
4592
- z91.object({
4593
- cancelledAt: z91.string().nullable(),
4594
- id: z91.number(),
4595
- installedAt: z91.string().nullable(),
4596
- isActive: z91.boolean(),
4597
- isBillable: z91.boolean(),
4598
- packageId: z91.number(),
4599
- packageName: z91.string(),
4600
- shortName: z91.string(),
4601
- trialDays: z91.number(),
4602
- uninstalledAt: z91.string().nullable()
4630
+ activePackages: z92.array(
4631
+ z92.object({
4632
+ cancelledAt: z92.string().nullable(),
4633
+ id: z92.number(),
4634
+ installedAt: z92.string().nullable(),
4635
+ isActive: z92.boolean(),
4636
+ isBillable: z92.boolean(),
4637
+ packageId: z92.number(),
4638
+ packageName: z92.string(),
4639
+ shortName: z92.string(),
4640
+ trialDays: z92.number(),
4641
+ uninstalledAt: z92.string().nullable()
4603
4642
  })
4604
4643
  ),
4605
- apiKey: z91.string(),
4606
- billingVersion: z91.string().nullable(),
4607
- cacheKey: z91.coerce.number(),
4608
- carousel: z91.enum(["flickity", "splide"]),
4609
- currency: z91.string(),
4610
- currencySymbol: z91.string(),
4611
- domain: z91.string(),
4612
- enabledJquery: z91.boolean(),
4613
- enabledPresentmentCurrencies: z91.array(z91.string()),
4614
- hasSmartCollectionsEnabled: z91.boolean(),
4615
- hasSmartSearchEnabled: z91.boolean(),
4616
- id: z91.coerce.number(),
4617
- integrations: z91.record(
4618
- z91.enum([
4644
+ apiKey: z92.string(),
4645
+ billingVersion: z92.string().nullable(),
4646
+ cacheKey: z92.coerce.number(),
4647
+ carousel: z92.enum(["flickity", "splide"]),
4648
+ currency: z92.string(),
4649
+ currencySymbol: z92.string(),
4650
+ domain: z92.string(),
4651
+ enabledJquery: z92.boolean(),
4652
+ enabledPresentmentCurrencies: z92.array(z92.string()),
4653
+ hasSmartCollectionsEnabled: z92.boolean(),
4654
+ hasSmartSearchEnabled: z92.boolean(),
4655
+ id: z92.coerce.number(),
4656
+ integrations: z92.record(
4657
+ z92.enum([
4619
4658
  "attentive",
4620
4659
  "judgeme",
4621
4660
  "junip",
@@ -4628,170 +4667,170 @@ var ShopConfig = z91.object({
4628
4667
  "stamped",
4629
4668
  "yotpo"
4630
4669
  ]),
4631
- z91.union([z91.boolean(), z91.unknown()])
4670
+ z92.union([z92.boolean(), z92.unknown()])
4632
4671
  ),
4633
- markets: z91.object({
4634
- enabled: z91.boolean()
4672
+ markets: z92.object({
4673
+ enabled: z92.boolean()
4635
4674
  }),
4636
- monetize: z91.object({
4637
- publisherKey: z91.string().nullable()
4675
+ monetize: z92.object({
4676
+ publisherKey: z92.string().nullable()
4638
4677
  }).nullish(),
4639
- moneyFormat: z91.string(),
4640
- myshopifyDomain: z91.string(),
4641
- primaryLocale: z91.string(),
4642
- productGroupsEnabled: z91.enum(["no", "yes"]).transform((value) => value === "yes"),
4643
- rechargeCustomDomain: z91.string().nullable(),
4644
- sellingPlansEnabled: z91.boolean(),
4645
- shopId: z91.number(),
4646
- shopifySellingPlansEnabled: z91.boolean(),
4647
- shopName: z91.string(),
4648
- storefrontAccessToken: z91.string().nullable(),
4649
- useRebuyIcons: z91.boolean()
4678
+ moneyFormat: z92.string(),
4679
+ myshopifyDomain: z92.string(),
4680
+ primaryLocale: z92.string(),
4681
+ productGroupsEnabled: z92.enum(["no", "yes"]).transform((value) => value === "yes"),
4682
+ rechargeCustomDomain: z92.string().nullable(),
4683
+ sellingPlansEnabled: z92.boolean(),
4684
+ shopId: z92.number(),
4685
+ shopifySellingPlansEnabled: z92.boolean(),
4686
+ shopName: z92.string(),
4687
+ storefrontAccessToken: z92.string().nullable(),
4688
+ useRebuyIcons: z92.boolean()
4650
4689
  });
4651
4690
 
4652
4691
  // src/schema/userConfig.ts
4653
- import { z as z92 } from "zod";
4654
- var UserConfig = z92.object({
4692
+ import { z as z93 } from "zod";
4693
+ var UserConfig = z93.object({
4655
4694
  shop: ShopConfig,
4656
4695
  /**
4657
4696
  * `.catch(undefined)` is the safety bar: smart-cart shape drift can NEVER fail `fetchUserConfig`,
4658
4697
  * which resolves the apiKey for every offers/monetize/analytics/gift request.
4659
4698
  */
4660
4699
  smartCart: SmartCartConfig.nullish().catch(void 0),
4661
- smartFlows: z92.array(z92.unknown())
4700
+ smartFlows: z93.array(z93.unknown())
4662
4701
  });
4663
4702
 
4664
4703
  // src/schema/widgetData.ts
4665
- import { z as z101 } from "zod";
4704
+ import { z as z102 } from "zod";
4666
4705
 
4667
4706
  // src/schema/widgets/abTestingPlaceholder.ts
4668
- import { z as z93 } from "zod";
4669
- var ABTestingPlaceholder = z93.looseObject({
4670
- type: z93.literal("placeholder")
4707
+ import { z as z94 } from "zod";
4708
+ var ABTestingPlaceholder = z94.looseObject({
4709
+ type: z94.literal("placeholder")
4671
4710
  });
4672
4711
 
4673
4712
  // src/schema/widgets/checkoutExtension.ts
4674
- import { z as z94 } from "zod";
4675
- var CheckoutExtension = z94.looseObject({
4676
- type: z94.literal(WidgetType.shopify_checkout_extension).default(WidgetType.shopify_checkout_extension)
4713
+ import { z as z95 } from "zod";
4714
+ var CheckoutExtension = z95.looseObject({
4715
+ type: z95.literal(WidgetType.shopify_checkout_extension).default(WidgetType.shopify_checkout_extension)
4677
4716
  });
4678
4717
 
4679
4718
  // src/schema/widgets/contentBlock.ts
4680
- import { z as z95 } from "zod";
4681
- var ContentBlockV1 = z95.object({
4682
- blockSpacing: z95.enum(spacings).optional(),
4683
- imageBlocks: z95.union([
4684
- z95.array(
4685
- z95.object({
4686
- altText: z95.string().nullable(),
4687
- description: z95.string().nullable(),
4688
- id: z95.uuid(),
4689
- imagePlacement: z95.enum(["top", "right", "bottom", "left"]),
4690
- imageSize: z95.number(),
4691
- imageUrl: z95.url(),
4692
- textAlignment: z95.enum(["left", "center", "right"]),
4719
+ import { z as z96 } from "zod";
4720
+ var ContentBlockV1 = z96.object({
4721
+ blockSpacing: z96.enum(spacings).optional(),
4722
+ imageBlocks: z96.union([
4723
+ z96.array(
4724
+ z96.object({
4725
+ altText: z96.string().nullable(),
4726
+ description: z96.string().nullable(),
4727
+ id: z96.uuid(),
4728
+ imagePlacement: z96.enum(["top", "right", "bottom", "left"]),
4729
+ imageSize: z96.number(),
4730
+ imageUrl: z96.url(),
4731
+ textAlignment: z96.enum(["left", "center", "right"]),
4693
4732
  /** Inline scale only: an image caption can never be a block-level heading. */
4694
- textSize: z95.enum(inlineTextSizeNames)
4733
+ textSize: z96.enum(inlineTextSizeNames)
4695
4734
  })
4696
4735
  ),
4697
- z95.strictObject({}).transform(() => [])
4736
+ z96.strictObject({}).transform(() => [])
4698
4737
  ]).optional(),
4699
- imageLayout: z95.enum(["row", "column"]).optional(),
4700
- language: z95.object({
4701
- description: z95.string(),
4702
- superTitle: z95.string(),
4703
- title: z95.string()
4738
+ imageLayout: z96.enum(["row", "column"]).optional(),
4739
+ language: z96.object({
4740
+ description: z96.string(),
4741
+ superTitle: z96.string(),
4742
+ title: z96.string()
4704
4743
  }),
4705
- previewMode: z95.boolean(),
4706
- type: z95.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
4707
- version: z95.literal(1)
4744
+ previewMode: z96.boolean(),
4745
+ type: z96.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
4746
+ version: z96.literal(1)
4708
4747
  });
4709
- var ContentBlock = z95.discriminatedUnion("version", [
4748
+ var ContentBlock = z96.discriminatedUnion("version", [
4710
4749
  ContentBlockV1,
4711
4750
  CABRootSection.extend({
4712
- type: z95.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
4751
+ type: z96.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
4713
4752
  })
4714
4753
  ]);
4715
4754
 
4716
4755
  // src/schema/widgets/giftWithPurchase.ts
4717
- import { z as z96 } from "zod";
4718
- var GiftWithPurchase = z96.looseObject({
4719
- type: z96.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
4756
+ import { z as z97 } from "zod";
4757
+ var GiftWithPurchase = z97.looseObject({
4758
+ type: z97.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
4720
4759
  });
4721
4760
 
4722
4761
  // src/schema/widgets/lineItemEditor.ts
4723
- import { z as z97 } from "zod";
4724
- var LineItemEditorSwitchLanguageV1 = z97.object({
4725
- downgradeToOneTimeLabel: z97.string().optional(),
4762
+ import { z as z98 } from "zod";
4763
+ var LineItemEditorSwitchLanguageV1 = z98.object({
4764
+ downgradeToOneTimeLabel: z98.string().optional(),
4726
4765
  /** Frequency-option template (`{{frequency}}`/`{{interval}}`) for the plan select. */
4727
- subscriptionOptionLabel: z97.string().optional(),
4728
- upgradeToSubscriptionLabel: z97.string().optional(),
4729
- upgradeToSubscriptionWithoutDiscountLabel: z97.string().optional()
4766
+ subscriptionOptionLabel: z98.string().optional(),
4767
+ upgradeToSubscriptionLabel: z98.string().optional(),
4768
+ upgradeToSubscriptionWithoutDiscountLabel: z98.string().optional()
4730
4769
  });
4731
- var LineItemEditorV1 = z97.object({
4770
+ var LineItemEditorV1 = z98.object({
4732
4771
  /** Legacy `getStyles` button style; the converter carries a valid kind, defaulting to `plain`. */
4733
- button: z97.object({ kind: z97.enum(["plain", "primary", "secondary"]).optional() }).optional(),
4734
- previewMode: z97.boolean().optional(),
4735
- switchToSubscription: z97.object({
4736
- disableDowngrade: z97.boolean().optional(),
4772
+ button: z98.object({ kind: z98.enum(["plain", "primary", "secondary"]).optional() }).optional(),
4773
+ previewMode: z98.boolean().optional(),
4774
+ switchToSubscription: z98.object({
4775
+ disableDowngrade: z98.boolean().optional(),
4737
4776
  language: LineItemEditorSwitchLanguageV1.optional()
4738
4777
  }).optional(),
4739
- switchToSubscriptionEnabled: z97.boolean().optional(),
4740
- tracking: z97.object({
4741
- enableAttribution: z97.boolean().optional(),
4742
- enableSource: z97.boolean().optional(),
4743
- enableWidget: z97.boolean().optional()
4778
+ switchToSubscriptionEnabled: z98.boolean().optional(),
4779
+ tracking: z98.object({
4780
+ enableAttribution: z98.boolean().optional(),
4781
+ enableSource: z98.boolean().optional(),
4782
+ enableWidget: z98.boolean().optional()
4744
4783
  }).optional(),
4745
- type: z97.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
4746
- version: z97.literal(1)
4784
+ type: z98.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
4785
+ version: z98.literal(1)
4747
4786
  });
4748
- var LineItemEditor = z97.discriminatedUnion("version", [
4787
+ var LineItemEditor = z98.discriminatedUnion("version", [
4749
4788
  LineItemEditorV1,
4750
4789
  CABRootSection.extend({
4751
- type: z97.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
4790
+ type: z98.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
4752
4791
  })
4753
4792
  ]);
4754
4793
 
4755
4794
  // src/schema/widgets/progressBar.ts
4756
- import { z as z98 } from "zod";
4757
- var ProgressBar = z98.looseObject({
4758
- type: z98.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
4795
+ import { z as z99 } from "zod";
4796
+ var ProgressBar = z99.looseObject({
4797
+ type: z99.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
4759
4798
  });
4760
4799
 
4761
4800
  // src/schema/widgets/rebuyButton.ts
4762
- import { z as z99 } from "zod";
4763
- var RebuyButtonV1 = z99.looseObject({
4764
- type: z99.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
4765
- version: z99.literal(1)
4801
+ import { z as z100 } from "zod";
4802
+ var RebuyButtonV1 = z100.looseObject({
4803
+ type: z100.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
4804
+ version: z100.literal(1)
4766
4805
  });
4767
- var RebuyButton = z99.discriminatedUnion("version", [
4806
+ var RebuyButton = z100.discriminatedUnion("version", [
4768
4807
  RebuyButtonV1,
4769
4808
  CABRootSection.extend({
4770
- type: z99.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
4809
+ type: z100.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
4771
4810
  })
4772
4811
  ]);
4773
4812
 
4774
4813
  // src/schema/widgets/rebuyMonetize.ts
4775
- import { z as z100 } from "zod";
4776
- var RebuyMonetize = z100.looseObject({
4777
- type: z100.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
4814
+ import { z as z101 } from "zod";
4815
+ var RebuyMonetize = z101.looseObject({
4816
+ type: z101.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
4778
4817
  });
4779
- var RebuyMonetizeV1 = z100.object({
4780
- name: z100.string().nullable().optional(),
4781
- previewMode: z100.boolean().optional(),
4818
+ var RebuyMonetizeV1 = z101.object({
4819
+ name: z101.string().nullable().optional(),
4820
+ previewMode: z101.boolean().optional(),
4782
4821
  /** Privacy Policy footer href → the marker section's `privacyPolicyUrl`. */
4783
- privacyPolicyUrl: z100.string().nullable().optional(),
4822
+ privacyPolicyUrl: z101.string().nullable().optional(),
4784
4823
  /** Ads-taxonomy sub-vertical id — one of the admin Monetize editor's two configurables. */
4785
- subVertical: z100.string().nullable().optional(),
4786
- tracking: z100.object({
4787
- enableAttribution: z100.boolean().optional(),
4788
- enableSource: z100.boolean().optional(),
4789
- enableWidget: z100.boolean().optional()
4824
+ subVertical: z101.string().nullable().optional(),
4825
+ tracking: z101.object({
4826
+ enableAttribution: z101.boolean().optional(),
4827
+ enableSource: z101.boolean().optional(),
4828
+ enableWidget: z101.boolean().optional()
4790
4829
  }).optional(),
4791
- type: z100.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
4792
- version: z100.literal(1),
4830
+ type: z101.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
4831
+ version: z101.literal(1),
4793
4832
  /** Ads-taxonomy vertical id — one of the admin Monetize editor's two configurables. */
4794
- vertical: z100.string().nullable().optional()
4833
+ vertical: z101.string().nullable().optional()
4795
4834
  });
4796
4835
 
4797
4836
  // src/schema/widgetData.ts
@@ -4805,7 +4844,7 @@ var extensionWidgetTypes = [
4805
4844
  WidgetType.ui_extension_line_item_editor,
4806
4845
  WidgetType.ui_extension_progress_bar
4807
4846
  ];
4808
- var WidgetData = z101.discriminatedUnion("type", [
4847
+ var WidgetData = z102.discriminatedUnion("type", [
4809
4848
  ABTestingPlaceholder,
4810
4849
  CheckoutExtension,
4811
4850
  ContentBlock,
@@ -5165,36 +5204,36 @@ var SWITCH_LABELS = {
5165
5204
  };
5166
5205
 
5167
5206
  // src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
5168
- import { z as z103 } from "zod";
5207
+ import { z as z104 } from "zod";
5169
5208
 
5170
5209
  // src/schema/widgets/post-purchase-offer/postPurchaseWidget.ts
5171
- import { z as z102 } from "zod";
5172
- var PostPurchaseWidgetLinkedFlow = z102.object({
5173
- id: z102.number(),
5174
- name: z102.string()
5175
- });
5176
- var PostPurchaseWidget = z102.object({
5177
- classification: z102.literal("post_purchase_offer_page").default("post_purchase_offer_page"),
5178
- createdAtTime: z102.iso.datetime({ offset: true }).optional(),
5179
- customEndpointName: z102.string().nullish(),
5180
- id: z102.number().default(0),
5181
- lastViewed: z102.iso.datetime({ offset: true }).nullish(),
5182
- linkedCustomEndpointId: z102.number().nullish(),
5183
- linkedFlows: z102.array(PostPurchaseWidgetLinkedFlow).optional(),
5184
- name: z102.string().default(""),
5185
- owner: z102.number().nullish(),
5210
+ import { z as z103 } from "zod";
5211
+ var PostPurchaseWidgetLinkedFlow = z103.object({
5212
+ id: z103.number(),
5213
+ name: z103.string()
5214
+ });
5215
+ var PostPurchaseWidget = z103.object({
5216
+ classification: z103.literal("post_purchase_offer_page").default("post_purchase_offer_page"),
5217
+ createdAtTime: z103.iso.datetime({ offset: true }).optional(),
5218
+ customEndpointName: z103.string().nullish(),
5219
+ id: z103.number().default(0),
5220
+ lastViewed: z103.iso.datetime({ offset: true }).nullish(),
5221
+ linkedCustomEndpointId: z103.number().nullish(),
5222
+ linkedFlows: z103.array(PostPurchaseWidgetLinkedFlow).optional(),
5223
+ name: z103.string().default(""),
5224
+ owner: z103.number().nullish(),
5186
5225
  settings: PostPurchaseSettings
5187
5226
  });
5188
5227
 
5189
5228
  // src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
5190
- var PostPurchaseOffer = z103.discriminatedUnion("successful", [
5191
- z103.strictObject({
5192
- errors: z103.array(z103.object({ message: z103.string() })),
5193
- message: z103.string(),
5194
- successful: z103.literal(false)
5229
+ var PostPurchaseOffer = z104.discriminatedUnion("successful", [
5230
+ z104.strictObject({
5231
+ errors: z104.array(z104.object({ message: z104.string() })),
5232
+ message: z104.string(),
5233
+ successful: z104.literal(false)
5195
5234
  }),
5196
- z103.strictObject({
5197
- successful: z103.literal(true),
5235
+ z104.strictObject({
5236
+ successful: z104.literal(true),
5198
5237
  widget: PostPurchaseWidget
5199
5238
  })
5200
5239
  ]);
@@ -6618,6 +6657,8 @@ export {
6618
6657
  CABVariantLabels,
6619
6658
  CABVariantsSection,
6620
6659
  CABVisibility,
6660
+ CLIENT_LEDGER_MAX_EVENTS,
6661
+ CLIENT_LEDGER_TYPES,
6621
6662
  COMBINED_ENDPOINTS,
6622
6663
  CabActiveExperiment,
6623
6664
  CabShopConfig,
@@ -6628,6 +6669,8 @@ export {
6628
6669
  ClassificationAttemptProgressSchema,
6629
6670
  ClassificationProgressSchema,
6630
6671
  ClassificationResultProgressSchema,
6672
+ ClientLedgerEventSchema,
6673
+ ClientLedgerRequestSchema,
6631
6674
  ContentBlock,
6632
6675
  ContentBlockV1,
6633
6676
  ContentOperator,
@@ -6730,6 +6773,7 @@ export {
6730
6773
  PostPurchaseOptions,
6731
6774
  PostPurchaseOrderAttributes,
6732
6775
  PostPurchaseOrderIdSchema,
6776
+ PostPurchaseOrderPendingSchema,
6733
6777
  PostPurchaseOriginalVariants,
6734
6778
  PostPurchasePlanAdjustment,
6735
6779
  PostPurchasePlanCatalog,