@constructor-io/constructorio-node 4.5.6 → 4.6.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.
- package/package.json +1 -1
- package/src/modules/quizzes.js +28 -21
- package/src/types/index.d.ts +1 -1
- package/src/types/quizzes.d.ts +96 -23
- package/src/types/tests/quizzes.test-d.ts +205 -13
- package/src/types/tracker.d.ts +1 -1
package/package.json
CHANGED
package/src/modules/quizzes.js
CHANGED
|
@@ -38,21 +38,26 @@ function createQuizUrl(quizId, parameters, userParameters, options, path) {
|
|
|
38
38
|
throw new Error('quizId is a required parameter of type string');
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
if (path === '
|
|
41
|
+
if (path === 'results' && (typeof parameters.answers !== 'object' || !Array.isArray(parameters.answers) || parameters.answers.length === 0)) {
|
|
42
42
|
throw new Error('answers is a required parameter of type array');
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
if (parameters) {
|
|
46
|
-
const { section, answers,
|
|
46
|
+
const { section, answers, quizVersionId, quizSessionId } = parameters;
|
|
47
47
|
|
|
48
48
|
// Pull section from parameters
|
|
49
49
|
if (section) {
|
|
50
50
|
queryParams.section = section;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
// Pull
|
|
54
|
-
if (
|
|
55
|
-
queryParams.
|
|
53
|
+
// Pull quiz_version_id from parameters
|
|
54
|
+
if (quizVersionId) {
|
|
55
|
+
queryParams.quiz_version_id = quizVersionId;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Pull quiz_session_id from parameters
|
|
59
|
+
if (quizSessionId) {
|
|
60
|
+
queryParams.quiz_session_id = quizSessionId;
|
|
56
61
|
}
|
|
57
62
|
|
|
58
63
|
// Pull answers from parameters and transform
|
|
@@ -88,11 +93,12 @@ class Quizzes {
|
|
|
88
93
|
*
|
|
89
94
|
* @function getQuizNextQuestion
|
|
90
95
|
* @description Retrieve quiz question from Constructor.io API
|
|
91
|
-
* @param {string}
|
|
92
|
-
* @param {string}
|
|
96
|
+
* @param {string} quizId - The identifier of the quiz
|
|
97
|
+
* @param {string} parameters - Additional parameters to refine result set
|
|
98
|
+
* @param {array} parameters.answers - An array for answers in the format [[1,2],[1]]
|
|
93
99
|
* @param {string} [parameters.section] - Product catalog section
|
|
94
|
-
* @param {
|
|
95
|
-
* @param {string} [parameters.
|
|
100
|
+
* @param {string} [parameters.quizVersionId] - Version identifier for the quiz. Version ID will be returned with the first request and it should be passed with subsequent requests. More information can be found [here]{@link https://docs.constructor.io/rest_api/quiz/using_quizzes/#quiz-versioning}
|
|
101
|
+
* @param {string} [parameters.quizSessionId] - Session identifier for the quiz. Session ID will be returned with the first request and it should be passed with subsequent requests. More information can be found [here]{@link https://docs.constructor.io/rest_api/quiz/using_quizzes/#quiz-sessions}
|
|
96
102
|
* @param {object} [userParameters] - Parameters relevant to the user request
|
|
97
103
|
* @param {number} [userParameters.sessionId] - Session ID, utilized to personalize results
|
|
98
104
|
* @param {number} [userParameters.clientId] - Client ID, utilized to personalize results
|
|
@@ -108,10 +114,10 @@ class Quizzes {
|
|
|
108
114
|
* constructorio.quizzes.getQuizNextQuestion('quizId', {
|
|
109
115
|
* answers: [[1,2],[1]],
|
|
110
116
|
* section: '123',
|
|
111
|
-
*
|
|
117
|
+
* quizVersionId: '123'
|
|
112
118
|
* });
|
|
113
119
|
*/
|
|
114
|
-
getQuizNextQuestion(
|
|
120
|
+
getQuizNextQuestion(quizId, parameters, userParameters = {}, networkParameters = {}) {
|
|
115
121
|
const headers = {};
|
|
116
122
|
let requestUrl;
|
|
117
123
|
const { fetch } = this.options;
|
|
@@ -119,7 +125,7 @@ class Quizzes {
|
|
|
119
125
|
const { signal } = controller;
|
|
120
126
|
|
|
121
127
|
try {
|
|
122
|
-
requestUrl = createQuizUrl(
|
|
128
|
+
requestUrl = createQuizUrl(quizId, parameters, userParameters, this.options, 'next');
|
|
123
129
|
} catch (e) {
|
|
124
130
|
return Promise.reject(e);
|
|
125
131
|
}
|
|
@@ -151,7 +157,7 @@ class Quizzes {
|
|
|
151
157
|
return helpers.throwHttpErrorFromResponse(new Error(), response);
|
|
152
158
|
})
|
|
153
159
|
.then((json) => {
|
|
154
|
-
if (json.
|
|
160
|
+
if (json.quiz_version_id) {
|
|
155
161
|
return json;
|
|
156
162
|
}
|
|
157
163
|
|
|
@@ -164,11 +170,12 @@ class Quizzes {
|
|
|
164
170
|
*
|
|
165
171
|
* @function getQuizResults
|
|
166
172
|
* @description Retrieve quiz recommendation and filter expression from Constructor.io API
|
|
167
|
-
* @param {string}
|
|
168
|
-
* @param {string}
|
|
173
|
+
* @param {string} quizId - The identifier of the quiz
|
|
174
|
+
* @param {string} parameters - Additional parameters to refine result set
|
|
175
|
+
* @param {array} parameters.answers - An array of answers in the format [[1,2],[1]]
|
|
169
176
|
* @param {string} [parameters.section] - Product catalog section
|
|
170
|
-
* @param {
|
|
171
|
-
* @param {string} [parameters.
|
|
177
|
+
* @param {string} [parameters.quizVersionId] - Version identifier for the quiz. Version ID will be returned with the first request and it should be passed with subsequent requests. More information can be found [here]{@link https://docs.constructor.io/rest_api/quiz/using_quizzes/#quiz-versioning}
|
|
178
|
+
* @param {string} [parameters.quizSessionId] - Session identifier for the quiz. Session ID will be returned with the first request and it should be passed with subsequent requests. More information can be found [here]{@link https://docs.constructor.io/rest_api/quiz/using_quizzes/#quiz-sessions}
|
|
172
179
|
* @param {object} [userParameters] - Parameters relevant to the user request
|
|
173
180
|
* @param {number} [userParameters.sessionId] - Session ID, utilized to personalize results
|
|
174
181
|
* @param {number} [userParameters.clientId] - Client ID, utilized to personalize results
|
|
@@ -185,10 +192,10 @@ class Quizzes {
|
|
|
185
192
|
* constructorio.quizzes.getQuizResults('quizId', {
|
|
186
193
|
* answers: [[1,2],[1]],
|
|
187
194
|
* section: '123',
|
|
188
|
-
*
|
|
195
|
+
* quizVersionId: '123'
|
|
189
196
|
* });
|
|
190
197
|
*/
|
|
191
|
-
getQuizResults(
|
|
198
|
+
getQuizResults(quizId, parameters, userParameters = {}, networkParameters = {}) {
|
|
192
199
|
let requestUrl;
|
|
193
200
|
const headers = {};
|
|
194
201
|
const { fetch } = this.options;
|
|
@@ -196,7 +203,7 @@ class Quizzes {
|
|
|
196
203
|
const { signal } = controller;
|
|
197
204
|
|
|
198
205
|
try {
|
|
199
|
-
requestUrl = createQuizUrl(
|
|
206
|
+
requestUrl = createQuizUrl(quizId, parameters, userParameters, this.options, 'results');
|
|
200
207
|
} catch (e) {
|
|
201
208
|
return Promise.reject(e);
|
|
202
209
|
}
|
|
@@ -228,7 +235,7 @@ class Quizzes {
|
|
|
228
235
|
return helpers.throwHttpErrorFromResponse(new Error(), response);
|
|
229
236
|
})
|
|
230
237
|
.then((json) => {
|
|
231
|
-
if (json.
|
|
238
|
+
if (json.quiz_version_id) {
|
|
232
239
|
return json;
|
|
233
240
|
}
|
|
234
241
|
|
package/src/types/index.d.ts
CHANGED
package/src/types/quizzes.d.ts
CHANGED
|
@@ -1,11 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Nullable, UserParameters } from './index.d';
|
|
2
|
+
import {
|
|
3
|
+
ConstructorClientOptions,
|
|
4
|
+
Facet,
|
|
5
|
+
Feature,
|
|
6
|
+
Group,
|
|
7
|
+
NetworkParameters,
|
|
8
|
+
RequestFeature,
|
|
9
|
+
RequestFeatureVariant,
|
|
10
|
+
SortOption,
|
|
11
|
+
FilterExpression,
|
|
12
|
+
ResultSources,
|
|
13
|
+
} from '.';
|
|
2
14
|
|
|
3
15
|
export default Quizzes;
|
|
4
16
|
|
|
5
17
|
export interface QuizzesParameters {
|
|
18
|
+
answers: any[];
|
|
6
19
|
section?: string;
|
|
7
|
-
|
|
8
|
-
|
|
20
|
+
quizVersionId?: string;
|
|
21
|
+
quizSessionId?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface QuizzesResultsParameters extends QuizzesParameters {
|
|
25
|
+
answers: any[];
|
|
26
|
+
page?: number;
|
|
27
|
+
resultsPerPage?: number;
|
|
28
|
+
filters?: Record<string, any>;
|
|
9
29
|
}
|
|
10
30
|
|
|
11
31
|
declare class Quizzes {
|
|
@@ -14,15 +34,15 @@ declare class Quizzes {
|
|
|
14
34
|
options: ConstructorClientOptions;
|
|
15
35
|
|
|
16
36
|
getQuizNextQuestion(
|
|
17
|
-
|
|
37
|
+
quizId: string,
|
|
18
38
|
parameters?: QuizzesParameters,
|
|
19
39
|
userParameters?: UserParameters,
|
|
20
40
|
networkParameters?: NetworkParameters
|
|
21
41
|
): Promise<NextQuestionResponse>;
|
|
22
42
|
|
|
23
43
|
getQuizResults(
|
|
24
|
-
|
|
25
|
-
parameters?:
|
|
44
|
+
quizId: string,
|
|
45
|
+
parameters?: QuizzesResultsParameters,
|
|
26
46
|
userParameters?: UserParameters,
|
|
27
47
|
networkParameters?: NetworkParameters
|
|
28
48
|
): Promise<QuizResultsResponse>;
|
|
@@ -30,24 +50,77 @@ declare class Quizzes {
|
|
|
30
50
|
|
|
31
51
|
/* quizzes results returned from server */
|
|
32
52
|
export interface NextQuestionResponse extends Record<string, any> {
|
|
33
|
-
next_question:
|
|
53
|
+
next_question: Question;
|
|
34
54
|
is_last_question?: boolean;
|
|
35
|
-
|
|
55
|
+
quiz_version_id: string;
|
|
56
|
+
quiz_id: string;
|
|
57
|
+
quiz_session_id: string;
|
|
36
58
|
}
|
|
59
|
+
|
|
37
60
|
export interface QuizResultsResponse extends Record<string, any> {
|
|
38
|
-
|
|
39
|
-
|
|
61
|
+
request?: {
|
|
62
|
+
filters?: Record<string, any>;
|
|
63
|
+
fmt_options: Record<string, any>;
|
|
64
|
+
num_results_per_page: number;
|
|
65
|
+
page: number;
|
|
66
|
+
section: string;
|
|
67
|
+
sort_by: string;
|
|
68
|
+
sort_order: string;
|
|
69
|
+
features: Partial<RequestFeature>;
|
|
70
|
+
feature_variants: Partial<RequestFeatureVariant>;
|
|
71
|
+
collection_filter_expression: FilterExpression;
|
|
72
|
+
term: string;
|
|
73
|
+
};
|
|
74
|
+
response?: {
|
|
75
|
+
result_sources: Partial<ResultSources>;
|
|
76
|
+
facets: Partial<Facet>[];
|
|
77
|
+
groups: Partial<Group>[];
|
|
78
|
+
results: Partial<QuizResultData>[];
|
|
79
|
+
sort_options: Partial<SortOption>[];
|
|
80
|
+
refined_content: Record<string, any>[];
|
|
81
|
+
total_num_results: number;
|
|
82
|
+
features: Partial<Feature>[];
|
|
83
|
+
};
|
|
84
|
+
result_id?: string;
|
|
85
|
+
quiz_version_id: string;
|
|
86
|
+
quiz_session_id: string;
|
|
87
|
+
quiz_id: string;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface QuizResultData extends Record<string, any> {
|
|
91
|
+
matched_terms: string[];
|
|
92
|
+
data: {
|
|
93
|
+
id: string;
|
|
94
|
+
[key: string]: any;
|
|
95
|
+
};
|
|
96
|
+
value: string;
|
|
97
|
+
is_slotted: false;
|
|
98
|
+
labels: Record<string, any>;
|
|
99
|
+
variations: Record<string, any>[];
|
|
40
100
|
}
|
|
41
101
|
|
|
42
|
-
export
|
|
102
|
+
export type Question = SelectQuestion | OpenQuestion | CoverQuestion
|
|
103
|
+
|
|
104
|
+
export interface BaseQuestion extends Record<string, any> {
|
|
43
105
|
id: number;
|
|
44
106
|
title: string;
|
|
45
107
|
description: string;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
108
|
+
cta_text: Nullable<string>;
|
|
109
|
+
images?: Nullable<QuestionImages>;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface SelectQuestion extends BaseQuestion {
|
|
113
|
+
type: 'single' | 'multiple'
|
|
114
|
+
options: QuestionOption[];
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface OpenQuestion extends BaseQuestion {
|
|
118
|
+
type: 'open'
|
|
119
|
+
inputPlaceholder?: Nullable<string>;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface CoverQuestion extends BaseQuestion {
|
|
123
|
+
type: 'cover'
|
|
51
124
|
}
|
|
52
125
|
|
|
53
126
|
export interface QuizResult extends Record<string, any> {
|
|
@@ -58,16 +131,16 @@ export interface QuizResult extends Record<string, any> {
|
|
|
58
131
|
export interface QuestionOption extends Record<string, any> {
|
|
59
132
|
id: number;
|
|
60
133
|
value: string;
|
|
61
|
-
attribute: {
|
|
134
|
+
attribute: Nullable<{
|
|
62
135
|
name: string;
|
|
63
136
|
value: string;
|
|
64
|
-
}
|
|
65
|
-
images
|
|
137
|
+
}>;
|
|
138
|
+
images?: Nullable<QuestionImages>;
|
|
66
139
|
}
|
|
67
140
|
|
|
68
141
|
export interface QuestionImages extends Record<string, any> {
|
|
69
|
-
primary_url
|
|
70
|
-
primary_alt
|
|
71
|
-
secondary_url
|
|
72
|
-
secondary_alt
|
|
142
|
+
primary_url?: Nullable<string>;
|
|
143
|
+
primary_alt?: Nullable<string>;
|
|
144
|
+
secondary_url?: Nullable<string>;
|
|
145
|
+
secondary_alt?: Nullable<string>;
|
|
73
146
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @cspell/spellchecker */
|
|
1
2
|
import { expectAssignable } from 'tsd';
|
|
2
3
|
import { QuizResultsResponse, NextQuestionResponse } from '..';
|
|
3
4
|
|
|
@@ -34,7 +35,9 @@ expectAssignable<NextQuestionResponse>(
|
|
|
34
35
|
},
|
|
35
36
|
],
|
|
36
37
|
},
|
|
37
|
-
|
|
38
|
+
quiz_version_id: '6bfaa6d5-7272-466b-acd9-4bcf322a2f1e',
|
|
39
|
+
quiz_id: 'test-quiz',
|
|
40
|
+
quiz_session_id: '132feaa5-9968-4c5d-8605-d128747188d6',
|
|
38
41
|
is_last_question: false,
|
|
39
42
|
},
|
|
40
43
|
);
|
|
@@ -54,29 +57,218 @@ expectAssignable<NextQuestionResponse>({
|
|
|
54
57
|
},
|
|
55
58
|
input_placeholder: 'Sample input placeholder',
|
|
56
59
|
},
|
|
57
|
-
|
|
60
|
+
quiz_version_id: '6bfaa6d5-7272-466b-acd9-4bcf322a2f1e',
|
|
61
|
+
quiz_id: 'test-quiz',
|
|
62
|
+
quiz_session_id: '132feaa5-9968-4c5d-8605-d128747188d6',
|
|
58
63
|
is_last_question: false,
|
|
59
64
|
});
|
|
60
65
|
|
|
61
66
|
expectAssignable<QuizResultsResponse>({
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
request: {
|
|
68
|
+
page: 1,
|
|
69
|
+
num_results_per_page: 20,
|
|
70
|
+
collection_filter_expression: {
|
|
71
|
+
or: [
|
|
66
72
|
{
|
|
67
|
-
|
|
68
|
-
{ name: 'group_id', value: '
|
|
69
|
-
{ name: '
|
|
73
|
+
and: [
|
|
74
|
+
{ name: 'group_id', value: 'BrandX' },
|
|
75
|
+
{ name: 'Color', value: 'Blue' },
|
|
70
76
|
],
|
|
71
77
|
},
|
|
72
78
|
{
|
|
73
|
-
|
|
74
|
-
{ name: '
|
|
79
|
+
and: [
|
|
80
|
+
{ name: 'group_id', value: 'BrandX' },
|
|
81
|
+
{ name: 'Color', value: 'red' },
|
|
75
82
|
],
|
|
76
83
|
},
|
|
77
84
|
],
|
|
78
85
|
},
|
|
79
|
-
|
|
86
|
+
term: '',
|
|
87
|
+
fmt_options: {
|
|
88
|
+
groups_start: 'current',
|
|
89
|
+
groups_max_depth: 1,
|
|
90
|
+
show_hidden_facets: false,
|
|
91
|
+
show_hidden_fields: false,
|
|
92
|
+
show_protected_facets: false,
|
|
93
|
+
},
|
|
94
|
+
sort_by: 'relevance',
|
|
95
|
+
sort_order: 'descending',
|
|
96
|
+
section: 'Products',
|
|
97
|
+
features: {
|
|
98
|
+
query_items: true,
|
|
99
|
+
a_a_test: false,
|
|
100
|
+
auto_generated_refined_query_rules: true,
|
|
101
|
+
manual_searchandizing: true,
|
|
102
|
+
personalization: true,
|
|
103
|
+
filter_items: true,
|
|
104
|
+
use_reranker_service_for_search: false,
|
|
105
|
+
use_reranker_service_for_browse: false,
|
|
106
|
+
use_reranker_service_for_all: false,
|
|
107
|
+
custom_autosuggest_ui: false,
|
|
108
|
+
},
|
|
109
|
+
feature_variants: {
|
|
110
|
+
query_items: 'query_items_ctr_and_l2r',
|
|
111
|
+
a_a_test: null,
|
|
112
|
+
auto_generated_refined_query_rules: 'default_rules',
|
|
113
|
+
manual_searchandizing: null,
|
|
114
|
+
personalization: 'default_personalization',
|
|
115
|
+
filter_items: 'filter_items_w_acts_and_purchases',
|
|
116
|
+
use_reranker_service_for_search: null,
|
|
117
|
+
use_reranker_service_for_browse: null,
|
|
118
|
+
use_reranker_service_for_all: null,
|
|
119
|
+
custom_autosuggest_ui: null,
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
response: {
|
|
123
|
+
result_sources: { token_match: { count: 1 }, embeddings_match: { count: 0 } },
|
|
124
|
+
facets: [
|
|
125
|
+
{
|
|
126
|
+
display_name: 'Color',
|
|
127
|
+
name: 'Color',
|
|
128
|
+
type: 'multiple',
|
|
129
|
+
options: [
|
|
130
|
+
{
|
|
131
|
+
status: '',
|
|
132
|
+
count: 1,
|
|
133
|
+
display_name: 'red',
|
|
134
|
+
value: 'red',
|
|
135
|
+
data: {},
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
hidden: false,
|
|
139
|
+
data: {},
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
groups: [
|
|
143
|
+
{
|
|
144
|
+
group_id: 'All',
|
|
145
|
+
display_name: 'All',
|
|
146
|
+
count: 1,
|
|
147
|
+
data: {},
|
|
148
|
+
children: [
|
|
149
|
+
{
|
|
150
|
+
group_id: 'Brands',
|
|
151
|
+
display_name: 'Brands',
|
|
152
|
+
count: 1,
|
|
153
|
+
data: {},
|
|
154
|
+
children: [],
|
|
155
|
+
parents: [{ display_name: 'All', group_id: 'All' }],
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
parents: [],
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
results: [
|
|
162
|
+
{
|
|
163
|
+
matched_terms: [],
|
|
164
|
+
data: {
|
|
165
|
+
id: '10005',
|
|
166
|
+
url: 'https://test.com/p/10005',
|
|
167
|
+
facets: [
|
|
168
|
+
{ name: 'Brand', values: ['XYZ'] },
|
|
169
|
+
{ name: 'Color', values: ['red'] },
|
|
170
|
+
],
|
|
171
|
+
deactivated: false,
|
|
172
|
+
groups: [
|
|
173
|
+
{
|
|
174
|
+
group_id: 'BrandXY',
|
|
175
|
+
display_name: 'BrandXY',
|
|
176
|
+
path: '/All/Brands/BrandX',
|
|
177
|
+
path_list: [
|
|
178
|
+
{ id: 'All', display_name: 'All' },
|
|
179
|
+
{ id: 'Brands', display_name: 'Brands' },
|
|
180
|
+
{ id: 'BrandX', display_name: 'BrandX' },
|
|
181
|
+
],
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
value: 'Item5',
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
sort_options: [
|
|
189
|
+
{
|
|
190
|
+
sort_by: 'Collection',
|
|
191
|
+
display_name: 'ASC',
|
|
192
|
+
sort_order: 'ascending',
|
|
193
|
+
status: '',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
sort_by: 'relevance',
|
|
197
|
+
display_name: 'DESC',
|
|
198
|
+
sort_order: 'descending',
|
|
199
|
+
status: 'selected',
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
|
+
refined_content: [],
|
|
203
|
+
total_num_results: 1,
|
|
204
|
+
features: [
|
|
205
|
+
{
|
|
206
|
+
feature_name: 'a_a_test',
|
|
207
|
+
display_name: 'a_a_test',
|
|
208
|
+
enabled: false,
|
|
209
|
+
variant: null,
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
feature_name: 'auto_generated_refined_query_rules',
|
|
213
|
+
display_name: 'Affinity Engine',
|
|
214
|
+
enabled: true,
|
|
215
|
+
variant: { name: 'default_rules', display_name: 'Default weights' },
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
feature_name: 'custom_autosuggest_ui',
|
|
219
|
+
display_name: 'custom_autosuggest_ui',
|
|
220
|
+
enabled: false,
|
|
221
|
+
variant: null,
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
feature_name: 'filter_items',
|
|
225
|
+
display_name: 'Filter-item boosts',
|
|
226
|
+
enabled: true,
|
|
227
|
+
variant: { name: 'filter_items_w_atcs_and_purchases', display_name: '' },
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
feature_name: 'manual_searchandizing',
|
|
231
|
+
display_name: 'Searchandizing',
|
|
232
|
+
enabled: true,
|
|
233
|
+
variant: null,
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
feature_name: 'personalization',
|
|
237
|
+
display_name: 'Personalization',
|
|
238
|
+
enabled: true,
|
|
239
|
+
variant: {
|
|
240
|
+
name: 'default_personalization',
|
|
241
|
+
display_name: 'Default Personalization',
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
feature_name: 'query_items',
|
|
246
|
+
display_name: 'Learn To Rank',
|
|
247
|
+
enabled: true,
|
|
248
|
+
variant: { name: 'query_items_ctr_and_l2r', display_name: 'CTR & LTR' },
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
feature_name: 'use_rerender_service_for_all',
|
|
252
|
+
display_name: 'Use rerender service to rerun search and browse results',
|
|
253
|
+
enabled: false,
|
|
254
|
+
variant: null,
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
feature_name: 'use_rerender_service_for_browse',
|
|
258
|
+
display_name: 'use_rerender_service_for_browse',
|
|
259
|
+
enabled: false,
|
|
260
|
+
variant: null,
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
feature_name: 'use_rerender_service_for_search',
|
|
264
|
+
display_name: 'Use rerender service to reran search results',
|
|
265
|
+
enabled: false,
|
|
266
|
+
variant: null,
|
|
267
|
+
},
|
|
268
|
+
],
|
|
80
269
|
},
|
|
81
|
-
|
|
270
|
+
result_id: '4aeb42f7-d104-44bf-8f60-e674a633bf28',
|
|
271
|
+
quiz_id: 'test-quiz',
|
|
272
|
+
quiz_version_id: '6bfcb6d3-7272-466b-acd9-4bcf322f2f1e',
|
|
273
|
+
quiz_session_id: '163fefe3-2968-4c5d-8605-d128747188d6',
|
|
82
274
|
});
|