@rebuy/rebuy 3.66.1 → 3.68.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.cjs +816 -784
- package/dist/index.mjs +816 -784
- package/dist/schema/cabShopConfig.d.ts +5 -5
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/postPurchaseDecisionTrace.d.ts +90 -0
- package/dist/schema/postPurchaseFinish.d.ts +3 -0
- package/dist/schema/postPurchaseFollowups.d.ts +6 -0
- package/dist/schema/postPurchaseHealth.d.ts +19 -1
- package/dist/schema/postPurchaseHealthProgress.d.ts +28 -0
- package/dist/schema/postPurchaseShadow.d.ts +33 -7
- package/dist/schema/smartCart.d.ts +18 -18
- package/dist/schema/userConfig.d.ts +5 -5
- package/dist/server/index.cjs +7 -1
- package/dist/server/index.mjs +7 -1
- package/package.json +7 -1
package/dist/index.mjs
CHANGED
|
@@ -2654,19 +2654,111 @@ var ClassificationProgressSchema = z30.union([
|
|
|
2654
2654
|
z30.strictObject({ status: z30.literal("unavailable") })
|
|
2655
2655
|
]).nullable();
|
|
2656
2656
|
|
|
2657
|
-
// src/schema/
|
|
2657
|
+
// src/schema/postPurchaseDecisionTrace.ts
|
|
2658
2658
|
import { z as z34 } from "zod";
|
|
2659
2659
|
|
|
2660
|
-
// src/schema/
|
|
2660
|
+
// src/schema/postPurchaseShadow.ts
|
|
2661
|
+
import { z as z33 } from "zod";
|
|
2662
|
+
|
|
2663
|
+
// src/schema/postPurchaseSkipTrace.ts
|
|
2661
2664
|
import { z as z32 } from "zod";
|
|
2662
2665
|
|
|
2663
|
-
// src/schema/
|
|
2666
|
+
// src/schema/postPurchaseEligibility.ts
|
|
2664
2667
|
import { z as z31 } from "zod";
|
|
2665
|
-
var
|
|
2668
|
+
var PostPurchaseSkipReasonSchema = z31.enum(["empty", "no-eligible-subscription"]);
|
|
2669
|
+
|
|
2670
|
+
// src/schema/postPurchaseSkipTrace.ts
|
|
2671
|
+
var POST_PURCHASE_SKIP_LIMIT = 32;
|
|
2672
|
+
var PostPurchaseSkipTraceSchema = z32.array(
|
|
2673
|
+
z32.object({
|
|
2674
|
+
entry: DecisionEntrySchema,
|
|
2675
|
+
reason: PostPurchaseSkipReasonSchema
|
|
2676
|
+
})
|
|
2677
|
+
).max(POST_PURCHASE_SKIP_LIMIT);
|
|
2678
|
+
|
|
2679
|
+
// src/schema/postPurchaseShadow.ts
|
|
2680
|
+
var PostPurchaseShadowSelectionSchema = z33.discriminatedUnion("verdict", [
|
|
2681
|
+
z33.object({ entry: DecisionEntrySchema, verdict: z33.literal("render") }),
|
|
2682
|
+
z33.object({ verdict: z33.literal("skip") })
|
|
2683
|
+
]);
|
|
2684
|
+
var PostPurchaseShadowSkipReasonSchema = z33.enum([
|
|
2685
|
+
"destination-missing",
|
|
2686
|
+
"merchant-destination",
|
|
2687
|
+
"merchant-time",
|
|
2688
|
+
"no-active-flows",
|
|
2689
|
+
"no-eligible-flow",
|
|
2690
|
+
"prelude-timeout"
|
|
2691
|
+
]);
|
|
2692
|
+
var PostPurchaseShadowFlowOutcomesSchema = z33.array(
|
|
2693
|
+
z33.object({
|
|
2694
|
+
flowId: z33.number().int().positive(),
|
|
2695
|
+
incomplete: z33.literal(true).optional(),
|
|
2696
|
+
ms: z33.number().int().nonnegative().optional(),
|
|
2697
|
+
outcome: z33.enum(["eligible", "empty", "failed", "unsupported"]),
|
|
2698
|
+
unpreparableCause: z33.enum(["contract", "members", "offer"]).optional()
|
|
2699
|
+
})
|
|
2700
|
+
).max(POST_PURCHASE_SKIP_LIMIT);
|
|
2701
|
+
var PostPurchaseShadowReportFields = z33.object({
|
|
2702
|
+
differences: z33.array(z33.enum(["verdict", "entry", "targeting", "incomplete-capture", "unsupported-configuration"])).refine((differences) => new Set(differences).size === differences.length, {
|
|
2703
|
+
message: "differences must not contain duplicate entries"
|
|
2704
|
+
}),
|
|
2705
|
+
legacySelection: PostPurchaseShadowSelectionSchema,
|
|
2706
|
+
phase: z33.literal("shouldRender"),
|
|
2707
|
+
sampleId: z33.string(),
|
|
2708
|
+
/** Optional so rows and senders from before REB-25425 stay valid; never part of the classification. */
|
|
2709
|
+
serverFlowOutcomes: PostPurchaseShadowFlowOutcomesSchema.optional(),
|
|
2710
|
+
serverSelection: PostPurchaseShadowSelectionSchema.optional(),
|
|
2711
|
+
/**
|
|
2712
|
+
* Set by the sender when the Decider skipped, `incomplete` reports included (which carry no
|
|
2713
|
+
* `serverSelection`). Not validated against `serverSelection`, and never part of the classification.
|
|
2714
|
+
*/
|
|
2715
|
+
serverSkipReason: PostPurchaseShadowSkipReasonSchema.optional(),
|
|
2716
|
+
status: z33.enum(["match", "diverged", "incomplete"]),
|
|
2717
|
+
targetingFlowIds: z33.array(z33.number().int().positive()),
|
|
2718
|
+
workflowPhase: z33.literal("decide")
|
|
2719
|
+
});
|
|
2720
|
+
var PostPurchaseShadowReportSchema = PostPurchaseShadowReportFields.refine(
|
|
2721
|
+
(report) => report.status !== "match" || report.differences.length === 0,
|
|
2722
|
+
{ message: "status 'match' requires an empty differences array", path: ["status"] }
|
|
2723
|
+
).refine((report) => report.status !== "diverged" || report.differences.length > 0, {
|
|
2724
|
+
message: "status 'diverged' requires a non-empty differences array",
|
|
2725
|
+
path: ["status"]
|
|
2726
|
+
}).refine((report) => report.status !== "diverged" || report.serverSelection !== void 0, {
|
|
2727
|
+
message: "status 'diverged' requires a serverSelection to diverge from",
|
|
2728
|
+
path: ["status"]
|
|
2729
|
+
});
|
|
2730
|
+
|
|
2731
|
+
// src/schema/postPurchaseDecisionTrace.ts
|
|
2732
|
+
var PostPurchaseDecisionTimingSchema = z34.object({
|
|
2733
|
+
activeFlowsMs: z34.number().int().nonnegative().optional(),
|
|
2734
|
+
decisionMs: z34.number().int().nonnegative(),
|
|
2735
|
+
preludeMs: z34.number().int().nonnegative().optional(),
|
|
2736
|
+
targetingMs: z34.number().int().nonnegative().optional()
|
|
2737
|
+
});
|
|
2738
|
+
var TraceEvidence = {
|
|
2739
|
+
flowCount: z34.number().int().nonnegative(),
|
|
2740
|
+
sampleRate: z34.number().gt(0).max(1),
|
|
2741
|
+
serverFlowOutcomes: PostPurchaseShadowFlowOutcomesSchema,
|
|
2742
|
+
timing: PostPurchaseDecisionTimingSchema
|
|
2743
|
+
};
|
|
2744
|
+
var PostPurchaseDecisionTraceSchema = z34.discriminatedUnion("verdict", [
|
|
2745
|
+
z34.object({ ...TraceEvidence, entry: DecisionEntrySchema, verdict: z34.literal("render") }),
|
|
2746
|
+
z34.object({ ...TraceEvidence, serverSkipReason: PostPurchaseShadowSkipReasonSchema, verdict: z34.literal("skip") })
|
|
2747
|
+
]);
|
|
2748
|
+
|
|
2749
|
+
// src/schema/postPurchaseDecline.ts
|
|
2750
|
+
import { z as z38 } from "zod";
|
|
2751
|
+
|
|
2752
|
+
// src/schema/postPurchaseProgress.ts
|
|
2753
|
+
import { z as z36 } from "zod";
|
|
2754
|
+
|
|
2755
|
+
// src/schema/postPurchaseDeclineDelivery.ts
|
|
2756
|
+
import { z as z35 } from "zod";
|
|
2757
|
+
var AttemptSchema = z35.strictObject({
|
|
2666
2758
|
attemptedAt: PostPurchaseTimestampSchema,
|
|
2667
|
-
status:
|
|
2759
|
+
status: z35.enum(["attempted", "unavailable"])
|
|
2668
2760
|
});
|
|
2669
|
-
var DeclineDeliveryProgressSchema =
|
|
2761
|
+
var DeclineDeliveryProgressSchema = z35.union([
|
|
2670
2762
|
AttemptSchema,
|
|
2671
2763
|
AttemptSchema.extend({
|
|
2672
2764
|
finishedAt: PostPurchaseTimestampSchema,
|
|
@@ -2675,42 +2767,42 @@ var DeclineDeliveryProgressSchema = z31.union([
|
|
|
2675
2767
|
]);
|
|
2676
2768
|
|
|
2677
2769
|
// src/schema/postPurchaseProgress.ts
|
|
2678
|
-
var PostPurchaseProgressSchema =
|
|
2770
|
+
var PostPurchaseProgressSchema = z36.object({
|
|
2679
2771
|
closedAt: PostPurchaseTimestampSchema.nullable(),
|
|
2680
2772
|
deadline: PostPurchaseTimestampSchema,
|
|
2681
2773
|
entry: DecisionEntrySchema,
|
|
2682
|
-
entryRevision:
|
|
2683
|
-
members:
|
|
2774
|
+
entryRevision: z36.number().int().nonnegative(),
|
|
2775
|
+
members: z36.array(
|
|
2684
2776
|
PostPurchaseMemberIdentity.extend({
|
|
2685
2777
|
declineDelivery: DeclineDeliveryProgressSchema.optional(),
|
|
2686
|
-
status:
|
|
2778
|
+
status: z36.enum(["unhandled", "accepted", "declined"])
|
|
2687
2779
|
}).strict()
|
|
2688
2780
|
),
|
|
2689
|
-
revision:
|
|
2781
|
+
revision: z36.number().int().nonnegative()
|
|
2690
2782
|
}).strict();
|
|
2691
2783
|
|
|
2692
2784
|
// src/schema/postPurchaseVariantCatalog.ts
|
|
2693
|
-
import { z as
|
|
2694
|
-
var PostPurchaseVariantSelector =
|
|
2785
|
+
import { z as z37 } from "zod";
|
|
2786
|
+
var PostPurchaseVariantSelector = z37.object({ variantId: PostPurchaseVariantId }).strict();
|
|
2695
2787
|
var PostPurchaseVariantOption = OfferProduct.shape.options.element.extend({
|
|
2696
|
-
id:
|
|
2697
|
-
position:
|
|
2788
|
+
id: z37.number().int().positive().optional(),
|
|
2789
|
+
position: z37.number().int().min(1).max(3)
|
|
2698
2790
|
});
|
|
2699
2791
|
var PostPurchaseVariantValues = OfferProduct.shape.variants.element.pick({
|
|
2700
2792
|
option1: true,
|
|
2701
2793
|
option2: true,
|
|
2702
2794
|
option3: true
|
|
2703
2795
|
});
|
|
2704
|
-
var PostPurchaseVariantCatalog =
|
|
2796
|
+
var PostPurchaseVariantCatalog = z37.object({
|
|
2705
2797
|
displayMode: PostPurchaseSettings.shape.productOptions.shape.variantSelectorDisplayMode,
|
|
2706
|
-
options:
|
|
2798
|
+
options: z37.array(PostPurchaseVariantOption),
|
|
2707
2799
|
productId: PostPurchaseProductId,
|
|
2708
2800
|
showSelectors: PostPurchaseSettings.shape.productOptions.shape.showVariantSelectors,
|
|
2709
|
-
variants:
|
|
2801
|
+
variants: z37.array(
|
|
2710
2802
|
PostPurchaseVariantValues.partial().extend({
|
|
2711
|
-
available:
|
|
2803
|
+
available: z37.boolean(),
|
|
2712
2804
|
id: PostPurchaseVariantId,
|
|
2713
|
-
imageId:
|
|
2805
|
+
imageId: z37.number().int().nonnegative().nullish(),
|
|
2714
2806
|
title: OfferProduct.shape.variants.element.shape.title
|
|
2715
2807
|
})
|
|
2716
2808
|
)
|
|
@@ -2728,30 +2820,30 @@ var OfferDeclineRequestSchema = DecideRequestSchema.extend({
|
|
|
2728
2820
|
"Selected merchandise requires a variant"
|
|
2729
2821
|
);
|
|
2730
2822
|
var RecordedOfferDeclineSchema = PostPurchaseProgressSchema.shape.members.element.omit({ declineDelivery: true, status: true }).extend({ entry: DecisionEntrySchema.strict(), entryRevision: PostPurchaseProgressSchema.shape.entryRevision }).strict();
|
|
2731
|
-
var OfferDeclineResponseSchema =
|
|
2732
|
-
data:
|
|
2733
|
-
successful:
|
|
2823
|
+
var OfferDeclineResponseSchema = z38.object({
|
|
2824
|
+
data: z38.object({ decline: RecordedOfferDeclineSchema, progress: PostPurchaseProgressSchema }),
|
|
2825
|
+
successful: z38.literal(true)
|
|
2734
2826
|
});
|
|
2735
2827
|
|
|
2736
2828
|
// src/schema/postPurchaseDisplayPrice.ts
|
|
2737
|
-
import { z as
|
|
2829
|
+
import { z as z40 } from "zod";
|
|
2738
2830
|
|
|
2739
2831
|
// src/schema/postPurchaseSubscriptionDisplay.ts
|
|
2740
|
-
import { z as
|
|
2741
|
-
var Minor2 =
|
|
2742
|
-
var PostPurchaseSubscriptionDisplay =
|
|
2832
|
+
import { z as z39 } from "zod";
|
|
2833
|
+
var Minor2 = z39.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER);
|
|
2834
|
+
var PostPurchaseSubscriptionDisplay = z39.object({
|
|
2743
2835
|
comparisonMinor: Minor2,
|
|
2744
|
-
currencyCode:
|
|
2836
|
+
currencyCode: z39.string().regex(/^[A-Z]{3}$/),
|
|
2745
2837
|
priceMinor: Minor2,
|
|
2746
2838
|
savingMinor: Minor2,
|
|
2747
|
-
savingPercent:
|
|
2839
|
+
savingPercent: z39.number().int().min(0).max(100)
|
|
2748
2840
|
});
|
|
2749
2841
|
|
|
2750
2842
|
// src/schema/postPurchaseDisplayPrice.ts
|
|
2751
2843
|
var { currencyCode: CurrencyCode, priceMinor: Minor3, savingPercent: Percent } = PostPurchaseSubscriptionDisplay.shape;
|
|
2752
|
-
var PostPurchaseDisplayPrice =
|
|
2844
|
+
var PostPurchaseDisplayPrice = z40.object({
|
|
2753
2845
|
currencyCode: CurrencyCode,
|
|
2754
|
-
savingFormat:
|
|
2846
|
+
savingFormat: z40.enum(["amount", "percent"]).nullable(),
|
|
2755
2847
|
savingMinor: Minor3,
|
|
2756
2848
|
savingPercent: Percent,
|
|
2757
2849
|
subscriptionUnit: PostPurchaseSubscriptionDisplay.optional(),
|
|
@@ -2768,85 +2860,83 @@ var PostPurchaseDisplayPrice = z36.object({
|
|
|
2768
2860
|
"The subscription unit estimate restates the plan facts in the same currency"
|
|
2769
2861
|
);
|
|
2770
2862
|
|
|
2771
|
-
// src/schema/postPurchaseEligibility.ts
|
|
2772
|
-
import { z as z37 } from "zod";
|
|
2773
|
-
var PostPurchaseSkipReasonSchema = z37.enum(["empty", "no-eligible-subscription"]);
|
|
2774
|
-
|
|
2775
2863
|
// src/schema/postPurchaseExitPolicy.ts
|
|
2776
|
-
import { z as
|
|
2864
|
+
import { z as z41 } from "zod";
|
|
2777
2865
|
var EXIT_DELAY_MAX_MS = 60 * 60 * 1e3;
|
|
2778
|
-
var ExitPolicySchema =
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
delayMs:
|
|
2782
|
-
source:
|
|
2783
|
-
status:
|
|
2866
|
+
var ExitPolicySchema = z41.discriminatedUnion("status", [
|
|
2867
|
+
z41.strictObject({ status: z41.literal("unavailable") }),
|
|
2868
|
+
z41.strictObject({
|
|
2869
|
+
delayMs: z41.number().int().nonnegative().max(EXIT_DELAY_MAX_MS),
|
|
2870
|
+
source: z41.enum(["admitted", "selected-flow"]),
|
|
2871
|
+
status: z41.literal("available")
|
|
2784
2872
|
})
|
|
2785
2873
|
]);
|
|
2786
2874
|
|
|
2787
2875
|
// src/schema/postPurchaseFinish.ts
|
|
2788
|
-
import { z as
|
|
2876
|
+
import { z as z49 } from "zod";
|
|
2789
2877
|
|
|
2790
2878
|
// src/schema/postPurchaseFollowups.ts
|
|
2791
|
-
import { z as
|
|
2879
|
+
import { z as z46 } from "zod";
|
|
2792
2880
|
|
|
2793
2881
|
// src/schema/postPurchaseHealthProgress.ts
|
|
2794
|
-
import { z as
|
|
2882
|
+
import { z as z43 } from "zod";
|
|
2795
2883
|
|
|
2796
2884
|
// src/schema/postPurchaseReleaseAuthority.ts
|
|
2797
|
-
import { z as
|
|
2798
|
-
var PostPurchaseSessionIdSchema =
|
|
2799
|
-
var ReleaseOwnerSchema =
|
|
2800
|
-
var ReleaseAuthorityRequestSchema =
|
|
2885
|
+
import { z as z42 } from "zod";
|
|
2886
|
+
var PostPurchaseSessionIdSchema = z42.string().regex(/^[a-f0-9]{64}$/);
|
|
2887
|
+
var ReleaseOwnerSchema = z42.enum(["rebuy", "shopify"]);
|
|
2888
|
+
var ReleaseAuthorityRequestSchema = z42.strictObject({
|
|
2801
2889
|
orderId: PostPurchaseOrderIdSchema,
|
|
2802
2890
|
shop: ShopifyDomainSchema
|
|
2803
2891
|
});
|
|
2804
|
-
var ReadyReleaseAuthoritySchema =
|
|
2892
|
+
var ReadyReleaseAuthoritySchema = z42.object({
|
|
2805
2893
|
deadline: PostPurchaseTimestampSchema,
|
|
2806
2894
|
releaseOwner: ReleaseOwnerSchema,
|
|
2807
2895
|
sessionId: PostPurchaseSessionIdSchema,
|
|
2808
|
-
status:
|
|
2896
|
+
status: z42.literal("ready")
|
|
2809
2897
|
});
|
|
2810
|
-
var PendingReleaseAuthoritySchema =
|
|
2811
|
-
var ReleaseAuthorityResponseSchema =
|
|
2812
|
-
data:
|
|
2813
|
-
|
|
2898
|
+
var PendingReleaseAuthoritySchema = z42.object({ status: z42.literal("pending") });
|
|
2899
|
+
var ReleaseAuthorityResponseSchema = z42.object({
|
|
2900
|
+
data: z42.discriminatedUnion("status", [
|
|
2901
|
+
z42.object({ status: z42.literal("unknown") }),
|
|
2814
2902
|
PendingReleaseAuthoritySchema,
|
|
2815
2903
|
ReadyReleaseAuthoritySchema
|
|
2816
2904
|
]),
|
|
2817
|
-
successful:
|
|
2905
|
+
successful: z42.literal(true)
|
|
2818
2906
|
});
|
|
2819
2907
|
|
|
2820
2908
|
// src/schema/postPurchaseHealthProgress.ts
|
|
2821
|
-
var
|
|
2909
|
+
var HealthResultStatusSchema = z43.enum(["returned", "removed", "unresolved", "nonRebuyResidual", "unknown"]);
|
|
2910
|
+
var HealthStandingStatusSchema = z43.enum(["pending", "attempted", ...HealthResultStatusSchema.options]);
|
|
2911
|
+
var HealthScheduleSchema = z43.strictObject({
|
|
2822
2912
|
checkoutToken: DecideRequestSchema.shape.checkoutToken,
|
|
2823
2913
|
healthScheduledAt: PostPurchaseTimestampSchema,
|
|
2824
2914
|
operationId: PurchaseReceiptSchema.shape.operationId.regex(/^[a-f0-9-]{36}$/),
|
|
2825
2915
|
orderId: PostPurchaseOrderIdSchema,
|
|
2826
|
-
removePartialOrder:
|
|
2916
|
+
removePartialOrder: z43.boolean(),
|
|
2827
2917
|
sessionId: PostPurchaseSessionIdSchema,
|
|
2828
2918
|
shop: DecideRequestSchema.shape.shop
|
|
2829
2919
|
});
|
|
2830
|
-
var HealthSchedulingResponseSchema =
|
|
2831
|
-
data:
|
|
2832
|
-
callbackStatus:
|
|
2920
|
+
var HealthSchedulingResponseSchema = z43.object({
|
|
2921
|
+
data: z43.object({
|
|
2922
|
+
callbackStatus: HealthStandingStatusSchema,
|
|
2833
2923
|
facts: HealthScheduleSchema,
|
|
2834
|
-
scheduling:
|
|
2835
|
-
|
|
2836
|
-
|
|
2924
|
+
scheduling: z43.union([
|
|
2925
|
+
z43.strictObject({ recordedAt: PostPurchaseTimestampSchema, status: z43.literal("verified") }),
|
|
2926
|
+
z43.strictObject({ status: z43.enum(["unavailable", "unverified"]) })
|
|
2837
2927
|
])
|
|
2838
2928
|
}),
|
|
2839
|
-
successful:
|
|
2929
|
+
successful: z43.literal(true)
|
|
2840
2930
|
});
|
|
2841
2931
|
|
|
2842
2932
|
// src/schema/postPurchaseObservation.ts
|
|
2843
|
-
import { z as
|
|
2844
|
-
var PurchaseObservationSchema =
|
|
2845
|
-
|
|
2846
|
-
changesetApplicationsRemaining:
|
|
2847
|
-
errors:
|
|
2848
|
-
|
|
2849
|
-
code:
|
|
2933
|
+
import { z as z44 } from "zod";
|
|
2934
|
+
var PurchaseObservationSchema = z44.union([
|
|
2935
|
+
z44.object({
|
|
2936
|
+
changesetApplicationsRemaining: z44.number().int().nonnegative(),
|
|
2937
|
+
errors: z44.array(
|
|
2938
|
+
z44.object({
|
|
2939
|
+
code: z44.enum([
|
|
2850
2940
|
"payment_required",
|
|
2851
2941
|
"insufficient_inventory",
|
|
2852
2942
|
"changeset_already_applied",
|
|
@@ -2860,40 +2950,40 @@ var PurchaseObservationSchema = z41.union([
|
|
|
2860
2950
|
"subscription_limit_error",
|
|
2861
2951
|
"order_released_error"
|
|
2862
2952
|
]),
|
|
2863
|
-
message:
|
|
2953
|
+
message: z44.string()
|
|
2864
2954
|
}).strict()
|
|
2865
2955
|
),
|
|
2866
|
-
status:
|
|
2956
|
+
status: z44.enum(["processed", "partially_processed", "unprocessed"])
|
|
2867
2957
|
}).strict(),
|
|
2868
|
-
|
|
2958
|
+
z44.object({ reason: z44.literal("application-error"), status: z44.literal("unknown") }).strict()
|
|
2869
2959
|
]);
|
|
2870
|
-
var RecordedPurchaseObservationSchema =
|
|
2960
|
+
var RecordedPurchaseObservationSchema = z44.object({
|
|
2871
2961
|
observation: PurchaseObservationSchema,
|
|
2872
2962
|
recordedAt: PostPurchaseTimestampSchema
|
|
2873
2963
|
}).strict();
|
|
2874
2964
|
var PurchaseObservationRequestSchema = DecideRequestSchema.extend({
|
|
2875
2965
|
observation: PurchaseObservationSchema,
|
|
2876
|
-
operationId:
|
|
2966
|
+
operationId: z44.uuid()
|
|
2877
2967
|
}).strict();
|
|
2878
|
-
var PurchaseObservationResponseSchema =
|
|
2879
|
-
data: RecordedPurchaseObservationSchema.extend({ operationId:
|
|
2880
|
-
successful:
|
|
2968
|
+
var PurchaseObservationResponseSchema = z44.object({
|
|
2969
|
+
data: RecordedPurchaseObservationSchema.extend({ operationId: z44.uuid() }),
|
|
2970
|
+
successful: z44.literal(true)
|
|
2881
2971
|
});
|
|
2882
2972
|
|
|
2883
2973
|
// src/schema/postPurchaseSts.ts
|
|
2884
|
-
import { z as
|
|
2885
|
-
var AttemptSchema2 =
|
|
2974
|
+
import { z as z45 } from "zod";
|
|
2975
|
+
var AttemptSchema2 = z45.strictObject({ attemptedAt: PostPurchaseTimestampSchema, status: z45.literal("attempted") });
|
|
2886
2976
|
var FinishedSchema = AttemptSchema2.extend({ finishedAt: PostPurchaseTimestampSchema });
|
|
2887
|
-
var StsRefundProgressSchema =
|
|
2977
|
+
var StsRefundProgressSchema = z45.union([
|
|
2888
2978
|
AttemptSchema2,
|
|
2889
|
-
FinishedSchema.extend({ refundId:
|
|
2890
|
-
FinishedSchema.extend({ status:
|
|
2979
|
+
FinishedSchema.extend({ refundId: z45.string().min(1), status: z45.literal("refunded") }),
|
|
2980
|
+
FinishedSchema.extend({ status: z45.enum(["failed", "unknown"]) })
|
|
2891
2981
|
]);
|
|
2892
|
-
var StsCompensationProgressSchema =
|
|
2982
|
+
var StsCompensationProgressSchema = z45.union([
|
|
2893
2983
|
AttemptSchema2,
|
|
2894
|
-
FinishedSchema.extend({ status:
|
|
2984
|
+
FinishedSchema.extend({ status: z45.enum(["removed", "failed", "unknown"]) })
|
|
2895
2985
|
]);
|
|
2896
|
-
var StsReviewReasonSchema =
|
|
2986
|
+
var StsReviewReasonSchema = z45.enum([
|
|
2897
2987
|
"refund-unknown",
|
|
2898
2988
|
"compensation-failed",
|
|
2899
2989
|
"compensation-unknown",
|
|
@@ -2902,7 +2992,7 @@ var StsReviewReasonSchema = z42.enum([
|
|
|
2902
2992
|
"compensation-lost",
|
|
2903
2993
|
"refund-owed"
|
|
2904
2994
|
]);
|
|
2905
|
-
var StsReviewProgressSchema =
|
|
2995
|
+
var StsReviewProgressSchema = z45.strictObject({
|
|
2906
2996
|
markedAt: PostPurchaseTimestampSchema,
|
|
2907
2997
|
marker: AcceptedMetafieldResultSchema.shape.status,
|
|
2908
2998
|
reason: StsReviewReasonSchema
|
|
@@ -2919,7 +3009,7 @@ var judgedReason = (refund, compensation) => {
|
|
|
2919
3009
|
if (compensation?.status === "attempted") return "compensation-lost";
|
|
2920
3010
|
return compensation?.status === "removed" ? "refund-owed" : null;
|
|
2921
3011
|
};
|
|
2922
|
-
var StsProgressSchema =
|
|
3012
|
+
var StsProgressSchema = z45.strictObject({
|
|
2923
3013
|
compensation: StsCompensationProgressSchema.nullable(),
|
|
2924
3014
|
operationId: PurchaseReceiptSchema.shape.operationId,
|
|
2925
3015
|
refund: StsRefundProgressSchema.nullable(),
|
|
@@ -2934,15 +3024,15 @@ var StsProgressSchema = z42.strictObject({
|
|
|
2934
3024
|
}, "Review must match the unresolved outcome");
|
|
2935
3025
|
|
|
2936
3026
|
// src/schema/postPurchaseFollowups.ts
|
|
2937
|
-
var RequiredHealthSchema =
|
|
3027
|
+
var RequiredHealthSchema = z46.union([
|
|
2938
3028
|
HealthSchedulingResponseSchema.shape.data,
|
|
2939
|
-
|
|
3029
|
+
z46.strictObject({ status: z46.literal("unavailable") })
|
|
2940
3030
|
]);
|
|
2941
|
-
var AcceptedFollowupsResponseSchema =
|
|
2942
|
-
data:
|
|
2943
|
-
acceptedEvent:
|
|
3031
|
+
var AcceptedFollowupsResponseSchema = z46.object({
|
|
3032
|
+
data: z46.object({
|
|
3033
|
+
acceptedEvent: z46.union([
|
|
2944
3034
|
AcceptedEventResponseSchema.shape.data,
|
|
2945
|
-
|
|
3035
|
+
z46.strictObject({ status: z46.literal("unavailable") })
|
|
2946
3036
|
]),
|
|
2947
3037
|
acceptedMetafield: AcceptedMetafieldResultSchema,
|
|
2948
3038
|
health: RequiredHealthSchema,
|
|
@@ -2953,61 +3043,49 @@ var AcceptedFollowupsResponseSchema = z43.object({
|
|
|
2953
3043
|
message: "STS progress belongs to its operation",
|
|
2954
3044
|
path: ["sts", "operationId"]
|
|
2955
3045
|
}),
|
|
2956
|
-
successful:
|
|
3046
|
+
successful: z46.literal(true)
|
|
2957
3047
|
});
|
|
2958
3048
|
|
|
2959
3049
|
// src/schema/postPurchaseSessionClose.ts
|
|
2960
|
-
import { z as
|
|
2961
|
-
var SessionClosureSchema =
|
|
3050
|
+
import { z as z47 } from "zod";
|
|
3051
|
+
var SessionClosureSchema = z47.object({ closedAt: PostPurchaseTimestampSchema, status: z47.literal("closed") });
|
|
2962
3052
|
var SessionCloseRequestSchema = DecideRequestSchema.strict();
|
|
2963
|
-
var SessionCloseResponseSchema =
|
|
2964
|
-
|
|
2965
|
-
// src/schema/postPurchaseTransition.ts
|
|
2966
|
-
import { z as z46 } from "zod";
|
|
2967
|
-
|
|
2968
|
-
// src/schema/postPurchaseSkipTrace.ts
|
|
2969
|
-
import { z as z45 } from "zod";
|
|
2970
|
-
var POST_PURCHASE_SKIP_LIMIT = 32;
|
|
2971
|
-
var PostPurchaseSkipTraceSchema = z45.array(
|
|
2972
|
-
z45.object({
|
|
2973
|
-
entry: DecisionEntrySchema,
|
|
2974
|
-
reason: PostPurchaseSkipReasonSchema
|
|
2975
|
-
})
|
|
2976
|
-
).max(POST_PURCHASE_SKIP_LIMIT);
|
|
3053
|
+
var SessionCloseResponseSchema = z47.object({ data: SessionClosureSchema, successful: z47.literal(true) });
|
|
2977
3054
|
|
|
2978
3055
|
// src/schema/postPurchaseTransition.ts
|
|
3056
|
+
import { z as z48 } from "zod";
|
|
2979
3057
|
var OfferTransitionRequestSchema = DecideRequestSchema.extend({
|
|
2980
3058
|
entryRevision: PostPurchaseProgressSchema.shape.entryRevision,
|
|
2981
3059
|
progressRevision: PostPurchaseProgressSchema.shape.revision
|
|
2982
3060
|
}).strict();
|
|
2983
|
-
var PostPurchaseEndReasonSchema =
|
|
2984
|
-
var TransitionBaseSchema =
|
|
3061
|
+
var PostPurchaseEndReasonSchema = z48.enum(["no-child", "no-products", "accept-cap"]);
|
|
3062
|
+
var TransitionBaseSchema = z48.object({
|
|
2985
3063
|
attemptedSkips: PostPurchaseSkipTraceSchema.optional(),
|
|
2986
3064
|
progress: PostPurchaseProgressSchema
|
|
2987
3065
|
});
|
|
2988
|
-
var OfferTransitionResponseSchema =
|
|
2989
|
-
data:
|
|
2990
|
-
TransitionBaseSchema.extend({ status:
|
|
3066
|
+
var OfferTransitionResponseSchema = z48.object({
|
|
3067
|
+
data: z48.discriminatedUnion("status", [
|
|
3068
|
+
TransitionBaseSchema.extend({ status: z48.enum(["advanced", "unavailable"]) }),
|
|
2991
3069
|
TransitionBaseSchema.extend({
|
|
2992
3070
|
endReason: PostPurchaseEndReasonSchema.optional(),
|
|
2993
|
-
status:
|
|
3071
|
+
status: z48.literal("no-child")
|
|
2994
3072
|
})
|
|
2995
3073
|
]),
|
|
2996
|
-
successful:
|
|
3074
|
+
successful: z48.literal(true)
|
|
2997
3075
|
});
|
|
2998
3076
|
|
|
2999
3077
|
// src/schema/postPurchaseFinish.ts
|
|
3000
|
-
var FinishedPurchaseSchema =
|
|
3001
|
-
|
|
3002
|
-
|
|
3078
|
+
var FinishedPurchaseSchema = z49.union([
|
|
3079
|
+
z49.strictObject({ status: z49.literal("none") }),
|
|
3080
|
+
z49.strictObject({
|
|
3003
3081
|
operationId: PurchaseReceiptSchema.shape.operationId,
|
|
3004
|
-
status:
|
|
3005
|
-
|
|
3082
|
+
status: z49.union([
|
|
3083
|
+
z49.literal("pending"),
|
|
3006
3084
|
...PurchaseObservationSchema.options.map((option) => option.shape.status)
|
|
3007
3085
|
])
|
|
3008
3086
|
})
|
|
3009
3087
|
]);
|
|
3010
|
-
var PostPurchaseFinishReasonSchema =
|
|
3088
|
+
var PostPurchaseFinishReasonSchema = z49.enum([
|
|
3011
3089
|
"continue",
|
|
3012
3090
|
"decline-all",
|
|
3013
3091
|
"end",
|
|
@@ -3025,27 +3103,27 @@ var SessionFinishRequestSchema = DecideRequestSchema.extend({
|
|
|
3025
3103
|
message: 'endReason is only valid with reason "end"',
|
|
3026
3104
|
path: ["endReason"]
|
|
3027
3105
|
});
|
|
3028
|
-
var SessionFinishResponseSchema =
|
|
3106
|
+
var SessionFinishResponseSchema = z49.object({
|
|
3029
3107
|
data: SessionClosureSchema.extend({
|
|
3030
3108
|
classification: ClassificationProgressSchema,
|
|
3031
3109
|
exitPolicy: ExitPolicySchema,
|
|
3032
3110
|
health: RequiredHealthSchema.nullable(),
|
|
3033
3111
|
purchase: FinishedPurchaseSchema
|
|
3034
3112
|
}),
|
|
3035
|
-
successful:
|
|
3113
|
+
successful: z49.literal(true)
|
|
3036
3114
|
});
|
|
3037
3115
|
|
|
3038
3116
|
// src/schema/postPurchaseQuantity.ts
|
|
3039
|
-
import { z as
|
|
3117
|
+
import { z as z73 } from "zod";
|
|
3040
3118
|
|
|
3041
3119
|
// src/schema/postPurchaseProductCollectionView.ts
|
|
3042
|
-
import { z as
|
|
3120
|
+
import { z as z72 } from "zod";
|
|
3043
3121
|
|
|
3044
3122
|
// src/schema/postPurchaseProductView.ts
|
|
3045
|
-
import { z as
|
|
3123
|
+
import { z as z71 } from "zod";
|
|
3046
3124
|
|
|
3047
3125
|
// src/schema/postPurchaseGroupCatalog.ts
|
|
3048
|
-
import { z as
|
|
3126
|
+
import { z as z50 } from "zod";
|
|
3049
3127
|
var productId = PreparedPostPurchaseProduct.shape.selection.shape.productId;
|
|
3050
3128
|
var source = PostPurchaseProductSource.shape.data.element;
|
|
3051
3129
|
var PostPurchaseGroupDescription = source.pick({ description: true, id: true, image: true, images: true, title: true }).extend({
|
|
@@ -3053,17 +3131,17 @@ var PostPurchaseGroupDescription = source.pick({ description: true, id: true, im
|
|
|
3053
3131
|
image: source.shape.image.default(null),
|
|
3054
3132
|
options: PostPurchaseVariantCatalog.shape.options.default([])
|
|
3055
3133
|
});
|
|
3056
|
-
var PostPurchaseGroupCatalog =
|
|
3134
|
+
var PostPurchaseGroupCatalog = z50.object({
|
|
3057
3135
|
memberProductId: productId,
|
|
3058
|
-
options:
|
|
3136
|
+
options: z50.array(z50.object({ productId, title: z50.string(), variantCatalog: PostPurchaseVariantCatalog }))
|
|
3059
3137
|
});
|
|
3060
|
-
var PostPurchaseGroupSelection =
|
|
3138
|
+
var PostPurchaseGroupSelection = z50.object({
|
|
3061
3139
|
memberProductId: productId,
|
|
3062
3140
|
productId
|
|
3063
3141
|
});
|
|
3064
3142
|
|
|
3065
3143
|
// src/schema/widgets/checkout-and-beyond/root.ts
|
|
3066
|
-
import { z as
|
|
3144
|
+
import { z as z70 } from "zod";
|
|
3067
3145
|
|
|
3068
3146
|
// src/schema/widgets/checkout-and-beyond/constants.ts
|
|
3069
3147
|
import { uniqBy } from "es-toolkit";
|
|
@@ -3118,18 +3196,18 @@ var targetAreas = {
|
|
|
3118
3196
|
|
|
3119
3197
|
// src/schema/widgets/checkout-and-beyond/layout.ts
|
|
3120
3198
|
import { v7 as uuidv713 } from "uuid";
|
|
3121
|
-
import { z as
|
|
3199
|
+
import { z as z69 } from "zod";
|
|
3122
3200
|
|
|
3123
3201
|
// src/schema/widgets/checkout-and-beyond/shared.ts
|
|
3124
|
-
import { z as
|
|
3202
|
+
import { z as z68 } from "zod";
|
|
3125
3203
|
|
|
3126
3204
|
// src/schema/widgets/checkout-and-beyond/banner.ts
|
|
3127
|
-
import { z as
|
|
3128
|
-
var CABBannerSection =
|
|
3205
|
+
import { z as z51 } from "zod";
|
|
3206
|
+
var CABBannerSection = z51.lazy(
|
|
3129
3207
|
() => CABLayoutSection.omit({ sectionType: true }).extend({
|
|
3130
|
-
buttonField:
|
|
3131
|
-
color:
|
|
3132
|
-
dismissible:
|
|
3208
|
+
buttonField: z51.enum(buttonFields).optional(),
|
|
3209
|
+
color: z51.enum(bannerColors).default("info"),
|
|
3210
|
+
dismissible: z51.boolean().default(true),
|
|
3133
3211
|
/**
|
|
3134
3212
|
* The `s-banner` heading — localized content (a buyer can see a merchant-composed banner). Absent OR
|
|
3135
3213
|
* blank ⇒ no heading; the renderer emits no heading slot for `''` rather than an empty one.
|
|
@@ -3145,18 +3223,18 @@ var CABBannerSection = z49.lazy(
|
|
|
3145
3223
|
* not a 500. Nothing emits `heading` yet; the first converter that maps merchant banner copy into it
|
|
3146
3224
|
* either strips first or teaches `normalizeTextContent` to strip this field.
|
|
3147
3225
|
*/
|
|
3148
|
-
heading:
|
|
3149
|
-
sectionType:
|
|
3226
|
+
heading: z51.record(z51.string(), z51.string().refine(checkForHTML, NO_HTML)).optional(),
|
|
3227
|
+
sectionType: z51.literal(SectionType.banner).default(SectionType.banner)
|
|
3150
3228
|
})
|
|
3151
3229
|
);
|
|
3152
3230
|
|
|
3153
3231
|
// src/schema/widgets/checkout-and-beyond/button.ts
|
|
3154
3232
|
import { v7 as uuidv73 } from "uuid";
|
|
3155
|
-
import { z as
|
|
3233
|
+
import { z as z54 } from "zod";
|
|
3156
3234
|
|
|
3157
3235
|
// src/schema/widgets/checkout-and-beyond/image.ts
|
|
3158
3236
|
import { v7 as uuidv72 } from "uuid";
|
|
3159
|
-
import { z as
|
|
3237
|
+
import { z as z53 } from "zod";
|
|
3160
3238
|
|
|
3161
3239
|
// src/schema/widgets/checkout-and-beyond/icons.ts
|
|
3162
3240
|
var iconNames = [
|
|
@@ -3243,24 +3321,24 @@ var iconTones = ["auto", "critical", "custom", "info", "neutral", "success", "wa
|
|
|
3243
3321
|
var IconTone = freezeEnum(iconTones);
|
|
3244
3322
|
|
|
3245
3323
|
// src/schema/widgets/checkout-and-beyond/imageThumbnails.ts
|
|
3246
|
-
import { z as
|
|
3247
|
-
var CABImageThumbnails =
|
|
3248
|
-
limit:
|
|
3249
|
-
perLine:
|
|
3324
|
+
import { z as z52 } from "zod";
|
|
3325
|
+
var CABImageThumbnails = z52.object({
|
|
3326
|
+
limit: z52.number().int().min(1).default(8),
|
|
3327
|
+
perLine: z52.number().int().min(1).max(8).default(4)
|
|
3250
3328
|
});
|
|
3251
3329
|
|
|
3252
3330
|
// src/schema/widgets/checkout-and-beyond/image.ts
|
|
3253
|
-
var CABImageSectionFields =
|
|
3331
|
+
var CABImageSectionFields = z53.object({
|
|
3254
3332
|
...CABVariableFields,
|
|
3255
|
-
altText:
|
|
3333
|
+
altText: z53.string().refine(checkForHTML, NO_HTML).default(""),
|
|
3256
3334
|
/**
|
|
3257
3335
|
* Image width÷height (e.g. `46` for the progress-bar fill); `null` renders at natural size. Any POSITIVE
|
|
3258
3336
|
* ratio — never limited to 1, but never `0`/negative either: a renderer dividing by it would get `Infinity`,
|
|
3259
3337
|
* and CSS `aspect-ratio` drops a negative value and silently reverts to natural size.
|
|
3260
3338
|
*/
|
|
3261
|
-
aspectRatio:
|
|
3262
|
-
border:
|
|
3263
|
-
buttonField:
|
|
3339
|
+
aspectRatio: z53.number().positive().nullable().default(null),
|
|
3340
|
+
border: z53.lazy(() => CABBorder),
|
|
3341
|
+
buttonField: z53.enum(buttonFields).optional(),
|
|
3264
3342
|
/**
|
|
3265
3343
|
* `icon` renders `source` as a single `s-icon` by name (the uber-image path covers icons too), reading
|
|
3266
3344
|
* `iconSize`/`iconTone`. The other values are a harmless informational holdover from the previous
|
|
@@ -3279,30 +3357,30 @@ var CABImageSectionFields = z51.object({
|
|
|
3279
3357
|
* behavior degraded gracefully and told us about it. The client-assembled half of the invariant was never
|
|
3280
3358
|
* the risky half.
|
|
3281
3359
|
*/
|
|
3282
|
-
category:
|
|
3360
|
+
category: z53.enum(["gallery", "icon", "icons", "payment-methods", "secure-checkout"]).nullable().default(null),
|
|
3283
3361
|
/** `icon`-mode only: the `s-icon` `size`; `null` ⇒ the component default (`base`). Ignored by image treatments. */
|
|
3284
|
-
iconSize:
|
|
3362
|
+
iconSize: z53.enum(iconSizes).nullable().default(null),
|
|
3285
3363
|
/** `icon`-mode only: the `s-icon` `tone`; `null` ⇒ the component default (`auto`). Ignored by image treatments. */
|
|
3286
|
-
iconTone:
|
|
3287
|
-
name:
|
|
3288
|
-
naturalHeight:
|
|
3289
|
-
naturalWidth:
|
|
3364
|
+
iconTone: z53.enum(iconTones).nullable().default(null),
|
|
3365
|
+
name: z53.string().optional(),
|
|
3366
|
+
naturalHeight: z53.number().default(0),
|
|
3367
|
+
naturalWidth: z53.number().default(0),
|
|
3290
3368
|
/**
|
|
3291
3369
|
* `contain` (the component default): dimensionless images render in s-image's 1/1 default frame, and
|
|
3292
3370
|
* `cover` would crop non-square art (payment badges lost their edges — 15993); `contain` letterboxes.
|
|
3293
3371
|
*/
|
|
3294
|
-
objectFit:
|
|
3295
|
-
sectionId:
|
|
3296
|
-
sectionType:
|
|
3372
|
+
objectFit: z53.enum(objectFits).default(ObjectFit.contain),
|
|
3373
|
+
sectionId: z53.uuid().default(() => uuidv72()),
|
|
3374
|
+
sectionType: z53.literal(SectionType.image).default(SectionType.image),
|
|
3297
3375
|
/**
|
|
3298
3376
|
* An image URL or dynamic token, an empty default, or — when `category: 'icon'` — an icon NAME. Icon mode
|
|
3299
3377
|
* takes a name or `''` only, NOT a token: no renderer resolves a token to an icon today, so accepting one
|
|
3300
3378
|
* would promise a capability that doesn't exist. Widen the refine's carve-out to `DYNAMIC_TOKEN_REGEX` when a
|
|
3301
3379
|
* server-chosen tier icon actually needs it.
|
|
3302
3380
|
*/
|
|
3303
|
-
source:
|
|
3381
|
+
source: z53.union([z53.url(), z53.literal(""), z53.string().regex(DYNAMIC_TOKEN_REGEX), z53.enum(iconNames)]).default(""),
|
|
3304
3382
|
thumbnails: CABImageThumbnails.optional(),
|
|
3305
|
-
width:
|
|
3383
|
+
width: z53.number().default(100)
|
|
3306
3384
|
});
|
|
3307
3385
|
var iconNameSet = new Set(iconNames);
|
|
3308
3386
|
var isIconName = (source2) => iconNameSet.has(source2);
|
|
@@ -3322,42 +3400,42 @@ var CABImageSection = CABImageSectionFields.superRefine(({ category, source: sou
|
|
|
3322
3400
|
});
|
|
3323
3401
|
|
|
3324
3402
|
// src/schema/widgets/checkout-and-beyond/button.ts
|
|
3325
|
-
var CABButtonContent =
|
|
3326
|
-
() =>
|
|
3403
|
+
var CABButtonContent = z54.lazy(
|
|
3404
|
+
() => z54.discriminatedUnion("sectionType", [CABImageSection, CABLayoutSection, CABTextSection])
|
|
3327
3405
|
);
|
|
3328
|
-
var CABButtonSection =
|
|
3406
|
+
var CABButtonSection = z54.object({
|
|
3329
3407
|
...CABVariableFields,
|
|
3330
|
-
action:
|
|
3331
|
-
buttonStyle:
|
|
3332
|
-
custom:
|
|
3333
|
-
color:
|
|
3334
|
-
height:
|
|
3335
|
-
width:
|
|
3408
|
+
action: z54.union([z54.literal(""), z54.enum(buttonActions)]).default(""),
|
|
3409
|
+
buttonStyle: z54.enum(buttonStyles).default(ButtonStyle.primary),
|
|
3410
|
+
custom: z54.object({
|
|
3411
|
+
color: z54.string().regex(HEX_COLOR_REGEX).default("#005bd3"),
|
|
3412
|
+
height: z54.number().default(52),
|
|
3413
|
+
width: z54.number().default(300)
|
|
3336
3414
|
}).default({
|
|
3337
3415
|
color: "#005bd3",
|
|
3338
3416
|
height: 52,
|
|
3339
3417
|
width: 300
|
|
3340
3418
|
}),
|
|
3341
|
-
disableDowngrade:
|
|
3419
|
+
disableDowngrade: z54.boolean().default(false),
|
|
3342
3420
|
/**
|
|
3343
3421
|
* What labels a `switchToSubscription` button's frequency options. `planName` shows the selling plan's
|
|
3344
3422
|
* own name (legacy post-purchase, L115) and falls back to the `subscriptionOption` template for a plan
|
|
3345
3423
|
* without one; absent or `template` is the template alone (the checkout card). Optional and additive
|
|
3346
3424
|
* (REB-24846); an unknown value reads as absent.
|
|
3347
3425
|
*/
|
|
3348
|
-
frequencyLabel:
|
|
3349
|
-
name:
|
|
3350
|
-
optionId:
|
|
3351
|
-
popover:
|
|
3352
|
-
alignment:
|
|
3353
|
-
position:
|
|
3426
|
+
frequencyLabel: z54.enum(["planName", "template"]).optional().catch(void 0),
|
|
3427
|
+
name: z54.string().optional(),
|
|
3428
|
+
optionId: z54.number().optional(),
|
|
3429
|
+
popover: z54.object({
|
|
3430
|
+
alignment: z54.enum(textAlignments).default(TextAlignment.center),
|
|
3431
|
+
position: z54.enum(popoverPositions).default(PopoverPosition.blockStart)
|
|
3354
3432
|
}).optional().default(() => ({
|
|
3355
3433
|
alignment: TextAlignment.center,
|
|
3356
3434
|
position: PopoverPosition.blockStart
|
|
3357
3435
|
})),
|
|
3358
|
-
sectionId:
|
|
3359
|
-
sections:
|
|
3360
|
-
sectionType:
|
|
3436
|
+
sectionId: z54.uuid().default(() => uuidv73()),
|
|
3437
|
+
sections: z54.union([z54.array(CABButtonContent), z54.strictObject({}).transform(() => [])]).default(() => []),
|
|
3438
|
+
sectionType: z54.literal(SectionType.button).default(SectionType.button),
|
|
3361
3439
|
/**
|
|
3362
3440
|
* The smart-cart tier this button acts on (`addGift`/`removeGift`): scopes the click to one tier's gift. The
|
|
3363
3441
|
* client resolves the tier's gift (productId) from the progress-bar context by this `tierId` — the button node
|
|
@@ -3372,96 +3450,96 @@ var CABButtonSection = z52.object({
|
|
|
3372
3450
|
* lookup finds no tier and the click resolves to nothing. Safe to bound — the field is new, so there are no
|
|
3373
3451
|
* stored payloads to grandfather, and the producer is client code, not a merchant form.
|
|
3374
3452
|
*/
|
|
3375
|
-
tier:
|
|
3453
|
+
tier: z54.object({ tierId: z54.string().min(1) }).optional(),
|
|
3376
3454
|
/** Fire-and-forget pixel POSTed when the button is clicked (e.g. a Monetize decline). */
|
|
3377
|
-
trackingUrl:
|
|
3455
|
+
trackingUrl: z54.string().optional(),
|
|
3378
3456
|
/**
|
|
3379
3457
|
* Secondary effects applied to in-scope variables on click, alongside (never instead of) the primary
|
|
3380
3458
|
* `action` — an `addToOrder` button can also flip a variable. Applied in array order.
|
|
3381
3459
|
*/
|
|
3382
|
-
variableEffects:
|
|
3460
|
+
variableEffects: z54.array(CABVariableEffect).optional()
|
|
3383
3461
|
});
|
|
3384
3462
|
|
|
3385
3463
|
// src/schema/widgets/checkout-and-beyond/carousel.ts
|
|
3386
|
-
import { z as
|
|
3464
|
+
import { z as z59 } from "zod";
|
|
3387
3465
|
|
|
3388
3466
|
// src/schema/widgets/checkout-and-beyond/offers.ts
|
|
3389
|
-
import { z as
|
|
3467
|
+
import { z as z58 } from "zod";
|
|
3390
3468
|
|
|
3391
3469
|
// src/schema/widgets/checkout-and-beyond/dataSource.ts
|
|
3392
3470
|
import { v7 as uuidv74 } from "uuid";
|
|
3393
|
-
import { z as
|
|
3394
|
-
var CABDiscount =
|
|
3395
|
-
amount:
|
|
3396
|
-
discountedBy:
|
|
3397
|
-
discountedFrom:
|
|
3398
|
-
type:
|
|
3399
|
-
});
|
|
3400
|
-
var CABIntegrations =
|
|
3401
|
-
judgeme:
|
|
3402
|
-
junip:
|
|
3403
|
-
klaviyo:
|
|
3404
|
-
loox:
|
|
3405
|
-
okendo:
|
|
3406
|
-
opinew:
|
|
3407
|
-
reviewsio:
|
|
3408
|
-
stamped:
|
|
3409
|
-
yotpo:
|
|
3410
|
-
});
|
|
3411
|
-
var CABVariantLabels =
|
|
3412
|
-
variantOption:
|
|
3413
|
-
variantOptions:
|
|
3414
|
-
});
|
|
3415
|
-
var CABDataSourceSection =
|
|
3416
|
-
dataSourceId:
|
|
3417
|
-
dataSourcePath:
|
|
3471
|
+
import { z as z55 } from "zod";
|
|
3472
|
+
var CABDiscount = z55.object({
|
|
3473
|
+
amount: z55.union([z55.number(), z55.string()]).catch(0),
|
|
3474
|
+
discountedBy: z55.string().optional(),
|
|
3475
|
+
discountedFrom: z55.enum(discountSources).optional().catch(void 0),
|
|
3476
|
+
type: z55.enum(discountTypes).catch("none")
|
|
3477
|
+
});
|
|
3478
|
+
var CABIntegrations = z55.object({
|
|
3479
|
+
judgeme: z55.boolean().default(false),
|
|
3480
|
+
junip: z55.boolean().default(false),
|
|
3481
|
+
klaviyo: z55.boolean().default(false),
|
|
3482
|
+
loox: z55.boolean().default(false),
|
|
3483
|
+
okendo: z55.boolean().default(false),
|
|
3484
|
+
opinew: z55.boolean().default(false),
|
|
3485
|
+
reviewsio: z55.boolean().default(false),
|
|
3486
|
+
stamped: z55.boolean().default(false),
|
|
3487
|
+
yotpo: z55.boolean().default(false)
|
|
3488
|
+
});
|
|
3489
|
+
var CABVariantLabels = z55.object({
|
|
3490
|
+
variantOption: z55.string().optional().catch(void 0),
|
|
3491
|
+
variantOptions: z55.string().optional().catch(void 0)
|
|
3492
|
+
});
|
|
3493
|
+
var CABDataSourceSection = z55.object({
|
|
3494
|
+
dataSourceId: z55.number().nullable().default(null),
|
|
3495
|
+
dataSourcePath: z55.string().default(DEFAULT_ENDPOINTS[0].value),
|
|
3418
3496
|
discount: CABDiscount.optional(),
|
|
3419
3497
|
integrations: CABIntegrations.optional(),
|
|
3420
|
-
limit:
|
|
3421
|
-
matchVariant:
|
|
3422
|
-
matchVariantOutOfStock:
|
|
3423
|
-
name:
|
|
3424
|
-
productType:
|
|
3425
|
-
sectionId:
|
|
3426
|
-
sectionType:
|
|
3498
|
+
limit: z55.number().default(1),
|
|
3499
|
+
matchVariant: z55.boolean().default(false),
|
|
3500
|
+
matchVariantOutOfStock: z55.boolean().default(false),
|
|
3501
|
+
name: z55.string().default(DEFAULT_ENDPOINTS[0].label),
|
|
3502
|
+
productType: z55.enum(productTypes).optional(),
|
|
3503
|
+
sectionId: z55.uuid().default(() => uuidv74()),
|
|
3504
|
+
sectionType: z55.literal(SectionType.dataSource).default(SectionType.dataSource),
|
|
3427
3505
|
/** Default subscribe-vs-one-time for `productType: both` (legacy `subscription_is_default`). */
|
|
3428
|
-
subscriptionIsDefault:
|
|
3429
|
-
treatAsGwp:
|
|
3506
|
+
subscriptionIsDefault: z55.boolean().default(false),
|
|
3507
|
+
treatAsGwp: z55.boolean().default(false),
|
|
3430
3508
|
variantLabels: CABVariantLabels.optional().catch(void 0)
|
|
3431
3509
|
});
|
|
3432
3510
|
|
|
3433
3511
|
// src/schema/widgets/checkout-and-beyond/products.ts
|
|
3434
3512
|
import { v7 as uuidv76 } from "uuid";
|
|
3435
|
-
import { z as
|
|
3513
|
+
import { z as z57 } from "zod";
|
|
3436
3514
|
|
|
3437
3515
|
// src/schema/widgets/checkout-and-beyond/product.ts
|
|
3438
3516
|
import { v7 as uuidv75 } from "uuid";
|
|
3439
|
-
import { z as
|
|
3440
|
-
var CABVariantContent =
|
|
3441
|
-
() =>
|
|
3517
|
+
import { z as z56 } from "zod";
|
|
3518
|
+
var CABVariantContent = z56.lazy(
|
|
3519
|
+
() => z56.discriminatedUnion("sectionType", [CABButtonSection, CABTextSection])
|
|
3442
3520
|
);
|
|
3443
|
-
var CABProductSection =
|
|
3521
|
+
var CABProductSection = z56.object({
|
|
3444
3522
|
...CABVariableFields,
|
|
3445
|
-
name:
|
|
3446
|
-
productId:
|
|
3447
|
-
sectionId:
|
|
3448
|
-
sections:
|
|
3449
|
-
sectionType:
|
|
3450
|
-
selectors:
|
|
3451
|
-
variantMode:
|
|
3523
|
+
name: z56.string().optional(),
|
|
3524
|
+
productId: z56.number().nullable().default(null),
|
|
3525
|
+
sectionId: z56.uuid().default(() => uuidv75()),
|
|
3526
|
+
sections: z56.union([z56.array(CABVariantContent), z56.strictObject({}).transform(() => [])]).default(() => []),
|
|
3527
|
+
sectionType: z56.literal(SectionType.product).default(SectionType.product),
|
|
3528
|
+
selectors: z56.record(z56.string(), z56.enum(variantSelectors).default(VariantSelector.menu)).default(() => ({})),
|
|
3529
|
+
variantMode: z56.enum(variantModes).default(VariantMode.multiple)
|
|
3452
3530
|
});
|
|
3453
3531
|
|
|
3454
3532
|
// src/schema/widgets/checkout-and-beyond/products.ts
|
|
3455
|
-
var CABProductsSection =
|
|
3533
|
+
var CABProductsSection = z57.object({
|
|
3456
3534
|
...CABVariableFields,
|
|
3457
|
-
name:
|
|
3458
|
-
sectionId:
|
|
3459
|
-
sections:
|
|
3460
|
-
sectionType:
|
|
3535
|
+
name: z57.string().optional(),
|
|
3536
|
+
sectionId: z57.uuid().default(() => uuidv76()),
|
|
3537
|
+
sections: z57.union([z57.array(z57.lazy(() => CABProductSection)), z57.strictObject({}).transform(() => [])]).default(() => []),
|
|
3538
|
+
sectionType: z57.literal(SectionType.products).default(SectionType.products)
|
|
3461
3539
|
});
|
|
3462
3540
|
|
|
3463
3541
|
// src/schema/widgets/checkout-and-beyond/offers.ts
|
|
3464
|
-
var CABOffersSection =
|
|
3542
|
+
var CABOffersSection = z58.lazy(
|
|
3465
3543
|
() => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
|
|
3466
3544
|
/**
|
|
3467
3545
|
* A rule between consecutive cards in the vertical list — legacy checkout-offers' `<Divider />`,
|
|
@@ -3469,8 +3547,8 @@ var CABOffersSection = z56.lazy(
|
|
|
3469
3547
|
* run of products). Optional, not defaulted: only the v1 converter sets it (REB-24265); a
|
|
3470
3548
|
* hand-built tree keeps React CAB's dividerless rendering.
|
|
3471
3549
|
*/
|
|
3472
|
-
divider:
|
|
3473
|
-
sections:
|
|
3550
|
+
divider: z58.boolean().optional(),
|
|
3551
|
+
sections: z58.union([z58.array(z58.lazy(() => CABSection)), z58.strictObject({}).transform(() => [])]).default(() => [
|
|
3474
3552
|
CABBannerSection.parse({
|
|
3475
3553
|
buttonField: "undoAddToOrder",
|
|
3476
3554
|
color: "success",
|
|
@@ -3484,77 +3562,77 @@ var CABOffersSection = z56.lazy(
|
|
|
3484
3562
|
CABDataSourceSection.parse({}),
|
|
3485
3563
|
CABProductsSection.parse({})
|
|
3486
3564
|
]),
|
|
3487
|
-
sectionType:
|
|
3565
|
+
sectionType: z58.literal(SectionType.offers).default(SectionType.offers)
|
|
3488
3566
|
})
|
|
3489
3567
|
);
|
|
3490
3568
|
|
|
3491
3569
|
// src/schema/widgets/checkout-and-beyond/carousel.ts
|
|
3492
|
-
var CABCarouselSection =
|
|
3570
|
+
var CABCarouselSection = z59.lazy(
|
|
3493
3571
|
() => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
|
|
3494
|
-
autoAdvanceInterval:
|
|
3495
|
-
itemsAtOnce:
|
|
3572
|
+
autoAdvanceInterval: z59.number().default(0),
|
|
3573
|
+
itemsAtOnce: z59.number().min(1).default(1),
|
|
3496
3574
|
/** Card arrangement for the offers child (`horizontal` = side-by-side) — NOT the carousel's own `direction`. */
|
|
3497
|
-
offersDirection:
|
|
3498
|
-
sections:
|
|
3499
|
-
sectionType:
|
|
3575
|
+
offersDirection: z59.enum(offersDirections).default("vertical"),
|
|
3576
|
+
sections: z59.union([z59.array(z59.lazy(() => CABSection)), z59.strictObject({}).transform(() => [])]).default(() => [CABOffersSection.parse({})]),
|
|
3577
|
+
sectionType: z59.literal(SectionType.carousel).default(SectionType.carousel)
|
|
3500
3578
|
})
|
|
3501
3579
|
);
|
|
3502
3580
|
|
|
3503
3581
|
// src/schema/widgets/checkout-and-beyond/cartLine.ts
|
|
3504
|
-
import { z as
|
|
3505
|
-
var CABCartLineSection =
|
|
3582
|
+
import { z as z60 } from "zod";
|
|
3583
|
+
var CABCartLineSection = z60.lazy(
|
|
3506
3584
|
() => CABLayoutSection.omit({ sections: true, sectionType: true }).extend({
|
|
3507
|
-
sections:
|
|
3508
|
-
sectionType:
|
|
3585
|
+
sections: z60.union([z60.array(z60.lazy(() => CABSection)), z60.strictObject({}).transform(() => [])]).default(() => [CABButtonSection.parse({ action: ButtonAction.switchToSubscription })]),
|
|
3586
|
+
sectionType: z60.literal(SectionType.cartLine).default(SectionType.cartLine)
|
|
3509
3587
|
})
|
|
3510
3588
|
);
|
|
3511
3589
|
|
|
3512
3590
|
// src/schema/widgets/checkout-and-beyond/discount.ts
|
|
3513
3591
|
import { v7 as uuidv77 } from "uuid";
|
|
3514
|
-
import { z as
|
|
3515
|
-
var CABDiscountSection =
|
|
3592
|
+
import { z as z61 } from "zod";
|
|
3593
|
+
var CABDiscountSection = z61.object({
|
|
3516
3594
|
...CABVariableFields,
|
|
3517
|
-
amount:
|
|
3518
|
-
discountedBy:
|
|
3519
|
-
discountedFrom:
|
|
3520
|
-
message:
|
|
3521
|
-
name:
|
|
3522
|
-
quantity:
|
|
3523
|
-
sectionId:
|
|
3524
|
-
sectionType:
|
|
3525
|
-
type:
|
|
3595
|
+
amount: z61.union([z61.number(), z61.string()]).catch(0),
|
|
3596
|
+
discountedBy: z61.string().optional(),
|
|
3597
|
+
discountedFrom: z61.enum(discountSources).optional().catch(void 0),
|
|
3598
|
+
message: z61.string().optional(),
|
|
3599
|
+
name: z61.string().optional(),
|
|
3600
|
+
quantity: z61.number().default(1),
|
|
3601
|
+
sectionId: z61.uuid().default(() => uuidv77()),
|
|
3602
|
+
sectionType: z61.literal(SectionType.discount).default(SectionType.discount),
|
|
3603
|
+
type: z61.enum(discountTypes).catch("none")
|
|
3526
3604
|
});
|
|
3527
3605
|
|
|
3528
3606
|
// src/schema/widgets/checkout-and-beyond/monetize.ts
|
|
3529
3607
|
import { v7 as uuidv78 } from "uuid";
|
|
3530
|
-
import { z as
|
|
3531
|
-
var CABMonetizeAds =
|
|
3532
|
-
requestId:
|
|
3608
|
+
import { z as z62 } from "zod";
|
|
3609
|
+
var CABMonetizeAds = z62.object({
|
|
3610
|
+
requestId: z62.string().optional(),
|
|
3533
3611
|
/** Defaulted here, never in the beacon: absence of information is `ads` itself being absent. */
|
|
3534
|
-
testing:
|
|
3612
|
+
testing: z62.boolean().default(false)
|
|
3535
3613
|
});
|
|
3536
|
-
var CABMonetizeSection =
|
|
3614
|
+
var CABMonetizeSection = z62.object({
|
|
3537
3615
|
...CABVariableFields,
|
|
3538
3616
|
ads: CABMonetizeAds.optional(),
|
|
3539
|
-
name:
|
|
3617
|
+
name: z62.string().optional(),
|
|
3540
3618
|
/**
|
|
3541
3619
|
* Server-hydrated offer cards (inline hydration): when `/cab/sections` was asked with a `monetize`
|
|
3542
3620
|
* context block, the composed cards ride the marker itself — `[]` means "hydrated, no fill" (render
|
|
3543
3621
|
* nothing, skip the fetch); ABSENT means "not hydrated" (the client fetches via `/cab/monetize`).
|
|
3544
3622
|
*/
|
|
3545
|
-
offers:
|
|
3623
|
+
offers: z62.array(z62.lazy(() => CABSection)).optional(),
|
|
3546
3624
|
/** Privacy Policy footer href (the widget's `privacy_policy_url` setting); read server-side for hydration, relayed by the client only on the legacy `/cab/monetize` fallback. */
|
|
3547
|
-
privacyPolicyUrl:
|
|
3548
|
-
sectionId:
|
|
3549
|
-
sectionType:
|
|
3625
|
+
privacyPolicyUrl: z62.string().optional(),
|
|
3626
|
+
sectionId: z62.uuid().default(() => uuidv78()),
|
|
3627
|
+
sectionType: z62.literal(SectionType.monetize).default(SectionType.monetize),
|
|
3550
3628
|
/** Ads-taxonomy sub-vertical id (the widget's `sub_vertical` setting); paired with `vertical`. */
|
|
3551
|
-
subVertical:
|
|
3629
|
+
subVertical: z62.string().optional(),
|
|
3552
3630
|
/** Ads-taxonomy vertical id (the widget's `vertical` setting) — with `subVertical`, the admin Monetize editor's two configurables. */
|
|
3553
|
-
vertical:
|
|
3631
|
+
vertical: z62.string().optional()
|
|
3554
3632
|
});
|
|
3555
3633
|
|
|
3556
3634
|
// src/schema/widgets/checkout-and-beyond/progressBar.ts
|
|
3557
|
-
import { z as
|
|
3635
|
+
import { z as z63 } from "zod";
|
|
3558
3636
|
|
|
3559
3637
|
// src/schema/widgets/checkout-and-beyond/giftLabels.ts
|
|
3560
3638
|
var GIFT_LABELS = {
|
|
@@ -3673,44 +3751,44 @@ var GIFT_LABELS = {
|
|
|
3673
3751
|
};
|
|
3674
3752
|
|
|
3675
3753
|
// src/schema/widgets/checkout-and-beyond/progressBar.ts
|
|
3676
|
-
var CABProgressTierExclusion =
|
|
3677
|
-
collectionIds:
|
|
3754
|
+
var CABProgressTierExclusion = z63.object({
|
|
3755
|
+
collectionIds: z63.array(z63.number().int().positive()).default(() => []),
|
|
3678
3756
|
/**
|
|
3679
3757
|
* `products` rules: each excluded product with ITS OWN variants, mirroring the bar-level
|
|
3680
3758
|
* excluded products. An empty `variantIds` means "the whole product", which is how the admin
|
|
3681
3759
|
* picker stores a whole-product selection, and a populated one means those variants.
|
|
3682
3760
|
*/
|
|
3683
|
-
products:
|
|
3684
|
-
|
|
3685
|
-
productId:
|
|
3686
|
-
variantIds:
|
|
3761
|
+
products: z63.array(
|
|
3762
|
+
z63.object({
|
|
3763
|
+
productId: z63.number().int().positive(),
|
|
3764
|
+
variantIds: z63.array(z63.number().int().positive()).default(() => [])
|
|
3687
3765
|
})
|
|
3688
3766
|
).default(() => []),
|
|
3689
|
-
tags:
|
|
3690
|
-
type:
|
|
3767
|
+
tags: z63.array(z63.string().min(1)).default(() => []),
|
|
3768
|
+
type: z63.enum(progressTierExclusionTypes)
|
|
3691
3769
|
});
|
|
3692
|
-
var CABProgressTier =
|
|
3770
|
+
var CABProgressTier = z63.object({
|
|
3693
3771
|
/**
|
|
3694
3772
|
* Order-discount tiers only (onsite `discount`): the reward the order-discount Function applies at
|
|
3695
3773
|
* cart time, carried so the client can resolve the `{{discountAmount}}` token in this tier's copy.
|
|
3696
3774
|
* `fixedAmount`: shop-currency CENTS (FX-scaled by the client, like {@link CABProgressTier.threshold});
|
|
3697
3775
|
* `percentage`: the whole-percent number rendered raw (`{n}%`). Absent on non-discount tiers.
|
|
3698
3776
|
*/
|
|
3699
|
-
discount:
|
|
3777
|
+
discount: z63.object({ amount: z63.number().nonnegative(), type: z63.enum(["fixedAmount", "percentage"]) }).optional(),
|
|
3700
3778
|
/**
|
|
3701
3779
|
* Per-tier exclusion rules (onsite `exclusions` when `exclusions_enabled`): lines they match don't count
|
|
3702
3780
|
* toward this tier. Empty (the default, and the converter's output for a disabled or ruleless tier) means
|
|
3703
3781
|
* the tier measures the plain bar-level adjusted progress. Consumers read ONLY the list named by the rule's
|
|
3704
3782
|
* `type` — the converter leaves the other two at `[]`, so a populated off-type list never reaches the tree.
|
|
3705
3783
|
*/
|
|
3706
|
-
exclusions:
|
|
3784
|
+
exclusions: z63.array(CABProgressTierExclusion).default(() => []),
|
|
3707
3785
|
/**
|
|
3708
3786
|
* Smart-cart product (gift) tiers only (onsite `filter_oos_variants`): when set, the client drops this
|
|
3709
3787
|
* tier entirely once its gift has NO in-stock eligible variant — the milestone, fill slot and gift
|
|
3710
3788
|
* controls all disappear, mirroring onsite removing the tier from `bar.tiers` before it renders. Absent
|
|
3711
3789
|
* on shipping/discount/decorative tiers and left off by default (the tier renders regardless of stock).
|
|
3712
3790
|
*/
|
|
3713
|
-
filterOosVariants:
|
|
3791
|
+
filterOosVariants: z63.boolean().default(false),
|
|
3714
3792
|
/**
|
|
3715
3793
|
* Smart-cart product (gift) tiers only: the reward unlocked at this tier. The client enriches
|
|
3716
3794
|
* `productId`/`variantIds` to live variants (availability, price) and adds the chosen one to the cart
|
|
@@ -3718,10 +3796,10 @@ var CABProgressTier = z61.object({
|
|
|
3718
3796
|
* tiers and on tiers with no configured product. Cart add/remove is a later stage; carried here so the
|
|
3719
3797
|
* tree is complete.
|
|
3720
3798
|
*/
|
|
3721
|
-
gift:
|
|
3722
|
-
productId:
|
|
3723
|
-
title:
|
|
3724
|
-
variantIds:
|
|
3799
|
+
gift: z63.object({
|
|
3800
|
+
productId: z63.number().int().positive(),
|
|
3801
|
+
title: z63.string().optional(),
|
|
3802
|
+
variantIds: z63.array(z63.number().int().positive()).default(() => [])
|
|
3725
3803
|
}).optional(),
|
|
3726
3804
|
/**
|
|
3727
3805
|
* The step-row icon's square size in PIXELS (onsite `product_tier_element_size`, an admin px string the
|
|
@@ -3741,7 +3819,7 @@ var CABProgressTier = z61.object({
|
|
|
3741
3819
|
* renderer never spells a fallback), which also makes a tree authored before this field render at
|
|
3742
3820
|
* React's size rather than the old hardcoded 20.
|
|
3743
3821
|
*/
|
|
3744
|
-
iconSizePx:
|
|
3822
|
+
iconSizePx: z63.number().int().min(1).max(64).default(18),
|
|
3745
3823
|
/**
|
|
3746
3824
|
* The step-row label at this tier's slot (onsite `getTierLabel`): the merchant custom label, else the
|
|
3747
3825
|
* type default — 'Free Shipping' or '{n}% Discount'. A PRODUCT tier gets NO converter label: its name is
|
|
@@ -3751,35 +3829,35 @@ var CABProgressTier = z61.object({
|
|
|
3751
3829
|
* turns a blank label into an absent key, and a client-authored blank means the same thing — the renderer
|
|
3752
3830
|
* emits no caption slot rather than an empty one). Plain text — a compact icon+label.
|
|
3753
3831
|
*/
|
|
3754
|
-
label:
|
|
3832
|
+
label: z63.record(z63.string(), z63.string()).optional(),
|
|
3755
3833
|
/**
|
|
3756
3834
|
* Smart-cart product (gift) tiers only (onsite `product_tier_image`): show the gift's product image in
|
|
3757
3835
|
* the step-row slot instead of the generic bag icon. The converter can't supply the image URL (config
|
|
3758
3836
|
* carries only product IDs), so the client resolves it (authoritative Shopify featured image, React
|
|
3759
3837
|
* parity) and falls back to the bag icon when the flag is off or no image resolves. Default false.
|
|
3760
3838
|
*/
|
|
3761
|
-
productTierImage:
|
|
3839
|
+
productTierImage: z63.boolean().default(false),
|
|
3762
3840
|
/**
|
|
3763
3841
|
* The tier's goal, measured per `unit`. `currency` (default): SHOP-currency cents — the canonical
|
|
3764
3842
|
* fallback: when the buyer's presentment currency has no entry in `thresholds`, the client
|
|
3765
3843
|
* multiplies this by the live FX rate (converter maps the v1 `unlock_price`, e.g. `75` → `7500`).
|
|
3766
3844
|
* `item`: a raw item count — no cents, no FX, no `thresholds` overrides.
|
|
3767
3845
|
*/
|
|
3768
|
-
threshold:
|
|
3846
|
+
threshold: z63.number().int().nonnegative(),
|
|
3769
3847
|
/**
|
|
3770
3848
|
* Per-presentment-currency goal overrides — lowercased ISO currency code → cents (e.g. `{ cad: 9900 }`).
|
|
3771
3849
|
* When the buyer's currency has an entry, the client uses it verbatim INSTEAD of FX-converting
|
|
3772
3850
|
* `threshold`, so merchants show intentional, clean per-market amounts (Shopify Markets) rather than a
|
|
3773
3851
|
* converted base. Defaults to `{}` — no overrides means always fall back to `threshold`.
|
|
3774
3852
|
*/
|
|
3775
|
-
thresholds:
|
|
3853
|
+
thresholds: z63.record(z63.string(), z63.number().int().nonnegative()).default(() => ({})),
|
|
3776
3854
|
/**
|
|
3777
3855
|
* Smart-cart tier identifier, mirrored onto the gift cart line's `_tier` attribute so the client can
|
|
3778
3856
|
* match an in-cart gift back to its tier (add on reach, remove on downgrade/decline). Absent on the
|
|
3779
3857
|
* shipping bar (single unlabeled tier, no gift).
|
|
3780
3858
|
*/
|
|
3781
|
-
tierId:
|
|
3782
|
-
tierType:
|
|
3859
|
+
tierId: z63.string().optional(),
|
|
3860
|
+
tierType: z63.enum(progressTierTypes).default(ProgressTierType.shipping),
|
|
3783
3861
|
/**
|
|
3784
3862
|
* What this tier's progress is measured in — PER TIER (onsite's `unlock_condition_type` model, NOT
|
|
3785
3863
|
* the React port's bar-level `tiers[0]` shortcut). `currency` compares money cents against the
|
|
@@ -3790,9 +3868,9 @@ var CABProgressTier = z61.object({
|
|
|
3790
3868
|
* count carries no injected noun (no English `item`/`items` inflection on localized copy); merchant
|
|
3791
3869
|
* template text supplies grammatically-neutral wording around the token.
|
|
3792
3870
|
*/
|
|
3793
|
-
unit:
|
|
3871
|
+
unit: z63.enum(progressTierUnits).default(ProgressTierUnit.currency)
|
|
3794
3872
|
});
|
|
3795
|
-
var CABProgressBarSection =
|
|
3873
|
+
var CABProgressBarSection = z63.lazy(
|
|
3796
3874
|
() => CABLayoutSection.omit({ sectionType: true }).extend({
|
|
3797
3875
|
/**
|
|
3798
3876
|
* The onsite bar id (smart-cart TPB bars only). The client mirrors it to the cart's `_barId` attribute
|
|
@@ -3801,35 +3879,35 @@ var CABProgressBarSection = z61.lazy(
|
|
|
3801
3879
|
* checkout reaches the extension without it, so the client writes it or the tier gift's 100% discount
|
|
3802
3880
|
* (and any tier order discount) never applies. Absent on the v1 shipping bar (no gift tiers, no id).
|
|
3803
3881
|
*/
|
|
3804
|
-
barId:
|
|
3882
|
+
barId: z63.string().optional(),
|
|
3805
3883
|
/** Empty = shown everywhere; otherwise uppercase ISO country codes. */
|
|
3806
|
-
countryCodes:
|
|
3884
|
+
countryCodes: z63.array(z63.string().transform((code) => code.trim().toUpperCase())).default(() => []),
|
|
3807
3885
|
/**
|
|
3808
3886
|
* Uppercase ISO codes where a higher-precedence geo bar applies, so this (default, non-geo) bar is
|
|
3809
3887
|
* hidden there — replicates React `getbar`'s geo-match-over-default precedence. Empty = never excluded.
|
|
3810
3888
|
*/
|
|
3811
|
-
excludeCountryCodes:
|
|
3889
|
+
excludeCountryCodes: z63.array(z63.string().transform((code) => code.trim().toUpperCase())).default(() => []),
|
|
3812
3890
|
/**
|
|
3813
3891
|
* Measure progress against the PRE-discount subtotal (onsite `exclude_discount_in_subtotal`, and
|
|
3814
3892
|
* forced on for bars with a discount tier so its own reward can't un-reach the tier). The client
|
|
3815
3893
|
* adds the cart's discount allocations back to the live subtotal.
|
|
3816
3894
|
*/
|
|
3817
|
-
excludeDiscountInSubtotal:
|
|
3895
|
+
excludeDiscountInSubtotal: z63.boolean().default(false),
|
|
3818
3896
|
/** Variant ids the client subtracts from the adjusted subtotal (React `bar.excluded_products`). */
|
|
3819
|
-
excludedVariantIds:
|
|
3897
|
+
excludedVariantIds: z63.array(z63.number().int().positive()).default(() => []),
|
|
3820
3898
|
/**
|
|
3821
3899
|
* When the cart holds a subscription item, treat the bar as reached regardless of subtotal (React
|
|
3822
3900
|
* `free_shipping_on_subscription(s)`). `freeShippingOnAll` is already a zero-threshold tier instead.
|
|
3823
3901
|
*/
|
|
3824
|
-
freeShippingOnSubscription:
|
|
3902
|
+
freeShippingOnSubscription: z63.boolean().default(false),
|
|
3825
3903
|
/** Localized heading over the gift controls (onsite `gift_area_title`, default 'FREE GIFTS'). */
|
|
3826
|
-
giftAreaTitle:
|
|
3904
|
+
giftAreaTitle: z63.record(z63.string(), z63.string()).default(() => ({ en: "FREE GIFTS" })),
|
|
3827
3905
|
/** Localized gift-control labels (add/remove/heading); a tier's gift `title` beats `yourGift`. */
|
|
3828
|
-
giftLabels:
|
|
3829
|
-
addGift:
|
|
3830
|
-
remove:
|
|
3831
|
-
selectOptions:
|
|
3832
|
-
yourGift:
|
|
3906
|
+
giftLabels: z63.object({
|
|
3907
|
+
addGift: z63.record(z63.string(), z63.string()).default(() => ({ ...GIFT_LABELS.addGift })),
|
|
3908
|
+
remove: z63.record(z63.string(), z63.string()).default(() => ({ ...GIFT_LABELS.remove })),
|
|
3909
|
+
selectOptions: z63.record(z63.string(), z63.string()).default(() => ({ ...GIFT_LABELS.selectOptions })),
|
|
3910
|
+
yourGift: z63.record(z63.string(), z63.string()).default(() => ({ ...GIFT_LABELS.yourGift }))
|
|
3833
3911
|
}).default(() => ({
|
|
3834
3912
|
addGift: { ...GIFT_LABELS.addGift },
|
|
3835
3913
|
remove: { ...GIFT_LABELS.remove },
|
|
@@ -3837,38 +3915,38 @@ var CABProgressBarSection = z61.lazy(
|
|
|
3837
3915
|
yourGift: { ...GIFT_LABELS.yourGift }
|
|
3838
3916
|
})),
|
|
3839
3917
|
/** The bar's a11y label; the merchant names it in the editor, else this default (React parity). */
|
|
3840
|
-
name:
|
|
3918
|
+
name: z63.string().default("Order progress"),
|
|
3841
3919
|
/**
|
|
3842
3920
|
* Bar fill color. An explicit (widget-authored) value is used verbatim; when absent the server
|
|
3843
3921
|
* fills it with the live shop theme's `buttonBackground` (React `useRebuyTheme` parity). Still
|
|
3844
3922
|
* absent after that ⇒ the theme fetch failed and the client renders its platform-default bar —
|
|
3845
3923
|
* optional, not defaulted, so "merchant chose no color" stays distinguishable from any real value.
|
|
3846
3924
|
*/
|
|
3847
|
-
progressColor:
|
|
3848
|
-
sectionType:
|
|
3925
|
+
progressColor: z63.string().optional(),
|
|
3926
|
+
sectionType: z63.literal(SectionType.progressBar).default(SectionType.progressBar),
|
|
3849
3927
|
/**
|
|
3850
3928
|
* The bar's milestones in the merchant's CONFIGURED order — the renderer does NOT sort them (022
|
|
3851
3929
|
* O-B2: sorting by resolved threshold reversed configured milestones on out-of-order or mixed-unit
|
|
3852
3930
|
* count-vs-cents bars). Drives the fill (even slot per tier) and, for smart-cart product tiers, the
|
|
3853
3931
|
* gift add/remove. The visual tier display lives in `sections` (composable), NOT here.
|
|
3854
3932
|
*/
|
|
3855
|
-
tiers:
|
|
3933
|
+
tiers: z63.union([z63.array(CABProgressTier), z63.strictObject({}).transform(() => [])]).default(() => [])
|
|
3856
3934
|
})
|
|
3857
3935
|
);
|
|
3858
3936
|
|
|
3859
3937
|
// src/schema/widgets/checkout-and-beyond/quantity.ts
|
|
3860
3938
|
import { v7 as uuidv79 } from "uuid";
|
|
3861
|
-
import { z as
|
|
3862
|
-
var CABQuantitySection =
|
|
3939
|
+
import { z as z64 } from "zod";
|
|
3940
|
+
var CABQuantitySection = z64.object({
|
|
3863
3941
|
...CABVariableFields,
|
|
3864
|
-
errorMessages:
|
|
3865
|
-
|
|
3866
|
-
|
|
3942
|
+
errorMessages: z64.record(
|
|
3943
|
+
z64.string(),
|
|
3944
|
+
z64.object({
|
|
3867
3945
|
/** `{{step}}` is interpolated at render — the off-increment message React never gave a merchant key. */
|
|
3868
|
-
increment:
|
|
3869
|
-
max:
|
|
3870
|
-
min:
|
|
3871
|
-
neg:
|
|
3946
|
+
increment: z64.string().optional(),
|
|
3947
|
+
max: z64.string().optional(),
|
|
3948
|
+
min: z64.string().optional(),
|
|
3949
|
+
neg: z64.string().optional()
|
|
3872
3950
|
})
|
|
3873
3951
|
).default({
|
|
3874
3952
|
en: {
|
|
@@ -3878,18 +3956,18 @@ var CABQuantitySection = z62.object({
|
|
|
3878
3956
|
neg: "Quantity cannot be negative"
|
|
3879
3957
|
}
|
|
3880
3958
|
}),
|
|
3881
|
-
inputType:
|
|
3882
|
-
max:
|
|
3883
|
-
min:
|
|
3959
|
+
inputType: z64.enum(quantityInputs).default(QuantityInput.select),
|
|
3960
|
+
max: z64.number().min(1).max(100).default(10),
|
|
3961
|
+
min: z64.number().min(1).default(1),
|
|
3884
3962
|
/** The a11y label for the quantity control; the merchant names it in the editor, else this default. */
|
|
3885
|
-
name:
|
|
3886
|
-
sectionId:
|
|
3887
|
-
sectionType:
|
|
3963
|
+
name: z64.string().default("Quantity"),
|
|
3964
|
+
sectionId: z64.uuid().default(() => uuidv79()),
|
|
3965
|
+
sectionType: z64.literal(SectionType.quantity).default(SectionType.quantity)
|
|
3888
3966
|
});
|
|
3889
3967
|
|
|
3890
3968
|
// src/schema/widgets/checkout-and-beyond/reviews.ts
|
|
3891
3969
|
import { v7 as uuidv710 } from "uuid";
|
|
3892
|
-
import { z as
|
|
3970
|
+
import { z as z65 } from "zod";
|
|
3893
3971
|
|
|
3894
3972
|
// src/schema/widgets/checkout-and-beyond/reviewLabels.ts
|
|
3895
3973
|
var REVIEW_LABELS = {
|
|
@@ -3952,49 +4030,49 @@ var REVIEW_LABELS = {
|
|
|
3952
4030
|
};
|
|
3953
4031
|
|
|
3954
4032
|
// src/schema/widgets/checkout-and-beyond/reviews.ts
|
|
3955
|
-
var CABReviewsSection =
|
|
4033
|
+
var CABReviewsSection = z65.object({
|
|
3956
4034
|
...CABVariableFields,
|
|
3957
|
-
color:
|
|
4035
|
+
color: z65.string().default("#fadb14"),
|
|
3958
4036
|
/**
|
|
3959
4037
|
* Localized review-count templates (`{{reviewCount}}`), one/other plural forms; the client picks the
|
|
3960
4038
|
* form via `Intl.PluralRules`. Defaults here (schema-first) so every tree localizes without converter
|
|
3961
4039
|
* or merchant work.
|
|
3962
4040
|
*/
|
|
3963
|
-
countLabels:
|
|
3964
|
-
one:
|
|
3965
|
-
other:
|
|
4041
|
+
countLabels: z65.object({
|
|
4042
|
+
one: z65.record(z65.string(), z65.string()).default(() => ({ ...REVIEW_LABELS.one })),
|
|
4043
|
+
other: z65.record(z65.string(), z65.string()).default(() => ({ ...REVIEW_LABELS.other }))
|
|
3966
4044
|
}).default(() => ({ one: { ...REVIEW_LABELS.one }, other: { ...REVIEW_LABELS.other } })),
|
|
3967
|
-
name:
|
|
3968
|
-
sectionId:
|
|
3969
|
-
sectionType:
|
|
3970
|
-
size:
|
|
4045
|
+
name: z65.string().optional(),
|
|
4046
|
+
sectionId: z65.uuid().default(() => uuidv710()),
|
|
4047
|
+
sectionType: z65.literal(SectionType.reviews).default(SectionType.reviews),
|
|
4048
|
+
size: z65.enum(reviewsSizes).default(ReviewsSize.default),
|
|
3971
4049
|
/**
|
|
3972
4050
|
* Star outline color, interpolated into a style by the renderer, so it is hex-constrained like
|
|
3973
4051
|
* `CABButtonSection.color`. The legacy source (`PostPurchaseSettings.styles.starStrokeColor`) is a free
|
|
3974
4052
|
* string: its converter must validate and fall back to this default rather than let one odd value drop
|
|
3975
4053
|
* the whole reviews section.
|
|
3976
4054
|
*/
|
|
3977
|
-
strokeColor:
|
|
4055
|
+
strokeColor: z65.string().regex(HEX_COLOR_REGEX).default("#fadb14"),
|
|
3978
4056
|
/** Star outline width in px; `0` draws no outline. The legacy `styles.strokeWidth` is a STRING ('1') — its converter coerces. */
|
|
3979
|
-
strokeWidth:
|
|
4057
|
+
strokeWidth: z65.number().nonnegative().default(0)
|
|
3980
4058
|
});
|
|
3981
4059
|
|
|
3982
4060
|
// src/schema/widgets/checkout-and-beyond/separator.ts
|
|
3983
4061
|
import { v7 as uuidv711 } from "uuid";
|
|
3984
|
-
import { z as
|
|
3985
|
-
var CABSeparatorSection =
|
|
4062
|
+
import { z as z66 } from "zod";
|
|
4063
|
+
var CABSeparatorSection = z66.object({
|
|
3986
4064
|
...CABVariableFields,
|
|
3987
|
-
sectionId:
|
|
3988
|
-
sectionType:
|
|
4065
|
+
sectionId: z66.uuid().default(() => uuidv711()),
|
|
4066
|
+
sectionType: z66.literal(SectionType.separator).default(SectionType.separator)
|
|
3989
4067
|
});
|
|
3990
4068
|
|
|
3991
4069
|
// src/schema/widgets/checkout-and-beyond/variants.ts
|
|
3992
4070
|
import { isEmpty, pickBy, slice } from "es-toolkit/compat";
|
|
3993
4071
|
import { v7 as uuidv712 } from "uuid";
|
|
3994
|
-
import { z as
|
|
3995
|
-
var CABVariantsSection =
|
|
4072
|
+
import { z as z67 } from "zod";
|
|
4073
|
+
var CABVariantsSection = z67.object({
|
|
3996
4074
|
...CABVariableFields,
|
|
3997
|
-
hideOutOfStockVariants:
|
|
4075
|
+
hideOutOfStockVariants: z67.boolean().default(false),
|
|
3998
4076
|
/**
|
|
3999
4077
|
* The menu's own label per buyer locale (`selectLanguage`), for the whole-variant (`single`) and the
|
|
4000
4078
|
* product-group menus; `multiple` labels each option's menu by its name. Optional and additive
|
|
@@ -4005,30 +4083,30 @@ var CABVariantsSection = z65.object({
|
|
|
4005
4083
|
* `selectLanguage` returning `''` — which a renderer's `??` fallback would show as an empty menu label.
|
|
4006
4084
|
* A label left with no entries reads as absent.
|
|
4007
4085
|
*/
|
|
4008
|
-
label:
|
|
4086
|
+
label: z67.record(z67.string(), z67.string()).transform((label) => {
|
|
4009
4087
|
const filled = pickBy(label, (value) => value.trim() !== "");
|
|
4010
4088
|
return isEmpty(filled) ? void 0 : filled;
|
|
4011
4089
|
}).optional().catch(void 0),
|
|
4012
|
-
name:
|
|
4013
|
-
sectionId:
|
|
4014
|
-
sectionType:
|
|
4015
|
-
selector:
|
|
4090
|
+
name: z67.string().optional(),
|
|
4091
|
+
sectionId: z67.uuid().default(() => uuidv712()),
|
|
4092
|
+
sectionType: z67.literal(SectionType.variants).default(SectionType.variants),
|
|
4093
|
+
selector: z67.enum(slice(variantSelectors, 0, 3)).default(VariantSelector.menu),
|
|
4016
4094
|
/** `productGroup` is additive (REB-24817): a renderer without group support must render nothing for it. */
|
|
4017
|
-
variantMode:
|
|
4095
|
+
variantMode: z67.enum(variantsModes).default(VariantsMode.multiple)
|
|
4018
4096
|
});
|
|
4019
4097
|
|
|
4020
4098
|
// src/schema/widgets/checkout-and-beyond/shared.ts
|
|
4021
|
-
var CABBorder =
|
|
4022
|
-
radius:
|
|
4023
|
-
style:
|
|
4024
|
-
width:
|
|
4099
|
+
var CABBorder = z68.object({
|
|
4100
|
+
radius: z68.enum(borderRadii).default(BorderRadius.base),
|
|
4101
|
+
style: z68.enum(borderStyles).default(BorderStyle.none),
|
|
4102
|
+
width: z68.enum(borderWidths).default(BorderWidth.base)
|
|
4025
4103
|
}).default({
|
|
4026
4104
|
radius: BorderRadius.base,
|
|
4027
4105
|
style: BorderStyle.none,
|
|
4028
4106
|
width: BorderWidth.base
|
|
4029
4107
|
});
|
|
4030
|
-
var CABSection =
|
|
4031
|
-
() =>
|
|
4108
|
+
var CABSection = z68.lazy(
|
|
4109
|
+
() => z68.discriminatedUnion("sectionType", [
|
|
4032
4110
|
CABBannerSection,
|
|
4033
4111
|
CABButtonSection,
|
|
4034
4112
|
CABCarouselSection,
|
|
@@ -4051,43 +4129,43 @@ var CABSection = z66.lazy(
|
|
|
4051
4129
|
);
|
|
4052
4130
|
|
|
4053
4131
|
// src/schema/widgets/checkout-and-beyond/layout.ts
|
|
4054
|
-
var GridItem =
|
|
4055
|
-
var CABLayoutWrapping =
|
|
4056
|
-
breakAt:
|
|
4057
|
-
maxPerLine:
|
|
4132
|
+
var GridItem = z69.union([z69.literal("auto"), z69.literal("fill"), z69.string().regex(/^\d+%$/), z69.number()]);
|
|
4133
|
+
var CABLayoutWrapping = z69.object({
|
|
4134
|
+
breakAt: z69.number().positive(),
|
|
4135
|
+
maxPerLine: z69.number().int().positive()
|
|
4058
4136
|
});
|
|
4059
|
-
var CABLayoutSection =
|
|
4137
|
+
var CABLayoutSection = z69.object({
|
|
4060
4138
|
...CABVariableFields,
|
|
4061
|
-
alignment:
|
|
4062
|
-
horizontal:
|
|
4063
|
-
vertical:
|
|
4139
|
+
alignment: z69.object({
|
|
4140
|
+
horizontal: z69.enum(horizontalAlignments).default(HorizontalAlignment.start),
|
|
4141
|
+
vertical: z69.enum(verticalAlignments).default(VerticalAlignment.top)
|
|
4064
4142
|
}).default({
|
|
4065
4143
|
horizontal: HorizontalAlignment.start,
|
|
4066
4144
|
vertical: VerticalAlignment.top
|
|
4067
4145
|
}),
|
|
4068
|
-
border:
|
|
4069
|
-
buttonField:
|
|
4070
|
-
direction:
|
|
4146
|
+
border: z69.lazy(() => CABBorder),
|
|
4147
|
+
buttonField: z69.enum(buttonFields).optional(),
|
|
4148
|
+
direction: z69.enum(directions).default(Direction.rows),
|
|
4071
4149
|
/**
|
|
4072
4150
|
* Platform chrome around the section, not a layout behavior: `callout` is a subdued box with block borders
|
|
4073
4151
|
* (the legacy post-purchase callout banner), `offer-content` the post-purchase offer's own content column
|
|
4074
4152
|
* (legacy `ComponentSectionLayout`), which the converter puts around the text, image and image-with-text
|
|
4075
4153
|
* blocks. The offers section is never framed: the renderers place it in that column themselves.
|
|
4076
4154
|
*/
|
|
4077
|
-
frame:
|
|
4078
|
-
grid:
|
|
4079
|
-
columns:
|
|
4080
|
-
rows:
|
|
4155
|
+
frame: z69.enum(layoutFrames).optional(),
|
|
4156
|
+
grid: z69.object({
|
|
4157
|
+
columns: z69.union([z69.array(GridItem), z69.undefined()]).default(() => ["auto"]),
|
|
4158
|
+
rows: z69.union([z69.array(GridItem), z69.undefined()]).default(() => ["auto"])
|
|
4081
4159
|
}).default({ columns: ["auto"], rows: ["auto"] }).optional(),
|
|
4082
|
-
name:
|
|
4083
|
-
padding:
|
|
4084
|
-
sectionId:
|
|
4085
|
-
sections:
|
|
4086
|
-
sectionType:
|
|
4087
|
-
spacing:
|
|
4160
|
+
name: z69.string().optional(),
|
|
4161
|
+
padding: z69.enum(spacings).default(Spacing.none),
|
|
4162
|
+
sectionId: z69.uuid().default(() => uuidv713()),
|
|
4163
|
+
sections: z69.union([z69.array(z69.lazy(() => CABSection)), z69.strictObject({}).transform(() => [])]).default(() => []),
|
|
4164
|
+
sectionType: z69.literal(SectionType.layout).default(SectionType.layout),
|
|
4165
|
+
spacing: z69.enum(spacings).default(Spacing.base),
|
|
4088
4166
|
/** Fire-and-forget impression pixel POSTed once when the section is shown (e.g. a Monetize offer view). */
|
|
4089
|
-
viewUrl:
|
|
4090
|
-
width:
|
|
4167
|
+
viewUrl: z69.string().optional(),
|
|
4168
|
+
width: z69.number().default(100),
|
|
4091
4169
|
wrapping: CABLayoutWrapping.optional()
|
|
4092
4170
|
});
|
|
4093
4171
|
|
|
@@ -4109,8 +4187,8 @@ var UI_LABELS = {
|
|
|
4109
4187
|
};
|
|
4110
4188
|
|
|
4111
4189
|
// src/schema/widgets/checkout-and-beyond/root.ts
|
|
4112
|
-
var localized = (fallback) =>
|
|
4113
|
-
var CABUILabels =
|
|
4190
|
+
var localized = (fallback) => z70.record(z70.string(), z70.string()).default(() => ({ ...fallback })).transform((labels) => Object.keys(labels).length > 0 ? labels : { ...fallback });
|
|
4191
|
+
var CABUILabels = z70.object({
|
|
4114
4192
|
currentPage: localized(UI_LABELS.currentPage),
|
|
4115
4193
|
guest: localized(UI_LABELS.guest),
|
|
4116
4194
|
loadingOptions: localized(UI_LABELS.loadingOptions),
|
|
@@ -4135,50 +4213,50 @@ var CABUILabels = z68.object({
|
|
|
4135
4213
|
subscriptionOptions: { ...UI_LABELS.subscriptionOptions },
|
|
4136
4214
|
updating: { ...UI_LABELS.updating }
|
|
4137
4215
|
}));
|
|
4138
|
-
var TargetArea =
|
|
4139
|
-
fill:
|
|
4140
|
-
flip:
|
|
4141
|
-
icon:
|
|
4142
|
-
label:
|
|
4143
|
-
width:
|
|
4216
|
+
var TargetArea = z70.object({
|
|
4217
|
+
fill: z70.boolean().optional(),
|
|
4218
|
+
flip: z70.enum(["both", "horizontal", "vertical"]).optional(),
|
|
4219
|
+
icon: z70.string(),
|
|
4220
|
+
label: z70.string(),
|
|
4221
|
+
width: z70.string()
|
|
4144
4222
|
}).default(targetAreas[EditorMode.checkoutExtension][1]);
|
|
4145
|
-
var CABTracking =
|
|
4146
|
-
enableAttribution:
|
|
4147
|
-
enableSource:
|
|
4148
|
-
enableWidget:
|
|
4223
|
+
var CABTracking = z70.object({
|
|
4224
|
+
enableAttribution: z70.boolean().nullish().transform((value) => value ?? true),
|
|
4225
|
+
enableSource: z70.boolean().nullish().transform((value) => value ?? true),
|
|
4226
|
+
enableWidget: z70.boolean().nullish().transform((value) => value ?? true)
|
|
4149
4227
|
}).nullish().transform((value) => value ?? { enableAttribution: true, enableSource: true, enableWidget: true });
|
|
4150
|
-
var CABExperiment =
|
|
4151
|
-
elementId:
|
|
4152
|
-
experimentId:
|
|
4153
|
-
experimentType:
|
|
4154
|
-
selectedId:
|
|
4228
|
+
var CABExperiment = z70.object({
|
|
4229
|
+
elementId: z70.number(),
|
|
4230
|
+
experimentId: z70.number(),
|
|
4231
|
+
experimentType: z70.string(),
|
|
4232
|
+
selectedId: z70.number()
|
|
4155
4233
|
});
|
|
4156
4234
|
var CABRootSection = CABLayoutSection.extend({
|
|
4157
|
-
editorMode:
|
|
4235
|
+
editorMode: z70.enum(editorModes).default(EditorMode.checkoutExtension),
|
|
4158
4236
|
experiment: CABExperiment.optional(),
|
|
4159
4237
|
// Same rule as CABTracking above: the v1 converters pass raw legacy `previewMode` through, so a
|
|
4160
4238
|
// `null` must fall back rather than throw the widget; malformed values still throw.
|
|
4161
|
-
previewMode:
|
|
4162
|
-
storeId:
|
|
4239
|
+
previewMode: z70.boolean().nullish().transform((value) => value ?? false),
|
|
4240
|
+
storeId: z70.number().nullable().default(null),
|
|
4163
4241
|
targetArea: TargetArea.nullable(),
|
|
4164
4242
|
tracking: CABTracking,
|
|
4165
|
-
type:
|
|
4243
|
+
type: z70.enum(widgetTypes).default(WidgetType.ui_extension_content_block),
|
|
4166
4244
|
uiLabels: CABUILabels,
|
|
4167
|
-
version:
|
|
4168
|
-
widgetId:
|
|
4245
|
+
version: z70.literal(2).default(2),
|
|
4246
|
+
widgetId: z70.number().nullable().default(null)
|
|
4169
4247
|
});
|
|
4170
4248
|
|
|
4171
4249
|
// src/schema/postPurchaseProductView.ts
|
|
4172
|
-
var StsMarker =
|
|
4173
|
-
var PostPurchaseProductView =
|
|
4174
|
-
|
|
4250
|
+
var StsMarker = z71.literal(true).optional();
|
|
4251
|
+
var PostPurchaseProductView = z71.union([
|
|
4252
|
+
z71.object({
|
|
4175
4253
|
changeset: PostPurchaseProductChangeset.optional(),
|
|
4176
4254
|
displayPrice: PostPurchaseDisplayPrice.optional(),
|
|
4177
4255
|
groupCatalog: PostPurchaseGroupCatalog.optional(),
|
|
4178
4256
|
initialVariant: PostPurchaseVariantSelector.optional(),
|
|
4179
4257
|
planCatalog: PostPurchasePlanCatalog.nullable().optional(),
|
|
4180
4258
|
preparation: PreparedPostPurchaseProduct.extend({
|
|
4181
|
-
display: PreparedPostPurchaseProduct.shape.display.extend({ description:
|
|
4259
|
+
display: PreparedPostPurchaseProduct.shape.display.extend({ description: z71.string().nullable() }).refine(
|
|
4182
4260
|
({ description, descriptionDocument }) => description === null === (descriptionDocument !== void 0),
|
|
4183
4261
|
"Exactly one of the plain and rich descriptions is shown"
|
|
4184
4262
|
)
|
|
@@ -4188,7 +4266,7 @@ var PostPurchaseProductView = z69.union([
|
|
|
4188
4266
|
sts: StsMarker,
|
|
4189
4267
|
variantCatalog: PostPurchaseVariantCatalog.optional()
|
|
4190
4268
|
}),
|
|
4191
|
-
|
|
4269
|
+
z71.object({
|
|
4192
4270
|
groupCatalog: PostPurchaseGroupCatalog.optional(),
|
|
4193
4271
|
initialVariant: PostPurchaseVariantSelector.optional(),
|
|
4194
4272
|
/** The localized unavailable copy, for the choices still offered beneath an unprepared product. */
|
|
@@ -4204,21 +4282,21 @@ var PostPurchaseProductView = z69.union([
|
|
|
4204
4282
|
]);
|
|
4205
4283
|
|
|
4206
4284
|
// src/schema/postPurchaseProductCollectionView.ts
|
|
4207
|
-
var PostPurchaseProductCollectionView =
|
|
4208
|
-
members:
|
|
4209
|
-
|
|
4285
|
+
var PostPurchaseProductCollectionView = z72.object({
|
|
4286
|
+
members: z72.array(
|
|
4287
|
+
z72.object({
|
|
4210
4288
|
productId: PostPurchaseProductId,
|
|
4211
|
-
productIndex:
|
|
4289
|
+
productIndex: z72.number().int().nonnegative(),
|
|
4212
4290
|
view: PostPurchaseProductView
|
|
4213
4291
|
})
|
|
4214
4292
|
)
|
|
4215
4293
|
});
|
|
4216
|
-
var PostPurchaseCollectionChoice =
|
|
4294
|
+
var PostPurchaseCollectionChoice = z72.object({
|
|
4217
4295
|
choice: PostPurchaseChoice.optional(),
|
|
4218
4296
|
productId: PostPurchaseProductId,
|
|
4219
4297
|
variantId: PostPurchaseVariantSelector.shape.variantId.optional()
|
|
4220
4298
|
}).strict();
|
|
4221
|
-
var PostPurchaseExcludedProductIds =
|
|
4299
|
+
var PostPurchaseExcludedProductIds = z72.array(PostPurchaseProductId).default([]);
|
|
4222
4300
|
var PostPurchaseMemberSelector = PostPurchaseProgressSchema.shape.members.element.pick({ productId: true }).extend({ progressRevision: PostPurchaseProgressSchema.shape.revision });
|
|
4223
4301
|
var PostPurchaseMemberPointer = PostPurchaseProgressSchema.shape.members.element.omit({ status: true }).extend({
|
|
4224
4302
|
entryRevision: PostPurchaseProgressSchema.shape.entryRevision,
|
|
@@ -4231,7 +4309,7 @@ var PostPurchaseQuantityChoice = PostPurchaseCollectionChoice.extend({ quantity:
|
|
|
4231
4309
|
var PostPurchaseQuantityPolicy = PostPurchaseSettings.shape.quantityInputs.omit({ defaultQuantity: true }).extend({
|
|
4232
4310
|
initialQuantity: quantity,
|
|
4233
4311
|
maxValue: quantity,
|
|
4234
|
-
minValue:
|
|
4312
|
+
minValue: z73.literal(0).transform(() => 1).or(quantity)
|
|
4235
4313
|
}).refine(({ maxValue, minValue }) => minValue <= maxValue, "Quantity bounds are reversed");
|
|
4236
4314
|
|
|
4237
4315
|
// src/schema/postPurchaseGroup.ts
|
|
@@ -4240,33 +4318,33 @@ var PostPurchaseGroupChoice = PostPurchaseQuantityChoice.extend({
|
|
|
4240
4318
|
});
|
|
4241
4319
|
|
|
4242
4320
|
// src/schema/postPurchaseHealth.ts
|
|
4243
|
-
import { z as
|
|
4321
|
+
import { z as z76 } from "zod";
|
|
4244
4322
|
|
|
4245
4323
|
// src/schema/postPurchaseHealthSchedule.ts
|
|
4246
|
-
import { z as
|
|
4324
|
+
import { z as z75 } from "zod";
|
|
4247
4325
|
|
|
4248
4326
|
// src/schema/postPurchaseReleaseSchedule.ts
|
|
4249
|
-
import { z as
|
|
4250
|
-
var postPurchaseTaskNameSchema = (queue, id) =>
|
|
4251
|
-
var SessionReleaseScheduleRequestSchema =
|
|
4327
|
+
import { z as z74 } from "zod";
|
|
4328
|
+
var postPurchaseTaskNameSchema = (queue, id) => z74.string().regex(new RegExp(`^projects/[a-zA-Z0-9.:-]+/locations/us-central1/queues/${queue}/tasks/${id}$`));
|
|
4329
|
+
var SessionReleaseScheduleRequestSchema = z74.strictObject({
|
|
4252
4330
|
deadline: PostPurchaseTimestampSchema,
|
|
4253
4331
|
orderId: PostPurchaseOrderIdSchema,
|
|
4254
4332
|
releaseOwner: ReleaseOwnerSchema,
|
|
4255
4333
|
sessionId: PostPurchaseSessionIdSchema
|
|
4256
4334
|
});
|
|
4257
|
-
var SessionReleaseScheduleResponseSchema =
|
|
4258
|
-
data:
|
|
4335
|
+
var SessionReleaseScheduleResponseSchema = z74.object({
|
|
4336
|
+
data: z74.discriminatedUnion("status", [
|
|
4259
4337
|
SessionReleaseScheduleRequestSchema.extend({
|
|
4260
|
-
releaseOwner:
|
|
4261
|
-
status:
|
|
4338
|
+
releaseOwner: z74.literal("rebuy"),
|
|
4339
|
+
status: z74.literal("queued"),
|
|
4262
4340
|
taskName: postPurchaseTaskNameSchema("post-purchase-order-hold-release", "[a-f0-9]{64}-release")
|
|
4263
4341
|
}),
|
|
4264
4342
|
SessionReleaseScheduleRequestSchema.extend({
|
|
4265
|
-
releaseOwner:
|
|
4266
|
-
status:
|
|
4343
|
+
releaseOwner: z74.literal("shopify"),
|
|
4344
|
+
status: z74.literal("native")
|
|
4267
4345
|
})
|
|
4268
4346
|
]),
|
|
4269
|
-
successful:
|
|
4347
|
+
successful: z74.literal(true)
|
|
4270
4348
|
});
|
|
4271
4349
|
|
|
4272
4350
|
// src/schema/postPurchaseHealthSchedule.ts
|
|
@@ -4275,15 +4353,15 @@ var PostPurchaseHealthTaskNameSchema = postPurchaseTaskNameSchema(
|
|
|
4275
4353
|
"post-purchase-health-check",
|
|
4276
4354
|
"[a-z0-9][a-z0-9-]*--[1-9][0-9]*"
|
|
4277
4355
|
);
|
|
4278
|
-
var HealthScheduleAcknowledgementSchema =
|
|
4356
|
+
var HealthScheduleAcknowledgementSchema = z75.strictObject({
|
|
4279
4357
|
data: HealthScheduleSchema.extend({
|
|
4280
|
-
status:
|
|
4358
|
+
status: z75.literal("queued"),
|
|
4281
4359
|
taskName: PostPurchaseHealthTaskNameSchema
|
|
4282
4360
|
}).refine(
|
|
4283
4361
|
(data) => data.taskName.endsWith(`/tasks/${postPurchaseHealthTaskId(data)}`),
|
|
4284
4362
|
"taskName must be this order's health task"
|
|
4285
4363
|
),
|
|
4286
|
-
successful:
|
|
4364
|
+
successful: z75.literal(true)
|
|
4287
4365
|
});
|
|
4288
4366
|
|
|
4289
4367
|
// src/schema/postPurchaseHealth.ts
|
|
@@ -4292,7 +4370,7 @@ var HealthFactSchema = HealthScheduleSchema.pick({
|
|
|
4292
4370
|
operationId: true,
|
|
4293
4371
|
removePartialOrder: true
|
|
4294
4372
|
});
|
|
4295
|
-
var HealthScheduleReceiptSchema =
|
|
4373
|
+
var HealthScheduleReceiptSchema = z76.strictObject({
|
|
4296
4374
|
recordedAt: PostPurchaseTimestampSchema,
|
|
4297
4375
|
taskName: PostPurchaseHealthTaskNameSchema
|
|
4298
4376
|
});
|
|
@@ -4302,52 +4380,52 @@ var StoredHealthFactSchema = HealthFactSchema.extend({
|
|
|
4302
4380
|
});
|
|
4303
4381
|
var HealthAttemptSchema = StoredHealthFactSchema.extend({
|
|
4304
4382
|
attemptedAt: PostPurchaseTimestampSchema,
|
|
4305
|
-
attemptId:
|
|
4306
|
-
status:
|
|
4383
|
+
attemptId: z76.uuid(),
|
|
4384
|
+
status: z76.literal("attempted")
|
|
4307
4385
|
});
|
|
4308
4386
|
var HealthResultSchema = HealthAttemptSchema.extend({
|
|
4309
4387
|
finishedAt: PostPurchaseTimestampSchema,
|
|
4310
|
-
status:
|
|
4388
|
+
status: HealthResultStatusSchema
|
|
4311
4389
|
});
|
|
4312
|
-
var HealthStateSchema =
|
|
4313
|
-
StoredHealthFactSchema.extend({ status:
|
|
4390
|
+
var HealthStateSchema = z76.union([
|
|
4391
|
+
StoredHealthFactSchema.extend({ status: z76.literal("pending") }),
|
|
4314
4392
|
HealthAttemptSchema,
|
|
4315
4393
|
HealthResultSchema
|
|
4316
4394
|
]);
|
|
4317
4395
|
var HealthPrepareRequestSchema = DecideRequestSchema.extend({
|
|
4318
4396
|
operationId: HealthScheduleSchema.shape.operationId
|
|
4319
4397
|
}).strict();
|
|
4320
|
-
var HealthPrepareResponseSchema =
|
|
4321
|
-
var HealthClaimRequestSchema =
|
|
4398
|
+
var HealthPrepareResponseSchema = z76.object({ data: HealthScheduleSchema, successful: z76.literal(true) });
|
|
4399
|
+
var HealthClaimRequestSchema = z76.strictObject({
|
|
4322
4400
|
orderId: PostPurchaseOrderIdSchema,
|
|
4323
|
-
removePartialOrder:
|
|
4401
|
+
removePartialOrder: z76.boolean(),
|
|
4324
4402
|
shop: ShopifyDomainSchema
|
|
4325
4403
|
});
|
|
4326
4404
|
var HealthClaimFactSchema = HealthClaimRequestSchema.extend({
|
|
4327
4405
|
healthScheduledAt: HealthFactSchema.shape.healthScheduledAt
|
|
4328
4406
|
});
|
|
4329
|
-
var HealthClaimResponseSchema =
|
|
4330
|
-
data:
|
|
4331
|
-
|
|
4332
|
-
HealthClaimFactSchema.extend({ status:
|
|
4333
|
-
HealthClaimFactSchema.extend({ attemptId: HealthAttemptSchema.shape.attemptId, status:
|
|
4407
|
+
var HealthClaimResponseSchema = z76.object({
|
|
4408
|
+
data: z76.union([
|
|
4409
|
+
z76.strictObject({ status: z76.literal("missing") }),
|
|
4410
|
+
HealthClaimFactSchema.extend({ status: HealthStandingStatusSchema }),
|
|
4411
|
+
HealthClaimFactSchema.extend({ attemptId: HealthAttemptSchema.shape.attemptId, status: z76.literal("claimed") })
|
|
4334
4412
|
]),
|
|
4335
|
-
successful:
|
|
4413
|
+
successful: z76.literal(true)
|
|
4336
4414
|
});
|
|
4337
4415
|
var HealthResultRequestSchema = HealthClaimRequestSchema.extend({
|
|
4338
4416
|
attemptId: HealthAttemptSchema.shape.attemptId,
|
|
4339
4417
|
outcome: HealthResultSchema.shape.status
|
|
4340
4418
|
});
|
|
4341
|
-
var HealthResultResponseSchema =
|
|
4419
|
+
var HealthResultResponseSchema = z76.object({
|
|
4342
4420
|
data: HealthClaimFactSchema.extend({
|
|
4343
4421
|
finishedAt: HealthResultSchema.shape.finishedAt,
|
|
4344
4422
|
status: HealthResultSchema.shape.status
|
|
4345
4423
|
}),
|
|
4346
|
-
successful:
|
|
4424
|
+
successful: z76.literal(true)
|
|
4347
4425
|
});
|
|
4348
4426
|
|
|
4349
4427
|
// src/schema/postPurchaseLedger.ts
|
|
4350
|
-
import { z as
|
|
4428
|
+
import { z as z77 } from "zod";
|
|
4351
4429
|
var CLIENT_LEDGER_MAX_EVENTS = 16;
|
|
4352
4430
|
var CLIENT_LEDGER_TYPES = [
|
|
4353
4431
|
"decision.verdict",
|
|
@@ -4357,125 +4435,125 @@ var CLIENT_LEDGER_TYPES = [
|
|
|
4357
4435
|
"render.gate",
|
|
4358
4436
|
"shouldRender.selectedFlow"
|
|
4359
4437
|
];
|
|
4360
|
-
var ClientLedgerPayloadValueSchema =
|
|
4361
|
-
var ClientLedgerEventSchema =
|
|
4438
|
+
var ClientLedgerPayloadValueSchema = z77.union([z77.string().max(256), z77.number().finite(), z77.boolean()]);
|
|
4439
|
+
var ClientLedgerEventSchema = z77.strictObject({
|
|
4362
4440
|
/** The client's diagnostic id for one Shopify context; `(instance, seq)` names a row. */
|
|
4363
|
-
instance:
|
|
4364
|
-
payload:
|
|
4365
|
-
phase:
|
|
4441
|
+
instance: z77.string().regex(/^[A-Za-z0-9_-]{1,64}$/),
|
|
4442
|
+
payload: z77.record(z77.string().regex(/^[A-Za-z][A-Za-z0-9_.()]{0,63}$/), ClientLedgerPayloadValueSchema).refine((payload) => Object.keys(payload).length <= 24, "At most 24 payload members"),
|
|
4443
|
+
phase: z77.enum(["render", "shouldRender"]),
|
|
4366
4444
|
/** `-1` is the dev-store runtime probe's row (cab-post-purchase `dev-store/runtimeProbe.ts`). */
|
|
4367
|
-
seq:
|
|
4445
|
+
seq: z77.number().int().min(-1).max(1e5),
|
|
4368
4446
|
/** The client's clock when it observed the row, as the legacy client rows carry it. */
|
|
4369
|
-
ts:
|
|
4370
|
-
type:
|
|
4447
|
+
ts: z77.iso.datetime(),
|
|
4448
|
+
type: z77.enum(CLIENT_LEDGER_TYPES)
|
|
4371
4449
|
});
|
|
4372
|
-
var ClientLedgerRequestSchema =
|
|
4373
|
-
events:
|
|
4450
|
+
var ClientLedgerRequestSchema = z77.object({
|
|
4451
|
+
events: z77.array(ClientLedgerEventSchema).min(1).max(CLIENT_LEDGER_MAX_EVENTS)
|
|
4374
4452
|
});
|
|
4375
4453
|
|
|
4376
4454
|
// src/schema/postPurchaseLifecycle.ts
|
|
4377
|
-
import { z as
|
|
4378
|
-
var Presentation =
|
|
4455
|
+
import { z as z78 } from "zod";
|
|
4456
|
+
var Presentation = z78.strictObject({
|
|
4379
4457
|
member: PostPurchaseMemberIdentity,
|
|
4380
4458
|
selectedProductId: PostPurchaseMemberIdentity.shape.productId.optional(),
|
|
4381
4459
|
variant: PostPurchaseVariantSelector
|
|
4382
4460
|
});
|
|
4383
4461
|
var LifecycleObservationRequestSchema = DecideRequestSchema.extend({
|
|
4384
4462
|
entryRevision: PostPurchaseProgressSchema.shape.entryRevision,
|
|
4385
|
-
eventType:
|
|
4463
|
+
eventType: z78.enum(["OFFER_VIEWED", "OFFER_TIMER_EXPIRED"]),
|
|
4386
4464
|
presentation: Presentation.nullable(),
|
|
4387
4465
|
progressRevision: PostPurchaseProgressSchema.shape.revision,
|
|
4388
|
-
requestId:
|
|
4466
|
+
requestId: z78.uuid()
|
|
4389
4467
|
}).strict().refine(
|
|
4390
4468
|
({ eventType, presentation }) => eventType !== "OFFER_VIEWED" || presentation !== null,
|
|
4391
4469
|
"Viewed observations require a presented product"
|
|
4392
4470
|
);
|
|
4393
|
-
var LifecycleObservationResponseSchema =
|
|
4394
|
-
data:
|
|
4471
|
+
var LifecycleObservationResponseSchema = z78.object({
|
|
4472
|
+
data: z78.strictObject({
|
|
4395
4473
|
requestId: LifecycleObservationRequestSchema.shape.requestId,
|
|
4396
|
-
status:
|
|
4474
|
+
status: z78.union([AcceptedEventOutcomeSchema, z78.literal("unavailable")])
|
|
4397
4475
|
}),
|
|
4398
|
-
successful:
|
|
4476
|
+
successful: z78.literal(true)
|
|
4399
4477
|
});
|
|
4400
4478
|
|
|
4401
4479
|
// src/schema/postPurchaseOffer.ts
|
|
4402
|
-
import { z as
|
|
4480
|
+
import { z as z79 } from "zod";
|
|
4403
4481
|
var OfferPreparationRequestSchema = DecideRequestSchema.strict();
|
|
4404
|
-
var OfferPreparationResponseSchema =
|
|
4405
|
-
data:
|
|
4406
|
-
successful:
|
|
4482
|
+
var OfferPreparationResponseSchema = z79.object({
|
|
4483
|
+
data: z79.object({ attemptedSkips: PostPurchaseSkipTraceSchema.optional(), progress: PostPurchaseProgressSchema }),
|
|
4484
|
+
successful: z79.literal(true)
|
|
4407
4485
|
});
|
|
4408
4486
|
|
|
4409
4487
|
// src/schema/postPurchaseOfferEligibility.ts
|
|
4410
|
-
import { z as
|
|
4488
|
+
import { z as z80 } from "zod";
|
|
4411
4489
|
var selection2 = PreparedPostPurchaseProduct.shape.selection;
|
|
4412
|
-
var PostPurchaseOfferSkipReason =
|
|
4413
|
-
var PostPurchaseOfferUnavailableReason =
|
|
4490
|
+
var PostPurchaseOfferSkipReason = z80.enum(["empty", "no-eligible-subscription"]);
|
|
4491
|
+
var PostPurchaseOfferUnavailableReason = z80.enum([
|
|
4414
4492
|
"catalog-unreadable",
|
|
4415
4493
|
"context-unreadable",
|
|
4416
4494
|
"eligible-sts",
|
|
4417
4495
|
"settings-unreadable"
|
|
4418
4496
|
]);
|
|
4419
|
-
var PostPurchaseOfferEligibilityContext =
|
|
4497
|
+
var PostPurchaseOfferEligibilityContext = z80.object({
|
|
4420
4498
|
excludedProductIds: PostPurchaseExcludedProductIds,
|
|
4421
|
-
originalLineItems:
|
|
4499
|
+
originalLineItems: z80.array(selection2.pick({ productId: true, sellingPlanId: true, variantId: true }))
|
|
4422
4500
|
});
|
|
4423
|
-
var PostPurchaseStsOptions =
|
|
4424
|
-
var PostPurchaseStsContext =
|
|
4425
|
-
originalLineItems:
|
|
4501
|
+
var PostPurchaseStsOptions = z80.object({ sts: z80.boolean().optional() }).strict();
|
|
4502
|
+
var PostPurchaseStsContext = z80.object({
|
|
4503
|
+
originalLineItems: z80.array(
|
|
4426
4504
|
selection2.pick({ productId: true, quantity: true, sellingPlanId: true, variantId: true })
|
|
4427
4505
|
)
|
|
4428
4506
|
});
|
|
4429
|
-
var PostPurchaseOfferEligibility =
|
|
4430
|
-
|
|
4431
|
-
members:
|
|
4432
|
-
|
|
4507
|
+
var PostPurchaseOfferEligibility = z80.discriminatedUnion("status", [
|
|
4508
|
+
z80.object({
|
|
4509
|
+
members: z80.array(
|
|
4510
|
+
z80.object({ productId: selection2.shape.productId, productIndex: z80.number().int().nonnegative() })
|
|
4433
4511
|
),
|
|
4434
4512
|
/** Present only with STS on: each member switches one original one-time line to subscription. */
|
|
4435
|
-
mode:
|
|
4436
|
-
status:
|
|
4513
|
+
mode: z80.literal("sts").optional(),
|
|
4514
|
+
status: z80.literal("retain")
|
|
4437
4515
|
}),
|
|
4438
|
-
|
|
4516
|
+
z80.object({ reason: PostPurchaseOfferSkipReason, status: z80.literal("skip") }),
|
|
4439
4517
|
/** The classifier always names a reason; it stays optional so a reasonless answer from before still parses. */
|
|
4440
|
-
|
|
4518
|
+
z80.object({ reason: PostPurchaseOfferUnavailableReason.optional(), status: z80.literal("unavailable") })
|
|
4441
4519
|
]);
|
|
4442
4520
|
|
|
4443
4521
|
// src/schema/postPurchaseOfferPresentation.ts
|
|
4444
|
-
import { z as
|
|
4522
|
+
import { z as z81 } from "zod";
|
|
4445
4523
|
var language2 = PostPurchaseSettings.shape.language.shape.global.unwrap().unwrap();
|
|
4446
|
-
var PostPurchaseOfferPresentation =
|
|
4524
|
+
var PostPurchaseOfferPresentation = z81.strictObject({
|
|
4447
4525
|
labels: language2.pick({ declineAll: true, declineThisOffer: true }),
|
|
4448
4526
|
layout: PostPurchaseSettings.shape.offersLayout,
|
|
4449
4527
|
sections: CABRootSection.nullable(),
|
|
4450
4528
|
showDeclineAll: PostPurchaseSettings.shape.productOptions.shape.showDeclineAll
|
|
4451
4529
|
});
|
|
4452
4530
|
var OfferPresentationRequestSchema = DecideRequestSchema.strict();
|
|
4453
|
-
var OfferPresentationResponseSchema =
|
|
4454
|
-
data:
|
|
4531
|
+
var OfferPresentationResponseSchema = z81.object({
|
|
4532
|
+
data: z81.strictObject({
|
|
4455
4533
|
presentation: PostPurchaseOfferPresentation.nullable(),
|
|
4456
4534
|
progress: PostPurchaseProgressSchema.nullable(),
|
|
4457
4535
|
serverNow: PostPurchaseTimestampSchema
|
|
4458
4536
|
}),
|
|
4459
|
-
successful:
|
|
4537
|
+
successful: z81.literal(true)
|
|
4460
4538
|
});
|
|
4461
4539
|
|
|
4462
4540
|
// src/schema/postPurchaseOrderDecision.ts
|
|
4463
|
-
import { z as
|
|
4464
|
-
var OrderDecisionSchema =
|
|
4465
|
-
|
|
4466
|
-
|
|
4541
|
+
import { z as z82 } from "zod";
|
|
4542
|
+
var OrderDecisionSchema = z82.discriminatedUnion("owner", [
|
|
4543
|
+
z82.object({ owner: z82.literal("session"), sessionId: PostPurchaseSessionIdSchema }),
|
|
4544
|
+
z82.object({ owner: z82.literal("release"), sessionId: z82.null() })
|
|
4467
4545
|
]);
|
|
4468
4546
|
|
|
4469
4547
|
// src/schema/postPurchasePolicy.ts
|
|
4470
|
-
import { z as
|
|
4471
|
-
var HoldSettingSchema =
|
|
4472
|
-
|
|
4473
|
-
|
|
4548
|
+
import { z as z83 } from "zod";
|
|
4549
|
+
var HoldSettingSchema = z83.discriminatedUnion("enabled", [
|
|
4550
|
+
z83.object({ durationMinutes: z83.number().int().min(1).max(60), enabled: z83.literal(true) }),
|
|
4551
|
+
z83.object({ durationMinutes: z83.null(), enabled: z83.literal(false) })
|
|
4474
4552
|
]);
|
|
4475
|
-
var TimingSettingsSchema =
|
|
4553
|
+
var TimingSettingsSchema = z83.object({ flowHold: HoldSettingSchema, shopHold: HoldSettingSchema });
|
|
4476
4554
|
var SessionPolicySchema = TimingSettingsSchema.extend({
|
|
4477
|
-
durationMinutes:
|
|
4478
|
-
source:
|
|
4555
|
+
durationMinutes: z83.number().int().min(1).max(60).nullable(),
|
|
4556
|
+
source: z83.enum(["shop", "flow", "native"])
|
|
4479
4557
|
}).refine(
|
|
4480
4558
|
(policy) => {
|
|
4481
4559
|
const expectedSource = policy.shopHold.enabled ? "shop" : policy.flowHold.enabled ? "flow" : "native";
|
|
@@ -4489,8 +4567,8 @@ var SessionPolicySchema = TimingSettingsSchema.extend({
|
|
|
4489
4567
|
);
|
|
4490
4568
|
|
|
4491
4569
|
// src/schema/postPurchasePreparationOptions.ts
|
|
4492
|
-
import { z as
|
|
4493
|
-
var PostPurchasePreparationOptions =
|
|
4570
|
+
import { z as z84 } from "zod";
|
|
4571
|
+
var PostPurchasePreparationOptions = z84.object({
|
|
4494
4572
|
choice: PostPurchaseChoice.optional(),
|
|
4495
4573
|
member: PostPurchaseMemberSelector.strict().optional(),
|
|
4496
4574
|
quantity: PreparedPostPurchaseProduct.shape.selection.shape.quantity.optional(),
|
|
@@ -4502,8 +4580,8 @@ var PostPurchasePreparationOptions = z82.object({
|
|
|
4502
4580
|
);
|
|
4503
4581
|
|
|
4504
4582
|
// src/schema/postPurchaseProductSettings.ts
|
|
4505
|
-
import { z as
|
|
4506
|
-
var amount =
|
|
4583
|
+
import { z as z85 } from "zod";
|
|
4584
|
+
var amount = z85.union([z85.number().nonnegative(), PostPurchaseAmount.transform(Number)]);
|
|
4507
4585
|
var PostPurchaseProductSettings = PostPurchaseSettings.pick({
|
|
4508
4586
|
discountedFrom: true,
|
|
4509
4587
|
language: true,
|
|
@@ -4515,32 +4593,32 @@ var PostPurchaseProductSettings = PostPurchaseSettings.pick({
|
|
|
4515
4593
|
subscriptionIsDefault: true,
|
|
4516
4594
|
upgradeToSubscription: true
|
|
4517
4595
|
}).extend({
|
|
4518
|
-
advance:
|
|
4519
|
-
blocks:
|
|
4596
|
+
advance: z85.unknown().default({}),
|
|
4597
|
+
blocks: z85.array(z85.unknown()).optional(),
|
|
4520
4598
|
discount: PostPurchaseSettings.shape.discount.extend({ amount: amount.default(30) }),
|
|
4521
|
-
integrations:
|
|
4599
|
+
integrations: z85.unknown().default({}),
|
|
4522
4600
|
shipping: PostPurchaseSettings.shape.shipping.extend({ amount: amount.default(10) }),
|
|
4523
|
-
styles:
|
|
4601
|
+
styles: z85.unknown().default({}),
|
|
4524
4602
|
subImages: PostPurchaseSettings.shape.subImages.catch(null),
|
|
4525
|
-
subscription:
|
|
4603
|
+
subscription: z85.unknown().default(PostPurchaseSettings.shape.subscription.parse(void 0))
|
|
4526
4604
|
});
|
|
4527
4605
|
|
|
4528
4606
|
// src/schema/postPurchaseRecovery.ts
|
|
4529
|
-
import { z as
|
|
4530
|
-
var RecoveredFollowupsSchema =
|
|
4531
|
-
acceptedEvent:
|
|
4532
|
-
acceptedMetafield:
|
|
4607
|
+
import { z as z86 } from "zod";
|
|
4608
|
+
var RecoveredFollowupsSchema = z86.strictObject({
|
|
4609
|
+
acceptedEvent: z86.union([AcceptedEventAttemptProgressSchema, AcceptedEventResultProgressSchema]).nullable(),
|
|
4610
|
+
acceptedMetafield: z86.union([AcceptedMetafieldOutcomeSchema, z86.literal("attempted")]).nullable()
|
|
4533
4611
|
});
|
|
4534
4612
|
var PurchaseRecoveryRequestSchema = DecideRequestSchema.strict();
|
|
4535
|
-
var PurchaseRecoveryResponseSchema =
|
|
4536
|
-
data:
|
|
4613
|
+
var PurchaseRecoveryResponseSchema = z86.object({
|
|
4614
|
+
data: z86.object({
|
|
4537
4615
|
/**
|
|
4538
4616
|
* Strict, so rebuy-api (which validates its own reply against this schema) can never emit a field the
|
|
4539
4617
|
* contract does not name. cab-post-purchase reads recovery with hand guards that ignore extra keys, so
|
|
4540
4618
|
* the strictness never reaches it: release rebuy-api (the pin bump) first, then the client that reads a
|
|
4541
4619
|
* field added here.
|
|
4542
4620
|
*/
|
|
4543
|
-
operation:
|
|
4621
|
+
operation: z86.object({
|
|
4544
4622
|
/** Absent from a rebuy-api that predates it. */
|
|
4545
4623
|
followups: RecoveredFollowupsSchema.optional(),
|
|
4546
4624
|
observation: RecordedPurchaseObservationSchema.nullable(),
|
|
@@ -4563,41 +4641,41 @@ var PurchaseRecoveryResponseSchema = z84.object({
|
|
|
4563
4641
|
).nullable(),
|
|
4564
4642
|
progress: PostPurchaseProgressSchema.nullable().optional()
|
|
4565
4643
|
}),
|
|
4566
|
-
successful:
|
|
4644
|
+
successful: z86.literal(true)
|
|
4567
4645
|
});
|
|
4568
4646
|
|
|
4569
4647
|
// src/schema/postPurchaseReleaseClaim.ts
|
|
4570
|
-
import { z as
|
|
4648
|
+
import { z as z87 } from "zod";
|
|
4571
4649
|
var ReleaseClaimRequestSchema = ReleaseAuthorityRequestSchema;
|
|
4572
|
-
var ReleaseClaimResponseSchema =
|
|
4573
|
-
data:
|
|
4574
|
-
|
|
4650
|
+
var ReleaseClaimResponseSchema = z87.object({
|
|
4651
|
+
data: z87.discriminatedUnion("status", [
|
|
4652
|
+
z87.object({ status: z87.literal("release-permitted") }),
|
|
4575
4653
|
PendingReleaseAuthoritySchema,
|
|
4576
4654
|
ReadyReleaseAuthoritySchema
|
|
4577
4655
|
]),
|
|
4578
|
-
successful:
|
|
4656
|
+
successful: z87.literal(true)
|
|
4579
4657
|
});
|
|
4580
4658
|
|
|
4581
4659
|
// src/schema/postPurchaseSelection.ts
|
|
4582
|
-
import { z as
|
|
4660
|
+
import { z as z88 } from "zod";
|
|
4583
4661
|
var SelectionClaimsSchema = DecideRequestSchema.extend({
|
|
4584
4662
|
appId: PostPurchaseAppIdSchema,
|
|
4585
4663
|
entry: DecisionEntrySchema,
|
|
4586
|
-
iss:
|
|
4587
|
-
purpose:
|
|
4664
|
+
iss: z88.literal("rebuy-api"),
|
|
4665
|
+
purpose: z88.literal("post-purchase-selection")
|
|
4588
4666
|
});
|
|
4589
4667
|
var SessionStartRequestSchema = DecideRequestSchema.extend({
|
|
4590
|
-
selectionToken:
|
|
4668
|
+
selectionToken: z88.string().min(1).max(8192).optional()
|
|
4591
4669
|
}).strict();
|
|
4592
4670
|
|
|
4593
4671
|
// src/schema/postPurchaseSession.ts
|
|
4594
|
-
import { z as
|
|
4672
|
+
import { z as z89 } from "zod";
|
|
4595
4673
|
var SessionIdentitySchema = DecideRequestSchema.extend({ appId: PostPurchaseAppIdSchema });
|
|
4596
|
-
var SessionOrderTimingSchema =
|
|
4674
|
+
var SessionOrderTimingSchema = z89.object({
|
|
4597
4675
|
nativeDeadline: PostPurchaseTimestampSchema,
|
|
4598
4676
|
orderCreatedAt: PostPurchaseTimestampSchema,
|
|
4599
4677
|
orderId: PostPurchaseOrderIdSchema,
|
|
4600
|
-
timingSource:
|
|
4678
|
+
timingSource: z89.literal("shopify-order-created-at")
|
|
4601
4679
|
});
|
|
4602
4680
|
var ReadySessionTimingSchema = SessionOrderTimingSchema.extend({
|
|
4603
4681
|
deadline: PostPurchaseTimestampSchema,
|
|
@@ -4614,76 +4692,26 @@ var ReadySessionTimingSchema = SessionOrderTimingSchema.extend({
|
|
|
4614
4692
|
message: "deadline must not exceed nativeDeadline",
|
|
4615
4693
|
path: ["deadline"]
|
|
4616
4694
|
});
|
|
4617
|
-
var SessionStartResponseSchema =
|
|
4618
|
-
data:
|
|
4619
|
-
phase:
|
|
4695
|
+
var SessionStartResponseSchema = z89.object({
|
|
4696
|
+
data: z89.object({
|
|
4697
|
+
phase: z89.literal("render"),
|
|
4620
4698
|
serverNow: PostPurchaseTimestampSchema,
|
|
4621
4699
|
session: ReadySessionTimingSchema,
|
|
4622
|
-
workflowPhase:
|
|
4700
|
+
workflowPhase: z89.literal("start")
|
|
4623
4701
|
}),
|
|
4624
|
-
successful:
|
|
4702
|
+
successful: z89.literal(true)
|
|
4625
4703
|
});
|
|
4626
|
-
var PostPurchaseOrderPendingSchema =
|
|
4627
|
-
errors:
|
|
4628
|
-
message:
|
|
4629
|
-
reason:
|
|
4630
|
-
successful:
|
|
4631
|
-
});
|
|
4632
|
-
|
|
4633
|
-
// src/schema/postPurchaseShadow.ts
|
|
4634
|
-
import { z as z88 } from "zod";
|
|
4635
|
-
var PostPurchaseShadowSelectionSchema = z88.discriminatedUnion("verdict", [
|
|
4636
|
-
z88.object({ entry: DecisionEntrySchema, verdict: z88.literal("render") }),
|
|
4637
|
-
z88.object({ verdict: z88.literal("skip") })
|
|
4638
|
-
]);
|
|
4639
|
-
var PostPurchaseShadowSkipReasonSchema = z88.enum([
|
|
4640
|
-
"destination-missing",
|
|
4641
|
-
"merchant-destination",
|
|
4642
|
-
"merchant-time",
|
|
4643
|
-
"no-active-flows",
|
|
4644
|
-
"no-eligible-flow",
|
|
4645
|
-
"prelude-timeout"
|
|
4646
|
-
]);
|
|
4647
|
-
var PostPurchaseShadowFlowOutcomesSchema = z88.array(
|
|
4648
|
-
z88.object({
|
|
4649
|
-
flowId: z88.number().int().positive(),
|
|
4650
|
-
outcome: z88.enum(["eligible", "empty", "failed", "unsupported"])
|
|
4651
|
-
})
|
|
4652
|
-
).max(POST_PURCHASE_SKIP_LIMIT);
|
|
4653
|
-
var PostPurchaseShadowReportFields = z88.object({
|
|
4654
|
-
differences: z88.array(z88.enum(["verdict", "entry", "targeting", "incomplete-capture", "unsupported-configuration"])).refine((differences) => new Set(differences).size === differences.length, {
|
|
4655
|
-
message: "differences must not contain duplicate entries"
|
|
4656
|
-
}),
|
|
4657
|
-
legacySelection: PostPurchaseShadowSelectionSchema,
|
|
4658
|
-
phase: z88.literal("shouldRender"),
|
|
4659
|
-
sampleId: z88.string(),
|
|
4660
|
-
/** Optional so rows and senders from before REB-25425 stay valid; never part of the classification. */
|
|
4661
|
-
serverFlowOutcomes: PostPurchaseShadowFlowOutcomesSchema.optional(),
|
|
4662
|
-
serverSelection: PostPurchaseShadowSelectionSchema.optional(),
|
|
4663
|
-
/**
|
|
4664
|
-
* Set by the sender when the Decider skipped, `incomplete` reports included (which carry no
|
|
4665
|
-
* `serverSelection`). Not validated against `serverSelection`, and never part of the classification.
|
|
4666
|
-
*/
|
|
4667
|
-
serverSkipReason: PostPurchaseShadowSkipReasonSchema.optional(),
|
|
4668
|
-
status: z88.enum(["match", "diverged", "incomplete"]),
|
|
4669
|
-
targetingFlowIds: z88.array(z88.number().int().positive()),
|
|
4670
|
-
workflowPhase: z88.literal("decide")
|
|
4671
|
-
});
|
|
4672
|
-
var PostPurchaseShadowReportSchema = PostPurchaseShadowReportFields.refine(
|
|
4673
|
-
(report) => report.status !== "match" || report.differences.length === 0,
|
|
4674
|
-
{ message: "status 'match' requires an empty differences array", path: ["status"] }
|
|
4675
|
-
).refine((report) => report.status !== "diverged" || report.differences.length > 0, {
|
|
4676
|
-
message: "status 'diverged' requires a non-empty differences array",
|
|
4677
|
-
path: ["status"]
|
|
4678
|
-
}).refine((report) => report.status !== "diverged" || report.serverSelection !== void 0, {
|
|
4679
|
-
message: "status 'diverged' requires a serverSelection to diverge from",
|
|
4680
|
-
path: ["status"]
|
|
4704
|
+
var PostPurchaseOrderPendingSchema = z89.object({
|
|
4705
|
+
errors: z89.array(z89.object({ message: z89.string() })),
|
|
4706
|
+
message: z89.string(),
|
|
4707
|
+
reason: z89.literal("order-pending"),
|
|
4708
|
+
successful: z89.literal(false)
|
|
4681
4709
|
});
|
|
4682
4710
|
|
|
4683
4711
|
// src/schema/postPurchaseSubscriptionProduct.ts
|
|
4684
|
-
import { z as
|
|
4712
|
+
import { z as z90 } from "zod";
|
|
4685
4713
|
var PreparedPostPurchaseSubscription = PreparedPostPurchaseProduct.extend({
|
|
4686
|
-
selection: PreparedPostPurchaseProduct.shape.selection.extend({ sellingPlanId:
|
|
4714
|
+
selection: PreparedPostPurchaseProduct.shape.selection.extend({ sellingPlanId: z90.number().int().positive() }),
|
|
4687
4715
|
terms: PreparedPostPurchaseProduct.shape.terms.extend({
|
|
4688
4716
|
subscription: PostPurchaseSubscriptionTerms
|
|
4689
4717
|
}).refine(
|
|
@@ -4697,93 +4725,93 @@ var readPostPurchaseSubscription = (prepared) => {
|
|
|
4697
4725
|
};
|
|
4698
4726
|
|
|
4699
4727
|
// src/schema/postPurchaseVariantDefault.ts
|
|
4700
|
-
import { z as
|
|
4728
|
+
import { z as z91 } from "zod";
|
|
4701
4729
|
var values = PostPurchaseVariantValues.partial().extend({
|
|
4702
4730
|
option1: PostPurchaseVariantValues.shape.option1.nullish()
|
|
4703
4731
|
});
|
|
4704
4732
|
var variant = values.extend({
|
|
4705
4733
|
id: PostPurchaseVariantId,
|
|
4706
|
-
inventoryManagement:
|
|
4707
|
-
inventoryPolicy:
|
|
4708
|
-
inventoryQuantity:
|
|
4734
|
+
inventoryManagement: z91.string().nullable(),
|
|
4735
|
+
inventoryPolicy: z91.string(),
|
|
4736
|
+
inventoryQuantity: z91.number()
|
|
4709
4737
|
});
|
|
4710
|
-
var options =
|
|
4711
|
-
var PostPurchaseVariantDefaultProduct =
|
|
4738
|
+
var options = z91.array(PostPurchaseVariantOption.pick({ name: true, values: true }));
|
|
4739
|
+
var PostPurchaseVariantDefaultProduct = z91.object({
|
|
4712
4740
|
id: PostPurchaseProductId,
|
|
4713
4741
|
options,
|
|
4714
4742
|
selectedVariant: variant.optional(),
|
|
4715
|
-
variants:
|
|
4743
|
+
variants: z91.array(variant)
|
|
4716
4744
|
});
|
|
4717
4745
|
var PostPurchaseVariantDefaultSettings = PostPurchaseSettings.shape.productOptions.pick({
|
|
4718
4746
|
hideOutOfStockVariants: true,
|
|
4719
4747
|
matchVariant: true
|
|
4720
4748
|
});
|
|
4721
|
-
var PostPurchaseOrderAttributes =
|
|
4722
|
-
var PostPurchaseOriginalVariants =
|
|
4723
|
-
|
|
4749
|
+
var PostPurchaseOrderAttributes = z91.record(z91.string(), z91.array(z91.string())).default({});
|
|
4750
|
+
var PostPurchaseOriginalVariants = z91.array(
|
|
4751
|
+
z91.object({ productId: PostPurchaseProductId, variantId: PostPurchaseVariantId })
|
|
4724
4752
|
);
|
|
4725
|
-
var PostPurchaseAttributeProducts =
|
|
4726
|
-
|
|
4753
|
+
var PostPurchaseAttributeProducts = z91.array(
|
|
4754
|
+
z91.object({ id: PostPurchaseProductId, options, variants: z91.array(values.extend({ id: PostPurchaseVariantId })) })
|
|
4727
4755
|
);
|
|
4728
4756
|
|
|
4729
4757
|
// src/schema/postPurchaseVariantDefaultContext.ts
|
|
4730
|
-
import { z as
|
|
4731
|
-
var PostPurchaseVariantDefaultContext =
|
|
4732
|
-
enrichedLineItems:
|
|
4758
|
+
import { z as z92 } from "zod";
|
|
4759
|
+
var PostPurchaseVariantDefaultContext = z92.object({
|
|
4760
|
+
enrichedLineItems: z92.unknown().optional(),
|
|
4733
4761
|
originalVariants: PostPurchaseOriginalVariants
|
|
4734
4762
|
});
|
|
4735
4763
|
|
|
4736
4764
|
// src/schema/shopConfig.ts
|
|
4737
|
-
import { z as
|
|
4738
|
-
var ShopConfig =
|
|
4739
|
-
activeExperiments:
|
|
4740
|
-
|
|
4741
|
-
data:
|
|
4742
|
-
|
|
4743
|
-
aliasName:
|
|
4744
|
-
cssInput:
|
|
4745
|
-
elementId:
|
|
4746
|
-
id:
|
|
4747
|
-
javascriptInput:
|
|
4748
|
-
traffic:
|
|
4765
|
+
import { z as z93 } from "zod";
|
|
4766
|
+
var ShopConfig = z93.object({
|
|
4767
|
+
activeExperiments: z93.array(
|
|
4768
|
+
z93.object({
|
|
4769
|
+
data: z93.array(
|
|
4770
|
+
z93.object({
|
|
4771
|
+
aliasName: z93.string(),
|
|
4772
|
+
cssInput: z93.string().nullish(),
|
|
4773
|
+
elementId: z93.coerce.number(),
|
|
4774
|
+
id: z93.coerce.number(),
|
|
4775
|
+
javascriptInput: z93.string().nullish(),
|
|
4776
|
+
traffic: z93.coerce.number()
|
|
4749
4777
|
})
|
|
4750
4778
|
),
|
|
4751
|
-
id:
|
|
4752
|
-
name:
|
|
4753
|
-
pageTarget:
|
|
4754
|
-
pageTargetUrl:
|
|
4755
|
-
placeholderId:
|
|
4756
|
-
type:
|
|
4779
|
+
id: z93.coerce.number(),
|
|
4780
|
+
name: z93.string(),
|
|
4781
|
+
pageTarget: z93.string().nullable(),
|
|
4782
|
+
pageTargetUrl: z93.string().nullable(),
|
|
4783
|
+
placeholderId: z93.coerce.number().nullable(),
|
|
4784
|
+
type: z93.string()
|
|
4757
4785
|
})
|
|
4758
4786
|
),
|
|
4759
|
-
activePackages:
|
|
4760
|
-
|
|
4761
|
-
cancelledAt:
|
|
4762
|
-
id:
|
|
4763
|
-
installedAt:
|
|
4764
|
-
isActive:
|
|
4765
|
-
isBillable:
|
|
4766
|
-
packageId:
|
|
4767
|
-
packageName:
|
|
4768
|
-
shortName:
|
|
4769
|
-
trialDays:
|
|
4770
|
-
uninstalledAt:
|
|
4787
|
+
activePackages: z93.array(
|
|
4788
|
+
z93.object({
|
|
4789
|
+
cancelledAt: z93.string().nullable(),
|
|
4790
|
+
id: z93.number(),
|
|
4791
|
+
installedAt: z93.string().nullable(),
|
|
4792
|
+
isActive: z93.boolean(),
|
|
4793
|
+
isBillable: z93.boolean(),
|
|
4794
|
+
packageId: z93.number(),
|
|
4795
|
+
packageName: z93.string(),
|
|
4796
|
+
shortName: z93.string(),
|
|
4797
|
+
trialDays: z93.number(),
|
|
4798
|
+
uninstalledAt: z93.string().nullable()
|
|
4771
4799
|
})
|
|
4772
4800
|
),
|
|
4773
|
-
apiKey:
|
|
4774
|
-
billingVersion:
|
|
4775
|
-
cacheKey:
|
|
4776
|
-
carousel:
|
|
4777
|
-
currency:
|
|
4778
|
-
currencySymbol:
|
|
4779
|
-
domain:
|
|
4780
|
-
enabledJquery:
|
|
4781
|
-
enabledPresentmentCurrencies:
|
|
4782
|
-
hasSmartCollectionsEnabled:
|
|
4783
|
-
hasSmartSearchEnabled:
|
|
4784
|
-
id:
|
|
4785
|
-
integrations:
|
|
4786
|
-
|
|
4801
|
+
apiKey: z93.string(),
|
|
4802
|
+
billingVersion: z93.string().nullable(),
|
|
4803
|
+
cacheKey: z93.coerce.number(),
|
|
4804
|
+
carousel: z93.enum(["flickity", "splide"]),
|
|
4805
|
+
currency: z93.string(),
|
|
4806
|
+
currencySymbol: z93.string(),
|
|
4807
|
+
domain: z93.string(),
|
|
4808
|
+
enabledJquery: z93.boolean(),
|
|
4809
|
+
enabledPresentmentCurrencies: z93.array(z93.string()),
|
|
4810
|
+
hasSmartCollectionsEnabled: z93.boolean(),
|
|
4811
|
+
hasSmartSearchEnabled: z93.boolean(),
|
|
4812
|
+
id: z93.coerce.number(),
|
|
4813
|
+
integrations: z93.record(
|
|
4814
|
+
z93.enum([
|
|
4787
4815
|
"attentive",
|
|
4788
4816
|
"judgeme",
|
|
4789
4817
|
"junip",
|
|
@@ -4796,30 +4824,30 @@ var ShopConfig = z92.object({
|
|
|
4796
4824
|
"stamped",
|
|
4797
4825
|
"yotpo"
|
|
4798
4826
|
]),
|
|
4799
|
-
|
|
4827
|
+
z93.union([z93.boolean(), z93.unknown()])
|
|
4800
4828
|
),
|
|
4801
|
-
markets:
|
|
4802
|
-
enabled:
|
|
4829
|
+
markets: z93.object({
|
|
4830
|
+
enabled: z93.boolean()
|
|
4803
4831
|
}),
|
|
4804
|
-
monetize:
|
|
4805
|
-
publisherKey:
|
|
4832
|
+
monetize: z93.object({
|
|
4833
|
+
publisherKey: z93.string().nullable()
|
|
4806
4834
|
}).nullish(),
|
|
4807
|
-
moneyFormat:
|
|
4808
|
-
myshopifyDomain:
|
|
4809
|
-
primaryLocale:
|
|
4810
|
-
productGroupsEnabled:
|
|
4811
|
-
rechargeCustomDomain:
|
|
4812
|
-
sellingPlansEnabled:
|
|
4813
|
-
shopId:
|
|
4814
|
-
shopifySellingPlansEnabled:
|
|
4815
|
-
shopName:
|
|
4816
|
-
storefrontAccessToken:
|
|
4817
|
-
useRebuyIcons:
|
|
4835
|
+
moneyFormat: z93.string(),
|
|
4836
|
+
myshopifyDomain: z93.string(),
|
|
4837
|
+
primaryLocale: z93.string(),
|
|
4838
|
+
productGroupsEnabled: z93.enum(["no", "yes"]).transform((value) => value === "yes"),
|
|
4839
|
+
rechargeCustomDomain: z93.string().nullable(),
|
|
4840
|
+
sellingPlansEnabled: z93.boolean(),
|
|
4841
|
+
shopId: z93.number(),
|
|
4842
|
+
shopifySellingPlansEnabled: z93.boolean(),
|
|
4843
|
+
shopName: z93.string(),
|
|
4844
|
+
storefrontAccessToken: z93.string().nullable(),
|
|
4845
|
+
useRebuyIcons: z93.boolean()
|
|
4818
4846
|
});
|
|
4819
4847
|
|
|
4820
4848
|
// src/schema/userConfig.ts
|
|
4821
|
-
import { z as
|
|
4822
|
-
var UserConfig =
|
|
4849
|
+
import { z as z94 } from "zod";
|
|
4850
|
+
var UserConfig = z94.object({
|
|
4823
4851
|
shop: ShopConfig,
|
|
4824
4852
|
/**
|
|
4825
4853
|
* Parsed like `CabUserConfig.smartCart`: the engine's `false` reads as `null` ({@link EngineSmartCart}), a
|
|
@@ -4830,140 +4858,140 @@ var UserConfig = z93.object({
|
|
|
4830
4858
|
* exported from `./schema`, so a consumer could not tell it apart from an empty config anyway.
|
|
4831
4859
|
*/
|
|
4832
4860
|
smartCart: EngineSmartCart.catch(void 0),
|
|
4833
|
-
smartFlows:
|
|
4861
|
+
smartFlows: z94.array(z94.unknown())
|
|
4834
4862
|
});
|
|
4835
4863
|
|
|
4836
4864
|
// src/schema/widgetData.ts
|
|
4837
|
-
import { z as
|
|
4865
|
+
import { z as z103 } from "zod";
|
|
4838
4866
|
|
|
4839
4867
|
// src/schema/widgets/abTestingPlaceholder.ts
|
|
4840
|
-
import { z as
|
|
4841
|
-
var ABTestingPlaceholder =
|
|
4842
|
-
type:
|
|
4868
|
+
import { z as z95 } from "zod";
|
|
4869
|
+
var ABTestingPlaceholder = z95.looseObject({
|
|
4870
|
+
type: z95.literal("placeholder")
|
|
4843
4871
|
});
|
|
4844
4872
|
|
|
4845
4873
|
// src/schema/widgets/checkoutExtension.ts
|
|
4846
|
-
import { z as
|
|
4847
|
-
var CheckoutExtension =
|
|
4848
|
-
type:
|
|
4874
|
+
import { z as z96 } from "zod";
|
|
4875
|
+
var CheckoutExtension = z96.looseObject({
|
|
4876
|
+
type: z96.literal(WidgetType.shopify_checkout_extension).default(WidgetType.shopify_checkout_extension)
|
|
4849
4877
|
});
|
|
4850
4878
|
|
|
4851
4879
|
// src/schema/widgets/contentBlock.ts
|
|
4852
|
-
import { z as
|
|
4853
|
-
var ContentBlockV1 =
|
|
4854
|
-
blockSpacing:
|
|
4855
|
-
imageBlocks:
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
altText:
|
|
4859
|
-
description:
|
|
4860
|
-
id:
|
|
4861
|
-
imagePlacement:
|
|
4862
|
-
imageSize:
|
|
4863
|
-
imageUrl:
|
|
4864
|
-
textAlignment:
|
|
4880
|
+
import { z as z97 } from "zod";
|
|
4881
|
+
var ContentBlockV1 = z97.object({
|
|
4882
|
+
blockSpacing: z97.enum(spacings).optional(),
|
|
4883
|
+
imageBlocks: z97.union([
|
|
4884
|
+
z97.array(
|
|
4885
|
+
z97.object({
|
|
4886
|
+
altText: z97.string().nullable(),
|
|
4887
|
+
description: z97.string().nullable(),
|
|
4888
|
+
id: z97.uuid(),
|
|
4889
|
+
imagePlacement: z97.enum(["top", "right", "bottom", "left"]),
|
|
4890
|
+
imageSize: z97.number(),
|
|
4891
|
+
imageUrl: z97.url(),
|
|
4892
|
+
textAlignment: z97.enum(["left", "center", "right"]),
|
|
4865
4893
|
/** Inline scale only: an image caption can never be a block-level heading. */
|
|
4866
|
-
textSize:
|
|
4894
|
+
textSize: z97.enum(inlineTextSizeNames)
|
|
4867
4895
|
})
|
|
4868
4896
|
),
|
|
4869
|
-
|
|
4897
|
+
z97.strictObject({}).transform(() => [])
|
|
4870
4898
|
]).optional(),
|
|
4871
|
-
imageLayout:
|
|
4872
|
-
language:
|
|
4873
|
-
description:
|
|
4874
|
-
superTitle:
|
|
4875
|
-
title:
|
|
4899
|
+
imageLayout: z97.enum(["row", "column"]).optional(),
|
|
4900
|
+
language: z97.object({
|
|
4901
|
+
description: z97.string(),
|
|
4902
|
+
superTitle: z97.string(),
|
|
4903
|
+
title: z97.string()
|
|
4876
4904
|
}),
|
|
4877
|
-
previewMode:
|
|
4878
|
-
type:
|
|
4879
|
-
version:
|
|
4905
|
+
previewMode: z97.boolean(),
|
|
4906
|
+
type: z97.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block),
|
|
4907
|
+
version: z97.literal(1)
|
|
4880
4908
|
});
|
|
4881
|
-
var ContentBlock =
|
|
4909
|
+
var ContentBlock = z97.discriminatedUnion("version", [
|
|
4882
4910
|
ContentBlockV1,
|
|
4883
4911
|
CABRootSection.extend({
|
|
4884
|
-
type:
|
|
4912
|
+
type: z97.literal(WidgetType.ui_extension_content_block).default(WidgetType.ui_extension_content_block)
|
|
4885
4913
|
})
|
|
4886
4914
|
]);
|
|
4887
4915
|
|
|
4888
4916
|
// src/schema/widgets/giftWithPurchase.ts
|
|
4889
|
-
import { z as
|
|
4890
|
-
var GiftWithPurchase =
|
|
4891
|
-
type:
|
|
4917
|
+
import { z as z98 } from "zod";
|
|
4918
|
+
var GiftWithPurchase = z98.looseObject({
|
|
4919
|
+
type: z98.literal(WidgetType.gift_with_purchase).default(WidgetType.gift_with_purchase)
|
|
4892
4920
|
});
|
|
4893
4921
|
|
|
4894
4922
|
// src/schema/widgets/lineItemEditor.ts
|
|
4895
|
-
import { z as
|
|
4896
|
-
var LineItemEditorSwitchLanguageV1 =
|
|
4897
|
-
downgradeToOneTimeLabel:
|
|
4923
|
+
import { z as z99 } from "zod";
|
|
4924
|
+
var LineItemEditorSwitchLanguageV1 = z99.object({
|
|
4925
|
+
downgradeToOneTimeLabel: z99.string().optional(),
|
|
4898
4926
|
/** Frequency-option template (`{{frequency}}`/`{{interval}}`) for the plan select. */
|
|
4899
|
-
subscriptionOptionLabel:
|
|
4900
|
-
upgradeToSubscriptionLabel:
|
|
4901
|
-
upgradeToSubscriptionWithoutDiscountLabel:
|
|
4927
|
+
subscriptionOptionLabel: z99.string().optional(),
|
|
4928
|
+
upgradeToSubscriptionLabel: z99.string().optional(),
|
|
4929
|
+
upgradeToSubscriptionWithoutDiscountLabel: z99.string().optional()
|
|
4902
4930
|
});
|
|
4903
|
-
var LineItemEditorV1 =
|
|
4931
|
+
var LineItemEditorV1 = z99.object({
|
|
4904
4932
|
/** Legacy `getStyles` button style; the converter carries a valid kind, defaulting to `plain`. */
|
|
4905
|
-
button:
|
|
4906
|
-
previewMode:
|
|
4907
|
-
switchToSubscription:
|
|
4908
|
-
disableDowngrade:
|
|
4933
|
+
button: z99.object({ kind: z99.enum(["plain", "primary", "secondary"]).optional() }).optional(),
|
|
4934
|
+
previewMode: z99.boolean().optional(),
|
|
4935
|
+
switchToSubscription: z99.object({
|
|
4936
|
+
disableDowngrade: z99.boolean().optional(),
|
|
4909
4937
|
language: LineItemEditorSwitchLanguageV1.optional()
|
|
4910
4938
|
}).optional(),
|
|
4911
|
-
switchToSubscriptionEnabled:
|
|
4912
|
-
tracking:
|
|
4913
|
-
enableAttribution:
|
|
4914
|
-
enableSource:
|
|
4915
|
-
enableWidget:
|
|
4939
|
+
switchToSubscriptionEnabled: z99.boolean().optional(),
|
|
4940
|
+
tracking: z99.object({
|
|
4941
|
+
enableAttribution: z99.boolean().optional(),
|
|
4942
|
+
enableSource: z99.boolean().optional(),
|
|
4943
|
+
enableWidget: z99.boolean().optional()
|
|
4916
4944
|
}).optional(),
|
|
4917
|
-
type:
|
|
4918
|
-
version:
|
|
4945
|
+
type: z99.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor),
|
|
4946
|
+
version: z99.literal(1)
|
|
4919
4947
|
});
|
|
4920
|
-
var LineItemEditor =
|
|
4948
|
+
var LineItemEditor = z99.discriminatedUnion("version", [
|
|
4921
4949
|
LineItemEditorV1,
|
|
4922
4950
|
CABRootSection.extend({
|
|
4923
|
-
type:
|
|
4951
|
+
type: z99.literal(WidgetType.ui_extension_line_item_editor).default(WidgetType.ui_extension_line_item_editor)
|
|
4924
4952
|
})
|
|
4925
4953
|
]);
|
|
4926
4954
|
|
|
4927
4955
|
// src/schema/widgets/progressBar.ts
|
|
4928
|
-
import { z as
|
|
4929
|
-
var ProgressBar =
|
|
4930
|
-
type:
|
|
4956
|
+
import { z as z100 } from "zod";
|
|
4957
|
+
var ProgressBar = z100.looseObject({
|
|
4958
|
+
type: z100.literal(WidgetType.ui_extension_progress_bar).default(WidgetType.ui_extension_progress_bar)
|
|
4931
4959
|
});
|
|
4932
4960
|
|
|
4933
4961
|
// src/schema/widgets/rebuyButton.ts
|
|
4934
|
-
import { z as
|
|
4935
|
-
var RebuyButtonV1 =
|
|
4936
|
-
type:
|
|
4937
|
-
version:
|
|
4962
|
+
import { z as z101 } from "zod";
|
|
4963
|
+
var RebuyButtonV1 = z101.looseObject({
|
|
4964
|
+
type: z101.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button),
|
|
4965
|
+
version: z101.literal(1)
|
|
4938
4966
|
});
|
|
4939
|
-
var RebuyButton =
|
|
4967
|
+
var RebuyButton = z101.discriminatedUnion("version", [
|
|
4940
4968
|
RebuyButtonV1,
|
|
4941
4969
|
CABRootSection.extend({
|
|
4942
|
-
type:
|
|
4970
|
+
type: z101.literal(WidgetType.ui_extension_button).default(WidgetType.ui_extension_button)
|
|
4943
4971
|
})
|
|
4944
4972
|
]);
|
|
4945
4973
|
|
|
4946
4974
|
// src/schema/widgets/rebuyMonetize.ts
|
|
4947
|
-
import { z as
|
|
4948
|
-
var RebuyMonetize =
|
|
4949
|
-
type:
|
|
4975
|
+
import { z as z102 } from "zod";
|
|
4976
|
+
var RebuyMonetize = z102.looseObject({
|
|
4977
|
+
type: z102.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad)
|
|
4950
4978
|
});
|
|
4951
|
-
var RebuyMonetizeV1 =
|
|
4952
|
-
name:
|
|
4953
|
-
previewMode:
|
|
4979
|
+
var RebuyMonetizeV1 = z102.object({
|
|
4980
|
+
name: z102.string().nullable().optional(),
|
|
4981
|
+
previewMode: z102.boolean().optional(),
|
|
4954
4982
|
/** Privacy Policy footer href → the marker section's `privacyPolicyUrl`. */
|
|
4955
|
-
privacyPolicyUrl:
|
|
4983
|
+
privacyPolicyUrl: z102.string().nullable().optional(),
|
|
4956
4984
|
/** Ads-taxonomy sub-vertical id — one of the admin Monetize editor's two configurables. */
|
|
4957
|
-
subVertical:
|
|
4958
|
-
tracking:
|
|
4959
|
-
enableAttribution:
|
|
4960
|
-
enableSource:
|
|
4961
|
-
enableWidget:
|
|
4985
|
+
subVertical: z102.string().nullable().optional(),
|
|
4986
|
+
tracking: z102.object({
|
|
4987
|
+
enableAttribution: z102.boolean().optional(),
|
|
4988
|
+
enableSource: z102.boolean().optional(),
|
|
4989
|
+
enableWidget: z102.boolean().optional()
|
|
4962
4990
|
}).optional(),
|
|
4963
|
-
type:
|
|
4964
|
-
version:
|
|
4991
|
+
type: z102.literal(WidgetType.ui_extension_ad).default(WidgetType.ui_extension_ad),
|
|
4992
|
+
version: z102.literal(1),
|
|
4965
4993
|
/** Ads-taxonomy vertical id — one of the admin Monetize editor's two configurables. */
|
|
4966
|
-
vertical:
|
|
4994
|
+
vertical: z102.string().nullable().optional()
|
|
4967
4995
|
});
|
|
4968
4996
|
|
|
4969
4997
|
// src/schema/widgetData.ts
|
|
@@ -4977,7 +5005,7 @@ var extensionWidgetTypes = [
|
|
|
4977
5005
|
WidgetType.ui_extension_line_item_editor,
|
|
4978
5006
|
WidgetType.ui_extension_progress_bar
|
|
4979
5007
|
];
|
|
4980
|
-
var WidgetData =
|
|
5008
|
+
var WidgetData = z103.discriminatedUnion("type", [
|
|
4981
5009
|
ABTestingPlaceholder,
|
|
4982
5010
|
CheckoutExtension,
|
|
4983
5011
|
ContentBlock,
|
|
@@ -5337,36 +5365,36 @@ var SWITCH_LABELS = {
|
|
|
5337
5365
|
};
|
|
5338
5366
|
|
|
5339
5367
|
// src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
|
|
5340
|
-
import { z as
|
|
5368
|
+
import { z as z105 } from "zod";
|
|
5341
5369
|
|
|
5342
5370
|
// src/schema/widgets/post-purchase-offer/postPurchaseWidget.ts
|
|
5343
|
-
import { z as
|
|
5344
|
-
var PostPurchaseWidgetLinkedFlow =
|
|
5345
|
-
id:
|
|
5346
|
-
name:
|
|
5347
|
-
});
|
|
5348
|
-
var PostPurchaseWidget =
|
|
5349
|
-
classification:
|
|
5350
|
-
createdAtTime:
|
|
5351
|
-
customEndpointName:
|
|
5352
|
-
id:
|
|
5353
|
-
lastViewed:
|
|
5354
|
-
linkedCustomEndpointId:
|
|
5355
|
-
linkedFlows:
|
|
5356
|
-
name:
|
|
5357
|
-
owner:
|
|
5371
|
+
import { z as z104 } from "zod";
|
|
5372
|
+
var PostPurchaseWidgetLinkedFlow = z104.object({
|
|
5373
|
+
id: z104.number(),
|
|
5374
|
+
name: z104.string()
|
|
5375
|
+
});
|
|
5376
|
+
var PostPurchaseWidget = z104.object({
|
|
5377
|
+
classification: z104.literal("post_purchase_offer_page").default("post_purchase_offer_page"),
|
|
5378
|
+
createdAtTime: z104.iso.datetime({ offset: true }).optional(),
|
|
5379
|
+
customEndpointName: z104.string().nullish(),
|
|
5380
|
+
id: z104.number().default(0),
|
|
5381
|
+
lastViewed: z104.iso.datetime({ offset: true }).nullish(),
|
|
5382
|
+
linkedCustomEndpointId: z104.number().nullish(),
|
|
5383
|
+
linkedFlows: z104.array(PostPurchaseWidgetLinkedFlow).optional(),
|
|
5384
|
+
name: z104.string().default(""),
|
|
5385
|
+
owner: z104.number().nullish(),
|
|
5358
5386
|
settings: PostPurchaseSettings
|
|
5359
5387
|
});
|
|
5360
5388
|
|
|
5361
5389
|
// src/schema/widgets/post-purchase-offer/postPurchaseOffer.ts
|
|
5362
|
-
var PostPurchaseOffer =
|
|
5363
|
-
|
|
5364
|
-
errors:
|
|
5365
|
-
message:
|
|
5366
|
-
successful:
|
|
5390
|
+
var PostPurchaseOffer = z105.discriminatedUnion("successful", [
|
|
5391
|
+
z105.strictObject({
|
|
5392
|
+
errors: z105.array(z105.object({ message: z105.string() })),
|
|
5393
|
+
message: z105.string(),
|
|
5394
|
+
successful: z105.literal(false)
|
|
5367
5395
|
}),
|
|
5368
|
-
|
|
5369
|
-
successful:
|
|
5396
|
+
z105.strictObject({
|
|
5397
|
+
successful: z105.literal(true),
|
|
5370
5398
|
widget: PostPurchaseWidget
|
|
5371
5399
|
})
|
|
5372
5400
|
]);
|
|
@@ -6842,10 +6870,12 @@ export {
|
|
|
6842
6870
|
HealthResultRequestSchema,
|
|
6843
6871
|
HealthResultResponseSchema,
|
|
6844
6872
|
HealthResultSchema,
|
|
6873
|
+
HealthResultStatusSchema,
|
|
6845
6874
|
HealthScheduleAcknowledgementSchema,
|
|
6846
6875
|
HealthScheduleReceiptSchema,
|
|
6847
6876
|
HealthScheduleSchema,
|
|
6848
6877
|
HealthSchedulingResponseSchema,
|
|
6878
|
+
HealthStandingStatusSchema,
|
|
6849
6879
|
HealthStateSchema,
|
|
6850
6880
|
HoldSettingSchema,
|
|
6851
6881
|
HorizontalAlignment,
|
|
@@ -6891,6 +6921,8 @@ export {
|
|
|
6891
6921
|
PostPurchaseChoice,
|
|
6892
6922
|
PostPurchaseCollectionChoice,
|
|
6893
6923
|
PostPurchaseCommonReviewRating,
|
|
6924
|
+
PostPurchaseDecisionTimingSchema,
|
|
6925
|
+
PostPurchaseDecisionTraceSchema,
|
|
6894
6926
|
PostPurchaseDiscount,
|
|
6895
6927
|
PostPurchaseDisplayPrice,
|
|
6896
6928
|
PostPurchaseEndReasonSchema,
|