@thryveai/theme-interfaces 2.3.14 → 2.4.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.
@@ -1,3 +1,3 @@
1
- import { IDefaultRetailerSettings } from "../interfaces/default-settings.interfaces";
2
- declare const DefaultConfigSFUI: IDefaultRetailerSettings;
1
+ import { IDefaultRetailerSettingsVersion2 } from "../interfaces/default-settings.interfaces";
2
+ declare const DefaultConfigSFUI: IDefaultRetailerSettingsVersion2;
3
3
  export default DefaultConfigSFUI;
@@ -5,201 +5,68 @@ var DefaultConfigSFUI = {
5
5
  bannerName: "New banner name",
6
6
  logoUrl: "https://wynshop.com/wp-content/uploads/2021/08/xWynshop_Font_logo_150x39.png.pagespeed.ic.3j0jIxPBvP.webp 1x",
7
7
  },
8
- advertSettings: {},
9
- timeslotModalSettings: {
10
- showOnAddToCart: false,
11
- timeslotRequiredToAddToCart: false,
12
- timeslotRequiredToViewCartReview: false,
13
- },
14
- accountPage: {
15
- loyaltyTab: {
16
- disabledEdit: false,
17
- enabled: false,
18
- loyaltyNumberLength: 11,
19
- loyaltyNumberPrefix: "",
20
- loyaltyValidationType: [],
21
- },
22
- },
23
- addresses: {
24
- addressValidationTypes: {
25
- addressLine1: ["alphaNumeric", "required"],
26
- addressLine2: ["alphaNumeric"],
27
- city: ["alphaNumeric", "required"],
28
- countyProvinceState: ["usState", "required"],
29
- familyName: ["alphaOnly", "required"],
30
- firstName: ["alphaOnly", "required"],
31
- instructions: ["alphaNumeric"],
32
- phoneNumber: ["usPhone", "required"],
33
- postCode: ["usPostCode", "required"],
8
+ siteSettings: {
9
+ anonymousCart: false,
10
+ defaultCountry: "USA",
11
+ defaultShoppingMode: "pickup",
12
+ daysToRemainSignedIn: 30,
13
+ defaultSearchParams: {
14
+ page: "1",
15
+ q: "*",
16
+ skip: "0",
17
+ take: "30",
18
+ },
19
+ defaultStoreLocation: {
20
+ latitude: 0,
21
+ longitude: 0,
22
+ },
23
+ googleAutocompleteSettings: {},
24
+ restrictMapPlacesResults: {
25
+ fetchNearStoresSettings: {
26
+ kmRange: 20,
27
+ totalTake: 30,
28
+ },
34
29
  },
35
- canadianAddressCompleteKey: undefined,
36
- eircodeUrl: undefined,
37
- integration: {
38
- addNewAddressUrl: undefined,
39
- deleteAddressUrl: undefined,
40
- editAddressUrl: undefined,
30
+ gtmId: "",
31
+ isPlanningOnly: false,
32
+ mapZoom: 8,
33
+ promoTemplateVersion: 1,
34
+ retailerCountry: "us",
35
+ retailerName: "default",
36
+ searchPreview: {
37
+ desktop: {
38
+ products: true,
39
+ suggestions: true,
40
+ },
41
+ mobile: {
42
+ products: true,
43
+ suggestions: true,
44
+ },
41
45
  },
42
- useAddressValidation: true,
43
- },
44
- addressValidationTypes: {
45
- addressLine1: ["alphaNumeric", "required"],
46
- addressLine2: ["alphaNumeric"],
47
- city: ["alphaNumeric", "required"],
48
- countyProvinceState: ["usState", "required"],
49
- familyName: ["alphaOnly", "required"],
50
- firstName: ["alphaOnly", "required"],
51
- instructions: ["alphaNumeric"],
52
- phoneNumber: ["usPhone", "required"],
53
- postCode: ["usPostCode", "required"],
54
- },
55
- addressIntegration: {
56
- enabled: false,
57
- addressFinderType: "AUS",
58
- getAddressesUrl: "https://api.addressfinder.io/api/au/address/autocomplete/?key={AUS_ADDRESS_SERVICE_KEY}&secret={AUS_ADDRESS_SERVICE_SECRET}&q={searchQuery}&format=json&gnaf=1",
59
- getLocationUrl: "https://api.addressfinder.io/api/au/address/metadata/?key={AUS_ADDRESS_SERVICE_KEY}&secret={AUS_ADDRESS_SERVICE_SECRET}&format=json&id={id}&au_paf=0&gps=0",
60
- },
61
- allowInStorePurchases: false,
62
- allowPastPurchases: true,
63
- buildNumber: "default",
64
- cacheTimeMins: 1,
65
- canadianAddressCompleteKey: undefined,
66
- checkoutV1: false,
67
- disableAddressOnDelivery: false,
68
- favoritesV1: false,
69
- checkout: {
70
- numericPhonePayload: false,
71
- },
72
- checkoutValidation: {
73
- instructions: ["alphaNumeric", "notWhiteSpacesOnly"],
74
- phoneNumber: ["usPhone", "required"],
75
- smsNumber: [],
76
- },
77
- ctaButtons: null,
78
- defaultCountry: "USA",
79
- defaultSearchParams: {
80
- page: "1",
81
- q: "*",
82
- skip: "0",
83
- take: "30",
84
- },
85
- defaultShoppingMode: "pickup",
86
- defaultStoreLocation: {
87
- latitude: 0,
88
- longitude: 0,
89
- },
90
- disableTprPrice: false,
91
- documentTitle: "ThryveAI Commerce",
92
- eircode: undefined,
93
- enable3dSecure: false,
94
- enableGoogleTranslate: false,
95
- enableNewsletterSignup: false,
96
- enableNotifications: false,
97
- errorLoggingLevel: "error",
98
- externalStoreSelectorUrl: undefined,
99
- flipp: null,
100
- gtmId: undefined,
101
- hideTaxOnSummary: false,
102
- houseAccountRegExValidation: ".",
103
- idpTarget: "_self",
104
- idpUrl: undefined,
105
- instacartUrl: undefined,
106
- isPlanningOnly: false,
107
- layout: {
46
+ subHeaderHeight: 0,
47
+ disableTprPrice: false,
108
48
  footerVersion: "default",
109
- },
110
- limitProductCardTitleHeight: true,
111
- loggingLevelClient: "error",
112
- loggingLevelServer: "error",
113
- mainHeaderHeight: 110,
114
- mapZoom: 8,
115
- minimumCreditCardAmount: 1.0,
116
- nutritionZone: "us",
117
- paymentCards: {
118
- AmExpCard: true,
119
- DiscoverCard: true,
120
- MasterCard: true,
121
- VisaCard: true,
122
- },
123
- pdpDetailsLayout: {
124
- desktop: {
125
- left: [
126
- "productSalesInfo",
127
- "productDescription",
128
- "productIngredients",
129
- "productNutrition",
130
- "sodiumWarning",
131
- "productNumber",
132
- ],
133
- right: ["recommendations"],
134
- },
135
- mobile: {
136
- left: [
137
- "productSalesInfo",
138
- "productDescription",
139
- "productNumber",
140
- "sodiumWarning",
141
- "recommendations",
142
- ],
143
- right: [
144
- "productIngredients",
145
- "productNutrition",
146
- "recommendations",
147
- "productNumber",
148
- ],
149
- },
150
- },
151
- productCardTitleHeight: 40,
152
- registrationFields: [],
153
- retailerCountry: "us",
154
- retailerName: "default",
155
- daysToRemainSignedIn: 30,
156
- searchPreview: {
157
- desktop: {
158
- products: true,
159
- suggestions: true,
160
- },
161
- mobile: {
162
- products: true,
163
- suggestions: true,
164
- },
165
- },
166
- secondTierAuthorization: undefined,
167
- showCheckoutPromoCode: true,
168
- showImgOnOrder: false,
169
- smsNotifications: {
170
- enabled: false,
171
- getEnrollmentUrl: "",
172
- postEnrollmentUrl: "",
173
- },
174
- subHeaderHeight: 0,
175
- promoTemplateVersion: 1,
176
- useAddressValidation: true,
177
- restrictMapPlacesResults: {
178
- fetchNearStoresSettings: {
179
- kmRange: 20,
180
- totalTake: 30,
181
- },
182
- },
183
- globalAnimations: {
184
- confetti: {
185
- enableConfettiAnimation: true,
49
+ timeslotModalSettings: {
50
+ showOnAddToCart: false,
51
+ timeslotRequiredToAddToCart: false,
52
+ timeslotRequiredToViewCartReview: false,
186
53
  },
54
+ ctaButtons: null,
55
+ mainHeaderHeight: 110,
187
56
  },
188
- googleAutocompleteSettings: {},
189
57
  features: {
190
58
  additionalCharges: false,
191
59
  clientCache: false,
192
- giftCards: {
60
+ vouchers: {
193
61
  enabled: false,
194
- gitfCardInputValidation: "^[0-9]{17}$",
195
- pinInputValidation: "^[0-9]{4}$",
196
62
  reCaptcha: false,
197
63
  },
198
- vouchers: {
64
+ giftCards: {
199
65
  enabled: false,
66
+ giftCardInputValidation: "^[0-9]{17}$",
67
+ pinInputValidation: "^[0-9]{4}$",
200
68
  reCaptcha: false,
201
69
  },
202
- entryModalVersion: "entry",
203
70
  smartbanner: {
204
71
  enabled: false,
205
72
  author: "",
@@ -214,44 +81,163 @@ var DefaultConfigSFUI = {
214
81
  priceSuffixGoogle: "",
215
82
  title: "",
216
83
  },
84
+ entryModalVersion: "entry",
85
+ allowInStorePurchases: false,
86
+ allowPastPurchases: true,
87
+ advertSettings: {},
88
+ enableGoogleTranslate: false,
89
+ enableNewsletterSignup: false,
90
+ enableNotifications: false,
91
+ externalStoreSelectorUrl: {
92
+ enabled: false,
93
+ url: "",
94
+ },
95
+ favoritesV1: false,
96
+ flipp: null,
97
+ globalAnimations: {
98
+ confetti: {
99
+ enableConfettiAnimation: true,
100
+ },
101
+ },
102
+ instacart: {
103
+ enabled: false,
104
+ url: "",
105
+ },
106
+ registrationFields: [],
107
+ secondTierAuthorization: undefined,
108
+ showCheckoutPromoCode: true,
109
+ showImgOnOrder: false,
110
+ smsNotifications: {
111
+ enabled: false,
112
+ getEnrollmentUrl: "",
113
+ postEnrollmentUrl: "",
114
+ },
115
+ specialRequestItems: false,
116
+ couponGallery: {
117
+ enabled: false,
118
+ galleryIsIframe: false,
119
+ },
217
120
  },
218
- siteSettings: {
219
- anonymousCart: false,
220
- },
221
- specialRequestItems: false,
222
- sodiumWarning: {
223
- isEnabled: false,
224
- threshold: 2300,
121
+ accountPage: {
122
+ loyaltyTab: {
123
+ disabledEdit: false,
124
+ enabled: false,
125
+ loyaltyNumberLength: 11,
126
+ loyaltyNumberPrefix: "",
127
+ loyaltyValidationType: [],
128
+ },
129
+ idp: {
130
+ enabled: false,
131
+ target: "_self",
132
+ url: "",
133
+ },
225
134
  },
226
- productCards: {
227
- gridRowLength: {
228
- tablet: 3,
229
- desktop: 5,
230
- mobile: 1,
135
+ addressSettings: {
136
+ addressValidationTypes: {
137
+ addressLine1: ["alphaNumeric", "required"],
138
+ addressLine2: ["alphaNumeric"],
139
+ city: ["alphaNumeric", "required"],
140
+ countyProvinceState: ["usState", "required"],
141
+ familyName: ["alphaOnly", "required"],
142
+ firstName: ["alphaOnly", "required"],
143
+ instructions: ["alphaNumeric"],
144
+ phoneNumber: ["usPhone", "required"],
145
+ postCode: ["usPostCode", "required"],
146
+ smsNumber: [],
231
147
  },
232
- carouselsRowLength: {
233
- desktop: 6,
234
- tablet: 4,
235
- mobile: 1,
148
+ eircode: {
149
+ enabled: false,
150
+ url: "",
236
151
  },
237
- productCard: {
152
+ integration: {
238
153
  enabled: false,
239
- layouts: {
240
- ContainersGrid: "default",
241
- ContainersCarousel: "default",
154
+ addressFinderType: "AUS",
155
+ useForNewAddresses: false,
156
+ addNewAddressUrl: "",
157
+ deleteAddressUrl: "",
158
+ editAddressUrl: "",
159
+ },
160
+ useAddressValidation: true,
161
+ disableAddressOnDelivery: false,
162
+ },
163
+ productCard: {
164
+ limitProductCardTitleHeight: true,
165
+ productCardTitleHeight: 40,
166
+ productCards: {
167
+ gridRowLength: {
168
+ tablet: 3,
169
+ desktop: 5,
170
+ mobile: 1,
171
+ },
172
+ carouselsRowLength: {
173
+ desktop: 6,
174
+ tablet: 4,
175
+ mobile: 1,
176
+ },
177
+ productCard: {
178
+ enabled: false,
179
+ layouts: {
180
+ ContainersGrid: "default",
181
+ ContainersCarousel: "default",
182
+ },
242
183
  },
243
184
  },
244
185
  },
245
- layouts: {
246
- cartSummary: {
247
- showTaxTotal: true,
248
- showTaxGroups: true,
186
+ checkout: {
187
+ numericPhonePayload: false,
188
+ houseAccountRegExValidation: ".",
189
+ minimumCreditCardAmount: 1.0,
190
+ paymentCards: {
191
+ AmExpCard: true,
192
+ DiscoverCard: true,
193
+ MasterCard: true,
194
+ VisaCard: true,
195
+ },
196
+ checkoutValidation: {
197
+ instructions: ["alphaNumeric", "notWhiteSpacesOnly"],
198
+ phoneNumber: ["usPhone", "required"],
199
+ smsNumber: [],
200
+ },
201
+ },
202
+ pdpSettings: {
203
+ nutritionZone: "us",
204
+ pdpDetailsLayout: {
205
+ desktop: {
206
+ left: [
207
+ "productSalesInfo",
208
+ "productDescription",
209
+ "productIngredients",
210
+ "productNutrition",
211
+ "sodiumWarning",
212
+ "productNumber",
213
+ ],
214
+ right: ["recommendations"],
215
+ },
216
+ mobile: {
217
+ left: [
218
+ "productSalesInfo",
219
+ "productDescription",
220
+ "productNumber",
221
+ "sodiumWarning",
222
+ "recommendations",
223
+ ],
224
+ right: [
225
+ "productIngredients",
226
+ "productNutrition",
227
+ "recommendations",
228
+ "productNumber",
229
+ ],
230
+ },
249
231
  },
250
- couponGallery: {
251
- enabled: false,
252
- galleryIsIframe: false,
232
+ sodiumWarning: {
233
+ isEnabled: false,
234
+ threshold: 2300,
253
235
  },
254
236
  },
255
- productCardv2: false,
237
+ cartSummary: {
238
+ hideTaxOnSummary: false,
239
+ showTaxTotal: true,
240
+ showTaxGroups: true,
241
+ },
256
242
  };
257
243
  exports.default = DefaultConfigSFUI;
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@thryveai/theme-interfaces",
3
- "version": "2.3.14",
3
+ "version": "2.4.0",
4
4
  "description": "Shared interfaces and defaults for all Wynshop themed apps.",
5
5
  "scripts": {
6
6
  "build": "tsc",
7
- "push": "npm run build && npm publish"
7
+ "push": "npm run build && npm publish",
8
+ "merge-settings": "ts-node ./scripts/sfui-settings-migrator.ts"
8
9
  },
9
10
  "author": "Wynshop",
10
11
  "license": "ISC",
@@ -13,6 +14,8 @@
13
14
  "dist"
14
15
  ],
15
16
  "devDependencies": {
17
+ "@types/node": "^17.0.42",
18
+ "ts-node": "^10.8.1",
16
19
  "typescript": "4.6.3"
17
20
  }
18
21
  }