@vellumai/credential-executor 0.10.4-dev.202607022130.febf41d → 0.10.4-dev.202607022227.14c7770
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.
|
@@ -5,10 +5,8 @@ import {
|
|
|
5
5
|
normalizePublicBaseUrl,
|
|
6
6
|
} from "../ingress.js";
|
|
7
7
|
import {
|
|
8
|
-
buildTwilioConnectActionUrl,
|
|
9
8
|
buildTwilioMediaStreamUrl,
|
|
10
9
|
buildTwilioPhoneNumberWebhookUrls,
|
|
11
|
-
buildTwilioRelayUrl,
|
|
12
10
|
buildTwilioVoiceWebhookUrl,
|
|
13
11
|
resolveTwilioPublicBaseUrl,
|
|
14
12
|
} from "../twilio-ingress.js";
|
|
@@ -90,12 +88,6 @@ describe("Twilio ingress helpers", () => {
|
|
|
90
88
|
expect(buildTwilioVoiceWebhookUrl("https://example.test", "call-123")).toBe(
|
|
91
89
|
"https://example.test/webhooks/twilio/voice?callSessionId=call-123",
|
|
92
90
|
);
|
|
93
|
-
expect(buildTwilioConnectActionUrl("https://example.test")).toBe(
|
|
94
|
-
"https://example.test/webhooks/twilio/connect-action",
|
|
95
|
-
);
|
|
96
|
-
expect(buildTwilioRelayUrl("https://example.test")).toBe(
|
|
97
|
-
"wss://example.test/webhooks/twilio/relay",
|
|
98
|
-
);
|
|
99
91
|
expect(buildTwilioMediaStreamUrl("http://example.test")).toBe(
|
|
100
92
|
"ws://example.test/webhooks/twilio/media-stream",
|
|
101
93
|
);
|
|
@@ -2,9 +2,6 @@ import { normalizePublicBaseUrl } from "./ingress.js";
|
|
|
2
2
|
|
|
3
3
|
export const TWILIO_VOICE_WEBHOOK_PATH = "/webhooks/twilio/voice";
|
|
4
4
|
export const TWILIO_STATUS_WEBHOOK_PATH = "/webhooks/twilio/status";
|
|
5
|
-
export const TWILIO_CONNECT_ACTION_WEBHOOK_PATH =
|
|
6
|
-
"/webhooks/twilio/connect-action";
|
|
7
|
-
export const TWILIO_RELAY_WEBHOOK_PATH = "/webhooks/twilio/relay";
|
|
8
5
|
export const TWILIO_MEDIA_STREAM_WEBHOOK_PATH = "/webhooks/twilio/media-stream";
|
|
9
6
|
|
|
10
7
|
/**
|
|
@@ -13,9 +10,9 @@ export const TWILIO_MEDIA_STREAM_WEBHOOK_PATH = "/webhooks/twilio/media-stream";
|
|
|
13
10
|
* with the actual public URL (from Velay registration, config, or the
|
|
14
11
|
* `X-Vellum-Ingress-URL` header) before returning TwiML to Twilio.
|
|
15
12
|
*
|
|
16
|
-
* The placeholder uses `https://` so that `
|
|
17
|
-
*
|
|
18
|
-
*
|
|
13
|
+
* The placeholder uses `https://` so that `buildTwilioMediaStreamUrl` can
|
|
14
|
+
* apply the standard `http→ws` scheme conversion, producing
|
|
15
|
+
* `wss://__VELLUM_PUBLIC_BASE_URL__/…` in the output.
|
|
19
16
|
*/
|
|
20
17
|
export const TWILIO_PUBLIC_BASE_URL_PLACEHOLDER =
|
|
21
18
|
"https://__VELLUM_PUBLIC_BASE_URL__";
|
|
@@ -58,14 +55,6 @@ export function buildTwilioStatusWebhookUrl(baseUrl: string): string {
|
|
|
58
55
|
return `${baseUrl}${TWILIO_STATUS_WEBHOOK_PATH}`;
|
|
59
56
|
}
|
|
60
57
|
|
|
61
|
-
export function buildTwilioConnectActionUrl(baseUrl: string): string {
|
|
62
|
-
return `${baseUrl}${TWILIO_CONNECT_ACTION_WEBHOOK_PATH}`;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export function buildTwilioRelayUrl(baseUrl: string): string {
|
|
66
|
-
return `${toTwilioWebSocketBaseUrl(baseUrl)}${TWILIO_RELAY_WEBHOOK_PATH}`;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
58
|
export function buildTwilioMediaStreamUrl(baseUrl: string): string {
|
|
70
59
|
return `${toTwilioWebSocketBaseUrl(baseUrl)}${TWILIO_MEDIA_STREAM_WEBHOOK_PATH}`;
|
|
71
60
|
}
|