@constructor-io/constructorio-client-javascript 2.35.12 → 2.35.14
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.
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
NetworkParameters,
|
|
5
5
|
RequestFeature,
|
|
6
6
|
RequestFeatureVariant,
|
|
7
|
+
VariationsMap,
|
|
7
8
|
} from '.';
|
|
8
9
|
import EventDispatcher from './event-dispatcher';
|
|
9
10
|
|
|
@@ -14,7 +15,7 @@ export interface IAutocompleteParameters {
|
|
|
14
15
|
filters?: Record<string, any>;
|
|
15
16
|
resultsPerSection?: Record<string, number>;
|
|
16
17
|
hiddenFields?: string[];
|
|
17
|
-
variationsMap?:
|
|
18
|
+
variationsMap?: VariationsMap;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
declare class Autocomplete {
|
package/lib/types/browse.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
RequestFeatureVariant,
|
|
12
12
|
ResultSources,
|
|
13
13
|
SortOption,
|
|
14
|
+
VariationsMap,
|
|
14
15
|
} from '.';
|
|
15
16
|
import EventDispatcher from './event-dispatcher';
|
|
16
17
|
|
|
@@ -28,7 +29,7 @@ export interface IBrowseParameters {
|
|
|
28
29
|
preFilterExpression?: FilterExpression;
|
|
29
30
|
hiddenFields?: string[];
|
|
30
31
|
hiddenFacets?: string[];
|
|
31
|
-
variationsMap?:
|
|
32
|
+
variationsMap?: VariationsMap;
|
|
32
33
|
qsParam?: Record<string, any>;
|
|
33
34
|
}
|
|
34
35
|
|
|
@@ -121,6 +122,7 @@ export interface BrowseResultData extends Record<string, any> {
|
|
|
121
122
|
is_slotted: false;
|
|
122
123
|
labels: Record<string, any>;
|
|
123
124
|
variations: Record<string, any>[];
|
|
125
|
+
variations_map: Record<string, any> | Record<string, any>[];
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
export interface BrowseRequestType extends Record<string, any> {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -204,3 +204,17 @@ export interface SearchSuggestion extends Item {
|
|
|
204
204
|
total_num_results?: number
|
|
205
205
|
} & ItemData;
|
|
206
206
|
}
|
|
207
|
+
|
|
208
|
+
export interface VariationsMap {
|
|
209
|
+
group_by: Array<{
|
|
210
|
+
name: string,
|
|
211
|
+
field: string
|
|
212
|
+
}>;
|
|
213
|
+
values: {
|
|
214
|
+
[key: string]: {
|
|
215
|
+
aggregation: 'first' | 'min' | 'max' | 'all',
|
|
216
|
+
field: string
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
dtype: 'array' | 'object'
|
|
220
|
+
}
|
package/lib/types/quizzes.d.ts
CHANGED
|
@@ -83,6 +83,10 @@ export interface QuizResultsResponse extends Record<string, any> {
|
|
|
83
83
|
quiz_version_id: string;
|
|
84
84
|
quiz_session_id: string;
|
|
85
85
|
quiz_id: string;
|
|
86
|
+
quiz_selected_options: Array<{
|
|
87
|
+
value: string;
|
|
88
|
+
has_attribute: boolean;
|
|
89
|
+
}>;
|
|
86
90
|
}
|
|
87
91
|
|
|
88
92
|
export interface QuizResultData extends Record<string, any> {
|
|
@@ -97,7 +101,7 @@ export interface QuizResultData extends Record<string, any> {
|
|
|
97
101
|
variations: Record<string, any>[];
|
|
98
102
|
}
|
|
99
103
|
|
|
100
|
-
export type Question = SelectQuestion | OpenQuestion | CoverQuestion
|
|
104
|
+
export type Question = SelectQuestion | OpenQuestion | CoverQuestion;
|
|
101
105
|
|
|
102
106
|
export interface BaseQuestion extends Record<string, any> {
|
|
103
107
|
id: number;
|
|
@@ -108,17 +112,17 @@ export interface BaseQuestion extends Record<string, any> {
|
|
|
108
112
|
}
|
|
109
113
|
|
|
110
114
|
export interface SelectQuestion extends BaseQuestion {
|
|
111
|
-
type: 'single' | 'multiple'
|
|
115
|
+
type: 'single' | 'multiple';
|
|
112
116
|
options: QuestionOption[];
|
|
113
117
|
}
|
|
114
118
|
|
|
115
119
|
export interface OpenQuestion extends BaseQuestion {
|
|
116
|
-
type: 'open'
|
|
117
|
-
|
|
120
|
+
type: 'open';
|
|
121
|
+
input_placeholder?: Nullable<string>;
|
|
118
122
|
}
|
|
119
123
|
|
|
120
124
|
export interface CoverQuestion extends BaseQuestion {
|
|
121
|
-
type: 'cover'
|
|
125
|
+
type: 'cover';
|
|
122
126
|
}
|
|
123
127
|
|
|
124
128
|
export interface QuizResult extends Record<string, any> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConstructorClientOptions, NetworkParameters } from '.';
|
|
1
|
+
import { ConstructorClientOptions, NetworkParameters, VariationsMap } from '.';
|
|
2
2
|
import EventDispatcher from './event-dispatcher';
|
|
3
3
|
|
|
4
4
|
export default Recommendations;
|
|
@@ -9,7 +9,7 @@ export interface RecommendationsParameters {
|
|
|
9
9
|
section?: string;
|
|
10
10
|
term?: string;
|
|
11
11
|
filters?: Record<string, any>;
|
|
12
|
-
variationsMap?:
|
|
12
|
+
variationsMap?: VariationsMap;
|
|
13
13
|
hiddenFields?: string[];
|
|
14
14
|
}
|
|
15
15
|
|
package/lib/types/search.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
RequestFeatureVariant,
|
|
11
11
|
ResultSources,
|
|
12
12
|
SortOption,
|
|
13
|
+
VariationsMap,
|
|
13
14
|
} from '.';
|
|
14
15
|
import EventDispatcher from './event-dispatcher';
|
|
15
16
|
|
|
@@ -27,7 +28,7 @@ export interface SearchParameters {
|
|
|
27
28
|
preFilterExpression?: FilterExpression;
|
|
28
29
|
hiddenFields?: string[];
|
|
29
30
|
hiddenFacets?: string[];
|
|
30
|
-
variationsMap?:
|
|
31
|
+
variationsMap?: VariationsMap;
|
|
31
32
|
qsParam?: Record<string, any>;
|
|
32
33
|
}
|
|
33
34
|
declare class Search {
|
|
@@ -95,6 +96,7 @@ export interface Result extends Record<string, any> {
|
|
|
95
96
|
is_slotted: false;
|
|
96
97
|
labels: Record<string, any>;
|
|
97
98
|
variations: Record<string, any>[];
|
|
99
|
+
variations_map: Record<string, any> | Record<string, any>[];
|
|
98
100
|
}
|
|
99
101
|
|
|
100
102
|
export interface Redirect extends Record<string, any> {
|
package/package.json
CHANGED