@searchspring/snap-client 0.27.7 → 0.27.8
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/cjs/Client/Client.d.ts +1 -2
- package/dist/cjs/Client/Client.d.ts.map +1 -1
- package/dist/cjs/Client/apis/Hybrid.d.ts.map +1 -1
- package/dist/cjs/Client/apis/Recommend.d.ts +2 -73
- package/dist/cjs/Client/apis/Recommend.d.ts.map +1 -1
- package/dist/cjs/Client/apis/Recommend.js +69 -42
- package/dist/cjs/Client/apis/Suggest.d.ts +1 -37
- package/dist/cjs/Client/apis/Suggest.d.ts.map +1 -1
- package/dist/cjs/Client/transforms/suggestResponse.d.ts +1 -1
- package/dist/cjs/Client/transforms/suggestResponse.d.ts.map +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/types.d.ts +97 -0
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/esm/Client/Client.d.ts +1 -2
- package/dist/esm/Client/Client.d.ts.map +1 -1
- package/dist/esm/Client/Client.js +1 -1
- package/dist/esm/Client/apis/Hybrid.d.ts.map +1 -1
- package/dist/esm/Client/apis/Recommend.d.ts +2 -73
- package/dist/esm/Client/apis/Recommend.d.ts.map +1 -1
- package/dist/esm/Client/apis/Recommend.js +68 -38
- package/dist/esm/Client/apis/Suggest.d.ts +1 -37
- package/dist/esm/Client/apis/Suggest.d.ts.map +1 -1
- package/dist/esm/Client/transforms/suggestResponse.d.ts +1 -1
- package/dist/esm/Client/transforms/suggestResponse.d.ts.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/types.d.ts +97 -0
- package/dist/esm/types.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { TrendingRequestModel, TrendingResponseModel, RecommendCombinedRequestModel, RecommendCombinedResponseModel } from '
|
|
2
|
-
import type { ClientGlobals, ClientConfig } from '../types';
|
|
1
|
+
import type { ClientGlobals, ClientConfig, TrendingRequestModel, TrendingResponseModel, RecommendCombinedRequestModel, RecommendCombinedResponseModel } from '../types';
|
|
3
2
|
import type { MetaRequestModel, MetaResponseModel, SearchRequestModel, SearchResponseModel, AutocompleteRequestModel, AutocompleteResponseModel } from '@searchspring/snapi-types';
|
|
4
3
|
export declare class Client {
|
|
5
4
|
private globals;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../../src/Client/Client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../../src/Client/Client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACX,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EAGrB,6BAA6B,EAC7B,8BAA8B,EAC9B,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EACX,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,MAAM,2BAA2B,CAAC;AAqCnC,qBAAa,MAAM;IAClB,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,UAAU,CAOhB;gBAEU,OAAO,EAAE,aAAa,EAAE,MAAM,GAAE,YAAiB;IAgDvD,IAAI,CAAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAO3D,YAAY,CAAC,MAAM,GAAE,wBAA6B,GAAG,OAAO,CAAC,CAAC,iBAAiB,EAAE,yBAAyB,CAAC,CAAC;IAU5G,MAAM,CAAC,MAAM,GAAE,kBAAuB,GAAG,OAAO,CAAC,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;IAM1F,MAAM,CAAC,MAAM,GAAE,kBAAuB,GAAG,OAAO,CAAC,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;IAM1F,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAM/E,SAAS,CAAC,MAAM,EAAE,6BAA6B,GAAG,OAAO,CAAC,8BAA8B,CAAC;CAgC/F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hybrid.d.ts","sourceRoot":"","sources":["../../../../src/Client/apis/Hybrid.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"Hybrid.d.ts","sourceRoot":"","sources":["../../../../src/Client/apis/Hybrid.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,GAAG,EAAyB,gBAAgB,EAAE,MAAM,GAAG,CAAC;AAIjE,qBAAa,SAAU,SAAQ,GAAG;IACjC,OAAO,CAAC,UAAU,CAGhB;gBAEU,aAAa,EAAE,gBAAgB;IASrC,OAAO,CAAC,iBAAiB,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAKxE,SAAS,CAAC,iBAAiB,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAQ9E,SAAS,CAAC,iBAAiB,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAQ9E,eAAe,CAAC,iBAAiB,EAAE,wBAAwB,GAAG,OAAO,CAAC,yBAAyB,CAAC;CAoCtG"}
|
|
@@ -1,82 +1,11 @@
|
|
|
1
1
|
import { API, ApiConfiguration } from './Abstract';
|
|
2
|
-
import {
|
|
3
|
-
export declare type RecommendRequestModel = {
|
|
4
|
-
tags: string[];
|
|
5
|
-
siteId: string;
|
|
6
|
-
product?: string;
|
|
7
|
-
shopper?: string;
|
|
8
|
-
categories?: string[];
|
|
9
|
-
cart?: string[];
|
|
10
|
-
lastViewed?: string[];
|
|
11
|
-
test?: boolean;
|
|
12
|
-
batched?: boolean;
|
|
13
|
-
limits?: number | number[];
|
|
14
|
-
};
|
|
15
|
-
export declare type RecommendResponseModel = {
|
|
16
|
-
profile: {
|
|
17
|
-
tag: string;
|
|
18
|
-
};
|
|
19
|
-
results: SearchResponseModelResult[];
|
|
20
|
-
}[];
|
|
21
|
-
export declare type ProfileRequestModel = {
|
|
22
|
-
siteId: string;
|
|
23
|
-
tag: string;
|
|
24
|
-
branch?: string;
|
|
25
|
-
};
|
|
26
|
-
export declare type ProfileResponseModel = {
|
|
27
|
-
profile: {
|
|
28
|
-
tag: string;
|
|
29
|
-
placement: string;
|
|
30
|
-
display: {
|
|
31
|
-
threshold: number;
|
|
32
|
-
template: {
|
|
33
|
-
name: string;
|
|
34
|
-
uuid: string;
|
|
35
|
-
markup?: string;
|
|
36
|
-
styles?: string;
|
|
37
|
-
component?: string;
|
|
38
|
-
branch?: string;
|
|
39
|
-
group?: string;
|
|
40
|
-
};
|
|
41
|
-
templateParameters: {
|
|
42
|
-
[any: string]: unknown;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
export declare type RecommendCombinedRequestModel = {
|
|
48
|
-
tag: string;
|
|
49
|
-
siteId: string;
|
|
50
|
-
product?: string;
|
|
51
|
-
shopper?: string;
|
|
52
|
-
categories?: string[];
|
|
53
|
-
cart?: string[];
|
|
54
|
-
lastViewed?: string[];
|
|
55
|
-
test?: boolean;
|
|
56
|
-
branch?: string;
|
|
57
|
-
};
|
|
58
|
-
declare class Deferred {
|
|
59
|
-
promise: Promise<any>;
|
|
60
|
-
resolve: any;
|
|
61
|
-
reject: any;
|
|
62
|
-
constructor();
|
|
63
|
-
}
|
|
64
|
-
export declare type RecommendCombinedResponseModel = ProfileResponseModel & {
|
|
65
|
-
results: SearchResponseModelResult[];
|
|
66
|
-
};
|
|
2
|
+
import { ProfileRequestModel, ProfileResponseModel, RecommendRequestModel, RecommendResponseModel } from '../../types';
|
|
67
3
|
export declare class RecommendAPI extends API {
|
|
68
|
-
batches
|
|
69
|
-
[key: string]: {
|
|
70
|
-
timeout: number;
|
|
71
|
-
request: any;
|
|
72
|
-
deferreds?: Deferred[];
|
|
73
|
-
};
|
|
74
|
-
};
|
|
4
|
+
private batches;
|
|
75
5
|
constructor(config: ApiConfiguration);
|
|
76
6
|
getProfile(queryParameters: ProfileRequestModel): Promise<ProfileResponseModel>;
|
|
77
7
|
batchRecommendations(parameters: RecommendRequestModel): Promise<RecommendResponseModel>;
|
|
78
8
|
getRecommendations(queryParameters: RecommendRequestModel): Promise<RecommendResponseModel>;
|
|
79
9
|
postRecommendations(requestParameters: RecommendRequestModel): Promise<RecommendResponseModel>;
|
|
80
10
|
}
|
|
81
|
-
export {};
|
|
82
11
|
//# sourceMappingURL=Recommend.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Recommend.d.ts","sourceRoot":"","sources":["../../../../src/Client/apis/Recommend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAe,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Recommend.d.ts","sourceRoot":"","sources":["../../../../src/Client/apis/Recommend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAe,MAAM,YAAY,CAAC;AAIhE,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAgBvH,qBAAa,YAAa,SAAQ,GAAG;IACpC,OAAO,CAAC,OAAO,CAOb;gBAEU,MAAM,EAAE,gBAAgB;IAK9B,UAAU,CAAC,eAAe,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAgB/E,oBAAoB,CAAC,UAAU,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAgFxF,kBAAkB,CAAC,eAAe,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAmB3F,mBAAmB,CAAC,iBAAiB,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAmBpG"}
|
|
@@ -118,76 +118,84 @@ var RecommendAPI = /** @class */ (function (_super) {
|
|
|
118
118
|
RecommendAPI.prototype.batchRecommendations = function (parameters) {
|
|
119
119
|
var _a;
|
|
120
120
|
return __awaiter(this, void 0, void 0, function () {
|
|
121
|
-
var tags, limits, categories, otherParams,
|
|
121
|
+
var tags, limits, categories, otherParams, getKey, key, batch, deferred;
|
|
122
122
|
var _this = this;
|
|
123
123
|
return __generator(this, function (_b) {
|
|
124
124
|
tags = parameters.tags, limits = parameters.limits, categories = parameters.categories, otherParams = __rest(parameters, ["tags", "limits", "categories"]);
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
key = otherParams.siteId;
|
|
125
|
+
getKey = function (parameters) {
|
|
126
|
+
var key = (0, hashParams_1.hashParams)(parameters);
|
|
127
|
+
if ('batched' in parameters) {
|
|
128
|
+
if (parameters.batched) {
|
|
129
|
+
key = parameters.siteId;
|
|
130
|
+
}
|
|
132
131
|
}
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
return key;
|
|
133
|
+
};
|
|
134
|
+
key = getKey(otherParams);
|
|
135
|
+
batch = (this.batches[key] = this.batches[key] || { timeout: null, request: { tags: [], limits: [] }, requests: [], deferreds: [] });
|
|
137
136
|
deferred = new Deferred();
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
paramBatch.request.limits = paramBatch.request.limits.concat(limits);
|
|
148
|
-
paramBatch.request = __assign(__assign({}, paramBatch.request), otherParams);
|
|
149
|
-
(_a = paramBatch.deferreds) === null || _a === void 0 ? void 0 : _a.push(deferred);
|
|
150
|
-
window.clearTimeout(paramBatch.timeout);
|
|
151
|
-
paramBatch.timeout = window.setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
152
|
-
var requestMethod, response_1, err_1;
|
|
137
|
+
// add each request to the list
|
|
138
|
+
batch.requests.push(__assign({}, parameters));
|
|
139
|
+
(_a = batch.deferreds) === null || _a === void 0 ? void 0 : _a.push(deferred);
|
|
140
|
+
// wait for all of the requests to come in
|
|
141
|
+
window.clearTimeout(batch.timeout);
|
|
142
|
+
batch.timeout = window.setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
143
|
+
var batchedRequests, response_1, err_1;
|
|
153
144
|
var _a, _b;
|
|
154
145
|
return __generator(this, function (_c) {
|
|
155
146
|
switch (_c.label) {
|
|
156
147
|
case 0:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
148
|
+
// delete the batch so a new one can take its place
|
|
149
|
+
delete this.batches[key];
|
|
150
|
+
batchedRequests = batch.requests.sort(sortRequests);
|
|
151
|
+
// now that the requests are in proper order, map through them
|
|
152
|
+
// and build out the batches
|
|
153
|
+
batchedRequests.map(function (request) {
|
|
154
|
+
var tags = request.tags, limits = request.limits, categories = request.categories, otherParams = __rest(request, ["tags", "limits", "categories"]);
|
|
155
|
+
if (!limits)
|
|
156
|
+
limits = 20;
|
|
157
|
+
var tag = (tags || [])[0];
|
|
158
|
+
delete otherParams.batched; // remove from request parameters
|
|
159
|
+
delete otherParams.order; // remove from request parameters
|
|
160
|
+
batch.request.tags.push(tag);
|
|
161
|
+
if (categories) {
|
|
162
|
+
if (!batch.request.categories) {
|
|
163
|
+
batch.request.categories = categories;
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
batch.request.categories = batch.request.categories.concat(categories);
|
|
167
|
+
}
|
|
163
168
|
}
|
|
164
|
-
|
|
169
|
+
batch.request.limits = batch.request.limits.concat(limits);
|
|
170
|
+
batch.request = __assign(__assign({}, batch.request), otherParams);
|
|
171
|
+
});
|
|
165
172
|
_c.label = 1;
|
|
166
173
|
case 1:
|
|
167
174
|
_c.trys.push([1, 6, , 7]);
|
|
168
|
-
if (!((0, snap_toolbox_1.charsParams)(
|
|
169
|
-
|
|
175
|
+
if (!((0, snap_toolbox_1.charsParams)(batch.request) > 1024)) return [3 /*break*/, 3];
|
|
176
|
+
if (batch.request['product']) {
|
|
177
|
+
batch.request['product'] = batch.request['product'].toString();
|
|
178
|
+
}
|
|
179
|
+
return [4 /*yield*/, this.postRecommendations(batch.request)];
|
|
170
180
|
case 2:
|
|
171
181
|
response_1 = _c.sent();
|
|
172
182
|
return [3 /*break*/, 5];
|
|
173
|
-
case 3: return [4 /*yield*/, this.getRecommendations(
|
|
183
|
+
case 3: return [4 /*yield*/, this.getRecommendations(batch.request)];
|
|
174
184
|
case 4:
|
|
175
185
|
response_1 = _c.sent();
|
|
176
186
|
_c.label = 5;
|
|
177
187
|
case 5:
|
|
178
|
-
(_a =
|
|
188
|
+
(_a = batch.deferreds) === null || _a === void 0 ? void 0 : _a.forEach(function (def, index) {
|
|
179
189
|
def.resolve([response_1[index]]);
|
|
180
190
|
});
|
|
181
191
|
return [3 /*break*/, 7];
|
|
182
192
|
case 6:
|
|
183
193
|
err_1 = _c.sent();
|
|
184
|
-
(_b =
|
|
194
|
+
(_b = batch.deferreds) === null || _b === void 0 ? void 0 : _b.forEach(function (def) {
|
|
185
195
|
def.reject(err_1);
|
|
186
196
|
});
|
|
187
197
|
return [3 /*break*/, 7];
|
|
188
|
-
case 7:
|
|
189
|
-
delete this.batches[key];
|
|
190
|
-
return [2 /*return*/];
|
|
198
|
+
case 7: return [2 /*return*/];
|
|
191
199
|
}
|
|
192
200
|
});
|
|
193
201
|
}); }, BATCH_TIMEOUT);
|
|
@@ -243,3 +251,22 @@ var RecommendAPI = /** @class */ (function (_super) {
|
|
|
243
251
|
return RecommendAPI;
|
|
244
252
|
}(Abstract_1.API));
|
|
245
253
|
exports.RecommendAPI = RecommendAPI;
|
|
254
|
+
function sortRequests(a, b) {
|
|
255
|
+
// undefined order goes last
|
|
256
|
+
if (a.order == undefined && b.order == undefined) {
|
|
257
|
+
return 0;
|
|
258
|
+
}
|
|
259
|
+
if (a.order == undefined && b.order != undefined) {
|
|
260
|
+
return 1;
|
|
261
|
+
}
|
|
262
|
+
if (b.order == undefined && a.order != undefined) {
|
|
263
|
+
return -1;
|
|
264
|
+
}
|
|
265
|
+
if (a.order < b.order) {
|
|
266
|
+
return -1;
|
|
267
|
+
}
|
|
268
|
+
if (a.order > b.order) {
|
|
269
|
+
return 1;
|
|
270
|
+
}
|
|
271
|
+
return 0;
|
|
272
|
+
}
|
|
@@ -1,41 +1,5 @@
|
|
|
1
1
|
import { API } from './Abstract';
|
|
2
|
-
|
|
3
|
-
siteId: string;
|
|
4
|
-
query: string;
|
|
5
|
-
language?: string;
|
|
6
|
-
suggestionCount?: number;
|
|
7
|
-
productCount?: number;
|
|
8
|
-
disableSpellCorrect?: boolean;
|
|
9
|
-
};
|
|
10
|
-
export declare type SuggestResponseModelSuggestion = {
|
|
11
|
-
text: string;
|
|
12
|
-
type?: string;
|
|
13
|
-
source?: string;
|
|
14
|
-
popularity?: number;
|
|
15
|
-
completed?: {
|
|
16
|
-
token: string;
|
|
17
|
-
query: string;
|
|
18
|
-
type: string;
|
|
19
|
-
}[];
|
|
20
|
-
};
|
|
21
|
-
export declare type SuggestResponseModel = {
|
|
22
|
-
query: string;
|
|
23
|
-
'corrected-query'?: string;
|
|
24
|
-
suggested?: SuggestResponseModelSuggestion;
|
|
25
|
-
alternatives?: SuggestResponseModelSuggestion[];
|
|
26
|
-
};
|
|
27
|
-
export declare type TrendingRequestModel = {
|
|
28
|
-
siteId: string;
|
|
29
|
-
limit?: number;
|
|
30
|
-
};
|
|
31
|
-
export declare type TrendingResponseModel = {
|
|
32
|
-
trending: {
|
|
33
|
-
queries: {
|
|
34
|
-
popularity: number;
|
|
35
|
-
searchQuery: string;
|
|
36
|
-
}[];
|
|
37
|
-
};
|
|
38
|
-
};
|
|
2
|
+
import { SuggestRequestModel, SuggestResponseModel, TrendingRequestModel, TrendingResponseModel } from '../../types';
|
|
39
3
|
export declare class SuggestAPI extends API {
|
|
40
4
|
getSuggest(queryParameters: SuggestRequestModel): Promise<SuggestResponseModel>;
|
|
41
5
|
postSuggest(requestParameters: SuggestRequestModel): Promise<SuggestResponseModel>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Suggest.d.ts","sourceRoot":"","sources":["../../../../src/Client/apis/Suggest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAe,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Suggest.d.ts","sourceRoot":"","sources":["../../../../src/Client/apis/Suggest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAe,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAkC,oBAAoB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAErJ,qBAAa,UAAW,SAAQ,GAAG;IAC5B,UAAU,CAAC,eAAe,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAgB/E,WAAW,CAAC,iBAAiB,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAiBlF,WAAW,CAAC,eAAe,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAgBlF,YAAY,CAAC,iBAAiB,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAgB3F"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SuggestResponseModel } from '
|
|
1
|
+
import { SuggestResponseModel } from '../../types';
|
|
2
2
|
export declare function transformSuggestResponse(response: SuggestResponseModel): any;
|
|
3
3
|
export declare namespace transformSuggestResponse {
|
|
4
4
|
var query: (response: SuggestResponseModel) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestResponse.d.ts","sourceRoot":"","sources":["../../../../src/Client/transforms/suggestResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"suggestResponse.d.ts","sourceRoot":"","sources":["../../../../src/Client/transforms/suggestResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,GAAG,CAO5E;yBAPe,wBAAwB"}
|
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SearchResponseModelResult } from '@searchspring/snapi-types';
|
|
1
2
|
export declare type ClientConfig = {
|
|
2
3
|
meta?: {
|
|
3
4
|
api?: SnapApiConfig;
|
|
@@ -49,4 +50,100 @@ export declare type ClientGlobals = {
|
|
|
49
50
|
siteId: string;
|
|
50
51
|
[configurationPath: string]: any;
|
|
51
52
|
};
|
|
53
|
+
export declare type SuggestRequestModel = {
|
|
54
|
+
siteId: string;
|
|
55
|
+
query: string;
|
|
56
|
+
language?: string;
|
|
57
|
+
suggestionCount?: number;
|
|
58
|
+
productCount?: number;
|
|
59
|
+
disableSpellCorrect?: boolean;
|
|
60
|
+
};
|
|
61
|
+
export declare type SuggestResponseModelSuggestion = {
|
|
62
|
+
text: string;
|
|
63
|
+
type?: string;
|
|
64
|
+
source?: string;
|
|
65
|
+
popularity?: number;
|
|
66
|
+
completed?: {
|
|
67
|
+
token: string;
|
|
68
|
+
query: string;
|
|
69
|
+
type: string;
|
|
70
|
+
}[];
|
|
71
|
+
};
|
|
72
|
+
export declare type SuggestResponseModel = {
|
|
73
|
+
query: string;
|
|
74
|
+
'corrected-query'?: string;
|
|
75
|
+
suggested?: SuggestResponseModelSuggestion;
|
|
76
|
+
alternatives?: SuggestResponseModelSuggestion[];
|
|
77
|
+
};
|
|
78
|
+
export declare type TrendingRequestModel = {
|
|
79
|
+
siteId: string;
|
|
80
|
+
limit?: number;
|
|
81
|
+
};
|
|
82
|
+
export declare type TrendingResponseModel = {
|
|
83
|
+
trending: {
|
|
84
|
+
queries: {
|
|
85
|
+
popularity: number;
|
|
86
|
+
searchQuery: string;
|
|
87
|
+
}[];
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
export declare type RecommendRequestModel = {
|
|
91
|
+
tags: string[];
|
|
92
|
+
siteId: string;
|
|
93
|
+
product?: string;
|
|
94
|
+
shopper?: string;
|
|
95
|
+
categories?: string[];
|
|
96
|
+
cart?: string[];
|
|
97
|
+
lastViewed?: string[];
|
|
98
|
+
test?: boolean;
|
|
99
|
+
batched?: boolean;
|
|
100
|
+
limits?: number | number[];
|
|
101
|
+
order?: number;
|
|
102
|
+
};
|
|
103
|
+
export declare type RecommendResponseModel = {
|
|
104
|
+
profile: {
|
|
105
|
+
tag: string;
|
|
106
|
+
};
|
|
107
|
+
results: SearchResponseModelResult[];
|
|
108
|
+
}[];
|
|
109
|
+
export declare type ProfileRequestModel = {
|
|
110
|
+
siteId: string;
|
|
111
|
+
tag: string;
|
|
112
|
+
branch?: string;
|
|
113
|
+
};
|
|
114
|
+
export declare type ProfileResponseModel = {
|
|
115
|
+
profile: {
|
|
116
|
+
tag: string;
|
|
117
|
+
placement: string;
|
|
118
|
+
display: {
|
|
119
|
+
threshold: number;
|
|
120
|
+
template: {
|
|
121
|
+
name: string;
|
|
122
|
+
uuid: string;
|
|
123
|
+
markup?: string;
|
|
124
|
+
styles?: string;
|
|
125
|
+
component?: string;
|
|
126
|
+
branch?: string;
|
|
127
|
+
group?: string;
|
|
128
|
+
};
|
|
129
|
+
templateParameters: {
|
|
130
|
+
[any: string]: unknown;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
export declare type RecommendCombinedRequestModel = {
|
|
136
|
+
tag: string;
|
|
137
|
+
siteId: string;
|
|
138
|
+
product?: string;
|
|
139
|
+
shopper?: string;
|
|
140
|
+
categories?: string[];
|
|
141
|
+
cart?: string[];
|
|
142
|
+
lastViewed?: string[];
|
|
143
|
+
test?: boolean;
|
|
144
|
+
branch?: string;
|
|
145
|
+
};
|
|
146
|
+
export declare type RecommendCombinedResponseModel = ProfileResponseModel & {
|
|
147
|
+
results: SearchResponseModelResult[];
|
|
148
|
+
};
|
|
52
149
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/cjs/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY,GAAG;IAC1B,IAAI,CAAC,EAAE;QACN,GAAG,CAAC,EAAE,aAAa,CAAC;QACpB,KAAK,CAAC,EAAE,WAAW,CAAC;KACpB,CAAC;IACF,MAAM,CAAC,EAAE;QACR,GAAG,CAAC,EAAE,aAAa,CAAC;QACpB,KAAK,CAAC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AAM,GAAG,OAAO,CAAC;aACvB,CAAC;SACF,CAAC;KACF,CAAC;CACF,CAAC;AAEF,oBAAY,6BAA6B,GAAG;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,8BAA8B,GAAG,oBAAoB,GAAG;IAAE,OAAO,EAAE,yBAAyB,EAAE,CAAA;CAAE,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { TrendingRequestModel, TrendingResponseModel, RecommendCombinedRequestModel, RecommendCombinedResponseModel } from '
|
|
2
|
-
import type { ClientGlobals, ClientConfig } from '../types';
|
|
1
|
+
import type { ClientGlobals, ClientConfig, TrendingRequestModel, TrendingResponseModel, RecommendCombinedRequestModel, RecommendCombinedResponseModel } from '../types';
|
|
3
2
|
import type { MetaRequestModel, MetaResponseModel, SearchRequestModel, SearchResponseModel, AutocompleteRequestModel, AutocompleteResponseModel } from '@searchspring/snapi-types';
|
|
4
3
|
export declare class Client {
|
|
5
4
|
private globals;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../../src/Client/Client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../../src/Client/Client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACX,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EAGrB,6BAA6B,EAC7B,8BAA8B,EAC9B,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EACX,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,MAAM,2BAA2B,CAAC;AAqCnC,qBAAa,MAAM;IAClB,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,UAAU,CAOhB;gBAEU,OAAO,EAAE,aAAa,EAAE,MAAM,GAAE,YAAiB;IAgDvD,IAAI,CAAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAO3D,YAAY,CAAC,MAAM,GAAE,wBAA6B,GAAG,OAAO,CAAC,CAAC,iBAAiB,EAAE,yBAAyB,CAAC,CAAC;IAU5G,MAAM,CAAC,MAAM,GAAE,kBAAuB,GAAG,OAAO,CAAC,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;IAM1F,MAAM,CAAC,MAAM,GAAE,kBAAuB,GAAG,OAAO,CAAC,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;IAM1F,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,oBAAoB,CAAC,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAM/E,SAAS,CAAC,MAAM,EAAE,6BAA6B,GAAG,OAAO,CAAC,8BAA8B,CAAC;CAgC/F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hybrid.d.ts","sourceRoot":"","sources":["../../../../src/Client/apis/Hybrid.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"Hybrid.d.ts","sourceRoot":"","sources":["../../../../src/Client/apis/Hybrid.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,wBAAwB,EACxB,yBAAyB,EACzB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,GAAG,EAAyB,gBAAgB,EAAE,MAAM,GAAG,CAAC;AAIjE,qBAAa,SAAU,SAAQ,GAAG;IACjC,OAAO,CAAC,UAAU,CAGhB;gBAEU,aAAa,EAAE,gBAAgB;IASrC,OAAO,CAAC,iBAAiB,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAKxE,SAAS,CAAC,iBAAiB,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAQ9E,SAAS,CAAC,iBAAiB,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAQ9E,eAAe,CAAC,iBAAiB,EAAE,wBAAwB,GAAG,OAAO,CAAC,yBAAyB,CAAC;CAoCtG"}
|
|
@@ -1,82 +1,11 @@
|
|
|
1
1
|
import { API, ApiConfiguration } from './Abstract';
|
|
2
|
-
import {
|
|
3
|
-
export declare type RecommendRequestModel = {
|
|
4
|
-
tags: string[];
|
|
5
|
-
siteId: string;
|
|
6
|
-
product?: string;
|
|
7
|
-
shopper?: string;
|
|
8
|
-
categories?: string[];
|
|
9
|
-
cart?: string[];
|
|
10
|
-
lastViewed?: string[];
|
|
11
|
-
test?: boolean;
|
|
12
|
-
batched?: boolean;
|
|
13
|
-
limits?: number | number[];
|
|
14
|
-
};
|
|
15
|
-
export declare type RecommendResponseModel = {
|
|
16
|
-
profile: {
|
|
17
|
-
tag: string;
|
|
18
|
-
};
|
|
19
|
-
results: SearchResponseModelResult[];
|
|
20
|
-
}[];
|
|
21
|
-
export declare type ProfileRequestModel = {
|
|
22
|
-
siteId: string;
|
|
23
|
-
tag: string;
|
|
24
|
-
branch?: string;
|
|
25
|
-
};
|
|
26
|
-
export declare type ProfileResponseModel = {
|
|
27
|
-
profile: {
|
|
28
|
-
tag: string;
|
|
29
|
-
placement: string;
|
|
30
|
-
display: {
|
|
31
|
-
threshold: number;
|
|
32
|
-
template: {
|
|
33
|
-
name: string;
|
|
34
|
-
uuid: string;
|
|
35
|
-
markup?: string;
|
|
36
|
-
styles?: string;
|
|
37
|
-
component?: string;
|
|
38
|
-
branch?: string;
|
|
39
|
-
group?: string;
|
|
40
|
-
};
|
|
41
|
-
templateParameters: {
|
|
42
|
-
[any: string]: unknown;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
export declare type RecommendCombinedRequestModel = {
|
|
48
|
-
tag: string;
|
|
49
|
-
siteId: string;
|
|
50
|
-
product?: string;
|
|
51
|
-
shopper?: string;
|
|
52
|
-
categories?: string[];
|
|
53
|
-
cart?: string[];
|
|
54
|
-
lastViewed?: string[];
|
|
55
|
-
test?: boolean;
|
|
56
|
-
branch?: string;
|
|
57
|
-
};
|
|
58
|
-
declare class Deferred {
|
|
59
|
-
promise: Promise<any>;
|
|
60
|
-
resolve: any;
|
|
61
|
-
reject: any;
|
|
62
|
-
constructor();
|
|
63
|
-
}
|
|
64
|
-
export declare type RecommendCombinedResponseModel = ProfileResponseModel & {
|
|
65
|
-
results: SearchResponseModelResult[];
|
|
66
|
-
};
|
|
2
|
+
import { ProfileRequestModel, ProfileResponseModel, RecommendRequestModel, RecommendResponseModel } from '../../types';
|
|
67
3
|
export declare class RecommendAPI extends API {
|
|
68
|
-
batches
|
|
69
|
-
[key: string]: {
|
|
70
|
-
timeout: number;
|
|
71
|
-
request: any;
|
|
72
|
-
deferreds?: Deferred[];
|
|
73
|
-
};
|
|
74
|
-
};
|
|
4
|
+
private batches;
|
|
75
5
|
constructor(config: ApiConfiguration);
|
|
76
6
|
getProfile(queryParameters: ProfileRequestModel): Promise<ProfileResponseModel>;
|
|
77
7
|
batchRecommendations(parameters: RecommendRequestModel): Promise<RecommendResponseModel>;
|
|
78
8
|
getRecommendations(queryParameters: RecommendRequestModel): Promise<RecommendResponseModel>;
|
|
79
9
|
postRecommendations(requestParameters: RecommendRequestModel): Promise<RecommendResponseModel>;
|
|
80
10
|
}
|
|
81
|
-
export {};
|
|
82
11
|
//# sourceMappingURL=Recommend.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Recommend.d.ts","sourceRoot":"","sources":["../../../../src/Client/apis/Recommend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAe,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Recommend.d.ts","sourceRoot":"","sources":["../../../../src/Client/apis/Recommend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAe,MAAM,YAAY,CAAC;AAIhE,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAgBvH,qBAAa,YAAa,SAAQ,GAAG;IACpC,OAAO,CAAC,OAAO,CAOb;gBAEU,MAAM,EAAE,gBAAgB;IAK9B,UAAU,CAAC,eAAe,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAgB/E,oBAAoB,CAAC,UAAU,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAgFxF,kBAAkB,CAAC,eAAe,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAmB3F,mBAAmB,CAAC,iBAAiB,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAmBpG"}
|
|
@@ -27,59 +27,70 @@ export class RecommendAPI extends API {
|
|
|
27
27
|
}
|
|
28
28
|
async batchRecommendations(parameters) {
|
|
29
29
|
let { tags, limits, categories, ...otherParams } = parameters;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
key = otherParams.siteId;
|
|
30
|
+
const getKey = (parameters) => {
|
|
31
|
+
let key = hashParams(parameters);
|
|
32
|
+
if ('batched' in parameters) {
|
|
33
|
+
if (parameters.batched) {
|
|
34
|
+
key = parameters.siteId;
|
|
35
|
+
}
|
|
37
36
|
}
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const
|
|
37
|
+
return key;
|
|
38
|
+
};
|
|
39
|
+
// set up batch keys and deferred promises
|
|
40
|
+
const key = getKey(otherParams);
|
|
41
|
+
const batch = (this.batches[key] = this.batches[key] || { timeout: null, request: { tags: [], limits: [] }, requests: [], deferreds: [] });
|
|
42
42
|
const deferred = new Deferred();
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
43
|
+
// add each request to the list
|
|
44
|
+
batch.requests.push({ ...parameters });
|
|
45
|
+
batch.deferreds?.push(deferred);
|
|
46
|
+
// wait for all of the requests to come in
|
|
47
|
+
window.clearTimeout(batch.timeout);
|
|
48
|
+
batch.timeout = window.setTimeout(async () => {
|
|
49
|
+
// delete the batch so a new one can take its place
|
|
50
|
+
delete this.batches[key];
|
|
51
|
+
// reorder the requests by order value in context.
|
|
52
|
+
const batchedRequests = batch.requests.sort(sortRequests);
|
|
53
|
+
// now that the requests are in proper order, map through them
|
|
54
|
+
// and build out the batches
|
|
55
|
+
batchedRequests.map((request) => {
|
|
56
|
+
let { tags, limits, categories, ...otherParams } = request;
|
|
57
|
+
if (!limits)
|
|
58
|
+
limits = 20;
|
|
59
|
+
const [tag] = tags || [];
|
|
60
|
+
delete otherParams.batched; // remove from request parameters
|
|
61
|
+
delete otherParams.order; // remove from request parameters
|
|
62
|
+
batch.request.tags.push(tag);
|
|
63
|
+
if (categories) {
|
|
64
|
+
if (!batch.request.categories) {
|
|
65
|
+
batch.request.categories = categories;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
batch.request.categories = batch.request.categories.concat(categories);
|
|
69
|
+
}
|
|
63
70
|
}
|
|
64
|
-
|
|
71
|
+
batch.request.limits = batch.request.limits.concat(limits);
|
|
72
|
+
batch.request = { ...batch.request, ...otherParams };
|
|
73
|
+
});
|
|
65
74
|
try {
|
|
66
75
|
let response;
|
|
67
|
-
if (charsParams(
|
|
68
|
-
|
|
76
|
+
if (charsParams(batch.request) > 1024) {
|
|
77
|
+
if (batch.request['product']) {
|
|
78
|
+
batch.request['product'] = batch.request['product'].toString();
|
|
79
|
+
}
|
|
80
|
+
response = await this.postRecommendations(batch.request);
|
|
69
81
|
}
|
|
70
82
|
else {
|
|
71
|
-
response = await this.getRecommendations(
|
|
83
|
+
response = await this.getRecommendations(batch.request);
|
|
72
84
|
}
|
|
73
|
-
|
|
85
|
+
batch.deferreds?.forEach((def, index) => {
|
|
74
86
|
def.resolve([response[index]]);
|
|
75
87
|
});
|
|
76
88
|
}
|
|
77
89
|
catch (err) {
|
|
78
|
-
|
|
90
|
+
batch.deferreds?.forEach((def) => {
|
|
79
91
|
def.reject(err);
|
|
80
92
|
});
|
|
81
93
|
}
|
|
82
|
-
delete this.batches[key];
|
|
83
94
|
}, BATCH_TIMEOUT);
|
|
84
95
|
return deferred.promise;
|
|
85
96
|
}
|
|
@@ -109,3 +120,22 @@ export class RecommendAPI extends API {
|
|
|
109
120
|
return response;
|
|
110
121
|
}
|
|
111
122
|
}
|
|
123
|
+
function sortRequests(a, b) {
|
|
124
|
+
// undefined order goes last
|
|
125
|
+
if (a.order == undefined && b.order == undefined) {
|
|
126
|
+
return 0;
|
|
127
|
+
}
|
|
128
|
+
if (a.order == undefined && b.order != undefined) {
|
|
129
|
+
return 1;
|
|
130
|
+
}
|
|
131
|
+
if (b.order == undefined && a.order != undefined) {
|
|
132
|
+
return -1;
|
|
133
|
+
}
|
|
134
|
+
if (a.order < b.order) {
|
|
135
|
+
return -1;
|
|
136
|
+
}
|
|
137
|
+
if (a.order > b.order) {
|
|
138
|
+
return 1;
|
|
139
|
+
}
|
|
140
|
+
return 0;
|
|
141
|
+
}
|
|
@@ -1,41 +1,5 @@
|
|
|
1
1
|
import { API } from './Abstract';
|
|
2
|
-
|
|
3
|
-
siteId: string;
|
|
4
|
-
query: string;
|
|
5
|
-
language?: string;
|
|
6
|
-
suggestionCount?: number;
|
|
7
|
-
productCount?: number;
|
|
8
|
-
disableSpellCorrect?: boolean;
|
|
9
|
-
};
|
|
10
|
-
export declare type SuggestResponseModelSuggestion = {
|
|
11
|
-
text: string;
|
|
12
|
-
type?: string;
|
|
13
|
-
source?: string;
|
|
14
|
-
popularity?: number;
|
|
15
|
-
completed?: {
|
|
16
|
-
token: string;
|
|
17
|
-
query: string;
|
|
18
|
-
type: string;
|
|
19
|
-
}[];
|
|
20
|
-
};
|
|
21
|
-
export declare type SuggestResponseModel = {
|
|
22
|
-
query: string;
|
|
23
|
-
'corrected-query'?: string;
|
|
24
|
-
suggested?: SuggestResponseModelSuggestion;
|
|
25
|
-
alternatives?: SuggestResponseModelSuggestion[];
|
|
26
|
-
};
|
|
27
|
-
export declare type TrendingRequestModel = {
|
|
28
|
-
siteId: string;
|
|
29
|
-
limit?: number;
|
|
30
|
-
};
|
|
31
|
-
export declare type TrendingResponseModel = {
|
|
32
|
-
trending: {
|
|
33
|
-
queries: {
|
|
34
|
-
popularity: number;
|
|
35
|
-
searchQuery: string;
|
|
36
|
-
}[];
|
|
37
|
-
};
|
|
38
|
-
};
|
|
2
|
+
import { SuggestRequestModel, SuggestResponseModel, TrendingRequestModel, TrendingResponseModel } from '../../types';
|
|
39
3
|
export declare class SuggestAPI extends API {
|
|
40
4
|
getSuggest(queryParameters: SuggestRequestModel): Promise<SuggestResponseModel>;
|
|
41
5
|
postSuggest(requestParameters: SuggestRequestModel): Promise<SuggestResponseModel>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Suggest.d.ts","sourceRoot":"","sources":["../../../../src/Client/apis/Suggest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAe,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Suggest.d.ts","sourceRoot":"","sources":["../../../../src/Client/apis/Suggest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAe,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAkC,oBAAoB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAErJ,qBAAa,UAAW,SAAQ,GAAG;IAC5B,UAAU,CAAC,eAAe,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAgB/E,WAAW,CAAC,iBAAiB,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAiBlF,WAAW,CAAC,eAAe,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAgBlF,YAAY,CAAC,iBAAiB,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAgB3F"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SuggestResponseModel } from '
|
|
1
|
+
import { SuggestResponseModel } from '../../types';
|
|
2
2
|
export declare function transformSuggestResponse(response: SuggestResponseModel): any;
|
|
3
3
|
export declare namespace transformSuggestResponse {
|
|
4
4
|
var query: (response: SuggestResponseModel) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestResponse.d.ts","sourceRoot":"","sources":["../../../../src/Client/transforms/suggestResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"suggestResponse.d.ts","sourceRoot":"","sources":["../../../../src/Client/transforms/suggestResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,GAAG,CAO5E;yBAPe,wBAAwB"}
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SearchResponseModelResult } from '@searchspring/snapi-types';
|
|
1
2
|
export declare type ClientConfig = {
|
|
2
3
|
meta?: {
|
|
3
4
|
api?: SnapApiConfig;
|
|
@@ -49,4 +50,100 @@ export declare type ClientGlobals = {
|
|
|
49
50
|
siteId: string;
|
|
50
51
|
[configurationPath: string]: any;
|
|
51
52
|
};
|
|
53
|
+
export declare type SuggestRequestModel = {
|
|
54
|
+
siteId: string;
|
|
55
|
+
query: string;
|
|
56
|
+
language?: string;
|
|
57
|
+
suggestionCount?: number;
|
|
58
|
+
productCount?: number;
|
|
59
|
+
disableSpellCorrect?: boolean;
|
|
60
|
+
};
|
|
61
|
+
export declare type SuggestResponseModelSuggestion = {
|
|
62
|
+
text: string;
|
|
63
|
+
type?: string;
|
|
64
|
+
source?: string;
|
|
65
|
+
popularity?: number;
|
|
66
|
+
completed?: {
|
|
67
|
+
token: string;
|
|
68
|
+
query: string;
|
|
69
|
+
type: string;
|
|
70
|
+
}[];
|
|
71
|
+
};
|
|
72
|
+
export declare type SuggestResponseModel = {
|
|
73
|
+
query: string;
|
|
74
|
+
'corrected-query'?: string;
|
|
75
|
+
suggested?: SuggestResponseModelSuggestion;
|
|
76
|
+
alternatives?: SuggestResponseModelSuggestion[];
|
|
77
|
+
};
|
|
78
|
+
export declare type TrendingRequestModel = {
|
|
79
|
+
siteId: string;
|
|
80
|
+
limit?: number;
|
|
81
|
+
};
|
|
82
|
+
export declare type TrendingResponseModel = {
|
|
83
|
+
trending: {
|
|
84
|
+
queries: {
|
|
85
|
+
popularity: number;
|
|
86
|
+
searchQuery: string;
|
|
87
|
+
}[];
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
export declare type RecommendRequestModel = {
|
|
91
|
+
tags: string[];
|
|
92
|
+
siteId: string;
|
|
93
|
+
product?: string;
|
|
94
|
+
shopper?: string;
|
|
95
|
+
categories?: string[];
|
|
96
|
+
cart?: string[];
|
|
97
|
+
lastViewed?: string[];
|
|
98
|
+
test?: boolean;
|
|
99
|
+
batched?: boolean;
|
|
100
|
+
limits?: number | number[];
|
|
101
|
+
order?: number;
|
|
102
|
+
};
|
|
103
|
+
export declare type RecommendResponseModel = {
|
|
104
|
+
profile: {
|
|
105
|
+
tag: string;
|
|
106
|
+
};
|
|
107
|
+
results: SearchResponseModelResult[];
|
|
108
|
+
}[];
|
|
109
|
+
export declare type ProfileRequestModel = {
|
|
110
|
+
siteId: string;
|
|
111
|
+
tag: string;
|
|
112
|
+
branch?: string;
|
|
113
|
+
};
|
|
114
|
+
export declare type ProfileResponseModel = {
|
|
115
|
+
profile: {
|
|
116
|
+
tag: string;
|
|
117
|
+
placement: string;
|
|
118
|
+
display: {
|
|
119
|
+
threshold: number;
|
|
120
|
+
template: {
|
|
121
|
+
name: string;
|
|
122
|
+
uuid: string;
|
|
123
|
+
markup?: string;
|
|
124
|
+
styles?: string;
|
|
125
|
+
component?: string;
|
|
126
|
+
branch?: string;
|
|
127
|
+
group?: string;
|
|
128
|
+
};
|
|
129
|
+
templateParameters: {
|
|
130
|
+
[any: string]: unknown;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
export declare type RecommendCombinedRequestModel = {
|
|
136
|
+
tag: string;
|
|
137
|
+
siteId: string;
|
|
138
|
+
product?: string;
|
|
139
|
+
shopper?: string;
|
|
140
|
+
categories?: string[];
|
|
141
|
+
cart?: string[];
|
|
142
|
+
lastViewed?: string[];
|
|
143
|
+
test?: boolean;
|
|
144
|
+
branch?: string;
|
|
145
|
+
};
|
|
146
|
+
export declare type RecommendCombinedResponseModel = ProfileResponseModel & {
|
|
147
|
+
results: SearchResponseModelResult[];
|
|
148
|
+
};
|
|
52
149
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/esm/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY,GAAG;IAC1B,IAAI,CAAC,EAAE;QACN,GAAG,CAAC,EAAE,aAAa,CAAC;QACpB,KAAK,CAAC,EAAE,WAAW,CAAC;KACpB,CAAC;IACF,MAAM,CAAC,EAAE;QACR,GAAG,CAAC,EAAE,aAAa,CAAC;QACpB,KAAK,CAAC,EAAE,WAAW,CAAC;KACpB,CAAC;IACF,YAAY,CAAC,EAAE;QACd,GAAG,CAAC,EAAE,aAAa,CAAC;QACpB,KAAK,CAAC,EAAE,WAAW,CAAC;KACpB,CAAC;IACF,MAAM,CAAC,EAAE;QACR,GAAG,CAAC,EAAE,aAAa,CAAC;QACpB,KAAK,CAAC,EAAE,WAAW,CAAC;KACpB,CAAC;IACF,SAAS,CAAC,EAAE;QACX,GAAG,CAAC,EAAE,aAAa,CAAC;QACpB,KAAK,CAAC,EAAE,WAAW,CAAC;KACpB,CAAC;IACF,OAAO,CAAC,EAAE;QACT,GAAG,CAAC,EAAE,aAAa,CAAC;QACpB,KAAK,CAAC,EAAE,WAAW,CAAC;KACpB,CAAC;CACF,CAAC;AAEF,oBAAY,WAAW,GAAG,OAAO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,yBAAyB,EAAE,CAAA;CAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@searchspring/snap-client",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.8",
|
|
4
4
|
"description": "Snap Client",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"test:watch": "jest --watch"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@searchspring/snap-toolbox": "^0.27.
|
|
24
|
-
"deepmerge": "
|
|
23
|
+
"@searchspring/snap-toolbox": "^0.27.8",
|
|
24
|
+
"deepmerge": "4.2.2"
|
|
25
25
|
},
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"files": [
|
|
28
28
|
"dist/**/*"
|
|
29
29
|
],
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "cfbe6d18899fb4944ec397e2419d8409d4ab0065"
|
|
31
31
|
}
|