@rebuy/rebuy 3.35.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 +689 -571
- package/dist/index.mjs +689 -571
- package/dist/schema/index.d.ts +3 -0
- package/dist/schema/postPurchaseGroup.d.ts +15 -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/postPurchaseProductView.d.ts +708 -0
- package/dist/schema/postPurchaseQuantity.d.ts +16 -3
- package/dist/schema/postPurchaseSubscriptionProduct.d.ts +74 -17
- package/dist/server/__fixtures__/postPurchaseGroup.d.ts +3 -0
- package/dist/server/index.cjs +818 -310
- package/dist/server/index.d.ts +13 -2
- package/dist/server/index.mjs +818 -310
- package/dist/server/postPurchaseProductDisplay.d.ts +38 -6
- 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/preparePostPurchaseGroupDefault.d.ts +459 -0
- package/dist/server/preparePostPurchaseGroupView.d.ts +458 -0
- package/dist/server/preparePostPurchaseMemberView.d.ts +1466 -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 +37 -5
- package/dist/transforms/postPurchase/convertDescriptionRte.d.ts +11 -0
- package/package.json +1 -1
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
/** One member's buyer choice plus an optional explicit quantity. */
|
|
3
|
+
export declare const PostPurchaseQuantityChoice: z.ZodObject<{
|
|
4
|
+
choice: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5
|
+
mode: z.ZodLiteral<"one-time">;
|
|
6
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
7
|
+
mode: z.ZodLiteral<"subscription">;
|
|
8
|
+
sellingPlanId: z.ZodNumber;
|
|
9
|
+
}, z.core.$strict>], "mode">>;
|
|
10
|
+
productId: z.ZodNumber;
|
|
11
|
+
variantId: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export type PostPurchaseQuantityChoice = z.infer<typeof PostPurchaseQuantityChoice>;
|
|
2
15
|
/**
|
|
3
|
-
* Today's picker bounds plus the trusted initial quantity
|
|
4
|
-
*
|
|
5
|
-
*
|
|
16
|
+
* Today's picker bounds plus the trusted initial quantity. A minimum of 0, which the settings schema accepts and
|
|
17
|
+
* maps unreadable values to, floors at 1: nothing can be bought at 0, and legacy still rendered that picker, so
|
|
18
|
+
* it must not refuse the Offer.
|
|
6
19
|
*/
|
|
7
20
|
export declare const PostPurchaseQuantityPolicy: z.ZodObject<{
|
|
8
21
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -2,6 +2,43 @@ import { z } from 'zod';
|
|
|
2
2
|
import { PreparedPostPurchaseProduct } from './postPurchaseProduct';
|
|
3
3
|
export declare const PreparedPostPurchaseSubscription: z.ZodObject<{
|
|
4
4
|
display: z.ZodObject<{
|
|
5
|
+
descriptionDocument: z.ZodOptional<z.ZodObject<{
|
|
6
|
+
attrs: z.ZodDefault<z.ZodObject<{
|
|
7
|
+
blockSpacing: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose" | undefined, string>>>;
|
|
8
|
+
}, z.core.$strip>>;
|
|
9
|
+
content: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
10
|
+
attrs: z.ZodDefault<z.ZodObject<{
|
|
11
|
+
textAlign: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"start" | "center" | "end" | undefined, string>>>;
|
|
12
|
+
}, z.core.$strip>>;
|
|
13
|
+
content: z.ZodDefault<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
14
|
+
marks: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
15
|
+
type: z.ZodLiteral<"bold">;
|
|
16
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
17
|
+
type: z.ZodLiteral<"italic">;
|
|
18
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
19
|
+
attrs: z.ZodObject<{
|
|
20
|
+
class: z.ZodNullable<z.ZodString>;
|
|
21
|
+
href: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"#">, z.ZodString, z.ZodString]>;
|
|
22
|
+
rel: z.ZodDefault<z.ZodString>;
|
|
23
|
+
target: z.ZodDefault<z.ZodString>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
type: z.ZodLiteral<"link">;
|
|
26
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
27
|
+
type: z.ZodLiteral<"strike">;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
attrs: z.ZodObject<{
|
|
30
|
+
color: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"success" | "warning" | "critical" | "base" | "decorative" | "subdued" | "accent" | undefined, string>>>>;
|
|
31
|
+
fontSize: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<"small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | "heading" | undefined, string>>>>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
type: z.ZodLiteral<"textStyle">;
|
|
34
|
+
}, z.core.$strip>], "type">>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
|
|
35
|
+
text: z.ZodDefault<z.ZodString>;
|
|
36
|
+
type: z.ZodDefault<z.ZodLiteral<"text">>;
|
|
37
|
+
}, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
|
|
38
|
+
type: z.ZodDefault<z.ZodLiteral<"paragraph">>;
|
|
39
|
+
}, z.core.$strip>>, z.ZodPipe<z.ZodObject<{}, z.core.$strict>, z.ZodTransform<never[], Record<string, never>>>]>>;
|
|
40
|
+
type: z.ZodDefault<z.ZodLiteral<"doc">>;
|
|
41
|
+
}, z.core.$strip>>;
|
|
5
42
|
discountedFrom: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
6
43
|
price: "price";
|
|
7
44
|
compare_at_price: "compare_at_price";
|
|
@@ -18,18 +55,6 @@ export declare const PreparedPostPurchaseSubscription: z.ZodObject<{
|
|
|
18
55
|
language: z.ZodObject<{
|
|
19
56
|
description: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodPipe<z.ZodUnknown, z.ZodTransform<string, unknown>>]>>;
|
|
20
57
|
descriptionEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
21
|
-
descriptionRte: z.ZodOptional<z.ZodObject<{
|
|
22
|
-
content: z.ZodArray<z.ZodUnknown>;
|
|
23
|
-
type: z.ZodString;
|
|
24
|
-
}, z.core.$strip>>;
|
|
25
|
-
descriptionSpacing: z.ZodOptional<z.ZodEnum<{
|
|
26
|
-
default: "default";
|
|
27
|
-
none: "none";
|
|
28
|
-
tight: "tight";
|
|
29
|
-
loose: "loose";
|
|
30
|
-
xtight: "xtight";
|
|
31
|
-
xloose: "xloose";
|
|
32
|
-
}>>;
|
|
33
58
|
}, z.core.$strip>;
|
|
34
59
|
primaryImage: z.ZodObject<{
|
|
35
60
|
description: z.ZodString;
|
|
@@ -131,11 +156,6 @@ export declare const readPostPurchaseSubscription: (prepared: z.infer<typeof Pre
|
|
|
131
156
|
language: {
|
|
132
157
|
description: string;
|
|
133
158
|
descriptionEnabled: boolean;
|
|
134
|
-
descriptionRte?: {
|
|
135
|
-
content: unknown[];
|
|
136
|
-
type: string;
|
|
137
|
-
} | undefined;
|
|
138
|
-
descriptionSpacing?: "default" | "none" | "tight" | "loose" | "xtight" | "xloose" | undefined;
|
|
139
159
|
};
|
|
140
160
|
primaryImage: {
|
|
141
161
|
description: string;
|
|
@@ -151,6 +171,43 @@ export declare const readPostPurchaseSubscription: (prepared: z.infer<typeof Pre
|
|
|
151
171
|
};
|
|
152
172
|
responseDescription: string;
|
|
153
173
|
shouldShowSavingText: boolean;
|
|
174
|
+
descriptionDocument?: {
|
|
175
|
+
attrs: {
|
|
176
|
+
blockSpacing?: "none" | "base" | "extraTight" | "tight" | "loose" | "extraLoose" | undefined;
|
|
177
|
+
};
|
|
178
|
+
content: never[] | {
|
|
179
|
+
attrs: {
|
|
180
|
+
textAlign?: "start" | "center" | "end" | undefined;
|
|
181
|
+
};
|
|
182
|
+
content: never[] | {
|
|
183
|
+
text: string;
|
|
184
|
+
type: "text";
|
|
185
|
+
marks?: never[] | ({
|
|
186
|
+
type: "bold";
|
|
187
|
+
} | {
|
|
188
|
+
type: "italic";
|
|
189
|
+
} | {
|
|
190
|
+
attrs: {
|
|
191
|
+
class: string | null;
|
|
192
|
+
href: string;
|
|
193
|
+
rel: string;
|
|
194
|
+
target: string;
|
|
195
|
+
};
|
|
196
|
+
type: "link";
|
|
197
|
+
} | {
|
|
198
|
+
type: "strike";
|
|
199
|
+
} | {
|
|
200
|
+
attrs: {
|
|
201
|
+
color: "success" | "warning" | "critical" | "base" | "decorative" | "subdued" | "accent";
|
|
202
|
+
fontSize: "small" | "base" | "large" | "medium" | "extraSmall" | "extraLarge" | "heading";
|
|
203
|
+
};
|
|
204
|
+
type: "textStyle";
|
|
205
|
+
})[] | undefined;
|
|
206
|
+
}[];
|
|
207
|
+
type: "paragraph";
|
|
208
|
+
}[];
|
|
209
|
+
type: "doc";
|
|
210
|
+
} | undefined;
|
|
154
211
|
gallery?: {
|
|
155
212
|
images: {
|
|
156
213
|
description: string;
|