@sinch/functions-runtime 0.7.0 → 0.7.1

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
@@ -1977,12 +1977,15 @@ declare class PromptBuilder {
1977
1977
  *
1978
1978
  * @param text - Text to synthesise, or an SSML document when `format` is `SSML`
1979
1979
  * @param options - Voice and format overrides
1980
+ * @throws If `text` is over 600 characters (prompts are never split), or the prompt would hold
1981
+ * more than 10 messages
1980
1982
  */
1981
1983
  say(text: string, options?: SayOptions): this;
1982
1984
  /**
1983
1985
  * Play an audio file.
1984
1986
  *
1985
1987
  * @param url - Publicly reachable URL of the audio file
1988
+ * @throws If the prompt would hold more than 10 messages
1986
1989
  */
1987
1990
  play(url: string): this;
1988
1991
  /**
@@ -2006,12 +2009,14 @@ declare class MenuItemBuilder {
2006
2009
  * Prompt played when the menu is entered.
2007
2010
  *
2008
2011
  * @param prompt - Plain text, a {@link PromptBuilder}, or a callback receiving one
2012
+ * @throws If any prompt text is over 600 characters, or a callback queues more than 10 messages
2009
2013
  */
2010
2014
  prompt(prompt: PromptFlow): this;
2011
2015
  /**
2012
2016
  * Prompt played on each retry. Falls back to `prompt` when unset.
2013
2017
  *
2014
2018
  * @param prompt - Plain text, a {@link PromptBuilder}, or a callback receiving one
2019
+ * @throws If any prompt text is over 600 characters, or a callback queues more than 10 messages
2015
2020
  */
2016
2021
  repeatPrompt(prompt: PromptFlow): this;
2017
2022
  /**
@@ -2137,16 +2142,20 @@ export declare class CommandBuilder {
2137
2142
  /** Set only on the builder `onCall` injects — see {@link FlowScope} */
2138
2143
  private scope?;
2139
2144
  /**
2140
- * Speak text on the call.
2145
+ * Speak text on the call. `TEXT` over 600 characters is split between sentences into
2146
+ * consecutive messages.
2141
2147
  *
2142
2148
  * @param text - Text to synthesise, or an SSML document when `format` is `SSML`
2143
2149
  * @param options - Voice and format overrides
2150
+ * @throws If a sentence, or any SSML document, is over 600 characters, or the pending
2151
+ * messages would pass 10 items
2144
2152
  */
2145
2153
  say(text: string, options?: SayOptions): this;
2146
2154
  /**
2147
2155
  * Play an audio file on the call.
2148
2156
  *
2149
2157
  * @param url - Publicly reachable URL of the audio file
2158
+ * @throws If the pending messages would pass 10 items
2150
2159
  */
2151
2160
  play(url: string): this;
2152
2161
  /**
package/dist/index.js CHANGED
@@ -143,7 +143,7 @@ import {
143
143
  validateVoiceV1Request,
144
144
  verifyVoiceWebhook,
145
145
  voiceRelay
146
- } from "./chunk-DLBCKZ6X.js";
146
+ } from "./chunk-5K5FDUEL.js";
147
147
  export {
148
148
  AGENT_HEADER_TOKEN,
149
149
  AGENT_STREAM_PATH,
@@ -1053,12 +1053,15 @@ export declare class PromptBuilder {
1053
1053
  *
1054
1054
  * @param text - Text to synthesise, or an SSML document when `format` is `SSML`
1055
1055
  * @param options - Voice and format overrides
1056
+ * @throws If `text` is over 600 characters (prompts are never split), or the prompt would hold
1057
+ * more than 10 messages
1056
1058
  */
1057
1059
  say(text: string, options?: SayOptions): this;
1058
1060
  /**
1059
1061
  * Play an audio file.
1060
1062
  *
1061
1063
  * @param url - Publicly reachable URL of the audio file
1064
+ * @throws If the prompt would hold more than 10 messages
1062
1065
  */
1063
1066
  play(url: string): this;
1064
1067
  /**
@@ -1088,12 +1091,14 @@ export declare class MenuItemBuilder {
1088
1091
  * Prompt played when the menu is entered.
1089
1092
  *
1090
1093
  * @param prompt - Plain text, a {@link PromptBuilder}, or a callback receiving one
1094
+ * @throws If any prompt text is over 600 characters, or a callback queues more than 10 messages
1091
1095
  */
1092
1096
  prompt(prompt: PromptFlow): this;
1093
1097
  /**
1094
1098
  * Prompt played on each retry. Falls back to `prompt` when unset.
1095
1099
  *
1096
1100
  * @param prompt - Plain text, a {@link PromptBuilder}, or a callback receiving one
1101
+ * @throws If any prompt text is over 600 characters, or a callback queues more than 10 messages
1097
1102
  */
1098
1103
  repeatPrompt(prompt: PromptFlow): this;
1099
1104
  /**
package/dist/voice/v2.js CHANGED
@@ -40,7 +40,7 @@ import {
40
40
  toWebhookRequest,
41
41
  tool,
42
42
  voiceRelay
43
- } from "../chunk-DLBCKZ6X.js";
43
+ } from "../chunk-5K5FDUEL.js";
44
44
  export {
45
45
  Client,
46
46
  CommandBuilder,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinch/functions-runtime",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
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": {