@getdial/cli 0.40.1 → 0.41.0
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/cli.js
CHANGED
|
@@ -216,6 +216,8 @@ number
|
|
|
216
216
|
return n;
|
|
217
217
|
})
|
|
218
218
|
.option("--clear-max-call-duration", "remove the per-number call duration cap")
|
|
219
|
+
.option("--channel <imessage|whatsapp|both>", 'which display profile(s) --name and --avatar are written to; "both" sets one identity on every channel the number has, in a single call. Cannot be combined with --first-name/--last-name/--whatsapp-name/--whatsapp-avatar')
|
|
220
|
+
.option("--name <text>", 'display name for --channel (required alongside it); WhatsApp stores it verbatim (1-25 chars), iMessage splits it on the first space ("Maya Chen" -> Maya / Chen)')
|
|
219
221
|
.option("--first-name <text>", 'iMessage display first name shown beside this number\'s messages (iMessage numbers only); pass "" to clear')
|
|
220
222
|
.option("--last-name <text>", 'iMessage display last name (iMessage numbers only); pass "" to clear')
|
|
221
223
|
.option("--avatar <path-or-url>", "iMessage avatar photo (iMessage numbers only): a local image file (jpeg/png/gif/webp, max 5 MB) to upload, or a public image URL to fetch. Replaces the current photo; photos can't be removed")
|
|
@@ -238,6 +240,8 @@ number
|
|
|
238
240
|
inboundLanguage: opts.inboundLanguage,
|
|
239
241
|
nickname: opts.nickname,
|
|
240
242
|
maxCallDurationSeconds,
|
|
243
|
+
channel: opts.channel,
|
|
244
|
+
name: opts.name,
|
|
241
245
|
firstName: opts.firstName,
|
|
242
246
|
lastName: opts.lastName,
|
|
243
247
|
avatar: opts.avatar,
|
|
@@ -14,6 +14,8 @@ export async function runNumberSet(opts) {
|
|
|
14
14
|
...(opts.maxCallDurationSeconds !== undefined
|
|
15
15
|
? { maxCallDurationSeconds: opts.maxCallDurationSeconds }
|
|
16
16
|
: {}),
|
|
17
|
+
...(opts.channel !== undefined ? { channel: opts.channel } : {}),
|
|
18
|
+
...(opts.name !== undefined ? { name: opts.name } : {}),
|
|
17
19
|
...(opts.firstName !== undefined ? { firstName: opts.firstName } : {}),
|
|
18
20
|
...(opts.lastName !== undefined ? { lastName: opts.lastName } : {}),
|
|
19
21
|
...(opts.avatar !== undefined ? { avatar: opts.avatar } : {}),
|
package/dist/lib/ops/numbers.js
CHANGED
|
@@ -117,6 +117,10 @@ export async function setNumberProperties(opts) {
|
|
|
117
117
|
body.nickname = opts.nickname;
|
|
118
118
|
if (opts.maxCallDurationSeconds !== undefined)
|
|
119
119
|
body.maxCallDurationSeconds = opts.maxCallDurationSeconds;
|
|
120
|
+
if (opts.channel !== undefined)
|
|
121
|
+
body.channel = opts.channel;
|
|
122
|
+
if (opts.name !== undefined)
|
|
123
|
+
body.name = opts.name;
|
|
120
124
|
if (opts.firstName !== undefined)
|
|
121
125
|
body.firstName = opts.firstName;
|
|
122
126
|
if (opts.lastName !== undefined)
|
|
@@ -137,7 +141,7 @@ export async function setNumberProperties(opts) {
|
|
|
137
141
|
if (opts.whatsappAvatar !== undefined && !whatsappAvatarFile)
|
|
138
142
|
body.whatsappAvatarUrl = opts.whatsappAvatar;
|
|
139
143
|
if (Object.keys(body).length === 0 && !avatarFile && !whatsappAvatarFile) {
|
|
140
|
-
throw new DialError("bad_request", "Provide at least one property to update (inboundInstruction, inboundVoiceGender, inboundLanguage, nickname, maxCallDurationSeconds, calling, firstName, lastName, avatar, whatsappName, or whatsappAvatar).");
|
|
144
|
+
throw new DialError("bad_request", "Provide at least one property to update (inboundInstruction, inboundVoiceGender, inboundLanguage, nickname, maxCallDurationSeconds, calling, channel with name/avatar, firstName, lastName, avatar, whatsappName, or whatsappAvatar).");
|
|
141
145
|
}
|
|
142
146
|
const auth = maybeAuth();
|
|
143
147
|
// The REST API keys numbers by id; the CLI/tool takes the E.164 number for ergonomics,
|
|
@@ -29,6 +29,15 @@ const inputSchema = {
|
|
|
29
29
|
.nullable()
|
|
30
30
|
.optional()
|
|
31
31
|
.describe("Call duration cap for this number, in seconds, applied as a hard ceiling to both inbound and outbound calls (the smallest of the per-number, account, and per-call caps wins). On a free account (no top-up or subscription yet) a value above 300 is rejected with 400. Pass null to clear the cap; omit to leave it unchanged."),
|
|
32
|
+
channel: z
|
|
33
|
+
.enum(["imessage", "whatsapp", "both"])
|
|
34
|
+
.optional()
|
|
35
|
+
.describe('Which display profile(s) `name` and `avatarUrl` are written to: "imessage", "whatsapp", or "both". Use this when the number should present the same identity everywhere — one call instead of two, validated against every targeted channel before any of them is written, so the profiles cannot drift apart. Cannot be combined with firstName/lastName/whatsappName/whatsappAvatarUrl.'),
|
|
36
|
+
name: z
|
|
37
|
+
.string()
|
|
38
|
+
.min(1)
|
|
39
|
+
.optional()
|
|
40
|
+
.describe('The display name to set on the channel(s) `channel` names; requires `channel`. WhatsApp stores it verbatim (1-25 chars); iMessage has no single-name field, so it is split on the first space — "Ana Lee" becomes firstName "Ana", lastName "Lee".'),
|
|
32
41
|
firstName: z
|
|
33
42
|
.string()
|
|
34
43
|
.max(30)
|
|
@@ -62,7 +71,7 @@ export const setNumberPropertiesTool = {
|
|
|
62
71
|
name: "set_number_properties",
|
|
63
72
|
config: {
|
|
64
73
|
title: "Set Number Properties",
|
|
65
|
-
description:
|
|
74
|
+
description: 'Update a phone number\'s properties: its inbound instruction (the system prompt for inbound calls), inbound voice gender, inbound language, nickname, whether calling is switched on at all (callingEnabled), and its display identity. For the display identity prefer `channel` ("imessage", "whatsapp", or "both") with `name`/`avatarUrl` — one call that keeps every channel\'s profile identical. The per-channel fields remain for when the profiles differ: firstName/lastName/avatarUrl for iMessage, whatsappName/whatsappAvatarUrl for WhatsApp-ready numbers. Provide at least one property, and don\'t mix `channel` with the per-channel fields.',
|
|
66
75
|
inputSchema,
|
|
67
76
|
outputSchema: { number: phoneNumberSchema },
|
|
68
77
|
annotations: { openWorldHint: true },
|
|
@@ -81,6 +90,8 @@ export const setNumberPropertiesTool = {
|
|
|
81
90
|
...(args.maxCallDurationSeconds !== undefined
|
|
82
91
|
? { maxCallDurationSeconds: args.maxCallDurationSeconds }
|
|
83
92
|
: {}),
|
|
93
|
+
...(args.channel !== undefined ? { channel: args.channel } : {}),
|
|
94
|
+
...(args.name !== undefined ? { name: args.name } : {}),
|
|
84
95
|
...(args.firstName !== undefined ? { firstName: args.firstName } : {}),
|
|
85
96
|
...(args.whatsappName !== undefined ? { whatsappName: args.whatsappName } : {}),
|
|
86
97
|
...(args.callingEnabled !== undefined
|
package/package.json
CHANGED
package/skills.tar.gz
CHANGED
|
Binary file
|