@astralibx/call-log-engine 0.3.0 → 0.3.2

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 CHANGED
@@ -123,7 +123,7 @@ const engine = createCallLogEngine({
123
123
  - **Follow-up worker** -- Background worker polls for due follow-ups and fires `onFollowUpDue` hook. Starts automatically, stops via `engine.destroy()`. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/hooks.md)
124
124
  - **Analytics** -- Dashboard stats, agent stats, leaderboard, pipeline stats/funnel, team stats, daily/weekly/overall reports, channel/outcome distributions, follow-up ratio. Deleted calls excluded from all analytics. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/api-routes.md)
125
125
  - **Export** -- Bulk call export, single call export, pipeline report export in JSON or CSV. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/api-routes.md)
126
- - **Settings** -- Runtime-mutable tags, categories, priority levels, follow-up defaults, available channels, available outcomes. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/api-routes.md)
126
+ - **Settings** -- Runtime-mutable tags, categories, priority levels, follow-up defaults, available channels, available outcomes. Settings updates use partial merge (`$set`) -- only fields you provide are updated. Calling `settings.update({ availableChannels: [...] })` will NOT overwrite other settings like `availableOutcomes` or `defaultFollowUpDays`. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/api-routes.md)
127
127
  - **Bulk operations** -- Bulk stage change for multiple call logs at once. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/api-routes.md)
128
128
  - **Contact adapters** -- Pluggable contact lookup and creation. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/adapters.md)
129
129
  - **Agent sharing** -- Reuse chat-engine's agent collection. [Details](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/agent-sharing.md)
@@ -161,6 +161,19 @@ The library exposes an Express router from a single factory call:
161
161
 
162
162
  All services are also available programmatically via the returned `engine` object: `pipelines`, `callLogs`, `lifecycle`, `timeline`, `analytics`, `pipelineAnalytics`, `settings`, `export`, `models`.
163
163
 
164
+ ## Seeding Data
165
+
166
+ Schema factory functions are exported so you can seed data or run scripts without creating a full engine instance:
167
+
168
+ ```ts
169
+ import { createPipelineModel, createCallLogSettingsModel } from '@astralibx/call-log-engine';
170
+
171
+ const Pipeline = createPipelineModel(connection);
172
+ const Settings = createCallLogSettingsModel(connection);
173
+
174
+ await Pipeline.create({ ... });
175
+ ```
176
+
164
177
  ## Getting Started Guide
165
178
 
166
179
  1. [Configuration](https://github.com/Hariprakash1997/astralib/blob/main/packages/call-log/call-log-engine/docs/configuration.md) -- Set up database, agents, adapters, and options