From 415f2a13fc98bdbf7ac303385cbba492b8555b2f Mon Sep 17 00:00:00 2001 From: Pavel Zotikov Date: Sat, 22 Nov 2025 19:53:34 +0300 Subject: [PATCH 1/4] feat: update search to use repetition.delta field instead of event.payload - Add search in repetition.delta field (JSON string format) - Keep fallback to event.payload fields for backward compatibility - Search now looks in repetition.delta as primary source since payload data moved to repetitions collection --- src/models/eventsFactory.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/models/eventsFactory.js b/src/models/eventsFactory.js index 9b27ee4b..c4d39db5 100644 --- a/src/models/eventsFactory.js +++ b/src/models/eventsFactory.js @@ -292,6 +292,12 @@ class EventsFactory extends Factory { const searchFilter = search.trim().length > 0 ? { $or: [ + { + 'repetition.delta': { + $regex: escapedSearch, + $options: 'i', + }, + }, { 'event.payload.title': { $regex: escapedSearch, From 737857dd86ba9da75bdd1bd3087be5a8552a5d96 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 22 Nov 2025 16:54:49 +0000 Subject: [PATCH 2/4] Bump version up to 1.2.24 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1600018a..dae3d6b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hawk.api", - "version": "1.2.23", + "version": "1.2.24", "main": "index.ts", "license": "BUSL-1.1", "scripts": { From c116d644edcef0109a17ef06858055d3a93b78e6 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 22 Nov 2025 17:12:10 +0000 Subject: [PATCH 3/4] Bump version up to 1.2.25 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9979f18..80896794 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hawk.api", - "version": "1.2.24", + "version": "1.2.25", "main": "index.ts", "license": "BUSL-1.1", "scripts": { From 6d8b286cb12e9800a0149ee9d7e2e174ecf0c661 Mon Sep 17 00:00:00 2001 From: Pavel Zotikov Date: Sat, 22 Nov 2025 20:18:01 +0300 Subject: [PATCH 4/4] param `eventId` does not exist --- src/models/eventsFactory.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/models/eventsFactory.js b/src/models/eventsFactory.js index c4d39db5..91e123e4 100644 --- a/src/models/eventsFactory.js +++ b/src/models/eventsFactory.js @@ -597,7 +597,6 @@ class EventsFactory extends Factory { /** * Returns Event repetitions * - * @param {string|ObjectID} eventId - Event's id, could be repetitionId in case when we want to get repetitions portion by one repetition * @param {string|ObjectID} originalEventId - id of the original event * @param {Number} limit - count limitations * @param {Number} cursor - pointer to the next repetition