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