@talkpilot/core-db 1.0.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.
Files changed (410) hide show
  1. package/.cursor/rules/development.mdc +65 -0
  2. package/DEVELOPMENT.md +98 -0
  3. package/README.md +140 -0
  4. package/dist/index.d.ts +7 -0
  5. package/dist/index.d.ts.map +1 -0
  6. package/dist/index.js +29 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/municipal/cities/cities.getters.d.ts +9 -0
  9. package/dist/municipal/cities/cities.getters.d.ts.map +1 -0
  10. package/dist/municipal/cities/cities.getters.js +38 -0
  11. package/dist/municipal/cities/cities.getters.js.map +1 -0
  12. package/dist/municipal/cities/cities.types.d.ts +10 -0
  13. package/dist/municipal/cities/cities.types.d.ts.map +1 -0
  14. package/dist/municipal/cities/cities.types.js +3 -0
  15. package/dist/municipal/cities/cities.types.js.map +1 -0
  16. package/dist/municipal/cities/index.d.ts +3 -0
  17. package/dist/municipal/cities/index.d.ts.map +1 -0
  18. package/dist/municipal/cities/index.js +18 -0
  19. package/dist/municipal/cities/index.js.map +1 -0
  20. package/dist/municipal/departmentsSubjects/departmentsSubjects.getters.d.ts +62 -0
  21. package/dist/municipal/departmentsSubjects/departmentsSubjects.getters.d.ts.map +1 -0
  22. package/dist/municipal/departmentsSubjects/departmentsSubjects.getters.js +180 -0
  23. package/dist/municipal/departmentsSubjects/departmentsSubjects.getters.js.map +1 -0
  24. package/dist/municipal/departmentsSubjects/departmentsSubjects.types.d.ts +69 -0
  25. package/dist/municipal/departmentsSubjects/departmentsSubjects.types.d.ts.map +1 -0
  26. package/dist/municipal/departmentsSubjects/departmentsSubjects.types.js +3 -0
  27. package/dist/municipal/departmentsSubjects/departmentsSubjects.types.js.map +1 -0
  28. package/dist/municipal/departmentsSubjects/index.d.ts +3 -0
  29. package/dist/municipal/departmentsSubjects/index.d.ts.map +1 -0
  30. package/dist/municipal/departmentsSubjects/index.js +18 -0
  31. package/dist/municipal/departmentsSubjects/index.js.map +1 -0
  32. package/dist/municipal/index.d.ts +10 -0
  33. package/dist/municipal/index.d.ts.map +1 -0
  34. package/dist/municipal/index.js +37 -0
  35. package/dist/municipal/index.js.map +1 -0
  36. package/dist/municipal/mongodb-client.d.ts +13 -0
  37. package/dist/municipal/mongodb-client.d.ts.map +1 -0
  38. package/dist/municipal/mongodb-client.js +56 -0
  39. package/dist/municipal/mongodb-client.js.map +1 -0
  40. package/dist/municipal/streets/index.d.ts +3 -0
  41. package/dist/municipal/streets/index.d.ts.map +1 -0
  42. package/dist/municipal/streets/index.js +18 -0
  43. package/dist/municipal/streets/index.js.map +1 -0
  44. package/dist/municipal/streets/streets.getters.d.ts +21 -0
  45. package/dist/municipal/streets/streets.getters.d.ts.map +1 -0
  46. package/dist/municipal/streets/streets.getters.js +85 -0
  47. package/dist/municipal/streets/streets.getters.js.map +1 -0
  48. package/dist/municipal/streets/streets.types.d.ts +16 -0
  49. package/dist/municipal/streets/streets.types.d.ts.map +1 -0
  50. package/dist/municipal/streets/streets.types.js +3 -0
  51. package/dist/municipal/streets/streets.types.js.map +1 -0
  52. package/dist/municipal/tickets/index.d.ts +3 -0
  53. package/dist/municipal/tickets/index.d.ts.map +1 -0
  54. package/dist/municipal/tickets/index.js +18 -0
  55. package/dist/municipal/tickets/index.js.map +1 -0
  56. package/dist/municipal/tickets/tickets.getters.d.ts +44 -0
  57. package/dist/municipal/tickets/tickets.getters.d.ts.map +1 -0
  58. package/dist/municipal/tickets/tickets.getters.js +199 -0
  59. package/dist/municipal/tickets/tickets.getters.js.map +1 -0
  60. package/dist/municipal/tickets/tickets.types.d.ts +35 -0
  61. package/dist/municipal/tickets/tickets.types.d.ts.map +1 -0
  62. package/dist/municipal/tickets/tickets.types.js +3 -0
  63. package/dist/municipal/tickets/tickets.types.js.map +1 -0
  64. package/dist/talkpilot/agents/agents.getters.d.ts +9 -0
  65. package/dist/talkpilot/agents/agents.getters.d.ts.map +1 -0
  66. package/dist/talkpilot/agents/agents.getters.js +34 -0
  67. package/dist/talkpilot/agents/agents.getters.js.map +1 -0
  68. package/dist/talkpilot/agents/agents.types.d.ts +13 -0
  69. package/dist/talkpilot/agents/agents.types.d.ts.map +1 -0
  70. package/dist/talkpilot/agents/agents.types.js +3 -0
  71. package/dist/talkpilot/agents/agents.types.js.map +1 -0
  72. package/dist/talkpilot/agents/index.d.ts +3 -0
  73. package/dist/talkpilot/agents/index.d.ts.map +1 -0
  74. package/dist/talkpilot/agents/index.js +19 -0
  75. package/dist/talkpilot/agents/index.js.map +1 -0
  76. package/dist/talkpilot/calls/calls.getters.d.ts +24 -0
  77. package/dist/talkpilot/calls/calls.getters.d.ts.map +1 -0
  78. package/dist/talkpilot/calls/calls.getters.js +151 -0
  79. package/dist/talkpilot/calls/calls.getters.js.map +1 -0
  80. package/dist/talkpilot/calls/calls.types.d.ts +32 -0
  81. package/dist/talkpilot/calls/calls.types.d.ts.map +1 -0
  82. package/dist/talkpilot/calls/calls.types.js +3 -0
  83. package/dist/talkpilot/calls/calls.types.js.map +1 -0
  84. package/dist/talkpilot/calls/index.d.ts +3 -0
  85. package/dist/talkpilot/calls/index.d.ts.map +1 -0
  86. package/dist/talkpilot/calls/index.js +19 -0
  87. package/dist/talkpilot/calls/index.js.map +1 -0
  88. package/dist/talkpilot/clientAudioBuffers/clientAudioBuffer.getters.d.ts +9 -0
  89. package/dist/talkpilot/clientAudioBuffers/clientAudioBuffer.getters.d.ts.map +1 -0
  90. package/dist/talkpilot/clientAudioBuffers/clientAudioBuffer.getters.js +76 -0
  91. package/dist/talkpilot/clientAudioBuffers/clientAudioBuffer.getters.js.map +1 -0
  92. package/dist/talkpilot/clientAudioBuffers/clientsAudioBuffers.types.d.ts +23 -0
  93. package/dist/talkpilot/clientAudioBuffers/clientsAudioBuffers.types.d.ts.map +1 -0
  94. package/dist/talkpilot/clientAudioBuffers/clientsAudioBuffers.types.js +3 -0
  95. package/dist/talkpilot/clientAudioBuffers/clientsAudioBuffers.types.js.map +1 -0
  96. package/dist/talkpilot/clients/clients.getters.d.ts +5 -0
  97. package/dist/talkpilot/clients/clients.getters.d.ts.map +1 -0
  98. package/dist/talkpilot/clients/clients.getters.js +14 -0
  99. package/dist/talkpilot/clients/clients.getters.js.map +1 -0
  100. package/dist/talkpilot/clients/clients.types.d.ts +12 -0
  101. package/dist/talkpilot/clients/clients.types.d.ts.map +1 -0
  102. package/dist/talkpilot/clients/clients.types.js +3 -0
  103. package/dist/talkpilot/clients/clients.types.js.map +1 -0
  104. package/dist/talkpilot/clients/index.d.ts +3 -0
  105. package/dist/talkpilot/clients/index.d.ts.map +1 -0
  106. package/dist/talkpilot/clients/index.js +18 -0
  107. package/dist/talkpilot/clients/index.js.map +1 -0
  108. package/dist/talkpilot/clientsConfig/clientsConfig.getters.d.ts +7 -0
  109. package/dist/talkpilot/clientsConfig/clientsConfig.getters.d.ts.map +1 -0
  110. package/dist/talkpilot/clientsConfig/clientsConfig.getters.js +21 -0
  111. package/dist/talkpilot/clientsConfig/clientsConfig.getters.js.map +1 -0
  112. package/dist/talkpilot/clientsConfig/clientsConfig.types.d.ts +53 -0
  113. package/dist/talkpilot/clientsConfig/clientsConfig.types.d.ts.map +1 -0
  114. package/dist/talkpilot/clientsConfig/clientsConfig.types.js +3 -0
  115. package/dist/talkpilot/clientsConfig/clientsConfig.types.js.map +1 -0
  116. package/dist/talkpilot/clientsConfig/index.d.ts +3 -0
  117. package/dist/talkpilot/clientsConfig/index.d.ts.map +1 -0
  118. package/dist/talkpilot/clientsConfig/index.js +19 -0
  119. package/dist/talkpilot/clientsConfig/index.js.map +1 -0
  120. package/dist/talkpilot/flows/flows.getter.d.ts +5 -0
  121. package/dist/talkpilot/flows/flows.getter.d.ts.map +1 -0
  122. package/dist/talkpilot/flows/flows.getter.js +13 -0
  123. package/dist/talkpilot/flows/flows.getter.js.map +1 -0
  124. package/dist/talkpilot/flows/flows.schema.d.ts +154 -0
  125. package/dist/talkpilot/flows/flows.schema.d.ts.map +1 -0
  126. package/dist/talkpilot/flows/flows.schema.js +94 -0
  127. package/dist/talkpilot/flows/flows.schema.js.map +1 -0
  128. package/dist/talkpilot/flows/flows.types.d.ts +116 -0
  129. package/dist/talkpilot/flows/flows.types.d.ts.map +1 -0
  130. package/dist/talkpilot/flows/flows.types.js +3 -0
  131. package/dist/talkpilot/flows/flows.types.js.map +1 -0
  132. package/dist/talkpilot/flows/index.d.ts +3 -0
  133. package/dist/talkpilot/flows/index.d.ts.map +1 -0
  134. package/dist/talkpilot/flows/index.js +6 -0
  135. package/dist/talkpilot/flows/index.js.map +1 -0
  136. package/dist/talkpilot/groups/groups.getters.d.ts +8 -0
  137. package/dist/talkpilot/groups/groups.getters.d.ts.map +1 -0
  138. package/dist/talkpilot/groups/groups.getters.js +26 -0
  139. package/dist/talkpilot/groups/groups.getters.js.map +1 -0
  140. package/dist/talkpilot/groups/groups.types.d.ts +26 -0
  141. package/dist/talkpilot/groups/groups.types.d.ts.map +1 -0
  142. package/dist/talkpilot/groups/groups.types.js +3 -0
  143. package/dist/talkpilot/groups/groups.types.js.map +1 -0
  144. package/dist/talkpilot/groups/index.d.ts +3 -0
  145. package/dist/talkpilot/groups/index.d.ts.map +1 -0
  146. package/dist/talkpilot/groups/index.js +19 -0
  147. package/dist/talkpilot/groups/index.js.map +1 -0
  148. package/dist/talkpilot/groups/phone.utils.d.ts +4 -0
  149. package/dist/talkpilot/groups/phone.utils.d.ts.map +1 -0
  150. package/dist/talkpilot/groups/phone.utils.js +42 -0
  151. package/dist/talkpilot/groups/phone.utils.js.map +1 -0
  152. package/dist/talkpilot/index.d.ts +19 -0
  153. package/dist/talkpilot/index.d.ts.map +1 -0
  154. package/dist/talkpilot/index.js +46 -0
  155. package/dist/talkpilot/index.js.map +1 -0
  156. package/dist/talkpilot/leads/index.d.ts +3 -0
  157. package/dist/talkpilot/leads/index.d.ts.map +1 -0
  158. package/dist/talkpilot/leads/index.js +6 -0
  159. package/dist/talkpilot/leads/index.js.map +1 -0
  160. package/dist/talkpilot/leads/leads.getter.d.ts +4 -0
  161. package/dist/talkpilot/leads/leads.getter.d.ts.map +1 -0
  162. package/dist/talkpilot/leads/leads.getter.js +7 -0
  163. package/dist/talkpilot/leads/leads.getter.js.map +1 -0
  164. package/dist/talkpilot/leads/leads.schema.d.ts +50 -0
  165. package/dist/talkpilot/leads/leads.schema.d.ts.map +1 -0
  166. package/dist/talkpilot/leads/leads.schema.js +37 -0
  167. package/dist/talkpilot/leads/leads.schema.js.map +1 -0
  168. package/dist/talkpilot/leads/leads.types.d.ts +18 -0
  169. package/dist/talkpilot/leads/leads.types.d.ts.map +1 -0
  170. package/dist/talkpilot/leads/leads.types.js +3 -0
  171. package/dist/talkpilot/leads/leads.types.js.map +1 -0
  172. package/dist/talkpilot/mongodb-client.d.ts +13 -0
  173. package/dist/talkpilot/mongodb-client.d.ts.map +1 -0
  174. package/dist/talkpilot/mongodb-client.js +71 -0
  175. package/dist/talkpilot/mongodb-client.js.map +1 -0
  176. package/dist/talkpilot/phone_numbers/index.d.ts +3 -0
  177. package/dist/talkpilot/phone_numbers/index.d.ts.map +1 -0
  178. package/dist/talkpilot/phone_numbers/index.js +18 -0
  179. package/dist/talkpilot/phone_numbers/index.js.map +1 -0
  180. package/dist/talkpilot/phone_numbers/phone_numbers.getter.d.ts +8 -0
  181. package/dist/talkpilot/phone_numbers/phone_numbers.getter.d.ts.map +1 -0
  182. package/dist/talkpilot/phone_numbers/phone_numbers.getter.js +44 -0
  183. package/dist/talkpilot/phone_numbers/phone_numbers.getter.js.map +1 -0
  184. package/dist/talkpilot/phone_numbers/phone_numbers.schema.d.ts +29 -0
  185. package/dist/talkpilot/phone_numbers/phone_numbers.schema.d.ts.map +1 -0
  186. package/dist/talkpilot/phone_numbers/phone_numbers.schema.js +18 -0
  187. package/dist/talkpilot/phone_numbers/phone_numbers.schema.js.map +1 -0
  188. package/dist/talkpilot/phone_numbers/phone_numbers.types.d.ts +16 -0
  189. package/dist/talkpilot/phone_numbers/phone_numbers.types.d.ts.map +1 -0
  190. package/dist/talkpilot/phone_numbers/phone_numbers.types.js +3 -0
  191. package/dist/talkpilot/phone_numbers/phone_numbers.types.js.map +1 -0
  192. package/dist/talkpilot/plans/index.d.ts +3 -0
  193. package/dist/talkpilot/plans/index.d.ts.map +1 -0
  194. package/dist/talkpilot/plans/index.js +19 -0
  195. package/dist/talkpilot/plans/index.js.map +1 -0
  196. package/dist/talkpilot/plans/plans.getters.d.ts +10 -0
  197. package/dist/talkpilot/plans/plans.getters.d.ts.map +1 -0
  198. package/dist/talkpilot/plans/plans.getters.js +103 -0
  199. package/dist/talkpilot/plans/plans.getters.js.map +1 -0
  200. package/dist/talkpilot/plans/plans.types.d.ts +53 -0
  201. package/dist/talkpilot/plans/plans.types.d.ts.map +1 -0
  202. package/dist/talkpilot/plans/plans.types.js +29 -0
  203. package/dist/talkpilot/plans/plans.types.js.map +1 -0
  204. package/dist/talkpilot/results/index.d.ts +3 -0
  205. package/dist/talkpilot/results/index.d.ts.map +1 -0
  206. package/dist/talkpilot/results/index.js +6 -0
  207. package/dist/talkpilot/results/index.js.map +1 -0
  208. package/dist/talkpilot/results/results.getter.d.ts +7 -0
  209. package/dist/talkpilot/results/results.getter.d.ts.map +1 -0
  210. package/dist/talkpilot/results/results.getter.js +26 -0
  211. package/dist/talkpilot/results/results.getter.js.map +1 -0
  212. package/dist/talkpilot/results/results.schema.d.ts +35 -0
  213. package/dist/talkpilot/results/results.schema.d.ts.map +1 -0
  214. package/dist/talkpilot/results/results.schema.js +29 -0
  215. package/dist/talkpilot/results/results.schema.js.map +1 -0
  216. package/dist/talkpilot/results/results.types.d.ts +34 -0
  217. package/dist/talkpilot/results/results.types.d.ts.map +1 -0
  218. package/dist/talkpilot/results/results.types.js +3 -0
  219. package/dist/talkpilot/results/results.types.js.map +1 -0
  220. package/dist/talkpilot/sessions/index.d.ts +3 -0
  221. package/dist/talkpilot/sessions/index.d.ts.map +1 -0
  222. package/dist/talkpilot/sessions/index.js +6 -0
  223. package/dist/talkpilot/sessions/index.js.map +1 -0
  224. package/dist/talkpilot/sessions/sessions.getter.d.ts +7 -0
  225. package/dist/talkpilot/sessions/sessions.getter.d.ts.map +1 -0
  226. package/dist/talkpilot/sessions/sessions.getter.js +26 -0
  227. package/dist/talkpilot/sessions/sessions.getter.js.map +1 -0
  228. package/dist/talkpilot/sessions/sessions.schema.d.ts +53 -0
  229. package/dist/talkpilot/sessions/sessions.schema.d.ts.map +1 -0
  230. package/dist/talkpilot/sessions/sessions.schema.js +38 -0
  231. package/dist/talkpilot/sessions/sessions.schema.js.map +1 -0
  232. package/dist/talkpilot/sessions/sessions.types.d.ts +22 -0
  233. package/dist/talkpilot/sessions/sessions.types.d.ts.map +1 -0
  234. package/dist/talkpilot/sessions/sessions.types.js +3 -0
  235. package/dist/talkpilot/sessions/sessions.types.js.map +1 -0
  236. package/dist/talkpilot/subscriptions/index.d.ts +4 -0
  237. package/dist/talkpilot/subscriptions/index.d.ts.map +1 -0
  238. package/dist/talkpilot/subscriptions/index.js +20 -0
  239. package/dist/talkpilot/subscriptions/index.js.map +1 -0
  240. package/dist/talkpilot/subscriptions/subscriptions.getters.d.ts +13 -0
  241. package/dist/talkpilot/subscriptions/subscriptions.getters.d.ts.map +1 -0
  242. package/dist/talkpilot/subscriptions/subscriptions.getters.js +105 -0
  243. package/dist/talkpilot/subscriptions/subscriptions.getters.js.map +1 -0
  244. package/dist/talkpilot/subscriptions/subscriptions.getters.utils.d.ts +8 -0
  245. package/dist/talkpilot/subscriptions/subscriptions.getters.utils.d.ts.map +1 -0
  246. package/dist/talkpilot/subscriptions/subscriptions.getters.utils.js +27 -0
  247. package/dist/talkpilot/subscriptions/subscriptions.getters.utils.js.map +1 -0
  248. package/dist/talkpilot/subscriptions/subscriptions.types.d.ts +50 -0
  249. package/dist/talkpilot/subscriptions/subscriptions.types.d.ts.map +1 -0
  250. package/dist/talkpilot/subscriptions/subscriptions.types.js +14 -0
  251. package/dist/talkpilot/subscriptions/subscriptions.types.js.map +1 -0
  252. package/dist/talkpilot/subscriptions/subscriptions.utils.d.ts +4 -0
  253. package/dist/talkpilot/subscriptions/subscriptions.utils.d.ts.map +1 -0
  254. package/dist/talkpilot/subscriptions/subscriptions.utils.js +20 -0
  255. package/dist/talkpilot/subscriptions/subscriptions.utils.js.map +1 -0
  256. package/dist/test-utils/db-utils.d.ts +4 -0
  257. package/dist/test-utils/db-utils.d.ts.map +1 -0
  258. package/dist/test-utils/db-utils.js +28 -0
  259. package/dist/test-utils/db-utils.js.map +1 -0
  260. package/dist/test-utils/factories/index.d.ts +13 -0
  261. package/dist/test-utils/factories/index.d.ts.map +1 -0
  262. package/dist/test-utils/factories/index.js +29 -0
  263. package/dist/test-utils/factories/index.js.map +1 -0
  264. package/dist/test-utils/factories/municipal/cities.d.ts +5 -0
  265. package/dist/test-utils/factories/municipal/cities.d.ts.map +1 -0
  266. package/dist/test-utils/factories/municipal/cities.js +18 -0
  267. package/dist/test-utils/factories/municipal/cities.js.map +1 -0
  268. package/dist/test-utils/factories/municipal/departmentsSubjects.d.ts +5 -0
  269. package/dist/test-utils/factories/municipal/departmentsSubjects.d.ts.map +1 -0
  270. package/dist/test-utils/factories/municipal/departmentsSubjects.js +27 -0
  271. package/dist/test-utils/factories/municipal/departmentsSubjects.js.map +1 -0
  272. package/dist/test-utils/factories/municipal/streets.d.ts +5 -0
  273. package/dist/test-utils/factories/municipal/streets.d.ts.map +1 -0
  274. package/dist/test-utils/factories/municipal/streets.js +19 -0
  275. package/dist/test-utils/factories/municipal/streets.js.map +1 -0
  276. package/dist/test-utils/factories/municipal/tickets.d.ts +5 -0
  277. package/dist/test-utils/factories/municipal/tickets.d.ts.map +1 -0
  278. package/dist/test-utils/factories/municipal/tickets.js +27 -0
  279. package/dist/test-utils/factories/municipal/tickets.js.map +1 -0
  280. package/dist/test-utils/factories/talkpilot/agents.d.ts +5 -0
  281. package/dist/test-utils/factories/talkpilot/agents.d.ts.map +1 -0
  282. package/dist/test-utils/factories/talkpilot/agents.js +21 -0
  283. package/dist/test-utils/factories/talkpilot/agents.js.map +1 -0
  284. package/dist/test-utils/factories/talkpilot/calls.d.ts +6 -0
  285. package/dist/test-utils/factories/talkpilot/calls.d.ts.map +1 -0
  286. package/dist/test-utils/factories/talkpilot/calls.js +39 -0
  287. package/dist/test-utils/factories/talkpilot/calls.js.map +1 -0
  288. package/dist/test-utils/factories/talkpilot/clientAudioBuffers.d.ts +5 -0
  289. package/dist/test-utils/factories/talkpilot/clientAudioBuffers.d.ts.map +1 -0
  290. package/dist/test-utils/factories/talkpilot/clientAudioBuffers.js +18 -0
  291. package/dist/test-utils/factories/talkpilot/clientAudioBuffers.js.map +1 -0
  292. package/dist/test-utils/factories/talkpilot/clientsConfig.d.ts +5 -0
  293. package/dist/test-utils/factories/talkpilot/clientsConfig.d.ts.map +1 -0
  294. package/dist/test-utils/factories/talkpilot/clientsConfig.js +18 -0
  295. package/dist/test-utils/factories/talkpilot/clientsConfig.js.map +1 -0
  296. package/dist/test-utils/factories/talkpilot/flows.d.ts +14 -0
  297. package/dist/test-utils/factories/talkpilot/flows.d.ts.map +1 -0
  298. package/dist/test-utils/factories/talkpilot/flows.js +33 -0
  299. package/dist/test-utils/factories/talkpilot/flows.js.map +1 -0
  300. package/dist/test-utils/factories/talkpilot/groups.d.ts +6 -0
  301. package/dist/test-utils/factories/talkpilot/groups.d.ts.map +1 -0
  302. package/dist/test-utils/factories/talkpilot/groups.js +34 -0
  303. package/dist/test-utils/factories/talkpilot/groups.js.map +1 -0
  304. package/dist/test-utils/factories/talkpilot/phone_numbers.d.ts +16 -0
  305. package/dist/test-utils/factories/talkpilot/phone_numbers.d.ts.map +1 -0
  306. package/dist/test-utils/factories/talkpilot/phone_numbers.js +20 -0
  307. package/dist/test-utils/factories/talkpilot/phone_numbers.js.map +1 -0
  308. package/dist/test-utils/factories/talkpilot/sessions.d.ts +5 -0
  309. package/dist/test-utils/factories/talkpilot/sessions.d.ts.map +1 -0
  310. package/dist/test-utils/factories/talkpilot/sessions.js +37 -0
  311. package/dist/test-utils/factories/talkpilot/sessions.js.map +1 -0
  312. package/dist/utils/validation.d.ts +7 -0
  313. package/dist/utils/validation.d.ts.map +1 -0
  314. package/dist/utils/validation.js +23 -0
  315. package/dist/utils/validation.js.map +1 -0
  316. package/jest.config.js +22 -0
  317. package/package.json +43 -0
  318. package/src/__tests__/setup.ts +20 -0
  319. package/src/index.ts +13 -0
  320. package/src/municipal/__tests__/validation.spec.ts +50 -0
  321. package/src/municipal/cities/cities.getters.ts +44 -0
  322. package/src/municipal/cities/cities.types.ts +11 -0
  323. package/src/municipal/cities/index.ts +2 -0
  324. package/src/municipal/departmentsSubjects/departmentsSubjects.getters.ts +273 -0
  325. package/src/municipal/departmentsSubjects/departmentsSubjects.types.ts +76 -0
  326. package/src/municipal/departmentsSubjects/index.ts +11 -0
  327. package/src/municipal/index.ts +18 -0
  328. package/src/municipal/mongodb-client.ts +58 -0
  329. package/src/municipal/streets/index.ts +2 -0
  330. package/src/municipal/streets/streets.getters.ts +105 -0
  331. package/src/municipal/streets/streets.types.ts +18 -0
  332. package/src/municipal/tickets/__tests__/tickets.getters.spec.ts +30 -0
  333. package/src/municipal/tickets/index.ts +2 -0
  334. package/src/municipal/tickets/tickets.getters.ts +234 -0
  335. package/src/municipal/tickets/tickets.types.ts +39 -0
  336. package/src/talkpilot/__tests__/db.spec.ts +38 -0
  337. package/src/talkpilot/__tests__/mongodb-client.spec.ts +19 -0
  338. package/src/talkpilot/__tests__/validation.spec.ts +62 -0
  339. package/src/talkpilot/agents/__tests__/agents.getters.spec.ts +29 -0
  340. package/src/talkpilot/agents/agents.getters.ts +34 -0
  341. package/src/talkpilot/agents/agents.types.ts +14 -0
  342. package/src/talkpilot/agents/index.ts +2 -0
  343. package/src/talkpilot/calls/__tests__/calls.spec.ts +56 -0
  344. package/src/talkpilot/calls/calls.getters.ts +134 -0
  345. package/src/talkpilot/calls/calls.types.ts +45 -0
  346. package/src/talkpilot/calls/index.ts +2 -0
  347. package/src/talkpilot/clientAudioBuffers/__tests__/clientAudioBuffer.getters.spec.ts +78 -0
  348. package/src/talkpilot/clientAudioBuffers/clientAudioBuffer.getters.ts +101 -0
  349. package/src/talkpilot/clientAudioBuffers/clientsAudioBuffers.types.ts +25 -0
  350. package/src/talkpilot/clients/clients.getters.ts +11 -0
  351. package/src/talkpilot/clients/clients.types.ts +12 -0
  352. package/src/talkpilot/clients/index.ts +2 -0
  353. package/src/talkpilot/clientsConfig/__tests__/clientsConfig.spec.ts +28 -0
  354. package/src/talkpilot/clientsConfig/clientsConfig.getters.ts +20 -0
  355. package/src/talkpilot/clientsConfig/clientsConfig.types.ts +55 -0
  356. package/src/talkpilot/clientsConfig/index.ts +2 -0
  357. package/src/talkpilot/flows/flows.getter.ts +11 -0
  358. package/src/talkpilot/flows/flows.schema.ts +90 -0
  359. package/src/talkpilot/flows/flows.types.ts +151 -0
  360. package/src/talkpilot/flows/index.ts +2 -0
  361. package/src/talkpilot/groups/__tests__/groups.spec.ts +83 -0
  362. package/src/talkpilot/groups/__tests__/phone.utils.spec.ts +32 -0
  363. package/src/talkpilot/groups/groups.getters.ts +27 -0
  364. package/src/talkpilot/groups/groups.types.ts +29 -0
  365. package/src/talkpilot/groups/index.ts +2 -0
  366. package/src/talkpilot/groups/phone.utils.ts +40 -0
  367. package/src/talkpilot/index.ts +27 -0
  368. package/src/talkpilot/leads/index.ts +2 -0
  369. package/src/talkpilot/leads/leads.getter.ts +5 -0
  370. package/src/talkpilot/leads/leads.schema.ts +33 -0
  371. package/src/talkpilot/leads/leads.types.ts +20 -0
  372. package/src/talkpilot/mongodb-client.ts +78 -0
  373. package/src/talkpilot/phone_numbers/__tests__/phone_numbers.spec.ts +43 -0
  374. package/src/talkpilot/phone_numbers/index.ts +2 -0
  375. package/src/talkpilot/phone_numbers/phone_numbers.getter.ts +47 -0
  376. package/src/talkpilot/phone_numbers/phone_numbers.schema.ts +14 -0
  377. package/src/talkpilot/phone_numbers/phone_numbers.types.ts +15 -0
  378. package/src/talkpilot/plans/index.ts +2 -0
  379. package/src/talkpilot/plans/plans.getters.ts +121 -0
  380. package/src/talkpilot/plans/plans.types.ts +84 -0
  381. package/src/talkpilot/results/index.ts +2 -0
  382. package/src/talkpilot/results/results.getter.ts +26 -0
  383. package/src/talkpilot/results/results.schema.ts +25 -0
  384. package/src/talkpilot/results/results.types.ts +32 -0
  385. package/src/talkpilot/sessions/__tests__/sessions.spec.ts +43 -0
  386. package/src/talkpilot/sessions/index.ts +2 -0
  387. package/src/talkpilot/sessions/sessions.getter.ts +28 -0
  388. package/src/talkpilot/sessions/sessions.schema.ts +34 -0
  389. package/src/talkpilot/sessions/sessions.types.ts +28 -0
  390. package/src/talkpilot/subscriptions/__tests__/subscriptions.getters.utils.spec.ts +42 -0
  391. package/src/talkpilot/subscriptions/index.ts +3 -0
  392. package/src/talkpilot/subscriptions/subscriptions.getters.ts +147 -0
  393. package/src/talkpilot/subscriptions/subscriptions.getters.utils.ts +26 -0
  394. package/src/talkpilot/subscriptions/subscriptions.types.ts +65 -0
  395. package/src/test-utils/db-utils.ts +24 -0
  396. package/src/test-utils/factories/index.ts +12 -0
  397. package/src/test-utils/factories/municipal/cities.ts +16 -0
  398. package/src/test-utils/factories/municipal/departmentsSubjects.ts +29 -0
  399. package/src/test-utils/factories/municipal/streets.ts +17 -0
  400. package/src/test-utils/factories/municipal/tickets.ts +27 -0
  401. package/src/test-utils/factories/talkpilot/agents.ts +19 -0
  402. package/src/test-utils/factories/talkpilot/calls.ts +37 -0
  403. package/src/test-utils/factories/talkpilot/clientAudioBuffers.ts +18 -0
  404. package/src/test-utils/factories/talkpilot/clientsConfig.ts +19 -0
  405. package/src/test-utils/factories/talkpilot/flows.ts +31 -0
  406. package/src/test-utils/factories/talkpilot/groups.ts +33 -0
  407. package/src/test-utils/factories/talkpilot/phone_numbers.ts +20 -0
  408. package/src/test-utils/factories/talkpilot/sessions.ts +35 -0
  409. package/src/utils/validation.ts +23 -0
  410. package/tsconfig.json +27 -0
