@lhremote/core 0.0.0 → 0.2.0

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.
Files changed (551) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +124 -0
  3. package/dist/cdp/app-discovery.d.ts +22 -0
  4. package/dist/cdp/app-discovery.d.ts.map +1 -0
  5. package/dist/cdp/app-discovery.js +60 -0
  6. package/dist/cdp/app-discovery.js.map +1 -0
  7. package/dist/cdp/app-discovery.test.d.ts +2 -0
  8. package/dist/cdp/app-discovery.test.d.ts.map +1 -0
  9. package/dist/cdp/app-discovery.test.js +124 -0
  10. package/dist/cdp/app-discovery.test.js.map +1 -0
  11. package/dist/cdp/client.d.ts +114 -0
  12. package/dist/cdp/client.d.ts.map +1 -0
  13. package/dist/cdp/client.integration.test.d.ts +2 -0
  14. package/dist/cdp/client.integration.test.d.ts.map +1 -0
  15. package/dist/cdp/client.integration.test.js +77 -0
  16. package/dist/cdp/client.integration.test.js.map +1 -0
  17. package/dist/cdp/client.js +319 -0
  18. package/dist/cdp/client.js.map +1 -0
  19. package/dist/cdp/client.test.d.ts +2 -0
  20. package/dist/cdp/client.test.d.ts.map +1 -0
  21. package/dist/cdp/client.test.js +533 -0
  22. package/dist/cdp/client.test.js.map +1 -0
  23. package/dist/cdp/discovery.d.ts +14 -0
  24. package/dist/cdp/discovery.d.ts.map +1 -0
  25. package/dist/cdp/discovery.integration.test.d.ts +2 -0
  26. package/dist/cdp/discovery.integration.test.d.ts.map +1 -0
  27. package/dist/cdp/discovery.integration.test.js +27 -0
  28. package/dist/cdp/discovery.integration.test.js.map +1 -0
  29. package/dist/cdp/discovery.js +33 -0
  30. package/dist/cdp/discovery.js.map +1 -0
  31. package/dist/cdp/discovery.test.d.ts +2 -0
  32. package/dist/cdp/discovery.test.d.ts.map +1 -0
  33. package/dist/cdp/discovery.test.js +56 -0
  34. package/dist/cdp/discovery.test.js.map +1 -0
  35. package/dist/cdp/errors.d.ts +28 -0
  36. package/dist/cdp/errors.d.ts.map +1 -0
  37. package/dist/cdp/errors.js +42 -0
  38. package/dist/cdp/errors.js.map +1 -0
  39. package/dist/cdp/errors.test.d.ts +2 -0
  40. package/dist/cdp/errors.test.d.ts.map +1 -0
  41. package/dist/cdp/errors.test.js +37 -0
  42. package/dist/cdp/errors.test.js.map +1 -0
  43. package/dist/cdp/index.d.ts +6 -0
  44. package/dist/cdp/index.d.ts.map +1 -0
  45. package/dist/cdp/index.js +8 -0
  46. package/dist/cdp/index.js.map +1 -0
  47. package/dist/cdp/instance-discovery.d.ts +30 -0
  48. package/dist/cdp/instance-discovery.d.ts.map +1 -0
  49. package/dist/cdp/instance-discovery.integration.test.d.ts +2 -0
  50. package/dist/cdp/instance-discovery.integration.test.d.ts.map +1 -0
  51. package/dist/cdp/instance-discovery.integration.test.js +36 -0
  52. package/dist/cdp/instance-discovery.integration.test.js.map +1 -0
  53. package/dist/cdp/instance-discovery.js +118 -0
  54. package/dist/cdp/instance-discovery.js.map +1 -0
  55. package/dist/cdp/instance-discovery.test.d.ts +2 -0
  56. package/dist/cdp/instance-discovery.test.d.ts.map +1 -0
  57. package/dist/cdp/instance-discovery.test.js +112 -0
  58. package/dist/cdp/instance-discovery.test.js.map +1 -0
  59. package/dist/cdp/testing/launch-chromium.d.ts +24 -0
  60. package/dist/cdp/testing/launch-chromium.d.ts.map +1 -0
  61. package/dist/cdp/testing/launch-chromium.js +93 -0
  62. package/dist/cdp/testing/launch-chromium.js.map +1 -0
  63. package/dist/constants.d.ts +5 -0
  64. package/dist/constants.d.ts.map +1 -0
  65. package/dist/constants.js +7 -0
  66. package/dist/constants.js.map +1 -0
  67. package/dist/data/action-types.d.ts +39 -0
  68. package/dist/data/action-types.d.ts.map +1 -0
  69. package/dist/data/action-types.js +497 -0
  70. package/dist/data/action-types.js.map +1 -0
  71. package/dist/data/action-types.test.d.ts +2 -0
  72. package/dist/data/action-types.test.d.ts.map +1 -0
  73. package/dist/data/action-types.test.js +544 -0
  74. package/dist/data/action-types.test.js.map +1 -0
  75. package/dist/data/index.d.ts +3 -0
  76. package/dist/data/index.d.ts.map +1 -0
  77. package/dist/data/index.js +4 -0
  78. package/dist/data/index.js.map +1 -0
  79. package/dist/db/client.d.ts +27 -0
  80. package/dist/db/client.d.ts.map +1 -0
  81. package/dist/db/client.integration.test.d.ts +2 -0
  82. package/dist/db/client.integration.test.d.ts.map +1 -0
  83. package/dist/db/client.integration.test.js +63 -0
  84. package/dist/db/client.integration.test.js.map +1 -0
  85. package/dist/db/client.js +23 -0
  86. package/dist/db/client.js.map +1 -0
  87. package/dist/db/client.test.d.ts +2 -0
  88. package/dist/db/client.test.d.ts.map +1 -0
  89. package/dist/db/client.test.js +48 -0
  90. package/dist/db/client.test.js.map +1 -0
  91. package/dist/db/discovery.d.ts +14 -0
  92. package/dist/db/discovery.d.ts.map +1 -0
  93. package/dist/db/discovery.integration.test.d.ts +2 -0
  94. package/dist/db/discovery.integration.test.d.ts.map +1 -0
  95. package/dist/db/discovery.integration.test.js +101 -0
  96. package/dist/db/discovery.integration.test.js.map +1 -0
  97. package/dist/db/discovery.js +76 -0
  98. package/dist/db/discovery.js.map +1 -0
  99. package/dist/db/discovery.test.d.ts +2 -0
  100. package/dist/db/discovery.test.d.ts.map +1 -0
  101. package/dist/db/discovery.test.js +125 -0
  102. package/dist/db/discovery.test.js.map +1 -0
  103. package/dist/db/errors.d.ts +52 -0
  104. package/dist/db/errors.d.ts.map +1 -0
  105. package/dist/db/errors.js +82 -0
  106. package/dist/db/errors.js.map +1 -0
  107. package/dist/db/errors.test.d.ts +2 -0
  108. package/dist/db/errors.test.d.ts.map +1 -0
  109. package/dist/db/errors.test.js +34 -0
  110. package/dist/db/errors.test.js.map +1 -0
  111. package/dist/db/escape-like.d.ts +8 -0
  112. package/dist/db/escape-like.d.ts.map +1 -0
  113. package/dist/db/escape-like.js +12 -0
  114. package/dist/db/escape-like.js.map +1 -0
  115. package/dist/db/escape-like.test.d.ts +2 -0
  116. package/dist/db/escape-like.test.d.ts.map +1 -0
  117. package/dist/db/escape-like.test.js +25 -0
  118. package/dist/db/escape-like.test.js.map +1 -0
  119. package/dist/db/index.d.ts +5 -0
  120. package/dist/db/index.d.ts.map +1 -0
  121. package/dist/db/index.js +7 -0
  122. package/dist/db/index.js.map +1 -0
  123. package/dist/db/repositories/campaign-exclude-list.d.ts +89 -0
  124. package/dist/db/repositories/campaign-exclude-list.d.ts.map +1 -0
  125. package/dist/db/repositories/campaign-exclude-list.js +204 -0
  126. package/dist/db/repositories/campaign-exclude-list.js.map +1 -0
  127. package/dist/db/repositories/campaign-exclude-list.test.d.ts +2 -0
  128. package/dist/db/repositories/campaign-exclude-list.test.d.ts.map +1 -0
  129. package/dist/db/repositories/campaign-exclude-list.test.js +132 -0
  130. package/dist/db/repositories/campaign-exclude-list.test.js.map +1 -0
  131. package/dist/db/repositories/campaign-statistics.d.ts +58 -0
  132. package/dist/db/repositories/campaign-statistics.d.ts.map +1 -0
  133. package/dist/db/repositories/campaign-statistics.js +278 -0
  134. package/dist/db/repositories/campaign-statistics.js.map +1 -0
  135. package/dist/db/repositories/campaign-statistics.test.d.ts +2 -0
  136. package/dist/db/repositories/campaign-statistics.test.d.ts.map +1 -0
  137. package/dist/db/repositories/campaign-statistics.test.js +266 -0
  138. package/dist/db/repositories/campaign-statistics.test.js.map +1 -0
  139. package/dist/db/repositories/campaign.d.ts +103 -0
  140. package/dist/db/repositories/campaign.d.ts.map +1 -0
  141. package/dist/db/repositories/campaign.js +388 -0
  142. package/dist/db/repositories/campaign.js.map +1 -0
  143. package/dist/db/repositories/campaign.test.d.ts +2 -0
  144. package/dist/db/repositories/campaign.test.d.ts.map +1 -0
  145. package/dist/db/repositories/campaign.test.js +392 -0
  146. package/dist/db/repositories/campaign.test.js.map +1 -0
  147. package/dist/db/repositories/index.d.ts +6 -0
  148. package/dist/db/repositories/index.d.ts.map +1 -0
  149. package/dist/db/repositories/index.js +8 -0
  150. package/dist/db/repositories/index.js.map +1 -0
  151. package/dist/db/repositories/message.d.ts +57 -0
  152. package/dist/db/repositories/message.d.ts.map +1 -0
  153. package/dist/db/repositories/message.integration.test.d.ts +2 -0
  154. package/dist/db/repositories/message.integration.test.d.ts.map +1 -0
  155. package/dist/db/repositories/message.integration.test.js +137 -0
  156. package/dist/db/repositories/message.integration.test.js.map +1 -0
  157. package/dist/db/repositories/message.js +308 -0
  158. package/dist/db/repositories/message.js.map +1 -0
  159. package/dist/db/repositories/message.test.d.ts +2 -0
  160. package/dist/db/repositories/message.test.d.ts.map +1 -0
  161. package/dist/db/repositories/message.test.js +179 -0
  162. package/dist/db/repositories/message.test.js.map +1 -0
  163. package/dist/db/repositories/profile.d.ts +42 -0
  164. package/dist/db/repositories/profile.d.ts.map +1 -0
  165. package/dist/db/repositories/profile.integration.test.d.ts +2 -0
  166. package/dist/db/repositories/profile.integration.test.d.ts.map +1 -0
  167. package/dist/db/repositories/profile.integration.test.js +222 -0
  168. package/dist/db/repositories/profile.integration.test.js.map +1 -0
  169. package/dist/db/repositories/profile.js +163 -0
  170. package/dist/db/repositories/profile.js.map +1 -0
  171. package/dist/db/repositories/profile.test.d.ts +2 -0
  172. package/dist/db/repositories/profile.test.d.ts.map +1 -0
  173. package/dist/db/repositories/profile.test.js +216 -0
  174. package/dist/db/repositories/profile.test.js.map +1 -0
  175. package/dist/db/testing/create-fixture.d.ts +2 -0
  176. package/dist/db/testing/create-fixture.d.ts.map +1 -0
  177. package/dist/db/testing/create-fixture.js +745 -0
  178. package/dist/db/testing/create-fixture.js.map +1 -0
  179. package/dist/db/testing/open-fixture.d.ts +15 -0
  180. package/dist/db/testing/open-fixture.d.ts.map +1 -0
  181. package/dist/db/testing/open-fixture.js +39 -0
  182. package/dist/db/testing/open-fixture.js.map +1 -0
  183. package/dist/formats/campaign-format.d.ts +31 -0
  184. package/dist/formats/campaign-format.d.ts.map +1 -0
  185. package/dist/formats/campaign-format.js +225 -0
  186. package/dist/formats/campaign-format.js.map +1 -0
  187. package/dist/formats/campaign-format.test.d.ts +2 -0
  188. package/dist/formats/campaign-format.test.d.ts.map +1 -0
  189. package/dist/formats/campaign-format.test.js +442 -0
  190. package/dist/formats/campaign-format.test.js.map +1 -0
  191. package/dist/formats/errors.d.ts +7 -0
  192. package/dist/formats/errors.d.ts.map +1 -0
  193. package/dist/formats/errors.js +12 -0
  194. package/dist/formats/errors.js.map +1 -0
  195. package/dist/formats/index.d.ts +3 -0
  196. package/dist/formats/index.d.ts.map +1 -0
  197. package/dist/formats/index.js +5 -0
  198. package/dist/formats/index.js.map +1 -0
  199. package/dist/index.d.ts +10 -1
  200. package/dist/index.d.ts.map +1 -1
  201. package/dist/index.js +29 -1
  202. package/dist/index.js.map +1 -1
  203. package/dist/operations/campaign-add-action.d.ts +14 -0
  204. package/dist/operations/campaign-add-action.d.ts.map +1 -0
  205. package/dist/operations/campaign-add-action.js +33 -0
  206. package/dist/operations/campaign-add-action.js.map +1 -0
  207. package/dist/operations/campaign-add-action.test.d.ts +2 -0
  208. package/dist/operations/campaign-add-action.test.d.ts.map +1 -0
  209. package/dist/operations/campaign-add-action.test.js +122 -0
  210. package/dist/operations/campaign-add-action.test.js.map +1 -0
  211. package/dist/operations/campaign-create.d.ts +17 -0
  212. package/dist/operations/campaign-create.d.ts.map +1 -0
  213. package/dist/operations/campaign-create.js +21 -0
  214. package/dist/operations/campaign-create.js.map +1 -0
  215. package/dist/operations/campaign-create.test.d.ts +2 -0
  216. package/dist/operations/campaign-create.test.d.ts.map +1 -0
  217. package/dist/operations/campaign-create.test.js +113 -0
  218. package/dist/operations/campaign-create.test.js.map +1 -0
  219. package/dist/operations/campaign-delete.d.ts +20 -0
  220. package/dist/operations/campaign-delete.d.ts.map +1 -0
  221. package/dist/operations/campaign-delete.js +22 -0
  222. package/dist/operations/campaign-delete.js.map +1 -0
  223. package/dist/operations/campaign-delete.test.d.ts +2 -0
  224. package/dist/operations/campaign-delete.test.d.ts.map +1 -0
  225. package/dist/operations/campaign-delete.test.js +92 -0
  226. package/dist/operations/campaign-delete.test.js.map +1 -0
  227. package/dist/operations/campaign-exclude-add.d.ts +16 -0
  228. package/dist/operations/campaign-exclude-add.d.ts.map +1 -0
  229. package/dist/operations/campaign-exclude-add.js +27 -0
  230. package/dist/operations/campaign-exclude-add.js.map +1 -0
  231. package/dist/operations/campaign-exclude-add.test.d.ts +2 -0
  232. package/dist/operations/campaign-exclude-add.test.d.ts.map +1 -0
  233. package/dist/operations/campaign-exclude-add.test.js +114 -0
  234. package/dist/operations/campaign-exclude-add.test.js.map +1 -0
  235. package/dist/operations/campaign-exclude-list.d.ts +14 -0
  236. package/dist/operations/campaign-exclude-list.d.ts.map +1 -0
  237. package/dist/operations/campaign-exclude-list.js +26 -0
  238. package/dist/operations/campaign-exclude-list.js.map +1 -0
  239. package/dist/operations/campaign-exclude-list.test.d.ts +2 -0
  240. package/dist/operations/campaign-exclude-list.test.d.ts.map +1 -0
  241. package/dist/operations/campaign-exclude-list.test.js +113 -0
  242. package/dist/operations/campaign-exclude-list.test.js.map +1 -0
  243. package/dist/operations/campaign-exclude-remove.d.ts +16 -0
  244. package/dist/operations/campaign-exclude-remove.d.ts.map +1 -0
  245. package/dist/operations/campaign-exclude-remove.js +27 -0
  246. package/dist/operations/campaign-exclude-remove.js.map +1 -0
  247. package/dist/operations/campaign-exclude-remove.test.d.ts +2 -0
  248. package/dist/operations/campaign-exclude-remove.test.d.ts.map +1 -0
  249. package/dist/operations/campaign-exclude-remove.test.js +114 -0
  250. package/dist/operations/campaign-exclude-remove.test.js.map +1 -0
  251. package/dist/operations/campaign-export.d.ts +12 -0
  252. package/dist/operations/campaign-export.d.ts.map +1 -0
  253. package/dist/operations/campaign-export.js +24 -0
  254. package/dist/operations/campaign-export.js.map +1 -0
  255. package/dist/operations/campaign-export.test.d.ts +2 -0
  256. package/dist/operations/campaign-export.test.d.ts.map +1 -0
  257. package/dist/operations/campaign-export.test.js +134 -0
  258. package/dist/operations/campaign-export.test.js.map +1 -0
  259. package/dist/operations/campaign-get.d.ts +19 -0
  260. package/dist/operations/campaign-get.d.ts.map +1 -0
  261. package/dist/operations/campaign-get.js +23 -0
  262. package/dist/operations/campaign-get.js.map +1 -0
  263. package/dist/operations/campaign-get.test.d.ts +2 -0
  264. package/dist/operations/campaign-get.test.d.ts.map +1 -0
  265. package/dist/operations/campaign-get.test.js +99 -0
  266. package/dist/operations/campaign-get.test.js.map +1 -0
  267. package/dist/operations/campaign-list.d.ts +20 -0
  268. package/dist/operations/campaign-list.d.ts.map +1 -0
  269. package/dist/operations/campaign-list.js +23 -0
  270. package/dist/operations/campaign-list.js.map +1 -0
  271. package/dist/operations/campaign-list.test.d.ts +2 -0
  272. package/dist/operations/campaign-list.test.d.ts.map +1 -0
  273. package/dist/operations/campaign-list.test.js +106 -0
  274. package/dist/operations/campaign-list.test.js.map +1 -0
  275. package/dist/operations/campaign-move-next.d.ts +15 -0
  276. package/dist/operations/campaign-move-next.d.ts.map +1 -0
  277. package/dist/operations/campaign-move-next.js +25 -0
  278. package/dist/operations/campaign-move-next.js.map +1 -0
  279. package/dist/operations/campaign-move-next.test.d.ts +2 -0
  280. package/dist/operations/campaign-move-next.test.d.ts.map +1 -0
  281. package/dist/operations/campaign-move-next.test.js +105 -0
  282. package/dist/operations/campaign-move-next.test.js.map +1 -0
  283. package/dist/operations/campaign-remove-action.d.ts +12 -0
  284. package/dist/operations/campaign-remove-action.d.ts.map +1 -0
  285. package/dist/operations/campaign-remove-action.js +23 -0
  286. package/dist/operations/campaign-remove-action.js.map +1 -0
  287. package/dist/operations/campaign-remove-action.test.d.ts +2 -0
  288. package/dist/operations/campaign-remove-action.test.d.ts.map +1 -0
  289. package/dist/operations/campaign-remove-action.test.js +95 -0
  290. package/dist/operations/campaign-remove-action.test.js.map +1 -0
  291. package/dist/operations/campaign-reorder-actions.d.ts +13 -0
  292. package/dist/operations/campaign-reorder-actions.d.ts.map +1 -0
  293. package/dist/operations/campaign-reorder-actions.js +19 -0
  294. package/dist/operations/campaign-reorder-actions.js.map +1 -0
  295. package/dist/operations/campaign-reorder-actions.test.d.ts +2 -0
  296. package/dist/operations/campaign-reorder-actions.test.d.ts.map +1 -0
  297. package/dist/operations/campaign-reorder-actions.test.js +103 -0
  298. package/dist/operations/campaign-reorder-actions.test.js.map +1 -0
  299. package/dist/operations/campaign-retry.d.ts +13 -0
  300. package/dist/operations/campaign-retry.d.ts.map +1 -0
  301. package/dist/operations/campaign-retry.js +24 -0
  302. package/dist/operations/campaign-retry.js.map +1 -0
  303. package/dist/operations/campaign-retry.test.d.ts +2 -0
  304. package/dist/operations/campaign-retry.test.d.ts.map +1 -0
  305. package/dist/operations/campaign-retry.test.js +100 -0
  306. package/dist/operations/campaign-retry.test.js.map +1 -0
  307. package/dist/operations/campaign-start.d.ts +13 -0
  308. package/dist/operations/campaign-start.d.ts.map +1 -0
  309. package/dist/operations/campaign-start.js +24 -0
  310. package/dist/operations/campaign-start.js.map +1 -0
  311. package/dist/operations/campaign-start.test.d.ts +2 -0
  312. package/dist/operations/campaign-start.test.d.ts.map +1 -0
  313. package/dist/operations/campaign-start.test.js +96 -0
  314. package/dist/operations/campaign-start.test.js.map +1 -0
  315. package/dist/operations/campaign-statistics.d.ts +10 -0
  316. package/dist/operations/campaign-statistics.d.ts.map +1 -0
  317. package/dist/operations/campaign-statistics.js +23 -0
  318. package/dist/operations/campaign-statistics.js.map +1 -0
  319. package/dist/operations/campaign-statistics.test.d.ts +2 -0
  320. package/dist/operations/campaign-statistics.test.d.ts.map +1 -0
  321. package/dist/operations/campaign-statistics.test.js +120 -0
  322. package/dist/operations/campaign-statistics.test.js.map +1 -0
  323. package/dist/operations/campaign-status.d.ts +26 -0
  324. package/dist/operations/campaign-status.d.ts.map +1 -0
  325. package/dist/operations/campaign-status.js +32 -0
  326. package/dist/operations/campaign-status.js.map +1 -0
  327. package/dist/operations/campaign-status.test.d.ts +2 -0
  328. package/dist/operations/campaign-status.test.d.ts.map +1 -0
  329. package/dist/operations/campaign-status.test.js +142 -0
  330. package/dist/operations/campaign-status.test.js.map +1 -0
  331. package/dist/operations/campaign-stop.d.ts +11 -0
  332. package/dist/operations/campaign-stop.d.ts.map +1 -0
  333. package/dist/operations/campaign-stop.js +23 -0
  334. package/dist/operations/campaign-stop.js.map +1 -0
  335. package/dist/operations/campaign-stop.test.d.ts +2 -0
  336. package/dist/operations/campaign-stop.test.d.ts.map +1 -0
  337. package/dist/operations/campaign-stop.test.js +92 -0
  338. package/dist/operations/campaign-stop.test.js.map +1 -0
  339. package/dist/operations/campaign-update.d.ts +18 -0
  340. package/dist/operations/campaign-update.d.ts.map +1 -0
  341. package/dist/operations/campaign-update.js +21 -0
  342. package/dist/operations/campaign-update.js.map +1 -0
  343. package/dist/operations/campaign-update.test.d.ts +2 -0
  344. package/dist/operations/campaign-update.test.d.ts.map +1 -0
  345. package/dist/operations/campaign-update.test.js +105 -0
  346. package/dist/operations/campaign-update.test.js.map +1 -0
  347. package/dist/operations/check-replies.d.ts +12 -0
  348. package/dist/operations/check-replies.d.ts.map +1 -0
  349. package/dist/operations/check-replies.js +26 -0
  350. package/dist/operations/check-replies.js.map +1 -0
  351. package/dist/operations/check-replies.test.d.ts +2 -0
  352. package/dist/operations/check-replies.test.d.ts.map +1 -0
  353. package/dist/operations/check-replies.test.js +118 -0
  354. package/dist/operations/check-replies.test.js.map +1 -0
  355. package/dist/operations/import-people-from-urls.d.ts +16 -0
  356. package/dist/operations/import-people-from-urls.d.ts.map +1 -0
  357. package/dist/operations/import-people-from-urls.js +27 -0
  358. package/dist/operations/import-people-from-urls.js.map +1 -0
  359. package/dist/operations/import-people-from-urls.test.d.ts +2 -0
  360. package/dist/operations/import-people-from-urls.test.d.ts.map +1 -0
  361. package/dist/operations/import-people-from-urls.test.js +118 -0
  362. package/dist/operations/import-people-from-urls.test.js.map +1 -0
  363. package/dist/operations/index.d.ts +24 -0
  364. package/dist/operations/index.d.ts.map +1 -0
  365. package/dist/operations/index.js +30 -0
  366. package/dist/operations/index.js.map +1 -0
  367. package/dist/operations/query-messages.d.ts +23 -0
  368. package/dist/operations/query-messages.d.ts.map +1 -0
  369. package/dist/operations/query-messages.js +33 -0
  370. package/dist/operations/query-messages.js.map +1 -0
  371. package/dist/operations/query-messages.test.d.ts +2 -0
  372. package/dist/operations/query-messages.test.d.ts.map +1 -0
  373. package/dist/operations/query-messages.test.js +134 -0
  374. package/dist/operations/query-messages.test.js.map +1 -0
  375. package/dist/operations/scrape-messaging-history.d.ts +10 -0
  376. package/dist/operations/scrape-messaging-history.d.ts.map +1 -0
  377. package/dist/operations/scrape-messaging-history.js +24 -0
  378. package/dist/operations/scrape-messaging-history.js.map +1 -0
  379. package/dist/operations/scrape-messaging-history.test.d.ts +2 -0
  380. package/dist/operations/scrape-messaging-history.test.d.ts.map +1 -0
  381. package/dist/operations/scrape-messaging-history.test.js +112 -0
  382. package/dist/operations/scrape-messaging-history.test.js.map +1 -0
  383. package/dist/operations/types.d.ts +10 -0
  384. package/dist/operations/types.d.ts.map +1 -0
  385. package/dist/operations/types.js +4 -0
  386. package/dist/operations/types.js.map +1 -0
  387. package/dist/services/account-resolution.d.ts +22 -0
  388. package/dist/services/account-resolution.d.ts.map +1 -0
  389. package/dist/services/account-resolution.js +45 -0
  390. package/dist/services/account-resolution.js.map +1 -0
  391. package/dist/services/account-resolution.test.d.ts +2 -0
  392. package/dist/services/account-resolution.test.d.ts.map +1 -0
  393. package/dist/services/account-resolution.test.js +91 -0
  394. package/dist/services/account-resolution.test.js.map +1 -0
  395. package/dist/services/app.d.ts +62 -0
  396. package/dist/services/app.d.ts.map +1 -0
  397. package/dist/services/app.js +200 -0
  398. package/dist/services/app.js.map +1 -0
  399. package/dist/services/app.test.d.ts +2 -0
  400. package/dist/services/app.test.d.ts.map +1 -0
  401. package/dist/services/app.test.js +267 -0
  402. package/dist/services/app.test.js.map +1 -0
  403. package/dist/services/campaign.d.ts +143 -0
  404. package/dist/services/campaign.d.ts.map +1 -0
  405. package/dist/services/campaign.js +409 -0
  406. package/dist/services/campaign.js.map +1 -0
  407. package/dist/services/campaign.test.d.ts +2 -0
  408. package/dist/services/campaign.test.d.ts.map +1 -0
  409. package/dist/services/campaign.test.js +481 -0
  410. package/dist/services/campaign.test.js.map +1 -0
  411. package/dist/services/errors.d.ts +83 -0
  412. package/dist/services/errors.d.ts.map +1 -0
  413. package/dist/services/errors.js +126 -0
  414. package/dist/services/errors.js.map +1 -0
  415. package/dist/services/errors.test.d.ts +2 -0
  416. package/dist/services/errors.test.d.ts.map +1 -0
  417. package/dist/services/errors.test.js +123 -0
  418. package/dist/services/errors.test.js.map +1 -0
  419. package/dist/services/index.d.ts +10 -0
  420. package/dist/services/index.d.ts.map +1 -0
  421. package/dist/services/index.js +12 -0
  422. package/dist/services/index.js.map +1 -0
  423. package/dist/services/instance-context.d.ts +37 -0
  424. package/dist/services/instance-context.d.ts.map +1 -0
  425. package/dist/services/instance-context.js +49 -0
  426. package/dist/services/instance-context.js.map +1 -0
  427. package/dist/services/instance-context.test.d.ts +2 -0
  428. package/dist/services/instance-context.test.d.ts.map +1 -0
  429. package/dist/services/instance-context.test.js +203 -0
  430. package/dist/services/instance-context.test.js.map +1 -0
  431. package/dist/services/instance-lifecycle.d.ts +38 -0
  432. package/dist/services/instance-lifecycle.d.ts.map +1 -0
  433. package/dist/services/instance-lifecycle.js +87 -0
  434. package/dist/services/instance-lifecycle.js.map +1 -0
  435. package/dist/services/instance-lifecycle.test.d.ts +2 -0
  436. package/dist/services/instance-lifecycle.test.d.ts.map +1 -0
  437. package/dist/services/instance-lifecycle.test.js +158 -0
  438. package/dist/services/instance-lifecycle.test.js.map +1 -0
  439. package/dist/services/instance.d.ts +90 -0
  440. package/dist/services/instance.d.ts.map +1 -0
  441. package/dist/services/instance.js +178 -0
  442. package/dist/services/instance.js.map +1 -0
  443. package/dist/services/instance.test.d.ts +2 -0
  444. package/dist/services/instance.test.d.ts.map +1 -0
  445. package/dist/services/instance.test.js +291 -0
  446. package/dist/services/instance.test.js.map +1 -0
  447. package/dist/services/launcher.d.ts +54 -0
  448. package/dist/services/launcher.d.ts.map +1 -0
  449. package/dist/services/launcher.js +162 -0
  450. package/dist/services/launcher.js.map +1 -0
  451. package/dist/services/launcher.test.d.ts +2 -0
  452. package/dist/services/launcher.test.d.ts.map +1 -0
  453. package/dist/services/launcher.test.js +163 -0
  454. package/dist/services/launcher.test.js.map +1 -0
  455. package/dist/services/status.d.ts +37 -0
  456. package/dist/services/status.d.ts.map +1 -0
  457. package/dist/services/status.js +85 -0
  458. package/dist/services/status.js.map +1 -0
  459. package/dist/services/status.test.d.ts +2 -0
  460. package/dist/services/status.test.d.ts.map +1 -0
  461. package/dist/services/status.test.js +248 -0
  462. package/dist/services/status.test.js.map +1 -0
  463. package/dist/testing/e2e-helpers.d.ts +41 -0
  464. package/dist/testing/e2e-helpers.d.ts.map +1 -0
  465. package/dist/testing/e2e-helpers.js +114 -0
  466. package/dist/testing/e2e-helpers.js.map +1 -0
  467. package/dist/testing/index.d.ts +2 -0
  468. package/dist/testing/index.d.ts.map +1 -0
  469. package/dist/testing/index.js +4 -0
  470. package/dist/testing/index.js.map +1 -0
  471. package/dist/types/account.d.ts +13 -0
  472. package/dist/types/account.d.ts.map +1 -0
  473. package/dist/types/account.js +4 -0
  474. package/dist/types/account.js.map +1 -0
  475. package/dist/types/account.test.d.ts +2 -0
  476. package/dist/types/account.test.d.ts.map +1 -0
  477. package/dist/types/account.test.js +26 -0
  478. package/dist/types/account.test.js.map +1 -0
  479. package/dist/types/campaign.d.ts +267 -0
  480. package/dist/types/campaign.d.ts.map +1 -0
  481. package/dist/types/campaign.js +4 -0
  482. package/dist/types/campaign.js.map +1 -0
  483. package/dist/types/cdp.d.ts +18 -0
  484. package/dist/types/cdp.d.ts.map +1 -0
  485. package/dist/types/cdp.js +4 -0
  486. package/dist/types/cdp.js.map +1 -0
  487. package/dist/types/cdp.test.d.ts +2 -0
  488. package/dist/types/cdp.test.d.ts.map +1 -0
  489. package/dist/types/cdp.test.js +30 -0
  490. package/dist/types/cdp.test.js.map +1 -0
  491. package/dist/types/index.d.ts +6 -0
  492. package/dist/types/index.d.ts.map +1 -0
  493. package/dist/types/index.js +4 -0
  494. package/dist/types/index.js.map +1 -0
  495. package/dist/types/instance.d.ts +36 -0
  496. package/dist/types/instance.d.ts.map +1 -0
  497. package/dist/types/instance.js +4 -0
  498. package/dist/types/instance.js.map +1 -0
  499. package/dist/types/instance.test.d.ts +2 -0
  500. package/dist/types/instance.test.d.ts.map +1 -0
  501. package/dist/types/instance.test.js +59 -0
  502. package/dist/types/instance.test.js.map +1 -0
  503. package/dist/types/messaging.d.ts +51 -0
  504. package/dist/types/messaging.d.ts.map +1 -0
  505. package/dist/types/messaging.js +4 -0
  506. package/dist/types/messaging.js.map +1 -0
  507. package/dist/types/profile.d.ts +81 -0
  508. package/dist/types/profile.d.ts.map +1 -0
  509. package/dist/types/profile.js +4 -0
  510. package/dist/types/profile.js.map +1 -0
  511. package/dist/types/profile.test.d.ts +2 -0
  512. package/dist/types/profile.test.d.ts.map +1 -0
  513. package/dist/types/profile.test.js +105 -0
  514. package/dist/types/profile.test.js.map +1 -0
  515. package/dist/utils/cdp-port.d.ts +5 -0
  516. package/dist/utils/cdp-port.d.ts.map +1 -0
  517. package/dist/utils/cdp-port.js +15 -0
  518. package/dist/utils/cdp-port.js.map +1 -0
  519. package/dist/utils/cdp-port.test.d.ts +2 -0
  520. package/dist/utils/cdp-port.test.d.ts.map +1 -0
  521. package/dist/utils/cdp-port.test.js +23 -0
  522. package/dist/utils/cdp-port.test.js.map +1 -0
  523. package/dist/utils/delay.d.ts +5 -0
  524. package/dist/utils/delay.d.ts.map +1 -0
  525. package/dist/utils/delay.js +9 -0
  526. package/dist/utils/delay.js.map +1 -0
  527. package/dist/utils/delay.test.d.ts +2 -0
  528. package/dist/utils/delay.test.d.ts.map +1 -0
  529. package/dist/utils/delay.test.js +17 -0
  530. package/dist/utils/delay.test.js.map +1 -0
  531. package/dist/utils/error-message.d.ts +5 -0
  532. package/dist/utils/error-message.d.ts.map +1 -0
  533. package/dist/utils/error-message.js +9 -0
  534. package/dist/utils/error-message.js.map +1 -0
  535. package/dist/utils/error-message.test.d.ts +2 -0
  536. package/dist/utils/error-message.test.d.ts.map +1 -0
  537. package/dist/utils/error-message.test.js +28 -0
  538. package/dist/utils/error-message.test.js.map +1 -0
  539. package/dist/utils/index.d.ts +5 -0
  540. package/dist/utils/index.d.ts.map +1 -0
  541. package/dist/utils/index.js +7 -0
  542. package/dist/utils/index.js.map +1 -0
  543. package/dist/utils/loopback.d.ts +10 -0
  544. package/dist/utils/loopback.d.ts.map +1 -0
  545. package/dist/utils/loopback.js +28 -0
  546. package/dist/utils/loopback.js.map +1 -0
  547. package/dist/utils/loopback.test.d.ts +2 -0
  548. package/dist/utils/loopback.test.d.ts.map +1 -0
  549. package/dist/utils/loopback.test.js +34 -0
  550. package/dist/utils/loopback.test.js.map +1 -0
  551. package/package.json +26 -9
