@qcobro/common 1.38.0 → 1.38.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.
|
@@ -29,14 +29,28 @@ export declare const voiceConversationEventSchema: z.ZodObject<{
|
|
|
29
29
|
export type VoiceConversationEvent = z.infer<typeof voiceConversationEventSchema>;
|
|
30
30
|
/**
|
|
31
31
|
* In-process completion signal for a PRE-RECORDED call, reported by the co-located
|
|
32
|
-
* VoiceServer (not an HTTP callback like Voz IA).
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
32
|
+
* VoiceServer (not an HTTP callback like Voz IA).
|
|
33
|
+
*
|
|
34
|
+
* `answered` and `scriptCompleted` are two different facts and both are needed:
|
|
35
|
+
* `answered` says the callee picked up, `scriptCompleted` says the message actually
|
|
36
|
+
* played out to the end. A call can be answered and play nothing — a network element
|
|
37
|
+
* that answers and clears immediately, or a session that dies mid-verb — and only the
|
|
38
|
+
* pair distinguishes that from a real delivery. `entrega` is DELIVERED only when both
|
|
39
|
+
* hold; see `recordPrerecordedOutcome`.
|
|
40
|
+
*
|
|
41
|
+
* `scriptCompleted` is never a claim that a human listened, only that we played it.
|
|
42
|
+
* It defaults to `false` so a caller that omits it under-claims rather than
|
|
43
|
+
* over-claims delivery.
|
|
44
|
+
*
|
|
45
|
+
* `answeredSeconds` is the answer→hangup duration (0 when unanswered), recorded even
|
|
46
|
+
* when the script did not play — the time on the line is real either way.
|
|
47
|
+
* `scriptDurationSeconds` is the nominal length of the synthesized clip, stored so a
|
|
48
|
+
* future report can compare it against the answered duration.
|
|
36
49
|
*/
|
|
37
50
|
export declare const prerecordedCompletionSchema: z.ZodObject<{
|
|
38
51
|
providerRef: z.ZodString;
|
|
39
52
|
answered: z.ZodBoolean;
|
|
53
|
+
scriptCompleted: z.ZodDefault<z.ZodBoolean>;
|
|
40
54
|
answeredSeconds: z.ZodNumber;
|
|
41
55
|
scriptDurationSeconds: z.ZodOptional<z.ZodNumber>;
|
|
42
56
|
at: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voiceEvent.d.ts","sourceRoot":"","sources":["../../src/schemas/voiceEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;EAAyD,CAAC;AAC3F,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,sBAAsB,wCAAoC,CAAC;AAExE,eAAO,MAAM,4BAA4B;;;;;;;;;;;iBAQvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF
|
|
1
|
+
{"version":3,"file":"voiceEvent.d.ts","sourceRoot":"","sources":["../../src/schemas/voiceEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;EAAyD,CAAC;AAC3F,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,sBAAsB,wCAAoC,CAAC;AAExE,eAAO,MAAM,4BAA4B;;;;;;;;;;;iBAQvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,2BAA2B;;;;;;;iBAOtC,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAErF;;;;;;;;GAQG;AACH,eAAO,MAAM,iCAAiC;;;;;iBAK5C,CAAC;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAEjG,uFAAuF;AACvF,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,OAAO,GAAG,UAAU,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,GAC9D,cAAc,EAAE,CAQlB"}
|
|
@@ -21,14 +21,28 @@ export const voiceConversationEventSchema = z.object({
|
|
|
21
21
|
});
|
|
22
22
|
/**
|
|
23
23
|
* In-process completion signal for a PRE-RECORDED call, reported by the co-located
|
|
24
|
-
* VoiceServer (not an HTTP callback like Voz IA).
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
24
|
+
* VoiceServer (not an HTTP callback like Voz IA).
|
|
25
|
+
*
|
|
26
|
+
* `answered` and `scriptCompleted` are two different facts and both are needed:
|
|
27
|
+
* `answered` says the callee picked up, `scriptCompleted` says the message actually
|
|
28
|
+
* played out to the end. A call can be answered and play nothing — a network element
|
|
29
|
+
* that answers and clears immediately, or a session that dies mid-verb — and only the
|
|
30
|
+
* pair distinguishes that from a real delivery. `entrega` is DELIVERED only when both
|
|
31
|
+
* hold; see `recordPrerecordedOutcome`.
|
|
32
|
+
*
|
|
33
|
+
* `scriptCompleted` is never a claim that a human listened, only that we played it.
|
|
34
|
+
* It defaults to `false` so a caller that omits it under-claims rather than
|
|
35
|
+
* over-claims delivery.
|
|
36
|
+
*
|
|
37
|
+
* `answeredSeconds` is the answer→hangup duration (0 when unanswered), recorded even
|
|
38
|
+
* when the script did not play — the time on the line is real either way.
|
|
39
|
+
* `scriptDurationSeconds` is the nominal length of the synthesized clip, stored so a
|
|
40
|
+
* future report can compare it against the answered duration.
|
|
28
41
|
*/
|
|
29
42
|
export const prerecordedCompletionSchema = z.object({
|
|
30
43
|
providerRef: z.string().min(1),
|
|
31
44
|
answered: z.boolean(),
|
|
45
|
+
scriptCompleted: z.boolean().default(false),
|
|
32
46
|
answeredSeconds: z.number().int().nonnegative(),
|
|
33
47
|
scriptDurationSeconds: z.number().int().nonnegative().optional(),
|
|
34
48
|
at: z.string().min(1)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"voiceEvent.js","sourceRoot":"","sources":["../../src/schemas/voiceEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,sBAAsB,EAAE,oBAAoB,CAAC,CAAC,CAAC;AAG3F;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAExE,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,SAAS,EAAE,oBAAoB;IAC/B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,QAAQ,EAAE;IACvD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;CAC3D,CAAC,CAAC;AAGH
|
|
1
|
+
{"version":3,"file":"voiceEvent.js","sourceRoot":"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