@talkpilot/core-db 1.3.19 → 1.3.20

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
@@ -151,6 +151,7 @@ Refer to `DEVELOPMENT.md` for the full walkthrough, token instructions, and fact
151
151
  | 1.3.17 | Twilio call-status semantics for Websitalk dashboard: `inCallCount` KPI (`in-progress` + `answered`), `busy` is line-busy only; `updateCallStatusByCallSid`; expanded `CallStatus` union; `timeSavedMinutes` from `completed` only. |
152
152
  | 1.3.18 | WebsiteTalk multi-website API (CP-1372): ships `websiteUrls` module, scan getters by `websiteUrlId`, `activeScanId` getters on `clientsConfig`. **Note:** 1.3.17 did not include these — they landed after merge. **Breaking:** `WebsiteTalkProduct.defaultBaseUrl` removed from type. |
153
153
  | 1.3.19 | WebsiteTalk flow provisioning (WTIS activate-scan): optional `flowId` on `WebsiteTalkProduct`; `bindClientPhoneToFlow(clientId, flowId)` sets `flow_id` on the client's primary `phone_numbers` document so inbound calls route to the provisioned TalkPilot flow. |
154
+ | 1.3.20 | `FINAL_STATUSES` constant for terminal Twilio call statuses (`no-answer`, `completed`, `busy`, `failed`, `canceled`) in `calls.constants`. |
154
155
  ### 1.1.9
155
156
 
156
157
  1. `npm run build`.
@@ -452,6 +453,20 @@ Persists the TalkPilot flow id on the client product config and links the client
452
453
 
453
454
  No — purely additive. **WTIS** should upgrade to **1.3.19** (or later) and import `bindClientPhoneToFlow` plus `WebsiteTalkProduct.flowId` when implementing activate-scan flow provisioning.
454
455
 
456
+ ### 1.3.20 — `FINAL_STATUSES` call-status constant
457
+
458
+ Centralizes terminal Twilio call statuses so consumers (e.g. TalkPilot Server `callResultService`) don't duplicate the list locally.
459
+
460
+ **Added**
461
+
462
+ | Export | Purpose |
463
+ | --- | --- |
464
+ | `FINAL_STATUSES` | `["no-answer", "completed", "busy", "failed", "canceled"]` — statuses where no further Twilio callbacks are expected. Pair with `IN_CALL_STATUSES` for live vs terminal semantics. |
465
+
466
+ **Do I need to update my app?**
467
+
468
+ No — purely additive. Replace local `FINAL_STATUSES` arrays with `import { FINAL_STATUSES } from "@talkpilot/core-db"` when convenient.
469
+
455
470
 
456
471
  ## 🛠 CI/CD & deployment
457
472
 
@@ -4,6 +4,8 @@ export declare const CONFERENCE_ROLE_CUSTOMER: "customer";
4
4
  export declare const CONFERENCE_ROLE_SUPERVISOR: "supervisor";
5
5
  /** Live call — «בשיחה». Excludes Twilio `busy` (line busy / «תפוס»). */
6
6
  export declare const IN_CALL_STATUSES: readonly ["in-progress", "answered"];
7
+ /** Terminal Twilio call statuses — no further status callbacks expected. */
8
+ export declare const FINAL_STATUSES: readonly ["no-answer", "completed", "busy", "failed", "canceled"];
7
9
  /** Hours in a single day. */
8
10
  export declare const HOURS_PER_DAY = 24;
9
11
  /** Max execution time (ms) for calls statistics aggregations. */
