@sinch/functions-runtime 0.5.17 → 0.5.19

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
@@ -1887,11 +1887,17 @@ declare class MenuItemBuilder {
1887
1887
  *
1888
1888
  * Keys may be literal digits or regular expressions, and the platform evaluates them in
1889
1889
  * definition order with first match winning — so the order these are written in is part of
1890
- * the behaviour, not decoration. {@link build} refuses to emit a menu whose keys JSON
1891
- * cannot carry in that order; see the error it throws.
1890
+ * the behaviour, not decoration. {@link build} emits `matches` tagged with that order so it
1891
+ * survives `JSON.stringify`, which would otherwise hoist integer-like keys first.
1892
1892
  *
1893
- * @param pattern - Digits, or a regular expression source
1893
+ * The platform compiles every key as a regular expression (anchored, `^(?:key)$`), so a bare
1894
+ * metacharacter such as `*` or `+` is not a literal DTMF tone — it is an invalid pattern that
1895
+ * fails at deploy time. `match` rejects those up front instead. Escape a literal you mean, e.g.
1896
+ * `\*` for the star tone.
1897
+ *
1898
+ * @param pattern - Digits, `#`, or a regular expression source
1894
1899
  * @param flow - Commands to run on a match
1900
+ * @throws If `pattern` does not compile as a regular expression
1895
1901
  */
1896
1902
  match(pattern: string, flow: Flow): this;
1897
1903
  /**
@@ -1900,11 +1906,7 @@ declare class MenuItemBuilder {
1900
1906
  * @param flow - Commands to run
1901
1907
  */
1902
1908
  onFail(flow: Flow): this;
1903
- /**
1904
- * Emit the menu.
1905
- *
1906
- * @throws If the `matches` keys cannot be serialised in the order they were written
1907
- */
1909
+ /** Emit the menu. */
1908
1910
  build(): MenuItem;
1909
1911
  }
1910
1912
  /**
package/dist/index.js CHANGED
@@ -112,7 +112,7 @@ import {
112
112
  validateVoiceSignature,
113
113
  validateVoiceV1Request,
114
114
  verifyVoiceWebhook
115
- } from "./chunk-VEB6FXNI.js";
115
+ } from "./chunk-DX63ULIO.js";
116
116
  export {
117
117
  AceSvamlBuilder,
118
118
  AgentProvider,
@@ -785,11 +785,17 @@ export declare class MenuItemBuilder {
785
785
  *
786
786
  * Keys may be literal digits or regular expressions, and the platform evaluates them in
787
787
  * definition order with first match winning — so the order these are written in is part of
788
- * the behaviour, not decoration. {@link build} refuses to emit a menu whose keys JSON
789
- * cannot carry in that order; see the error it throws.
788
+ * the behaviour, not decoration. {@link build} emits `matches` tagged with that order so it
789
+ * survives `JSON.stringify`, which would otherwise hoist integer-like keys first.
790
790
  *
791
- * @param pattern - Digits, or a regular expression source
791
+ * The platform compiles every key as a regular expression (anchored, `^(?:key)$`), so a bare
792
+ * metacharacter such as `*` or `+` is not a literal DTMF tone — it is an invalid pattern that
793
+ * fails at deploy time. `match` rejects those up front instead. Escape a literal you mean, e.g.
794
+ * `\*` for the star tone.
795
+ *
796
+ * @param pattern - Digits, `#`, or a regular expression source
792
797
  * @param flow - Commands to run on a match
798
+ * @throws If `pattern` does not compile as a regular expression
793
799
  */
794
800
  match(pattern: string, flow: Flow): this;
795
801
  /**
@@ -798,11 +804,7 @@ export declare class MenuItemBuilder {
798
804
  * @param flow - Commands to run
799
805
  */
800
806
  onFail(flow: Flow): this;
801
- /**
802
- * Emit the menu.
803
- *
804
- * @throws If the `matches` keys cannot be serialised in the order they were written
805
- */
807
+ /** Emit the menu. */
806
808
  build(): MenuItem;
807
809
  }
808
810
  /**
@@ -1076,9 +1078,12 @@ export declare const REDACTED = "[redacted]";
1076
1078
  * ```
1077
1079
  */
1078
1080
  export declare function redactCredentials<T>(body: T): T;
1081
+ /** `JSON.stringify`, but honouring any {@link tagOrder} tag found on nested objects. */
1082
+ declare function stringify(value: unknown): string;
1079
1083
 
1080
1084
  export {
1081
1085
  Headers$1 as Headers,
1086
+ stringify as stringifyOrdered,
1082
1087
  };
1083
1088
 
1084
1089
  export {};
package/dist/voice/v2.js CHANGED
@@ -24,9 +24,10 @@ import {
24
24
  redactCredentials,
25
25
  resolveHandlerKey,
26
26
  resolveWebhookName,
27
+ stringify,
27
28
  toCallRequest,
28
29
  toWebhookResponse
29
- } from "../chunk-VEB6FXNI.js";
30
+ } from "../chunk-DX63ULIO.js";
30
31
  export {
31
32
  Client,
32
33
  CommandBuilder,
@@ -49,6 +50,7 @@ export {
49
50
  redactCredentials,
50
51
  resolveHandlerKey,
51
52
  resolveWebhookName,
53
+ stringify as stringifyOrdered,
52
54
  toCallRequest,
53
55
  toWebhookResponse
54
56
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinch/functions-runtime",
3
- "version": "0.5.17",
3
+ "version": "0.5.19",
4
4
  "description": "Node.js SDK and local development runtime for Sinch Functions: voice, messaging and HTTP serverless functions",
5
5
  "type": "module",
6
6
  "exports": {