@@ -0,0 +1,180 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findSubjectByQuery = exports.deleteDepartmentSubjectGuidelines = exports.updateDepartmentSubjectGuidelines = exports.getDepartmentSubjectBySubjectIds = exports.removeDepartmentSubjectCommunication = exports.updateDepartmentSubjectCommunication = exports.addDepartmentSubjectCommunication = exports.removeDepartmentSubjectInstruction = exports.updateDepartmentSubjectInstruction = exports.addDepartmentSubjectInstruction = exports.vectorSearchDepartmentsSubjects = exports.getAllDepartmentsSubjectsByCity = exports.getDepartmentsSubjectsCollection = void 0;
4
+ const index_1 = require("../index");
5
+ const getDepartmentsSubjectsCollection = () => {
6
+ return (0, index_1.getDb)().collection('departmentsSubjects');
7
+ };
8
+ exports.getDepartmentsSubjectsCollection = getDepartmentsSubjectsCollection;
9
+ /**
10
+ * Get all departments subjects for a given city.
11
+ * No DB sort; tree build does not depend on order. Callers that need alphabetical order
12
+ * sort in memory (e.g. sortTreeAlphabetically in full-tree-subjects.service).
13
+ * @param cityName - City name to filter subjects
14
+ * @param withEmbeddings - Whether to include embedding and embedding_model fields (default: false)
15
+ * @returns Array of all department subjects for the city
16
+ */
17
+ const getAllDepartmentsSubjectsByCity = async (cityName, withEmbeddings = false) => {
18
+ const collection = (0, exports.getDepartmentsSubjectsCollection)();
19
+ const query = collection.find({ cityName });
20
+ if (!withEmbeddings) {
21
+ return (await query
22
+ .project({ embedding: 0, embedding_model: 0 })
23
+ .toArray());
24
+ }
25
+ return await query.toArray();
26
+ };
27
+ exports.getAllDepartmentsSubjectsByCity = getAllDepartmentsSubjectsByCity;
28
+ /**
29
+ * Perform vector search on departmentsSubjects collection
30
+ * @param queryVector - The embedding vector to search with
31
+ * @param cityName - City name to filter results
32
+ * @param limit - Maximum number of results (default: 5)
33
+ * @param numCandidates - Number of candidates to consider (default: 800)
34
+ * @returns Array of vector search results
35
+ */
36
+ const vectorSearchDepartmentsSubjects = async (queryVector, cityName, limit = 5, numCandidates = 800) => {
37
+ const collection = (0, exports.getDepartmentsSubjectsCollection)();
38
+ const indexName = 'subjectTreesIndex';
39
+ const results = await collection
40
+ .aggregate([
41
+ {
42
+ $vectorSearch: {
43
+ index: indexName,
44
+ path: 'embedding',
45
+ queryVector,
46
+ numCandidates,
47
+ limit,
48
+ filter: { cityName },
49
+ },
50
+ },
51
+ {
52
+ $project: {
53
+ _id: 0,
54
+ subjectName: 1,
55
+ subject_id: { $toInt: '$subject_id' }, // Convert string to number
56
+ sub_subject_name: 1,
57
+ sub_subject_id: 1,
58
+ descriptions: 1,
59
+ guidelines: 1,
60
+ score: { $meta: 'vectorSearchScore' },
61
+ },
62
+ },
63
+ ])
64
+ .toArray();
65
+ return results;
66
+ };
67
+ exports.vectorSearchDepartmentsSubjects = vectorSearchDepartmentsSubjects;
68
+ const addDepartmentSubjectInstruction = async (filter, instructionText) => {
69
+ const newInstruction = {
70
+ id: Date.now(),
71
+ instruction: instructionText,
72
+ };
73
+ const result = await (0, exports.getDepartmentsSubjectsCollection)().findOneAndUpdate(filter, {
74
+ $push: { instructions: newInstruction },
75
+ $set: { updatedAt: new Date() },
76
+ }, { returnDocument: 'after' });
77
+ return result || null;
78
+ };
79
+ exports.addDepartmentSubjectInstruction = addDepartmentSubjectInstruction;
80
+ const updateDepartmentSubjectInstruction = async (filter, instructionId, newInstructionText) => {
81
+ const result = await (0, exports.getDepartmentsSubjectsCollection)().findOneAndUpdate({ ...filter, 'instructions.id': instructionId }, { $set: { 'instructions.$.instruction': newInstructionText, updatedAt: new Date() } }, { returnDocument: 'after' });
82
+ return result || null;
83
+ };
84
+ exports.updateDepartmentSubjectInstruction = updateDepartmentSubjectInstruction;
85
+ const removeDepartmentSubjectInstruction = async (filter, instructionId) => {
86
+ const result = await (0, exports.getDepartmentsSubjectsCollection)().findOneAndUpdate(filter, {
87
+ $pull: { instructions: { id: instructionId } },
88
+ $set: { updatedAt: new Date() },
89
+ }, { returnDocument: 'after' });
90
+ return result || null;
91
+ };
92
+ exports.removeDepartmentSubjectInstruction = removeDepartmentSubjectInstruction;
93
+ const addDepartmentSubjectCommunication = async (filter, communication) => {
94
+ const newCommunication = {
95
+ id: Date.now(),
96
+ type: communication.type,
97
+ ...(communication.message_text !== undefined && { message_text: communication.message_text }),
98
+ is_deleted: false,
99
+ ...(communication.template_id !== undefined && { template_id: communication.template_id }),
100
+ ...(communication.to !== undefined && { to: communication.to }),
101
+ };
102
+ const result = await (0, exports.getDepartmentsSubjectsCollection)().findOneAndUpdate(filter, {
103
+ $push: { communications: newCommunication },
104
+ $set: { updatedAt: new Date() },
105
+ }, { returnDocument: 'after' });
106
+ return result || null;
107
+ };
108
+ exports.addDepartmentSubjectCommunication = addDepartmentSubjectCommunication;
109
+ const updateDepartmentSubjectCommunication = async (filter, communicationId, updates) => {
110
+ const setFields = { updatedAt: new Date() };
111
+ if (updates.type !== undefined)
112
+ setFields['communications.$.type'] = updates.type;
113
+ if (updates.message_text !== undefined)
114
+ setFields['communications.$.message_text'] = updates.message_text;
115
+ if (updates.template_id !== undefined)
116
+ setFields['communications.$.template_id'] = updates.template_id;
117
+ if (updates.to !== undefined)
118
+ setFields['communications.$.to'] = updates.to;
119
+ if (updates.is_deleted !== undefined)
120
+ setFields['communications.$.is_deleted'] = updates.is_deleted;
121
+ const result = await (0, exports.getDepartmentsSubjectsCollection)().findOneAndUpdate({ ...filter, 'communications.id': communicationId }, { $set: setFields }, { returnDocument: 'after' });
122
+ return result || null;
123
+ };
124
+ exports.updateDepartmentSubjectCommunication = updateDepartmentSubjectCommunication;
125
+ const removeDepartmentSubjectCommunication = async (filter, communicationId) => {
126
+ const result = await (0, exports.getDepartmentsSubjectsCollection)().findOneAndUpdate(filter, {
127
+ $pull: { communications: { id: communicationId } },
128
+ $set: { updatedAt: new Date() },
129
+ }, { returnDocument: 'after' });
130
+ return result || null;
131
+ };
132
+ exports.removeDepartmentSubjectCommunication = removeDepartmentSubjectCommunication;
133
+ /**
134
+ * Get department subject by subject_id, sub_subject_id, and cityName
135
+ * @param subjectId - Subject ID (from event_subject_id)
136
+ * @param subSubjectId - Sub-subject ID (from event_sub_subject_id, optional)
137
+ * @param cityName - City name to filter results
138
+ * @returns DepartmentSubject document or null if not found
139
+ */
140
+ const getDepartmentSubjectBySubjectIds = async (subjectId, subSubjectId, cityName) => {
141
+ const collection = (0, exports.getDepartmentsSubjectsCollection)();
142
+ const filter = {
143
+ subject_id: subjectId,
144
+ cityName,
145
+ };
146
+ if (subSubjectId) {
147
+ filter.sub_subject_id = subSubjectId;
148
+ }
149
+ const result = await collection.findOne(filter);
150
+ return result || null;
151
+ };
152
+ exports.getDepartmentSubjectBySubjectIds = getDepartmentSubjectBySubjectIds;
153
+ /**
154
+ * Update or create guidelines field for a department subject
155
+ * @param filter - MongoDB filter to find the document
156
+ * @param guidelines - Guidelines text to set
157
+ * @returns Updated DepartmentSubject document or null if not found
158
+ */
159
+ const updateDepartmentSubjectGuidelines = async (filter, guidelines) => {
160
+ // $set will create the field if it doesn't exist
161
+ const result = await (0, exports.getDepartmentsSubjectsCollection)().findOneAndUpdate(filter, { $set: { guidelines, updatedAt: new Date() } }, { returnDocument: 'after' });
162
+ return result || null;
163
+ };
164
+ exports.updateDepartmentSubjectGuidelines = updateDepartmentSubjectGuidelines;
165
+ /**
166
+ * Clear guidelines field from a department subject document (sets it to null)
167
+ * @param filter - MongoDB filter to find the document
168
+ * @returns Updated DepartmentSubject document or null if not found
169
+ */
170
+ const deleteDepartmentSubjectGuidelines = async (filter) => {
171
+ // $set clears the field by setting it to null (keeps the field in the document)
172
+ const result = await (0, exports.getDepartmentsSubjectsCollection)().findOneAndUpdate(filter, { $set: { guidelines: null, updatedAt: new Date() } }, { returnDocument: 'after' });
173
+ return result || null;
174
+ };
175
+ exports.deleteDepartmentSubjectGuidelines = deleteDepartmentSubjectGuidelines;
176
+ const findSubjectByQuery = async (query) => {
177
+ return await (0, exports.getDepartmentsSubjectsCollection)().findOne(query);
178
+ };
179
+ exports.findSubjectByQuery = findSubjectByQuery;
180
+ //# sourceMappingURL=departmentsSubjects.getters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"departmentsSubjects.getters.js","sourceRoot":"","sources":["../../../src/municipal/departmentsSubjects/departmentsSubjects.getters.ts"],"names":[],"mappings":";;;AAAA,oCAAoD;AAI7C,MAAM,gCAAgC,GAAG,GAAkC,EAAE;IAClF,OAAO,IAAA,aAAK,GAAE,CAAC,UAAU,CAAoB,qBAAqB,CAAC,CAAC;AACtE,CAAC,CAAC;AAFW,QAAA,gCAAgC,oCAE3C;AAEF;;;;;;;GAOG;AACI,MAAM,+BAA+B,GAAG,KAAK,EAClD,QAAkB,EAClB,iBAA0B,KAAK,EACD,EAAE;IAChC,MAAM,UAAU,GAAG,IAAA,wCAAgC,GAAE,CAAC;IACtD,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IAE5C,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,OAAO,CAAC,MAAM,KAAK;aAChB,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,CAAC;aAC7C,OAAO,EAAE,CAAwB,CAAC;IACvC,CAAC;IAED,OAAO,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;AAC/B,CAAC,CAAC;AAdW,QAAA,+BAA+B,mCAc1C;AAEF;;;;;;;GAOG;AACI,MAAM,+BAA+B,GAAG,KAAK,EAClD,WAAqB,EACrB,QAAkB,EAClB,QAAgB,CAAC,EACjB,gBAAwB,GAAG,EACI,EAAE;IACjC,MAAM,UAAU,GAAG,IAAA,wCAAgC,GAAE,CAAC;IACtD,MAAM,SAAS,GAAG,mBAAmB,CAAC;IAEtC,MAAM,OAAO,GAAG,MAAM,UAAU;SAC7B,SAAS,CAAqB;QAC7B;YACE,aAAa,EAAE;gBACb,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,WAAW;gBACjB,WAAW;gBACX,aAAa;gBAC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AAEF;;;;GAIG;AACI,MAAM,iCAAiC,GAAG,KAAK,EACpD,MAAiC,EACE,EAAE;IACrC,gFAAgF;IAChF,MAAM,MAAM,GAAG,MAAM,IAAA,wCAAgC,GAAE,CAAC,gBAAgB,CACtE,MAAM,EACN,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,EAAE,EACrD,EAAE,cAAc,EAAE,OAAO,EAAE,CAC5B,CAAC;IACF,OAAO,MAAM,IAAI,IAAI,CAAC;AACxB,CAAC,CAAC;AAVW,QAAA,iCAAiC,qCAU5C;AAEK,MAAM,kBAAkB,GAAG,KAAK,EAAE,KAAiC,EAAE,EAAE;IAC5E,OAAO,MAAM,IAAA,wCAAgC,GAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC,CAAC;AAFW,QAAA,kBAAkB,sBAE7B"}
@@ -0,0 +1,69 @@
1
+ import { ObjectId, WithId } from 'mongodb';
2
+ import { Request } from 'express';
3
+ import { ClientConfigDoc, Products } from '../../talkpilot/clientsConfig/clientsConfig.types';
4
+ export type DepartmentSubject = {
5
+ _id: ObjectId;
6
+ createdAt: Date;
7
+ updatedAt: Date;
8
+ subjectName: string;
9
+ subject_id: string;
10
+ sub_subject_name: string;
11
+ sub_subject_id: string;
12
+ sub_subject_name2?: string;
13
+ sub_subject_id2?: string;
14
+ descriptions: string[];
15
+ embedding_text?: string;
16
+ embedding?: number[];
17
+ embedding_model?: string;
18
+ embedding_dims?: number;
19
+ cityName: CityName;
20
+ guidelines?: string | null;
21
+ instructions?: Instruction[];
22
+ communications?: Communication[];
23
+ sla?: number;
24
+ };
25
+ export interface Instruction {
26
+ id: number;
27
+ instruction: string;
28
+ }
29
+ export interface Communication {
30
+ id: number;
31
+ type: CommunicationType;
32
+ message_text?: string;
33
+ template_id?: string;
34
+ to?: string;
35
+ is_deleted?: boolean;
36
+ }
37
+ export type DepartmentSubjectDoc = WithId<DepartmentSubject>;
38
+ /**
39
+ * Vector search result from MongoDB
40
+ */
41
+ export type VectorSearchResult = {
42
+ subjectName: string;
43
+ subject_id: number;
44
+ sub_subject_id: string;
45
+ sub_subject_id2?: string | null;
46
+ sub_subject_name: string;
47
+ sub_subject_name2?: string | null;
48
+ descriptions?: string[];
49
+ guidelines?: string | null;
50
+ instructions?: string | null;
51
+ score?: number;
52
+ };
53
+ /**
54
+ * City name type for municipal data
55
+ */
56
+ export type CityName = 'ashdod' | 'maltar' | 'billit' | 'hashkelon' | 'eilat' | 'tests' | string;
57
+ export type CommunicationType = 'free_text_sms' | 'upload_url_sms';
58
+ /**
59
+ * Extended Express Request type with client configuration
60
+ */
61
+ export type RequestWithClientConfig = Request & {
62
+ uid: string;
63
+ clientConfig: ClientConfigDoc<Products>;
64
+ isGuest: boolean;
65
+ claims: Record<string, unknown>;
66
+ crmName?: string;
67
+ callSid?: string;
68
+ };
69
+ //# sourceMappingURL=departmentsSubjects.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"departmentsSubjects.types.d.ts","sourceRoot":"","sources":["../../../src/municipal/departmentsSubjects/departmentsSubjects.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,mDAAmD,CAAC;AAE9F,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,QAAQ,CAAC;IACd,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACz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CAChB,CAAC;AAEF;;GAEG;AAEH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AACjG,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=departmentsSubjects.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"departmentsSubjects.types.js","sourceRoot":"","sources":["../../../src/municipal/departmentsSubjects/departmentsSubjects.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from './departmentsSubjects.getters';
2
+ export type { DepartmentSubject, DepartmentSubjectDoc, VectorSearchResult, CityName, RequestWithClientConfig, Communication, Instruction, } from './departmentsSubjects.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/municipal/departmentsSubjects/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,YAAY,EACV,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,EACR,uBAAuB,EACvB,aAAa,EACb,WAAW,GACZ,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./departmentsSubjects.getters"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/municipal/departmentsSubjects/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA8C"}
@@ -0,0 +1,10 @@
1
+ import { Db, ObjectId as MongoObjectId } from 'mongodb';
2
+ export * from './cities';
3
+ export * from './streets';
4
+ export * from './departmentsSubjects';
5
+ export * from './tickets';
6
+ export { municipalDataMongodbClient } from './mongodb-client';
7
+ export declare const setDb: (d: Db) => void;
8
+ export declare const getDb: () => Db;
9
+ export declare const ObjectId: typeof MongoObjectId;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/municipal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;AAExD,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAG9D,eAAO,MAAM,KAAK,GAAI,GAAG,EAAE,SAE1B,CAAC;AACF,eAAO,MAAM,KAAK,QAAO,EAGxB,CAAC;AAEF,eAAO,MAAM,QAAQ,sBAAgB,CAAC"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.ObjectId = exports.getDb = exports.setDb = exports.municipalDataMongodbClient = void 0;
18
+ const mongodb_1 = require("mongodb");
19
+ __exportStar(require("./cities"), exports);
20
+ __exportStar(require("./streets"), exports);
21
+ __exportStar(require("./departmentsSubjects"), exports);
22
+ __exportStar(require("./tickets"), exports);
23
+ var mongodb_client_1 = require("./mongodb-client");
24
+ Object.defineProperty(exports, "municipalDataMongodbClient", { enumerable: true, get: function () { return mongodb_client_1.municipalDataMongodbClient; } });
25
+ let db;
26
+ const setDb = (d) => {
27
+ db = d;
28
+ };
29
+ exports.setDb = setDb;
30
+ const getDb = () => {
31
+ if (!db)
32
+ throw new Error('Municipal Data DB not initialised');
33
+ return db;
34
+ };
35
+ exports.getDb = getDb;
36
+ exports.ObjectId = mongodb_1.ObjectId;
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/municipal/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qCAAwD;AAExD,2CAAyB;AACzB,4CAA0B;AAC1B,wDAAsC;AACtC,4CAA0B;AAC1B,mDAA8D;AAArD,4HAAA,0BAA0B,OAAA;AAEnC,IAAI,EAAM,CAAC;AACJ,MAAM,KAAK,GAAG,CAAC,CAAK,EAAE,EAAE;IAC7B,EAAE,GAAG,CAAC,CAAC;AACT,CAAC,CAAC;AAFW,QAAA,KAAK,SAEhB;AACK,MAAM,KAAK,GAAG,GAAO,EAAE;IAC5B,IAAI,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;IAC9D,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAHW,QAAA,KAAK,SAGhB;AAEW,QAAA,QAAQ,GAAG,kBAAa,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Db } from 'mongodb';
2
+ declare class MunicipalDataMongoDBClient {
3
+ private client;
4
+ private db;
5
+ private readonly defaultDbName;
6
+ connect(uri?: string, dbName?: string): Promise<void>;
7
+ disconnect(): Promise<void>;
8
+ getDb(): Db;
9
+ isConnected(): boolean;
10
+ }
11
+ export declare const municipalDataMongodbClient: MunicipalDataMongoDBClient;
12
+ export {};
13
+ //# sourceMappingURL=mongodb-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mongodb-client.d.ts","sourceRoot":"","sources":["../../src/municipal/mongodb-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,EAAE,EAAE,MAAM,SAAS,CAAC;AAI1C,cAAM,0BAA0B;IAC9B,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,EAAE,CAAmB;IAC7B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAoB;IAE5C,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAsBrD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAcjC,KAAK,IAAI,EAAE;IAOX,WAAW,IAAI,OAAO;CAGvB;AAED,eAAO,MAAM,0BAA0B,4BAAmC,CAAC"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.municipalDataMongodbClient = void 0;
4
+ const mongodb_1 = require("mongodb");
5
+ const index_1 = require("./index");
6
+ const validation_1 = require("../utils/validation");
7
+ class MunicipalDataMongoDBClient {
8
+ client = null;
9
+ db = null;
10
+ defaultDbName = 'municipal-data';
11
+ async connect(uri, dbName) {
12
+ if (this.client) {
13
+ return;
14
+ }
15
+ const mongodbUri = uri || process.env.MONGO_URI || process.env.MONGODB_URI;
16
+ (0, validation_1.validateConfig)('MONGO_URI', mongodbUri);
17
+ (0, validation_1.validateMongoUri)(mongodbUri);
18
+ try {
19
+ this.client = new mongodb_1.MongoClient(mongodbUri);
20
+ await this.client.connect();
21
+ const targetDbName = dbName || this.defaultDbName;
22
+ this.db = this.client.db(targetDbName);
23
+ (0, index_1.setDb)(this.db);
24
+ console.info(`[core-db] Municipal MongoDB connected: ${targetDbName}`);
25
+ }
26
+ catch (error) {
27
+ console.error('[core-db] Municipal connection failed', error);
28
+ throw error;
29
+ }
30
+ }
31
+ async disconnect() {
32
+ if (this.client) {
33
+ try {
34
+ await this.client.close();
35
+ this.client = null;
36
+ this.db = null;
37
+ console.info('Municipal Data MongoDB disconnected successfully');
38
+ }
39
+ catch (error) {
40
+ console.error('Error disconnecting from Municipal Data MongoDB', error);
41
+ throw error;
42
+ }
43
+ }
44
+ }
45
+ getDb() {
46
+ if (!this.db) {
47
+ throw new Error('Municipal Data database not initialized. Call connect() first.');
48
+ }
49
+ return this.db;
50
+ }
51
+ isConnected() {
52
+ return this.client !== null && this.client !== undefined;
53
+ }
54
+ }
55
+ exports.municipalDataMongodbClient = new MunicipalDataMongoDBClient();
56
+ //# sourceMappingURL=mongodb-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mongodb-client.js","sourceRoot":"","sources":["../../src/municipal/mongodb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AAC;gBACnB,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC;gBACf,OAAO,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC;YACnE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,iDAAiD,EAAE,KAAc,CAAC,CAAC;gBACjF,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC;IAED,KAAK;QACH,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;QACpF,CAAC;QACD,OAAO,IAAI,CAAC,EAAE,CAAC;IACjB,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,MAAM,KAAK,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC;IAC3D,CAAC;CACF;AAEY,QAAA,0BAA0B,GAAG,IAAI,0BAA0B,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './streets.getters';
2
+ export type { Street, StreetDoc, StreetHint } from './streets.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/municipal/streets/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./streets.getters"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/municipal/streets/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC"}
@@ -0,0 +1,21 @@
1
+ import { CityName, Street } from '../index';
2
+ import type { StreetHint } from './streets.types';
3
+ import { Collection, Filter, ObjectId as MongoObjectId } from 'mongodb';
4
+ export declare const getStreetsCollection: () => Collection<Street>;
5
+ export declare const findStreets: (filter?: Filter<Street>) => Promise<Street[]>;
6
+ export declare const getStreetById: (streetId: string) => Promise<Street | null>;
7
+ export declare const getStreetsByCityName: (cityName: CityName) => Promise<Street[]>;
8
+ export declare const getStreetByStreetId: (streetId: string) => Promise<Street | null>;
9
+ /** Get street by business id and city. Use this when the client's city is known so the same id in another city is not returned. */
10
+ export declare const getStreetByStreetIdAndCity: (streetId: string, cityName: CityName) => Promise<Street | null>;
11
+ export declare const createStreet: (streetData: Omit<Street, "_id" | "createdAt" | "updatedAt">) => Promise<MongoObjectId>;
12
+ export declare const updateStreet: (streetId: string, data: Partial<Omit<Street, "_id" | "createdAt" | "updatedAt">>) => Promise<Street | null>;
13
+ /**
14
+ * Add or update a street hint on an already-fetched street.
15
+ * Only place that creates a new hint id (Date.getTime().toString()). Returns null if hint.id provided but not found, or text empty.
16
+ */
17
+ export declare const upsertStreetHintOnStreet: (street: Street, hint: Partial<StreetHint> & Pick<StreetHint, "text">) => Promise<Street | null>;
18
+ /** Remove a hint from a street. streetId is the street business id (e.g. "703"). Updates document updatedAt. */
19
+ export declare const deleteStreetHint: (streetId: string, hintId: string) => Promise<Street | null>;
20
+ export declare const deleteStreet: (streetId: string) => Promise<boolean>;
21
+ //# sourceMappingURL=streets.getters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"streets.getters.d.ts","sourceRoot":"","sources":["../../../src/municipal/streets/streets.getters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAmB,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;AAExE,eAAO,MAAM,oBAAoB,QAAO,UAAU,CAAC,MAAM,CAExD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAU,SAAQ,MAAM,CAAC,MAAM,CAAM,KAAG,OAAO,CAAC,MAAM,EAAE,CAE/E,CAAC;AAEF,eAAO,MAAM,aAAa,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAG3E,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAU,UAAU,QAAQ,KAAG,OAAO,CAAC,MAAM,EAAE,CAE/E,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAGjF,CAAC;AAEF,mIAAmI;AACnI,eAAO,MAAM,0BAA0B,GACrC,UAAU,MAAM,EAChB,UAAU,QAAQ,KACjB,OAAO,CAAC,MAAM,GAAG,IAAI,CAGvB,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,YAAY,IAAI,CAAC,MAAM,EAAE,KAAK,GAAG,WAAW,GAAG,WAAW,CAAC,KAC1D,OAAO,CAAC,aAAa,CAQvB,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,UAAU,MAAM,EAChB,MAAM,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,GAAG,WAAW,GAAG,WAAW,CAAC,CAAC,KAC7D,OAAO,CAAC,MAAM,GAAG,IAAI,CAOvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GACnC,QAAQ,MAAM,EACd,MAAM,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,KACnD,OAAO,CAAC,MAAM,GAAG,IAAI,CAiBvB,CAAC;AAEF,gHAAgH;AAChH,eAAO,MAAM,gBAAgB,GAC3B,UAAU,MAAM,EAChB,QAAQ,MAAM,KACb,OAAO,CAAC,MAAM,GAAG,IAAI,CAUvB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAU,UAAU,MAAM,KAAG,OAAO,CAAC,OAAO,CAGpE,CAAC"}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteStreet = exports.deleteStreetHint = exports.upsertStreetHintOnStreet = exports.updateStreet = exports.createStreet = exports.getStreetByStreetIdAndCity = exports.getStreetByStreetId = exports.getStreetsByCityName = exports.getStreetById = exports.findStreets = exports.getStreetsCollection = void 0;
4
+ const index_1 = require("../index");
5
+ const getStreetsCollection = () => {
6
+ return (0, index_1.getDb)().collection('streets');
7
+ };
8
+ exports.getStreetsCollection = getStreetsCollection;
9
+ const findStreets = async (filter = {}) => {
10
+ return await (0, exports.getStreetsCollection)().find(filter).toArray();
11
+ };
12
+ exports.findStreets = findStreets;
13
+ const getStreetById = async (streetId) => {
14
+ const street = await (0, exports.getStreetsCollection)().findOne({ _id: new index_1.ObjectId(streetId) });
15
+ return street ? street : null;
16
+ };
17
+ exports.getStreetById = getStreetById;
18
+ const getStreetsByCityName = async (cityName) => {
19
+ return await (0, exports.getStreetsCollection)().find({ cityName }).sort({ name: 1 }).toArray();
20
+ };
21
+ exports.getStreetsByCityName = getStreetsByCityName;
22
+ const getStreetByStreetId = async (streetId) => {
23
+ const street = await (0, exports.getStreetsCollection)().findOne({ id: streetId });
24
+ return street ? street : null;
25
+ };
26
+ exports.getStreetByStreetId = getStreetByStreetId;
27
+ /** Get street by business id and city. Use this when the client's city is known so the same id in another city is not returned. */
28
+ const getStreetByStreetIdAndCity = async (streetId, cityName) => {
29
+ const street = await (0, exports.getStreetsCollection)().findOne({ id: streetId, cityName });
30
+ return street ? street : null;
31
+ };
32
+ exports.getStreetByStreetIdAndCity = getStreetByStreetIdAndCity;
33
+ const createStreet = async (streetData) => {
34
+ const street = {
35
+ ...streetData,
36
+ createdAt: new Date(),
37
+ updatedAt: new Date(),
38
+ };
39
+ const { insertedId } = await (0, exports.getStreetsCollection)().insertOne(street);
40
+ return insertedId;
41
+ };
42
+ exports.createStreet = createStreet;
43
+ const updateStreet = async (streetId, data) => {
44
+ const result = await (0, exports.getStreetsCollection)().findOneAndUpdate({ _id: new index_1.ObjectId(streetId) }, { $set: { ...data, updatedAt: new Date() } }, { returnDocument: 'after' });
45
+ return result || null;
46
+ };
47
+ exports.updateStreet = updateStreet;
48
+ /**
49
+ * Add or update a street hint on an already-fetched street.
50
+ * Only place that creates a new hint id (Date.getTime().toString()). Returns null if hint.id provided but not found, or text empty.
51
+ */
52
+ const upsertStreetHintOnStreet = async (street, hint) => {
53
+ const text = hint.text.trim();
54
+ if (!text)
55
+ return null;
56
+ const hints = street.hints || [];
57
+ let updatedHints;
58
+ if (hint.id != null && hint.id !== '') {
59
+ const hintIndex = hints.findIndex((h) => String(h.id) === String(hint.id));
60
+ if (hintIndex === -1)
61
+ return null;
62
+ updatedHints = [...hints];
63
+ updatedHints[hintIndex] = { id: String(hint.id), text };
64
+ }
65
+ else {
66
+ updatedHints = [...hints, { id: new Date().getTime().toString(), text }];
67
+ }
68
+ return (0, exports.updateStreet)(street._id.toString(), { hints: updatedHints });
69
+ };
70
+ exports.upsertStreetHintOnStreet = upsertStreetHintOnStreet;
71
+ /** Remove a hint from a street. streetId is the street business id (e.g. "703"). Updates document updatedAt. */
72
+ const deleteStreetHint = async (streetId, hintId) => {
73
+ const result = await (0, exports.getStreetsCollection)().findOneAndUpdate({ id: streetId }, { $pull: { hints: { id: hintId } }, $set: { updatedAt: new Date() } }, { returnDocument: 'after' });
74
+ if (result) {
75
+ console.info('Street hint deleted', { streetId, hintId });
76
+ }
77
+ return result || null;
78
+ };
79
+ exports.deleteStreetHint = deleteStreetHint;
80
+ const deleteStreet = async (streetId) => {
81
+ const result = await (0, exports.getStreetsCollection)().deleteOne({ _id: new index_1.ObjectId(streetId) });
82
+ return result.deletedCount > 0;
83
+ };
84
+ exports.deleteStreet = deleteStreet;
85
+ //# sourceMappingURL=streets.getters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"streets.getters.js","sourceRoot":"","sources":["../../../src/municipal/streets/streets.getters.ts"],"names":[],"mappings":";;;AAAA,oCAA6D;AAItD,MAAM,oBAAoB,GAAG,GAAuB,EAAE;IAC3D,OAAO,IAAA,aAAK,GAAE,CAAC,UAAU,CAAS,SAAS,CAAC,CAAC;AAC/C,CAAC,CAAC;AAFW,QAAA,oBAAoB,wBAE/B;AAEK,MAAM,WAAW,GAAG,KAAK,EAAE,SAAyB,EAAE,EAAqB,EAAE;IAClF,OAAO,MAAM,IAAA,4BAAoB,GAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC;AAC7D,CAAC,CAAC;AAFW,QAAA,WAAW,eAEtB;AAEK,MAAM,aAAa,GAAG,KAAK,EAAE,QAAgB,EAA0B,EAAE;IAC9E,MAAM,MAAM,GAAG,MAAM,IAAA,4BAAoB,GAAE,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,gBAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACrF,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AAChC,CAAC,CAAC;AAHW,QAAA,aAAa,iBAGxB;AAEK,MAAM,oBAAoB,GAAG,KAAK,EAAE,QAAkB,EAAqB,EAAE;IAClF,OAAO,MAAM,IAAA,4BAAoB,GAAE,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC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AC3E,CAAC;IAED,OAAO,IAAA,oBAAY,EAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;AACtE,CAAC,CAAC;AApBW,QAAA,wBAAwB,4BAoBnC;AAEF,gHAAgH;AACzG,MAAM,gBAAgB,GAAG,KAAK,EACnC,QAAgB,EAChB,MAAc,EACU,EAAE;IAC1B,MAAM,MAAM,GAAG,MAAM,IAAA,4BAAoB,GAAE,CAAC,gBAAgB,CAC1D,EAAE,EAAE,EAAE,QAAQ,EAAE,EAChB,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,EAAE,EACrE,EAAE,cAAc,EAAE,OAAO,EAAE,CAC5B,CAAC;IACF,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,MAAM,IAAI,IAAI,CAAC;AACxB,CAAC,CAAC;AAbW,QAAA,gBAAgB,oBAa3B;AAEK,MAAM,YAAY,GAAG,KAAK,EAAE,QAAgB,EAAoB,EAAE;IACvE,MAAM,MAAM,GAAG,MAAM,IAAA,4BAAoB,GAAE,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,IAAI,gBAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvF,OAAO,MAAM,CAAC,YAAY,GAAG,CAAC,CAAC;AACjC,CAAC,CAAC;AAHW,QAAA,YAAY,gBAGvB"}
@@ -0,0 +1,16 @@
1
+ import { ObjectId, WithId } from 'mongodb';
2
+ export type StreetHint = {
3
+ id: string;
4
+ text: string;
5
+ };
6
+ export type Street = {
7
+ _id: ObjectId;
8
+ createdAt: Date;
9
+ updatedAt: Date;
10
+ id: string;
11
+ name: string;
12
+ cityName: string;
13
+ hints?: StreetHint[];
14
+ };
15
+ export type StreetDoc = WithId<Street>;
16
+ //# sourceMappingURL=streets.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"streets.types.d.ts","sourceRoot":"","sources":["../../../src/municipal/streets/streets.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB,GAAG,EAAE,QAAQ,CAAC;IACd,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=streets.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"streets.types.js","sourceRoot":"","sources":["../../../src/municipal/streets/streets.types.ts"],"names":[],"mappings":""}