@sinch/voice 1.2.1 → 1.3.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.
Files changed (68) hide show
  1. package/dist/models/v1/answering-machine-detection/answering-machine-detection.d.ts +8 -0
  2. package/dist/models/v1/answering-machine-detection/answering-machine-detection.js +3 -0
  3. package/dist/models/v1/answering-machine-detection/answering-machine-detection.js.map +1 -0
  4. package/dist/models/v1/answering-machine-detection/index.d.ts +1 -0
  5. package/dist/models/v1/answering-machine-detection/index.js.map +1 -0
  6. package/dist/models/v1/assign-numbers/assign-numbers.d.ts +2 -1
  7. package/dist/models/v1/conference-callout-request/conference-callout-request.d.ts +8 -8
  8. package/dist/models/v1/conference-dtmf-options/conference-dtmf-options.d.ts +2 -2
  9. package/dist/models/v1/custom-callout-request/custom-callout-request.d.ts +6 -6
  10. package/dist/models/v1/destination/destination.d.ts +52 -4
  11. package/dist/models/v1/destination/index.d.ts +1 -1
  12. package/dist/models/v1/enums.d.ts +21 -4
  13. package/dist/models/v1/get-call-information/get-call-information.d.ts +3 -3
  14. package/dist/models/v1/get-callbacks/get-callbacks.d.ts +3 -0
  15. package/dist/models/v1/get-conference-info-response/get-conference-info-response.d.ts +1 -1
  16. package/dist/models/v1/helper.d.ts +5 -1
  17. package/dist/models/v1/helper.js +9 -0
  18. package/dist/models/v1/helper.js.map +1 -1
  19. package/dist/models/v1/index.d.ts +1 -1
  20. package/dist/models/v1/index.js +1 -1
  21. package/dist/models/v1/index.js.map +1 -1
  22. package/dist/models/v1/list-numbers-response/list-numbers-response.d.ts +2 -1
  23. package/dist/models/v1/manage-conference-participant-request/manage-conference-participant-request.d.ts +1 -1
  24. package/dist/models/v1/menu/menu.d.ts +3 -3
  25. package/dist/models/v1/mod-callbacks/ace-request/ace-request.d.ts +2 -9
  26. package/dist/models/v1/mod-callbacks/ace-request/index.d.ts +1 -1
  27. package/dist/models/v1/mod-callbacks/dice-request/dice-request.d.ts +7 -6
  28. package/dist/models/v1/mod-callbacks/dice-request/index.d.ts +1 -1
  29. package/dist/models/v1/mod-callbacks/ice-request/ice-request.d.ts +6 -5
  30. package/dist/models/v1/mod-callbacks/ice-response/ice-response.d.ts +2 -2
  31. package/dist/models/v1/mod-callbacks/notify-request/notify-request.d.ts +5 -10
  32. package/dist/models/v1/mod-callbacks/pie-request/index.d.ts +1 -1
  33. package/dist/models/v1/mod-callbacks/pie-request/pie-request.d.ts +2 -3
  34. package/dist/models/v1/mod-svaml/index.d.ts +1 -0
  35. package/dist/models/v1/mod-svaml/index.js +1 -0
  36. package/dist/models/v1/mod-svaml/index.js.map +1 -1
  37. package/dist/models/v1/mod-svaml/svaml-action-connect-conf/svaml-action-connect-conf.d.ts +2 -2
  38. package/dist/models/v1/mod-svaml/svaml-action-connect-mxp/svaml-action-connect-mxp.d.ts +4 -4
  39. package/dist/models/v1/mod-svaml/svaml-action-connect-pstn/svaml-action-connect-pstn.d.ts +2 -2
  40. package/dist/models/v1/mod-svaml/svaml-action-connect-sip/index.d.ts +1 -1
  41. package/dist/models/v1/mod-svaml/svaml-action-connect-sip/svaml-action-connect-sip.d.ts +6 -11
  42. package/dist/models/v1/mod-svaml/svaml-action-connect-stream/index.d.ts +1 -0
  43. package/dist/models/v1/{participant/participant.js → mod-svaml/svaml-action-connect-stream/index.js} +1 -1
  44. package/dist/models/v1/mod-svaml/svaml-action-connect-stream/index.js.map +1 -0
  45. package/dist/models/v1/mod-svaml/svaml-action-connect-stream/svaml-action-connect-stream.d.ts +16 -0
  46. package/dist/models/v1/mod-svaml/svaml-action-connect-stream/svaml-action-connect-stream.js +3 -0
  47. package/dist/models/v1/mod-svaml/svaml-action-connect-stream/svaml-action-connect-stream.js.map +1 -0
  48. package/dist/models/v1/mod-svaml/svaml-action-continue/svaml-action-continue.d.ts +1 -1
  49. package/dist/models/v1/mod-svaml/svaml-action-hangup/svaml-action-hangup.d.ts +1 -1
  50. package/dist/models/v1/mod-svaml/svaml-action-park/svaml-action-park.d.ts +1 -1
  51. package/dist/models/v1/mod-svaml/svaml-action-run-menu/svaml-action-run-menu.d.ts +2 -2
  52. package/dist/models/v1/mod-svaml/svaml-instruction/svaml-instruction.d.ts +1 -1
  53. package/dist/models/v1/mod-svaml/svaml-instruction-play-files/svaml-instruction-play-files.d.ts +1 -1
  54. package/dist/models/v1/mod-svaml/svaml-instruction-say/svaml-instruction-say.d.ts +1 -1
  55. package/dist/models/v1/mod-svaml/svaml-instruction-start-recording/svaml-instruction-start-recording.d.ts +1 -1
  56. package/dist/models/v1/option/option.d.ts +5 -1
  57. package/dist/models/v1/query-number-response/query-number-response.d.ts +5 -2
  58. package/dist/models/v1/requests/calls/calls-request-data.d.ts +1 -1
  59. package/dist/models/v1/tts-callout-request/tts-callout-request.d.ts +4 -4
  60. package/dist/models/v1/unassign-numbers/unassign-numbers.d.ts +1 -1
  61. package/dist/rest/v1/callbacks/callbacks-webhook.js +3 -0
  62. package/dist/rest/v1/callbacks/callbacks-webhook.js.map +1 -1
  63. package/package.json +2 -2
  64. package/dist/models/v1/participant/index.d.ts +0 -1
  65. package/dist/models/v1/participant/index.js.map +0 -1
  66. package/dist/models/v1/participant/participant.d.ts +0 -9
  67. package/dist/models/v1/participant/participant.js.map +0 -1
  68. /package/dist/models/v1/{participant → answering-machine-detection}/index.js +0 -0
@@ -0,0 +1,8 @@
1
+ export interface AnsweringMachineDetection {
2
+ /** The determination by the system of who answered the call. */
3
+ status?: 'machine' | 'human' | 'notsure' | 'hangup' | string;
4
+ /** The reason that the system used to determine who answered the call. */
5
+ reason?: 'longgreeting' | 'initialsilence' | 'greeting' | 'beep' | 'n/a' | string;
6
+ /** The length of the call. */
7
+ duration?: number;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=answering-machine-detection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"answering-machine-detection.js","sourceRoot":"","sources":["../../../../src/models/v1/answering-machine-detection/answering-machine-detection.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export type { AnsweringMachineDetection } from './answering-machine-detection';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/answering-machine-detection/index.ts"],"names":[],"mappings":""}
@@ -1,8 +1,9 @@
1
+ import { Capability } from '../enums';
1
2
  export interface AssignNumbers {
2
3
  /** The phone number or list of numbers in E.164 format. */
3
4
  numbers?: string[];
4
5
  /** indicates the application where the number(s) will be assigned. If empty, the application key that is used to sign the request will be used. */
5
6
  applicationkey?: string;
6
7
  /** indicates the DID capability that needs to be assigned to the chosen application. Valid values are 'voice' and 'sms'. Please note that the DID needs to support the selected capability. */
7
- capability?: 'voice' | 'sms';
8
+ capability?: Capability;
8
9
  }
@@ -1,17 +1,17 @@
1
- import { Destination } from '../destination';
1
+ import { CalloutDestination } from '../destination';
2
2
  import { ConferenceDtmfOptions } from '../conference-dtmf-options';
3
- import { MusicOnHold } from '../enums';
3
+ import { Domain, MusicOnHold } from '../enums';
4
4
  /**
5
5
  * The conference callout calls a phone number or a user. When the call is answered, it's connected to a conference room.
6
6
  */
