@talkpilot/core-db 1.1.8 → 1.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/connection.d.ts +1 -1
- package/dist/connection.d.ts.map +1 -1
- package/dist/connection.js +21 -24
- package/dist/connection.js.map +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/municipal/cities/cities.getters.d.ts +2 -2
- package/dist/municipal/cities/cities.getters.d.ts.map +1 -1
- package/dist/municipal/cities/cities.getters.js +8 -4
- package/dist/municipal/cities/cities.getters.js.map +1 -1
- package/dist/municipal/cities/cities.types.d.ts +1 -1
- package/dist/municipal/cities/index.d.ts +2 -2
- package/dist/municipal/departmentsSubjects/departmentsSubjects.getters.d.ts +3 -3
- package/dist/municipal/departmentsSubjects/departmentsSubjects.getters.d.ts.map +1 -1
- package/dist/municipal/departmentsSubjects/departmentsSubjects.getters.js +30 -22
- package/dist/municipal/departmentsSubjects/departmentsSubjects.getters.js.map +1 -1
- package/dist/municipal/departmentsSubjects/departmentsSubjects.types.d.ts +4 -4
- package/dist/municipal/departmentsSubjects/departmentsSubjects.types.d.ts.map +1 -1
- package/dist/municipal/departmentsSubjects/index.d.ts +2 -2
- package/dist/municipal/index.d.ts +8 -8
- package/dist/municipal/index.d.ts.map +1 -1
- package/dist/municipal/index.js +1 -1
- package/dist/municipal/mongodb-client.d.ts +1 -1
- package/dist/municipal/mongodb-client.d.ts.map +1 -1
- package/dist/municipal/mongodb-client.js +7 -7
- package/dist/municipal/mongodb-client.js.map +1 -1
- package/dist/municipal/streets/index.d.ts +2 -2
- package/dist/municipal/streets/streets.getters.d.ts +3 -3
- package/dist/municipal/streets/streets.getters.d.ts.map +1 -1
- package/dist/municipal/streets/streets.getters.js +19 -9
- package/dist/municipal/streets/streets.getters.js.map +1 -1
- package/dist/municipal/streets/streets.types.d.ts +1 -1
- package/dist/municipal/systemInstructions/index.d.ts +3 -3
- package/dist/municipal/systemInstructions/index.d.ts.map +1 -1
- package/dist/municipal/systemInstructions/instructions.getters.d.ts +3 -3
- package/dist/municipal/systemInstructions/instructions.getters.d.ts.map +1 -1
- package/dist/municipal/systemInstructions/instructions.getters.js +10 -4
- package/dist/municipal/systemInstructions/instructions.getters.js.map +1 -1
- package/dist/municipal/systemInstructions/instructions.setters.d.ts +2 -2
- package/dist/municipal/systemInstructions/instructions.setters.d.ts.map +1 -1
- package/dist/municipal/systemInstructions/instructions.setters.js +13 -8
- package/dist/municipal/systemInstructions/instructions.setters.js.map +1 -1
- package/dist/municipal/systemInstructions/instructions.types.d.ts +3 -3
- package/dist/municipal/systemInstructions/instructions.types.d.ts.map +1 -1
- package/dist/municipal/systemInstructions/instructions.types.js +6 -6
- package/dist/municipal/tickets/index.d.ts +2 -2
- package/dist/municipal/tickets/tickets.getters.d.ts +3 -3
- package/dist/municipal/tickets/tickets.getters.d.ts.map +1 -1
- package/dist/municipal/tickets/tickets.getters.js +50 -29
- package/dist/municipal/tickets/tickets.getters.js.map +1 -1
- package/dist/municipal/tickets/tickets.types.d.ts +1 -1
- package/dist/municipal/tickets/tickets.types.d.ts.map +1 -1
- package/dist/municipal/utils/types.d.ts +1 -1
- package/dist/municipal/utils/types.d.ts.map +1 -1
- package/dist/talkpilot/agents/agents.getters.d.ts +1 -1
- package/dist/talkpilot/agents/agents.getters.js +2 -2
- package/dist/talkpilot/agents/agents.types.d.ts +2 -2
- package/dist/talkpilot/agents/index.d.ts +2 -2
- package/dist/talkpilot/backgroundToolResults/backgroundToolResults.getters.d.ts +2 -2
- package/dist/talkpilot/backgroundToolResults/backgroundToolResults.getters.d.ts.map +1 -1
- package/dist/talkpilot/backgroundToolResults/backgroundToolResults.getters.js +1 -1
- package/dist/talkpilot/backgroundToolResults/backgroundToolResults.getters.js.map +1 -1
- package/dist/talkpilot/backgroundToolResults/backgroundToolResults.types.d.ts +2 -2
- package/dist/talkpilot/backgroundToolResults/index.d.ts +2 -2
- package/dist/talkpilot/calls/calls.getters.d.ts +4 -3
- package/dist/talkpilot/calls/calls.getters.d.ts.map +1 -1
- package/dist/talkpilot/calls/calls.getters.js +24 -16
- package/dist/talkpilot/calls/calls.getters.js.map +1 -1
- package/dist/talkpilot/calls/calls.types.d.ts +26 -3
- package/dist/talkpilot/calls/calls.types.d.ts.map +1 -1
- package/dist/talkpilot/calls/calls.types.js +2 -2
- package/dist/talkpilot/calls/index.d.ts +2 -2
- package/dist/talkpilot/clientAudioBuffers/clientAudioBuffer.getters.d.ts +2 -2
- package/dist/talkpilot/clientAudioBuffers/clientAudioBuffer.getters.d.ts.map +1 -1
- package/dist/talkpilot/clientAudioBuffers/clientAudioBuffer.getters.js +2 -2
- package/dist/talkpilot/clientAudioBuffers/clientAudioBuffer.getters.js.map +1 -1
- package/dist/talkpilot/clientAudioBuffers/clientsAudioBuffers.types.d.ts +2 -2
- package/dist/talkpilot/clientAudioBuffers/index.d.ts +2 -2
- package/dist/talkpilot/clients/clients.getters.d.ts +2 -2
- package/dist/talkpilot/clients/clients.getters.d.ts.map +1 -1
- package/dist/talkpilot/clients/clients.getters.js +5 -2
- package/dist/talkpilot/clients/clients.getters.js.map +1 -1
- package/dist/talkpilot/clients/clients.types.d.ts +1 -1
- package/dist/talkpilot/clients/index.d.ts +2 -2
- package/dist/talkpilot/clientsConfig/clientsConfig.getters.d.ts +2 -2
- package/dist/talkpilot/clientsConfig/clientsConfig.getters.d.ts.map +1 -1
- package/dist/talkpilot/clientsConfig/clientsConfig.getters.js +1 -1
- package/dist/talkpilot/clientsConfig/clientsConfig.getters.js.map +1 -1
- package/dist/talkpilot/clientsConfig/clientsConfig.types.d.ts +3 -3
- package/dist/talkpilot/clientsConfig/clientsConfig.types.d.ts.map +1 -1
- package/dist/talkpilot/clientsConfig/index.d.ts +2 -2
- package/dist/talkpilot/flows/flows.getter.d.ts +2 -2
- package/dist/talkpilot/flows/flows.getter.d.ts.map +1 -1
- package/dist/talkpilot/flows/flows.getter.js +1 -1
- package/dist/talkpilot/flows/flows.getter.js.map +1 -1
- package/dist/talkpilot/flows/flows.schema.d.ts +0 -3
- package/dist/talkpilot/flows/flows.schema.d.ts.map +1 -1
- package/dist/talkpilot/flows/flows.schema.js +87 -80
- package/dist/talkpilot/flows/flows.schema.js.map +1 -1
- package/dist/talkpilot/flows/flows.types.d.ts +16 -17
- package/dist/talkpilot/flows/flows.types.d.ts.map +1 -1
- package/dist/talkpilot/flows/index.d.ts +2 -2
- package/dist/talkpilot/groups/groups.getters.d.ts +2 -2
- package/dist/talkpilot/groups/groups.getters.d.ts.map +1 -1
- package/dist/talkpilot/groups/groups.getters.js +2 -2
- package/dist/talkpilot/groups/groups.getters.js.map +1 -1
- package/dist/talkpilot/groups/groups.types.d.ts +1 -1
- package/dist/talkpilot/groups/index.d.ts +3 -3
- package/dist/talkpilot/groups/phone.utils.d.ts +1 -1
- package/dist/talkpilot/groups/phone.utils.d.ts.map +1 -1
- package/dist/talkpilot/groups/phone.utils.js +2 -2
- package/dist/talkpilot/groups/phone.utils.js.map +1 -1
- package/dist/talkpilot/index.d.ts +16 -16
- package/dist/talkpilot/index.js +1 -1
- package/dist/talkpilot/leads/index.d.ts +2 -2
- package/dist/talkpilot/leads/leads.getter.d.ts +2 -2
- package/dist/talkpilot/leads/leads.getter.d.ts.map +1 -1
- package/dist/talkpilot/leads/leads.getter.js +1 -1
- package/dist/talkpilot/leads/leads.getter.js.map +1 -1
- package/dist/talkpilot/leads/leads.schema.js +16 -16
- package/dist/talkpilot/leads/leads.types.d.ts +1 -1
- package/dist/talkpilot/mongodb-client.d.ts +1 -1
- package/dist/talkpilot/mongodb-client.js +8 -9
- package/dist/talkpilot/mongodb-client.js.map +1 -1
- package/dist/talkpilot/phone_numbers/index.d.ts +1 -1
- package/dist/talkpilot/phone_numbers/index.d.ts.map +1 -1
- package/dist/talkpilot/phone_numbers/phone_numbers.getter.d.ts +5 -2
- package/dist/talkpilot/phone_numbers/phone_numbers.getter.d.ts.map +1 -1
- package/dist/talkpilot/phone_numbers/phone_numbers.getter.js +66 -12
- package/dist/talkpilot/phone_numbers/phone_numbers.getter.js.map +1 -1
- package/dist/talkpilot/phone_numbers/phone_numbers.schema.d.ts +11 -2
- package/dist/talkpilot/phone_numbers/phone_numbers.schema.d.ts.map +1 -1
- package/dist/talkpilot/phone_numbers/phone_numbers.schema.js +5 -2
- package/dist/talkpilot/phone_numbers/phone_numbers.schema.js.map +1 -1
- package/dist/talkpilot/phone_numbers/phone_numbers.types.d.ts +16 -3
- package/dist/talkpilot/phone_numbers/phone_numbers.types.d.ts.map +1 -1
- package/dist/talkpilot/plans/index.d.ts +2 -2
- package/dist/talkpilot/plans/plans.getters.d.ts +2 -2
- package/dist/talkpilot/plans/plans.getters.d.ts.map +1 -1
- package/dist/talkpilot/plans/plans.getters.js +3 -3
- package/dist/talkpilot/plans/plans.getters.js.map +1 -1
- package/dist/talkpilot/plans/plans.types.d.ts +4 -4
- package/dist/talkpilot/plans/plans.types.d.ts.map +1 -1
- package/dist/talkpilot/plans/plans.types.js +19 -19
- package/dist/talkpilot/results/index.d.ts +2 -2
- package/dist/talkpilot/results/index.d.ts.map +1 -1
- package/dist/talkpilot/results/index.js.map +1 -1
- package/dist/talkpilot/results/results.getter.d.ts +3 -3
- package/dist/talkpilot/results/results.getter.d.ts.map +1 -1
- package/dist/talkpilot/results/results.getter.js +4 -4
- package/dist/talkpilot/results/results.getter.js.map +1 -1
- package/dist/talkpilot/results/results.schema.js +18 -18
- package/dist/talkpilot/results/results.types.d.ts +1 -1
- package/dist/talkpilot/sessions/index.d.ts +2 -2
- package/dist/talkpilot/sessions/sessions.getter.d.ts +3 -3
- package/dist/talkpilot/sessions/sessions.getter.d.ts.map +1 -1
- package/dist/talkpilot/sessions/sessions.getter.js +13 -10
- package/dist/talkpilot/sessions/sessions.getter.js.map +1 -1
- package/dist/talkpilot/sessions/sessions.schema.js +17 -17
- package/dist/talkpilot/sessions/sessions.types.d.ts +2 -2
- package/dist/talkpilot/subscriptions/index.d.ts +3 -3
- package/dist/talkpilot/subscriptions/subscriptions.getters.d.ts +2 -2
- package/dist/talkpilot/subscriptions/subscriptions.getters.d.ts.map +1 -1
- package/dist/talkpilot/subscriptions/subscriptions.getters.js +11 -11
- package/dist/talkpilot/subscriptions/subscriptions.getters.js.map +1 -1
- package/dist/talkpilot/subscriptions/subscriptions.getters.utils.d.ts +2 -2
- package/dist/talkpilot/subscriptions/subscriptions.getters.utils.d.ts.map +1 -1
- package/dist/talkpilot/subscriptions/subscriptions.getters.utils.js.map +1 -1
- package/dist/talkpilot/subscriptions/subscriptions.types.d.ts +2 -2
- package/dist/talkpilot/subscriptions/subscriptions.types.d.ts.map +1 -1
- package/dist/talkpilot/subscriptions/subscriptions.types.js +7 -7
- package/dist/talkpilot/utils/query.utils.d.ts +1 -1
- package/dist/test-utils/db-utils.d.ts +1 -1
- package/dist/test-utils/db-utils.js +2 -2
- package/dist/test-utils/factories/index.d.ts +12 -12
- package/dist/test-utils/factories/municipal/cities.d.ts +2 -2
- package/dist/test-utils/factories/municipal/cities.d.ts.map +1 -1
- package/dist/test-utils/factories/municipal/cities.js +1 -1
- package/dist/test-utils/factories/municipal/departmentsSubjects.d.ts +2 -2
- package/dist/test-utils/factories/municipal/departmentsSubjects.d.ts.map +1 -1
- package/dist/test-utils/factories/municipal/departmentsSubjects.js +7 -1
- package/dist/test-utils/factories/municipal/departmentsSubjects.js.map +1 -1
- package/dist/test-utils/factories/municipal/streets.d.ts +2 -2
- package/dist/test-utils/factories/municipal/streets.d.ts.map +1 -1
- package/dist/test-utils/factories/municipal/streets.js +6 -1
- package/dist/test-utils/factories/municipal/streets.js.map +1 -1
- package/dist/test-utils/factories/municipal/tickets.d.ts +2 -2
- package/dist/test-utils/factories/municipal/tickets.d.ts.map +1 -1
- package/dist/test-utils/factories/municipal/tickets.js +7 -1
- package/dist/test-utils/factories/municipal/tickets.js.map +1 -1
- package/dist/test-utils/factories/talkpilot/agents.d.ts +2 -2
- package/dist/test-utils/factories/talkpilot/agents.d.ts.map +1 -1
- package/dist/test-utils/factories/talkpilot/agents.js +4 -4
- package/dist/test-utils/factories/talkpilot/calls.d.ts +2 -2
- package/dist/test-utils/factories/talkpilot/calls.d.ts.map +1 -1
- package/dist/test-utils/factories/talkpilot/calls.js +1 -1
- package/dist/test-utils/factories/talkpilot/clientAudioBuffers.d.ts +2 -2
- package/dist/test-utils/factories/talkpilot/clientAudioBuffers.d.ts.map +1 -1
- package/dist/test-utils/factories/talkpilot/clientAudioBuffers.js +1 -1
- package/dist/test-utils/factories/talkpilot/clientAudioBuffers.js.map +1 -1
- package/dist/test-utils/factories/talkpilot/clientsConfig.d.ts +2 -2
- package/dist/test-utils/factories/talkpilot/clientsConfig.d.ts.map +1 -1
- package/dist/test-utils/factories/talkpilot/clientsConfig.js.map +1 -1
- package/dist/test-utils/factories/talkpilot/flows.d.ts +3 -3
- package/dist/test-utils/factories/talkpilot/flows.d.ts.map +1 -1
- package/dist/test-utils/factories/talkpilot/flows.js.map +1 -1
- package/dist/test-utils/factories/talkpilot/groups.d.ts +2 -2
- package/dist/test-utils/factories/talkpilot/groups.d.ts.map +1 -1
- package/dist/test-utils/factories/talkpilot/groups.js +9 -9
- package/dist/test-utils/factories/talkpilot/groups.js.map +1 -1
- package/dist/test-utils/factories/talkpilot/phone_numbers.d.ts +3 -3
- package/dist/test-utils/factories/talkpilot/phone_numbers.d.ts.map +1 -1
- package/dist/test-utils/factories/talkpilot/phone_numbers.js.map +1 -1
- package/dist/test-utils/factories/talkpilot/sessions.d.ts +2 -2
- package/dist/test-utils/factories/talkpilot/sessions.d.ts.map +1 -1
- package/dist/test-utils/factories/talkpilot/sessions.js +1 -1
- package/dist/utils/validation.js +2 -2
- package/dist/utils/validation.js.map +1 -1
- package/package.json +3 -1
- package/src/__tests__/setup.ts +3 -3
- package/src/connection.ts +27 -25
- package/src/index.ts +9 -9
- package/src/municipal/__tests__/validation.spec.ts +35 -23
- package/src/municipal/cities/cities.getters.ts +16 -10
- package/src/municipal/cities/cities.types.ts +1 -1
- package/src/municipal/cities/index.ts +2 -2
- package/src/municipal/departmentsSubjects/departmentsSubjects.getters.ts +53 -44
- package/src/municipal/departmentsSubjects/departmentsSubjects.types.ts +5 -5
- package/src/municipal/departmentsSubjects/index.ts +2 -3
- package/src/municipal/index.ts +10 -10
- package/src/municipal/mongodb-client.ts +13 -10
- package/src/municipal/streets/index.ts +2 -2
- package/src/municipal/streets/streets.getters.ts +43 -23
- package/src/municipal/streets/streets.types.ts +1 -1
- package/src/municipal/systemInstructions/__tests__/getters.spec.ts +67 -52
- package/src/municipal/systemInstructions/__tests__/setters.spec.ts +271 -238
- package/src/municipal/systemInstructions/index.ts +7 -3
- package/src/municipal/systemInstructions/instructions.getters.ts +30 -18
- package/src/municipal/systemInstructions/instructions.setters.ts +43 -19
- package/src/municipal/systemInstructions/instructions.types.ts +10 -10
- package/src/municipal/tickets/__tests__/tickets.getters.spec.ts +12 -12
- package/src/municipal/tickets/index.ts +2 -2
- package/src/municipal/tickets/tickets.getters.ts +69 -42
- package/src/municipal/tickets/tickets.types.ts +2 -2
- package/src/municipal/utils/types.ts +8 -3
- package/src/talkpilot/__tests__/db.spec.ts +12 -12
- package/src/talkpilot/__tests__/mongodb-client.spec.ts +7 -8
- package/src/talkpilot/__tests__/validation.spec.ts +30 -24
- package/src/talkpilot/agents/__tests__/agents.getters.spec.ts +10 -10
- package/src/talkpilot/agents/agents.getters.ts +3 -3
- package/src/talkpilot/agents/agents.types.ts +2 -2
- package/src/talkpilot/agents/index.ts +2 -2
- package/src/talkpilot/backgroundToolResults/__tests__/backgroundToolResults.getters.spec.ts +42 -31
- package/src/talkpilot/backgroundToolResults/backgroundToolResults.getters.ts +11 -11
- package/src/talkpilot/backgroundToolResults/backgroundToolResults.types.ts +2 -3
- package/src/talkpilot/backgroundToolResults/index.ts +2 -2
- package/src/talkpilot/calls/__tests__/callStats.utils.spec.ts +27 -27
- package/src/talkpilot/calls/__tests__/calls.spec.ts +178 -40
- package/src/talkpilot/calls/calls.getters.ts +57 -27
- package/src/talkpilot/calls/calls.types.ts +39 -16
- package/src/talkpilot/calls/index.ts +2 -2
- package/src/talkpilot/clientAudioBuffers/__tests__/clientAudioBuffer.getters.spec.ts +73 -39
- package/src/talkpilot/clientAudioBuffers/clientAudioBuffer.getters.ts +18 -11
- package/src/talkpilot/clientAudioBuffers/clientsAudioBuffers.types.ts +2 -2
- package/src/talkpilot/clientAudioBuffers/index.ts +2 -2
- package/src/talkpilot/clients/clients.getters.ts +10 -5
- package/src/talkpilot/clients/clients.types.ts +1 -1
- package/src/talkpilot/clients/index.ts +2 -2
- package/src/talkpilot/clientsConfig/__tests__/clientsConfig.spec.ts +21 -18
- package/src/talkpilot/clientsConfig/clientsConfig.getters.ts +6 -4
- package/src/talkpilot/clientsConfig/clientsConfig.types.ts +10 -8
- package/src/talkpilot/clientsConfig/index.ts +2 -2
- package/src/talkpilot/flows/__tests__/flows.schema.spec.ts +38 -37
- package/src/talkpilot/flows/flows.getter.ts +8 -5
- package/src/talkpilot/flows/flows.schema.ts +87 -80
- package/src/talkpilot/flows/flows.types.ts +23 -24
- package/src/talkpilot/flows/index.ts +2 -2
- package/src/talkpilot/groups/__tests__/groups.spec.ts +34 -27
- package/src/talkpilot/groups/__tests__/phone.utils.spec.ts +20 -20
- package/src/talkpilot/groups/groups.getters.ts +8 -5
- package/src/talkpilot/groups/groups.types.ts +1 -1
- package/src/talkpilot/groups/index.ts +3 -3
- package/src/talkpilot/groups/phone.utils.ts +12 -6
- package/src/talkpilot/index.ts +17 -17
- package/src/talkpilot/leads/index.ts +2 -2
- package/src/talkpilot/leads/leads.getter.ts +5 -4
- package/src/talkpilot/leads/leads.schema.ts +16 -16
- package/src/talkpilot/leads/leads.types.ts +1 -1
- package/src/talkpilot/mongodb-client.ts +12 -12
- package/src/talkpilot/phone_numbers/__tests__/phone_numbers.spec.ts +162 -33
- package/src/talkpilot/phone_numbers/index.ts +1 -1
- package/src/talkpilot/phone_numbers/phone_numbers.getter.ts +94 -18
- package/src/talkpilot/phone_numbers/phone_numbers.schema.ts +5 -2
- package/src/talkpilot/phone_numbers/phone_numbers.types.ts +18 -3
- package/src/talkpilot/plans/__tests__/plans.spec.ts +30 -26
- package/src/talkpilot/plans/index.ts +2 -2
- package/src/talkpilot/plans/plans.getters.ts +25 -18
- package/src/talkpilot/plans/plans.types.ts +27 -23
- package/src/talkpilot/results/index.ts +5 -2
- package/src/talkpilot/results/results.getter.ts +9 -8
- package/src/talkpilot/results/results.schema.ts +18 -18
- package/src/talkpilot/results/results.types.ts +1 -1
- package/src/talkpilot/sessions/__tests__/sessions.spec.ts +65 -41
- package/src/talkpilot/sessions/index.ts +2 -2
- package/src/talkpilot/sessions/sessions.getter.ts +21 -16
- package/src/talkpilot/sessions/sessions.schema.ts +17 -17
- package/src/talkpilot/sessions/sessions.types.ts +2 -2
- package/src/talkpilot/subscriptions/__tests__/subscriptions.getters.utils.spec.ts +18 -15
- package/src/talkpilot/subscriptions/index.ts +3 -3
- package/src/talkpilot/subscriptions/subscriptions.getters.ts +36 -33
- package/src/talkpilot/subscriptions/subscriptions.getters.utils.ts +10 -3
- package/src/talkpilot/subscriptions/subscriptions.types.ts +9 -9
- package/src/talkpilot/utils/__tests__/query.utils.spec.ts +8 -8
- package/src/talkpilot/utils/query.utils.ts +2 -2
- package/src/test-utils/db-utils.ts +5 -5
- package/src/test-utils/factories/index.ts +12 -12
- package/src/test-utils/factories/municipal/cities.ts +5 -5
- package/src/test-utils/factories/municipal/departmentsSubjects.ts +32 -25
- package/src/test-utils/factories/municipal/streets.ts +10 -5
- package/src/test-utils/factories/municipal/tickets.ts +12 -6
- package/src/test-utils/factories/talkpilot/agents.ts +8 -8
- package/src/test-utils/factories/talkpilot/calls.ts +5 -5
- package/src/test-utils/factories/talkpilot/clientAudioBuffers.ts +14 -12
- package/src/test-utils/factories/talkpilot/clientsConfig.ts +7 -8
- package/src/test-utils/factories/talkpilot/flows.ts +7 -5
- package/src/test-utils/factories/talkpilot/groups.ts +13 -13
- package/src/test-utils/factories/talkpilot/phone_numbers.ts +8 -6
- package/src/test-utils/factories/talkpilot/sessions.ts +5 -5
- package/src/utils/validation.ts +4 -4
package/README.md
CHANGED
|
@@ -138,6 +138,13 @@ MIT
|
|
|
138
138
|
|
|
139
139
|
## Release Notes
|
|
140
140
|
|
|
141
|
+
### 1.1.9
|
|
142
|
+
|
|
143
|
+
- `getPhoneNumbersForFlows(clientId)` — lists each phone number linked to a flow for that client (newest first), with `flowId`, `phoneNumber`, and `isPrimary`.
|
|
144
|
+
### 1.1.5
|
|
145
|
+
|
|
146
|
+
- `createPurchasedPhoneNumber` for API-bought numbers (Twilio/Telnyx metadata); optional `flowId` until linked to a flow. Types/schema updated accordingly.
|
|
147
|
+
|
|
141
148
|
### 1.0.16
|
|
142
149
|
|
|
143
150
|
- Fixed critical issues present in version 1.0.15.
|
package/dist/connection.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Ensures the database clients are initialized.
|
|
3
|
-
* This function reads from
|
|
3
|
+
* This function reads from MONGO_URI.
|
|
4
4
|
*/
|
|
5
5
|
export declare function ensureDbConnected(): Promise<void>;
|
|
6
6
|
//# sourceMappingURL=connection.d.ts.map
|
package/dist/connection.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAsB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,wBAAsB,iBAAiB,kBAgCtC"}
|
package/dist/connection.js
CHANGED
|
@@ -6,36 +6,33 @@ const municipal_1 = require("./municipal");
|
|
|
6
6
|
let isConnected = false;
|
|
7
7
|
/**
|
|
8
8
|
* Ensures the database clients are initialized.
|
|
9
|
-
* This function reads from
|
|
9
|
+
* This function reads from MONGO_URI.
|
|
10
10
|
*/
|
|
11
11
|
async function ensureDbConnected() {
|
|
12
12
|
if (isConnected) {
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
const dbName = talkpilotUri.split('/').pop()?.split('?')[0];
|
|
23
|
-
await talkpilot_1.mongodbClient.connect(talkpilotUri, dbName);
|
|
24
|
-
console.info(`[core-db] Connected to TalkPilot MongoDB: ${dbName}`);
|
|
25
|
-
}
|
|
26
|
-
if (!municipalUri) {
|
|
27
|
-
console.warn('[core-db] MUNICIPAL_MONGO_URI is not set');
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
const dbName = municipalUri.split('/').pop()?.split('?')[0];
|
|
31
|
-
await municipal_1.municipalDataMongodbClient.connect(municipalUri, dbName);
|
|
32
|
-
console.info(`[core-db] Connected to Municipal Data MongoDB: ${dbName}`);
|
|
33
|
-
}
|
|
34
|
-
isConnected = true;
|
|
15
|
+
const mongoUri = process.env.MONGO_URI || process.env.MONGODB_URI;
|
|
16
|
+
const talkpilotUri = mongoUri;
|
|
17
|
+
const municipalUri = mongoUri;
|
|
18
|
+
if (!talkpilotUri) {
|
|
19
|
+
console.warn("[core-db] MONGO_URI is not set");
|
|
35
20
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
21
|
+
else {
|
|
22
|
+
const dbNameFromUri = talkpilotUri.split("/").pop()?.split("?")[0];
|
|
23
|
+
const dbName = dbNameFromUri || process.env.TALKPILOT_DB_NAME;
|
|
24
|
+
await talkpilot_1.mongodbClient.connect(talkpilotUri, dbName);
|
|
25
|
+
console.info(`[core-db] Connected to TalkPilot MongoDB: ${dbName || "via env"}`);
|
|
39
26
|
}
|
|
27
|
+
if (!municipalUri) {
|
|
28
|
+
console.warn("[core-db] MONGO_URI is not set");
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
const dbNameFromUri = municipalUri.split("/").pop()?.split("?")[0];
|
|
32
|
+
const dbName = dbNameFromUri || process.env.MUNICIPAL_DB_NAME;
|
|
33
|
+
await municipal_1.municipalDataMongodbClient.connect(municipalUri, dbName);
|
|
34
|
+
console.info(`[core-db] Connected to Municipal Data MongoDB: ${dbName || "via env"}`);
|
|
35
|
+
}
|
|
36
|
+
isConnected = true;
|
|
40
37
|
}
|
|
41
38
|
//# sourceMappingURL=connection.js.map
|
package/dist/connection.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":";;AASA,
|
|
1
|
+
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":";;AASA,8CAgCC;AAzCD,2CAA4C;AAC5C,2CAAyD;AAEzD,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB;;;GAGG;AACI,KAAK,UAAU,iBAAiB;IACrC,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO;IACT,CAAC;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IAClE,MAAM,YAAY,GAAG,QAAQ,CAAC;IAC9B,MAAM,YAAY,GAAG,QAAQ,CAAC;IAE9B,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;IACjD,CAAC;SAAM,CAAC;QACN,MAAM,aAAa,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACnE,MAAM,MAAM,GAAG,aAAa,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;QAC9D,MAAM,yBAAa,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;QAClD,OAAO,CAAC,IAAI,CACV,6CAA6C,MAAM,IAAI,SAAS,EAAE,CACnE,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;IACjD,CAAC;SAAM,CAAC;QACN,MAAM,aAAa,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACnE,MAAM,MAAM,GAAG,aAAa,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;QAC9D,MAAM,sCAA0B,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;QAC/D,OAAO,CAAC,IAAI,CACV,kDAAkD,MAAM,IAAI,SAAS,EAAE,CACxE,CAAC;IACJ,CAAC;IAED,WAAW,GAAG,IAAI,CAAC;AACrB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export { municipalDataMongodbClient, getDb as getMunicipalDataDb, setDb as setMunicipalDataDb, ObjectId as MunicipalDataObjectId, } from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
1
|
+
export * from "./talkpilot";
|
|
2
|
+
export * from "./connection";
|
|
3
|
+
export { municipalDataMongodbClient, getDb as getMunicipalDataDb, setDb as setMunicipalDataDb, ObjectId as MunicipalDataObjectId, } from "./municipal";
|
|
4
|
+
export * from "./municipal/cities";
|
|
5
|
+
export * from "./municipal/streets";
|
|
6
|
+
export * from "./municipal/departmentsSubjects";
|
|
7
|
+
export * from "./municipal/tickets";
|
|
8
|
+
export * from "./municipal/systemInstructions";
|
|
9
|
+
export * from "./municipal/utils/types";
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAE7B,OAAO,EACL,0BAA0B,EAC1B,KAAK,IAAI,kBAAkB,EAC3B,KAAK,IAAI,kBAAkB,EAC3B,QAAQ,IAAI,qBAAqB,GAClC,MAAM,aAAa,CAAC;AACrB,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAE7B,OAAO,EACL,0BAA0B,EAC1B,KAAK,IAAI,kBAAkB,EAC3B,KAAK,IAAI,kBAAkB,EAC3B,QAAQ,IAAI,qBAAqB,GAClC,MAAM,aAAa,CAAC;AACrB,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AACpC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uBAAuB;AACvB,8CAA4B;AAC5B,+CAA6B;AAE7B,yCAKqB;AAJnB,uHAAA,0BAA0B,OAAA;AAC1B,+GAAA,KAAK,OAAsB;AAC3B,+GAAA,KAAK,OAAsB;AAC3B,kHAAA,QAAQ,OAAyB;AAEnC,qDAAmC;AACnC,sDAAoC;AACpC,kEAAgD;AAChD,sDAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uBAAuB;AACvB,8CAA4B;AAC5B,+CAA6B;AAE7B,yCAKqB;AAJnB,uHAAA,0BAA0B,OAAA;AAC1B,+GAAA,KAAK,OAAsB;AAC3B,+GAAA,KAAK,OAAsB;AAC3B,kHAAA,QAAQ,OAAyB;AAEnC,qDAAmC;AACnC,sDAAoC;AACpC,kEAAgD;AAChD,sDAAoC;AACpC,iEAA+C;AAC/C,0DAAwC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { City } from
|
|
2
|
-
import { Collection, Filter, ObjectId as MongoObjectId } from
|
|
1
|
+
import { City } from "../index";
|
|
2
|
+
import { Collection, Filter, ObjectId as MongoObjectId } from "mongodb";
|
|
3
3
|
export declare const getCitiesCollection: () => Collection<City>;
|
|
4
4
|
export declare const findCities: (filter?: Filter<City>) => Promise<City[]>;
|
|
5
5
|
export declare const getCityById: (cityId: string) => Promise<City | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cities.getters.d.ts","sourceRoot":"","sources":["../../../src/municipal/cities/cities.getters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;AAExE,eAAO,MAAM,mBAAmB,QAAO,UAAU,CAAC,IAAI,CAErD,CAAC;AAEF,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"cities.getters.d.ts","sourceRoot":"","sources":["../../../src/municipal/cities/cities.getters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;AAExE,eAAO,MAAM,mBAAmB,QAAO,UAAU,CAAC,IAAI,CAErD,CAAC;AAEF,eAAO,MAAM,UAAU,GACrB,SAAQ,MAAM,CAAC,IAAI,CAAM,KACxB,OAAO,CAAC,IAAI,EAAE,CAEhB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAU,QAAQ,MAAM,KAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAKrE,CAAC;AAEF,eAAO,MAAM,UAAU,GACrB,UAAU,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,WAAW,GAAG,WAAW,CAAC,KACtD,OAAO,CAAC,aAAa,CAQvB,CAAC;AAEF,eAAO,MAAM,UAAU,GACrB,QAAQ,MAAM,EACd,MAAM,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,GAAG,WAAW,GAAG,WAAW,CAAC,CAAC,KAC3D,OAAO,CAAC,IAAI,GAAG,IAAI,CAOrB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAU,QAAQ,MAAM,KAAG,OAAO,CAAC,OAAO,CAKhE,CAAC"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.deleteCity = exports.updateCity = exports.createCity = exports.getCityById = exports.findCities = exports.getCitiesCollection = void 0;
|
|
4
4
|
const index_1 = require("../index");
|
|
5
5
|
const getCitiesCollection = () => {
|
|
6
|
-
return (0, index_1.getDb)().collection(
|
|
6
|
+
return (0, index_1.getDb)().collection("cities");
|
|
7
7
|
};
|
|
8
8
|
exports.getCitiesCollection = getCitiesCollection;
|
|
9
9
|
const findCities = async (filter = {}) => {
|
|
@@ -11,7 +11,9 @@ const findCities = async (filter = {}) => {
|
|
|
11
11
|
};
|
|
12
12
|
exports.findCities = findCities;
|
|
13
13
|
const getCityById = async (cityId) => {
|
|
14
|
-
const city = await (0, exports.getCitiesCollection)().findOne({
|
|
14
|
+
const city = await (0, exports.getCitiesCollection)().findOne({
|
|
15
|
+
_id: new index_1.ObjectId(cityId),
|
|
16
|
+
});
|
|
15
17
|
return city ? city : null;
|
|
16
18
|
};
|
|
17
19
|
exports.getCityById = getCityById;
|
|
@@ -26,12 +28,14 @@ const createCity = async (cityData) => {
|
|
|
26
28
|
};
|
|
27
29
|
exports.createCity = createCity;
|
|
28
30
|
const updateCity = async (cityId, data) => {
|
|
29
|
-
const result = await (0, exports.getCitiesCollection)().findOneAndUpdate({ _id: new index_1.ObjectId(cityId) }, { $set: { ...data, updatedAt: new Date() } }, { returnDocument:
|
|
31
|
+
const result = await (0, exports.getCitiesCollection)().findOneAndUpdate({ _id: new index_1.ObjectId(cityId) }, { $set: { ...data, updatedAt: new Date() } }, { returnDocument: "after" });
|
|
30
32
|
return result || null;
|
|
31
33
|
};
|
|
32
34
|
exports.updateCity = updateCity;
|
|
33
35
|
const deleteCity = async (cityId) => {
|
|
34
|
-
const result = await (0, exports.getCitiesCollection)().deleteOne({
|
|
36
|
+
const result = await (0, exports.getCitiesCollection)().deleteOne({
|
|
37
|
+
_id: new index_1.ObjectId(cityId),
|
|
38
|
+
});
|
|
35
39
|
return result.deletedCount > 0;
|
|
36
40
|
};
|
|
37
41
|
exports.deleteCity = deleteCity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cities.getters.js","sourceRoot":"","sources":["../../../src/municipal/cities/cities.getters.ts"],"names":[],"mappings":";;;AAAA,oCAAiD;AAG1C,MAAM,mBAAmB,GAAG,GAAqB,EAAE;IACxD,OAAO,IAAA,aAAK,GAAE,CAAC,UAAU,CAAO,QAAQ,CAAC,CAAC;AAC5C,CAAC,CAAC;AAFW,QAAA,mBAAmB,uBAE9B;AAEK,MAAM,UAAU,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"cities.getters.js","sourceRoot":"","sources":["../../../src/municipal/cities/cities.getters.ts"],"names":[],"mappings":";;;AAAA,oCAAiD;AAG1C,MAAM,mBAAmB,GAAG,GAAqB,EAAE;IACxD,OAAO,IAAA,aAAK,GAAE,CAAC,UAAU,C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,cAAc,EAAE,OAAO,EAAE,CAC5B,CAAC;IACF,OAAO,MAAM,IAAI,IAAI,CAAC;AACxB,CAAC,CAAC;AAVW,QAAA,UAAU,cAUrB;AAEK,MAAM,UAAU,GAAG,KAAK,EAAE,MAAc,EAAoB,EAAE;IACnE,MAAM,MAAM,GAAG,MAAM,IAAA,2BAAmB,GAAE,CAAC,SAAS,CAAC;QACnD,GAAG,EAAE,IAAI,gBAAQ,CAAC,MAAM,CAAC;KAC1B,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,YAAY,GAAG,CAAC,CAAC;AACjC,CAAC,CAAC;AALW,QAAA,UAAU,cAKrB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export type { City, CityDoc } from
|
|
1
|
+
export * from "./cities.getters";
|
|
2
|
+
export type { City, CityDoc } from "./cities.types";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Collection, Filter } from
|
|
3
|
-
import { VectorSearchResult } from
|
|
1
|
+
import { CityName, DepartmentSubject } from "../index";
|
|
2
|
+
import { Collection, Filter } from "mongodb";
|
|
3
|
+
import { VectorSearchResult } from "./departmentsSubjects.types";
|
|
4
4
|
export declare const getDepartmentsSubjectsCollection: () => Collection<DepartmentSubject>;
|
|
5
5
|
/**
|
|
6
6
|
* Get all departments subjects for a given city.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"departmentsSubjects.getters.d.ts","sourceRoot":"","sources":["../../../src/municipal/departmentsSubjects/departmentsSubjects.getters.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"departmentsSubjects.getters.d.ts","sourceRoot":"","sources":["../../../src/municipal/departmentsSubjects/departmentsSubjects.getters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAS,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,U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,MAAM,CAAC,iBAAiB,CAAC,EACjC,iBAAiB,MAAM,EACvB,SAAS;IACP,IAAI,CAAC,EAAE,eAAe,GAAG,gBAAgB,CAAC;IAC1C,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC7B,KACA,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAmBlC,CAAC;AAEF,eAAO,MAAM,oCAAoC,GAC/C,QAAQ,MAAM,CAAC,iBAAiB,CAAC,EACjC,iBAAiB,MAAM,KACtB,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAWlC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC,GAC3C,WAAW,MAAM,EACjB,cAAc,MAAM,EACpB,UAAU,QAAQ,KACjB,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAelC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,GAC5C,QAAQ,MAAM,CAAC,iBAAiB,CAAC,EACjC,YAAY,MAAM,KACjB,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAQlC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,GAC5C,QAAQ,MAAM,CAAC,iBAAiB,CAAC,KAChC,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAQlC,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAU,OAAO,OAAO,CAAC,iBAAiB,CAAC,gEAEzE,CAAC"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
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
4
|
const index_1 = require("../index");
|
|
5
5
|
const getDepartmentsSubjectsCollection = () => {
|
|
6
|
-
return (0, index_1.getDb)().collection(
|
|
6
|
+
return (0, index_1.getDb)().collection("departmentsSubjects");
|
|
7
7
|
};
|
|
8
8
|
exports.getDepartmentsSubjectsCollection = getDepartmentsSubjectsCollection;
|
|
9
9
|
/**
|
|
@@ -35,13 +35,13 @@ exports.getAllDepartmentsSubjectsByCity = getAllDepartmentsSubjectsByCity;
|
|
|
35
35
|
*/
|
|
36
36
|
const vectorSearchDepartmentsSubjects = async (queryVector, cityName, limit = 5, numCandidates = 800) => {
|
|
37
37
|
const collection = (0, exports.getDepartmentsSubjectsCollection)();
|
|
38
|
-
const indexName =
|
|
39
|
-
|
|
38
|
+
const indexName = "subjectTreesIndex";
|
|
39
|
+
return await collection
|
|
40
40
|
.aggregate([
|
|
41
41
|
{
|
|
42
42
|
$vectorSearch: {
|
|
43
43
|
index: indexName,
|
|
44
|
-
path:
|
|
44
|
+
path: "embedding",
|
|
45
45
|
queryVector,
|
|
46
46
|
numCandidates,
|
|
47
47
|
limit,
|
|
@@ -52,17 +52,16 @@ const vectorSearchDepartmentsSubjects = async (queryVector, cityName, limit = 5,
|
|
|
52
52
|
$project: {
|
|
53
53
|
_id: 0,
|
|
54
54
|
subjectName: 1,
|
|
55
|
-
subject_id: { $toInt:
|
|
55
|
+
subject_id: { $toInt: "$subject_id" }, // Convert string to number
|
|
56
56
|
sub_subject_name: 1,
|
|
57
57
|
sub_subject_id: 1,
|
|
58
58
|
descriptions: 1,
|
|
59
59
|
guidelines: 1,
|
|
60
|
-
score: { $meta:
|
|
60
|
+
score: { $meta: "vectorSearchScore" },
|
|
61
61
|
},
|
|
62
62
|
},
|
|
63
63
|
])
|
|
64
64
|
.toArray();
|
|
65
|
-
return results;
|
|
66
65
|
};
|
|
67
66
|
exports.vectorSearchDepartmentsSubjects = vectorSearchDepartmentsSubjects;
|
|
68
67
|
const addDepartmentSubjectInstruction = async (filter, instructionText) => {
|
|
@@ -73,12 +72,17 @@ const addDepartmentSubjectInstruction = async (filter, instructionText) => {
|
|
|
73
72
|
const result = await (0, exports.getDepartmentsSubjectsCollection)().findOneAndUpdate(filter, {
|
|
74
73
|
$push: { instructions: newInstruction },
|
|
75
74
|
$set: { updatedAt: new Date() },
|
|
76
|
-
}, { returnDocument:
|
|
75
|
+
}, { returnDocument: "after" });
|
|
77
76
|
return result || null;
|
|
78
77
|
};
|
|
79
78
|
exports.addDepartmentSubjectInstruction = addDepartmentSubjectInstruction;
|
|
80
79
|
const updateDepartmentSubjectInstruction = async (filter, instructionId, newInstructionText) => {
|
|
81
|
-
const result = await (0, exports.getDepartmentsSubjectsCollection)().findOneAndUpdate({ ...filter,
|
|
80
|
+
const result = await (0, exports.getDepartmentsSubjectsCollection)().findOneAndUpdate({ ...filter, "instructions.id": instructionId }, {
|
|
81
|
+
$set: {
|
|
82
|
+
"instructions.$.instruction": newInstructionText,
|
|
83
|
+
updatedAt: new Date(),
|
|
84
|
+
},
|
|
85
|
+
}, { returnDocument: "after" });
|
|
82
86
|
return result || null;
|
|
83
87
|
};
|
|
84
88
|
exports.updateDepartmentSubjectInstruction = updateDepartmentSubjectInstruction;
|
|
@@ -86,7 +90,7 @@ const removeDepartmentSubjectInstruction = async (filter, instructionId) => {
|
|
|
86
90
|
const result = await (0, exports.getDepartmentsSubjectsCollection)().findOneAndUpdate(filter, {
|
|
87
91
|
$pull: { instructions: { id: instructionId } },
|
|
88
92
|
$set: { updatedAt: new Date() },
|
|
89
|
-
}, { returnDocument:
|
|
93
|
+
}, { returnDocument: "after" });
|
|
90
94
|
return result || null;
|
|
91
95
|
};
|
|
92
96
|
exports.removeDepartmentSubjectInstruction = removeDepartmentSubjectInstruction;
|
|
@@ -94,31 +98,35 @@ const addDepartmentSubjectCommunication = async (filter, communication) => {
|
|
|
94
98
|
const newCommunication = {
|
|
95
99
|
id: Date.now(),
|
|
96
100
|
type: communication.type,
|
|
97
|
-
...(communication.message_text !== undefined && {
|
|
101
|
+
...(communication.message_text !== undefined && {
|
|
102
|
+
message_text: communication.message_text,
|
|
103
|
+
}),
|
|
98
104
|
is_deleted: false,
|
|
99
|
-
...(communication.template_id !== undefined && {
|
|
105
|
+
...(communication.template_id !== undefined && {
|
|
106
|
+
template_id: communication.template_id,
|
|
107
|
+
}),
|
|
100
108
|
...(communication.to !== undefined && { to: communication.to }),
|
|
101
109
|
};
|
|
102
110
|
const result = await (0, exports.getDepartmentsSubjectsCollection)().findOneAndUpdate(filter, {
|
|
103
111
|
$push: { communications: newCommunication },
|
|
104
112
|
$set: { updatedAt: new Date() },
|
|
105
|
-
}, { returnDocument:
|
|
113
|
+
}, { returnDocument: "after" });
|
|
106
114
|
return result || null;
|
|
107
115
|
};
|
|
108
116
|
exports.addDepartmentSubjectCommunication = addDepartmentSubjectCommunication;
|
|
109
117
|
const updateDepartmentSubjectCommunication = async (filter, communicationId, updates) => {
|
|
110
118
|
const setFields = { updatedAt: new Date() };
|
|
111
119
|
if (updates.type !== undefined)
|
|
112
|
-
setFields[
|
|
120
|
+
setFields["communications.$.type"] = updates.type;
|
|
113
121
|
if (updates.message_text !== undefined)
|
|
114
|
-
setFields[
|
|
122
|
+
setFields["communications.$.message_text"] = updates.message_text;
|
|
115
123
|
if (updates.template_id !== undefined)
|
|
116
|
-
setFields[
|
|
124
|
+
setFields["communications.$.template_id"] = updates.template_id;
|
|
117
125
|
if (updates.to !== undefined)
|
|
118
|
-
setFields[
|
|
126
|
+
setFields["communications.$.to"] = updates.to;
|
|
119
127
|
if (updates.is_deleted !== undefined)
|
|
120
|
-
setFields[
|
|
121
|
-
const result = await (0, exports.getDepartmentsSubjectsCollection)().findOneAndUpdate({ ...filter,
|
|
128
|
+
setFields["communications.$.is_deleted"] = updates.is_deleted;
|
|
129
|
+
const result = await (0, exports.getDepartmentsSubjectsCollection)().findOneAndUpdate({ ...filter, "communications.id": communicationId }, { $set: setFields }, { returnDocument: "after" });
|
|
122
130
|
return result || null;
|
|
123
131
|
};
|
|
124
132
|
exports.updateDepartmentSubjectCommunication = updateDepartmentSubjectCommunication;
|
|
@@ -126,7 +134,7 @@ const removeDepartmentSubjectCommunication = async (filter, communicationId) =>
|
|
|
126
134
|
const result = await (0, exports.getDepartmentsSubjectsCollection)().findOneAndUpdate(filter, {
|
|
127
135
|
$pull: { communications: { id: communicationId } },
|
|
128
136
|
$set: { updatedAt: new Date() },
|
|
129
|
-
}, { returnDocument:
|
|
137
|
+
}, { returnDocument: "after" });
|
|
130
138
|
return result || null;
|
|
131
139
|
};
|
|
132
140
|
exports.removeDepartmentSubjectCommunication = removeDepartmentSubjectCommunication;
|
|
@@ -158,7 +166,7 @@ exports.getDepartmentSubjectBySubjectIds = getDepartmentSubjectBySubjectIds;
|
|
|
158
166
|
*/
|
|
159
167
|
const updateDepartmentSubjectGuidelines = async (filter, guidelines) => {
|
|
160
168
|
// $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:
|
|
169
|
+
const result = await (0, exports.getDepartmentsSubjectsCollection)().findOneAndUpdate(filter, { $set: { guidelines, updatedAt: new Date() } }, { returnDocument: "after" });
|
|
162
170
|
return result || null;
|
|
163
171
|
};
|
|
164
172
|
exports.updateDepartmentSubjectGuidelines = updateDepartmentSubjectGuidelines;
|
|
@@ -169,7 +177,7 @@ exports.updateDepartmentSubjectGuidelines = updateDepartmentSubjectGuidelines;
|
|
|
169
177
|
*/
|
|
170
178
|
const deleteDepartmentSubjectGuidelines = async (filter) => {
|
|
171
179
|
// $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:
|
|
180
|
+
const result = await (0, exports.getDepartmentsSubjectsCollection)().findOneAndUpdate(filter, { $set: { guidelines: null, updatedAt: new Date() } }, { returnDocument: "after" });
|
|
173
181
|
return result || null;
|
|
174
182
|
};
|
|
175
183
|
exports.deleteDepartmentSubjectGuidelines = deleteDepartmentSubjectGuidelines;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"departmentsSubjects.getters.js","sourceRoot":"","sources":["../../../src/municipal/departmentsSubjects/departmentsSubjects.getters.ts"],"names":[],"mappings":";;;AAAA,oCAA8D;AAIvD,MAAM,gCAAgC,
|
|
1
|
+
{"version":3,"file":"departmentsSubjects.getters.js","sourceRoot":"","sources":["../../../src/municipal/departmentsSubjects/departmentsSubjects.getters.ts"],"names":[],"mappings":";;;AAAA,oCAA8D;AAIvD,MAAM,gCAAgC,GAC3C,GAAkC,EAAE;IAClC,OAAO,IAAA,aAAK,GAAE,CAAC,UAAU,CAAoB,qBAAqB,CAAC,CAAC;AACtE,CAAC,CAAC;AAHS,QAAA,gCAAgC,oCAGzC;AAEJ;;;;;;;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;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AiC,EACjC,UAAkB,EACiB,EAAE;IACrC,iDAAiD;IACjD,MAAM,MAAM,GAAG,MAAM,IAAA,wCAAgC,GAAE,CAAC,gBAAgB,CACtE,MAAM,EACN,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,EAAE,EAC/C,EAAE,cAAc,EAAE,OAAO,EAAE,CAC5B,CAAC;IACF,OAAO,MAAM,IAAI,IAAI,CAAC;AACxB,CAAC,CAAC;AAXW,QAAA,iCAAiC,qCAW5C;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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ObjectId, WithId } from
|
|
2
|
-
import { Request } from
|
|
3
|
-
import { ClientConfigDoc, Products } from
|
|
1
|
+
import { ObjectId, WithId } from "mongodb";
|
|
2
|
+
import { Request } from "express";
|
|
3
|
+
import { ClientConfigDoc, Products } from "../../talkpilot";
|
|
4
4
|
import { CityName } from "../utils/types";
|
|
5
5
|
export type DepartmentSubject = {
|
|
6
6
|
_id: ObjectId;
|
|
@@ -51,7 +51,7 @@ export type VectorSearchResult = {
|
|
|
51
51
|
instructions?: string | null;
|
|
52
52
|
score?: number;
|
|
53
53
|
};
|
|
54
|
-
export type CommunicationType =
|
|
54
|
+
export type CommunicationType = "free_text_sms" | "upload_url_sms";
|
|
55
55
|
/**
|
|
56
56
|
* Extended Express Request type with client configuration
|
|
57
57
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"departmentsSubjects.types.d.ts","sourceRoot":"","sources":["../../../src/municipal/departmentsSubjects/departmentsSubjects.types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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,iBAAiB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,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;IACzB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,QAAQ,CAAC;IAC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AO,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"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export type { DepartmentSubject, DepartmentSubjectDoc, VectorSearchResult, RequestWithClientConfig, Communication, Instruction, } from
|
|
1
|
+
export * from "./departmentsSubjects.getters";
|
|
2
|
+
export type { DepartmentSubject, DepartmentSubjectDoc, VectorSearchResult, RequestWithClientConfig, Communication, Instruction, } from "./departmentsSubjects.types";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Db, ObjectId as MongoObjectId } from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
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 * from "./systemInstructions";
|
|
7
|
+
export * from "./utils/types";
|
|
8
8
|
export { CityName } from "./utils/types";
|
|
9
|
-
export { municipalDataMongodbClient } from
|
|
9
|
+
export { municipalDataMongodbClient } from "./mongodb-client";
|
|
10
10
|
export declare const setDb: (d: Db) => void;
|
|
11
11
|
export declare const getDb: () => Db;
|
|
12
12
|
export declare const ObjectId: typeof MongoObjectId;
|
|
@@ -1 +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,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,OAAO,
|
|
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,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAG9D,eAAO,MAAM,KAAK,GAAI,GAAG,EAAE,SAE1B,CAAC;AAEF,eAAO,MAAM,KAAK,QAAO,EAGxB,CAAC;AACF,eAAO,MAAM,QAAQ,sBAAgB,CAAC"}
|
package/dist/municipal/index.js
CHANGED
|
@@ -1 +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;
|
|
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;IAuBrD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAcjC,KAAK,IAAI,EAAE;IASX,WAAW,IAAI,OAAO;CAGvB;AAED,eAAO,MAAM,0BAA0B,4BAAmC,CAAC"}
|
|
@@ -7,24 +7,24 @@ const validation_1 = require("../utils/validation");
|
|
|
7
7
|
class MunicipalDataMongoDBClient {
|
|
8
8
|
client = null;
|
|
9
9
|
db = null;
|
|
10
|
-
defaultDbName =
|
|
10
|
+
defaultDbName = "municipal-data";
|
|
11
11
|
async connect(uri, dbName) {
|
|
12
12
|
if (this.client) {
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
15
|
const mongodbUri = uri || process.env.MONGO_URI || process.env.MONGODB_URI;
|
|
16
|
-
(0, validation_1.validateConfig)(
|
|
16
|
+
(0, validation_1.validateConfig)("MONGO_URI", mongodbUri);
|
|
17
17
|
(0, validation_1.validateMongoUri)(mongodbUri);
|
|
18
18
|
try {
|
|
19
19
|
this.client = new mongodb_1.MongoClient(mongodbUri);
|
|
20
20
|
await this.client.connect();
|
|
21
|
-
const targetDbName = dbName || this.defaultDbName;
|
|
21
|
+
const targetDbName = dbName || process.env.MUNICIPAL_DB_NAME || this.defaultDbName;
|
|
22
22
|
this.db = this.client.db(targetDbName);
|
|
23
23
|
(0, index_1.setDb)(this.db);
|
|
24
24
|
console.info(`[core-db] Municipal MongoDB connected: ${targetDbName}`);
|
|
25
25
|
}
|
|
26
26
|
catch (error) {
|
|
27
|
-
console.error(
|
|
27
|
+
console.error("[core-db] Municipal connection failed", error);
|
|
28
28
|
throw error;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -34,17 +34,17 @@ class MunicipalDataMongoDBClient {
|
|
|
34
34
|
await this.client.close();
|
|
35
35
|
this.client = null;
|
|
36
36
|
this.db = null;
|
|
37
|
-
console.info(
|
|
37
|
+
console.info("Municipal Data MongoDB disconnected successfully");
|
|
38
38
|
}
|
|
39
39
|
catch (error) {
|
|
40
|
-
console.error(
|
|
40
|
+
console.error("[core-db] Municipal disconnection failed", error);
|
|
41
41
|
throw error;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
getDb() {
|
|
46
46
|
if (!this.db) {
|
|
47
|
-
throw new Error(
|
|
47
|
+
throw new Error("Municipal Data database not initialized. Call connect() first.");
|
|
48
48
|
}
|
|
49
49
|
return this.db;
|
|
50
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mongodb-client.js","sourceRoot":"","sources":["../../src/municipal/mongodb-client.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAC1C,mCAAgC;AAChC,oDAAuE;AAEvE,MAAM,0BAA0B;IACtB,MAAM,GAAuB,IAAI,CAAC;IAClC,EAAE,GAAc,IAAI,CAAC;IACZ,aAAa,GAAG,gBAAgB,CAAC;IAElD,KAAK,CAAC,OAAO,CAAC,GAAY,EAAE,MAAe;QACzC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QAED,MAAM,UAAU,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;QAC3E,IAAA,2BAAc,EAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QACxC,IAAA,6BAAgB,EAAC,UAAW,CAAC,CAAC;QAE9B,IAAI,CAAC;YACH,IAAI,CAAC,MAAM,GAAG,IAAI,qBAAW,CAAC,UAAW,CAAC,CAAC;YAC3C,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YAC5B,MA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AC;YAChB,IAAI,CAAC;gBACH,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;gBAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;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,0CAA0C,EAAE,KAAK,CAAC,CAAC;gBACjE,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC;IAED,KAAK;QACH,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CACb,gEAAgE,CACjE,CAAC;QACJ,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"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export type { Street, StreetDoc, StreetHint } from
|
|
1
|
+
export * from "./streets.getters";
|
|
2
|
+
export type { Street, StreetDoc, StreetHint } from "./streets.types";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CityName, Street } from
|
|
2
|
-
import type { StreetHint } from
|
|
3
|
-
import { Collection, Filter, ObjectId as MongoObjectId } from
|
|
1
|
+
import { CityName, Street } from "../index";
|
|
2
|
+
import type { StreetHint } from "./streets.types";
|
|
3
|
+
import { Collection, Filter, ObjectId as MongoObjectId } from "mongodb";
|
|
4
4
|
export declare const getStreetsCollection: () => Collection<Street>;
|
|
5
5
|
export declare const findStreets: (filter?: Filter<Street>) => Promise<Street[]>;
|
|
6
6
|
export declare const getStreetById: (streetId: string) => Promise<Street | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streets.getters.d.ts","sourceRoot":"","sources":["../../../src/municipal/streets/streets.getters.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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,GACtB,SAAQ,MAAM,CAAC,MAAM,CAAM,KAC1B,OAAO,CAAC,MAAM,EAAE,CAElB,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,UAAU,MAAM,KACf,OAAO,CAAC,MAAM,GAAG,IAAI,CAKvB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,UAAU,QAAQ,KACjB,OAAO,CAAC,MAAM,EAAE,CAKlB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,UAAU,MAAM,KACf,OAAO,CAAC,MAAM,GAAG,IAAI,CAGvB,CAAC;AAEF,mIAAmI;AACnI,eAAO,MAAM,0BAA0B,GACrC,UAAU,MAAM,EAChB,UAAU,QAAQ,KACjB,OAAO,CAAC,MAAM,GAAG,IAAI,CAMvB,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,YAAY,IAAI,CAAC,MAAM,EAAE,KAAK,GAAG,WAAW,GAAG,WAAW,CAAC,KAC1D,OAAO,CAAC,aAAa,CAUvB,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,UAAU,MAAM,EAChB,MAAM,OAAO,C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