@@ -0,0 +1,82 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ /**
4
+ * Base class for all database-related errors.
5
+ */
6
+ export class DatabaseError extends Error {
7
+ constructor(message, options) {
8
+ super(message, options);
9
+ this.name = "DatabaseError";
10
+ }
11
+ }
12
+ /**
13
+ * Thrown when a LinkedHelper database file cannot be found at the
14
+ * expected location for a given account.
15
+ */
16
+ export class DatabaseNotFoundError extends DatabaseError {
17
+ constructor(accountId) {
18
+ super(`No database found for account ${String(accountId)}`);
19
+ this.name = "DatabaseNotFoundError";
20
+ }
21
+ }
22
+ /**
23
+ * Thrown when a chat lookup yields no results.
24
+ */
25
+ export class ChatNotFoundError extends DatabaseError {
26
+ constructor(chatId) {
27
+ super(`Chat not found for id ${String(chatId)}`);
28
+ this.name = "ChatNotFoundError";
29
+ }
30
+ }
31
+ /**
32
+ * Thrown when a profile lookup yields no results. The person may not
33
+ * have been extracted by LinkedHelper yet.
34
+ */
35
+ export class ProfileNotFoundError extends DatabaseError {
36
+ constructor(identifier) {
37
+ const detail = typeof identifier === "number"
38
+ ? `id ${String(identifier)}`
39
+ : `public ID "${identifier}"`;
40
+ super(`Profile not found for ${detail}. It may not have been extracted yet.`);
41
+ this.name = "ProfileNotFoundError";
42
+ }
43
+ }
44
+ /**
45
+ * Thrown when a campaign lookup yields no results.
46
+ */
47
+ export class CampaignNotFoundError extends DatabaseError {
48
+ campaignId;
49
+ constructor(campaignId) {
50
+ super(`Campaign not found for id ${String(campaignId)}`);
51
+ this.name = "CampaignNotFoundError";
52
+ this.campaignId = campaignId;
53
+ }
54
+ }
55
+ /**
56
+ * Thrown when a campaign action lookup yields no results.
57
+ */
58
+ export class ActionNotFoundError extends DatabaseError {
59
+ constructor(actionId, campaignId) {
60
+ super(`Action ${String(actionId)} not found in campaign ${String(campaignId)}`);
61
+ this.name = "ActionNotFoundError";
62
+ }
63
+ }
64
+ /**
65
+ * Thrown when an action has no successor in the campaign chain.
66
+ */
67
+ export class NoNextActionError extends DatabaseError {
68
+ constructor(actionId, campaignId) {
69
+ super(`Action ${String(actionId)} is the last action in campaign ${String(campaignId)}`);
70
+ this.name = "NoNextActionError";
71
+ }
72
+ }
73
+ /**
74
+ * Thrown when an exclude list is not found for a campaign or action.
75
+ */
76
+ export class ExcludeListNotFoundError extends DatabaseError {
77
+ constructor(level, id) {
78
+ super(`Exclude list not found for ${level} ${String(id)}`);
79
+ this.name = "ExcludeListNotFoundError";
80
+ }
81
+ }
82
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/db/errors.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK;IACtC,YAAY,OAAe,EAAE,OAAsB;QACjD,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;A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;CACF;AAED;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,aAAa;IAClD,YAAY,QAAgB,EAAE,UAAkB;QAC9C,KAAK,CACH,UAAU,MAAM,CAAC,QAAQ,CAAC,mCAAmC,MAAM,CAAC,UAAU,CAAC,EAAE,CAClF,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,wBAAyB,SAAQ,aAAa;IACzD,YAAY,KAA4B,EAAE,EAAU;QAClD,KAAK,CAAC,8BAA8B,KAAK,IAAI,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QAC3D,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAC;IACzC,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=errors.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.test.d.ts","sourceRoot":"","sources":["../../src/db/errors.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,34 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { describe, expect, it } from "vitest";
4
+ import { DatabaseError, DatabaseNotFoundError, ProfileNotFoundError, } from "./errors.js";
5
+ describe("DatabaseError", () => {
6
+ it("is an instance of Error", () => {
7
+ const err = new DatabaseError("test");
8
+ expect(err).toBeInstanceOf(Error);
9
+ expect(err.name).toBe("DatabaseError");
10
+ });
11
+ });
12
+ describe("DatabaseNotFoundError", () => {
13
+ it("includes the account ID in the message", () => {
14
+ const err = new DatabaseNotFoundError(42);
15
+ expect(err.message).toBe("No database found for account 42");
16
+ expect(err).toBeInstanceOf(DatabaseError);
17
+ expect(err.name).toBe("DatabaseNotFoundError");
18
+ });
19
+ });
20
+ describe("ProfileNotFoundError", () => {
21
+ it("formats numeric IDs", () => {
22
+ const err = new ProfileNotFoundError(7);
23
+ expect(err.message).toContain("id 7");
24
+ expect(err.name).toBe("ProfileNotFoundError");
25
+ });
26
+ it("formats string public IDs", () => {
27
+ const err = new ProfileNotFoundError("alice-smith");
28
+ expect(err.message).toContain('public ID "alice-smith"');
29
+ });
30
+ it("extends DatabaseError", () => {
31
+ expect(new ProfileNotFoundError(1)).toBeInstanceOf(DatabaseError);
32
+ });
33
+ });
34
+ //# sourceMappingURL=errors.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.test.js","sourceRoot":"","sources":["../../src/db/errors.test.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AAErB,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACjC,MAAM,GAAG,GAAG,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;QACtC,MAAM,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAClC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACrC,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;QAChD,MAAM,GAAG,GAAG,IAAI,qBAAqB,CAAC,EAAE,CAAC,CAAC;QAC1C,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;QAC7D,MAAM,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;QAC1C,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE;QAC7B,MAAM,GAAG,GAAG,IAAI,oBAAoB,CAAC,CAAC,CAAC,CAAC;QACxC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACtC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2BAA2B,EAAE,GAAG,EAAE;QACnC,MAAM,GAAG,GAAG,IAAI,oBAAoB,CAAC,aAAa,CAAC,CAAC;QACpD,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;QAC/B,MAAM,CAAC,IAAI,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Escapes SQL LIKE wildcard characters (`%` and `_`) in user input
3
+ * so they are treated as literals.
4
+ *
5
+ * Must be used with `ESCAPE '\'` in the LIKE clause.
6
+ */
7
+ export declare function escapeLike(input: string): string;
8
+ //# sourceMappingURL=escape-like.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escape-like.d.ts","sourceRoot":"","sources":["../../src/db/escape-like.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEhD"}
@@ -0,0 +1,12 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ /**
4
+ * Escapes SQL LIKE wildcard characters (`%` and `_`) in user input
5
+ * so they are treated as literals.
6
+ *
7
+ * Must be used with `ESCAPE '\'` in the LIKE clause.
8
+ */
9
+ export function escapeLike(input) {
10
+ return input.replace(/[%_\\]/g, (ch) => `\\${ch}`);
11
+ }
12
+ //# sourceMappingURL=escape-like.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escape-like.js","sourceRoot":"","sources":["../../src/db/escape-like.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,OAAO,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACrD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=escape-like.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escape-like.test.d.ts","sourceRoot":"","sources":["../../src/db/escape-like.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,25 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { describe, expect, it } from "vitest";
4
+ import { escapeLike } from "./escape-like.js";
5
+ describe("escapeLike", () => {
6
+ it("returns plain text unchanged", () => {
7
+ expect(escapeLike("hello world")).toBe("hello world");
8
+ });
9
+ it("escapes percent wildcard", () => {
10
+ expect(escapeLike("100%")).toBe("100\\%");
11
+ });
12
+ it("escapes underscore wildcard", () => {
13
+ expect(escapeLike("field_name")).toBe("field\\_name");
14
+ });
15
+ it("escapes backslash (the escape character itself)", () => {
16
+ expect(escapeLike("path\\to")).toBe("path\\\\to");
17
+ });
18
+ it("escapes multiple special characters", () => {
19
+ expect(escapeLike("100% of_items\\done")).toBe("100\\% of\\_items\\\\done");
20
+ });
21
+ it("handles empty string", () => {
22
+ expect(escapeLike("")).toBe("");
23
+ });
24
+ });
25
+ //# sourceMappingURL=escape-like.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escape-like.test.js","sourceRoot":"","sources":["../../src/db/escape-like.test.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;QACtC,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAClC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;QACrC,MAAM,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACzD,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;QAC7C,MAAM,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAC5C,2BAA2B,CAC5B,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sBAAsB,EAAE,GAAG,EAAE;QAC9B,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { DatabaseClient, type DatabaseClientOptions } from "./client.js";
2
+ export { discoverAllDatabases, discoverDatabase } from "./discovery.js";
3
+ export { ActionNotFoundError, CampaignNotFoundError, ChatNotFoundError, DatabaseError, DatabaseNotFoundError, ExcludeListNotFoundError, NoNextActionError, ProfileNotFoundError, } from "./errors.js";
4
+ export { CampaignExcludeListRepository, CampaignRepository, CampaignStatisticsRepository, MessageRepository, ProfileRepository, } from "./repositories/index.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/db/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,6BAA6B,EAC7B,kBAAkB,EAClB,4BAA4B,EAC5B,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,7 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ export { DatabaseClient } from "./client.js";
4
+ export { discoverAllDatabases, discoverDatabase } from "./discovery.js";
5
+ export { ActionNotFoundError, CampaignNotFoundError, ChatNotFoundError, DatabaseError, DatabaseNotFoundError, ExcludeListNotFoundError, NoNextActionError, ProfileNotFoundError, } from "./errors.js";
6
+ export { CampaignExcludeListRepository, CampaignRepository, CampaignStatisticsRepository, MessageRepository, ProfileRepository, } from "./repositories/index.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/db/index.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAEpC,OAAO,EAAE,cAAc,EAA8B,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,6BAA6B,EAC7B,kBAAkB,EAClB,4BAA4B,EAC5B,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,89 @@
1
+ import type { ExcludeListEntry } from "../../types/index.js";
2
+ import type { DatabaseClient } from "../client.js";
3
+ /**
4
+ * Repository for campaign exclude-list operations.
5
+ *
6
+ * Provides read operations (getExcludeList) and write operations
7
+ * (addToExcludeList, removeFromExcludeList) for campaign and
8
+ * action-level exclude lists.
9
+ *
10
+ * Write operations require the DatabaseClient to be opened with
11
+ * `{ readOnly: false }`.
12
+ */
13
+ export declare class CampaignExcludeListRepository {
14
+ private readonly client;
15
+ private readonly stmtGetCampaign;
16
+ private readonly stmtGetCampaignActions;
17
+ private writeStatements;
18
+ constructor(client: DatabaseClient);
19
+ /**
20
+ * Get the exclude list for a campaign or action.
21
+ *
22
+ * @param campaignId - Campaign ID (verified to exist).
23
+ * @param actionId - If provided, get the action-level exclude list.
24
+ * Otherwise, get the campaign-level exclude list.
25
+ * @throws {CampaignNotFoundError} if the campaign does not exist.
26
+ * @throws {ActionNotFoundError} if actionId is provided and not in the campaign.
27
+ * @throws {ExcludeListNotFoundError} if the exclude list chain is not found.
28
+ */
29
+ getExcludeList(campaignId: number, actionId?: number): ExcludeListEntry[];
30
+ /**
31
+ * Add people to a campaign or action exclude list.
32
+ *
33
+ * @param campaignId - Campaign ID (verified to exist).
34
+ * @param personIds - Person IDs to add.
35
+ * @param actionId - If provided, add to the action-level exclude list.
36
+ * @returns Number of people actually added (excludes already-present).
37
+ * @throws {CampaignNotFoundError} if the campaign does not exist.
38
+ * @throws {ActionNotFoundError} if actionId is provided and not in the campaign.
39
+ * @throws {ExcludeListNotFoundError} if the exclude list chain is not found.
40
+ */
41
+ addToExcludeList(campaignId: number, personIds: number[], actionId?: number): number;
42
+ /**
43
+ * Remove people from a campaign or action exclude list.
44
+ *
45
+ * @param campaignId - Campaign ID (verified to exist).
46
+ * @param personIds - Person IDs to remove.
47
+ * @param actionId - If provided, remove from the action-level exclude list.
48
+ * @returns Number of people actually removed.
49
+ * @throws {CampaignNotFoundError} if the campaign does not exist.
50
+ * @throws {ActionNotFoundError} if actionId is provided and not in the campaign.
51
+ * @throws {ExcludeListNotFoundError} if the exclude list chain is not found.
52
+ */
53
+ removeFromExcludeList(campaignId: number, personIds: number[], actionId?: number): number;
54
+ /**
55
+ * Prepare write statements lazily (only when needed).
56
+ * This avoids issues when the client is opened in read-only mode.
57
+ */
58
+ private getWriteStatements;
59
+ /**
60
+ * Resolve the collection_id for an exclude list.
61
+ *
62
+ * Follows the chain: exclude_list_id -> collection_people_versions -> collection_id.
63
+ *
64
+ * @param level - "campaign" or "action"
65
+ * @param id - Campaign ID (if level is "campaign") or action ID (if level is "action")
66
+ * @throws {ExcludeListNotFoundError} if the exclude list chain is not found.
67
+ */
68
+ private resolveExcludeListCollectionId;
69
+ /**
70
+ * Validate campaign/action and resolve the exclude-list collection ID.
71
+ *
72
+ * Shared preamble for {@link getExcludeList}, {@link addToExcludeList},
73
+ * and {@link removeFromExcludeList}.
74
+ *
75
+ * @param campaignId - Campaign ID (verified to exist).
76
+ * @param actionId - If provided, scope to the action-level exclude list.
77
+ * @throws {CampaignNotFoundError} if the campaign does not exist.
78
+ * @throws {ActionNotFoundError} if actionId is provided and not in the campaign.
79
+ * @throws {ExcludeListNotFoundError} if the exclude list chain is not found.
80
+ */
81
+ private resolveExcludeListContext;
82
+ /**
83
+ * Verify that a campaign exists.
84
+ *
85
+ * @throws {CampaignNotFoundError} if no campaign exists with the given ID.
86
+ */
87
+ private verifyCampaignExists;
88
+ }
89
+ //# sourceMappingURL=campaign-exclude-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"campaign-exclude-list.d.ts","sourceRoot":"","sources":["../../../src/db/repositories/campaign-exclude-list.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAWnD;;;;;;;;;GASG;AACH,qBAAa,6BAA6B;IAU5B,OAAO,CAAC,QAAQ,CAAC,MAAM;IATnC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC;IACjC,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC;IAGxC,OAAO,CAAC,eAAe,CAGP;gBAEa,MAAM,EAAE,cAAc;IAiBnD;;;;;;;;;OASG;IACH,cAAc,CACZ,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,MAAM,GAChB,gBAAgB,EAAE;IAiBrB;;;;;;;;;;OAUG;IACH,gBAAgB,CACd,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EAAE,EACnB,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM;IA6BT;;;;;;;;;;OAUG;IACH,qBAAqB,CACnB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EAAE,EACnB,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM;IA6BT;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAmB1B;;;;;;;;OAQG;IACH,OAAO,CAAC,8BAA8B;IA4CtC;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,yBAAyB;IAsBjC;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;CAI7B"}
@@ -0,0 +1,204 @@
1
+ // SPDX-License-Identifier: AGPL-3.0-only
2
+ // Copyright (C) 2026 Oleksii PELYKH
3
+ import { ActionNotFoundError, CampaignNotFoundError, ExcludeListNotFoundError, } from "../errors.js";
4
+ /**
5
+ * Repository for campaign exclude-list operations.
6
+ *
7
+ * Provides read operations (getExcludeList) and write operations
8
+ * (addToExcludeList, removeFromExcludeList) for campaign and
9
+ * action-level exclude lists.
10
+ *
11
+ * Write operations require the DatabaseClient to be opened with
12
+ * `{ readOnly: false }`.
13
+ */
14
+ export class CampaignExcludeListRepository {
15
+ client;
16
+ stmtGetCampaign;
17
+ stmtGetCampaignActions;
18
+ // Write statements (prepared lazily to avoid issues with read-only mode)
19
+ writeStatements = null;
20
+ constructor(client) {
21
+ this.client = client;
22
+ const { db } = client;
23
+ this.stmtGetCampaign = db.prepare(`SELECT id, name, description, is_paused, is_archived, is_valid,
24
+ li_account_id, created_at
25
+ FROM campaigns WHERE id = ?`);
26
+ this.stmtGetCampaignActions = db.prepare(`SELECT a.id, a.campaign_id
27
+ FROM actions a
28
+ WHERE a.campaign_id = ?
29
+ ORDER BY a.id`);
30
+ }
31
+ /**
32
+ * Get the exclude list for a campaign or action.
33
+ *
34
+ * @param campaignId - Campaign ID (verified to exist).
35
+ * @param actionId - If provided, get the action-level exclude list.
36
+ * Otherwise, get the campaign-level exclude list.
37
+ * @throws {CampaignNotFoundError} if the campaign does not exist.
38
+ * @throws {ActionNotFoundError} if actionId is provided and not in the campaign.
39
+ * @throws {ExcludeListNotFoundError} if the exclude list chain is not found.
40
+ */
41
+ getExcludeList(campaignId, actionId) {
42
+ const { collectionId } = this.resolveExcludeListContext(campaignId, actionId);
43
+ const rows = this.client.db
44
+ .prepare(`SELECT person_id FROM collection_people
45
+ WHERE collection_id = ?
46
+ ORDER BY person_id`)
47
+ .all(collectionId);
48
+ return rows.map((r) => ({ personId: r.person_id }));
49
+ }
50
+ /**
51
+ * Add people to a campaign or action exclude list.
52
+ *
53
+ * @param campaignId - Campaign ID (verified to exist).
54
+ * @param personIds - Person IDs to add.
55
+ * @param actionId - If provided, add to the action-level exclude list.
56
+ * @returns Number of people actually added (excludes already-present).
57
+ * @throws {CampaignNotFoundError} if the campaign does not exist.
58
+ * @throws {ActionNotFoundError} if actionId is provided and not in the campaign.
59
+ * @throws {ExcludeListNotFoundError} if the exclude list chain is not found.
60
+ */
61
+ addToExcludeList(campaignId, personIds, actionId) {
62
+ if (personIds.length === 0)
63
+ return 0;
64
+ const { collectionId } = this.resolveExcludeListContext(campaignId, actionId);
65
+ const stmts = this.getWriteStatements();
66
+ let added = 0;
67
+ this.client.db.exec("BEGIN");
68
+ try {
69
+ for (const personId of personIds) {
70
+ const result = stmts.insertCollectionPerson.run(collectionId, personId);
71
+ if (result.changes > 0)
72
+ added++;
73
+ }
74
+ this.client.db.exec("COMMIT");
75
+ }
76
+ catch (e) {
77
+ this.client.db.exec("ROLLBACK");
78
+ throw e;
79
+ }
80
+ return added;
81
+ }
82
+ /**
83
+ * Remove people from a campaign or action exclude list.
84
+ *
85
+ * @param campaignId - Campaign ID (verified to exist).
86
+ * @param personIds - Person IDs to remove.
87
+ * @param actionId - If provided, remove from the action-level exclude list.
88
+ * @returns Number of people actually removed.
89
+ * @throws {CampaignNotFoundError} if the campaign does not exist.
90
+ * @throws {ActionNotFoundError} if actionId is provided and not in the campaign.
91
+ * @throws {ExcludeListNotFoundError} if the exclude list chain is not found.
92
+ */
93
+ removeFromExcludeList(campaignId, personIds, actionId) {
94
+ if (personIds.length === 0)
95
+ return 0;
96
+ const { collectionId } = this.resolveExcludeListContext(campaignId, actionId);
97
+ const stmts = this.getWriteStatements();
98
+ let removed = 0;
99
+ this.client.db.exec("BEGIN");
100
+ try {
101
+ for (const personId of personIds) {
102
+ const result = stmts.deleteCollectionPerson.run(collectionId, personId);
103
+ if (result.changes > 0)
104
+ removed++;
105
+ }
106
+ this.client.db.exec("COMMIT");
107
+ }
108
+ catch (e) {
109
+ this.client.db.exec("ROLLBACK");
110
+ throw e;
111
+ }
112
+ return removed;
113
+ }
114
+ /**
115
+ * Prepare write statements lazily (only when needed).
116
+ * This avoids issues when the client is opened in read-only mode.
117
+ */
118
+ getWriteStatements() {
119
+ if (this.writeStatements)
120
+ return this.writeStatements;
121
+ const { db } = this.client;
122
+ this.writeStatements = {
123
+ insertCollectionPerson: db.prepare(`INSERT OR IGNORE INTO collection_people (collection_id, person_id)
124
+ VALUES (?, ?)`),
125
+ deleteCollectionPerson: db.prepare(`DELETE FROM collection_people
126
+ WHERE collection_id = ? AND person_id = ?`),
127
+ };
128
+ return this.writeStatements;
129
+ }
130
+ /**
131
+ * Resolve the collection_id for an exclude list.
132
+ *
133
+ * Follows the chain: exclude_list_id -> collection_people_versions -> collection_id.
134
+ *
135
+ * @param level - "campaign" or "action"
136
+ * @param id - Campaign ID (if level is "campaign") or action ID (if level is "action")
137
+ * @throws {ExcludeListNotFoundError} if the exclude list chain is not found.
138
+ */
139
+ resolveExcludeListCollectionId(level, id) {
140
+ const { db } = this.client;
141
+ let excludeListId = null;
142
+ if (level === "campaign") {
143
+ const row = db
144
+ .prepare(`SELECT exclude_list_id FROM campaign_versions
145
+ WHERE campaign_id = ? ORDER BY id DESC LIMIT 1`)
146
+ .get(id);
147
+ excludeListId = row?.exclude_list_id ?? null;
148
+ }
149
+ else {
150
+ const row = db
151
+ .prepare(`SELECT exclude_list_id FROM action_versions
152
+ WHERE action_id = ? ORDER BY id DESC LIMIT 1`)
153
+ .get(id);
154
+ excludeListId = row?.exclude_list_id ?? null;
155
+ }
156
+ if (excludeListId === null) {
157
+ throw new ExcludeListNotFoundError(level, id);
158
+ }
159
+ // Resolve CPV -> collection_id
160
+ const cpv = db
161
+ .prepare(`SELECT collection_id FROM collection_people_versions WHERE id = ?`)
162
+ .get(excludeListId);
163
+ if (!cpv) {
164
+ throw new ExcludeListNotFoundError(level, id);
165
+ }
166
+ return cpv.collection_id;
167
+ }
168
+ /**
169
+ * Validate campaign/action and resolve the exclude-list collection ID.
170
+ *
171
+ * Shared preamble for {@link getExcludeList}, {@link addToExcludeList},
172
+ * and {@link removeFromExcludeList}.
173
+ *
174
+ * @param campaignId - Campaign ID (verified to exist).
175
+ * @param actionId - If provided, scope to the action-level exclude list.
176
+ * @throws {CampaignNotFoundError} if the campaign does not exist.
177
+ * @throws {ActionNotFoundError} if actionId is provided and not in the campaign.
178
+ * @throws {ExcludeListNotFoundError} if the exclude list chain is not found.
179
+ */
180
+ resolveExcludeListContext(campaignId, actionId) {
181
+ this.verifyCampaignExists(campaignId);
182
+ if (actionId !== undefined) {
183
+ const rows = this.stmtGetCampaignActions.all(campaignId);
184
+ if (!rows.some((a) => a.id === actionId)) {
185
+ throw new ActionNotFoundError(actionId, campaignId);
186
+ }
187
+ }
188
+ const level = actionId !== undefined ? "action" : "campaign";
189
+ const targetId = actionId ?? campaignId;
190
+ const collectionId = this.resolveExcludeListCollectionId(level, targetId);
191
+ return { collectionId, level, targetId };
192
+ }
193
+ /**
194
+ * Verify that a campaign exists.
195
+ *
196
+ * @throws {CampaignNotFoundError} if no campaign exists with the given ID.
197
+ */
198
+ verifyCampaignExists(campaignId) {
199
+ const row = this.stmtGetCampaign.get(campaignId);
200
+ if (!row)
201
+ throw new CampaignNotFoundError(campaignId);
202
+ }
203
+ }
204
+ //# sourceMappingURL=campaign-exclude-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"campaign-exclude-list.js","sourceRoot":"","sources":["../../../src/db/repositories/campaign-exclude-list.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAIpC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,cAAc,CAAC;AAMtB;;;;;;;;;GASG;AACH,MAAM,OAAO,6BAA6B;IAUX;IATZ,eAAe,CAAC;IAChB,sBAAsB,CAAC;IAExC,yEAAyE;IACjE,eAAe,GAGZ,IAAI,CAAC;IAEhB,YAA6B,MAAsB;QAAtB,WAA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OAAO,GAAG,CAAC,aAAa,CAAC;IAC3B,CAAC;IAED;;;;;;;;;;;OAWG;IACK,yBAAyB,CAC/B,UAAkB,EAClB,QAAiB;QAEjB,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;QAEtC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAC1C,UAAU,CACyC,CAAC;YACtD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,QAAQ,CAAC,EAAE,CAAC;gBACzC,MAAM,IAAI,mBAAmB,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;YACtD,CAAC;QACH,CAAC;QAED,MAAM,KAAK,GAAG,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC;QAC7D,MAAM,QAAQ,GAAG,QAAQ,IAAI,UAAU,CAAC;QACxC,MAAM,YAAY,GAAG,IAAI,CAAC,8BAA8B,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAE1E,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IAC3C,CAAC;IAED;;;;OAIG;IACK,oBAAoB,CAAC,UAAkB;QAC7C,MAAM,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QACjD,IAAI,CAAC,GAAG;YAAE,MAAM,IAAI,qBAAqB,CAAC,UAAU,CAAC,CAAC;IACxD,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=campaign-exclude-list.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"campaign-exclude-list.test.d.ts","sourceRoot":"","sources":["../../../src/db/repositories/campaign-exclude-list.test.ts"],"names":[],"mappings":""}