@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.
@@ -0,0 +1,604 @@
1
+ import { BuilderResponseBaseData, ModelShape } from '@goldenhippo/builder-types';
2
+ import { BuilderContent } from '@builder.io/sdk';
3
+
4
+ declare enum HeaderType {
5
+ BASIC = "BASIC",
6
+ MEDIUM = "MEDIUM",
7
+ MEGA = "MEGA",
8
+ NONE = "NONE",
9
+ DMP = "DMP"
10
+ }
11
+ interface BasicHeaderLink {
12
+ title: string;
13
+ href: string;
14
+ newTab: boolean;
15
+ cssClasses: string[];
16
+ }
17
+ declare enum BasicHeaderCTAType {
18
+ PRIMARY = "primary",
19
+ SECONDARY = "secondary",
20
+ OUTLINE = "outline",
21
+ LINK = "link"
22
+ }
23
+ declare enum MediumHeaderDropdownType {
24
+ SEARCH = "search",
25
+ LINKS = "links",
26
+ ACCOUNT_LINKS = "accountLinks",
27
+ HTML = "html",
28
+ TIMED_HTML = "timedHtml"
29
+ }
30
+ declare enum MediumHeaderDesktopContentType {
31
+ LINKS = "links",
32
+ LOGO = "logo",
33
+ ACCOUNT_LINKS = "accountLinks",
34
+ CART_COUNT = "cartCount",
35
+ HTML = "html"
36
+ }
37
+
38
+ declare enum FooterType {
39
+ BASIC = "BASIC",
40
+ MEGA = "MEGA",
41
+ NONE = "NONE"
42
+ }
43
+
44
+ declare enum ProductGridFilterType {
45
+ DROPDOWN = "Dropdown",
46
+ STACKED_LIST = "Stacked List"
47
+ }
48
+ declare enum ProductLinkPrefix {
49
+ P = "/p",
50
+ PRODUCT = "/product"
51
+ }
52
+
53
+ declare enum SubscriptionCancelReasons {
54
+ DoNotLike = "DoNotLike",
55
+ NotWorking = "NotWorking",
56
+ NoBenefits = "NoBenefits",
57
+ NoFitNoNeed = "NoFitNoNeed",
58
+ Budget = "Budget",
59
+ Mistake = "Mistake",
60
+ Try = "Try",
61
+ TooMuch = "TooMuch",
62
+ TravelMove = "TravelMove",
63
+ DoNotNeed = "DoNotNeed",
64
+ AnotherReason = "AnotherReason",
65
+ NotHelpingSkin = "NotHelpingSkin",
66
+ SkinImproved = "SkinImproved",
67
+ PetDoesNotLike = "PetDoesNotLike",
68
+ NotHelpingPet = "NotHelpingPet",
69
+ NoneGiven = "NoneGiven"
70
+ }
71
+ declare enum SubscriptionCancelButtonType {
72
+ Link = "link",
73
+ Update = "update",
74
+ Keep = "keep",
75
+ Continue = "continue",
76
+ Cancel = "cancel"
77
+ }
78
+
79
+ declare const createBrandConfigModel: (gridFilterModelId: string, bannerModelId: string) => ModelShape;
80
+ type BuilderBrandConfigContent = BuilderContent & Partial<{
81
+ data: BuilderResponseBaseData & {
82
+ brandDisplayName: string;
83
+ images: {
84
+ brandLogoSmall: string;
85
+ brandLogoLarge: string;
86
+ brandLogoFooter: string;
87
+ bbbImage: string;
88
+ };
89
+ links: {
90
+ termsLink: string;
91
+ subscriptionTermsLink: string;
92
+ privacyLink: string;
93
+ supportLink: string;
94
+ ccpaLink: string;
95
+ bbbLink: string;
96
+ accessibilityLink: string;
97
+ socialMedia: {
98
+ twitter: string;
99
+ facebook: string;
100
+ youtube: string;
101
+ instagram: string;
102
+ pinterest: string;
103
+ tiktok: string;
104
+ };
105
+ };
106
+ banners: {
107
+ banner: {
108
+ id: string;
109
+ name: string;
110
+ };
111
+ alwaysShow: boolean;
112
+ }[];
113
+ header: {
114
+ headerType: HeaderType;
115
+ basicHeaderConfig?: {
116
+ logoImage: string;
117
+ mobileLinks: BasicHeaderLink[];
118
+ desktopLinks: BasicHeaderLink[];
119
+ ctas: {
120
+ title: string;
121
+ href: string;
122
+ type: BasicHeaderCTAType;
123
+ newTab: boolean;
124
+ cssClasses: string[];
125
+ hideOnMobile: boolean;
126
+ }[];
127
+ myAccountGuest: BasicHeaderLink & {
128
+ icon: string;
129
+ }[];
130
+ myAccountAuthorized: BasicHeaderLink & {
131
+ icon: string;
132
+ };
133
+ stickyHeader: {
134
+ enabled: boolean;
135
+ backgroundColor: string;
136
+ scrollBackgroundColor: string;
137
+ scrollLogo: string;
138
+ };
139
+ showLocaleSelection: boolean;
140
+ };
141
+ mediumHeaderConfig?: {
142
+ wrapperID: string;
143
+ wrapperClasses: string;
144
+ showShippingMessage: boolean;
145
+ mobileMenu: {
146
+ logo: string;
147
+ logoClasses: string;
148
+ navClasses: string;
149
+ dropDownWrapperClasses: string;
150
+ dropDownContent: {
151
+ type: MediumHeaderDropdownType;
152
+ links: {
153
+ itemClasses: string;
154
+ loggedInOnly: boolean;
155
+ loggedOutOnly: boolean;
156
+ text: string;
157
+ URL: string;
158
+ subLinksWrapperClasses: string;
159
+ subLinks: {
160
+ text: string;
161
+ URL: string;
162
+ }[];
163
+ }[];
164
+ htmlContent: string;
165
+ inputs: {
166
+ defaultHtml: string;
167
+ temporaryHtml: string;
168
+ startTime: number;
169
+ endTime: number;
170
+ };
171
+ }[];
172
+ };
173
+ desktopMenu: {
174
+ logo: string;
175
+ navClasses: string;
176
+ content: {
177
+ type: MediumHeaderDesktopContentType;
178
+ wrapperClasses: string;
179
+ links: {
180
+ text: string;
181
+ URL: string;
182
+ loggedInOnly: boolean;
183
+ loggedOutOnly: boolean;
184
+ dropdownWrapperClasses: string;
185
+ dropdownItemClasses: string;
186
+ subLinks: {
187
+ columnHeaderTitle: string;
188
+ columnContentType: string;
189
+ links: {
190
+ text: string;
191
+ URL: string;
192
+ }[];
193
+ content: string;
194
+ inputs: {
195
+ defaultHtml: string;
196
+ temporaryHtml: string;
197
+ startTime: number;
198
+ endTime: number;
199
+ };
200
+ };
201
+ }[];
202
+ htmlContent: string;
203
+ }[];
204
+ };
205
+ bannersAboveHeader: {
206
+ wrapperClasses: string;
207
+ content: string;
208
+ }[];
209
+ contactUrl: string;
210
+ };
211
+ megaMenuConfig?: {
212
+ showShippingMessage: boolean;
213
+ mobileLinks: {
214
+ title: string;
215
+ href: string;
216
+ expanded: boolean;
217
+ links: {
218
+ title: string;
219
+ href: string;
220
+ }[];
221
+ }[];
222
+ desktopShopNavLinks: {
223
+ title: string;
224
+ links: {
225
+ title: string;
226
+ href: string;
227
+ }[];
228
+ shopAllLink: {
229
+ title: string;
230
+ href: string;
231
+ };
232
+ }[];
233
+ };
234
+ dmpHeaderConfig?: {
235
+ logoImage: string;
236
+ mobileLinks: {
237
+ title: string;
238
+ href: string;
239
+ }[];
240
+ desktopLinks: {
241
+ title: string;
242
+ href: string;
243
+ }[];
244
+ };
245
+ };
246
+ footer: {
247
+ footerType: FooterType;
248
+ };
249
+ features: {
250
+ productGridFilterType: ProductGridFilterType;
251
+ productGridFilterGroups: {
252
+ filterConfig: {
253
+ id: string;
254
+ };
255
+ }[];
256
+ productGridHideRestricted: boolean;
257
+ productLinkPrefix: ProductLinkPrefix;
258
+ subscriptionAddOnsEnabled: boolean;
259
+ shippingThresholdNotificationEnabled: boolean;
260
+ bundlingEnabled: boolean;
261
+ };
262
+ support: {
263
+ email: string;
264
+ phone: string;
265
+ phoneDisplay: string;
266
+ address: {
267
+ street: string;
268
+ city: string;
269
+ state: string;
270
+ zipcode: string;
271
+ };
272
+ addressString: string;
273
+ };
274
+ pageConfig: {
275
+ accountDetails: {
276
+ birthdayBannerConfig: {
277
+ content: string;
278
+ linkText: string;
279
+ linkUrl: string;
280
+ styles: {
281
+ display: string;
282
+ alignItems: string;
283
+ margin: string;
284
+ padding: string;
285
+ backgroundColor: string;
286
+ color: string;
287
+ };
288
+ };
289
+ };
290
+ cart: {
291
+ continueShoppingUrl: string;
292
+ imageContainerBGColor: string;
293
+ freeShippingBanner: {
294
+ isVisible: boolean;
295
+ loggedOutBannerContent: string;
296
+ loggedInBannerContent: string;
297
+ styles: {
298
+ backgroundColor: string;
299
+ color: string;
300
+ };
301
+ };
302
+ notices: {
303
+ securePaymentNotice: {
304
+ isVisible: boolean;
305
+ text: string;
306
+ styles: {
307
+ backgroundColor: string;
308
+ color: string;
309
+ };
310
+ };
311
+ };
312
+ };
313
+ checkout: {
314
+ freeShippingBanner: {
315
+ isVisible: boolean;
316
+ loggedOutBannerContent: string;
317
+ loggedInBannerContent: string;
318
+ };
319
+ securePaymentNotice: {
320
+ isVisible: boolean;
321
+ content: string;
322
+ };
323
+ autoSignUp: {
324
+ isVisible: boolean;
325
+ isChecked: boolean;
326
+ labelText: string;
327
+ helpModal: {
328
+ header: string;
329
+ content: string;
330
+ };
331
+ };
332
+ smsOptIn: {
333
+ isVisible: boolean;
334
+ title: string;
335
+ content: string;
336
+ };
337
+ };
338
+ orderDetails: {
339
+ title: string;
340
+ tableHeaderStyle: {
341
+ backgroundColor: string;
342
+ color: string;
343
+ };
344
+ tableContentStyle: {
345
+ backgroundColor: string;
346
+ };
347
+ buyItAgainButton: {
348
+ text: string;
349
+ classes: string;
350
+ };
351
+ reOrderAllButton: {
352
+ text: string;
353
+ classes: string;
354
+ };
355
+ };
356
+ resetPassword: {
357
+ title: string;
358
+ };
359
+ subscriptionCancel: {
360
+ cancelText: string;
361
+ cancelReasons: {
362
+ title: string;
363
+ text: string;
364
+ identifier: SubscriptionCancelReasons;
365
+ buttons: {
366
+ text: string;
367
+ link: string;
368
+ type: SubscriptionCancelButtonType;
369
+ }[];
370
+ }[];
371
+ };
372
+ subscriptionEdit: {
373
+ subscriptionItemDefaultImage: string;
374
+ shipNow: {
375
+ modalHeadlineContent: string;
376
+ modalContent: string;
377
+ };
378
+ };
379
+ upsell: {
380
+ mbgImage: string;
381
+ mbgText: string;
382
+ };
383
+ };
384
+ cookieConfig: {
385
+ popupBanner: {
386
+ content: string;
387
+ bannerStyles: {
388
+ backgroundColor: string;
389
+ borderRadius: string;
390
+ };
391
+ buttonStyles: {
392
+ backgroundColor: string;
393
+ color: string;
394
+ };
395
+ };
396
+ };
397
+ };
398
+ }>;
399
+
400
+ declare const createBlogCategoryModel: () => ModelShape;
401
+ type BuilderBlogCategoryContent = BuilderContent & Partial<{
402
+ data: BuilderResponseBaseData & {
403
+ name: string;
404
+ description?: string;
405
+ slug: string;
406
+ parentId?: string;
407
+ };
408
+ }>;
409
+
410
+ declare const createBlogCommentModel: (pageModelId: string) => ModelShape;
411
+ type BuilderBlogCommentContent = BuilderContent & Partial<{
412
+ data: BuilderResponseBaseData & {
413
+ name: string;
414
+ date: string;
415
+ status: 'Pending Approval' | 'Approved' | 'Rejected';
416
+ email?: string;
417
+ comment: string;
418
+ language: string;
419
+ locale: string;
420
+ parentId?: string;
421
+ internal?: boolean;
422
+ blog: {
423
+ id: string;
424
+ name: string;
425
+ };
426
+ };
427
+ }>;
428
+
429
+ interface ProductModelProps {
430
+ ingredientsModelId: string;
431
+ categoryModelId: string;
432
+ tagModelId: string;
433
+ useCaseModelId: string;
434
+ }
435
+ declare const createProductModel: (request: ProductModelProps) => ModelShape;
436
+ type BuilderProductContent = BuilderContent & Partial<{
437
+ data: {
438
+ name: string;
439
+ displayName: string;
440
+ featuredImage?: string;
441
+ secondaryImage?: string;
442
+ subHeading?: string;
443
+ gridTagline?: string;
444
+ gridDescription?: string;
445
+ shortDescription?: string;
446
+ quote?: string;
447
+ packagingLabels?: {
448
+ singular: string;
449
+ plural: string;
450
+ };
451
+ hidden?: boolean;
452
+ outOfStock?: boolean;
453
+ cartOutOfStock?: boolean;
454
+ upc?: string;
455
+ reviews?: {
456
+ id: string;
457
+ count: number;
458
+ averageRating: number;
459
+ };
460
+ tags?: {
461
+ tag: {
462
+ name: string;
463
+ displayName: string;
464
+ };
465
+ }[];
466
+ categories?: {
467
+ category: {
468
+ name: string;
469
+ displayName: string;
470
+ };
471
+ }[];
472
+ ingredients?: {
473
+ ingredient: {
474
+ name: string;
475
+ displayName: string;
476
+ };
477
+ }[];
478
+ useCases?: {
479
+ useCase: {
480
+ name: string;
481
+ displayName: string;
482
+ };
483
+ }[];
484
+ gh: {
485
+ slug: string;
486
+ productionId: string;
487
+ type: 'Product' | 'Bundle' | 'Trial Size';
488
+ };
489
+ } & BuilderResponseBaseData;
490
+ }>;
491
+
492
+ declare enum ProductGroupType {
493
+ FlavorOptionGroup = "Flavor/Option Group",
494
+ TrialGroup = "Trial Group"
495
+ }
496
+ declare const createProductGroupModel: (productModelId: string) => ModelShape;
497
+ type BuilderProductGroupContent = BuilderContent & Partial<{
498
+ data: BuilderResponseBaseData & {
499
+ displayName: string;
500
+ featuredImage?: string;
501
+ subHeading?: string;
502
+ gridTagline?: string;
503
+ shortDescription?: string;
504
+ products: {
505
+ product: string;
506
+ displayName?: string;
507
+ isTrialSize?: boolean;
508
+ }[];
509
+ selectionLabel?: string;
510
+ hidden?: boolean;
511
+ gh?: {
512
+ productionId?: string;
513
+ slug?: string;
514
+ };
515
+ groupType?: ProductGroupType;
516
+ name: string;
517
+ };
518
+ }>;
519
+
520
+ declare const createCategoryModel: () => ModelShape;
521
+ type BuilderProductCategoryContent = BuilderContent & Partial<{
522
+ data: BuilderResponseBaseData & {
523
+ name: string;
524
+ description?: string;
525
+ desktopImage?: string;
526
+ mobileImage?: string;
527
+ hidden?: boolean;
528
+ slug?: string;
529
+ searchKeys?: string[];
530
+ };
531
+ }>;
532
+
533
+ interface ProductFilterModels {
534
+ categoryId: string;
535
+ useCaseId: string;
536
+ ingredientId: string;
537
+ tagId: string;
538
+ }
539
+ declare enum FilterApplicationType {
540
+ Inclusive = "Inclusive",
541
+ Exclusive = "Exclusive"
542
+ }
543
+ declare const createProductGridConfigModel: (models: ProductFilterModels) => ModelShape;
544
+ type BuilderProductGridFilterGroupContent = BuilderContent & Partial<{
545
+ data: BuilderResponseBaseData & {
546
+ displayName: string;
547
+ categories: {
548
+ category: {
549
+ id: string;
550
+ } & Record<string, any>;
551
+ }[];
552
+ ingredients: {
553
+ ingredient: {
554
+ id: string;
555
+ } & Record<string, any>;
556
+ }[];
557
+ useCases: {
558
+ useCase: {
559
+ id: string;
560
+ } & Record<string, any>;
561
+ }[];
562
+ tags: {
563
+ tag: {
564
+ id: string;
565
+ } & Record<string, any>;
566
+ }[];
567
+ filterApplicationType: FilterApplicationType;
568
+ };
569
+ }>;
570
+
571
+ declare const createIngredientsModel: () => ModelShape;
572
+ type BuilderIngredientContent = BuilderContent & Partial<{
573
+ data: BuilderResponseBaseData & {
574
+ name: string;
575
+ description?: string;
576
+ image?: string;
577
+ shortDescription?: string;
578
+ searchKeys?: string[];
579
+ };
580
+ }>;
581
+
582
+ declare const createProductTagModel: () => ModelShape;
583
+ type BuilderProductTagContent = BuilderContent & Partial<{
584
+ data: BuilderResponseBaseData & {
585
+ name: string;
586
+ tagColor: string;
587
+ hidden?: boolean;
588
+ image?: string;
589
+ pluralDisplayName?: string;
590
+ };
591
+ }>;
592
+
593
+ declare const createProductUseCaseModel: () => ModelShape;
594
+ type BuilderProductUseCaseContent = BuilderContent & Partial<{
595
+ data: BuilderResponseBaseData & {
596
+ name: string;
597
+ description?: string;
598
+ searchKeys?: string[];
599
+ image?: string;
600
+ hidden?: boolean;
601
+ };
602
+ }>;
603
+
604
+ export { type BuilderBlogCategoryContent, type BuilderBlogCommentContent, type BuilderBrandConfigContent, type BuilderIngredientContent, type BuilderProductCategoryContent, type BuilderProductContent, type BuilderProductGridFilterGroupContent, type BuilderProductGroupContent, type BuilderProductTagContent, type BuilderProductUseCaseContent, createBlogCategoryModel, createBlogCommentModel, createBrandConfigModel, createCategoryModel, createIngredientsModel, createProductGridConfigModel, createProductGroupModel, createProductModel, createProductTagModel, createProductUseCaseModel };