@goldenhippo/builder-cart-schemas 0.1.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/README.md +141 -0
- package/dist/data/index.d.mts +604 -0
- package/dist/data/index.d.ts +604 -0
- package/dist/data/index.js +3487 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data/index.mjs +3476 -0
- package/dist/data/index.mjs.map +1 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4233 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +4219 -0
- package/dist/index.mjs.map +1 -0
- package/dist/page/index.d.mts +147 -0
- package/dist/page/index.d.ts +147 -0
- package/dist/page/index.js +691 -0
- package/dist/page/index.js.map +1 -0
- package/dist/page/index.mjs +689 -0
- package/dist/page/index.mjs.map +1 -0
- package/dist/section/index.d.mts +22 -0
- package/dist/section/index.d.ts +22 -0
- package/dist/section/index.js +63 -0
- package/dist/section/index.js.map +1 -0
- package/dist/section/index.mjs +60 -0
- package/dist/section/index.mjs.map +1 -0
- package/package.json +100 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { BuilderResponseBaseData, ModelShape } from '@goldenhippo/builder-types';
|
|
2
|
+
import { BuilderContent } from '@builder.io/sdk';
|
|
3
|
+
|
|
4
|
+
interface PageModelInputProps {
|
|
5
|
+
productModelId: string;
|
|
6
|
+
productGroupModelId: string;
|
|
7
|
+
categoryModelId: string;
|
|
8
|
+
bannerModelId: string;
|
|
9
|
+
blogCategoryModelId: string;
|
|
10
|
+
editUrl: string;
|
|
11
|
+
}
|
|
12
|
+
declare enum PageTypes {
|
|
13
|
+
GENERAL = "General",
|
|
14
|
+
PRODUCT = "Product",
|
|
15
|
+
BLOG = "Blog"
|
|
16
|
+
}
|
|
17
|
+
declare enum PdpTypes {
|
|
18
|
+
PRODUCT = "Product",
|
|
19
|
+
PRODUCT_GROUP = "Product Group"
|
|
20
|
+
}
|
|
21
|
+
declare enum OfferSelectorTypes {
|
|
22
|
+
VERTICAL = "Vertical",
|
|
23
|
+
VERTICAL__FLAVOR_DROPDOWN__TYPE_TOGGLE = "Vertical - Flavor Dropdown - Type Toggle",
|
|
24
|
+
STACKED__FLAVOR_BUTTONS__QUANTITY_TOGGLE = "Stacked - Flavor Buttons - Quantity Toggle"
|
|
25
|
+
}
|
|
26
|
+
declare enum OfferSelectorSliderTypes {
|
|
27
|
+
SLIDER_A = "Slider A",
|
|
28
|
+
SLIDER_B = "Slider B"
|
|
29
|
+
}
|
|
30
|
+
declare enum OfferSelectorDefaultPurchaseType {
|
|
31
|
+
ONE_TIME = "One-Time Purchase",
|
|
32
|
+
SUBSCRIPTION = "Subscription"
|
|
33
|
+
}
|
|
34
|
+
declare enum OfferSelectorSavingsType {
|
|
35
|
+
PERCENT = "percentage",
|
|
36
|
+
DOLLAR = "dollar"
|
|
37
|
+
}
|
|
38
|
+
declare const createPageModel: (props: PageModelInputProps) => ModelShape;
|
|
39
|
+
type BasePageData = {
|
|
40
|
+
title: string;
|
|
41
|
+
pageType: 'Product' | 'Blog' | 'General';
|
|
42
|
+
heading?: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
seoImage?: string;
|
|
45
|
+
search?: {
|
|
46
|
+
title?: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
hide?: boolean;
|
|
49
|
+
content?: string;
|
|
50
|
+
};
|
|
51
|
+
banners?: {
|
|
52
|
+
banner: string;
|
|
53
|
+
}[];
|
|
54
|
+
disableStickyHeader?: boolean;
|
|
55
|
+
showBundleDrawer?: boolean;
|
|
56
|
+
robotsMeta?: {
|
|
57
|
+
noIndex?: boolean;
|
|
58
|
+
noFollow?: boolean;
|
|
59
|
+
noArchive?: boolean;
|
|
60
|
+
noImageIndex?: boolean;
|
|
61
|
+
noSnippet?: boolean;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
type BuilderPdpPageContent = BuilderContent & Partial<{
|
|
65
|
+
data: BuilderResponseBaseData & BasePageData & {
|
|
66
|
+
type: PdpTypes.PRODUCT;
|
|
67
|
+
pdp?: {
|
|
68
|
+
type: PdpTypes;
|
|
69
|
+
product?: {
|
|
70
|
+
id: string;
|
|
71
|
+
name: string;
|
|
72
|
+
};
|
|
73
|
+
productGroup?: {
|
|
74
|
+
id: string;
|
|
75
|
+
name: string;
|
|
76
|
+
};
|
|
77
|
+
slides?: {
|
|
78
|
+
image: string;
|
|
79
|
+
}[];
|
|
80
|
+
slideThumbs?: {
|
|
81
|
+
image: string;
|
|
82
|
+
}[];
|
|
83
|
+
sliderComponent?: OfferSelectorSliderTypes;
|
|
84
|
+
hideNativeOfferSelector?: boolean;
|
|
85
|
+
offerSelector: {
|
|
86
|
+
osType: OfferSelectorTypes;
|
|
87
|
+
features: {
|
|
88
|
+
defaultPurchaseType?: OfferSelectorDefaultPurchaseType;
|
|
89
|
+
preferredQuantity?: number;
|
|
90
|
+
showSavings?: boolean;
|
|
91
|
+
savingsType?: OfferSelectorSavingsType;
|
|
92
|
+
showMemberPriceMessage?: boolean;
|
|
93
|
+
showSubscriptionPriceMessage?: boolean;
|
|
94
|
+
scrollToTopOffset?: number;
|
|
95
|
+
enableAnonymousSubscriptions?: boolean;
|
|
96
|
+
};
|
|
97
|
+
labels: {
|
|
98
|
+
actionButton?: string;
|
|
99
|
+
subscriptionOffer?: string;
|
|
100
|
+
memberOffer?: string;
|
|
101
|
+
subscriptionToggle?: string;
|
|
102
|
+
otpToggle?: string;
|
|
103
|
+
outOfStock?: string;
|
|
104
|
+
outOfStockFormSuccess?: string;
|
|
105
|
+
scrollButton?: string;
|
|
106
|
+
flavorSelector?: string;
|
|
107
|
+
};
|
|
108
|
+
bestSellerImage?: string;
|
|
109
|
+
bestValueImage?: string;
|
|
110
|
+
cssOverrides?: {
|
|
111
|
+
signupOfferCustomCssProps?: Record<string, string>;
|
|
112
|
+
signupOfferPriceCustomCssProps?: Record<string, string>;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
category?: {
|
|
116
|
+
id: string;
|
|
117
|
+
name: string;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
}>;
|
|
122
|
+
type BuilderBlogPageContent = BuilderContent & Partial<{
|
|
123
|
+
data: BuilderResponseBaseData & BasePageData & {
|
|
124
|
+
type: PageTypes.BLOG;
|
|
125
|
+
blog?: {
|
|
126
|
+
title?: string;
|
|
127
|
+
publicationDate?: string;
|
|
128
|
+
snippet?: string;
|
|
129
|
+
author?: string;
|
|
130
|
+
thumbnail?: string;
|
|
131
|
+
categories?: {
|
|
132
|
+
category: {
|
|
133
|
+
id: string;
|
|
134
|
+
name: string;
|
|
135
|
+
};
|
|
136
|
+
}[];
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
}>;
|
|
140
|
+
type BuilderGeneralPageContent = BuilderContent & Partial<{
|
|
141
|
+
data: BuilderResponseBaseData & BasePageData & {
|
|
142
|
+
type: PageTypes.GENERAL | undefined;
|
|
143
|
+
};
|
|
144
|
+
}>;
|
|
145
|
+
type BuilderPageContent = BuilderPdpPageContent | BuilderBlogPageContent | BuilderGeneralPageContent;
|
|
146
|
+
|
|
147
|
+
export { type BuilderBlogPageContent, type BuilderGeneralPageContent, type BuilderPageContent, type BuilderPdpPageContent, createPageModel };
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { BuilderResponseBaseData, ModelShape } from '@goldenhippo/builder-types';
|
|
2
|
+
import { BuilderContent } from '@builder.io/sdk';
|
|
3
|
+
|
|
4
|
+
interface PageModelInputProps {
|
|
5
|
+
productModelId: string;
|
|
6
|
+
productGroupModelId: string;
|
|
7
|
+
categoryModelId: string;
|
|
8
|
+
bannerModelId: string;
|
|
9
|
+
blogCategoryModelId: string;
|
|
10
|
+
editUrl: string;
|
|
11
|
+
}
|
|
12
|
+
declare enum PageTypes {
|
|
13
|
+
GENERAL = "General",
|
|
14
|
+
PRODUCT = "Product",
|
|
15
|
+
BLOG = "Blog"
|
|
16
|
+
}
|
|
17
|
+
declare enum PdpTypes {
|
|
18
|
+
PRODUCT = "Product",
|
|
19
|
+
PRODUCT_GROUP = "Product Group"
|
|
20
|
+
}
|
|
21
|
+
declare enum OfferSelectorTypes {
|
|
22
|
+
VERTICAL = "Vertical",
|
|
23
|
+
VERTICAL__FLAVOR_DROPDOWN__TYPE_TOGGLE = "Vertical - Flavor Dropdown - Type Toggle",
|
|
24
|
+
STACKED__FLAVOR_BUTTONS__QUANTITY_TOGGLE = "Stacked - Flavor Buttons - Quantity Toggle"
|
|
25
|
+
}
|
|
26
|
+
declare enum OfferSelectorSliderTypes {
|
|
27
|
+
SLIDER_A = "Slider A",
|
|
28
|
+
SLIDER_B = "Slider B"
|
|
29
|
+
}
|
|
30
|
+
declare enum OfferSelectorDefaultPurchaseType {
|
|
31
|
+
ONE_TIME = "One-Time Purchase",
|
|
32
|
+
SUBSCRIPTION = "Subscription"
|
|
33
|
+
}
|
|
34
|
+
declare enum OfferSelectorSavingsType {
|
|
35
|
+
PERCENT = "percentage",
|
|
36
|
+
DOLLAR = "dollar"
|
|
37
|
+
}
|
|
38
|
+
declare const createPageModel: (props: PageModelInputProps) => ModelShape;
|
|
39
|
+
type BasePageData = {
|
|
40
|
+
title: string;
|
|
41
|
+
pageType: 'Product' | 'Blog' | 'General';
|
|
42
|
+
heading?: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
seoImage?: string;
|
|
45
|
+
search?: {
|
|
46
|
+
title?: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
hide?: boolean;
|
|
49
|
+
content?: string;
|
|
50
|
+
};
|
|
51
|
+
banners?: {
|
|
52
|
+
banner: string;
|
|
53
|
+
}[];
|
|
54
|
+
disableStickyHeader?: boolean;
|
|
55
|
+
showBundleDrawer?: boolean;
|
|
56
|
+
robotsMeta?: {
|
|
57
|
+
noIndex?: boolean;
|
|
58
|
+
noFollow?: boolean;
|
|
59
|
+
noArchive?: boolean;
|
|
60
|
+
noImageIndex?: boolean;
|
|
61
|
+
noSnippet?: boolean;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
type BuilderPdpPageContent = BuilderContent & Partial<{
|
|
65
|
+
data: BuilderResponseBaseData & BasePageData & {
|
|
66
|
+
type: PdpTypes.PRODUCT;
|
|
67
|
+
pdp?: {
|
|
68
|
+
type: PdpTypes;
|
|
69
|
+
product?: {
|
|
70
|
+
id: string;
|
|
71
|
+
name: string;
|
|
72
|
+
};
|
|
73
|
+
productGroup?: {
|
|
74
|
+
id: string;
|
|
75
|
+
name: string;
|
|
76
|
+
};
|
|
77
|
+
slides?: {
|
|
78
|
+
image: string;
|
|
79
|
+
}[];
|
|
80
|
+
slideThumbs?: {
|
|
81
|
+
image: string;
|
|
82
|
+
}[];
|
|
83
|
+
sliderComponent?: OfferSelectorSliderTypes;
|
|
84
|
+
hideNativeOfferSelector?: boolean;
|
|
85
|
+
offerSelector: {
|
|
86
|
+
osType: OfferSelectorTypes;
|
|
87
|
+
features: {
|
|
88
|
+
defaultPurchaseType?: OfferSelectorDefaultPurchaseType;
|
|
89
|
+
preferredQuantity?: number;
|
|
90
|
+
showSavings?: boolean;
|
|
91
|
+
savingsType?: OfferSelectorSavingsType;
|
|
92
|
+
showMemberPriceMessage?: boolean;
|
|
93
|
+
showSubscriptionPriceMessage?: boolean;
|
|
94
|
+
scrollToTopOffset?: number;
|
|
95
|
+
enableAnonymousSubscriptions?: boolean;
|
|
96
|
+
};
|
|
97
|
+
labels: {
|
|
98
|
+
actionButton?: string;
|
|
99
|
+
subscriptionOffer?: string;
|
|
100
|
+
memberOffer?: string;
|
|
101
|
+
subscriptionToggle?: string;
|
|
102
|
+
otpToggle?: string;
|
|
103
|
+
outOfStock?: string;
|
|
104
|
+
outOfStockFormSuccess?: string;
|
|
105
|
+
scrollButton?: string;
|
|
106
|
+
flavorSelector?: string;
|
|
107
|
+
};
|
|
108
|
+
bestSellerImage?: string;
|
|
109
|
+
bestValueImage?: string;
|
|
110
|
+
cssOverrides?: {
|
|
111
|
+
signupOfferCustomCssProps?: Record<string, string>;
|
|
112
|
+
signupOfferPriceCustomCssProps?: Record<string, string>;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
category?: {
|
|
116
|
+
id: string;
|
|
117
|
+
name: string;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
}>;
|
|
122
|
+
type BuilderBlogPageContent = BuilderContent & Partial<{
|
|
123
|
+
data: BuilderResponseBaseData & BasePageData & {
|
|
124
|
+
type: PageTypes.BLOG;
|
|
125
|
+
blog?: {
|
|
126
|
+
title?: string;
|
|
127
|
+
publicationDate?: string;
|
|
128
|
+
snippet?: string;
|
|
129
|
+
author?: string;
|
|
130
|
+
thumbnail?: string;
|
|
131
|
+
categories?: {
|
|
132
|
+
category: {
|
|
133
|
+
id: string;
|
|
134
|
+
name: string;
|
|
135
|
+
};
|
|
136
|
+
}[];
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
}>;
|
|
140
|
+
type BuilderGeneralPageContent = BuilderContent & Partial<{
|
|
141
|
+
data: BuilderResponseBaseData & BasePageData & {
|
|
142
|
+
type: PageTypes.GENERAL | undefined;
|
|
143
|
+
};
|
|
144
|
+
}>;
|
|
145
|
+
type BuilderPageContent = BuilderPdpPageContent | BuilderBlogPageContent | BuilderGeneralPageContent;
|
|
146
|
+
|
|
147
|
+
export { type BuilderBlogPageContent, type BuilderGeneralPageContent, type BuilderPageContent, type BuilderPdpPageContent, createPageModel };
|