@rebuy/rebuy 3.35.0 → 3.37.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 +799 -648
- package/dist/index.mjs +799 -648
- package/dist/schema/index.d.ts +4 -0
- package/dist/schema/postPurchaseGroup.d.ts +15 -0
- package/dist/schema/postPurchaseProduct.d.ts +102 -24
- package/dist/schema/postPurchaseProductCalculation.d.ts +87 -0
- package/dist/schema/postPurchaseProductCollectionView.d.ts +738 -3
- package/dist/schema/postPurchaseProductDisplay.d.ts +57 -16
- package/dist/schema/postPurchaseProductReviews.d.ts +36 -0
- package/dist/schema/postPurchaseProductView.d.ts +722 -0
- package/dist/schema/postPurchaseQuantity.d.ts +16 -3
- package/dist/schema/postPurchaseSubscriptionProduct.d.ts +98 -17
- package/dist/server/__fixtures__/postPurchaseGroup.d.ts +3 -0
- package/dist/server/__fixtures__/postPurchaseReviewProviders.d.ts +30 -0
- package/dist/server/__fixtures__/postPurchaseReviews.d.ts +67 -0
- package/dist/server/index.cjs +1014 -348
- package/dist/server/index.d.ts +13 -2
- package/dist/server/index.mjs +1014 -348
- package/dist/server/postPurchaseJudgeMeReviews.d.ts +6 -0
- package/dist/server/postPurchaseOkendoReviews.d.ts +6 -0
- package/dist/server/postPurchaseProductDisplay.d.ts +49 -7
- package/dist/server/postPurchaseReviewData.d.ts +7 -0
- package/dist/server/postPurchaseReviewFields.d.ts +7 -0
- package/dist/server/postPurchaseReviewProvider.d.ts +2 -0
- package/dist/server/postPurchaseReviews.d.ts +5 -0
- package/dist/server/postPurchaseScalarReviews.d.ts +6 -0
- package/dist/server/prepareNormalizedSubscription.d.ts +2 -2
- package/dist/server/preparePostPurchaseAdmissionView.d.ts +428 -0
- package/dist/server/preparePostPurchaseCollectionGroup.d.ts +468 -0
- package/dist/server/preparePostPurchaseCollectionView.d.ts +452 -0
- package/dist/server/preparePostPurchaseGroupAdmissionView.d.ts +469 -0
- package/dist/server/preparePostPurchaseGroupDefault.d.ts +469 -0
- package/dist/server/preparePostPurchaseGroupView.d.ts +468 -0
- package/dist/server/preparePostPurchaseMemberView.d.ts +1496 -0
- package/dist/server/preparePostPurchaseProduct.d.ts +8 -0
- package/dist/server/preparePostPurchaseQuantityAdmissionView.d.ts +450 -0
- package/dist/server/preparePostPurchaseQuantityView.d.ts +437 -0
- package/dist/server/preparePostPurchaseSubscription.d.ts +47 -5
- package/dist/server/preparePostPurchaseView.d.ts +8 -0
- package/dist/server/projectPostPurchaseProduct.d.ts +49 -6
- package/dist/transforms/postPurchase/convertDescriptionRte.d.ts +11 -0
- package/package.json +1 -1
|
@@ -1,12 +1,51 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const PostPurchasePrimaryImageSource: z.ZodDefault<z.ZodString>;
|
|
3
3
|
/**
|
|
4
|
-
* `reviews` is
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* `reviews` is the optional aggregate from `projectPostPurchaseReviews` (see `docs/post-purchase-reviews.md`):
|
|
5
|
+
* null when disabled, missing, zero-rated or unreadable, never a reason to refuse the Offer.
|
|
6
|
+
*
|
|
7
|
+
* The merchant's rich description is carried only as the standard CAB `descriptionDocument`, converted from
|
|
8
|
+
* the post-purchase editor's custom `descriptionRte` (whose block spacing it absorbs), so no consumer ever
|
|
9
|
+
* sees the custom shape.
|
|
8
10
|
*/
|
|
9
11
|
export declare const PostPurchaseProductDisplay: z.ZodObject<{
|
|
12
|
+
descriptionDocument: z.ZodOptional<z.ZodObject<{
|
|
13
|
+
attrs: z.ZodDefault<z.ZodObject<{
|
|
14
|
+
blockSpacing: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose" | undefined, string>>>;
|
|
15
|
+
}, z.core.$strip>>;
|
|
16
|
+
content: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
17
|
+
attrs: z.ZodDefault<z.ZodObject<{
|
|
18
|
+
textAlign: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"start" | "center" | "end" | undefined, string>>>;
|
|
19
|
+
}, z.core.$strip>>;
|
|
20
|
+
content: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
21
|
+
marks: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
22
|
+
type: z.ZodLiteral<"bold">;
|
|
23
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
24
|
+
type: z.ZodLiteral<"italic">;
|
|
25
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
26
|
+
attrs: z.ZodObject<{
|
|
27
|
+
class: z.ZodNullable<z.ZodString>;
|
|
28
|
+
href: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"#">, z.ZodString, z.ZodString]>;
|
|
29
|
+
rel: z.ZodDefault<z.ZodString>;
|
|
30
|
+
target: z.ZodDefault<z.ZodString>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
type: z.ZodLiteral<"link">;
|
|
33
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
34
|
+
type: z.ZodLiteral<"strike">;
|
|
35
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
36
|
+
attrs: z.ZodObject<{
|
|
37
|
+
color: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"success" | "warning" | "critical" | "base" | "decorative" | "subdued" | "accent" | undefined, string>>>>;
|
|
38
|
+
fontSize: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | "heading" | undefined, string>>>>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
type: z.ZodLiteral<"textStyle">;
|
|
41
|
+
}, z.core.$strip>], "type">>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
|
|
42
|
+
text: z.ZodDefault<z.ZodString>;
|
|
43
|
+
type: z.ZodDefault<z.ZodLiteral<"text">>;
|
|
44
|
+
}, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
|
|
45
|
+
type: z.ZodDefault<z.ZodLiteral<"paragraph">>;
|
|
46
|
+
}, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
|
|
47
|
+
type: z.ZodDefault<z.ZodLiteral<"doc">>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
10
49
|
discountedFrom: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
11
50
|
price: "price";
|
|
12
51
|
compare_at_price: "compare_at_price";
|
|
@@ -23,18 +62,6 @@ export declare const PostPurchaseProductDisplay: z.ZodObject<{
|
|
|
23
62
|
language: z.ZodObject<{
|
|
24
63
|
description: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodUnknown, z.ZodTransform<string, unknown>>]>>;
|
|
25
64
|
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
65
|
}, z.core.$strip>;
|
|
39
66
|
primaryImage: z.ZodObject<{
|
|
40
67
|
description: z.ZodString;
|
|
@@ -54,6 +81,20 @@ export declare const PostPurchaseProductDisplay: z.ZodObject<{
|
|
|
54
81
|
showVariantSelectors: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
55
82
|
}, z.core.$strip>;
|
|
56
83
|
responseDescription: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodUnknown, z.ZodTransform<string, unknown>>]>>;
|
|
84
|
+
reviews: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
85
|
+
color: z.ZodString;
|
|
86
|
+
rating: z.ZodNumber;
|
|
87
|
+
reviewCount: z.ZodNumber;
|
|
88
|
+
reviewsPlural: z.ZodString;
|
|
89
|
+
reviewsSingular: z.ZodString;
|
|
90
|
+
size: z.ZodEnum<{
|
|
91
|
+
small: "small";
|
|
92
|
+
large: "large";
|
|
93
|
+
medium: "medium";
|
|
94
|
+
}>;
|
|
95
|
+
strokeColor: z.ZodString;
|
|
96
|
+
strokeWidth: z.ZodNumber;
|
|
97
|
+
}, z.core.$strip>>>;
|
|
57
98
|
shouldShowSavingText: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
58
99
|
}, z.core.$strip>;
|
|
59
100
|
export type PostPurchaseProductDisplay = z.infer<typeof PostPurchaseProductDisplay>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** CAB's common Shopify format accepts a value without Klaviyo's scale envelope. */
|
|
3
|
+
export declare const PostPurchaseCommonReviewRating: z.ZodObject<{
|
|
4
|
+
value: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodNumber>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const PostPurchaseKlaviyoReviewRating: z.ZodObject<{
|
|
7
|
+
value: z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodNumber>;
|
|
8
|
+
scale_max: z.ZodNonOptional<z.ZodUnknown>;
|
|
9
|
+
scale_min: z.ZodNonOptional<z.ZodUnknown>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const PostPurchaseReviewCount: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>, z.ZodNumber>;
|
|
12
|
+
export declare const PostPurchaseReviewStyles: z.ZodPrefault<z.ZodObject<{
|
|
13
|
+
starColor: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
14
|
+
starSize: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
15
|
+
small: "small";
|
|
16
|
+
large: "large";
|
|
17
|
+
medium: "medium";
|
|
18
|
+
}>, z.ZodPipe<z.ZodUnknown, z.ZodTransform<string, unknown>>]>>>;
|
|
19
|
+
starStrokeColor: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
20
|
+
strokeWidth: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodNumber>>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
export declare const PostPurchaseProductReviews: z.ZodObject<{
|
|
23
|
+
color: z.ZodString;
|
|
24
|
+
rating: z.ZodNumber;
|
|
25
|
+
reviewCount: z.ZodNumber;
|
|
26
|
+
reviewsPlural: z.ZodString;
|
|
27
|
+
reviewsSingular: z.ZodString;
|
|
28
|
+
size: z.ZodEnum<{
|
|
29
|
+
small: "small";
|
|
30
|
+
large: "large";
|
|
31
|
+
medium: "medium";
|
|
32
|
+
}>;
|
|
33
|
+
strokeColor: z.ZodString;
|
|
34
|
+
strokeWidth: z.ZodNumber;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export type PostPurchaseProductReviews = z.infer<typeof PostPurchaseProductReviews>;
|