@getdial/cli 0.15.0 → 0.15.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/dist/mcp/schemas.js +18 -4
- package/package.json +1 -1
- package/skills.tar.gz +0 -0
package/dist/mcp/schemas.js
CHANGED
|
@@ -4,6 +4,20 @@ import { z } from "zod";
|
|
|
4
4
|
* `.passthrough()` so extra fields aren't stripped from `structuredContent`.
|
|
5
5
|
* Mirrors the remote server's schemas so the two surfaces stay aligned.
|
|
6
6
|
*/
|
|
7
|
+
// Status is either a simple string (e.g. a message's "queued"/"delivered") or a
|
|
8
|
+
// structured call-status object. `.passthrough()` tolerates extra provider fields.
|
|
9
|
+
const callStatusObjectSchema = z
|
|
10
|
+
.object({
|
|
11
|
+
state: z.string().nullish().describe('Lifecycle state, e.g. "Terminated", "Registered"'),
|
|
12
|
+
terminationType: z.string().nullish().describe('How it ended, e.g. "completed", "no-answer" (null until the call ends)'),
|
|
13
|
+
label: z.string().nullish().describe('Human-readable status, e.g. "Completed"'),
|
|
14
|
+
cancelRequested: z.boolean().nullish(),
|
|
15
|
+
cancelPending: z.boolean().nullish(),
|
|
16
|
+
})
|
|
17
|
+
.passthrough();
|
|
18
|
+
const statusSchema = z
|
|
19
|
+
.union([z.string(), callStatusObjectSchema])
|
|
20
|
+
.describe("Status — a plain string, or a structured call-status object");
|
|
7
21
|
export const phoneNumberSchema = z
|
|
8
22
|
.object({
|
|
9
23
|
id: z.string().describe("Phone number id (pn_…)"),
|
|
@@ -20,7 +34,7 @@ export const messageSchema = z
|
|
|
20
34
|
body: z.string(),
|
|
21
35
|
channel: z.string().optional(),
|
|
22
36
|
direction: z.string().optional(),
|
|
23
|
-
status:
|
|
37
|
+
status: statusSchema,
|
|
24
38
|
createdAt: z.string().optional(),
|
|
25
39
|
})
|
|
26
40
|
.passthrough();
|
|
@@ -30,9 +44,9 @@ export const callSchema = z
|
|
|
30
44
|
from: z.string(),
|
|
31
45
|
to: z.string(),
|
|
32
46
|
direction: z.string().optional(),
|
|
33
|
-
status:
|
|
34
|
-
duration: z.number().
|
|
35
|
-
transcript: z.string().
|
|
47
|
+
status: statusSchema,
|
|
48
|
+
duration: z.number().nullish(),
|
|
49
|
+
transcript: z.string().nullish(),
|
|
36
50
|
instruction: z.string().nullable().optional(),
|
|
37
51
|
createdAt: z.string().optional(),
|
|
38
52
|
})
|
package/package.json
CHANGED
package/skills.tar.gz
CHANGED
|
Binary file
|