@constructor-io/constructorio-node 4.9.2 → 4.10.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/package.json
CHANGED
|
@@ -112,7 +112,8 @@ function createAutocompleteUrl(query, parameters, userParameters, options) {
|
|
|
112
112
|
const queryString = qs.stringify(queryParams, { indices: false });
|
|
113
113
|
const cleanedQuery = query.replace(/^\//, '|'); // For compatibility with backend API
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
// Note: it is intentional that query is dispatched without being trimmed
|
|
116
|
+
return `${serviceUrl}/autocomplete/${helpers.encodeURIComponentRFC3986(cleanedQuery)}?${queryString}`;
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
/**
|
package/src/modules/search.js
CHANGED
|
@@ -145,7 +145,8 @@ function createSearchUrl(query, parameters, userParameters, options, isVoiceSear
|
|
|
145
145
|
|
|
146
146
|
const searchUrl = isVoiceSearch ? 'search/natural_language' : 'search';
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
// Note: it is intentional that query is dispatched without being trimmed
|
|
149
|
+
return `${serviceUrl}/${searchUrl}/${helpers.encodeURIComponentRFC3986(query)}?${queryString}`;
|
|
149
150
|
}
|
|
150
151
|
|
|
151
152
|
/**
|
package/src/types/quizzes.d.ts
CHANGED
|
@@ -51,7 +51,6 @@ declare class Quizzes {
|
|
|
51
51
|
/* quizzes results returned from server */
|
|
52
52
|
export interface NextQuestionResponse extends Record<string, any> {
|
|
53
53
|
next_question: Question;
|
|
54
|
-
is_last_question?: boolean;
|
|
55
54
|
quiz_version_id: string;
|
|
56
55
|
quiz_id: string;
|
|
57
56
|
quiz_session_id: string;
|
|
@@ -38,7 +38,6 @@ expectAssignable<NextQuestionResponse>(
|
|
|
38
38
|
quiz_version_id: '6bfaa6d5-7272-466b-acd9-4bcf322a2f1e',
|
|
39
39
|
quiz_id: 'test-quiz',
|
|
40
40
|
quiz_session_id: '132feaa5-9968-4c5d-8605-d128747188d6',
|
|
41
|
-
is_last_question: false,
|
|
42
41
|
},
|
|
43
42
|
);
|
|
44
43
|
|
|
@@ -60,7 +59,6 @@ expectAssignable<NextQuestionResponse>({
|
|
|
60
59
|
quiz_version_id: '6bfaa6d5-7272-466b-acd9-4bcf322a2f1e',
|
|
61
60
|
quiz_id: 'test-quiz',
|
|
62
61
|
quiz_session_id: '132feaa5-9968-4c5d-8605-d128747188d6',
|
|
63
|
-
is_last_question: false,
|
|
64
62
|
});
|
|
65
63
|
|
|
66
64
|
expectAssignable<QuizResultsResponse>({
|