bkper-js 1.28.0 → 1.29.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/lib/index.d.ts +4 -0
- package/lib/model/Book.js +2 -1
- package/lib/model/BotResponse.js +6 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1083,6 +1083,10 @@ export declare class BotResponse {
|
|
|
1083
1083
|
* @returns The date this Bot Response was created
|
|
1084
1084
|
*/
|
|
1085
1085
|
getCreatedAt(): Date | undefined;
|
|
1086
|
+
/**
|
|
1087
|
+
* @returns The Event this Bot Response is associated to
|
|
1088
|
+
*/
|
|
1089
|
+
getEvent(): Event;
|
|
1086
1090
|
/**
|
|
1087
1091
|
* Replay this Bot Response.
|
|
1088
1092
|
*
|
package/lib/model/Book.js
CHANGED
|
@@ -430,7 +430,8 @@ export class Book {
|
|
|
430
430
|
*/
|
|
431
431
|
batchReplayEvents(events, errorOnly) {
|
|
432
432
|
return __awaiter(this, void 0, void 0, function* () {
|
|
433
|
-
const
|
|
433
|
+
const eventIds = events.map(event => event.getId());
|
|
434
|
+
const eventPayloads = eventIds.map(id => ({ id: id }));
|
|
434
435
|
const eventList = { items: eventPayloads };
|
|
435
436
|
yield EventService.replayEventsBatch(this, eventList, errorOnly);
|
|
436
437
|
});
|
package/lib/model/BotResponse.js
CHANGED
|
@@ -43,6 +43,12 @@ export class BotResponse {
|
|
|
43
43
|
getCreatedAt() {
|
|
44
44
|
return this.payload.createdAt ? new Date(new Number(this.payload.createdAt).valueOf()) : undefined;
|
|
45
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* @returns The Event this Bot Response is associated to
|
|
48
|
+
*/
|
|
49
|
+
getEvent() {
|
|
50
|
+
return this.event;
|
|
51
|
+
}
|
|
46
52
|
/**
|
|
47
53
|
* Replay this Bot Response.
|
|
48
54
|
*
|