@sinch/functions-runtime 0.5.7 → 0.5.8

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/index.d.ts CHANGED
@@ -2436,16 +2436,20 @@ export declare function getProtectionMode(config?: Record<string, unknown>): Web
2436
2436
  */
2437
2437
  export declare function createSecurityOptions(config?: Record<string, unknown>): SecurityOptions;
2438
2438
  /**
2439
- * Converts an E.164 phone number to local/national format.
2439
+ * Converts a phone number to local/national format.
2440
2440
  *
2441
- * @param phoneNumber - The phone number in E.164 format (e.g., "+15551234567")
2442
- * @param defaultRegion - The default region code (default: "US")
2443
- * @returns The phone number in national format, or the original if conversion fails
2441
+ * Numbers without a country code are parsed as belonging to `defaultRegion`,
2442
+ * which matches the behaviour of the C# runtime's `VoiceHelpers`.
2443
+ *
2444
+ * @param phoneNumber - The phone number, E.164 (e.g., "+15551234567") or national (e.g., "5551234567")
2445
+ * @param defaultRegion - ISO 3166-1 alpha-2 region used to parse numbers without a country code (default: "US")
2446
+ * @returns The phone number in national format, or the original if it cannot be parsed
2444
2447
  *
2445
2448
  * @example
2446
2449
  * ```typescript
2447
- * toLocalPhoneNumber('+15551234567'); // Returns "(555) 123-4567"
2448
- * toLocalPhoneNumber('+442071234567'); // Returns "020 7123 4567"
2450
+ * toLocalPhoneNumber('+15551234567'); // Returns "(555) 123-4567"
2451
+ * toLocalPhoneNumber('+442071234567'); // Returns "020 7123 4567"
2452
+ * toLocalPhoneNumber('0701234567', 'SE'); // Returns "070-123 45 67"
2449
2453
  * ```
2450
2454
  */
2451
2455
  export declare function toLocalPhoneNumber(phoneNumber: string, defaultRegion?: string): string;
package/dist/index.js CHANGED
@@ -96,7 +96,7 @@ import {
96
96
  tryAutoConfigureAsync,
97
97
  validateBasicAuth,
98
98
  validateVoiceRequest
99
- } from "./chunk-DEFB2NIH.js";
99
+ } from "./chunk-LU5JRQ64.js";
100
100
  export {
101
101
  AceSvamlBuilder,
102
102
  AgentProvider,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinch/functions-runtime",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "description": "Development runtime for Sinch Functions - serverless voice applications",
5
5
  "type": "module",
6
6
  "exports": {