7
7
  export interface ConferenceCalloutRequest {
8
8
  /** The number that will be displayed as the incoming caller. To set your own CLI, you may use your verified number or your Dashboard number. The number must be in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format. */
9
9
  cli?: string;
10
- /** @see Destination */
11
- destination: Destination;
10
+ /** The type of device and number or endpoint to call. */
11
+ destination: CalloutDestination;
12
12
  /** The conferenceId of the conference to which you want the callee to join. If the conferenceId doesn't exist a conference room will be created. */
13
13
  conferenceId: string;
14
- /** Options to control how DTMF signals are used by the participant in the conference. For information on how to use this feature, read more [here](../../../conference-dtmf). */
14
+ /** Options to control how DTMF signals are used by the participant in the conference. For information on how to use this feature, read more [here](https://developers.sinch.com/docs/voice/api-reference/conference-dtmf). */
15
15
  conferenceDtmfOptions?: ConferenceDtmfOptions;
16
16
  /** When the destination picks up, this DTMF tones will be played to the callee. Valid characters in the string are "0"-"9", "#" and "w". A "w" will render a 500 ms pause. Example: "ww1234#w#" will render a 1s pause, the DTMF tones "1", "2", "3", "4" and "#" followed by a 0.5s pause and finally the DTMF tone for "#". This can be used if the callout destination for instance require a conference PIN code or an extension to be entered. */
17
17
  dtmf?: string;
@@ -22,7 +22,7 @@ export interface ConferenceCalloutRequest {
22
22
  enableDice?: boolean;
23
23
  /** If `enablePie` is set to true and the application has a callback URL specified, you will receive a PIE callback after a `runMenu` action, with the information of the action that the user took. If it's set to false, no PIE event will be sent to your backend. */
24
24
  enablePie?: boolean;
25
- /** The voice and language you want to use for the prompts. This can either be defined by the ISO 639 locale and language code or by specifying a particular voice. Supported languages and voices are detailed [here](../../../voice-locales/) */
25
+ /** The voice and language you want to use for the prompts. This can either be defined by the ISO 639 locale and language code or by specifying a particular voice. Supported languages and voices are detailed [here](https://developers.sinch.com/docs/voice/api-reference/voice-locales/) */
26
26
  locale?: string;
27
27
  /** The text that will be spoken as a greeting. */
28
28
  greeting?: string;
@@ -30,6 +30,6 @@ export interface ConferenceCalloutRequest {
30
30
  mohClass?: MusicOnHold;
31
31
  /** Used to input custom data. */
32
32
  custom?: string;
33
- /** can be either “pstn” for PSTN endpoint or “mxp” for data (app or web) clients. */
34
- domain?: string;
33
+ /** @see Domain */
34
+ domain?: Domain;
35
35
  }
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Options to control how DTMF signals are used by the participant in the conference. For information on how to use this feature, read more [here](../../conference-dtmf).
2
+ * Options to control how DTMF signals are used by the participant in the conference. For information on how to use this feature, read more [here](https://developers.sinch.com/docs/voice/api-reference/conference-dtmf).
3
3
  */
4
4
  export interface ConferenceDtmfOptions {
5
5
  /** Determines what DTMF mode the participant will use in the call. */
6
- mode?: 'ignore' | 'forward' | 'detect';
6
+ mode?: 'ignore' | 'forward' | 'detect' | string;
7
7
  /** The maximum number of accepted digits before sending the collected input via a PIE callback. The default value is `1`. If the value is greater than `1`, the PIE callback is triggered by one of the three following events: - No additional digit is entered before the `timeoutMills` timeout period has elapsed. - The `#` character is entered. - The maximum number of digits has been entered. */
8
8
  maxDigits?: number;
9
9
  /** The number of milliseconds that the system will wait between entered digits before triggering the PIE callback. The default value is `3000`. */
@@ -1,22 +1,22 @@
1
- import { Destination } from '../destination';
1
+ import { CalloutDestination } from '../destination';
2
2
  /**
3
3
  * The custom callout, the server initiates a call from the servers that can be controlled by specifying how the call should progress at each call event.
4
4
  */
5
5
  export interface CustomCalloutRequest {
6
6
  /** The number that will be displayed as the incoming caller, to set your own CLI, you may use your verified number or your Dashboard virtual number, it must be in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format. */
7
7
  cli?: string;
8
- /** @see Destination */
9
- destination?: Destination;
8
+ /** The type of device and number or endpoint to call. */
9
+ destination?: CalloutDestination;
10
10
  /** When the destination picks up, this DTMF tones will be played to the callee. Valid characters in the string are "0"-"9", "#", and "w". A "w" will render a 500 ms pause. For example, "ww1234#w#" will render a 1s pause, the DTMF tones "1", "2", "3", "4" and "#" followed by a 0.5s pause and finally the DTMF tone for "#". This can be used if the callout destination for instance require a conference PIN code or an extension to be entered. */
11
11
  dtmf?: string;
12
12
  /** Can be used to input custom data. */
13
13
  custom?: string;
14
14
  /** The maximum amount of time in seconds that the call will last. */
15
15
  maxDuration?: number;
16
- /** You can use inline SVAML to replace a callback URL when using custom callouts. Ensure that the JSON object is escaped correctly. If inline ICE SVAML is passed, exclude *cli* and *destination* properties from the *customCallout* request body. Example: ```"{"action":{"name":"connectPstn","number":"46000000001","maxDuration":90}}"``` */
16
+ /** You can use inline [SVAML](https://developers.sinch.com/docs/voice/api-reference/svaml/) to replace a callback URL when using custom callouts. Ensure that the JSON object is escaped correctly. If inline ICE SVAML is passed, exclude *cli* and *destination* properties from the *customCallout* request body. Example: ```"{"action":{"name":"connectPstn","number":"46000000001","maxDuration":90}}"``` */
17
17
  ice?: string;
18
- /** You can use inline SVAML to replace a callback URL when using custom callouts. Ensure that the JSON object is escaped correctly. Example: ```"{"action": {"name": "RunMenu","locale": "en-US","menus": [{"id": "main","mainPrompt": "#tts[ Welcome to the main menu. Press 1 for a callback or 2 for a cancel</speak>]","timeoutMills": 5000,"options": [ {"dtmf": "1","action": "return(callback)"}, {"dtmf": "2","action": "return(cancel)"}]}]}}"``` */
18
+ /** You can use inline [SVAML](https://developers.sinch.com/docs/voice/api-reference/svaml/) to replace a callback URL when using custom callouts. Ensure that the JSON object is escaped correctly. Example: ```"{"action": {"name": "RunMenu","locale": "en-US","menus": [{"id": "main","mainPrompt": "#tts[ Welcome to the main menu. Press 1 for a callback or 2 for a cancel</speak>]","timeoutMills": 5000,"options": [ {"dtmf": "1","action": "return(callback)"}, {"dtmf": "2","action": "return(cancel)"}]}]}}"``` */
19
19
  ace?: string;
20
- /** <b>Note:</b> PIE callbacks are not available for DATA Calls; only PSTN and SIP calls. You can use inline SVAML to replace a callback URL when using custom callouts. Ensure that the JSON object is escaped correctly. A PIE event will contain a value chosen from an IVR choice. Usually a PIE event wil contain a URL to a callback sever that will receive the choice and be able to parse it. This could result in further SVAML or some other application logic function. Example: ```"https://your-application-server-host/application"``` */
20
+ /** <b>Note:</b> PIE callbacks are not available for DATA Calls; only PSTN and SIP calls. You can use inline [SVAML](https://developers.sinch.com/docs/voice/api-reference/svaml/) to replace a callback URL when using custom callouts. Ensure that the JSON object is escaped correctly. A PIE event will contain a value chosen from an IVR choice. Usually a PIE event wil contain a URL to a callback sever that will receive the choice and be able to parse it. This could result in further SVAML or some other application logic function. Example: ```"https://your-application-server-host/application"``` */
21
21
  pie?: string;
22
22
  }
@@ -1,9 +1,57 @@
1
+ /**
2
+ * Known destination from event (ICE, DICE)
3
+ */
4
+ export type Destination = DestinationDid | DestinationMxp | DestinationPstn | DestinationSip;
5
+ /**
6
+ * Known callout destination (TTS, Conference, Custom)
7
+ */
8
+ export type CalloutDestination = DestinationMxp | DestinationPstn | DestinationSip;
9
+ /**
10
+ * An object containing information about the participant (caller or callee) of the call.
11
+ */
12
+ export type Participant = Destination;
13
+ /**
14
+ * The type of device and phone number called.
15
+ */
16
+ export interface DestinationDid {
17
+ /** Type `did` for Direct Inward Dialling */
18
+ type: 'did' | 'Did' | string;
19
+ /** Number that the caller has called */
20
+ endpoint: string;
21
+ }
22
+ /**
23
+ * The type of device and number or endpoint to call.
24
+ */
25
+ export interface DestinationMxp {
26
+ /** Type `userName` used for data endpoints. */
27
+ type: 'username' | 'Username' | string;
28
+ /** For type `userName` the value is the username for a data endpoint. */
29
+ endpoint: string;
30
+ }
31
+ /**
32
+ * The type of device and number or endpoint to call.
33
+ */
34
+ export interface DestinationPstn {
35
+ /** Type `number` used for PSTN endpoints. */
36
+ type: 'number' | 'Number' | string;
37
+ /** If the type is `number` the value of the endpoint is a phone number. */
38
+ endpoint: string;
39
+ }
1
40
  /**
2
41
  * The type of device and number or endpoint to call.
3
42
  */
4
- export interface Destination {
5
- /** Can be of type `number` for PSTN endpoints or of type `username` for data endpoints. */
6
- type: 'number' | 'username';
7
- /** If the type is `number` the value of the endpoint is a phone number. If the type is `username` the value is the username for a data endpoint. */
43
+ export interface DestinationSip {
44
+ /** Type `sip` for SIP infrastructures. */
45
+ type: 'sip' | 'Sip' | string;
46
+ /** For type `sip` the value is the SIP address for a SIP endpoint. */
47
+ endpoint: string;
48
+ }
49
+ /**
50
+ * Specifies where to route the Stream call.
51
+ */
52
+ export interface DestinationStream {
53
+ /** This attribute defines the streaming protocol - currently only Websocket is supported. */
54
+ type: 'websocket' | 'Websocket' | string;
55
+ /** The Stream/Websocket server address. */
8
56
  endpoint: string;
9
57
  }
@@ -1 +1 @@
1
- export type { Destination } from './destination';
1
+ export type { CalloutDestination, Destination, Participant, DestinationDid, DestinationMxp, DestinationPstn, DestinationSip, DestinationStream, } from './destination';
@@ -1,4 +1,21 @@
1
- export type ResultEnum = 'N/A' | 'ANSWERED' | 'BUSY' | 'NOANSWER' | 'FAILED';
2
- export type ReasonEnum = 'N/A' | 'TIMEOUT' | 'CALLERHANGUP' | 'CALLEEHANGUP' | 'BLOCKED' | 'NOCREDITPARTNER' | 'MANAGERHANGUP' | 'CANCEL' | 'GENERALERROR' | 'INVALIDSVAMLACTION';
3
- export type TtsVoice = 'arb' | 'arb/female' | 'Zeina' | 'az-AZ' | 'az-AZ/female' | 'az-AZ/male' | 'Banu' | 'Babek' | 'ca-ES' | 'ca-ES/female' | 'Arlet' | 'zh-HK' | 'zh-HK/female' | 'zh-HK/male' | 'HiuGaai' | 'HiuMaan' | 'WanLung' | 'cmn-CN' | 'cmn-CN/female' | 'Zhiyu' | 'hr-HR' | 'hr-HR/female' | 'hr-HR/male' | 'Gabrijela' | 'Srecko' | 'cs-CZ' | 'cs-CZ/female' | 'cs-CZ/male' | 'Vlasta' | 'Antonin' | 'da-DK' | 'da-DK/female' | 'da-DK/male' | 'Naja' | 'Mads' | 'nl-NL' | 'nl-NL/female' | 'nl-NL/male' | 'Lotte' | 'Ruben' | 'en-AU' | 'en-AU/female' | 'en-AU/male' | 'Nicole' | 'Olivia' | 'Russell' | 'en-GB' | 'en-GB/female' | 'en-GB/male' | 'Amy' | 'Emma' | 'Brian' | 'Arthur' | 'en-IN' | 'en-IN/female' | 'Aditi' | 'Raveena' | 'Kajal' | 'en-NZ' | 'en-NZ/female' | 'Aria' | 'en-ZA' | 'en-ZA/female' | 'Ayanda' | 'en-US' | 'en-US/female' | 'en-US/male' | 'Ivy' | 'Joanna' | 'Kendra' | 'Kimberly' | 'Salli' | 'Joey' | 'Justin' | 'Kevin' | 'Matthew' | 'en-GB-WLS' | 'en-GB-WLS/male' | 'Geraint' | 'et-EE' | 'et-EE/female' | 'et-EE/male' | 'Anu' | 'Kert' | 'fil-PH' | 'fil-PH/female' | 'fil-PH/male' | 'Angelo' | 'Blessica' | 'fi-FI' | 'fi-FI/female' | 'Suvi' | 'fr-FR' | 'fr-FR/female' | 'fr-FR/male' | 'Céline' | 'Celine' | 'Léa' | 'Mathieu' | 'fr-CA' | 'fr-CA/female' | 'fr-CA/male' | 'Chantal' | 'Gabrielle' | 'Liam' | 'ka-GE' | 'ka-GE/female' | 'ka-GE/male' | 'Eka' | 'Giorgi' | 'de-DE' | 'de-DE/female' | 'de-DE/male' | 'Marlene' | 'Vicki' | 'Hans' | 'Daniel' | 'de-AT' | 'de-AT/female' | 'Hannah' | 'el-GR' | 'el-GR/female' | 'el-GR/male' | 'Athina' | 'Nestoras' | 'hi-IN' | 'hi-IN/female' | 'Aditi' | 'Kajal' | 'hu-HU' | 'hu-HU/female' | 'hu-HU/male' | 'Noemi' | 'Tamas' | 'is-IS' | 'is-IS/female' | 'is-IS/male' | 'Dóra' | 'Dora' | 'Karl' | 'id-ID' | 'id-ID/female' | 'id-ID/male' | 'Ardi' | 'Gadis' | 'it-IT' | 'it-IT/female' | 'it-IT/male' | 'Carla' | 'Bianca' | 'Giorgio' | 'ja-JP' | 'ja-JP/female' | 'ja-JP/male' | 'Mizuki' | 'Takumi' | 'ko-KR' | 'ko-KR/female' | 'Seoyeon' | 'mt-MT' | 'mt-MT/female' | 'mt-MT/male' | 'Grace' | 'Joseph' | 'ms-MY' | 'ms-MY/female' | 'ms-MY/male' | 'Osman' | 'Yasmin' | 'nb-NO' | 'nb-NO/female' | 'Liv' | 'lv-LV' | 'lv-LV/female' | 'lv-LV/male' | 'Everita' | 'Nils' | 'lt-LT' | 'lt-LT/female' | 'lt-LT/male' | 'Ona' | 'Leonas' | 'pl-PL' | 'pl-PL/female' | 'pl-PL/male' | 'Ewa' | 'Maja' | 'Jacek' | 'Jan' | 'pt-BR' | 'pt-BR/female' | 'pt-BR/male' | 'Camila' | 'Vitória' | 'Vitoria' | 'Ricardo' | 'pt-PT' | 'pt-PT/female' | 'pt-PT/male' | 'Inês' | 'Ines' | 'Cristiano' | 'ro-RO' | 'ro-RO/female' | 'Carmen' | 'ru-RU' | 'ru-RU/female' | 'ru-RU/male' | 'Tatyana' | 'Maxim' | 'es-ES' | 'es-ES/female' | 'es-ES/male' | 'Conchita' | 'Lucia' | 'Enrique' | 'es-MX' | 'es-MX/female' | 'Mia' | 'es-US' | 'es-US/female' | 'es-US/male' | 'Lupe' | 'Penélope' | 'Penelope' | 'Miguel' | 'Pedro' | 'sk-SK' | 'sk-SK/female' | 'sk-SK/male' | 'Viktoria' | 'Lukas' | 'sl-SI' | 'sl-SI/female' | 'sl-SI/male' | 'Petra' | 'Rok' | 'sv-SE' | 'sv-SE/female' | 'Astrid' | 'th-TH' | 'th-TH/female' | 'th-TH/male' | 'Achara' | 'Niwat' | 'Premwadee' | 'tr-TR' | 'tr-TR/male' | 'Filiz' | 'uk-UA' | 'uk-UA/female' | 'uk-UA/male' | 'Polina' | 'Ostap' | 'uz-UZ' | 'uz-UZ/female' | 'uz-UZ/male' | 'Madina' | 'Sardor' | 'vi-VN' | 'vi-VN/female' | 'vi-VN/male' | 'HoaiMy' | 'NamMinh' | 'cy-GB' | 'cy-GB/female' | 'Gwyneth';
4
- export type MusicOnHold = 'ring' | 'music1' | 'music2' | 'music3';
1
+ /**
2
+ * Contains the result of a call.
3
+ */
4
+ export type ResultEnum = 'N/A' | 'ANSWERED' | 'BUSY' | 'NOANSWER' | 'FAILED' | string;
5
+ /**
6
+ * Contains the reason why a call ended.
7
+ */
8
+ export type ReasonEnum = 'N/A' | 'TIMEOUT' | 'CALLERHANGUP' | 'CALLEEHANGUP' | 'BLOCKED' | 'NOCREDITPARTNER' | 'MANAGERHANGUP' | 'CANCEL' | 'GENERALERROR' | 'INVALIDSVAMLACTION' | string;
9
+ export type TtsVoice = 'arb' | 'arb/female' | 'Zeina' | 'az-AZ' | 'az-AZ/female' | 'az-AZ/male' | 'Banu' | 'Babek' | 'ca-ES' | 'ca-ES/female' | 'Arlet' | 'zh-HK' | 'zh-HK/female' | 'zh-HK/male' | 'HiuGaai' | 'HiuMaan' | 'WanLung' | 'cmn-CN' | 'cmn-CN/female' | 'Zhiyu' | 'hr-HR' | 'hr-HR/female' | 'hr-HR/male' | 'Gabrijela' | 'Srecko' | 'cs-CZ' | 'cs-CZ/female' | 'cs-CZ/male' | 'Vlasta' | 'Antonin' | 'da-DK' | 'da-DK/female' | 'da-DK/male' | 'Naja' | 'Mads' | 'nl-NL' | 'nl-NL/female' | 'nl-NL/male' | 'Lotte' | 'Ruben' | 'en-AU' | 'en-AU/female' | 'en-AU/male' | 'Nicole' | 'Olivia' | 'Russell' | 'en-GB' | 'en-GB/female' | 'en-GB/male' | 'Amy' | 'Emma' | 'Brian' | 'Arthur' | 'en-IN' | 'en-IN/female' | 'Aditi' | 'Raveena' | 'Kajal' | 'en-NZ' | 'en-NZ/female' | 'Aria' | 'en-ZA' | 'en-ZA/female' | 'Ayanda' | 'en-US' | 'en-US/female' | 'en-US/male' | 'Ivy' | 'Joanna' | 'Kendra' | 'Kimberly' | 'Salli' | 'Joey' | 'Justin' | 'Kevin' | 'Matthew' | 'en-GB-WLS' | 'en-GB-WLS/male' | 'Geraint' | 'et-EE' | 'et-EE/female' | 'et-EE/male' | 'Anu' | 'Kert' | 'fil-PH' | 'fil-PH/female' | 'fil-PH/male' | 'Angelo' | 'Blessica' | 'fi-FI' | 'fi-FI/female' | 'Suvi' | 'fr-FR' | 'fr-FR/female' | 'fr-FR/male' | 'Céline' | 'Celine' | 'Léa' | 'Mathieu' | 'fr-CA' | 'fr-CA/female' | 'fr-CA/male' | 'Chantal' | 'Gabrielle' | 'Liam' | 'ka-GE' | 'ka-GE/female' | 'ka-GE/male' | 'Eka' | 'Giorgi' | 'de-DE' | 'de-DE/female' | 'de-DE/male' | 'Marlene' | 'Vicki' | 'Hans' | 'Daniel' | 'de-AT' | 'de-AT/female' | 'Hannah' | 'el-GR' | 'el-GR/female' | 'el-GR/male' | 'Athina' | 'Nestoras' | 'hi-IN' | 'hi-IN/female' | 'Aditi' | 'Kajal' | 'hu-HU' | 'hu-HU/female' | 'hu-HU/male' | 'Noemi' | 'Tamas' | 'is-IS' | 'is-IS/female' | 'is-IS/male' | 'Dóra' | 'Dora' | 'Karl' | 'id-ID' | 'id-ID/female' | 'id-ID/male' | 'Ardi' | 'Gadis' | 'it-IT' | 'it-IT/female' | 'it-IT/male' | 'Carla' | 'Bianca' | 'Giorgio' | 'ja-JP' | 'ja-JP/female' | 'ja-JP/male' | 'Mizuki' | 'Takumi' | 'ko-KR' | 'ko-KR/female' | 'Seoyeon' | 'mt-MT' | 'mt-MT/female' | 'mt-MT/male' | 'Grace' | 'Joseph' | 'ms-MY' | 'ms-MY/female' | 'ms-MY/male' | 'Osman' | 'Yasmin' | 'nb-NO' | 'nb-NO/female' | 'Liv' | 'lv-LV' | 'lv-LV/female' | 'lv-LV/male' | 'Everita' | 'Nils' | 'lt-LT' | 'lt-LT/female' | 'lt-LT/male' | 'Ona' | 'Leonas' | 'pl-PL' | 'pl-PL/female' | 'pl-PL/male' | 'Ewa' | 'Maja' | 'Jacek' | 'Jan' | 'pt-BR' | 'pt-BR/female' | 'pt-BR/male' | 'Camila' | 'Vitória' | 'Vitoria' | 'Ricardo' | 'pt-PT' | 'pt-PT/female' | 'pt-PT/male' | 'Inês' | 'Ines' | 'Cristiano' | 'ro-RO' | 'ro-RO/female' | 'Carmen' | 'ru-RU' | 'ru-RU/female' | 'ru-RU/male' | 'Tatyana' | 'Maxim' | 'es-ES' | 'es-ES/female' | 'es-ES/male' | 'Conchita' | 'Lucia' | 'Enrique' | 'es-MX' | 'es-MX/female' | 'Mia' | 'es-US' | 'es-US/female' | 'es-US/male' | 'Lupe' | 'Penélope' | 'Penelope' | 'Miguel' | 'Pedro' | 'sk-SK' | 'sk-SK/female' | 'sk-SK/male' | 'Viktoria' | 'Lukas' | 'sl-SI' | 'sl-SI/female' | 'sl-SI/male' | 'Petra' | 'Rok' | 'sv-SE' | 'sv-SE/female' | 'Astrid' | 'th-TH' | 'th-TH/female' | 'th-TH/male' | 'Achara' | 'Niwat' | 'Premwadee' | 'tr-TR' | 'tr-TR/male' | 'Filiz' | 'uk-UA' | 'uk-UA/female' | 'uk-UA/male' | 'Polina' | 'Ostap' | 'uz-UZ' | 'uz-UZ/female' | 'uz-UZ/male' | 'Madina' | 'Sardor' | 'vi-VN' | 'vi-VN/female' | 'vi-VN/male' | 'HoaiMy' | 'NamMinh' | 'cy-GB' | 'cy-GB/female' | 'Gwyneth' | string;
10
+ /**
11
+ * Available Music On Hold values
12
+ */
13
+ export type MusicOnHold = 'ring' | 'music1' | 'music2' | 'music3' | string;
14
+ /**
15
+ * Valid values are `voice` and `sms`
16
+ */
17
+ export type Capability = 'voice' | 'sms' | string;
18
+ /**
19
+ * Can be either `pstn` for PSTN endpoint or `mxp` for data (app or web) clients.
20
+ */
21
+ export type Domain = 'pstn' | 'mxp' | 'PSTN' | 'MXP';
@@ -1,19 +1,19 @@
1
1
  import { ReasonEnum, ResultEnum } from '../enums';
2
2
  import { VoicePrice } from '../voice-price';
3
- import { Participant } from '../participant';
3
+ import { Participant } from '../destination';
4
4
  export interface GetCallInformation {
5
5
  /** Contains the caller information. */
6
6
  from?: Participant;
7
7
  /** Contains the callee information. */
8
8
  to?: Participant;
9
9
  /** Must be `pstn` for PSTN. */
10
- domain?: 'pstn';
10
+ domain?: 'pstn' | string;
11
11
  /** The unique identifier of the call. */
12
12
  callId?: string;
13
13
  /** The duration of the call in seconds. */
14
14
  duration?: number;
15
15
  /** The status of the call. Either `ONGOING` or `FINAL` */
16
- status?: 'ONGOING' | 'FINAL';
16
+ status?: 'ONGOING' | 'FINAL' | string;
17
17
  /** Contains the result of a call. */
18
18
  result?: ResultEnum;
19
19
  /** Contains the reason why a call ended. */
@@ -2,6 +2,9 @@ export interface GetCallbacks {
2
2
  /** Gets primary and if configured fallback callback URLs */
3
3
  url?: GetCallbacksUrl;
4
4
  }
5
+ /**
6
+ * Contains primary and/or fallback callback URLs
7
+ */
5
8
  export interface GetCallbacksUrl {
6
9
  /** Your primary callback URL */
7
10
  primary?: string;
@@ -2,7 +2,7 @@
2
2
  * The response returns information about the participants in the conference.
3
3
  */
4
4
  export interface GetConferenceInfoResponse {
5
- /** List of GetConferenceInfoResponseParticipantsInners */
5
+ /** List of ParticipantDetails */
6
6
  participants?: ParticipantDetails[];
7
7
  }
8
8
  export interface ParticipantDetails {
@@ -1,4 +1,4 @@
1
- import { ConnectConfProps, ConnectMxpProps, ConnectPstnProps, ConnectSipProps, ParkProps, RunMenuProps, StartRecordingOptions, SvamlActionConnectConf, SvamlActionConnectMxp, SvamlActionConnectPstn, SvamlActionConnectSip, SvamlActionContinue, SvamlActionHangup, SvamlActionPark, SvamlActionRunMenu, SvamlInstructionAnswer, SvamlInstructionPlayFiles, SvamlInstructionSay, SvamlInstructionSendDtmf, SvamlInstructionSetCookie, SvamlInstructionStartRecording, SvamlInstructionStopRecording } from './mod-svaml';
1
+ import { ConnectConfProps, ConnectMxpProps, ConnectPstnProps, ConnectSipProps, ConnectStreamProps, ParkProps, RunMenuProps, StartRecordingOptions, SvamlActionConnectConf, SvamlActionConnectMxp, SvamlActionConnectPstn, SvamlActionConnectSip, SvamlActionConnectStream, SvamlActionContinue, SvamlActionHangup, SvamlActionPark, SvamlActionRunMenu, SvamlInstructionAnswer, SvamlInstructionPlayFiles, SvamlInstructionSay, SvamlInstructionSendDtmf, SvamlInstructionSetCookie, SvamlInstructionStartRecording, SvamlInstructionStopRecording } from './mod-svaml';
2
2
  import { AceResponse, AceSvamlAction, AceSvamlInstruction, CallbackResponse, IceResponse, IceSvamlAction, IceSvamlInstruction, PieResponse, PieSvamlAction, PieSvamlInstruction } from './mod-callbacks';
3
3
  import { TtsVoice } from './enums';
4
4
  declare class SvamletBuilder<A, I, R extends CallbackResponse<A, I>> {
@@ -24,6 +24,7 @@ export declare const svamlActionHelper: {
24
24
  buildConnectMxp: (connectMxpProps: ConnectMxpProps) => SvamlActionConnectMxp;
25
25
  buildConnectPstn: (connectPstnProps: ConnectPstnProps) => SvamlActionConnectPstn;
26
26
  buildConnectSip: (connectSipProps: ConnectSipProps) => SvamlActionConnectSip;
27
+ buildConnectStream: (connectStreamProps: ConnectStreamProps) => SvamlActionConnectStream;
27
28
  buildContinue: () => SvamlActionContinue;
28
29
  buildHangup: () => SvamlActionHangup;
29
30
  buildPark: (parkProps: ParkProps) => SvamlActionPark;
@@ -56,6 +57,7 @@ export declare const iceActionHelper: {
56
57
  connectMxp: (connectMxpProps: ConnectMxpProps) => SvamlActionConnectMxp;
57
58
  connectConf: (connectConfProps: ConnectConfProps) => SvamlActionConnectConf;
58
59
  connectSip: (connectSipProps: ConnectSipProps) => SvamlActionConnectSip;
60
+ connectStream: (connectStreamProps: ConnectStreamProps) => SvamlActionConnectStream;
59
61
  runMenu: (runMenuProps: RunMenuProps) => SvamlActionRunMenu;
60
62
  park: (parkProps: ParkProps) => SvamlActionPark;
61
63
  };
@@ -65,12 +67,14 @@ export declare const iceInstructionHelper: {
65
67
  sendDtmf: (dtmfValue: string) => SvamlInstructionSendDtmf;
66
68
  setCookie: (name: string, value: string) => SvamlInstructionSetCookie;
67
69
  startRecording: (startRecordingOptions: StartRecordingOptions) => SvamlInstructionStartRecording;
70
+ stopRecording: () => SvamlInstructionStopRecording;
68
71
  answer: () => SvamlInstructionAnswer;
69
72
  };
70
73
  export declare const pieActionHelper: {
71
74
  hangup: () => SvamlActionHangup;
72
75
  continue: () => SvamlActionContinue;
73
76
  connectConf: (connectConfProps: ConnectConfProps) => SvamlActionConnectConf;
77
+ connectPstn: (connectPstnProps: ConnectPstnProps) => SvamlActionConnectPstn;
74
78
  connectSip: (connectSipProps: ConnectSipProps) => SvamlActionConnectSip;
75
79
  runMenu: (runMenuProps: RunMenuProps) => SvamlActionRunMenu;
76
80
  };
@@ -79,6 +79,12 @@ exports.svamlActionHelper = {
79
79
  ...connectSipProps,
80
80
  };
81
81
  },
82
+ buildConnectStream: (connectStreamProps) => {
83
+ return {
84
+ name: 'connectStream',
85
+ ...connectStreamProps,
86
+ };
87
+ },
82
88
  buildContinue: () => {
83
89
  return {
84
90
  name: 'continue',
@@ -172,6 +178,7 @@ exports.iceActionHelper = {
172
178
  connectMxp: exports.svamlActionHelper.buildConnectMxp,
173
179
  connectConf: exports.svamlActionHelper.buildConnectConf,
174
180
  connectSip: exports.svamlActionHelper.buildConnectSip,
181
+ connectStream: exports.svamlActionHelper.buildConnectStream,
175
182
  runMenu: exports.svamlActionHelper.buildRunMenu,
176
183
  park: exports.svamlActionHelper.buildPark,
177
184
  };
@@ -181,12 +188,14 @@ exports.iceInstructionHelper = {
181
188
  sendDtmf: exports.svamlInstructionHelper.buildSendDtmf,
182
189
  setCookie: exports.svamlInstructionHelper.buildSetCookie,
183
190
  startRecording: exports.svamlInstructionHelper.buildStartRecording,
191
+ stopRecording: exports.svamlInstructionHelper.buildStopRecording,
184
192
  answer: exports.svamlInstructionHelper.buildAnswer,
185
193
  };
186
194
  exports.pieActionHelper = {
187
195
  hangup: exports.svamlActionHelper.buildHangup,
188
196
  continue: exports.svamlActionHelper.buildContinue,
189
197
  connectConf: exports.svamlActionHelper.buildConnectConf,
198
+ connectPstn: exports.svamlActionHelper.buildConnectPstn,
190
199
  connectSip: exports.svamlActionHelper.buildConnectSip,
191
200
  runMenu: exports.svamlActionHelper.buildRunMenu,
192
201
  };
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/models/v1/helper.ts"],"names":[],"mappings":";;;AAmCA,MAAM,cAAc;IAApB;QAIE,cAAS,GAAG,CAAC,MAAS,EAAE,EAAE;YACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACrB,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;QACF,mBAAc,GAAG,CAAC,WAAc,EAAE,EAAE;YAClC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;gBACvB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;YACzB,CAAC;YACD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACpC,OAAO,IAAI,CAAC;QACd,CAAC,CAAC;QACF,UAAK,GAAG,GAAM,EAAE;YACd,OAAO;gBACL,MAAM,EAAE,IAAI,CA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AAC,eAAe;IAC7C,OAAO,EAAE,yBAAiB,CAAC,YAAY;CACxC,CAAC;AAEW,QAAA,oBAAoB,GAAG;IAClC,SAAS,EAAE,8BAAsB,CAAC,cAAc;IAChD,GAAG,EAAE,8BAAsB,CAAC,QAAQ;IACpC,QAAQ,EAAE,8BAAsB,CAAC,aAAa;IAC9C,SAAS,EAAE,8BAAsB,CAAC,cAAc;IAChD,cAAc,EAAE,8BAAsB,CAAC,mBAAmB;IAC1D,aAAa,EAAE,8BAAsB,CAAC,kBAAkB;CACzD,CAAC"}
@@ -1,3 +1,4 @@
1
+ export * from './answering-machine-detection';
1
2
  export * from './call-header';
2
3
  export * from './conference-callout-request';
3
4
  export * from './conference-dtmf-options';
@@ -11,7 +12,6 @@ export * from './callout-response';
11
12
  export * from './get-conference-info-response';
12
13
  export * from './list-numbers-response';
13
14
  export * from './query-number-response';
14
- export * from './participant';
15
15
  export * from './manage-conference-participant-request';
16
16
  export * from './menu';
17
17
  export * from './option';
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./answering-machine-detection"), exports);
17
18
  __exportStar(require("./call-header"), exports);
18
19
  __exportStar(require("./conference-callout-request"), exports);
19
20
  __exportStar(require("./conference-dtmf-options"), exports);
@@ -27,7 +28,6 @@ __exportStar(require("./callout-response"), exports);
27
28
  __exportStar(require("./get-conference-info-response"), exports);
28
29
  __exportStar(require("./list-numbers-response"), exports);
29
30
  __exportStar(require("./query-number-response"), exports);
30
- __exportStar(require("./participant"), exports);
31
31
  __exportStar(require("./manage-conference-participant-request"), exports);
32
32
  __exportStar(require("./menu"), exports);
33
33
  __exportStar(require("./option"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,+DAA6C;AAC7C,4DAA0C;AAC1C,2DAAyC;AACzC,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,yDAAuC;AACvC,kDAAgC;AAChC,qDAAmC;AACnC,iEAA+C;AAC/C,0DAAwC;AACxC,0DAAwC;AACxC,gDAA8B;AAC9B,0EAAwD;AACxD,yCAAuB;AACvB,2CAAyB;AACzB,uDAAqC;AACrC,wDAAsC;AACtC,qDAAmC;AACnC,qDAAmC;AACnC,mDAAiC;AACjC,0CAAwB;AACxB,2CAAyB;AACzB,6CAA2B;AAC3B,YAAY;AACZ,kDAAgC;AAChC,QAAQ;AACR,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA8C;AAC9C,gDAA8B;AAC9B,+DAA6C;AAC7C,4DAA0C;AAC1C,2DAAyC;AACzC,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,yDAAuC;AACvC,kDAAgC;AAChC,qDAAmC;AACnC,iEAA+C;AAC/C,0DAAwC;AACxC,0DAAwC;AACxC,0EAAwD;AACxD,yCAAuB;AACvB,2CAAyB;AACzB,uDAAqC;AACrC,wDAAsC;AACtC,qDAAmC;AACnC,qDAAmC;AACnC,mDAAiC;AACjC,0CAAwB;AACxB,2CAAyB;AACzB,6CAA2B;AAC3B,YAAY;AACZ,kDAAgC;AAChC,QAAQ;AACR,8CAA4B"}
@@ -1,3 +1,4 @@
1
+ import { Capability } from '../enums';
1
2
  export interface ListNumbersResponse {
2
3
  /** The object type. Will always be list of numbers, associated application keys and capabilities */
3
4
  numbers?: NumberInformation[];
@@ -8,5 +9,5 @@ export interface NumberInformation {
8
9
  /** Indicates the application where the number(s) will be assigned. If no number is assigned the applicationkey will not be returned. */
9
10
  applicationkey?: string;
10
11
  /** indicates the DID capability that needs to be assigned to the chosen application. Valid values are 'voice' and 'sms'. Please note that the DID needs to support the selected capability. */
11
- capability?: 'voice' | 'sms';
12
+ capability?: Capability;
12
13
  }
@@ -4,7 +4,7 @@ import { MusicOnHold } from '../enums';
4
4
  */
5
5
  export interface ManageConferenceParticipantRequest {
6
6
  /** Action to apply on conference participant. */
7
- command: 'mute' | 'unmute' | 'onhold' | 'resume';
7
+ command: 'mute' | 'unmute' | 'onhold' | 'resume' | string;
8
8
  /** Means "music on hold". If this optional parameter is included, plays music to the first participant in a conference while they're alone and waiting for other participants to join. If `moh` isn't specified, the user will only hear silence while alone in the conference. This property is only available to use with the `onhold` command. */
9
9
  moh?: MusicOnHold;
10
10
  }
@@ -5,13 +5,13 @@ import { Option } from '../option';
5
5
  export interface Menu {
6
6
  /** The identifier of a menu. One menu must have the ID value of `main`. */
7
7
  id: string;
8
- /** The main voice prompt that the user hears when the menu starts the first time. You can use text-to-speech using the `#tts[]` element, SSML commands using the `#ssml[]` element, pre-recorded messages, or URL references to external media resources. You can use multiple prompts by separating each prompt with a semi-colon (`;`). If multiple prompts are used, they will be played in the order they are specified, without any pauses between playback. For external media resources, you can use an `#href[...]` or directly specify the full URL. Check the [Supported audio formats](/docs/voice/api-reference/supported-audio-formats) section for more information. */
8
+ /** The main voice prompt that the user hears when the menu starts the first time. You can use text-to-speech using the `#tts[]` element, SSML commands using the `#ssml[]` element, pre-recorded messages, or URL references to external media resources. You can use multiple prompts by separating each prompt with a semi-colon (`;`). If multiple prompts are used, they will be played in the order they are specified, without any pauses between playback. For external media resources, you can use an `#href[...]` or directly specify the full URL. Check the [Supported audio formats](https://developers.sinch.com/docs/voice/api-reference/supported-audio-formats) section for more information. */
9
9
  mainPrompt?: string;
10
- /** The prompt that will be played if valid or expected DTMF digits are not entered. You can use text-to-speech using the `#tts[]` element, SSML commands using the `#ssml[]` element, pre-recorded messages, or URL references to external media resources. You can use multiple prompts by separating each prompt with a semi-colon (`;`). If multiple prompts are used, they will be played in the order they are specified, without any pauses between playback. For external media resources, you can use an `#href[...]` or directly specify the full URL. Check the [Supported audio formats](/docs/voice/api-reference/supported-audio-formats) section for more information. */
10
+ /** The prompt that will be played if valid or expected DTMF digits are not entered. You can use text-to-speech using the `#tts[]` element, SSML commands using the `#ssml[]` element, pre-recorded messages, or URL references to external media resources. You can use multiple prompts by separating each prompt with a semi-colon (`;`). If multiple prompts are used, they will be played in the order they are specified, without any pauses between playback. For external media resources, you can use an `#href[...]` or directly specify the full URL. Check the [Supported audio formats](https://developers.sinch.com/docs/voice/api-reference/supported-audio-formats) section for more information. */
11
11
  repeatPrompt?: string;
12
12
  /** The number of times that the `repeatPrompt` is played. */
13
13
  repeats?: number;
14
- /** The maximum number of digits expected for a user to enter. Once these digits are collected, a [Prompt Input Event (PIE)](../../voice/tag/Callbacks/#tag/Callbacks/operation/pie) is triggered containing these digits. */
14
+ /** The maximum number of digits expected for a user to enter. Once these digits are collected, a [Prompt Input Event (PIE)](https://developers.sinch.com/voice/tag/Callbacks/#tag/Callbacks/operation/pie) is triggered containing these digits. */
15
15
  maxDigits?: number;
16
16
  /** Determines silence for the purposes of collecting a DTMF or voice response in milliseconds. If the timeout is reached, the response is considered completed and will be submitted. */
17
17
  timeoutMills?: number;
@@ -1,3 +1,4 @@
1
+ import { AnsweringMachineDetection } from '../../answering-machine-detection';
1
2
  /**
2
3
  * The request body of an Answered Call Event.
3
4
  */
@@ -12,16 +13,8 @@ export interface AceRequest {
12
13
  version?: number;
13
14
  /** A string that can be used to pass custom information related to the call. */
14
15
  custom?: string;
15
- /** If [Answering Machine Detection](/docs/voice/api-reference/amd_v2) (AMD) is enabled, this object contains information about whether the call was answered by a machine. */
16
+ /** If [Answering Machine Detection](https://developers.sinch.com/docs/voice/api-reference/amd_v2) (AMD) is enabled, this object contains information about whether the call was answered by a machine. */
16
17
  amd?: AnsweringMachineDetection;
17
18
  /** The unique application key. You can find it in the Sinch [dashboard](https://dashboard.sinch.com/voice/apps). */
18
19
  applicationKey?: string;
19
20
  }
20
- export interface AnsweringMachineDetection {
21
- /** The determination by the system of who answered the call. */
22
- status?: string;
23
- /** The reason that the system used to determine who answered the call. */
24
- reason?: string;
25
- /** The length of the call. */
26
- duration?: number;
27
- }
@@ -1 +1 @@
1
- export type { AceRequest, AnsweringMachineDetection } from './ace-request';
1
+ export type { AceRequest } from './ace-request';
@@ -1,7 +1,7 @@
1
1
  import { CallHeader } from '../../call-header';
2
2
  import { VoicePrice } from '../../voice-price';
3
- import { Participant } from '../../participant';
4
- import { ReasonEnum, ResultEnum } from '../../enums';
3
+ import { ResultEnum } from '../../enums';
4
+ import { Destination } from '../../destination';
5
5
  /**
6
6
  * The request body of a Disconnected Call Event.
7
7
  */
@@ -13,7 +13,7 @@ export interface DiceRequest {
13
13
  /** The timestamp in UTC format. */
14
14
  timestamp?: Date;
15
15
  /** The reason the call was disconnected. */
16
- reason?: ReasonEnum;
16
+ reason?: DiceReasonEnum;
17
17
  /** The result of the call. */
18
18
  result?: ResultEnum;
19
19
  /** The current API version. */
@@ -24,14 +24,15 @@ export interface DiceRequest {
24
24
  debit?: VoicePrice;
25
25
  /** An object containing currency and rate per minute for the call. */
26
26
  userRate?: VoicePrice;
27
- /** @see Participant */
28
- to?: Participant;
27
+ /** An object containing information about the recipient of the call. */
28
+ to?: Destination;
29
29
  /** The duration of the call in seconds. */
30
30
  duration?: number;
31
31
  /** Information about the initiator of the call. */
32
32
  from?: string;
33
- /** If the call was initiated by a Sinch SDK client, call headers are the headers specified by the *caller* client. Read more about call headers [here](../../../call-headers/). */
33
+ /** If the call was initiated by a Sinch SDK client, call headers are the headers specified by the *caller* client. Read more about call headers [here](https://developers.sinch.com/call-headers/). */
34
34
  callHeaders?: CallHeader[];
35
35
  /** The unique application key. You can find it in the Sinch [dashboard](https://dashboard.sinch.com/voice/apps). */
36
36
  applicationKey?: string;
37
37
  }
38
+ export type DiceReasonEnum = 'N/A' | 'TIMEOUT' | 'CALLERHANGUP' | 'CALLEEHANGUP' | 'BLOCKED' | 'MANAGERHANGUP' | 'NOCREDITPARTNER' | 'GENERALERROR' | 'CANCEL' | 'USERNOTFOUND' | 'CALLBACKERROR' | string;
@@ -1 +1 @@
1
- export type { DiceRequest } from './dice-request';
1
+ export type { DiceRequest, DiceReasonEnum } from './dice-request';
@@ -1,6 +1,7 @@
1
1
  import { CallHeader } from '../../call-header';
2
- import { Participant } from '../../participant';
3
2
  import { VoicePrice } from '../../voice-price';
3
+ import { Domain } from '../../enums';
4
+ import { Destination } from '../../destination';
4
5
  /**
5
6
  * The request body of an Incoming Call Event.
6
7
  */
@@ -22,17 +23,17 @@ export interface IceRequest {
22
23
  /** The number that will be displayed to the recipient of the call. To set your own CLI, you may use your verified number or your Dashboard virtual number and add it to the `connectPSTN` SVAML response to the Incoming Call Event request. It must be in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format. */
23
24
  cli?: string;
24
25
  /** An object containing information about the recipient of the call. */
25
- to?: Participant;
26
+ to?: Destination;
26
27
  /** The domain destination of the incoming call. */
27
- domain?: string;
28
+ domain?: Domain;
28
29
  /** The unique application key. You can find it in the Sinch [dashboard](https://dashboard.sinch.com/voice/apps). */
29
30
  applicationKey?: string;
30
31
  /** The origination domain of the incoming call. */
31
- originationType?: string;
32
+ originationType?: Domain;
32
33
  /** The duration of the call in seconds. */
33
34
  duration?: number;
34
35
  /** The redirected dialled number identification service. */
35
36
  rdnis?: string;
36
- /** If the call is initiated by a Sinch SDK client, call headers are the headers specified by the *caller* client. Read more about call headers [here](../../../call-headers). */
37
+ /** If the call is initiated by a Sinch SDK client, call headers are the headers specified by the *caller* client. Read more about call headers [here](https://developers.sinch.com/call-headers). */
37
38
  callHeaders?: CallHeader[];
38
39
  }
@@ -1,5 +1,5 @@
1
- import { SvamlActionHangup, SvamlActionConnectPstn, SvamlActionConnectMxp, SvamlActionConnectConf, SvamlActionConnectSip, SvamlActionRunMenu, SvamlActionPark, SvamlInstructionPlayFiles, SvamlInstructionSay, SvamlInstructionSendDtmf, SvamlInstructionSetCookie, SvamlInstructionStartRecording, SvamlInstructionAnswer } from '../../mod-svaml';
2
- export type IceSvamlAction = SvamlActionHangup | SvamlActionConnectPstn | SvamlActionConnectMxp | SvamlActionConnectConf | SvamlActionConnectSip | SvamlActionRunMenu | SvamlActionPark;
1
+ import { SvamlActionHangup, SvamlActionConnectPstn, SvamlActionConnectMxp, SvamlActionConnectConf, SvamlActionConnectSip, SvamlActionConnectStream, SvamlActionRunMenu, SvamlActionPark, SvamlInstructionPlayFiles, SvamlInstructionSay, SvamlInstructionSendDtmf, SvamlInstructionSetCookie, SvamlInstructionStartRecording, SvamlInstructionAnswer } from '../../mod-svaml';
2
+ export type IceSvamlAction = SvamlActionHangup | SvamlActionConnectPstn | SvamlActionConnectMxp | SvamlActionConnectConf | SvamlActionConnectSip | SvamlActionConnectStream | SvamlActionRunMenu | SvamlActionPark;
3
3
  export type IceSvamlInstruction = SvamlInstructionPlayFiles | SvamlInstructionSay | SvamlInstructionSendDtmf | SvamlInstructionSetCookie | SvamlInstructionStartRecording | SvamlInstructionAnswer;
4
4
  export interface IceResponse {
5
5
  /** The collection of instructions that can perform various tasks during the call. You can include as many instructions as necessary. */
@@ -1,3 +1,4 @@
1
+ import { AnsweringMachineDetection } from '../../answering-machine-detection';
1
2
  /**
2
3
  * The request body of a Notify Event.
3
4
  */
@@ -14,16 +15,10 @@ export interface NotifyRequest {
14
15
  type?: NotifyRequestType;
15
16
  /** An optional parameter containing notification-specific information. */
16
17
  custom?: string;
17
- /** The details about the 'amd' or 'amd_beep' event type */
18
- amd?: AmdStatus;
18
+ /** The results of the detection and/or the beep detection. */
19
+ amd?: AnsweringMachineDetection;
20
+ /** The URL where the recording or transcription is available */
21
+ destination?: string;
19
22
  }
20
23
  type NotifyRequestType = 'recording_finished' | 'recording_available' | 'transcription_available' | 'amd' | 'amd_beep' | string;
21
- interface AmdStatus {
22
- /** */
23
- status?: 'machine' | 'human' | string;
24
- /** */
25
- reason?: 'greeting' | 'beep' | 'n/a' | string;
26
- /** */
27
- duration?: number;
28
- }
29
24
  export {};
@@ -1 +1 @@
1
- export type { PieRequest, MenuResult, PieInformationType } from './pie-request';
1
+ export type { PieRequest, MenuResult } from './pie-request';
@@ -21,10 +21,9 @@ export interface MenuResult {
21
21
  /** The ID of the menu that triggered the prompt input event. */
22
22
  menuId?: string;
23
23
  /** The type of information that's returned. */
24
- type?: PieInformationType;
24
+ type?: 'error' | 'return' | 'sequence' | 'timeout' | 'hangup' | 'invalidinput' | string;
25
25
  /** The value of the returned information. */
26
26
  value?: string;
27
27
  /** The type of input received. */
28
- inputMethod?: string;
28
+ inputMethod?: 'dtmf' | 'voice' | string;
29
29
  }
30
- export type PieInformationType = 'error' | 'return' | 'sequence' | 'timeout' | 'hangup' | 'invalidinput';
@@ -3,6 +3,7 @@ export * from './svaml-action-connect-conf';
3
3
  export * from './svaml-action-connect-mxp';
4
4
  export * from './svaml-action-connect-pstn';
5
5
  export * from './svaml-action-connect-sip';
6
+ export * from './svaml-action-connect-stream';
6
7
  export * from './svaml-action-continue';
7
8
  export * from './svaml-action-hangup';
8
9
  export * from './svaml-action-park';
@@ -19,6 +19,7 @@ __exportStar(require("./svaml-action-connect-conf"), exports);
19
19
  __exportStar(require("./svaml-action-connect-mxp"), exports);
20
20
  __exportStar(require("./svaml-action-connect-pstn"), exports);
21
21
  __exportStar(require("./svaml-action-connect-sip"), exports);
22
+ __exportStar(require("./svaml-action-connect-stream"), exports);
22
23
  __exportStar(require("./svaml-action-continue"), exports);
23
24
  __exportStar(require("./svaml-action-hangup"), exports);
24
25
  __exportStar(require("./svaml-action-park"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/mod-svaml/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,8DAA4C;AAC5C,6DAA2C;AAC3C,8DAA4C;AAC5C,6DAA2C;AAC3C,0DAAwC;AACxC,wDAAsC;AACtC,sDAAoC;AACpC,0DAAwC;AACxC,sDAAoC;AACpC,6DAA2C;AAC3C,iEAA+C;AAC/C,0DAAwC;AACxC,gEAA8C;AAC9C,iEAA+C;AAC/C,sEAAoD;AACpD,qEAAmD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/mod-svaml/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,8DAA4C;AAC5C,6DAA2C;AAC3C,8DAA4C;AAC5C,6DAA2C;AAC3C,gEAA8C;AAC9C,0DAAwC;AACxC,wDAAsC;AACtC,sDAAoC;AACpC,0DAAwC;AACxC,sDAAoC;AACpC,6DAA2C;AAC3C,iEAA+C;AAC/C,0DAAwC;AACxC,gEAA8C;AAC9C,iEAA+C;AAC/C,sEAAoD;AACpD,qEAAmD"}
@@ -1,14 +1,14 @@
1
1
  import { ConferenceDtmfOptions } from '../../conference-dtmf-options';
2
2
  import { MusicOnHold } from '../../enums';
3
3
  /**
4
- * Connects an incoming call to a conference. Available to use in a response to an [Incoming Call Event](../../voice/tag/Callbacks/#tag/Callbacks/operation/ice) callback.
4
+ * Connects an incoming call to a conference. Available to use in a response to an [Incoming Call Event](https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/ice) callback.
5
5
  */
6
6
  export interface SvamlActionConnectConf {
7
7
  /** The name property. Must have the value `connectConf`. */
8
8
  name: 'connectConf';
9
9
  /** The unique identifier of the conference. Shouldn't exceed 64 characters. */
10
10
  conferenceId: string;
11
- /** Options to control how DTMF signals are used by the participant in the conference. For information on how to use this feature, read more [here](../../conference-dtmf). */
11
+ /** Options to control how DTMF signals are used by the participant in the conference. For information on how to use this feature, read more [here](https://developers.sinch.com/docs/voice/api-reference/conference-dtmf). */
12
12
  conferenceDtmfOptions?: ConferenceDtmfOptions;
13
13
  /** Means "music on hold". If this optional parameter is included, plays music to the first participant in a conference while they're alone and waiting for other participants to join. If `moh` isn't specified, the user will only hear silence while alone in the conference. */
14
14
  moh?: MusicOnHold;
@@ -1,14 +1,14 @@
1
1
  import { CallHeader } from '../../call-header';
2
- import { Destination } from '../../destination';
2
+ import { DestinationMxp } from '../../destination';
3
3
  /**
4
- * Determines how an application-to-application call is connected. Available to use in a response to an [Incoming Call Event](../../voice/tag/Callbacks/#tag/Callbacks/operation/ice) callback.
4
+ * Determines how an application-to-application call is connected. Available to use in a response to an [Incoming Call Event](https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/ice) callback.
5
5
  */
6
6
  export interface SvamlActionConnectMxp {
7
7
  /** The name property. Must have the value `connectMxp`. */
8
8
  name: 'connectMxp';
9
9
  /** Allows you to specify or override the final destination of the call. If the final destination of the call is not dialed, this is a required parameter. */
10
- destination?: Destination;
11
- /** An optional parameter that allows you to specify or override call headers provided to the receiving Sinch SDK client. Read more about call headers [here](../../call-headers/). */
10
+ destination?: DestinationMxp;
11
+ /** An optional parameter that allows you to specify or override call headers provided to the receiving Sinch SDK client. Read more about call headers [here](https://developers.sinch.com/docs/voice/api-reference/call-headers/). */
12
12
  callHeaders?: CallHeader[];
13
13
  }
14
14
  export type ConnectMxpProps = Omit<SvamlActionConnectMxp, 'name'>;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Determines how a PSTN call is connected. Available to use in a response to an [Incoming Call Event](../../voice/tag/Callbacks/#tag/Callbacks/operation/ice) callback.
2
+ * Determines how a PSTN call is connected. Available to use in a response to an [Incoming Call Event](https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/ice) callback.
3
3
  */
4
4
  export interface SvamlActionConnectPstn {
5
5
  /** The name property. Must have the value `connectPstn`. */
@@ -14,7 +14,7 @@ export interface SvamlActionConnectPstn {
14
14
  dialTimeout?: number;
15
15
  /** Used to override the CLI (or caller ID) of the client. The phone number of the person who initiated the call is shown as the CLI. To set your own CLI, you may use your verified number or your Dashboard virtual number. */
16
16
  cli?: string;
17
- /** If enabled, suppresses [ACE](../../voice/tag/Callbacks/#tag/Callbacks/operation/ace) and [DICE](../../voice/tag/Callbacks/#tag/Callbacks/operation/dice) callbacks for the call. */
17
+ /** If enabled, suppresses [ACE](https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/ace) and [DICE](https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/dice) callbacks for the call. */
18
18
  suppressCallbacks?: boolean;
19
19
  /** A string that determines the DTMF tones to play to the callee when the call is picked up. Valid characters are: `0-9`, `#`, and `w`. `w` renders a 500ms pause. For example, the string `ww1234#w#`, plays a 1-second pause, the DTMF tones for `1`, `2`, `3`, `4`, and `#`, followed by a 500ms pause and finally the `#` tone. This is useful if the callout destination requires a conference PIN code or an extension. If there is a calling party, it will hear progress while the DTMF is sent. */
20
20
  dtmf?: string;
@@ -1 +1 @@
1
- export type { SvamlActionConnectSip, SipDestination, ConnectSipProps } from './svaml-action-connect-sip';
1
+ export type { SvamlActionConnectSip, ConnectSipProps } from './svaml-action-connect-sip';
@@ -1,30 +1,25 @@
1
1
  import { CallHeader } from '../../call-header';
2
2
  import { MusicOnHold } from '../../enums';
3
+ import { DestinationSip } from '../../destination';
3
4
  /**
4
- * Determines how to route a call to a SIP server. Available to use in a response to an [Incoming Call Event](../../../voice/tag/Callbacks/#tag/Callbacks/operation/ice) callback.
5
+ * Determines how to route a call to a SIP server. Available to use in a response to an [Incoming Call Event](https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/ice) callback.
5
6
  */
6
7
  export interface SvamlActionConnectSip {
7
8
  /** The name property. Must have the value `connectSip`. */
8
9
  name: 'connectSip';
9
10
  /** Specifies where to route the SIP call. */
10
- destination: SipDestination;
11
+ destination: DestinationSip;
11
12
  /** The max duration of the call in seconds (max 14400 seconds). If the call is still connected at that time, it will be automatically disconnected. */
12
13
  maxDuration?: number;
13
14
  /** Used to override the CLI (or caller ID) of the client. The phone number of the person who initiated the call is shown as the CLI. To set your own CLI, you may use your verified number or your Dashboard virtual number. */
14
15
  cli?: string;
15
16
  /** An optional parameter to specify the SIP transport protocol. If unspecified, UDP is used. */
16
- transport?: 'udp' | 'tcp' | 'tls';
17
- /** If enabled, suppresses [ACE](../../voice/tag/Callbacks/#tag/Callbacks/operation/ace) and [DICE](../../voice/tag/Callbacks/#tag/Callbacks/operation/dice) callbacks for the call. */
17
+ transport?: 'udp' | 'tcp' | 'tls' | 'UDP' | 'TCP' | 'TLS' | string;
18
+ /** If enabled, suppresses [ACE](https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/ace) and [DICE](https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/dice) callbacks for the call. */
18
19
  suppressCallbacks?: boolean;
19
- /** [Private SIP headers](../../sip-trunking/#receiving-calls-from-sinch-platform-to-your-sip-infrastructure) to send with the call. */
20
+ /** [Private SIP headers](https://developers.sinch.com/docs/voice/api-reference/sip-trunking/#receiving-calls-from-sinch-platform-to-your-sip-infrastructure) to send with the call. */
20
21
  callHeaders?: CallHeader[];
21
22
  /** Means \"music on hold\". If this optional parameter is included, plays music to the connected participant if the SIP call is placed on hold. If `moh` isn't specified and the SIP call is placed on hold, the user will only hear silence while during the holding period . */
22
23
  moh?: MusicOnHold;
23
24
  }
24
- export interface SipDestination {
25
- /** The SIP address. */
26
- endpoint: string;
27
- /** */
28
- type?: 'Sip';
29
- }
30
25
  export type ConnectSipProps = Omit<SvamlActionConnectSip, 'name'>;
@@ -0,0 +1 @@
1
+ export type { SvamlActionConnectStream, ConnectStreamProps } from './svaml-action-connect-stream';
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=participant.js.map
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/models/v1/mod-svaml/svaml-action-connect-stream/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ import { CallHeader } from '../../call-header';
2
+ import { DestinationStream } from '../../destination';
3
+ /**
4
+ * Determines how to route a call to a Stream/websocket server. Available to use in a response to an [Incoming Call Event](https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/ice) callback.
5
+ */
6
+ export interface SvamlActionConnectStream {
7
+ /** The name property. Must have the value `connectStream`. */
8
+ name: 'connectStream';
9
+ /** Specifies where to route the Stream call. */
10
+ destination: DestinationStream;
11
+ /** The max duration of the call in seconds (max 14400 seconds). If the call is still connected at that time, it will be automatically disconnected. */
12
+ maxDuration?: number;
13
+ /** "These custom parameters (headers/messages) are sent to your WebSocket server in the initial message when the ConnectStream is established." */
14
+ callHeaders?: CallHeader[];
15
+ }
16
+ export type ConnectStreamProps = Omit<SvamlActionConnectStream, 'name'>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=svaml-action-connect-stream.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svaml-action-connect-stream.js","sourceRoot":"","sources":["../../../../../src/models/v1/mod-svaml/svaml-action-connect-stream/svaml-action-connect-stream.ts"],"names":[],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Continues to set up a call. Available to use in a response to an [Answered Call Event](../../../voice/tag/Callbacks/#tag/Callbacks/operation/ace) callback.
2
+ * Continues to set up a call. Available to use in a response to an [Answered Call Event](https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/ace) callback.
3
3
  */
4
4
  export interface SvamlActionContinue {
5
5
  /** The name property. Must have the value `continue`. */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Hangs up a call. Available to use in a response to an [Incoming Call Event](../../../docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/ice) callback or an [Answered Call Event](../../../docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/ace) callback.
2
+ * Hangs up a call. Available to use in a response to an [Incoming Call Event](https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/ice) callback or an [Answered Call Event](https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/ace) callback.
3
3
  */
4
4
  export interface SvamlActionHangup {
5
5
  /** The name property. Must have the value `hangup`. */
@@ -5,7 +5,7 @@ import { TtsVoice } from '../../enums';
5
5
  export interface SvamlActionPark {
6
6
  /** The name property. Must have the value `park`. */
7
7
  name: 'park';
8
- /** The voice and language you want to use for the text-to-speech message. This can either be defined by the ISO 639 locale and language code or by specifying a particular voice. Supported languages and voices are detailed [here](../../voice-locales). */
8
+ /** The voice and language you want to use for the text-to-speech message. This can either be defined by the ISO 639 locale and language code or by specifying a particular voice. Supported languages and voices are detailed [here](https://developers.sinch.com/docs/voice/api-reference/voice-locales). */
9
9
  locale?: TtsVoice;
10
10
  /** That prompt that is played when the call is first answered. You can use text-to-speech using the `#tts[]` element, SSML commands using the `#ssml[]` element. */
11
11
  introPrompt?: string;
@@ -1,14 +1,14 @@
1
1
  import { Menu } from '../../menu';
2
2
  import { TtsVoice } from '../../enums';
3
3
  /**
4
- * Plays an interactive voice response (IVR) menu to the callee. This menu can play pre-recorded files or text-to-speech messages, collect DTMF tones, and trigger the [Prompt Input Event](../../voice/tag/Callbacks/#tag/Callbacks/operation/pie) (PIE) callback towards your backend, notifying you of the actions the callee took. Available to use in a response to an [Incoming Call Event](../../voice/tag/Callbacks/#tag/Callbacks/operation/ice) callback or an [Answered Call Event](../../voice/tag/Callbacks/#tag/Callbacks/operation/ace) callback. Also be used in combination with the [Conferences](/docs/voice/api-reference/voice/tag/Conferences/#tag/Conferences) endpoint of the Voice API.
4
+ * Plays an interactive voice response (IVR) menu to the callee. This menu can play pre-recorded files or text-to-speech messages, collect DTMF tones, and trigger the [Prompt Input Event](https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/pie) (PIE) callback towards your backend, notifying you of the actions the callee took. Available to use in a response to an [Incoming Call Event](https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/ice) callback or an [Answered Call Event](https://developers.sinch.com/docs/voice/api-reference/voice/tag/Callbacks/#tag/Callbacks/operation/ace) callback. Also be used in combination with the [Conferences](https://developers.sinch.com/docs/voice/api-reference/voice/tag/Conferences/#tag/Conferences) endpoint of the Calling API.
5
5
  */
6
6
  export interface SvamlActionRunMenu {
7
7
  /** The name property. Must have the value `runMenu`. */
8
8
  name: 'runMenu';
9
9
  /** 'Barging' means that the user can press a DTMF digit before the prompt has finished playing. If a valid input is pressed, the message will stop playing and accept the input. If `barge` is disabled, the user must listen to the entire prompt before input is accepted. By default, barging is enabled. */
10
10
  barge?: boolean;
11
- /** The voice and language you want to use for the text-to-speech message. This can either be defined by the ISO 639 locale and language code or by specifying a particular voice. Supported languages and voices are detailed [here](../../voice-locales). If using the `enableVoice` to enable voice detection, the `locale` property is required in order to select the input language. */
11
+ /** The voice and language you want to use for the text-to-speech message. This can either be defined by the ISO 639 locale and language code or by specifying a particular voice. Supported languages and voices are detailed [here](https://developers.sinch.com/docs/voice/api-reference/voice-locales). If using the `enableVoice` to enable voice detection, the `locale` property is required in order to select the input language. */
12
12
  locale?: TtsVoice;
13
13
  /** Selects the menu item from the `menus` array to play first. */
14
14
  mainMenu?: string;
@@ -6,6 +6,6 @@ import { SvamlInstructionSetCookie } from '../svaml-instruction-set-cookie';
6
6
  import { SvamlInstructionStartRecording } from '../svaml-instruction-start-recording';
7
7
  import { SvamlInstructionStopRecording } from '../svaml-instruction-stop-recording';
8
8
  /**
9
- * Instructions allow an application to play a message or file, start recording, and various other tasks. For more information about instructions, see the [SVAML](../../svaml/) documentation.
9
+ * Instructions allow an application to play a message or file, start recording, and various other tasks. For more information about instructions, see the [SVAML](https://developers.sinch.com/docs/voice/api-reference/svaml/) documentation.
10
10
  */
11
11
  export type SvamlInstruction = SvamlInstructionPlayFiles | SvamlInstructionSay | SvamlInstructionSendDtmf | SvamlInstructionSetCookie | SvamlInstructionAnswer | SvamlInstructionStartRecording | SvamlInstructionStopRecording;
@@ -7,7 +7,7 @@ export interface SvamlInstructionPlayFiles {
7
7
  name: 'playFiles';
8
8
  /** The IDs of the files which will be played. These can be a URL to a file, SSML commands using the `#ssml[]` element, or text using the `#tts[]` element. */
9
9
  ids: string[];
10
- /** If using SSML or TTS, this is a required field. The voice and language you want to use for the text-to-speech message. This can either be defined by the ISO 639 locale and language code or by specifying a particular voice. Supported languages and voices are detailed [here](../../voice-locales). */
10
+ /** If using SSML or TTS, this is a required field. The voice and language you want to use for the text-to-speech message. This can either be defined by the ISO 639 locale and language code or by specifying a particular voice. Supported languages and voices are detailed [here](https://developers.sinch.com/docs/voice/api-reference/voice-locales). */
11
11
  locale?: TtsVoice;
12
12
  }
13
13
  export type PlayFilesProps = Omit<SvamlInstructionPlayFiles, 'name'>;
@@ -7,7 +7,7 @@ export interface SvamlInstructionSay {
7
7
  name: 'say';
8
8
  /** Contains the message that will be spoken. Default maximum length is 600 characters. To change this limit, please contact support. */
9
9
  text?: string;
10
- /** The voice and language you want to use for the text-to-speech message. This can either be defined by the ISO 639 locale and language code or by specifying a particular voice. Supported languages and voices are detailed [here](../../voice-locales). */
10
+ /** The voice and language you want to use for the text-to-speech message. This can either be defined by the ISO 639 locale and language code or by specifying a particular voice. Supported languages and voices are detailed [here](https://developers.sinch.com/docs/voice/api-reference/voice-locales). */
11
11
  locale?: TtsVoice;
12
12
  }
13
13
  export type SayProps = Omit<SvamlInstructionSay, 'name'>;
@@ -4,7 +4,7 @@
4
4
  export interface SvamlInstructionStartRecording {
5
5
  /** The `name` property. Must have the value `startRecording`. */
6
6
  name: 'startRecording';
7
- /** An object that specifies details about the recording. For more details, see [Recording Options](../../recording/#recording-options). */
7
+ /** An object that specifies details about the recording. For more details, see [Recording Options](https://developers.sinch.com/docs/voice/api-reference/recording/#recording-options). */
8
8
  options?: StartRecordingOptions;
9
9
  }
10
10
  export interface StartRecordingOptions {
@@ -4,6 +4,10 @@
4
4
  export interface Option {
5
5
  /** A DTMF digit the user can press to trigger the configured action. */
6
6
  dtmf: string;
7
- /** Determines which action is taken when the DTMF digit is pressed. */
7
+ /**
8
+ * Determines which action is taken when the DTMF digit is pressed. The following values are accepted:
9
+ * - If you want to navigate to another menu, use `menu(value)`.
10
+ * - If you want to perform another behavior you have coded in your application, use `return(value)`, where `(value)` is the name of the method you want to execute.
11
+ */
8
12
  action: string;
9
13
  }
@@ -1,6 +1,9 @@
1
1
  import { VoicePrice } from '../voice-price';
2
2
  export interface QueryNumberResponse {
3
- /** The type of method. */
3
+ /**
4
+ * The type of method.
5
+ * @deprecated To remove in V2
6
+ */
4
7
  method?: string;
5
8
  /** The number details object. */
6
9
  number?: NumberDetails;
@@ -9,7 +12,7 @@ export interface NumberDetails {
9
12
  /** The ISO 3166-1 formatted country code. */
10
13
  countryId?: string;
11
14
  /** The type of the number. */
12
- numberType?: 'Unknown' | 'Fixed' | 'Mobile' | 'Other';
15
+ numberType?: 'Unknown' | 'Fixed' | 'Mobile' | 'Other' | string;
13
16
  /** The number in E.164 format. */
14
17
  normalizedNumber?: string;
15
18
  /** Concerns whether the call is restricted or not. */
@@ -7,7 +7,7 @@ export interface ManageWithCallLegRequestData {
7
7
  /** The unique identifier of the call. This value is generated by the system. */
8
8
  'callId': string;
9
9
  /** Specifies which part of the call will be managed. This option is used only by the `PlayFiles` and `Say` instructions to indicate which channel the sound will be played on. Valid options are `caller`, `callee` or `both`. If not specified, the default value is `caller`.</br><Warning>The `callLeg` identifier is ignored for calls that are part of a conference and calls initiated using the Callout API.</Warning> */
10
- 'callLeg': 'caller' | 'callee' | 'both';
10
+ 'callLeg': 'caller' | 'callee' | 'both' | string;
11
11
  /** */
12
12
  'manageWithCallLegRequestBody'?: SVAMLRequestBody;
13
13
  }
@@ -1,4 +1,4 @@
1
- import { Destination } from '../destination';
1
+ import { CalloutDestination } from '../destination';
2
2
  import { TtsVoice } from '../enums';
3
3
  /**
4
4
  * The text-to-speech callout calls a phone number and plays a synthesized text messages or pre-recorded sound files.
@@ -7,18 +7,18 @@ export interface TtsCalloutRequest {
7
7
  /** The number that will be displayed as the incoming caller. To set your own CLI, you may use your verified number or your Dashboard number. The number must be in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format. */
8
8
  cli?: string;
9
9
  /** The type of device and number or endpoint to call. */
10
- destination: Destination;
10
+ destination: CalloutDestination;
11
11
  /** When the destination picks up, this DTMF tones will be played to the callee. Valid characters in the string are "0"-"9", "#", and "w". A "w" will render a 500 ms pause. For example, "ww1234#w#" will render a 1s pause, the DTMF tones "1", "2", "3", "4" and "#" followed by a 0.5s pause and finally the DTMF tone for "#". This can be used if the callout destination for instance require a conference PIN code or an extension to be entered. */
12
12
  dtmf?: string;
13
13
  /** Can be either `pstn` for PSTN endpoint or `mxp` for data (app or web) clients. */
14
14
  domain?: 'pstn' | 'mxp';
15
15
  /** Can be used to input custom data. */
16
16
  custom?: string;
17
- /** The voice and language you want to use for the text-to-speech message. This can either be defined by the ISO 639 locale and language code or by specifying a particular voice. Supported languages and voices are detailed [here](../../../voice-locales/). */
17
+ /** The voice and language you want to use for the text-to-speech message. This can either be defined by the ISO 639 locale and language code or by specifying a particular voice. Supported languages and voices are detailed [here](https://developers.sinch.com/docs/voice/api-reference/voice-locales/). */
18
18
  locale?: TtsVoice;
19
19
  /** The text that will be spoken in the text-to-speech message. _Every application's default maximum characters allowed in text-to-speech is 600 characters. Contact support if you wish this limit to be changed._ */
20
20
  text?: string;
21
- /** An advanced alternative to using ```text```. __TTS__ _Text To Speech:_ The equivalent of text but within the prompt property. Example: _```#tts[Hello from Sinch]```_ __TTS with SSML__ _Text To Speech with Speech Synthesis Markup Language (SSML)._ This is an XML-based markup language for assisting the generation of synthetic speech in the Web and other applications. AWS Polly supports a sub-set of SSML. This allows us to use SSML-enhanced text for additional control over how Polly generates speech from the text. Details and examples of supported tags are [here](https://docs.aws.amazon.com/polly/latest/dg/supportedtags.html) __Externally hosted media:__ Provide a URL to your own hosted media. Please check [here](../../../supported-audio-formats/#limits) to read about audio content type and usage limits. _Every application's default maximum allowed in TTS or TTS SSML is 600 characters. Contact support if you wish this limit to be changed._ _Several prompts can be used, separated by a semi-colon_ ```;``` Example: _```#tts[Hello from Sinch];#ssml[<speak><break time="250ms"/>Have a great day!</speak>]```_ */
21
+ /** An advanced alternative to using ```text```. __TTS__ _Text To Speech:_ The equivalent of text but within the prompt property. Example: _```#tts[Hello from Sinch]```_ __TTS with SSML__ _Text To Speech with Speech Synthesis Markup Language (SSML)._ This is an XML-based markup language for assisting the generation of synthetic speech in the Web and other applications. AWS Polly supports a sub-set of SSML. This allows us to use SSML-enhanced text for additional control over how Polly generates speech from the text. Details and examples of supported tags are [here](https://docs.aws.amazon.com/polly/latest/dg/supportedtags.html) __Externally hosted media:__ Provide a URL to your own hosted media. Please check [here](https://developers.sinch.com/docs/voice/api-reference/supported-audio-formats/#limits) to read about audio content type and usage limits. _Every application\'s default maximum allowed in TTS or TTS SSML is 600 characters. Contact support if you wish this limit to be changed._ _Several prompts can be used, separated by a semi-colon_ ```;``` Example: _```#tts[Hello from Sinch];#ssml[<speak><break time=\\\"250ms\\\"/>Have a great day!</speak>]```_ */
22
22
  prompts?: string;
23
23
  /** If `enableAce` is set to `true` and the application has a callback URL specified, you will receive an ACE callback when the call is answered. When the callback is received, your platform must respond with a svamlet, containing the “connectconf” action in order to add the call to a conference or create the conference if it's the first call. If it's set to `false`, no ACE event will be sent to your backend. */
24
24
  enableAce?: boolean;
@@ -4,5 +4,5 @@ export interface UnassignNumbers {
4
4
  /** Indicates the application where the number(s) was assigned. If empty, the application key that is used to sign the request will be used. */
5
5
  applicationkey?: string;
6
6
  /** (optional) indicates the DID capability that was assigned to the chosen application. Please note that the DID needs to support the selected capability. */
7
- capability?: 'voice' | 'sms';
7
+ capability?: 'voice' | 'sms' | string;
8
8
  }
@@ -27,6 +27,9 @@ class VoiceCallbackWebhooks {
27
27
  * @return {VoiceCallbackEvent} - The parsed voice event object.
28
28
  */
29
29
  parseEvent(eventBody) {
30
+ if (typeof eventBody === 'string') {
31
+ eventBody = JSON.parse(eventBody);
32
+ }
30
33
  if (eventBody.timestamp) {
31
34
  eventBody.timestamp = new Date(eventBody.timestamp);
32
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"callbacks-webhook.js","sourceRoot":"","sources":["../../../../src/rest/v1/callbacks/callbacks-webhook.ts"],"names":[],"mappings":";;;AACA,kDAA2G;AAM3G,MAAa,qBAAqB;IAGhC,YAAY,qBAA4C;QACtD,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;IACrD,CAAC;IAED;;;;;;;OAOG;IACI,4BAA4B,CACjC,OAA4B,EAC5B,IAAS,EACT,IAAY,EACZ,MAAc;QAEd,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,cAAc,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,EAAE,CAAC;YAChG,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;QACpE,CAAC;QACD,OAAO,IAAA,yCAA4B,EACjC,IAAI,CAAC,qBAAqB,CAAC,cAAc,EACzC,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,EAC5C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACI,UAAU,CAAC,SAAc;QAC9B,IAAI,SAAS,CAAC,SAAS,EAAE,CAAC;YACxB,SAAS,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACtD,CAAC;QACD,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC;YACpB,QAAQ,SAAS,CAAC,KAAK,EAAE,CAAC;gBAC1B,KAAK,KAAK;oBACR,OAAO,SAAuB,CAAC;gBACjC,KAAK,KAAK;oBACR,OAAO,SAAuB,CAAC;gBACjC,KAAK,MAAM;oBACT,OAAO,SAAwB,CAAC;gBAClC,KAAK,KAAK;oBACR,OAAO,SAAuB,CAAC;gBACjC,KAAK,QAAQ;oBACX,OAAO,SAA0B,CAAC;gBACpC;oBACE,MAAM,IAAI,KAAK,CAAC,6BAA6B,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC;YAClE,CAAC;QACH,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;CAEF;AA5DD,sDA4DC"}
1
+ {"version":3,"file":"callbacks-webhook.js","sourceRoot":"","sources":["../../../../src/rest/v1/callbacks/callbacks-webhook.ts"],"names":[],"mappings":";;;AACA,kDAA2G;AAM3G,MAAa,qBAAqB;IAGhC,YAAY,qBAA4C;QACtD,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;IACrD,CAAC;IAED;;;;;;;OAOG;IACI,4BAA4B,CACjC,OAA4B,EAC5B,IAAS,EACT,IAAY,EACZ,MAAc;QAEd,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,cAAc,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,EAAE,CAAC;YAChG,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;QACpE,CAAC;QACD,OAAO,IAAA,yCAA4B,EACjC,IAAI,CAAC,qBAAqB,CAAC,cAAc,EACzC,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,EAC5C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACI,UAAU,CAAC,SAAc;QAC9B,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;YAClC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACpC,CAAC;QACD,IAAI,SAAS,CAAC,SAAS,EAAE,CAAC;YACxB,SAAS,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QACtD,CAAC;QACD,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC;YACpB,QAAQ,SAAS,CAAC,KAAK,EAAE,CAAC;gBAC1B,KAAK,KAAK;oBACR,OAAO,SAAuB,CAAC;gBACjC,KAAK,KAAK;oBACR,OAAO,SAAuB,CAAC;gBACjC,KAAK,MAAM;oBACT,OAAO,SAAwB,CAAC;gBAClC,KAAK,KAAK;oBACR,OAAO,SAAuB,CAAC;gBACjC,KAAK,QAAQ;oBACX,OAAO,SAA0B,CAAC;gBACpC;oBACE,MAAM,IAAI,KAAK,CAAC,6BAA6B,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC;YAClE,CAAC;QACH,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;CAEF;AA/DD,sDA+DC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinch/voice",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "description": "Sinch Voice API",
5
5
  "homepage": "",
6
6
  "repository": {
@@ -29,7 +29,7 @@
29
29
  "test:e2e": "cucumber-js"
30
30
  },
31
31
  "dependencies": {
32
- "@sinch/sdk-client": "^1.2.1"
32
+ "@sinch/sdk-client": "^1.3.0"
33
33
  },
34
34
  "devDependencies": {},
35
35
  "publishConfig": {
@@ -1 +0,0 @@
1
- export type { Participant } from './participant';
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/participant/index.ts"],"names":[],"mappings":""}
@@ -1,9 +0,0 @@
1
- /**
2
- * An object containing information about the participant (caller or callee) of the call.
3
- */
4
- export interface Participant {
5
- /** The type of the participant (caller or callee). */
6
- type?: 'number' | 'Number' | 'username' | 'Username' | 'sip' | 'did' | string;
7
- /** The phone number, user name, or other identifier of the participant (caller or callee). */
8
- endpoint?: string;
9
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"participant.js","sourceRoot":"","sources":["../../../../src/models/v1/participant/participant.ts"],"names":[],"mappings":""}