@rebuy/rebuy 3.34.0 → 3.36.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 +1003 -801
- package/dist/index.mjs +1005 -803
- package/dist/schema/index.d.ts +8 -0
- package/dist/schema/postPurchaseGroup.d.ts +15 -0
- package/dist/schema/postPurchaseGroupCatalog.d.ts +56 -0
- package/dist/schema/postPurchaseOfferEligibility.d.ts +32 -0
- package/dist/schema/postPurchaseOfferPresentation.d.ts +386 -0
- package/dist/schema/postPurchaseProduct.d.ts +74 -24
- package/dist/schema/postPurchaseProductCalculation.d.ts +87 -0
- package/dist/schema/postPurchaseProductCollectionView.d.ts +724 -3
- package/dist/schema/postPurchaseProductDisplay.d.ts +41 -12
- package/dist/schema/postPurchaseProductSource.d.ts +10 -5
- package/dist/schema/postPurchaseProductView.d.ts +708 -0
- package/dist/schema/postPurchaseQuantity.d.ts +26 -0
- package/dist/schema/postPurchaseSubscriptionProduct.d.ts +74 -17
- package/dist/schema/postPurchaseVariantDefault.d.ts +17 -0
- package/dist/schema/postPurchaseVariantDefaultContext.d.ts +10 -0
- package/dist/server/__fixtures__/postPurchaseGroup.d.ts +78 -0
- package/dist/server/classifyPostPurchaseOffer.d.ts +3 -0
- package/dist/server/createPostPurchaseOrderAttributes.d.ts +9 -0
- package/dist/server/index.cjs +1131 -210
- package/dist/server/index.d.ts +20 -2
- package/dist/server/index.mjs +1131 -210
- package/dist/server/postPurchaseMemberEligibility.d.ts +7 -0
- package/dist/server/postPurchaseOfferCopy.d.ts +3 -0
- package/dist/server/postPurchaseProductDisplay.d.ts +38 -6
- package/dist/server/postPurchaseProductEligibility.d.ts +3 -7
- package/dist/server/postPurchaseSubscriptionEligibility.d.ts +2 -3
- package/dist/server/prepareNormalizedSubscription.d.ts +2 -3
- package/dist/server/preparePostPurchaseAdmissionView.d.ts +418 -0
- package/dist/server/preparePostPurchaseCollectionGroup.d.ts +458 -0
- package/dist/server/preparePostPurchaseCollectionView.d.ts +442 -0
- package/dist/server/preparePostPurchaseGroupAdmissionView.d.ts +459 -0
- package/dist/server/preparePostPurchaseGroupDeclineDisplay.d.ts +12 -0
- package/dist/server/preparePostPurchaseGroupDefault.d.ts +459 -0
- package/dist/server/preparePostPurchaseGroupView.d.ts +458 -0
- package/dist/server/preparePostPurchaseMemberView.d.ts +1466 -0
- package/dist/server/preparePostPurchaseOfferPresentation.d.ts +137 -0
- package/dist/server/preparePostPurchaseProduct.d.ts +11 -0
- package/dist/server/preparePostPurchaseQuantityAdmissionView.d.ts +440 -0
- package/dist/server/preparePostPurchaseQuantityView.d.ts +427 -0
- package/dist/server/preparePostPurchaseSubscription.d.ts +37 -5
- package/dist/server/preparePostPurchaseView.d.ts +8 -0
- package/dist/server/projectPostPurchaseProduct.d.ts +42 -12
- package/dist/server/readPostPurchaseGroup.d.ts +101 -0
- package/dist/server/readPostPurchaseGroupSelection.d.ts +110 -0
- package/dist/server/readPostPurchaseQuantity.d.ts +27 -0
- package/dist/server/resolvePostPurchaseMemberDefault.d.ts +8 -0
- package/dist/server/selectPostPurchaseChoice.d.ts +2 -3
- package/dist/transforms/postPurchase/convertDescriptionRte.d.ts +11 -0
- package/package.json +1 -1
|
@@ -5,8 +5,49 @@ export declare const PostPurchasePrimaryImageSource: z.ZodDefault<z.ZodString>;
|
|
|
5
5
|
* in, but that reader (and the nine provider formats behind it) is Slice 26's "Review providers" module.
|
|
6
6
|
* Slice 26 extends this schema and `projectPostPurchaseProductDisplay`'s return value with the field
|
|
7
7
|
* together, rather than this Slice carrying an always-null placeholder for it.
|
|
8
|
+
*
|
|
9
|
+
* The merchant's rich description is carried only as the standard CAB `descriptionDocument`, converted from
|
|
10
|
+
* the post-purchase editor's custom `descriptionRte` (whose block spacing it absorbs), so no consumer ever
|
|
11
|
+
* sees the custom shape.
|
|
8
12
|
*/
|
|
9
13
|
export declare const PostPurchaseProductDisplay: z.ZodObject<{
|
|
14
|
+
descriptionDocument: z.ZodOptional<z.ZodObject<{
|
|
15
|
+
attrs: z.ZodDefault<z.ZodObject<{
|
|
16
|
+
blockSpacing: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose" | undefined, string>>>;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
content: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
19
|
+
attrs: z.ZodDefault<z.ZodObject<{
|
|
20
|
+
textAlign: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"start" | "center" | "end" | undefined, string>>>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
content: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
23
|
+
marks: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
24
|
+
type: z.ZodLiteral<"bold">;
|
|
25
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
26
|
+
type: z.ZodLiteral<"italic">;
|
|
27
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
28
|
+
attrs: z.ZodObject<{
|
|
29
|
+
class: z.ZodNullable<z.ZodString>;
|
|
30
|
+
href: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"#">, z.ZodString, z.ZodString]>;
|
|
31
|
+
rel: z.ZodDefault<z.ZodString>;
|
|
32
|
+
target: z.ZodDefault<z.ZodString>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
type: z.ZodLiteral<"link">;
|
|
35
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
36
|
+
type: z.ZodLiteral<"strike">;
|
|
37
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
38
|
+
attrs: z.ZodObject<{
|
|
39
|
+
color: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"success" | "warning" | "critical" | "base" | "decorative" | "subdued" | "accent" | undefined, string>>>>;
|
|
40
|
+
fontSize: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | "heading" | undefined, string>>>>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
type: z.ZodLiteral<"textStyle">;
|
|
43
|
+
}, z.core.$strip>], "type">>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
|
|
44
|
+
text: z.ZodDefault<z.ZodString>;
|
|
45
|
+
type: z.ZodDefault<z.ZodLiteral<"text">>;
|
|
46
|
+
}, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
|
|
47
|
+
type: z.ZodDefault<z.ZodLiteral<"paragraph">>;
|
|
48
|
+
}, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
|
|
49
|
+
type: z.ZodDefault<z.ZodLiteral<"doc">>;
|
|
50
|
+
}, z.core.$strip>>;
|
|
10
51
|
discountedFrom: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
11
52
|
price: "price";
|
|
12
53
|
compare_at_price: "compare_at_price";
|
|
@@ -23,18 +64,6 @@ export declare const PostPurchaseProductDisplay: z.ZodObject<{
|
|
|
23
64
|
language: z.ZodObject<{
|
|
24
65
|
description: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodUnknown, z.ZodTransform<string, unknown>>]>>;
|
|
25
66
|
descriptionEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
26
|
-
descriptionRte: z.ZodOptional<z.ZodObject<{
|
|
27
|
-
content: z.ZodArray<z.ZodUnknown>;
|
|
28
|
-
type: z.ZodString;
|
|
29
|
-
}, z.core.$strip>>;
|
|
30
|
-
descriptionSpacing: z.ZodOptional<z.ZodEnum<{
|
|
31
|
-
default: "default";
|
|
32
|
-
none: "none";
|
|
33
|
-
tight: "tight";
|
|
34
|
-
loose: "loose";
|
|
35
|
-
xtight: "xtight";
|
|
36
|
-
xloose: "xloose";
|
|
37
|
-
}>>;
|
|
38
67
|
}, z.core.$strip>;
|
|
39
68
|
primaryImage: z.ZodObject<{
|
|
40
69
|
description: z.ZodString;
|
|
@@ -4,11 +4,16 @@ export declare const PostPurchaseAmount: z.ZodString;
|
|
|
4
4
|
export declare const PostPurchaseProductId: z.ZodNumber;
|
|
5
5
|
export declare const PostPurchaseVariantId: z.ZodNumber;
|
|
6
6
|
/**
|
|
7
|
-
* The data-source product/variant response shape `normalizePostPurchaseProduct` validates.
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
7
|
+
* The data-source product/variant response shape `normalizePostPurchaseProduct` validates.
|
|
8
|
+
*
|
|
9
|
+
* `metadata.productQuantity` is **new behaviour**, kept per decision 15 because the rebuild already implemented
|
|
10
|
+
* it: legacy `initializeProduct.ts:100-104` read it, but its schema stripped `metadata` first, so no merchant ever
|
|
11
|
+
* had a metadata quantity override (L82, reconciliation F2). Here it is the initial quantity ahead of the picker
|
|
12
|
+
* default, read by `readPostPurchaseQuantity` and `projectPostPurchaseProduct` alike.
|
|
13
|
+
*
|
|
14
|
+
* `recommendedVariantIds`, by contrast, is deliberately not declared here (decision 15): the legacy build never
|
|
15
|
+
* delivered the v2-recommendation branch it fed (the equivalent legacy schema stripped the field before any
|
|
16
|
+
* reader ran), and the rebuild had dropped that step, so an undeclared key is simply dropped by `.parse()`.
|
|
12
17
|
*
|
|
13
18
|
* The `unknown` product/variant fields (`options`, `option1–3`, selling-plan fields, `selectedVariant`,
|
|
14
19
|
* `productGroupVariants`, `metafields`) are likewise parsed at their point of use — e.g.
|