Skip to content
This repository was archived by the owner on Jun 25, 2025. It is now read-only.

Commit 54243f4

Browse files
authored
Merge pull request #56 from apisearch-io/feature/build-dist
Build dist
2 parents 13a2fa0 + 8efc290 commit 54243f4

File tree

7 files changed

+81
-6
lines changed

7 files changed

+81
-6
lines changed

dist/apisearch.js

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/apisearch.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/apisearch.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/apisearch.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/Repository/HttpRepository.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,15 @@ export declare class HttpRepository extends Repository {
128128
* @return {Promise<void>}
129129
*/
130130
configureIndex(indexUUID: IndexUUID, config: Config): Promise<void>;
131+
/**
132+
* Click
133+
*
134+
* @param {Item} item
135+
* @param {string} user_id
136+
*
137+
* @return {Promise<void>}
138+
*/
139+
click(item: Item, user_id?: string): Promise<void>;
131140
/**
132141
* Get query values
133142
*

lib/Repository/HttpRepository.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,39 @@ var HttpRepository = /** @class */ (function (_super) {
359359
});
360360
});
361361
};
362+
/**
363+
* Click
364+
*
365+
* @param {Item} item
366+
* @param {string} user_id
367+
*
368+
* @return {Promise<void>}
369+
*/
370+
HttpRepository.prototype.click = function (item, user_id) {
371+
return tslib_1.__awaiter(this, void 0, void 0, function () {
372+
var parameters, response_11;
373+
return tslib_1.__generator(this, function (_a) {
374+
switch (_a.label) {
375+
case 0:
376+
parameters = {};
377+
if (typeof user_id != "undefined") {
378+
parameters.user_id = user_id;
379+
}
380+
_a.label = 1;
381+
case 1:
382+
_a.trys.push([1, 3, , 4]);
383+
return [4 /*yield*/, this.httpClient.get("/" + item.getAppUUID().composedUUID() + "/indices/" + item.getIndexUUID().composedUUID() + "/items/" + item.getUUID().composedUUID() + '/click', "post", this.getCredentials(), parameters, {})];
384+
case 2:
385+
_a.sent();
386+
return [3 /*break*/, 4];
387+
case 3:
388+
response_11 = _a.sent();
389+
throw this.createErrorFromResponse(response_11);
390+
case 4: return [2 /*return*/];
391+
}
392+
});
393+
});
394+
};
362395
/**
363396
* Get query values
364397
*

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "apisearch",
3-
"version": "0.2.25",
3+
"version": "0.2.26",
44
"description": "Javascript client for Apisearch.",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",

0 commit comments

Comments
 (0)