@constructor-io/constructorio-client-javascript 2.35.13 → 2.35.15
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/lib/modules/tracker.js
CHANGED
|
@@ -1094,7 +1094,7 @@ var Tracker = /*#__PURE__*/function () {
|
|
|
1094
1094
|
bodyParams.variation_id = variationId;
|
|
1095
1095
|
}
|
|
1096
1096
|
|
|
1097
|
-
if (revenue) {
|
|
1097
|
+
if (revenue || revenue === 0) {
|
|
1098
1098
|
bodyParams.revenue = revenue.toString();
|
|
1099
1099
|
}
|
|
1100
1100
|
|
|
@@ -1190,7 +1190,7 @@ var Tracker = /*#__PURE__*/function () {
|
|
|
1190
1190
|
});
|
|
1191
1191
|
}
|
|
1192
1192
|
|
|
1193
|
-
if (revenue) {
|
|
1193
|
+
if (revenue || revenue === 0) {
|
|
1194
1194
|
bodyParams.revenue = revenue;
|
|
1195
1195
|
}
|
|
1196
1196
|
|
package/lib/types/index.d.ts
CHANGED
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'
|
|
120
|
+
type: 'open';
|
|
117
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> {
|
package/lib/types/tracker.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import EventEmitter = require('events');
|
|
2
|
-
import { ConstructorClientOptions, NetworkParameters } from '.';
|
|
2
|
+
import { ConstructorClientOptions, ItemTracked, NetworkParameters } from '.';
|
|
3
3
|
import RequestQueue = require('../utils/request-queue');
|
|
4
4
|
|
|
5
5
|
export default Tracker;
|
|
@@ -88,7 +88,7 @@ declare class Tracker {
|
|
|
88
88
|
|
|
89
89
|
trackPurchase(
|
|
90
90
|
parameters: {
|
|
91
|
-
items:
|
|
91
|
+
items: ItemTracked & {quantity: number}[];
|
|
92
92
|
revenue: number;
|
|
93
93
|
orderId?: string;
|
|
94
94
|
section?: string;
|
|
@@ -101,7 +101,7 @@ declare class Tracker {
|
|
|
101
101
|
url: string;
|
|
102
102
|
podId: string;
|
|
103
103
|
numResultsViewed: number;
|
|
104
|
-
items?:
|
|
104
|
+
items?: ItemTracked[];
|
|
105
105
|
resultCount?: number;
|
|
106
106
|
resultPage?: number;
|
|
107
107
|
resultId?: string;
|
|
@@ -139,7 +139,7 @@ declare class Tracker {
|
|
|
139
139
|
selectedFilters?: object;
|
|
140
140
|
sortOrder?: string;
|
|
141
141
|
sortBy?: string;
|
|
142
|
-
items?:
|
|
142
|
+
items?: ItemTracked[];
|
|
143
143
|
},
|
|
144
144
|
networkParameters?: NetworkParameters
|
|
145
145
|
): true | Error;
|
package/package.json
CHANGED