@thryveai/theme-interfaces 1.4.13 → 1.5.3
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/default-theme.interface.d.ts +654 -0
- package/icons.interfaces.d.ts +7 -0
- package/index.d.ts +7 -0
- package/package.json +3 -15
- package/retailer-settings.interfaces.d.ts +351 -0
- package/theme.interfaces.d.ts +656 -0
- package/.eslintignore +0 -39
- package/.eslintrc.js +0 -19
- package/.prettierrc +0 -6
- package/src/interfaces/default-theme.interface.ts +0 -673
- package/src/interfaces/icons.interfaces.ts +0 -254
- package/src/interfaces/index.ts +0 -180
- package/src/interfaces/retailer-settings.interfaces.ts +0 -460
- package/src/interfaces/theme.interfaces.ts +0 -675
- package/tsconfig.json +0 -13
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
import { IconNames, PaymentCards } from "./icons.interfaces";
|
|
2
|
+
export interface IRetailerSettings {
|
|
3
|
+
accountPage?: IAccountPageSettings;
|
|
4
|
+
advertSettings?: IAdvertSettings;
|
|
5
|
+
TimeslotModalSettings?: ITimeslotModalSettings;
|
|
6
|
+
addresses?: {
|
|
7
|
+
addressValidationTypes?: IAddressValidationTypes;
|
|
8
|
+
canadianAddressCompleteKey?: string | undefined;
|
|
9
|
+
eircodeUrl?: string | null;
|
|
10
|
+
integration?: {
|
|
11
|
+
addNewAddressUrl: string | undefined;
|
|
12
|
+
editAddressUrl: string | undefined;
|
|
13
|
+
deleteAddressUrl: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
useAddressValidation?: boolean;
|
|
16
|
+
};
|
|
17
|
+
addressIntegration?: IAddressIntegration;
|
|
18
|
+
addressValidationTypes?: IAddressValidationTypes;
|
|
19
|
+
allowInStorePurchases?: boolean;
|
|
20
|
+
allowPastPurchases?: boolean;
|
|
21
|
+
buildNumber: string;
|
|
22
|
+
cacheTimeMins?: number;
|
|
23
|
+
canadianAddressCompleteKey?: string | undefined;
|
|
24
|
+
checkout?: IGlobalCheckoutProps;
|
|
25
|
+
checkoutV1?: boolean;
|
|
26
|
+
checkoutValidation?: ICheckoutValidation;
|
|
27
|
+
ctaButtons?: ICtaButtons;
|
|
28
|
+
daysToRemainSignedIn?: number;
|
|
29
|
+
defaultCountry?: IDefaultCounty;
|
|
30
|
+
defaultSearchParams?: IDefaultSearchParams;
|
|
31
|
+
defaultShoppingMode?: "pickup" | "planning" | "delivery";
|
|
32
|
+
defaultStoreLocation?: IDefaultStoreLocation;
|
|
33
|
+
disableTprPrice?: boolean;
|
|
34
|
+
documentTitle?: string;
|
|
35
|
+
eircode?: string | null;
|
|
36
|
+
enable3dSecure?: boolean;
|
|
37
|
+
enableGoogleTranslate?: boolean;
|
|
38
|
+
enableNewsletterSignup?: boolean;
|
|
39
|
+
enableNotifications?: boolean;
|
|
40
|
+
enableVouchers?: boolean;
|
|
41
|
+
errorLoggingLevel?: ILoggingLevel;
|
|
42
|
+
externalStoreSelectorUrl?: string | undefined;
|
|
43
|
+
favoritesV1?: boolean;
|
|
44
|
+
flipp?: IFlippConfig | IFlippConfigV2 | null;
|
|
45
|
+
globalAnimations?: IGlobalAnimations;
|
|
46
|
+
gtmId?: undefined | string;
|
|
47
|
+
hideTaxOnSummary?: boolean;
|
|
48
|
+
houseAccountRegExValidation?: string;
|
|
49
|
+
idpTarget?: "_self" | "_blank";
|
|
50
|
+
idpUrl?: undefined | string;
|
|
51
|
+
instacartUrl?: string | undefined;
|
|
52
|
+
isPlanningOnly?: boolean;
|
|
53
|
+
layout?: ILayoutSettings;
|
|
54
|
+
limitProductCardTitleHeight?: boolean;
|
|
55
|
+
loggingLevelClient?: ILoggingLevel;
|
|
56
|
+
loggingLevelServer?: ILoggingLevel;
|
|
57
|
+
mainHeaderHeight?: number;
|
|
58
|
+
mapZoom?: number;
|
|
59
|
+
minimumCreditCardAmount?: number;
|
|
60
|
+
nutritionZone?: INutritionZone;
|
|
61
|
+
paymentCards?: IPaymentCards;
|
|
62
|
+
pdpDetailsLayout?: IPdpDetailsLayout;
|
|
63
|
+
productCardTitleHeight?: number;
|
|
64
|
+
promoTemplateVersion?: number;
|
|
65
|
+
registrationFields?: IRegistrationField[];
|
|
66
|
+
restrictMapPlacesResults?: IRestrictMapPlaces;
|
|
67
|
+
googleAutocompleteSettings?: IGoogleAutocompleteSettings;
|
|
68
|
+
retailerCountry?: IRetailerCountry;
|
|
69
|
+
retailerName: string;
|
|
70
|
+
searchPreview?: ISearchPreviewVisibility;
|
|
71
|
+
secondTierAuthorization?: ISecondTierAuthorization;
|
|
72
|
+
showCheckoutPromoCode?: boolean;
|
|
73
|
+
showImgOnOrder?: boolean;
|
|
74
|
+
smsNotifications?: ISMSConfig;
|
|
75
|
+
subHeaderHeight?: number;
|
|
76
|
+
useAddressValidation?: boolean;
|
|
77
|
+
externalApps?: IExternalApps;
|
|
78
|
+
sodiumWarning?: ISodiumWarning;
|
|
79
|
+
}
|
|
80
|
+
export interface IExternalApps {
|
|
81
|
+
sts?: IExternalAppSTS;
|
|
82
|
+
}
|
|
83
|
+
export interface IExternalAppSTS {
|
|
84
|
+
customTermPolicy?: string;
|
|
85
|
+
}
|
|
86
|
+
export interface ISecondTierAuthorization {
|
|
87
|
+
time: undefined | null | number;
|
|
88
|
+
pages: string[];
|
|
89
|
+
}
|
|
90
|
+
export interface IFlippConfig {
|
|
91
|
+
version: 1;
|
|
92
|
+
production: boolean;
|
|
93
|
+
scriptUrl: IFlippScriptUrls;
|
|
94
|
+
retailer: "wakefernpricerite" | "saveonfoods" | "unitedsupermarkets" | "dearbornmarket" | "saveonfoods";
|
|
95
|
+
autoLocate: boolean;
|
|
96
|
+
useRequestedDomain: boolean;
|
|
97
|
+
}
|
|
98
|
+
export interface IFlippConfigV2 {
|
|
99
|
+
version: 2;
|
|
100
|
+
retailer: string;
|
|
101
|
+
merchantId: string;
|
|
102
|
+
accessToken: string;
|
|
103
|
+
}
|
|
104
|
+
export declare type IFlippScriptUrls = "circulars.priceritemarketplace" | "circulars.dearbornmarket" | "flyers.v8.commerce.mi9cloud" | "flyers.stg.v8.mywebgrocer" | "flyers.saveonfoods";
|
|
105
|
+
export declare type IAllSettings = {
|
|
106
|
+
[envName in IEnvNames]: IRetailerSettings;
|
|
107
|
+
};
|
|
108
|
+
export interface ISMSConfig {
|
|
109
|
+
enabled: boolean;
|
|
110
|
+
getEnrollmentUrl: string;
|
|
111
|
+
postEnrollmentUrl: string;
|
|
112
|
+
}
|
|
113
|
+
export interface IPageAdvertsRow {
|
|
114
|
+
[row: number]: IAdvertsData;
|
|
115
|
+
}
|
|
116
|
+
export declare type IScreenType = "mobile" | "tablet" | "desktop";
|
|
117
|
+
export interface ITimeslotModalSettings {
|
|
118
|
+
showOnAddToCart: boolean;
|
|
119
|
+
timeslotRequiredToAddToCart: boolean;
|
|
120
|
+
timeslotRequiredToViewCartReview: boolean;
|
|
121
|
+
}
|
|
122
|
+
export declare type IAdvertsData = {
|
|
123
|
+
[screen in IScreenType]?: string;
|
|
124
|
+
};
|
|
125
|
+
export declare type IAdvertSettings = {
|
|
126
|
+
page_homepage?: IAdvertLeaderboards;
|
|
127
|
+
page_search?: IAdvertLeaderboards & IAdvertProductGrid & IAdvertSkyScrapers;
|
|
128
|
+
page_cart?: IAdvertLeaderboards & IAdvertSkyScrapers;
|
|
129
|
+
"page_product-categories"?: IAdvertLeaderboards & IAdvertProductGrid & IAdvertSkyScrapers;
|
|
130
|
+
"page_product-listing"?: IAdvertLeaderboards & IAdvertProductGrid & IAdvertSkyScrapers;
|
|
131
|
+
};
|
|
132
|
+
export declare type IPageNamesForAdverts = {
|
|
133
|
+
[key in keyof IAdvertSettings]: string;
|
|
134
|
+
};
|
|
135
|
+
export interface IAdvertLeaderboards {
|
|
136
|
+
leaderboards?: IPageAdvertsRow;
|
|
137
|
+
}
|
|
138
|
+
export interface IAdvertProductGrid {
|
|
139
|
+
productGrid?: {
|
|
140
|
+
leaderboards?: IPageAdvertsRow;
|
|
141
|
+
productCardBanners?: IPageAdvertsRow;
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
export interface IAdvertSkyScrapers {
|
|
145
|
+
skyscrapers?: IAdvertsData;
|
|
146
|
+
}
|
|
147
|
+
export interface IDefaultRetailerSettings {
|
|
148
|
+
accountPage: IAccountPageSettings;
|
|
149
|
+
addressIntegration: IAddressIntegration;
|
|
150
|
+
addressValidationTypes: IAddressValidationTypes;
|
|
151
|
+
addresses: IAddressesSettings;
|
|
152
|
+
advertSettings: IAdvertSettings;
|
|
153
|
+
timeslotModalSettings: ITimeslotModalSettings;
|
|
154
|
+
allowInStorePurchases: boolean;
|
|
155
|
+
allowPastPurchases: boolean;
|
|
156
|
+
buildNumber: string;
|
|
157
|
+
cacheTimeMins: number;
|
|
158
|
+
canadianAddressCompleteKey: string | undefined;
|
|
159
|
+
checkout: IGlobalCheckoutProps;
|
|
160
|
+
checkoutV1: boolean;
|
|
161
|
+
checkoutValidation: ICheckoutValidation;
|
|
162
|
+
ctaButtons: ICtaButtons | null | undefined;
|
|
163
|
+
daysToRemainSignedIn: number;
|
|
164
|
+
defaultCountry: IDefaultCounty;
|
|
165
|
+
defaultSearchParams: IDefaultSearchParams;
|
|
166
|
+
defaultShoppingMode: "pickup" | "planning" | "delivery";
|
|
167
|
+
defaultStoreLocation: IDefaultStoreLocation;
|
|
168
|
+
disableTprPrice: boolean;
|
|
169
|
+
documentTitle: string;
|
|
170
|
+
eircode: string | undefined;
|
|
171
|
+
enable3dSecure: boolean;
|
|
172
|
+
enableGoogleTranslate: boolean;
|
|
173
|
+
enableNewsletterSignup: boolean;
|
|
174
|
+
enableNotifications: boolean;
|
|
175
|
+
enableVouchers: boolean;
|
|
176
|
+
errorLoggingLevel: ILoggingLevel;
|
|
177
|
+
externalStoreSelectorUrl: string | undefined;
|
|
178
|
+
favoritesV1: boolean;
|
|
179
|
+
flipp: IFlippConfig | IFlippConfigV2 | null;
|
|
180
|
+
globalAnimations: IGlobalAnimations;
|
|
181
|
+
gtmId: undefined | string;
|
|
182
|
+
hideTaxOnSummary: boolean;
|
|
183
|
+
houseAccountRegExValidation: string;
|
|
184
|
+
idpTarget: "_self" | "_blank";
|
|
185
|
+
idpUrl: undefined | string;
|
|
186
|
+
instacartUrl: string | undefined;
|
|
187
|
+
isPlanningOnly: boolean;
|
|
188
|
+
layout: ILayoutSettings;
|
|
189
|
+
limitProductCardTitleHeight: boolean;
|
|
190
|
+
loggingLevelClient: ILoggingLevel;
|
|
191
|
+
loggingLevelServer: ILoggingLevel;
|
|
192
|
+
mainHeaderHeight: number;
|
|
193
|
+
mapZoom: number;
|
|
194
|
+
minimumCreditCardAmount: number;
|
|
195
|
+
nutritionZone: INutritionZone;
|
|
196
|
+
paymentCards: IPaymentCards;
|
|
197
|
+
pdpDetailsLayout: IPdpDetailsLayout;
|
|
198
|
+
productCardTitleHeight: number;
|
|
199
|
+
promoTemplateVersion: number;
|
|
200
|
+
registrationFields: IRegistrationField[];
|
|
201
|
+
restrictMapPlacesResults: IRestrictMapPlaces;
|
|
202
|
+
googleAutocompleteSettings: IGoogleAutocompleteSettings;
|
|
203
|
+
retailerCountry: IRetailerCountry;
|
|
204
|
+
retailerName: string;
|
|
205
|
+
searchPreview: ISearchPreviewVisibility;
|
|
206
|
+
secondTierAuthorization?: ISecondTierAuthorization;
|
|
207
|
+
showCheckoutPromoCode: boolean;
|
|
208
|
+
showImgOnOrder: boolean;
|
|
209
|
+
smsNotifications: ISMSConfig;
|
|
210
|
+
subHeaderHeight: number;
|
|
211
|
+
useAddressValidation: boolean;
|
|
212
|
+
sodiumWarning?: ISodiumWarning;
|
|
213
|
+
}
|
|
214
|
+
export interface IGoogleAutocompleteSettings {
|
|
215
|
+
types?: IGoogleAutocompleteTypes;
|
|
216
|
+
bounds?: IGoogleAutocompleteBounds;
|
|
217
|
+
strictBounds?: boolean;
|
|
218
|
+
restrictCountries?: string[];
|
|
219
|
+
}
|
|
220
|
+
interface IGoogleAutocompleteBounds {
|
|
221
|
+
south_latitude: number;
|
|
222
|
+
west_longitude: number;
|
|
223
|
+
north_latitude: number;
|
|
224
|
+
east_longitude: number;
|
|
225
|
+
}
|
|
226
|
+
declare type IGoogleAutocompleteTypes = "geocode" | "address" | "establishment" | "(regions)" | "(cities)";
|
|
227
|
+
export interface ICtaButtons {
|
|
228
|
+
iconAlignment: "left" | "right" | null;
|
|
229
|
+
iconName: IconNames;
|
|
230
|
+
}
|
|
231
|
+
interface ISodiumWarning {
|
|
232
|
+
isEnabled: boolean;
|
|
233
|
+
threshold: number;
|
|
234
|
+
}
|
|
235
|
+
export interface IAddressesSettings {
|
|
236
|
+
addressValidationTypes: IAddressValidationTypes;
|
|
237
|
+
canadianAddressCompleteKey: string | undefined;
|
|
238
|
+
eircodeUrl: string | undefined;
|
|
239
|
+
integration: {
|
|
240
|
+
addNewAddressUrl: string | undefined;
|
|
241
|
+
editAddressUrl: string | undefined;
|
|
242
|
+
deleteAddressUrl: string | undefined;
|
|
243
|
+
};
|
|
244
|
+
useAddressValidation: boolean;
|
|
245
|
+
}
|
|
246
|
+
export interface IAccountPageSettings {
|
|
247
|
+
loyaltyTab: {
|
|
248
|
+
disabledEdit?: boolean;
|
|
249
|
+
enabled: boolean;
|
|
250
|
+
loyaltyNumberLength: number;
|
|
251
|
+
loyaltyNumberPrefix: string;
|
|
252
|
+
loyaltyValidationType: IValidationType[];
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
export interface ILayoutSettings {
|
|
256
|
+
footerVersion: IFooterTypes;
|
|
257
|
+
}
|
|
258
|
+
export declare type ILoggingLevel = "error" | "warning" | "info" | "debug";
|
|
259
|
+
export interface IAddressValidationTypes {
|
|
260
|
+
addressLine1: IValidationType[];
|
|
261
|
+
addressLine2: IValidationType[];
|
|
262
|
+
city: IValidationType[];
|
|
263
|
+
countyProvinceState: IValidationType[];
|
|
264
|
+
familyName: IValidationType[];
|
|
265
|
+
firstName: IValidationType[];
|
|
266
|
+
instructions: IValidationType[];
|
|
267
|
+
phoneNumber: IValidationType[];
|
|
268
|
+
postCode: IValidationType[];
|
|
269
|
+
}
|
|
270
|
+
export interface IDefaultSearchParams {
|
|
271
|
+
q: string;
|
|
272
|
+
page: string;
|
|
273
|
+
skip: string;
|
|
274
|
+
take: string;
|
|
275
|
+
}
|
|
276
|
+
export interface IDefaultStoreLocation {
|
|
277
|
+
latitude: number;
|
|
278
|
+
longitude: number;
|
|
279
|
+
}
|
|
280
|
+
export declare type IDefaultCounty = "USA" | "Canada" | "Ireland" | "Australia" | string;
|
|
281
|
+
export declare type IRetailerCountry = "us" | "ca" | "ie" | "au";
|
|
282
|
+
export interface IRestrictMapPlaces {
|
|
283
|
+
country?: string | string[];
|
|
284
|
+
postalCode?: string;
|
|
285
|
+
route?: string;
|
|
286
|
+
locality?: string;
|
|
287
|
+
administrativeArea?: string;
|
|
288
|
+
fetchNearStoresSettings?: {
|
|
289
|
+
kmRange: number;
|
|
290
|
+
totalTake: number;
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
export declare type IValidationType = IValidateDateRange | IValidateLength | "luhnValidation" | "alphaNumeric" | "alphaOnly" | "numericOnly" | "anyPhone" | "email" | "password" | "required" | "usPhone" | "usPhone10Digits" | "usMobileNumber" | "caPhone" | "auPhone" | "iePhone" | "caProvince" | "usState" | "auState" | "ieCounty" | "caPostCode" | "usPostCode" | "auPostCode" | "iePostCode" | "noSpecialChar" | "correctDate";
|
|
294
|
+
declare type IEnvNames = "dev" | "de2" | "qat" | "qa2" | "int" | "in2" | "lod" | "lo2" | "stg" | "st2" | "stagingConfig" | "productionConfig";
|
|
295
|
+
export declare type INutritionZone = "us" | "eu" | "au" | "ca";
|
|
296
|
+
export declare type IFooterTypes = "default" | "version2" | "version3" | "version4" | "version5";
|
|
297
|
+
export declare type IValidateLength = {
|
|
298
|
+
_type: "less" | "more" | "exact";
|
|
299
|
+
length: number;
|
|
300
|
+
};
|
|
301
|
+
export declare type IValidateDateRange = {
|
|
302
|
+
_type: "overYears";
|
|
303
|
+
overYears: number;
|
|
304
|
+
};
|
|
305
|
+
export declare type IRegistrationFieldTypes = "default" | "version2";
|
|
306
|
+
export declare type IRegistrationFieldNames = "phone" | "loyaltyId" | "isAdultConfirmed" | "marketingConsent" | "dateOfBirth";
|
|
307
|
+
export interface IRegistrationField {
|
|
308
|
+
name: IRegistrationFieldNames;
|
|
309
|
+
label: string;
|
|
310
|
+
placeholder: string;
|
|
311
|
+
designVersion: IRegistrationFieldTypes;
|
|
312
|
+
validationTypes: IValidationType[];
|
|
313
|
+
}
|
|
314
|
+
export interface ICheckoutValidation {
|
|
315
|
+
instructions: IValidationType[];
|
|
316
|
+
phoneNumber: IValidationType[];
|
|
317
|
+
smsNumber: IValidationType[];
|
|
318
|
+
}
|
|
319
|
+
interface ISearchPreview {
|
|
320
|
+
suggestions: boolean;
|
|
321
|
+
products: boolean;
|
|
322
|
+
}
|
|
323
|
+
export interface ISearchPreviewVisibility {
|
|
324
|
+
desktop?: ISearchPreview;
|
|
325
|
+
mobile?: ISearchPreview;
|
|
326
|
+
}
|
|
327
|
+
export declare type IPaymentCards = {
|
|
328
|
+
[cardName in PaymentCards]: boolean;
|
|
329
|
+
};
|
|
330
|
+
export interface IGlobalAnimations {
|
|
331
|
+
confetti: ILayoutAnimationsConfetti;
|
|
332
|
+
}
|
|
333
|
+
export interface ILayoutAnimationsConfetti {
|
|
334
|
+
enableConfettiAnimation: boolean;
|
|
335
|
+
}
|
|
336
|
+
export interface IGlobalCheckoutProps {
|
|
337
|
+
numericPhonePayload: boolean;
|
|
338
|
+
}
|
|
339
|
+
export interface IAddressIntegration {
|
|
340
|
+
enabled: boolean;
|
|
341
|
+
getAddressesUrl: string;
|
|
342
|
+
getLocationUrl: string;
|
|
343
|
+
addressFinderType: IAddressFinderType;
|
|
344
|
+
}
|
|
345
|
+
export declare type IAddressFinderType = "AUS" | "EU" | "IE" | "US" | "UK" | "CA";
|
|
346
|
+
export interface IPdpDetailsLayout {
|
|
347
|
+
desktop: string[];
|
|
348
|
+
mobileTab1: string[];
|
|
349
|
+
mobileTab2: string[];
|
|
350
|
+
}
|
|
351
|
+
export {};
|