@@ -1 +1 @@
1
- {"version":3,"file":"calls.constants.d.ts","sourceRoot":"","sources":["../../../src/talkpilot/calls/calls.constants.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,eAAO,MAAM,wBAAwB,EAAG,UAAmB,CAAC;AAE5D,gDAAgD;AAChD,eAAO,MAAM,0BAA0B,EAAG,YAAqB,CAAC;AAEhE,wEAAwE;AACxE,eAAO,MAAM,gBAAgB,sCAAuC,CAAC;AAErE,6BAA6B;AAC7B,eAAO,MAAM,aAAa,KAAK,CAAC;AAEhC,iEAAiE;AACjE,eAAO,MAAM,iBAAiB,QAAS,CAAC;AAExC;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAC/C,eAAO,MAAM,4BAA4B,IAAI,CAAC"}
1
+ {"version":3,"file":"calls.constants.d.ts","sourceRoot":"","sources":["../../../src/talkpilot/calls/calls.constants.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,eAAO,MAAM,wBAAwB,EAAG,UAAmB,CAAC;AAE5D,gDAAgD;AAChD,eAAO,MAAM,0BAA0B,EAAG,YAAqB,CAAC;AAEhE,wEAAwE;AACxE,eAAO,MAAM,gBAAgB,sCAAuC,CAAC;AAErE,4EAA4E;AAC5E,eAAO,MAAM,cAAc,mEAMjB,CAAC;AAEX,6BAA6B;AAC7B,eAAO,MAAM,aAAa,KAAK,CAAC;AAEhC,iEAAiE;AACjE,eAAO,MAAM,iBAAiB,QAAS,CAAC;AAExC;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAC/C,eAAO,MAAM,4BAA4B,IAAI,CAAC"}
@@ -1,12 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TREND_WEEK_BUCKET_MIN_MONTHS = exports.TREND_MONTH_BUCKET_MIN_MONTHS = exports.STATS_MAX_TIME_MS = exports.HOURS_PER_DAY = exports.IN_CALL_STATUSES = exports.CONFERENCE_ROLE_SUPERVISOR = exports.CONFERENCE_ROLE_CUSTOMER = void 0;
3
+ exports.TREND_WEEK_BUCKET_MIN_MONTHS = exports.TREND_MONTH_BUCKET_MIN_MONTHS = exports.STATS_MAX_TIME_MS = exports.HOURS_PER_DAY = exports.FINAL_STATUSES = exports.IN_CALL_STATUSES = exports.CONFERENCE_ROLE_SUPERVISOR = exports.CONFERENCE_ROLE_CUSTOMER = void 0;
4
4
  /** Customer role within a conference call. */
5
5
  exports.CONFERENCE_ROLE_CUSTOMER = "customer";
6
6
  /** Supervisor role within a conference call. */
7
7
  exports.CONFERENCE_ROLE_SUPERVISOR = "supervisor";
8
8
  /** Live call — «בשיחה». Excludes Twilio `busy` (line busy / «תפוס»). */
9
9
  exports.IN_CALL_STATUSES = ["in-progress", "answered"];
10
+ /** Terminal Twilio call statuses — no further status callbacks expected. */
11
+ exports.FINAL_STATUSES = [
12
+ "no-answer",
13
+ "completed",
14
+ "busy",
15
+ "failed",
16
+ "canceled",
17
+ ];
10
18
  /** Hours in a single day. */
11
19
  exports.HOURS_PER_DAY = 24;
12
20
  /** Max execution time (ms) for calls statistics aggregations. */
@@ -1 +1 @@
1
- {"version":3,"file":"calls.constants.js","sourceRoot":"","sources":["../../../src/talkpilot/calls/calls.constants.ts"],"names":[],"mappings":";;;AAAA,8CAA8C;AACjC,QAAA,wBAAwB,GAAG,UAAmB,CAAC;AAE5D,gDAAgD;AACnC,QAAA,0BAA0B,GAAG,YAAqB,CAAC;AAEhE,wEAAwE;AAC3D,QAAA,gBAAgB,GAAG,CAAC,aAAa,EAAE,UAAU,CAAU,CAAC;AAErE,6BAA6B;AAChB,QAAA,aAAa,GAAG,EAAE,CAAC;AAEhC,iEAAiE;AACpD,QAAA,iBAAiB,GAAG,MAAM,CAAC;AAExC;;;;;GAKG;AACU,QAAA,6BAA6B,GAAG,CAAC,CAAC;AAClC,QAAA,4BAA4B,GAAG,CAAC,CAAC"}
1
+ {"version":3,"file":"calls.constants.js","sourceRoot":"","sources":["../../../src/talkpilot/calls/calls.constants.ts"],"names":[],"mappings":";;;AAAA,8CAA8C;AACjC,QAAA,wBAAwB,GAAG,UAAmB,CAAC;AAE5D,gDAAgD;AACnC,QAAA,0BAA0B,GAAG,YAAqB,CAAC;AAEhE,wEAAwE;AAC3D,QAAA,gBAAgB,GAAG,CAAC,aAAa,EAAE,UAAU,CAAU,CAAC;AAErE,4EAA4E;AAC/D,QAAA,cAAc,GAAG;IAC5B,WAAW;IACX,WAAW;IACX,MAAM;IACN,QAAQ;IACR,UAAU;CACF,CAAC;AAEX,6BAA6B;AAChB,QAAA,aAAa,GAAG,EAAE,CAAC;AAEhC,iEAAiE;AACpD,QAAA,iBAAiB,GAAG,MAAM,CAAC;AAExC;;;;;GAKG;AACU,QAAA,6BAA6B,GAAG,CAAC,CAAC;AAClC,QAAA,4BAA4B,GAAG,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talkpilot/core-db",
3
- "version": "1.3.19",
3
+ "version": "1.3.20",
4
4
  "description": "Core database package for centralized connections and ORM integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -7,6 +7,15 @@ export const CONFERENCE_ROLE_SUPERVISOR = "supervisor" as const;
7
7
  /** Live call — «בשיחה». Excludes Twilio `busy` (line busy / «תפוס»). */
8
8
  export const IN_CALL_STATUSES = ["in-progress", "answered"] as const;
9
9
 
10
+ /** Terminal Twilio call statuses — no further status callbacks expected. */
11
+ export const FINAL_STATUSES = [
12
+ "no-answer",
13
+ "completed",
14
+ "busy",
15
+ "failed",
16
+ "canceled",
17
+ ] as const;
18
+
10
19
  /** Hours in a single day. */
11
20
  export const HOURS_PER_DAY = 24;
12
21