@envive-ai/react-hooks 0.1.0 → 0.1.1
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/dist/{GridInsertionService-CS_bnPh0.cjs → GridInsertionService-C00upKLB.js} +18 -6
- package/dist/{GridInsertionService-CEYo9pGj.js → GridInsertionService-CMJVhD6q.cjs} +31 -1
- package/dist/{bandolier-Bm2xAt_j.cjs → bandolier-3rHPPhkF.cjs} +27 -28
- package/dist/{bandolier-Ble8jEa8.js → bandolier-DpF-HUG_.js} +7 -8
- package/dist/{carpe-Da7b-LCW.cjs → carpe-BG7Q_KCG.cjs} +14 -15
- package/dist/{carpe-W13mhRRP.js → carpe-DLuc07V7.js} +7 -8
- package/dist/contexts/index.cjs +9 -4
- package/dist/contexts/index.d.cts +8 -22
- package/dist/contexts/index.d.ts +11 -26
- package/dist/contexts/index.js +5 -5
- package/dist/contexts-C4Iz162H.cjs +11631 -0
- package/dist/contexts-Dq7tO_0y.js +11459 -0
- package/dist/{coterie-3y0D9ko4.cjs → coterie-DUdvJvAs.cjs} +10 -10
- package/dist/{coterie-DOWcJAYv.js → coterie-FybYN_xE.js} +7 -7
- package/dist/{default-D_KPZdPJ.cjs → default-CKyjzyLc.cjs} +1 -1
- package/dist/{default-C2fEZKXk.js → default-CL94oJfj.js} +1 -1
- package/dist/default-DMtAjA62.cjs +4 -0
- package/dist/default-zcmT2032.js +4 -0
- package/dist/{divIds-DnZNd7rA.cjs → divIds-BOqjn3bE.cjs} +0 -20
- package/dist/{divIds-Bss-btao.js → divIds-Cfp3v_rG.js} +1 -15
- package/dist/{models-DHdb7QWn.js → domInsertionService-BtzuH2Sc.js} +15 -1
- package/dist/{models-ixxUsGL_.cjs → domInsertionService-Cb9814oM.cjs} +20 -0
- package/dist/{dreamlandBaby-DCIsuU9R.cjs → dreamlandBaby-C8yzW4Nl.cjs} +11 -12
- package/dist/{dreamlandBaby-DvSaZGrz.js → dreamlandBaby-WXcbsTXO.js} +7 -8
- package/dist/{fiveCbd-CkOlVby_.cjs → fiveCbd-CZYzZPl3.cjs} +10 -11
- package/dist/{fiveCbd-B1SESMCO.js → fiveCbd-kl6CoxoF.js} +7 -8
- package/dist/{forLoveAndLemons-DmwYZIk0.js → forLoveAndLemons-BD2qh-6B.js} +5 -5
- package/dist/{forLoveAndLemons-CfYPMnKS.cjs → forLoveAndLemons-BNu-PfFB.cjs} +7 -7
- package/dist/{greenpan-Bsl3ir59.cjs → greenpan-D6fDmjU8.cjs} +11 -12
- package/dist/{greenpan-BtOi45lf.js → greenpan-LDDXZTsh.js} +7 -8
- package/dist/{grooveLife-Cmm1PSCL.cjs → grooveLife-CcylXabB.cjs} +12 -13
- package/dist/{grooveLife-6_dtYsRk.js → grooveLife-D-1qfxwj.js} +8 -9
- package/dist/{homegrownCannabis-CO0uY_mp.cjs → homegrownCannabis-BEZzwFlm.cjs} +10 -10
- package/dist/{homegrownCannabis-C-kw-74X.js → homegrownCannabis-BScZhy9v.js} +6 -6
- package/dist/hooks/index.cjs +16 -4
- package/dist/hooks/index.d.cts +256 -45
- package/dist/hooks/index.d.ts +257 -45
- package/dist/hooks/index.js +5 -5
- package/dist/{jackArcher-DdYTIzAV.cjs → jackArcher-BwMClqMP.cjs} +11 -12
- package/dist/{jackArcher-CLVmwwpI.js → jackArcher-cJJVulZ9.js} +7 -8
- package/dist/{jordanCraig-_u3-w4Hp.cjs → jordanCraig-DGsCO2o1.cjs} +19 -20
- package/dist/{jordanCraig-Am-Oor-O.js → jordanCraig-DNDMT0hn.js} +7 -8
- package/dist/{kindredBravely-eWp-ud_E.js → kindredBravely-ROyesnVk.js} +6 -7
- package/dist/{kindredBravely-CWovIDSc.cjs → kindredBravely-wV2XT1r_.cjs} +10 -11
- package/dist/{kutFromTheKloth-Q589bAOC.cjs → kutFromTheKloth-B6GR8tO9.cjs} +11 -12
- package/dist/{kutFromTheKloth-BMV4BuGQ.js → kutFromTheKloth-BCUOHegv.js} +7 -8
- package/dist/{larryAndSerges-CEau764j.cjs → larryAndSerges-CIqB9tKz.cjs} +8 -8
- package/dist/{larryAndSerges-BMUlTgI-.js → larryAndSerges-CqS02fnX.js} +5 -5
- package/dist/{leapsAndRebounds-DHAtRTJD.cjs → leapsAndRebounds-CFj9F_z1.cjs} +12 -13
- package/dist/{leapsAndRebounds-DGMzPO7T.js → leapsAndRebounds-j4YqSvNb.js} +7 -8
- package/dist/{longevityrx-jH2JLhNH.js → longevityrx-9sUQZCVZ.js} +7 -8
- package/dist/{longevityrx-CZW8Hxzi.cjs → longevityrx-C-Yc5LPR.cjs} +10 -11
- package/dist/{lookOptic-BGXP5P_V.js → lookOptic-CQryypdM.js} +7 -8
- package/dist/{lookOptic-CA6RwLbG.cjs → lookOptic-dbaaorhR.cjs} +10 -11
- package/dist/{mantraBrand-Cm9_PBCT.js → mantraBrand-CifBQtHp.js} +8 -9
- package/dist/{mantraBrand-DByNqpnL.cjs → mantraBrand-D5MTZ6Mj.cjs} +23 -24
- package/dist/{medterra-DnPN2ksU.cjs → medterra-BCrXdmFE.cjs} +12 -13
- package/dist/{medterra-B0wxj_PV.js → medterra-DhENCf-m.js} +7 -8
- package/dist/{modells-CoYgkLSp.cjs → modells-C_P_894S.cjs} +10 -11
- package/dist/{modells-Bmz8Ag5M.js → modells-aQrV10D7.js} +7 -8
- package/dist/{pressedFloral-DSKs_oVG.js → pressedFloral-D-amnTQK.js} +7 -8
- package/dist/{pressedFloral-DjBiSoUl.cjs → pressedFloral-DErfwwl0.cjs} +13 -14
- package/dist/{skinPerfection-B_3xzVNS.cjs → skinPerfection-DF6nQXjh.cjs} +10 -11
- package/dist/{skinPerfection-IDrBuAPt.js → skinPerfection-DRVPJp3h.js} +7 -8
- package/dist/{snapSupplements-BStTsdOZ.cjs → snapSupplements-CLZjItJi.cjs} +10 -11
- package/dist/{snapSupplements-BJk5T5ba.js → snapSupplements-Yxs4jgC-.js} +7 -8
- package/dist/{spanx-LwU1zSzq.cjs → spanx-Cpbot5J5.cjs} +14 -15
- package/dist/{spanx-BYg0LE7R.js → spanx-DVDyAyFC.js} +9 -10
- package/dist/{spanxStaging-CfSmuKYB.js → spanxStaging-DAiFEMRU.js} +9 -10
- package/dist/{spanxStaging-OZLV9qix.cjs → spanxStaging-DbaVonN6.cjs} +20 -21
- package/dist/{supergoop-BqPXDnKk.cjs → supergoop-B5VQlsoe.cjs} +11 -12
- package/dist/{supergoop-CIlrHND_.js → supergoop-C4McrZPT.js} +7 -8
- package/dist/types-D4vlfTd0.d.ts +1026 -0
- package/dist/types-DGoFEos_.d.cts +1026 -0
- package/dist/{types-CYNvLeSA.js → types-DZzSQ5a6.js} +33 -33
- package/dist/{types-C4T5UOIW.cjs → types-QJObznro.cjs} +33 -33
- package/dist/{uniqueVintage-B30mOqbH.cjs → uniqueVintage-BLp_UtBR.cjs} +22 -23
- package/dist/{uniqueVintage-CFueJOhO.js → uniqueVintage-CS4TgOJW.js} +7 -8
- package/dist/{venaCbd-DHGZy49P.cjs → venaCbd-BxmadOeJ.cjs} +11 -12
- package/dist/{venaCbd-T0CqVD4k.js → venaCbd-DfnFV7Qp.js} +7 -8
- package/dist/{westonJonBoucher-BdMzs_Yg.cjs → westonJonBoucher-BZdusJgo.cjs} +12 -13
- package/dist/{westonJonBoucher-b4TCQ4ev.js → westonJonBoucher-C0FE4Wup.js} +7 -8
- package/dist/{wineEnthusiast-BqR0i_54.js → wineEnthusiast-CmhNg47M.js} +7 -8
- package/dist/{wineEnthusiast-BLGlOjgr.cjs → wineEnthusiast-DQxdV8Yg.cjs} +12 -13
- package/dist/{wolfMattress-DNGZOivg.cjs → wolfMattress-CqyOUgPB.cjs} +11 -11
- package/dist/{wolfMattress-CyyO-LoC.js → wolfMattress-vMvqmwgI.js} +6 -6
- package/dist/{wolfTactical-3Mm2fvVF.js → wolfTactical-DvqxZtoA.js} +7 -8
- package/dist/{wolfTactical-BmXYlFjr.cjs → wolfTactical-q3TVDP85.cjs} +11 -12
- package/package.json +1 -1
- package/src/atoms/org/org.ts +2 -2
- package/src/hooks/useSearch.tsx +1 -4
- package/src/initialize.ts +1 -1
- package/src/main.tsx +10 -25
- package/dist/chatElementDisplayLocation-CX8fuNao.d.cts +0 -239
- package/dist/chatElementDisplayLocation-CwptS9tx.d.ts +0 -239
- package/dist/contexts-BRjfVq_k.js +0 -5064
- package/dist/contexts-BYArqZtK.cjs +0 -5164
- package/dist/default-CBUq6Q6G.cjs +0 -4
- package/dist/default-CGIFZK6m.js +0 -4
- package/dist/logger-Dln20ans.cjs +0 -25
- package/dist/logger-pdEEY8T2.js +0 -19
- package/src/main.ts +0 -85
- /package/dist/{cdnService-zQfKk3Eb.js → cdnService-CAyO3axV.js} +0 -0
- /package/dist/{cdnService-CZ-aXcY6.cjs → cdnService-DIF1i7VC.cjs} +0 -0
- /package/dist/{custservice-types-CkfxZiHY.cjs → custservice-types-BgjGHCtD.cjs} +0 -0
- /package/dist/{custservice-types-CFIFwZ-r.js → custservice-types-V6FWABp4.js} +0 -0
- /package/dist/{entrypoints-D_JUvkgy.cjs → entrypoints-C8JwiMYA.cjs} +0 -0
- /package/dist/{entrypoints-YLQsbBRD.js → entrypoints-RmIbdYxh.js} +0 -0
- /package/dist/{socialProofClasses-CrQBWdSA.cjs → socialProofClasses-CaA83vI4.cjs} +0 -0
- /package/dist/{socialProofClasses-Bhv2Vulz.js → socialProofClasses-KB7zOMmg.js} +0 -0
- /package/dist/{suggestionBarV2-types-CaovchMP.cjs → suggestionBarV2-types-XHYD3j8E.cjs} +0 -0
- /package/dist/{suggestionBarV2-types-BllzwsBD.js → suggestionBarV2-types-aiQmVx5m.js} +0 -0
|
@@ -0,0 +1,1026 @@
|
|
|
1
|
+
import { GenerationParams, PageVisitCategory, SupportedEventProductCategory } from "@spiffy-ai/commerce-api-client";
|
|
2
|
+
|
|
3
|
+
//#region src/application/models/utilityTypes/trim.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Remove spaces from the left side.
|
|
7
|
+
*/
|
|
8
|
+
type TrimLeft<V extends string> = V extends `${Whitespace}${infer R}` ? TrimLeft<R> : V;
|
|
9
|
+
/**
|
|
10
|
+
* Remove spaces from the right side.
|
|
11
|
+
*/
|
|
12
|
+
type TrimRight<V extends string> = V extends `${infer R}${Whitespace}` ? TrimRight<R> : V;
|
|
13
|
+
/**
|
|
14
|
+
* Remove leading and trailing spaces from a string.
|
|
15
|
+
* @example
|
|
16
|
+
* ```
|
|
17
|
+
* import type {Trim} from 'type-fest';
|
|
18
|
+
*
|
|
19
|
+
* Trim<' foo '>
|
|
20
|
+
* //=> 'foo'
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @category String
|
|
24
|
+
* @category Template literal
|
|
25
|
+
*/
|
|
26
|
+
type Trim<V extends string> = TrimLeft<TrimRight<V>>;
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/application/models/utilityTypes/internal.d.ts
|
|
29
|
+
/**
|
|
30
|
+
* Returns a boolean for whether the string is numeric.
|
|
31
|
+
*
|
|
32
|
+
* This type is a workaround for [Microsoft/TypeScript#46109](https://github.com/microsoft/TypeScript/issues/46109#issuecomment-930307987).
|
|
33
|
+
*/
|
|
34
|
+
type IsNumeric<T extends string> = T extends `${number}` ? Trim<T> extends T ? true : false : false;
|
|
35
|
+
/**
|
|
36
|
+
* Returns a boolean for whether the string is lowercased.
|
|
37
|
+
*/
|
|
38
|
+
type IsLowerCase<T extends string> = T extends Lowercase<T> ? true : false;
|
|
39
|
+
/**
|
|
40
|
+
* Returns a boolean for whether the string is upper-cased.
|
|
41
|
+
*/
|
|
42
|
+
type IsUpperCase<T extends string> = T extends Uppercase<T> ? true : false;
|
|
43
|
+
type WordSeparators = '-' | '_' | Whitespace;
|
|
44
|
+
type Whitespace = '\u{9}' | '\u{A}' | '\u{B}' | '\u{C}' | '\u{D}' | '\u{20}' | '\u{85}' | '\u{A0}' | '\u{1680}' | '\u{2000}' | '\u{2001}' | '\u{2002}' | '\u{2003}' | '\u{2004}' | '\u{2005}' | '\u{2006}' | '\u{2007}' | '\u{2008}' | '\u{2009}' | '\u{200A}' | '\u{2028}' | '\u{2029}' | '\u{202F}' | '\u{205F}' | '\u{3000}' | '\u{FEFF}';
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/application/models/utilityTypes/splitWords.d.ts
|
|
47
|
+
type SkipEmptyWord<Word extends string> = Word extends '' ? [] : [Word];
|
|
48
|
+
type RemoveLastCharacter<Sentence extends string, Character extends string> = Sentence extends `${infer LeftSide}${Character}` ? SkipEmptyWord<LeftSide> : never;
|
|
49
|
+
/**
|
|
50
|
+
* Split a string (almost) like Lodash's `_.words()` function.
|
|
51
|
+
*
|
|
52
|
+
* - Split on each word that begins with a capital letter.
|
|
53
|
+
* - Split on each {@link WordSeparators}.
|
|
54
|
+
* - Split on numeric sequence.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```
|
|
58
|
+
* type Words0 = SplitWords<'helloWorld'>; // ['hello', 'World']
|
|
59
|
+
* type Words1 = SplitWords<'helloWORLD'>; // ['hello', 'WORLD']
|
|
60
|
+
* type Words2 = SplitWords<'hello-world'>; // ['hello', 'world']
|
|
61
|
+
* type Words3 = SplitWords<'--hello the_world'>; // ['hello', 'the', 'world']
|
|
62
|
+
* type Words4 = SplitWords<'lifeIs42'>; // ['life', 'Is', '42']
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* @internal
|
|
66
|
+
* @category Change case
|
|
67
|
+
* @category Template literal
|
|
68
|
+
*/
|
|
69
|
+
type SplitWords<Sentence extends string, LastCharacter extends string = '', CurrentWord extends string = ''> = Sentence extends `${infer FirstCharacter}${infer RemainingCharacters}` ? FirstCharacter extends WordSeparators ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters>] : LastCharacter extends '' ? SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter> : [false, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, false] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [true, true] extends [IsLowerCase<LastCharacter>, IsUpperCase<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, true] extends [IsUpperCase<LastCharacter>, IsLowerCase<FirstCharacter>] ? [...RemoveLastCharacter<CurrentWord, LastCharacter>, ...SplitWords<RemainingCharacters, FirstCharacter, `${LastCharacter}${FirstCharacter}`>] : SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [...SkipEmptyWord<CurrentWord>];
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region src/application/models/utilityTypes/camelCase.d.ts
|
|
72
|
+
/**
|
|
73
|
+
* CamelCase options.
|
|
74
|
+
*
|
|
75
|
+
* @see {@link CamelCase}
|
|
76
|
+
*/
|
|
77
|
+
type CamelCaseOptions = {
|
|
78
|
+
/**
|
|
79
|
+
* Whether to preserved consecutive uppercase letter.
|
|
80
|
+
*
|
|
81
|
+
* @default true
|
|
82
|
+
*/
|
|
83
|
+
preserveConsecutiveUppercase?: boolean;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Convert an array of words to camel-case.
|
|
87
|
+
*/
|
|
88
|
+
type CamelCaseFromArray<Words extends string[], Options extends CamelCaseOptions, OutputString extends string = ''> = Words extends [infer FirstWord extends string, ...infer RemainingWords extends string[]] ? Options['preserveConsecutiveUppercase'] extends true ? `${Capitalize<FirstWord>}${CamelCaseFromArray<RemainingWords, Options>}` : `${Capitalize<Lowercase<FirstWord>>}${CamelCaseFromArray<RemainingWords, Options>}` : OutputString;
|
|
89
|
+
/**
|
|
90
|
+
* Convert a string literal to camel-case.
|
|
91
|
+
*
|
|
92
|
+
* This can be useful when, for example, converting some kebab-cased command-line flags or a snake-cased database result.
|
|
93
|
+
*
|
|
94
|
+
* By default, consecutive uppercase letter are preserved. See {@link CamelCaseOptions.preserveConsecutiveUppercase preserveConsecutiveUppercase} option to change this behaviour.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```
|
|
98
|
+
* import type {CamelCase} from 'type-fest';
|
|
99
|
+
*
|
|
100
|
+
* // Simple
|
|
101
|
+
*
|
|
102
|
+
* const someVariable: CamelCase<'foo-bar'> = 'fooBar';
|
|
103
|
+
*
|
|
104
|
+
* // Advanced
|
|
105
|
+
*
|
|
106
|
+
* type CamelCasedProperties<T> = {
|
|
107
|
+
* [K in keyof T as CamelCase<K>]: T[K]
|
|
108
|
+
* };
|
|
109
|
+
*
|
|
110
|
+
* interface RawOptions {
|
|
111
|
+
* 'dry-run': boolean;
|
|
112
|
+
* 'full_family_name': string;
|
|
113
|
+
* foo: number;
|
|
114
|
+
* BAR: string;
|
|
115
|
+
* QUZ_QUX: number;
|
|
116
|
+
* 'OTHER-FIELD': boolean;
|
|
117
|
+
* }
|
|
118
|
+
*
|
|
119
|
+
* const dbResult: CamelCasedProperties<RawOptions> = {
|
|
120
|
+
* dryRun: true,
|
|
121
|
+
* fullFamilyName: 'bar.js',
|
|
122
|
+
* foo: 123,
|
|
123
|
+
* bar: 'foo',
|
|
124
|
+
* quzQux: 6,
|
|
125
|
+
* otherField: false
|
|
126
|
+
* };
|
|
127
|
+
* ```
|
|
128
|
+
*
|
|
129
|
+
* @category Change case
|
|
130
|
+
* @category Template literal
|
|
131
|
+
*/
|
|
132
|
+
type CamelCase<Type, Options extends CamelCaseOptions = {
|
|
133
|
+
preserveConsecutiveUppercase: true;
|
|
134
|
+
}> = Type extends string ? string extends Type ? Type : Uncapitalize<CamelCaseFromArray<SplitWords<Type extends Uppercase<Type> ? Lowercase<Type> : Type>, Options>> : Type;
|
|
135
|
+
//#endregion
|
|
136
|
+
//#region src/application/models/utilityTypes/unknownArray.d.ts
|
|
137
|
+
/**
|
|
138
|
+
* Represents an array with `unknown` value.
|
|
139
|
+
*
|
|
140
|
+
* Use case: You want a type that all arrays can be assigned to, but you don't care about the value.
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```
|
|
144
|
+
* import type {UnknownArray} from 'type-fest';
|
|
145
|
+
*
|
|
146
|
+
* type IsArray<T> = T extends UnknownArray ? true : false;
|
|
147
|
+
*
|
|
148
|
+
* type A = IsArray<['foo']>;
|
|
149
|
+
* //=> true
|
|
150
|
+
*
|
|
151
|
+
* type B = IsArray<readonly number[]>;
|
|
152
|
+
* //=> true
|
|
153
|
+
*
|
|
154
|
+
* type C = IsArray<string>;
|
|
155
|
+
* //=> false
|
|
156
|
+
* ```
|
|
157
|
+
*
|
|
158
|
+
* @category Type
|
|
159
|
+
* @category Array
|
|
160
|
+
*/
|
|
161
|
+
type UnknownArray = readonly unknown[];
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region src/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts
|
|
164
|
+
/**
|
|
165
|
+
* Convert object properties to camel case recursively.
|
|
166
|
+
*
|
|
167
|
+
* This can be useful when, for example, converting some API types from a different style.
|
|
168
|
+
*
|
|
169
|
+
* @see CamelCasedProperties
|
|
170
|
+
* @see CamelCase
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* ```
|
|
174
|
+
* import type {CamelCasedPropertiesDeep} from 'type-fest';
|
|
175
|
+
*
|
|
176
|
+
* interface User {
|
|
177
|
+
* UserId: number;
|
|
178
|
+
* UserName: string;
|
|
179
|
+
* }
|
|
180
|
+
*
|
|
181
|
+
* interface UserWithFriends {
|
|
182
|
+
* UserInfo: User;
|
|
183
|
+
* UserFriends: User[];
|
|
184
|
+
* }
|
|
185
|
+
*
|
|
186
|
+
* const result: CamelCasedPropertiesDeep<UserWithFriends> = {
|
|
187
|
+
* userInfo: {
|
|
188
|
+
* userId: 1,
|
|
189
|
+
* userName: 'Tom',
|
|
190
|
+
* },
|
|
191
|
+
* userFriends: [
|
|
192
|
+
* {
|
|
193
|
+
* userId: 2,
|
|
194
|
+
* userName: 'Jerry',
|
|
195
|
+
* },
|
|
196
|
+
* {
|
|
197
|
+
* userId: 3,
|
|
198
|
+
* userName: 'Spike',
|
|
199
|
+
* },
|
|
200
|
+
* ],
|
|
201
|
+
* };
|
|
202
|
+
* ```
|
|
203
|
+
*
|
|
204
|
+
* @category Change case
|
|
205
|
+
* @category Template literal
|
|
206
|
+
* @category Object
|
|
207
|
+
*/
|
|
208
|
+
type CamelCasedPropertiesDeep<Value, Options extends CamelCaseOptions = {
|
|
209
|
+
preserveConsecutiveUppercase: true;
|
|
210
|
+
}> = Value extends Function ? Value : Value extends UnknownArray ? CamelCasedPropertiesArrayDeep<Value> : Value extends Set<infer U> ? Set<CamelCasedPropertiesDeep<U, Options>> : { [K in keyof Value as CamelCase<K, Options>]: CamelCasedPropertiesDeep<Value[K], Options> };
|
|
211
|
+
type CamelCasedPropertiesArrayDeep<Value extends UnknownArray> = Value extends [] ? [] : Value extends [infer U, ...infer V] ? [CamelCasedPropertiesDeep<U>, ...CamelCasedPropertiesDeep<V>] : Value extends readonly [infer U, ...infer V] ? readonly [CamelCasedPropertiesDeep<U>, ...CamelCasedPropertiesDeep<V>] : Value extends readonly [...infer U, infer V] ? [...CamelCasedPropertiesDeep<U>, CamelCasedPropertiesDeep<V>] : Value extends readonly [...infer U, infer V] ? readonly [...CamelCasedPropertiesDeep<U>, CamelCasedPropertiesDeep<V>] : Value extends Array<infer U> ? Array<CamelCasedPropertiesDeep<U>> : Value extends ReadonlyArray<infer U> ? ReadonlyArray<CamelCasedPropertiesDeep<U>> : never;
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region src/application/models/api/generationParams.d.ts
|
|
214
|
+
interface GenerationParams$1 extends CamelCasedPropertiesDeep<GenerationParams> {}
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region src/application/models/chatElementDisplayLocation.d.ts
|
|
217
|
+
declare enum ChatElementDisplayLocation {
|
|
218
|
+
IN_CHAT = "in_chat",
|
|
219
|
+
CHAT_PREVIEW = "chat_preview",
|
|
220
|
+
FLOATING_BUTTON = "floating_button",
|
|
221
|
+
HELP_ME_CHOOSE = "help_me_choose",
|
|
222
|
+
PLP_IMAGE_BANNER = "plp_image_banner",
|
|
223
|
+
TOP_REVIEWS_SNIPPET = "top_reviews_snippet",
|
|
224
|
+
BOTTOM_REVIEWS_SNIPPET = "bottom_reviews_snippet",
|
|
225
|
+
BLOCK_BACK_BUTTON = "block_back_button",
|
|
226
|
+
SWITCH_TO_AGENT = "switch_to_agent",
|
|
227
|
+
CONVERSATIONAL_SEARCH = "conversational_search",
|
|
228
|
+
GLOBAL_SEARCH_ENTRYPOINT = "global_search_entrypoint",
|
|
229
|
+
SEARCH_NAV_ENTRYPOINT = "search_nav_entrypoint",
|
|
230
|
+
SEARCH_PROMPT = "search_prompt",
|
|
231
|
+
SEARCH_PROMPT_BUTTON = "search_prompt_button",
|
|
232
|
+
PRODUCT_GRID = "product_grid",
|
|
233
|
+
UNSPECIFIED = "unspecified",
|
|
234
|
+
FILTER_MODAL = "filter_modal",
|
|
235
|
+
PROMPT_CARD = "prompt_card",
|
|
236
|
+
WINDOW_API_CALL = "window_api_call",
|
|
237
|
+
}
|
|
238
|
+
//#endregion
|
|
239
|
+
//#region src/application/models/colorsConfig.d.ts
|
|
240
|
+
declare enum ColorNames {
|
|
241
|
+
TextPrimary = "text-primary",
|
|
242
|
+
TextSecondary = "text-secondary",
|
|
243
|
+
TextAccent = "text-accent",
|
|
244
|
+
TextLink = "text-link",
|
|
245
|
+
TextLight = "text-light",
|
|
246
|
+
BackgroundPrimary = "background-primary",
|
|
247
|
+
BackgroundSecondary = "background-secondary",
|
|
248
|
+
BackgroundSecondaryDark = "background-secondary-dark",
|
|
249
|
+
BackgroundTertiary = "background-tertiary",
|
|
250
|
+
BackgroundDark = "background-dark",
|
|
251
|
+
BackgroundLight = "background-light",
|
|
252
|
+
BackgroundSaturated = "background-saturated",
|
|
253
|
+
BorderLight = "border-light",
|
|
254
|
+
BorderMedium = "border-medium",
|
|
255
|
+
BorderDark = "border-dark",
|
|
256
|
+
BorderOutline = "border-outline",
|
|
257
|
+
AccentPrimary = "accent-primary",
|
|
258
|
+
AccentSecondary = "accent-secondary",
|
|
259
|
+
}
|
|
260
|
+
type ColorMapping = { [key in ColorNames]: string };
|
|
261
|
+
declare const colorVar: (color: ColorNames) => string;
|
|
262
|
+
//#endregion
|
|
263
|
+
//#region src/application/models/featureGates.d.ts
|
|
264
|
+
declare enum FeatureGates {
|
|
265
|
+
IsClientSessionEnabled = "is_client_session_enabled",
|
|
266
|
+
IsNewFeatureEnabled = "is_new_feature_enabled",
|
|
267
|
+
IsFineTunedModel8b = "is_fine_tuned_model_8b",
|
|
268
|
+
IsIntegratedCXEnabled = "is_integrated_cx_enabled",
|
|
269
|
+
IsNonShapewearEnabled = "is_non_shapewear_enabled",
|
|
270
|
+
IsImageBannerEnabled = "is_image_banner_enabled",
|
|
271
|
+
IsOrderLookupEnabled = "is_order_lookup_enabled",
|
|
272
|
+
IsSummarizeReviewsEnabled = "is_summarize_reviews_enabled",
|
|
273
|
+
IsGlobalSearchEnabled = "is_global_search_enabled",
|
|
274
|
+
IsImagePromptEnabled = "is_image_prompt_enabled",
|
|
275
|
+
IsWatermarkEnabled = "is_watermark_enabled",
|
|
276
|
+
IsInferenceRegion0 = "is_inference_region_0",
|
|
277
|
+
IsGraphQLUIConfigsEnabled = "is_graphql_ui_configs_enabled",
|
|
278
|
+
IsGraphQLPageConfigsEnabled = "is_graphql_page_configs_enabled",
|
|
279
|
+
IsGraphQLComponentConfigsEnabled = "is_graphql_component_configs_enabled",
|
|
280
|
+
IsChatVariantEnabled = "is_chat_variant_enabled",
|
|
281
|
+
IsChatVariantAEnabled = "is_chat_variant_a_enabled",
|
|
282
|
+
IsChatVariantBEnabled = "is_chat_variant_b_enabled",
|
|
283
|
+
IsUserQueryAlwaysEnabled = "is_user_query_always_enabled",
|
|
284
|
+
}
|
|
285
|
+
//#endregion
|
|
286
|
+
//#region src/application/service/customerService/types.d.ts
|
|
287
|
+
declare enum CustomerServiceType {
|
|
288
|
+
shopify = "shopify",
|
|
289
|
+
gorgias = "gorgias",
|
|
290
|
+
kustomer = "kustomer",
|
|
291
|
+
groove = "groove",
|
|
292
|
+
tidio = "tidio",
|
|
293
|
+
zowie = "zowie",
|
|
294
|
+
redo = "redo",
|
|
295
|
+
gladly = "gladly",
|
|
296
|
+
richpanel = "richpanel",
|
|
297
|
+
zendesk = "zendesk",
|
|
298
|
+
unsupported = "unsupported",
|
|
299
|
+
}
|
|
300
|
+
declare enum CustomerServiceIntegrationMode {
|
|
301
|
+
none = "none",
|
|
302
|
+
simple = "simple",
|
|
303
|
+
full = "full",
|
|
304
|
+
}
|
|
305
|
+
//#endregion
|
|
306
|
+
//#region src/application/service/domMutations/domInsertionService.d.ts
|
|
307
|
+
declare enum DOMInsertionType {
|
|
308
|
+
AFTER = "after",
|
|
309
|
+
BEFORE = "before",
|
|
310
|
+
ADJACENT_AFTER_BEGIN = "adjacent-after-begin",
|
|
311
|
+
ADJACENT_BEFORE_BEGIN = "adjacent-before-begin",
|
|
312
|
+
ADJACENT_AFTER_END = "adjacent-after-end",
|
|
313
|
+
ADJACENT_BEFORE_END = "adjacent-before-end",
|
|
314
|
+
APPEND_CHILD = "append-child",
|
|
315
|
+
NONE = "none",
|
|
316
|
+
}
|
|
317
|
+
//#endregion
|
|
318
|
+
//#region src/application/service/domMutations/GridInsertionService.d.ts
|
|
319
|
+
declare enum GridInsertionType {
|
|
320
|
+
FIXED_1 = "fixed-1",
|
|
321
|
+
FIXED_2 = "fixed-2",
|
|
322
|
+
FIXED_3 = "fixed-3",
|
|
323
|
+
FIXED_4 = "fixed-4",
|
|
324
|
+
FIXED_5 = "fixed-5",
|
|
325
|
+
FIXED_6 = "fixed-6",
|
|
326
|
+
FIXED_7 = "fixed-7",
|
|
327
|
+
FIXED_8 = "fixed-8",
|
|
328
|
+
FIXED_9 = "fixed-9",
|
|
329
|
+
FIXED_12 = "fixed-12",
|
|
330
|
+
FIXED_13 = "fixed-13",
|
|
331
|
+
ROW_1 = "row-1",
|
|
332
|
+
ROW_2 = "row-2",
|
|
333
|
+
ROW_3 = "row-3",
|
|
334
|
+
ROW_4 = "row-4",
|
|
335
|
+
}
|
|
336
|
+
//#endregion
|
|
337
|
+
//#region src/types/custservice-types.d.ts
|
|
338
|
+
declare enum ChatState {
|
|
339
|
+
INITIAL = "initial",
|
|
340
|
+
FORM = "form",
|
|
341
|
+
CHAT = "chat",
|
|
342
|
+
}
|
|
343
|
+
//#endregion
|
|
344
|
+
//#region src/types/suggestionBarV2-types.d.ts
|
|
345
|
+
declare enum SuggestionBarLocationForMetrics {
|
|
346
|
+
SUGGESTION_BAR_TOP = "top",
|
|
347
|
+
SUGGESTION_BAR_BOTTOM = "bottom",
|
|
348
|
+
}
|
|
349
|
+
//#endregion
|
|
350
|
+
//#region src/types/test-types.d.ts
|
|
351
|
+
interface TestProps {
|
|
352
|
+
dataTestId?: string;
|
|
353
|
+
}
|
|
354
|
+
//#endregion
|
|
355
|
+
//#region src/contexts/types.d.ts
|
|
356
|
+
type ShowFloatingButtonOptions = "always" | "after-interaction-on-mobile-always-desktop" | "after-interaction-anywhere" | "never";
|
|
357
|
+
type FloatingEntryPointConfig = {
|
|
358
|
+
position: "bottom-left" | "middle-left" | "middle-right" | "bottom-right";
|
|
359
|
+
expansionText?: {
|
|
360
|
+
pdp: string;
|
|
361
|
+
plp: string;
|
|
362
|
+
};
|
|
363
|
+
minimizedColor: string;
|
|
364
|
+
expandedColor: string;
|
|
365
|
+
textColor?: string;
|
|
366
|
+
showOption: ShowFloatingButtonOptions;
|
|
367
|
+
iconSVGSrc?: string;
|
|
368
|
+
iconSize?: number;
|
|
369
|
+
iconStrokeColor?: string;
|
|
370
|
+
iconFillColor?: string;
|
|
371
|
+
height?: number;
|
|
372
|
+
fontSize?: number;
|
|
373
|
+
};
|
|
374
|
+
type WelcomeSectionVariant = "standard" | "outlined";
|
|
375
|
+
type WelcomeSectionColorVariant = "standard" | "accent" | "brand" | "light";
|
|
376
|
+
type WelcomeSectionConfig = {
|
|
377
|
+
variant: WelcomeSectionVariant;
|
|
378
|
+
colorVariant?: WelcomeSectionColorVariant;
|
|
379
|
+
title?: string;
|
|
380
|
+
subtitle?: string;
|
|
381
|
+
iconName?: string;
|
|
382
|
+
imageSrc?: string;
|
|
383
|
+
};
|
|
384
|
+
type ChatPreviewConfig = {
|
|
385
|
+
variant: "flat" | "filled" | "outlined";
|
|
386
|
+
largeProductComparison?: boolean;
|
|
387
|
+
filledBackgroundColor: string;
|
|
388
|
+
iconFillColor: string;
|
|
389
|
+
buttonTextColor?: string;
|
|
390
|
+
buttonTextSecondaryColor?: string;
|
|
391
|
+
buttonTextHoverColor?: string;
|
|
392
|
+
buttonBackgroundColor: string;
|
|
393
|
+
buttonBackgroundHoverColor: string;
|
|
394
|
+
buttonBorderColor?: string;
|
|
395
|
+
buttonBorderHoverColor?: string;
|
|
396
|
+
copies: {
|
|
397
|
+
pdp: string[];
|
|
398
|
+
plp: string[];
|
|
399
|
+
};
|
|
400
|
+
staticSuggestionCopies?: {
|
|
401
|
+
pdp: string[];
|
|
402
|
+
plp: string[];
|
|
403
|
+
};
|
|
404
|
+
staticPLPImages?: string[];
|
|
405
|
+
footerConfig?: ChatPreviewFooterConfig;
|
|
406
|
+
headerConfig?: ChatPreviewHeaderConfig;
|
|
407
|
+
topMargin?: number;
|
|
408
|
+
};
|
|
409
|
+
type ChatPreviewHeaderConfig = {
|
|
410
|
+
title?: string;
|
|
411
|
+
imageSrc?: string;
|
|
412
|
+
imageHeight?: number;
|
|
413
|
+
sparklesColor?: string;
|
|
414
|
+
fontSize?: string;
|
|
415
|
+
iconWidth?: string;
|
|
416
|
+
iconHeight?: string;
|
|
417
|
+
};
|
|
418
|
+
interface ChatPreviewFooterConfig {
|
|
419
|
+
hasFade?: boolean;
|
|
420
|
+
suggestionButtonVariant?: "dark" | "light" | "outlined";
|
|
421
|
+
suggestionsBackground?: string;
|
|
422
|
+
replyButtonIcon?: "send" | "magnifyingGlass" | "thinMagnifyingGlass" | "searchIcon";
|
|
423
|
+
replyButtonText?: string;
|
|
424
|
+
replyInputHasShadow?: boolean;
|
|
425
|
+
replyInputHasBorder?: boolean;
|
|
426
|
+
backgroundColor?: string;
|
|
427
|
+
}
|
|
428
|
+
type ProductReviewStyleVariant = "standard" | "bordered";
|
|
429
|
+
type ProductReviewColorVariant = "neutral" | "brand" | "premium";
|
|
430
|
+
interface ProductReviewConfig {
|
|
431
|
+
styleVariant: ProductReviewStyleVariant;
|
|
432
|
+
colorVariant: ProductReviewColorVariant;
|
|
433
|
+
verifiedBuyerTitle: string;
|
|
434
|
+
incentivizedReviewFlag?: boolean;
|
|
435
|
+
}
|
|
436
|
+
type PageCardVariant = "filled" | "outlined" | "minimal";
|
|
437
|
+
type PageCardHoverVariant = "none" | "shadow" | "lift";
|
|
438
|
+
type PageCardIconVariant = "primary" | "accent" | "background" | "none";
|
|
439
|
+
type PageCardConfig = {
|
|
440
|
+
variant: PageCardVariant;
|
|
441
|
+
hoverVariant: PageCardHoverVariant;
|
|
442
|
+
iconVariant: PageCardIconVariant;
|
|
443
|
+
};
|
|
444
|
+
type ProductCardVariant = "filled" | "bordered" | "minimal" | "transparentBordered";
|
|
445
|
+
type ProductCardHoverVariant = "backgroundDark" | "none";
|
|
446
|
+
type ProductCardLayoutVariant = "normal" | "tall" | "square";
|
|
447
|
+
interface ProductCardConfig {
|
|
448
|
+
variant: ProductCardVariant;
|
|
449
|
+
hoverVariant: ProductCardHoverVariant;
|
|
450
|
+
layoutVariant: ProductCardLayoutVariant;
|
|
451
|
+
pricePrefix?: string;
|
|
452
|
+
}
|
|
453
|
+
type CSSwitchConfig = {
|
|
454
|
+
variant: "attached" | "detached";
|
|
455
|
+
backgroundColor: string;
|
|
456
|
+
borderColor: string;
|
|
457
|
+
selectedTextColor: string;
|
|
458
|
+
selectedBackgroundColor?: string;
|
|
459
|
+
unselectedTextColor: string;
|
|
460
|
+
unselectedBackgroundColor?: string;
|
|
461
|
+
supportTitle?: string;
|
|
462
|
+
spiffyTitle?: string;
|
|
463
|
+
spiffyTitleHasLogo?: boolean;
|
|
464
|
+
};
|
|
465
|
+
type ChatHeaderConfig = {
|
|
466
|
+
collapsedColor: string;
|
|
467
|
+
expandedColor: string;
|
|
468
|
+
chevronColor: string;
|
|
469
|
+
imageSrc?: string;
|
|
470
|
+
icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
471
|
+
closeIcon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
472
|
+
borderBottom?: string;
|
|
473
|
+
headerBarHeightPartialView: number;
|
|
474
|
+
headerBarHeightFullView: number;
|
|
475
|
+
customerSupportSwitchConfig?: CSSwitchConfig;
|
|
476
|
+
};
|
|
477
|
+
type SimpleCustomerServiceIntegration = {
|
|
478
|
+
integrationMode: CustomerServiceIntegrationMode;
|
|
479
|
+
provider: CustomerServiceType;
|
|
480
|
+
useUnifiedButton?: boolean;
|
|
481
|
+
};
|
|
482
|
+
type FullCustomerServiceIntegration = {
|
|
483
|
+
integrationMode: CustomerServiceIntegrationMode;
|
|
484
|
+
provider: CustomerServiceType;
|
|
485
|
+
useUnifiedButton?: boolean;
|
|
486
|
+
chatEnabledDuringBusinessHours?: boolean;
|
|
487
|
+
showNameInput?: boolean;
|
|
488
|
+
formAiName?: string;
|
|
489
|
+
welcomeTitle: string;
|
|
490
|
+
welcomeDescription: string;
|
|
491
|
+
showWelcomeOnForm?: boolean;
|
|
492
|
+
contactSubjectOptions?: string[];
|
|
493
|
+
getCustomWaitingMessage?: (name?: string) => string;
|
|
494
|
+
withinBusinessHoursMessage?: string;
|
|
495
|
+
withinBusinessHoursWaitingMessage?: string;
|
|
496
|
+
outsideBusinessHoursMessage?: string;
|
|
497
|
+
outsideBusinessHoursWaitingMessage?: string;
|
|
498
|
+
withinBusinessHoursFormMessage?: string;
|
|
499
|
+
outsideBusinessHoursFormMessage?: string;
|
|
500
|
+
suggestedAIQuestions?: string[];
|
|
501
|
+
businessHoursPolling?: number;
|
|
502
|
+
/**
|
|
503
|
+
* @deprecated This is handled by the BE.
|
|
504
|
+
*/
|
|
505
|
+
businessHoursStartUTC?: string;
|
|
506
|
+
/**
|
|
507
|
+
* @deprecated This is handled by the BE.
|
|
508
|
+
*/
|
|
509
|
+
businessHoursEndUTC?: string;
|
|
510
|
+
/**
|
|
511
|
+
* @deprecated This is handled by the BE.
|
|
512
|
+
*/
|
|
513
|
+
businessHoursTimezone?: string;
|
|
514
|
+
showAISuggestionsWithinBusinessHours?: boolean;
|
|
515
|
+
waitingMessagePosition?: "BEFORE_MESSAGES" | "AFTER_MESSAGES";
|
|
516
|
+
legalMessage?: string;
|
|
517
|
+
withinBusinessHoursInitialState?: ChatState;
|
|
518
|
+
outsideBusinessHoursInitialState?: ChatState;
|
|
519
|
+
withinBusinessHoursButtontext?: string;
|
|
520
|
+
outsideBusinessHoursButtontext?: string;
|
|
521
|
+
reopenChatMessage: string;
|
|
522
|
+
};
|
|
523
|
+
type CustomerServiceIntegration = SimpleCustomerServiceIntegration | FullCustomerServiceIntegration;
|
|
524
|
+
type ConversationalSeach = {
|
|
525
|
+
enabled?: boolean;
|
|
526
|
+
replyInput?: ReplyInputConfig;
|
|
527
|
+
suggestions?: string[];
|
|
528
|
+
entrypointBgColor?: string;
|
|
529
|
+
entrypointTextColor?: string;
|
|
530
|
+
entrypointBtnColor?: string;
|
|
531
|
+
entrypointBtnTextColor?: string;
|
|
532
|
+
entrypointBtnBorderColor?: string;
|
|
533
|
+
entrypointContainer?: string;
|
|
534
|
+
entrypointTrigger?: string;
|
|
535
|
+
productGridContainer?: string;
|
|
536
|
+
generalSearchBtn?: string;
|
|
537
|
+
pageContent?: string;
|
|
538
|
+
searchContent?: string;
|
|
539
|
+
sortingTitle?: string;
|
|
540
|
+
selectionTitle?: string;
|
|
541
|
+
sortingFont?: string;
|
|
542
|
+
optionsFont?: string;
|
|
543
|
+
sortingButtonText?: string;
|
|
544
|
+
};
|
|
545
|
+
type ChatMessageVariant = "standard" | "premium" | "accent";
|
|
546
|
+
interface ChatMessageConfig {
|
|
547
|
+
assistantChatTitle: string;
|
|
548
|
+
variant: ChatMessageVariant;
|
|
549
|
+
productLink: {
|
|
550
|
+
variant: ProductLinkVariant;
|
|
551
|
+
hoverVariant: ProductLinkHoverVariant;
|
|
552
|
+
iconVariant: ProductLinkIconVariant;
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
interface ReplyInputConfig {
|
|
556
|
+
size?: "md" | "lg";
|
|
557
|
+
sendIcon: "arrowUp" | "send" | "search";
|
|
558
|
+
placeholder?: string;
|
|
559
|
+
}
|
|
560
|
+
interface PartialViewConfig {
|
|
561
|
+
maxHeight: number;
|
|
562
|
+
borderRadius?: string;
|
|
563
|
+
}
|
|
564
|
+
type ProductLinkIconVariant = "accentPrimary" | "backgroundPrimary" | "backgroundPrimaryDark" | "borderLight" | "backgroundSaturated";
|
|
565
|
+
type ProductLinkVariant = "textLink";
|
|
566
|
+
type ProductLinkHoverVariant = "backgroundDark";
|
|
567
|
+
type SearchCardVariant = "backgroundPrimary" | "backgroundSecondary" | "backgroundSecondaryDark" | "backgroundLight" | "backgroundSaturated";
|
|
568
|
+
type SuggestionButtonVariant = "outlined" | "outlinedLight" | "primary" | "secondary" | "tertiary" | "dark" | "darkAccent" | "darkPrimary" | "secondaryDark" | "secondaryAccent" | "transparent" | "transparentDark" | "lightDark";
|
|
569
|
+
interface SuggestionButtonConfig {
|
|
570
|
+
variant?: SuggestionButtonVariant;
|
|
571
|
+
hoverVariant?: SuggestionButtonVariant;
|
|
572
|
+
answerVariant?: SuggestionButtonVariant;
|
|
573
|
+
borderRadius?: "sm" | "md" | "lg";
|
|
574
|
+
}
|
|
575
|
+
type NumRows = "default" | "alwaysOneRow" | "alwaysTwoRows" | "twoRowsOnMobile";
|
|
576
|
+
interface AlphabeticFilterSorting {
|
|
577
|
+
type: "alphabetic";
|
|
578
|
+
}
|
|
579
|
+
interface ProductCountFilterSorting {
|
|
580
|
+
type: "productCount";
|
|
581
|
+
}
|
|
582
|
+
interface CustomFilterSorting {
|
|
583
|
+
type: "custom";
|
|
584
|
+
map: Record<string, number>;
|
|
585
|
+
}
|
|
586
|
+
type FilterSorting = AlphabeticFilterSorting | ProductCountFilterSorting | CustomFilterSorting;
|
|
587
|
+
interface BaseFilterConfig {
|
|
588
|
+
filterId: string;
|
|
589
|
+
displayName: string;
|
|
590
|
+
}
|
|
591
|
+
interface DynamicFilterConfig extends BaseFilterConfig {
|
|
592
|
+
type: "dynamic";
|
|
593
|
+
attribute: string;
|
|
594
|
+
sorting: FilterSorting;
|
|
595
|
+
}
|
|
596
|
+
interface PriceFilterConfig extends BaseFilterConfig {
|
|
597
|
+
type: "price";
|
|
598
|
+
bucketSize: number;
|
|
599
|
+
}
|
|
600
|
+
type FilterAttribute = DynamicFilterConfig | PriceFilterConfig;
|
|
601
|
+
type SearchZeroStateVariant = "backgroundTertiary" | "backgroundDark" | "backgroundPrimary";
|
|
602
|
+
type SearchZeroStateLayout = "input" | "icon";
|
|
603
|
+
type SearchInputVariant = "standard";
|
|
604
|
+
type SearchIconVariant = "thin" | "bold";
|
|
605
|
+
type SearchFilterSidebarVariant = "darkButton" | "lightButton";
|
|
606
|
+
type ProductGridVariant = "standard" | "square";
|
|
607
|
+
type UserQueryButtonIcon = "magnifyingGlass" | "send" | "magnifyingGlassThin" | "sendArrow" | "searchIcon";
|
|
608
|
+
interface UserQueryButtonConfig {
|
|
609
|
+
variant?: "box" | "underlineLight" | "underlineDark";
|
|
610
|
+
placeholderText?: string;
|
|
611
|
+
icon: UserQueryButtonIcon;
|
|
612
|
+
}
|
|
613
|
+
interface TermsAndConditionsConfig {
|
|
614
|
+
copy: string;
|
|
615
|
+
link: string;
|
|
616
|
+
linkText: string;
|
|
617
|
+
}
|
|
618
|
+
interface MerchantVariantSettings {
|
|
619
|
+
dynamicVariants: {
|
|
620
|
+
enabled: boolean;
|
|
621
|
+
refreshInterval?: number;
|
|
622
|
+
};
|
|
623
|
+
}
|
|
624
|
+
interface FloatingChatConfig {
|
|
625
|
+
enableWatermark: boolean;
|
|
626
|
+
userQueryInputEnabled: boolean;
|
|
627
|
+
ignoreFirstModelResponse?: boolean;
|
|
628
|
+
neverShowSingleProductCards?: boolean;
|
|
629
|
+
termsAndConditionsConfig?: TermsAndConditionsConfig;
|
|
630
|
+
suggestionButtonConfig?: SuggestionButtonConfig;
|
|
631
|
+
replyInputConfig: ReplyInputConfig;
|
|
632
|
+
}
|
|
633
|
+
interface SearchConfig {
|
|
634
|
+
enableGlobalSearch: boolean;
|
|
635
|
+
searchFilterConfig: FilterAttribute[];
|
|
636
|
+
redirectSearchResultsUrl?: string;
|
|
637
|
+
additiveDynamicFilters?: boolean;
|
|
638
|
+
}
|
|
639
|
+
type OrgUIConfig = {
|
|
640
|
+
shortName: string;
|
|
641
|
+
id?: string;
|
|
642
|
+
floatingEntrypointConfig?: FloatingEntryPointConfig;
|
|
643
|
+
chatPreviewConfig?: ChatPreviewConfig;
|
|
644
|
+
customerServiceIntegration: CustomerServiceIntegration;
|
|
645
|
+
conversationalSearch?: ConversationalSeach;
|
|
646
|
+
merchantOverrideCss?: string;
|
|
647
|
+
hiddenElementSelectors?: string[];
|
|
648
|
+
merchantVariantSettings?: MerchantVariantSettings;
|
|
649
|
+
floatingChatConfig: FloatingChatConfig;
|
|
650
|
+
searchConfig: SearchConfig;
|
|
651
|
+
chatHeader: ChatHeaderConfig;
|
|
652
|
+
stickyAgentSwitchSuggestion?: boolean;
|
|
653
|
+
partialViewConfig: PartialViewConfig;
|
|
654
|
+
welcomeSectionConfig?: WelcomeSectionConfig;
|
|
655
|
+
productCardConfig?: ProductCardConfig;
|
|
656
|
+
productReviewConfig?: ProductReviewConfig;
|
|
657
|
+
pageCardConfig?: PageCardConfig;
|
|
658
|
+
chatMessageConfig: ChatMessageConfig;
|
|
659
|
+
};
|
|
660
|
+
type InsertionPoint = {
|
|
661
|
+
selector: string;
|
|
662
|
+
selectionIndex?: number;
|
|
663
|
+
insertionType: DOMInsertionType;
|
|
664
|
+
};
|
|
665
|
+
type URLTest = "shopify" | "null";
|
|
666
|
+
type IdExtractor = "shopify-product-id" | "shopify-collection-id" | "shopify-product-variant-id" | "url-resolver-product-id" | "url-resolver-plp-id" | "null";
|
|
667
|
+
declare enum CategoryExtractorType {
|
|
668
|
+
VisitCategoryMap = "VisitCategoryMap",
|
|
669
|
+
VisitCategoryDefault = "VisitCategoryDefault",
|
|
670
|
+
}
|
|
671
|
+
interface BaseCategoryExtractor<T extends CategoryExtractorType> {
|
|
672
|
+
type: T;
|
|
673
|
+
}
|
|
674
|
+
interface VisitCategoryMap extends BaseCategoryExtractor<CategoryExtractorType.VisitCategoryMap> {
|
|
675
|
+
map: { [key in PageVisitCategory]?: string[] };
|
|
676
|
+
}
|
|
677
|
+
interface VisitCategoryDefault extends BaseCategoryExtractor<CategoryExtractorType.VisitCategoryDefault> {
|
|
678
|
+
value: PageVisitCategory;
|
|
679
|
+
}
|
|
680
|
+
type CategoryExtractor = VisitCategoryMap | VisitCategoryDefault;
|
|
681
|
+
type WrappingElement = {
|
|
682
|
+
className: string;
|
|
683
|
+
element: string;
|
|
684
|
+
insertionType: DOMInsertionType;
|
|
685
|
+
};
|
|
686
|
+
declare enum PageVariantTestType {
|
|
687
|
+
ShopifyPLP = "ShopifyPLP",
|
|
688
|
+
ShopifyPDP = "ShopifyPDP",
|
|
689
|
+
PageCategory = "PageCategory",
|
|
690
|
+
CatalogCategory = "CatalogCategory",
|
|
691
|
+
TopCatalogCategory = "TopCatalogCategory",
|
|
692
|
+
HasReviews = "HasReviews",
|
|
693
|
+
InCollection = "InCollection",
|
|
694
|
+
HasMerchantTag = "HasMerchantTag",
|
|
695
|
+
FeatureGate = "FeatureGate",
|
|
696
|
+
PlpId = "PlpId",
|
|
697
|
+
QueryParam = "QueryParam",
|
|
698
|
+
ProductId = "ProductId",
|
|
699
|
+
UserHasInteracted = "UserHasInteracted",
|
|
700
|
+
UserHasNotInteracted = "UserHasNotInteracted",
|
|
701
|
+
isLoading = "isLoading",
|
|
702
|
+
isProductComparison = "isProductComparison",
|
|
703
|
+
Fallback = "Fallback",
|
|
704
|
+
UrlResolver = "UrlResolver",
|
|
705
|
+
Null = "null",
|
|
706
|
+
}
|
|
707
|
+
interface BasePageVariantTest<T extends PageVariantTestType> {
|
|
708
|
+
testType: T;
|
|
709
|
+
}
|
|
710
|
+
interface TopCatalogCategory extends BasePageVariantTest<PageVariantTestType.TopCatalogCategory> {
|
|
711
|
+
topCategory: string[];
|
|
712
|
+
}
|
|
713
|
+
interface CatalogCategoryTest extends BasePageVariantTest<PageVariantTestType.CatalogCategory> {
|
|
714
|
+
category: SupportedEventProductCategory;
|
|
715
|
+
}
|
|
716
|
+
interface HasReviewsTest extends BasePageVariantTest<PageVariantTestType.HasReviews> {
|
|
717
|
+
reviewMinimum?: number;
|
|
718
|
+
}
|
|
719
|
+
interface InCollectionTest extends BasePageVariantTest<PageVariantTestType.InCollection> {
|
|
720
|
+
collections: string[];
|
|
721
|
+
}
|
|
722
|
+
interface HasMerchantTagTest extends BasePageVariantTest<PageVariantTestType.HasMerchantTag> {
|
|
723
|
+
merchantTags: string[];
|
|
724
|
+
}
|
|
725
|
+
interface ShopifyPLPURLTest extends BasePageVariantTest<PageVariantTestType.ShopifyPLP> {}
|
|
726
|
+
interface ShopifyPDPURLTest extends BasePageVariantTest<PageVariantTestType.ShopifyPDP> {}
|
|
727
|
+
interface PageCategoryTest extends BasePageVariantTest<PageVariantTestType.PageCategory> {
|
|
728
|
+
extractor: CategoryExtractor;
|
|
729
|
+
}
|
|
730
|
+
interface FeatureGateTest extends BasePageVariantTest<PageVariantTestType.FeatureGate> {
|
|
731
|
+
featureGate: FeatureGates;
|
|
732
|
+
}
|
|
733
|
+
interface ProductIdTest extends BasePageVariantTest<PageVariantTestType.ProductId> {
|
|
734
|
+
productIdExtractor: IdExtractor;
|
|
735
|
+
productIds: string[];
|
|
736
|
+
}
|
|
737
|
+
interface PlpIdTest extends BasePageVariantTest<PageVariantTestType.PlpId> {
|
|
738
|
+
plpIdExtractor: IdExtractor;
|
|
739
|
+
plpIds: string[];
|
|
740
|
+
}
|
|
741
|
+
interface QueryParamTest extends BasePageVariantTest<PageVariantTestType.QueryParam> {
|
|
742
|
+
queryParam: string;
|
|
743
|
+
}
|
|
744
|
+
interface UserHasInteractedTest extends BasePageVariantTest<PageVariantTestType.UserHasInteracted> {}
|
|
745
|
+
interface UserHasNotInteractedTest extends BasePageVariantTest<PageVariantTestType.UserHasNotInteracted> {}
|
|
746
|
+
interface IsLoadingTest extends BasePageVariantTest<PageVariantTestType.isLoading> {}
|
|
747
|
+
interface IsProductComparison extends BasePageVariantTest<PageVariantTestType.isProductComparison> {}
|
|
748
|
+
interface PageFallbackTest extends BasePageVariantTest<PageVariantTestType.Fallback> {}
|
|
749
|
+
interface UrlResolverTest extends BasePageVariantTest<PageVariantTestType.UrlResolver> {}
|
|
750
|
+
type PageVariantTest = PageCategoryTest | ShopifyPLPURLTest | ShopifyPDPURLTest | CatalogCategoryTest | TopCatalogCategory | HasReviewsTest | InCollectionTest | HasMerchantTagTest | FeatureGateTest | ProductIdTest | PlpIdTest | QueryParamTest | UserHasInteractedTest | UserHasNotInteractedTest | IsLoadingTest | IsProductComparison | PageFallbackTest | UrlResolverTest;
|
|
751
|
+
/**
|
|
752
|
+
* Configuration for the social proof embedded widget
|
|
753
|
+
*
|
|
754
|
+
* @param headerTitle - The title text to display in the widget header
|
|
755
|
+
* @param staticSuggestions - A list of strings to display as suggestions in the widget
|
|
756
|
+
* @param suggestionButtonVariantDefault - The variant of the suggestion button to display in the widget footer
|
|
757
|
+
* @param suggestionButtonVariantAccent - The variant of the suggestion button to display in the widget body
|
|
758
|
+
* @param staticImageIndex - Index of the imageUrl to use from the product response
|
|
759
|
+
*/
|
|
760
|
+
interface SocialProofConfig {
|
|
761
|
+
customerQuery: string;
|
|
762
|
+
headerTitle: string;
|
|
763
|
+
staticPLPImagesLayout?: "grid" | "horizontal";
|
|
764
|
+
headerFontFamily?: string;
|
|
765
|
+
staticPLPImageNames?: string[];
|
|
766
|
+
staticImageIndex?: number;
|
|
767
|
+
suggestionButtonStrings: string[];
|
|
768
|
+
suggestionButtonVariantDefault: SuggestionButtonVariant;
|
|
769
|
+
suggestionButtonVariantAccent?: SuggestionButtonVariant;
|
|
770
|
+
suggestionButtonDataAttributes?: Record<string, string>;
|
|
771
|
+
userQueryButtonConfig?: UserQueryButtonConfig;
|
|
772
|
+
logoName?: string;
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* Configuration for creating the mount point for a widget
|
|
776
|
+
*
|
|
777
|
+
* @param className - Optional class name to apply to the mount point. Tailwind classes are supported
|
|
778
|
+
* and encouraged. Use this parameter to style the mounting container for the widget.
|
|
779
|
+
*/
|
|
780
|
+
type WidgetMountingConfig = {
|
|
781
|
+
mountingConfigId: string;
|
|
782
|
+
containerId: string;
|
|
783
|
+
testId: string;
|
|
784
|
+
parentInsertionPoint?: InsertionPoint;
|
|
785
|
+
insertionPoint: InsertionPoint;
|
|
786
|
+
gridInsertionType?: GridInsertionType;
|
|
787
|
+
wrappingElement?: WrappingElement;
|
|
788
|
+
divCheckSelector?: string;
|
|
789
|
+
suppressionSelector?: string;
|
|
790
|
+
style?: Partial<CSSStyleDeclaration>;
|
|
791
|
+
className?: string;
|
|
792
|
+
dataAttributes?: Record<string, string>;
|
|
793
|
+
};
|
|
794
|
+
type StaticWidgetMounting = {
|
|
795
|
+
mountingConfigId: string;
|
|
796
|
+
widgetConfigId: string;
|
|
797
|
+
};
|
|
798
|
+
type DynamicWidgetMounting = {
|
|
799
|
+
mountingConfigId: string;
|
|
800
|
+
mountingPointWidgets: WidgetDisplayTests[];
|
|
801
|
+
};
|
|
802
|
+
type WidgetDisplayTests = {
|
|
803
|
+
tests: PageVariantTest[];
|
|
804
|
+
widgetConfigId: string;
|
|
805
|
+
};
|
|
806
|
+
type WidgetMounting = StaticWidgetMounting | DynamicWidgetMounting;
|
|
807
|
+
declare enum WidgetType {
|
|
808
|
+
ChatPreview = "ChatPreview",
|
|
809
|
+
SocialProofV2 = "SocialProofV2",
|
|
810
|
+
ChatPreviewV2 = "ChatPreviewV2",
|
|
811
|
+
ChatPreviewIsLoading = "ChatPreviewIsLoading",
|
|
812
|
+
ChatPreviewPostInteraction = "ChatPreviewPostInteraction",
|
|
813
|
+
ChatPreviewProductComparison = "ChatPreviewProductComparison",
|
|
814
|
+
SuggestionBar = "SuggestionBar",
|
|
815
|
+
SuggestionBarV2 = "SuggestionBarV2",
|
|
816
|
+
ImagePromptCard = "ImagePromptCard",
|
|
817
|
+
ImageBanner = "ImageBanner",
|
|
818
|
+
SingleImagePrompt = "SingleImagePrompt",
|
|
819
|
+
SearchPrompt = "SearchPrompt",
|
|
820
|
+
SearchZeroStateEntryPoint = "SearchZeroStateEntryPoint",
|
|
821
|
+
SearchResultsEntryPoint = "SearchResultsEntryPoint",
|
|
822
|
+
SearchOverlayHost = "SearchOverlayHost",
|
|
823
|
+
NoOp = "NoOp",
|
|
824
|
+
}
|
|
825
|
+
type WidgetConfig = ChatPreviewWidgetConfig | SocialProofV2WidgetConfig | ChatPreviewV2WidgetConfig | ChatPreviewPostInteractionWidgetConfig | ChatPreviewIsLoadingWidgetConfig | ChatPreviewProductComparisonWidgetConfig | SuggestionBarWidgetV2Config | ImagePromptWidgetConfig | ImageBannerWidgetConfig | SingleImagePromptWidgetConfig | SearchPromptWidgetConfig | SearchEntryPointWidgetConfig | SearchResultsEntryPointWidgetConfig | SearchOverlayHostWidgetConfig | NoOpWidgetConfig;
|
|
826
|
+
interface BaseWidgetConfig<T extends WidgetType> {
|
|
827
|
+
widgetConfigId: string;
|
|
828
|
+
type: T;
|
|
829
|
+
contentId?: string;
|
|
830
|
+
}
|
|
831
|
+
interface ImageBannerWidgetConfig extends BaseWidgetConfig<WidgetType.ImageBanner> {
|
|
832
|
+
imageSrc: string;
|
|
833
|
+
title: string;
|
|
834
|
+
subtitle: string;
|
|
835
|
+
assistantMessage: string;
|
|
836
|
+
}
|
|
837
|
+
interface ChatPreviewWidgetConfig extends BaseWidgetConfig<WidgetType.ChatPreview> {
|
|
838
|
+
variant: "filled" | "flat" | "outlined";
|
|
839
|
+
addSeparators?: boolean;
|
|
840
|
+
socialProofConfig?: SocialProofConfig;
|
|
841
|
+
footerConfig?: ChatPreviewFooterConfig;
|
|
842
|
+
}
|
|
843
|
+
interface ChatPreviewHeaderV2Config {
|
|
844
|
+
title?: string;
|
|
845
|
+
imageSrc?: string;
|
|
846
|
+
imageHeight?: number;
|
|
847
|
+
}
|
|
848
|
+
type SingleImageConfig = {
|
|
849
|
+
layout: "single";
|
|
850
|
+
imageIndex: number;
|
|
851
|
+
};
|
|
852
|
+
type MultiImageConfig = {
|
|
853
|
+
layout: "grid" | "horizontal";
|
|
854
|
+
imageNames: string[];
|
|
855
|
+
};
|
|
856
|
+
type SocialProofImageConfig = SingleImageConfig | MultiImageConfig;
|
|
857
|
+
type ChatPreviewSuggestionButtonConfig = {
|
|
858
|
+
buttonStrings: string[];
|
|
859
|
+
accentButtonVariants?: {
|
|
860
|
+
button: SuggestionButtonVariant;
|
|
861
|
+
hover: SuggestionButtonVariant;
|
|
862
|
+
};
|
|
863
|
+
buttonVariants: {
|
|
864
|
+
button: SuggestionButtonVariant;
|
|
865
|
+
hover: SuggestionButtonVariant;
|
|
866
|
+
};
|
|
867
|
+
numRows?: NumRows;
|
|
868
|
+
};
|
|
869
|
+
type ChatPreviewAnimatedTextConfig = {
|
|
870
|
+
leadingText: string;
|
|
871
|
+
animatedStrings: string[];
|
|
872
|
+
};
|
|
873
|
+
type ChatPreviewVariant = {
|
|
874
|
+
variant: "flat";
|
|
875
|
+
} | {
|
|
876
|
+
variant: "filled";
|
|
877
|
+
backgroundFillColor: string;
|
|
878
|
+
} | {
|
|
879
|
+
variant: "outlined";
|
|
880
|
+
};
|
|
881
|
+
interface BaseChatPreviewConfig {
|
|
882
|
+
headerConfig: ChatPreviewHeaderV2Config;
|
|
883
|
+
suggestionButtonsConfig: ChatPreviewSuggestionButtonConfig;
|
|
884
|
+
userQueryButtonConfig: UserQueryButtonConfig;
|
|
885
|
+
chatPreviewVariant: ChatPreviewVariant;
|
|
886
|
+
addSeparators?: boolean;
|
|
887
|
+
}
|
|
888
|
+
interface ChatPreviewPostInteractionWidgetConfig extends BaseWidgetConfig<WidgetType.ChatPreviewPostInteraction>, BaseChatPreviewConfig {
|
|
889
|
+
chatPreviewVariant: ChatPreviewVariant;
|
|
890
|
+
addSeparators?: boolean;
|
|
891
|
+
}
|
|
892
|
+
interface ChatPreviewIsLoadingWidgetConfig extends BaseWidgetConfig<WidgetType.ChatPreviewIsLoading>, BaseChatPreviewConfig {}
|
|
893
|
+
interface ChatPreviewProductComparisonWidgetConfig extends BaseWidgetConfig<WidgetType.ChatPreviewProductComparison>, BaseChatPreviewConfig {
|
|
894
|
+
useLargeProductComparison?: boolean;
|
|
895
|
+
}
|
|
896
|
+
interface ChatPreviewV2WidgetConfig extends BaseWidgetConfig<WidgetType.ChatPreviewV2>, BaseChatPreviewConfig {
|
|
897
|
+
animatedTextConfig: ChatPreviewAnimatedTextConfig;
|
|
898
|
+
}
|
|
899
|
+
interface SocialProofV2WidgetConfig extends BaseWidgetConfig<WidgetType.SocialProofV2>, BaseChatPreviewConfig {
|
|
900
|
+
customerQuery?: string;
|
|
901
|
+
imageConfig: SocialProofImageConfig;
|
|
902
|
+
}
|
|
903
|
+
interface SuggestionBarWidgetV2Config extends BaseWidgetConfig<WidgetType.SuggestionBarV2> {
|
|
904
|
+
metricDisplayLocation: ChatElementDisplayLocation;
|
|
905
|
+
location: SuggestionBarLocationForMetrics;
|
|
906
|
+
variant: SuggestionButtonVariant;
|
|
907
|
+
hoverVariant: SuggestionButtonVariant;
|
|
908
|
+
buttonTexts: {
|
|
909
|
+
default: string[];
|
|
910
|
+
productSpecific?: {
|
|
911
|
+
[productId: string]: string[];
|
|
912
|
+
};
|
|
913
|
+
};
|
|
914
|
+
boldFirstButton?: boolean;
|
|
915
|
+
twoRowsOnMobile?: boolean;
|
|
916
|
+
animationSpeed?: "standard" | "slow" | "none";
|
|
917
|
+
buttonBorderRadius?: "sm" | "md" | "lg";
|
|
918
|
+
}
|
|
919
|
+
interface ImagePromptWidgetConfig extends BaseWidgetConfig<WidgetType.ImagePromptCard> {
|
|
920
|
+
url: string;
|
|
921
|
+
lightText?: boolean;
|
|
922
|
+
title: string;
|
|
923
|
+
subtitle: string[];
|
|
924
|
+
staticSuggestionCopies: string[];
|
|
925
|
+
userQueryButtonConfig: UserQueryButtonConfig;
|
|
926
|
+
fallbackBackgroundColor?: string;
|
|
927
|
+
}
|
|
928
|
+
interface SingleImagePromptWidgetConfig extends BaseWidgetConfig<WidgetType.SingleImagePrompt> {
|
|
929
|
+
title: string;
|
|
930
|
+
staticSuggestionCopies: string[];
|
|
931
|
+
userQueryButtonConfig: UserQueryButtonConfig;
|
|
932
|
+
}
|
|
933
|
+
interface SearchEntryPointWidgetConfig extends BaseWidgetConfig<WidgetType.SearchZeroStateEntryPoint> {
|
|
934
|
+
searchZeroStateVariant: SearchZeroStateVariant;
|
|
935
|
+
searchInputVariant: SearchInputVariant;
|
|
936
|
+
searchIconVariant?: SearchIconVariant;
|
|
937
|
+
searchIconSize?: number;
|
|
938
|
+
suggestionButtonConfig: SuggestionButtonConfig;
|
|
939
|
+
layout: SearchZeroStateLayout;
|
|
940
|
+
searchBoxPlaceholder: string;
|
|
941
|
+
animationSpeed?: "standard" | "slow" | "none";
|
|
942
|
+
compactLabel?: string;
|
|
943
|
+
initialSuggestions?: string[];
|
|
944
|
+
usingPortal?: boolean;
|
|
945
|
+
}
|
|
946
|
+
interface NoOpWidgetConfig extends BaseWidgetConfig<WidgetType.NoOp> {}
|
|
947
|
+
interface SearchOverlayHostWidgetConfig extends BaseWidgetConfig<WidgetType.SearchOverlayHost> {}
|
|
948
|
+
interface SearchResultsEntryPointWidgetConfig extends BaseWidgetConfig<WidgetType.SearchResultsEntryPoint> {
|
|
949
|
+
searchInputVariant: SearchInputVariant;
|
|
950
|
+
searchFilterSidebarVariant: SearchFilterSidebarVariant;
|
|
951
|
+
productGridVariant: ProductGridVariant;
|
|
952
|
+
searchBoxPlaceholder: string;
|
|
953
|
+
noResultsFoundText?: string;
|
|
954
|
+
}
|
|
955
|
+
interface WidgetHeaderProps extends TestProps {
|
|
956
|
+
title?: string;
|
|
957
|
+
logo?: string;
|
|
958
|
+
logoHeight?: number;
|
|
959
|
+
orgShortName: string;
|
|
960
|
+
variant?: SearchPromptVariant;
|
|
961
|
+
}
|
|
962
|
+
interface UserQueryOptions {
|
|
963
|
+
footerVariant?: "standard";
|
|
964
|
+
replyButtonText?: string;
|
|
965
|
+
replyButtonIcon?: "magnifyingGlass" | "send" | "thinMagnifyingGlass" | "ai-search";
|
|
966
|
+
}
|
|
967
|
+
type SearchPromptVariant = "primary";
|
|
968
|
+
interface SearchPromptWidgetConfig extends BaseWidgetConfig<WidgetType.SearchPrompt> {
|
|
969
|
+
variant: SearchPromptVariant;
|
|
970
|
+
title: string;
|
|
971
|
+
headerConfig: WidgetHeaderProps;
|
|
972
|
+
suggestionButtons: {
|
|
973
|
+
variant: SuggestionButtonVariant;
|
|
974
|
+
hoverVariant: SuggestionButtonVariant;
|
|
975
|
+
buttonTexts: string[];
|
|
976
|
+
};
|
|
977
|
+
footerConfig?: UserQueryOptions;
|
|
978
|
+
}
|
|
979
|
+
type PageVariantBase = {
|
|
980
|
+
variantId: string;
|
|
981
|
+
widgetMounting: WidgetMounting[];
|
|
982
|
+
variantTests: PageVariantTest[];
|
|
983
|
+
};
|
|
984
|
+
type PLPPageVariant = PageVariantBase & {
|
|
985
|
+
variantType: "plp";
|
|
986
|
+
plpIdExtractor: IdExtractor;
|
|
987
|
+
};
|
|
988
|
+
type PDPPageVariant = PageVariantBase & {
|
|
989
|
+
variantType: "pdp";
|
|
990
|
+
parentProductIdExtractor?: IdExtractor;
|
|
991
|
+
productIdExtractor: IdExtractor;
|
|
992
|
+
};
|
|
993
|
+
type VisitPageVariant = PageVariantBase & {
|
|
994
|
+
variantType: "page_visit";
|
|
995
|
+
};
|
|
996
|
+
type OtherPageVariant = PageVariantBase & {
|
|
997
|
+
variantType: "other";
|
|
998
|
+
};
|
|
999
|
+
type HomePageVariant = PageVariantBase & {
|
|
1000
|
+
variantType: "homepage";
|
|
1001
|
+
};
|
|
1002
|
+
type SearchPageVariant = PageVariantBase & {
|
|
1003
|
+
variantType: "search";
|
|
1004
|
+
};
|
|
1005
|
+
type PageVariantConfig = PLPPageVariant | PDPPageVariant | VisitPageVariant | OtherPageVariant | HomePageVariant | SearchPageVariant;
|
|
1006
|
+
type OrgPageConfig = {
|
|
1007
|
+
pageVariants: PageVariantConfig[];
|
|
1008
|
+
widgetConfigs: Record<string, WidgetConfig>;
|
|
1009
|
+
mountingConfigs: Record<string, WidgetMountingConfig>;
|
|
1010
|
+
};
|
|
1011
|
+
interface OrgConfigContextType {
|
|
1012
|
+
orgUIConfig: OrgUIConfig;
|
|
1013
|
+
}
|
|
1014
|
+
interface EnviveConfig {
|
|
1015
|
+
amplitudeApiKey: string;
|
|
1016
|
+
dataResidency: string;
|
|
1017
|
+
env: string;
|
|
1018
|
+
baseUrl: string;
|
|
1019
|
+
reactAppName: string;
|
|
1020
|
+
cdnUrl: string;
|
|
1021
|
+
contextSource: string;
|
|
1022
|
+
orgLevelApiKey: string;
|
|
1023
|
+
orgShortName: string;
|
|
1024
|
+
}
|
|
1025
|
+
//#endregion
|
|
1026
|
+
export { CamelCasedPropertiesDeep, type CategoryExtractor, CategoryExtractorType, ChatElementDisplayLocation, type ChatMessageConfig, type ChatMessageVariant, type ChatPreviewConfig, type ChatPreviewFooterConfig, type ChatPreviewHeaderConfig, type ChatPreviewHeaderV2Config, type ChatPreviewIsLoadingWidgetConfig, type ChatPreviewPostInteractionWidgetConfig, type ChatPreviewProductComparisonWidgetConfig, type ChatPreviewSuggestionButtonConfig, type ChatPreviewV2WidgetConfig, type ChatPreviewVariant, type ChatPreviewWidgetConfig, type ColorMapping, ColorNames, type CustomerServiceIntegration, type DynamicWidgetMounting, EnviveConfig, FilterAttribute, type FloatingEntryPointConfig, type FullCustomerServiceIntegration, GenerationParams$1 as GenerationParams, type HomePageVariant, type IdExtractor, type ImageBannerWidgetConfig, type ImagePromptWidgetConfig, type InsertionPoint, type MultiImageConfig, type NoOpWidgetConfig, type NumRows, type OrgConfigContextType, OrgPageConfig, type OrgUIConfig, type OtherPageVariant, type PDPPageVariant, type PLPPageVariant, type PageCardConfig, type PageCardHoverVariant, type PageCardIconVariant, type PageCardVariant, PageVariantConfig, PageVariantTest, PageVariantTestType, type ProductCardConfig, type ProductCardHoverVariant, type ProductCardLayoutVariant, type ProductCardVariant, ProductGridVariant, type ProductLinkHoverVariant, type ProductLinkIconVariant, type ProductLinkVariant, type ProductReviewColorVariant, type ProductReviewConfig, type ProductReviewStyleVariant, type SearchCardVariant, type SearchEntryPointWidgetConfig, SearchFilterSidebarVariant, SearchIconVariant, SearchInputVariant, type SearchOverlayHostWidgetConfig, type SearchPageVariant, type SearchPromptVariant, type SearchPromptWidgetConfig, type SearchResultsEntryPointWidgetConfig, SearchZeroStateLayout, SearchZeroStateVariant, type ShowFloatingButtonOptions, type SingleImagePromptWidgetConfig, type SocialProofConfig, type SocialProofV2WidgetConfig, type StaticWidgetMounting, type SuggestionBarWidgetV2Config, type SuggestionButtonConfig, type SuggestionButtonVariant, type URLTest, type UserQueryButtonConfig, type UserQueryButtonIcon, UserQueryOptions, type VisitPageVariant, type WelcomeSectionColorVariant, type WelcomeSectionConfig, type WelcomeSectionVariant, type WidgetConfig, type WidgetDisplayTests, WidgetHeaderProps, type WidgetMounting, WidgetMountingConfig, WidgetType, type WrappingElement, colorVar };
|