@sinch/voice 0.0.3 → 0.0.5

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 (48) hide show
  1. package/README.md +7 -9
  2. package/dist/index.d.ts +2 -1
  3. package/dist/index.js +15 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/models/v1/index.d.ts +1 -0
  6. package/dist/models/v1/index.js +1 -0
  7. package/dist/models/v1/index.js.map +1 -1
  8. package/dist/models/v1/requests/applications/applications-request-data.d.ts +27 -0
  9. package/dist/models/v1/requests/applications/applications-request-data.js +3 -0
  10. package/dist/models/v1/requests/applications/applications-request-data.js.map +1 -0
  11. package/dist/models/v1/requests/callouts/callouts-request-data.d.ts +27 -0
  12. package/dist/models/v1/requests/callouts/callouts-request-data.js +3 -0
  13. package/dist/models/v1/requests/callouts/callouts-request-data.js.map +1 -0
  14. package/dist/models/v1/requests/calls/calls-request-data.d.ts +19 -0
  15. package/dist/models/v1/requests/calls/calls-request-data.js +3 -0
  16. package/dist/models/v1/requests/calls/calls-request-data.js.map +1 -0
  17. package/dist/models/v1/requests/conferences/conferences-request-data.d.ts +23 -0
  18. package/dist/models/v1/requests/conferences/conferences-request-data.js +3 -0
  19. package/dist/models/v1/requests/conferences/conferences-request-data.js.map +1 -0
  20. package/dist/models/v1/requests/index.d.ts +4 -0
  21. package/dist/models/v1/requests/index.js +21 -0
  22. package/dist/models/v1/requests/index.js.map +1 -0
  23. package/dist/rest/v1/applications/applications-api.d.ts +1 -25
  24. package/dist/rest/v1/applications/applications-api.jest.fixture.d.ts +2 -2
  25. package/dist/rest/v1/applications/applications-api.jest.fixture.js.map +1 -1
  26. package/dist/rest/v1/applications/applications-api.js +16 -16
  27. package/dist/rest/v1/applications/applications-api.js.map +1 -1
  28. package/dist/rest/v1/callouts/callouts-api.d.ts +1 -25
  29. package/dist/rest/v1/callouts/callouts-api.jest.fixture.d.ts +2 -2
  30. package/dist/rest/v1/callouts/callouts-api.js +12 -12
  31. package/dist/rest/v1/callouts/callouts-api.js.map +1 -1
  32. package/dist/rest/v1/calls/calls-api.d.ts +1 -19
  33. package/dist/rest/v1/calls/calls-api.jest.fixture.d.ts +2 -2
  34. package/dist/rest/v1/calls/calls-api.jest.fixture.js.map +1 -1
  35. package/dist/rest/v1/calls/calls-api.js +6 -6
  36. package/dist/rest/v1/calls/calls-api.js.map +1 -1
  37. package/dist/rest/v1/conferences/conferences-api.d.ts +1 -24
  38. package/dist/rest/v1/conferences/conferences-api.jest.fixture.d.ts +2 -3
  39. package/dist/rest/v1/conferences/conferences-api.jest.fixture.js.map +1 -1
  40. package/dist/rest/v1/conferences/conferences-api.js +8 -8
  41. package/dist/rest/v1/conferences/conferences-api.js.map +1 -1
  42. package/dist/rest/v1/voice-domain-api.d.ts +5 -5
  43. package/dist/rest/v1/voice-domain-api.js +19 -23
  44. package/dist/rest/v1/voice-domain-api.js.map +1 -1
  45. package/dist/rest/v1/voice-service.d.ts +30 -4
  46. package/dist/rest/v1/voice-service.js +38 -9
  47. package/dist/rest/v1/voice-service.js.map +1 -1
  48. package/package.json +2 -2
package/README.md CHANGED
@@ -38,11 +38,10 @@ If you are using this SDK as part of the Sinch SDK (`@sinch/sdk-core`) you can a
38
38
 
39
39
  ```typescript
40
40
  import {
41
- TtsCalloutRequestData,
42
- GetCalloutResponseObj,
43
41
  SinchClient,
44
42
  ApplicationCredentials,
45
43
  VoiceService,
44
+ Voice,
46
45
  } from '@sinch/sdk-core';
47
46
 
48
47
  const credentials: ApplicationCredentials = {
@@ -55,7 +54,7 @@ const sinch = new SinchClient(credentials);
55
54
  const voiceService: VoiceService = sinch.voice;
56
55
 
57
56
  // Build the request data
58
- const requestData: TtsCalloutRequestData = {
57
+ const requestData: Voice.TtsCalloutRequestData = {
59
58
  ttsCalloutRequestBody: {
60
59
  method: 'ttsCallout',
61
60
  ttsCallout: {
@@ -71,7 +70,7 @@ const requestData: TtsCalloutRequestData = {
71
70
  };
72
71
 
73
72
  // Use the 'voice' service registered on the Sinch client
74
- const calloutResponse: GetCalloutResponseObj
73
+ const calloutResponse: Voice.GetCalloutResponseObj
75
74
  = await voiceService.callouts.tts(requestData);
76
75
  ```
77
76
 
@@ -84,8 +83,7 @@ import {
84
83
  ApplicationCredentials
85
84
  } from '@sinch/sdk-client';
86
85
  import {
87
- TtsCalloutRequestData,
88
- GetCalloutResponseObj,
86
+ Voice,
89
87
  VoiceService,
90
88
  } from '@sinch/voice';
91
89
 
@@ -98,7 +96,7 @@ const credentials: ApplicationCredentials = {
98
96
  const voiceService = new VoiceService(credentials);
99
97
 
100
98
  // Build the request data
101
- const requestData: TtsCalloutRequestData = {
99
+ const requestData: Voice.TtsCalloutRequestData = {
102
100
  ttsCalloutRequestBody: {
103
101
  method: 'ttsCallout',
104
102
  ttsCallout: {
@@ -114,7 +112,7 @@ const requestData: TtsCalloutRequestData = {
114
112
  };
115
113
 
116
114
  // Use the standalone declaration of the 'voice' service
117
- const calloutResponse: GetCalloutResponseObj
115
+ const calloutResponse: Voice.GetCalloutResponseObj
118
116
  = await voiceService.callouts.tts(requestData);
119
117
  ```
120
118
 
@@ -124,7 +122,7 @@ All the methods that interact with the Sinch APIs use Promises. You can use `awa
124
122
 
125
123
  ```typescript
126
124
  // Method 1: Wait for the Promise to complete (you need to be in an 'async' method)
127
- let calloutResponse: GetCalloutResponseObj;
125
+ let calloutResponse: Voice.GetCalloutResponseObj;
128
126
  try {
129
127
  calloutResponse = await voiceService.callouts.tts(requestData);
130
128
  console.log(`callId = ${calloutResponse.callId}`);
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- export * from './models';
1
+ export * as Voice from './models';
2
2
  export * from './rest';
3
+ export * from '@sinch/sdk-client';
package/dist/index.js CHANGED
@@ -10,10 +10,24 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
10
10
  if (k2 === undefined) k2 = k;
11
11
  o[k2] = m[k];
12
12
  }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
13
25
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
26
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
27
  };
16
28
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./models"), exports);
29
+ exports.Voice = void 0;
30
+ exports.Voice = __importStar(require("./models"));
18
31
  __exportStar(require("./rest"), exports);
32
+ __exportStar(require("@sinch/sdk-client"), exports);
19
33
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,yCAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAkC;AAClC,yCAAuB;AACvB,oDAAkC"}
@@ -22,5 +22,6 @@ export * from './update-callbacks';
22
22
  export * from './assign-numbers';
23
23
  export * from './enums';
24
24
  export * from './helper';
25
+ export * from './requests';
25
26
  export * from './mod-callbacks';
26
27
  export * from './mod-svaml';
@@ -38,6 +38,7 @@ __exportStar(require("./update-callbacks"), exports);
38
38
  __exportStar(require("./assign-numbers"), exports);
39
39
  __exportStar(require("./enums"), exports);
40
40
  __exportStar(require("./helper"), exports);
41
+ __exportStar(require("./requests"), exports);
41
42
  // Callbacks
42
43
  __exportStar(require("./mod-callbacks"), exports);
43
44
  // SVAML
@@ -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,YAAY;AACZ,kDAAgC;AAChC,QAAQ;AACR,8CAA4B"}
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"}
@@ -0,0 +1,27 @@
1
+ import { UnassignNumbers } from '../../unassign-numbers';
2
+ import { UpdateCallbacks } from '../../update-callbacks';
3
+ import { AssignNumbers } from '../../assign-numbers';
4
+ export interface QueryNumberRequestData {
5
+ /** The phone number you want to query. */
6
+ 'number': string;
7
+ }
8
+ export interface GetCallbackURLsRequestData {
9
+ /** The unique identifying key of the application. */
10
+ 'applicationkey': string;
11
+ }
12
+ export interface GetNumbersRequestData {
13
+ }
14
+ export interface UnassignNumberRequestData {
15
+ /** */
16
+ 'unassignNumbersRequestBody'?: UnassignNumbers;
17
+ }
18
+ export interface UpdateCallbackURLsRequestData {
19
+ /** The unique identifying key of the application. */
20
+ 'applicationkey': string;
21
+ /** */
22
+ 'updateCallbacksRequestBody'?: UpdateCallbacks;
23
+ }
24
+ export interface AssignNumbersRequestData {
25
+ /** */
26
+ 'assignNumbersRequestBody'?: AssignNumbers;
27
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=applications-request-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applications-request-data.js","sourceRoot":"","sources":["../../../../../src/models/v1/requests/applications/applications-request-data.ts"],"names":[],"mappings":""}
@@ -0,0 +1,27 @@
1
+ import { TtsCalloutRequest } from '../../tts-callout-request';
2
+ import { ConferenceCalloutRequest } from '../../conference-callout-request';
3
+ import { CustomCalloutRequest } from '../../custom-callout-request';
4
+ export interface TtsCalloutRequestData {
5
+ 'ttsCalloutRequestBody': {
6
+ /** Type of callout. */
7
+ method: 'ttsCallout';
8
+ /** @see TtsCalloutRequest */
9
+ ttsCallout: TtsCalloutRequest;
10
+ };
11
+ }
12
+ export interface ConferenceCalloutRequestData {
13
+ 'conferenceCalloutRequestBody': {
14
+ /** Type of callout. */
15
+ method: 'conferenceCallout';
16
+ /** @see ConferenceCalloutRequest */
17
+ conferenceCallout: ConferenceCalloutRequest;
18
+ };
19
+ }
20
+ export interface CustomCalloutRequestData {
21
+ 'customCalloutRequestBody': {
22
+ /** Type of callout. */
23
+ method: 'customCallout';
24
+ /** @see CustomCalloutRequest */
25
+ customCallout: CustomCalloutRequest;
26
+ };
27
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=callouts-request-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"callouts-request-data.js","sourceRoot":"","sources":["../../../../../src/models/v1/requests/callouts/callouts-request-data.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ import { SVAMLRequestBody } from '../../svaml-request-body';
2
+ export interface GetCallResultRequestData {
3
+ /** The unique identifier of the call. This value is generated by the system. */
4
+ 'callId': string;
5
+ }
6
+ export interface ManageWithCallLegRequestData {
7
+ /** The unique identifier of the call. This value is generated by the system. */
8
+ 'callId': string;
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';
11
+ /** */
12
+ 'manageWithCallLegRequestBody'?: SVAMLRequestBody;
13
+ }
14
+ export interface UpdateCallRequestData {
15
+ /** The unique identifier of the call. This value is generated by the system. */
16
+ 'callId': string;
17
+ /** */
18
+ 'updateCallRequestBody'?: SVAMLRequestBody;
19
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=calls-request-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calls-request-data.js","sourceRoot":"","sources":["../../../../../src/models/v1/requests/calls/calls-request-data.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ import { ManageConferenceParticipantRequest } from '../../manage-conference-participant-request';
2
+ export interface GetConferenceInfoRequestData {
3
+ /** The unique identifier of the conference. The user sets this value. */
4
+ 'conferenceId': string;
5
+ }
6
+ export interface KickAllRequestData {
7
+ /** The unique identifier of the conference. The user sets this value. */
8
+ 'conferenceId': string;
9
+ }
10
+ export interface KickParticipantRequestData {
11
+ /** The unique identifier of the call. This value is generated by the system. */
12
+ 'callId': string;
13
+ /** The unique identifier of the conference. The user sets this value. */
14
+ 'conferenceId': string;
15
+ }
16
+ export interface ManageParticipantRequestData {
17
+ /** The unique identifier of the call. This value is generated by the system. */
18
+ 'callId': string;
19
+ /** The unique identifier of the conference. The user sets this value. */
20
+ 'conferenceId': string;
21
+ /** */
22
+ 'manageParticipantRequestBody'?: ManageConferenceParticipantRequest;
23
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=conferences-request-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conferences-request-data.js","sourceRoot":"","sources":["../../../../../src/models/v1/requests/conferences/conferences-request-data.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export * from './applications/applications-request-data';
2
+ export * from './callouts/callouts-request-data';
3
+ export * from './calls/calls-request-data';
4
+ export * from './conferences/conferences-request-data';
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./applications/applications-request-data"), exports);
18
+ __exportStar(require("./callouts/callouts-request-data"), exports);
19
+ __exportStar(require("./calls/calls-request-data"), exports);
20
+ __exportStar(require("./conferences/conferences-request-data"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/requests/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2EAAyD;AACzD,mEAAiD;AACjD,6DAA2C;AAC3C,yEAAuD"}
@@ -1,30 +1,6 @@
1
- import { GetCallbacks, ListNumbersResponse, QueryNumberResponse, UnassignNumbers, UpdateCallbacks, AssignNumbers } from '../../../models';
1
+ import { AssignNumbersRequestData, GetCallbacks, GetCallbackURLsRequestData, GetNumbersRequestData, ListNumbersResponse, QueryNumberRequestData, QueryNumberResponse, UnassignNumberRequestData, UpdateCallbackURLsRequestData } from '../../../models';
2
2
  import { SinchClientParameters } from '@sinch/sdk-client';
3
3
  import { VoiceDomainApi } from '../voice-domain-api';
4
- export interface QueryNumberRequestData {
5
- /** The phone number you want to query. */
6
- 'number': string;
7
- }
8
- export interface GetCallbackURLsRequestData {
9
- /** The unique identifying key of the application. */
10
- 'applicationkey': string;
11
- }
12
- export interface GetNumbersRequestData {
13
- }
14
- export interface UnassignNumberRequestData {
15
- /** */
16
- 'unassignNumbersRequestBody'?: UnassignNumbers;
17
- }
18
- export interface UpdateCallbackURLsRequestData {
19
- /** The unique identifying key of the application. */
20
- 'applicationkey': string;
21
- /** */
22
- 'updateCallbacksRequestBody'?: UpdateCallbacks;
23
- }
24
- export interface AssignNumbersRequestData {
25
- /** */
26
- 'assignNumbersRequestBody'?: AssignNumbers;
27
- }
28
4
  export declare class ApplicationsApi extends VoiceDomainApi {
29
5
  /**
30
6
  * Initialize your interface
@@ -1,6 +1,6 @@
1
1
  /// <reference types="jest" />
2
- import { GetCallbacks, ListNumbersResponse, QueryNumberResponse } from '../../../models';
3
- import { ApplicationsApi, QueryNumberRequestData, GetCallbackURLsRequestData, GetNumbersRequestData, UnassignNumberRequestData, UpdateCallbackURLsRequestData, AssignNumbersRequestData } from './applications-api';
2
+ import { ApplicationsApi } from './applications-api';
3
+ import { GetCallbacks, ListNumbersResponse, QueryNumberResponse, QueryNumberRequestData, GetCallbackURLsRequestData, GetNumbersRequestData, UnassignNumberRequestData, UpdateCallbackURLsRequestData, AssignNumbersRequestData } from '../../../models';
4
4
  export declare class ApplicationsApiFixture implements Partial<Readonly<ApplicationsApi>> {
5
5
  /**
6
6
  * Fixture associated to function queryNumber
@@ -1 +1 @@
1
- {"version":3,"file":"applications-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/applications/applications-api.jest.fixture.ts"],"names":[],"mappings":";;;AAGA,MAAa,sBAAsB;IAAnC;QAEE;;WAEG;QACI,gBAAW,GAAsE,IAAI,CAAC,EAAE,EAAE,CAAC;QAClG;;WAEG;QACI,oBAAe,GAAmE,IAAI,CAAC,EAAE,EAAE,CAAC;QACnG;;WAEG;QACI,gBAAW,GAAqE,IAAI,CAAC,EAAE,EAAE,CAAC;QACjG;;WAEG;QACI,mBAAc,GAA0D,IAAI,CAAC,EAAE,EAAE,CAAC;QACzF;;WAEG;QACI,uBAAkB,GAA8D,IAAI,CAAC,EAAE,EAAE,CAAC;QACjG;;WAEG;QACI,kBAAa,GAAyD,IAAI,CAAC,EAAE,EAAE,CAAC;IACzF,CAAC;CAAA;AA1BD,wDA0BC"}
1
+ {"version":3,"file":"applications-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/applications/applications-api.jest.fixture.ts"],"names":[],"mappings":";;;AAaA,MAAa,sBAAsB;IAAnC;QAEE;;WAEG;QACI,gBAAW,GAAsE,IAAI,CAAC,EAAE,EAAE,CAAC;QAClG;;WAEG;QACI,oBAAe,GAAmE,IAAI,CAAC,EAAE,EAAE,CAAC;QACnG;;WAEG;QACI,gBAAW,GAAqE,IAAI,CAAC,EAAE,EAAE,CAAC;QACjG;;WAEG;QACI,mBAAc,GAA0D,IAAI,CAAC,EAAE,EAAE,CAAC;QACzF;;WAEG;QACI,uBAAkB,GAA8D,IAAI,CAAC,EAAE,EAAE,CAAC;QACjG;;WAEG;QACI,kBAAa,GAAyD,IAAI,CAAC,EAAE,EAAE,CAAC;IACzF,CAAC;CAAA;AA1BD,wDA0BC"}
@@ -25,10 +25,10 @@ class ApplicationsApi extends voice_domain_api_1.VoiceDomainApi {
25
25
  };
26
26
  const body = '';
27
27
  // Remove the spaces in the phone number in order to not have inconsistencies in the way the URL is encoded in the SDK and server side when calculating the request signature
28
- const path = `/v1/calling/query/number/${data['number'].split(" ").join("")}`;
29
- const basePathUrl = this.client.apiClientOptions.basePath + path;
28
+ const path = `/v1/calling/query/number/${data['number'].split(' ').join('')}`;
29
+ const basePathUrl = this.client.apiClientOptions.hostname + path;
30
30
  const requestOptions = await this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined, path);
31
- const url = this.client.prepareUrl(requestOptions.basePath, requestOptions.queryParams);
31
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
32
32
  return this.client.processCall({
33
33
  url,
34
34
  requestOptions,
@@ -50,9 +50,9 @@ class ApplicationsApi extends voice_domain_api_1.VoiceDomainApi {
50
50
  };
51
51
  const body = '';
52
52
  const path = `/v1/configuration/callbacks/applications/${data['applicationkey']}`;
53
- const basePathUrl = this.client.apiClientOptions.basePath + path;
53
+ const basePathUrl = this.client.apiClientOptions.hostname + path;
54
54
  const requestOptions = await this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined, path);
55
- const url = this.client.prepareUrl(requestOptions.basePath, requestOptions.queryParams);
55
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
56
56
  return this.client.processCall({
57
57
  url,
58
58
  requestOptions,
@@ -73,10 +73,10 @@ class ApplicationsApi extends voice_domain_api_1.VoiceDomainApi {
73
73
  'Accept': 'application/json',
74
74
  };
75
75
  const body = '';
76
- const path = `/v1/configuration/numbers`;
77
- const basePathUrl = this.client.apiClientOptions.basePath + path;
76
+ const path = '/v1/configuration/numbers';
77
+ const basePathUrl = this.client.apiClientOptions.hostname + path;
78
78
  const requestOptions = await this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined, path);
79
- const url = this.client.prepareUrl(requestOptions.basePath, requestOptions.queryParams);
79
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
80
80
  return this.client.processCall({
81
81
  url,
82
82
  requestOptions,
@@ -98,10 +98,10 @@ class ApplicationsApi extends voice_domain_api_1.VoiceDomainApi {
98
98
  };
99
99
  const body = data['unassignNumbersRequestBody']
100
100
  ? JSON.stringify(data['unassignNumbersRequestBody']) : '{}';
101
- const path = `/v1/configuration/numbers`;
102
- const basePathUrl = this.client.apiClientOptions.basePath + path;
101
+ const path = '/v1/configuration/numbers';
102
+ const basePathUrl = this.client.apiClientOptions.hostname + path;
103
103
  const requestOptions = await this.client.prepareOptions(basePathUrl, 'DELETE', getParams, headers, body || undefined, path);
104
- const url = this.client.prepareUrl(requestOptions.basePath, requestOptions.queryParams);
104
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
105
105
  return this.client.processCall({
106
106
  url,
107
107
  requestOptions,
@@ -124,9 +124,9 @@ class ApplicationsApi extends voice_domain_api_1.VoiceDomainApi {
124
124
  const body = data['updateCallbacksRequestBody']
125
125
  ? JSON.stringify(data['updateCallbacksRequestBody']) : '{}';
126
126
  const path = `/v1/configuration/callbacks/applications/${data['applicationkey']}`;
127
- const basePathUrl = this.client.apiClientOptions.basePath + path;
127
+ const basePathUrl = this.client.apiClientOptions.hostname + path;
128
128
  const requestOptions = await this.client.prepareOptions(basePathUrl, 'POST', getParams, headers, body || undefined, path);
129
- const url = this.client.prepareUrl(requestOptions.basePath, requestOptions.queryParams);
129
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
130
130
  return this.client.processCall({
131
131
  url,
132
132
  requestOptions,
@@ -148,10 +148,10 @@ class ApplicationsApi extends voice_domain_api_1.VoiceDomainApi {
148
148
  };
149
149
  const body = data['assignNumbersRequestBody']
150
150
  ? JSON.stringify(data['assignNumbersRequestBody']) : '{}';
151
- const path = `/v1/configuration/numbers`;
152
- const basePathUrl = this.client.apiClientOptions.basePath + path;
151
+ const path = '/v1/configuration/numbers';
152
+ const basePathUrl = this.client.apiClientOptions.hostname + path;
153
153
  const requestOptions = await this.client.prepareOptions(basePathUrl, 'POST', getParams, headers, body || undefined, path);
154
- const url = this.client.prepareUrl(requestOptions.basePath, requestOptions.queryParams);
154
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
155
155
  return this.client.processCall({
156
156
  url,
157
157
  requestOptions,
@@ -1 +1 @@
1
- {"version":3,"file":"applications-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/applications/applications-api.ts"],"names":[],"mappings":";;;AAYA,0DAAqD;AA2BrD,MAAa,eAAgB,SAAQ,iCAAc;IAEjD;;;;OAIG;IACH,YAAY,qBAA4C;QACtD,KAAK,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,CAAC;IAClD,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,WAAW,CAAC,IAA4B;QACnD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACpC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAyB,IAAI,EAAE,EAAa,CAAC,CAAC;QAC9F,MAAM,OAAO,GAA0C;YACrD,cAAc,EAAE,kBAAkB;YAClC,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;QAEF,MAAM,IAAI,GAAgB,EAAE,CAAC;QAC7B,6KAA6K;QAC7K,MAAM,IAAI,GAAG,4BAA4B,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;QAC9E,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC;QAEjE,MAAM,cAAc,GACd,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAA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AAI,SAAS,EAAE,IAAI,CAAC,CAAC;QACzG,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;QAExF,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAO;YACnC,GAAG;YACH,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,eAAe;SAC7B,CAAC,CAAC;IACL,CAAC;CAEF;AA7LD,0CA6LC"}
@@ -1,30 +1,6 @@
1
- import { ConferenceCalloutRequest, CustomCalloutRequest, CalloutResponse, TtsCalloutRequest } from '../../../models';
1
+ import { CalloutResponse, ConferenceCalloutRequestData, CustomCalloutRequestData, TtsCalloutRequestData } from '../../../models';
2
2
  import { SinchClientParameters } from '@sinch/sdk-client';
3
3
  import { VoiceDomainApi } from '../voice-domain-api';
4
- export interface TtsCalloutRequestData {
5
- 'ttsCalloutRequestBody': {
6
- /** Type of callout. */
7
- method: 'ttsCallout';
8
- /** @see TtsCalloutRequest */
9
- ttsCallout: TtsCalloutRequest;
10
- };
11
- }
12
- export interface ConferenceCalloutRequestData {
13
- 'conferenceCalloutRequestBody': {
14
- /** Type of callout. */
15
- method: 'conferenceCallout';
16
- /** @see ConferenceCalloutRequest */
17
- conferenceCallout: ConferenceCalloutRequest;
18
- };
19
- }
20
- export interface CustomCalloutRequestData {
21
- 'customCalloutRequestBody': {
22
- /** Type of callout. */
23
- method: 'customCallout';
24
- /** @see CustomCalloutRequest */
25
- customCallout: CustomCalloutRequest;
26
- };
27
- }
28
4
  export declare class CalloutsApi extends VoiceDomainApi {
29
5
  /**
30
6
  * Initialize your interface
@@ -1,6 +1,6 @@
1
1
  /// <reference types="jest" />
2
- import { CalloutResponse } from '../../../models';
3
- import { CalloutsApi, ConferenceCalloutRequestData, CustomCalloutRequestData, TtsCalloutRequestData } from './callouts-api';
2
+ import { CalloutsApi } from './callouts-api';
3
+ import { CalloutResponse, ConferenceCalloutRequestData, CustomCalloutRequestData, TtsCalloutRequestData } from '../../../models';
4
4
  export declare class CalloutsApiFixture implements Partial<Readonly<CalloutsApi>> {
5
5
  /**
6
6
  * Fixture associated to function tts
@@ -24,15 +24,15 @@ class CalloutsApi extends voice_domain_api_1.VoiceDomainApi {
24
24
  'Accept': 'application/json',
25
25
  };
26
26
  const body = data['ttsCalloutRequestBody'] ? JSON.stringify(data['ttsCalloutRequestBody']) : '{}';
27
- const path = `/calling/v1/callouts`;
28
- const basePathUrl = this.client.apiClientOptions.basePath + path;
27
+ const path = '/calling/v1/callouts';
28
+ const basePathUrl = this.client.apiClientOptions.hostname + path;
29
29
  const requestOptions = await this.client.prepareOptions(basePathUrl, 'POST', getParams, headers, body, path);
30
- const url = this.client.prepareUrl(requestOptions.basePath, requestOptions.queryParams);
30
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
31
31
  return this.client.processCall({
32
32
  url,
33
33
  requestOptions,
34
34
  apiName: this.apiName,
35
- operationId: 'Callouts',
35
+ operationId: 'TtsCallouts',
36
36
  });
37
37
  }
38
38
  /**
@@ -48,15 +48,15 @@ class CalloutsApi extends voice_domain_api_1.VoiceDomainApi {
48
48
  'Accept': 'application/json',
49
49
  };
50
50
  const body = data['conferenceCalloutRequestBody'] ? JSON.stringify(data['conferenceCalloutRequestBody']) : '{}';
51
- const path = `/calling/v1/callouts`;
52
- const basePathUrl = this.client.apiClientOptions.basePath + path;
51
+ const path = '/calling/v1/callouts';
52
+ const basePathUrl = this.client.apiClientOptions.hostname + path;
53
53
  const requestOptions = await this.client.prepareOptions(basePathUrl, 'POST', getParams, headers, body, path);
54
- const url = this.client.prepareUrl(requestOptions.basePath, requestOptions.queryParams);
54
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
55
55
  return this.client.processCall({
56
56
  url,
57
57
  requestOptions,
58
58
  apiName: this.apiName,
59
- operationId: 'Callouts',
59
+ operationId: 'ConferenceCallouts',
60
60
  });
61
61
  }
62
62
  /**
@@ -72,15 +72,15 @@ class CalloutsApi extends voice_domain_api_1.VoiceDomainApi {
72
72
  'Accept': 'application/json',
73
73
  };
74
74
  const body = data['customCalloutRequestBody'] ? JSON.stringify(data['customCalloutRequestBody']) : '{}';
75
- const path = `/calling/v1/callouts`;
76
- const basePathUrl = this.client.apiClientOptions.basePath + path;
75
+ const path = '/calling/v1/callouts';
76
+ const basePathUrl = this.client.apiClientOptions.hostname + path;
77
77
  const requestOptions = await this.client.prepareOptions(basePathUrl, 'POST', getParams, headers, body, path);
78
- const url = this.client.prepareUrl(requestOptions.basePath, requestOptions.queryParams);
78
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
79
79
  return this.client.processCall({
80
80
  url,
81
81
  requestOptions,
82
82
  apiName: this.apiName,
83
- operationId: 'Callouts',
83
+ operationId: 'CustomCallouts',
84
84
  });
85
85
  }
86
86
  }
@@ -1 +1 @@
1
- {"version":3,"file":"callouts-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/callouts/callouts-api.ts"],"names":[],"mappings":";;;AAUA,0DAAqD;AA6BrD,MAAa,WAAY,SAAQ,iCAAc;IAE7C;;;;OAIG;IACH,YAAY,qBAA4C;QACtD,KAAK,CAAC,qBAAqB,EAAE,aAAa,CAAC,CAAC;IAC9C,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,GAAG,CAAC,IAA2B;QAC1C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACpC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAwB,IAAI,EAAE,EAAa,CAAC,CAAC;QAC7F,MAAM,OAAO,GAA0C;YACrD,cAAc,EAAE,kBAAkB;YAClC,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;QAEF,MAAM,IAAI,GAAgB,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,u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ChD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACpC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAA2B,IAAI,EAAE,EAAa,CAAC,CAAC;QAChG,MAAM,OAAO,GAA0C;YACrD,cAAc,EAAE,kBAAkB;YAClC,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;QAEF,MAAM,IAAI,GACN,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC/F,MAAM,IAAI,GAAG,sBAAsB,CAAC;QACpC,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC;QAEjE,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC7G,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;QAExF,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAkB;YAC9C,GAAG;YACH,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,gBAAgB;SAC9B,CAAC,CAAC;IACL,CAAC;CAEF;AAjGD,kCAiGC"}
@@ -1,24 +1,6 @@
1
- import { GetCallInformation, SVAMLRequestBody } from '../../../models';
1
+ import { GetCallInformation, GetCallResultRequestData, ManageWithCallLegRequestData, UpdateCallRequestData } from '../../../models';
2
2
  import { SinchClientParameters } from '@sinch/sdk-client';
3
3
  import { VoiceDomainApi } from '../voice-domain-api';
4
- export interface GetCallResultRequestData {
5
- /** The unique identifier of the call. This value is generated by the system. */
6
- 'callId': string;
7
- }
8
- export interface ManageWithCallLegRequestData {
9
- /** The unique identifier of the call. This value is generated by the system. */
10
- 'callId': string;
11
- /** 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> */
12
- 'callLeg': 'caller' | 'callee' | 'both';
13
- /** */
14
- 'manageWithCallLegRequestBody'?: SVAMLRequestBody;
15
- }
16
- export interface UpdateCallRequestData {
17
- /** The unique identifier of the call. This value is generated by the system. */
18
- 'callId': string;
19
- /** */
20
- 'updateCallRequestBody'?: SVAMLRequestBody;
21
- }
22
4
  export declare class CallsApi extends VoiceDomainApi {
23
5
  /**
24
6
  * Initialize your interface
@@ -1,6 +1,6 @@
1
1
  /// <reference types="jest" />
2
- import { GetCallInformation } from '../../../models';
3
- import { CallsApi, GetCallResultRequestData, ManageWithCallLegRequestData, UpdateCallRequestData } from './calls-api';
2
+ import { CallsApi } from './calls-api';
3
+ import { GetCallInformation, GetCallResultRequestData, ManageWithCallLegRequestData, UpdateCallRequestData } from '../../../models';
4
4
  export declare class CallsApiFixture implements Partial<Readonly<CallsApi>> {
5
5
  /**
6
6
  * Fixture associated to function getCallResult
@@ -1 +1 @@
1
- {"version":3,"file":"calls-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/calls/calls-api.jest.fixture.ts"],"names":[],"mappings":";;;AAGA,MAAa,eAAe;IAA5B;QAEE;;WAEG;QACI,QAAG,GAAuE,IAAI,CAAC,EAAE,EAAE,CAAC;QAC3F;;WAEG;QACI,sBAAiB,GAA6D,IAAI,CAAC,EAAE,EAAE,CAAC;QAC/F;;WAEG;QACI,WAAM,GAAsD,IAAI,CAAC,EAAE,EAAE,CAAC;IAC/E,CAAC;CAAA;AAdD,0CAcC"}
1
+ {"version":3,"file":"calls-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/calls/calls-api.jest.fixture.ts"],"names":[],"mappings":";;;AAQA,MAAa,eAAe;IAA5B;QAEE;;WAEG;QACI,QAAG,GAAuE,IAAI,CAAC,EAAE,EAAE,CAAC;QAC3F;;WAEG;QACI,sBAAiB,GAA6D,IAAI,CAAC,EAAE,EAAE,CAAC;QAC/F;;WAEG;QACI,WAAM,GAAsD,IAAI,CAAC,EAAE,EAAE,CAAC;IAC/E,CAAC;CAAA;AAdD,0CAcC"}
@@ -25,9 +25,9 @@ class CallsApi extends voice_domain_api_1.VoiceDomainApi {
25
25
  };
26
26
  const body = '';
27
27
  const path = `/calling/v1/calls/id/${data['callId']}`;
28
- const basePathUrl = this.client.apiClientOptions.basePath + path;
28
+ const basePathUrl = this.client.apiClientOptions.hostname + path;
29
29
  const requestOptions = await this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined, path);
30
- const url = this.client.prepareUrl(requestOptions.basePath, requestOptions.queryParams);
30
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
31
31
  return this.client.processCall({
32
32
  url,
33
33
  requestOptions,
@@ -51,9 +51,9 @@ class CallsApi extends voice_domain_api_1.VoiceDomainApi {
51
51
  ? JSON.stringify(data['manageWithCallLegRequestBody'])
52
52
  : '{}';
53
53
  const path = `/calling/v1/calls/id/${data['callId']}/leg/${data['callLeg']}`;
54
- const basePathUrl = this.client.apiClientOptions.basePath + path;
54
+ const basePathUrl = this.client.apiClientOptions.hostname + path;
55
55
  const requestOptions = await this.client.prepareOptions(basePathUrl, 'PATCH', getParams, headers, body, path);
56
- const url = this.client.prepareUrl(requestOptions.basePath, requestOptions.queryParams);
56
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
57
57
  return this.client.processCall({
58
58
  url,
59
59
  requestOptions,
@@ -75,9 +75,9 @@ class CallsApi extends voice_domain_api_1.VoiceDomainApi {
75
75
  };
76
76
  const body = data['updateCallRequestBody'] ? JSON.stringify(data['updateCallRequestBody']) : '{}';
77
77
  const path = `/calling/v1/calls/id/${data['callId']}`;
78
- const basePathUrl = this.client.apiClientOptions.basePath + path;
78
+ const basePathUrl = this.client.apiClientOptions.hostname + path;
79
79
  const requestOptions = await this.client.prepareOptions(basePathUrl, 'PATCH', getParams, headers, body, path);
80
- const url = this.client.prepareUrl(requestOptions.basePath, requestOptions.queryParams);
80
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
81
81
  return this.client.processCall({
82
82
  url,
83
83
  requestOptions,
@@ -1 +1 @@
1
- {"version":3,"file":"calls-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/calls/calls-api.ts"],"names":[],"mappings":";;;AAQA,0DAAqD;AAqBrD,MAAa,QAAS,SAAQ,iCAAc;IAE1C;;;;OAIG;IACH,YAAY,qBAA4C;QACtD,KAAK,CAAC,qBAAqB,EAAE,UAAU,CAAC,CAAC;IAC3C,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,GAAG,CAAC,IAA8B;QAC7C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACpC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAA2B,IAAI,EAAE,EAAa,CAAC,CAAC;QAChG,MAAM,OAAO,GAA0C;YACrD,cAAc,EAAE,kBAAkB;YAClC,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;QAEF,MAAM,IAAI,GAAgB,EAAE,CAAC;QAC7B,MAAM,IAAI,GAAG,wBAAwB,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACtD,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC;QAEjE,MAAM,cAAc,GACd,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,IAAI,CAAC,CAAC;QACxG,MAAM,GA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F,MAAM,IAAI,GAAgB,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC/G,MAAM,IAAI,GAAG,wBAAwB,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACtD,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC;QAEjE,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC9G,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;QAExF,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAO;YACnC,GAAG;YACH,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,YAAY;SAC1B,CAAC,CAAC;IACL,CAAC;CAEF;AAlGD,4BAkGC"}
@@ -1,29 +1,6 @@
1
- import { CalloutResponse, GetConferenceInfoResponse, ManageConferenceParticipantRequest } from '../../../models/';
1
+ import { CalloutResponse, ConferenceCalloutRequestData, GetConferenceInfoRequestData, GetConferenceInfoResponse, KickAllRequestData, KickParticipantRequestData, ManageParticipantRequestData } from '../../../models/';
2
2
  import { SinchClientParameters } from '@sinch/sdk-client';
3
3
  import { VoiceDomainApi } from '../voice-domain-api';
4
- import { ConferenceCalloutRequestData } from '../callouts';
5
- export interface GetConferenceInfoRequestData {
6
- /** The unique identifier of the conference. The user sets this value. */
7
- 'conferenceId': string;
8
- }
9
- export interface KickAllRequestData {
10
- /** The unique identifier of the conference. The user sets this value. */
11
- 'conferenceId': string;
12
- }
13
- export interface KickParticipantRequestData {
14
- /** The unique identifier of the call. This value is generated by the system. */
15
- 'callId': string;
16
- /** The unique identifier of the conference. The user sets this value. */
17
- 'conferenceId': string;
18
- }
19
- export interface ManageParticipantRequestData {
20
- /** The unique identifier of the call. This value is generated by the system. */
21
- 'callId': string;
22
- /** The unique identifier of the conference. The user sets this value. */
23
- 'conferenceId': string;
24
- /** */
25
- 'manageParticipantRequestBody'?: ManageConferenceParticipantRequest;
26
- }
27
4
  export declare class ConferencesApi extends VoiceDomainApi {
28
5
  private calloutApi;
29
6
  /**
@@ -1,7 +1,6 @@
1
1
  /// <reference types="jest" />
2
- import { CalloutResponse, GetConferenceInfoResponse } from '../../../models';
3
- import { ConferencesApi, GetConferenceInfoRequestData, KickAllRequestData, KickParticipantRequestData, ManageParticipantRequestData } from './conferences-api';
4
- import { ConferenceCalloutRequestData } from '../callouts';
2
+ import { ConferencesApi } from './conferences-api';
3
+ import { CalloutResponse, ConferenceCalloutRequestData, GetConferenceInfoResponse, GetConferenceInfoRequestData, KickAllRequestData, KickParticipantRequestData, ManageParticipantRequestData } from '../../../models';
5
4
  export declare class ConferencesApiFixture implements Partial<Readonly<ConferencesApi>> {
6
5
  /**
7
6
  * Fixture associated to function call
@@ -1 +1 @@
1
- {"version":3,"file":"conferences-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/conferences/conferences-api.jest.fixture.ts"],"names":[],"mappings":";;;AAaA,MAAa,qBAAqB;IAAlC;QAEE;;WAEG;QACI,SAAI,GAAwE,IAAI,CAAC,EAAE,EAAE,CAAC;QAC7F;;WAEG;QACI,QAAG,GAAkF,IAAI,CAAC,EAAE,EAAE,CAAC;QACtG;;WAEG;QACI,YAAO,GAAmD,IAAI,CAAC,EAAE,EAAE,CAAC;QAC3E;;WAEG;QACI,oBAAe,GAA2D,IAAI,CAAC,EAAE,EAAE,CAAC;QAC3F;;WAEG;QACI,sBAAiB,GAA6D,IAAI,CAAC,EAAE,EAAE,CAAC;IACjG,CAAC;CAAA;AAtBD,sDAsBC"}
1
+ {"version":3,"file":"conferences-api.jest.fixture.js","sourceRoot":"","sources":["../../../../src/rest/v1/conferences/conferences-api.jest.fixture.ts"],"names":[],"mappings":";;;AAWA,MAAa,qBAAqB;IAAlC;QAEE;;WAEG;QACI,SAAI,GAAwE,IAAI,CAAC,EAAE,EAAE,CAAC;QAC7F;;WAEG;QACI,QAAG,GAAkF,IAAI,CAAC,EAAE,EAAE,CAAC;QACtG;;WAEG;QACI,YAAO,GAAmD,IAAI,CAAC,EAAE,EAAE,CAAC;QAC3E;;WAEG;QACI,oBAAe,GAA2D,IAAI,CAAC,EAAE,EAAE,CAAC;QAC3F;;WAEG;QACI,sBAAiB,GAA6D,IAAI,CAAC,EAAE,EAAE,CAAC;IACjG,CAAC;CAAA;AAtBD,sDAsBC"}
@@ -35,9 +35,9 @@ class ConferencesApi extends voice_domain_api_1.VoiceDomainApi {
35
35
  };
36
36
  const body = '';
37
37
  const path = `/calling/v1/conferences/id/${data['conferenceId']}`;
38
- const basePathUrl = this.client.apiClientOptions.basePath + path;
38
+ const basePathUrl = this.client.apiClientOptions.hostname + path;
39
39
  const requestOptions = await this.client.prepareOptions(basePathUrl, 'GET', getParams, headers, body || undefined, path);
40
- const url = this.client.prepareUrl(requestOptions.basePath, requestOptions.queryParams);
40
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
41
41
  return this.client.processCall({
42
42
  url,
43
43
  requestOptions,
@@ -59,9 +59,9 @@ class ConferencesApi extends voice_domain_api_1.VoiceDomainApi {
59
59
  };
60
60
  const body = '';
61
61
  const path = `/calling/v1/conferences/id/${data['conferenceId']}`;
62
- const basePathUrl = this.client.apiClientOptions.basePath + path;
62
+ const basePathUrl = this.client.apiClientOptions.hostname + path;
63
63
  const requestOptions = await this.client.prepareOptions(basePathUrl, 'DELETE', getParams, headers, body, path);
64
- const url = this.client.prepareUrl(requestOptions.basePath, requestOptions.queryParams);
64
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
65
65
  return this.client.processCall({
66
66
  url,
67
67
  requestOptions,
@@ -83,9 +83,9 @@ class ConferencesApi extends voice_domain_api_1.VoiceDomainApi {
83
83
  };
84
84
  const body = '';
85
85
  const path = `/calling/v1/conferences/id/${data['conferenceId']}/${data['callId']}`;
86
- const basePathUrl = this.client.apiClientOptions.basePath + path;
86
+ const basePathUrl = this.client.apiClientOptions.hostname + path;
87
87
  const requestOptions = await this.client.prepareOptions(basePathUrl, 'DELETE', getParams, headers, body, path);
88
- const url = this.client.prepareUrl(requestOptions.basePath, requestOptions.queryParams);
88
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
89
89
  return this.client.processCall({
90
90
  url,
91
91
  requestOptions,
@@ -108,9 +108,9 @@ class ConferencesApi extends voice_domain_api_1.VoiceDomainApi {
108
108
  const body = data['manageParticipantRequestBody']
109
109
  ? JSON.stringify(data['manageParticipantRequestBody']) : '{}';
110
110
  const path = `/calling/v1/conferences/id/${data['conferenceId']}/${data['callId']}`;
111
- const basePathUrl = this.client.apiClientOptions.basePath + path;
111
+ const basePathUrl = this.client.apiClientOptions.hostname + path;
112
112
  const requestOptions = await this.client.prepareOptions(basePathUrl, 'PATCH', getParams, headers, body, path);
113
- const url = this.client.prepareUrl(requestOptions.basePath, requestOptions.queryParams);
113
+ const url = this.client.prepareUrl(requestOptions.hostname, requestOptions.queryParams);
114
114
  return this.client.processCall({
115
115
  url,
116
116
  requestOptions,
@@ -1 +1 @@
1
- {"version":3,"file":"conferences-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/conferences/conferences-api.ts"],"names":[],"mappings":";;;AASA,0DAAqD;AACrD,0CAAwE;AAyBxE,MAAa,cAAe,SAAQ,iCAAc;IAIhD;;;;OAIG;IACH,YAAY,qBAA4C;QACtD,KAAK,CAAC,qBAAqB,EAAE,gBAAgB,CAAC,CAAC;QAC/C,IAAI,CAAC,UAAU,GAAG,IAAI,sBAAW,CAAC,qBAAqB,CAAC,CAAC;IAC3D,CAAC;IA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SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAA+B,IAAI,EAAE,EAAa,CAAC,CAAC;QACpG,MAAM,OAAO,GAA0C;YACrD,cAAc,EAAE,kBAAkB;YAClC,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;QAEF,MAAM,IAAI,GAAgB,IAAI,CAAC,8BAA8B,CAAC;YAC5D,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAChE,MAAM,IAAI,GAAG,8BAA8B,IAAI,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpF,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC;QAEjE,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC9G,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;QAExF,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAO;YACnC,GAAG;YACH,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,6BAA6B;SAC3C,CAAC,CAAC;IACL,CAAC;CAEF;AAzID,wCAyIC"}
@@ -5,12 +5,12 @@ export declare class VoiceDomainApi implements Api {
5
5
  private sinchClientParameters;
6
6
  constructor(sinchClientParameters: SinchClientParameters, apiName: string);
7
7
  /**
8
- * Update the default basePath for the API
9
- * @param {string} basePath - The new base path to use for the APIs.
8
+ * Update the default hostname for the API
9
+ * @param {string} hostname - The new hostname to use for the APIs.
10
10
  */
11
- setBasePath(basePath: string): void;
11
+ setHostname(hostname: string): void;
12
12
  /**
13
- * Update the region in the basePath
13
+ * Update the region in the hostname
14
14
  * @param {VoiceRegion} region - The new region to send the requests to
15
15
  */
16
16
  setRegion(region: VoiceRegion): void;
@@ -27,5 +27,5 @@ export declare class VoiceDomainApi implements Api {
27
27
  * @private
28
28
  */
29
29
  getSinchClient(): ApiClient;
30
- private buildBasePath;
30
+ private buildHostname;
31
31
  }
@@ -8,27 +8,27 @@ class VoiceDomainApi {
8
8
  this.apiName = apiName;
9
9
  }
10
10
  /**
11
- * Update the default basePath for the API
12
- * @param {string} basePath - The new base path to use for the APIs.
11
+ * Update the default hostname for the API
12
+ * @param {string} hostname - The new hostname to use for the APIs.
13
13
  */
14
- setBasePath(basePath) {
14
+ setHostname(hostname) {
15
15
  try {
16
16
  this.client = this.getSinchClient();
17
- this.client.apiClientOptions.basePath = basePath;
17
+ this.client.apiClientOptions.hostname = hostname;
18
18
  }
19
19
  catch (error) {
20
- console.error('Impossible to set a new base path, the Application credentials need to be provided first.');
20
+ console.error('Impossible to set a new hostname, the Application credentials need to be provided first.');
21
21
  throw error;
22
22
  }
23
23
  }
24
24
  /**
25
- * Update the region in the basePath
25
+ * Update the region in the hostname
26
26
  * @param {VoiceRegion} region - The new region to send the requests to
27
27
  */
28
28
  setRegion(region) {
29
29
  this.sinchClientParameters.voiceRegion = region;
30
30
  if (this.client) {
31
- this.client.apiClientOptions.basePath = this.buildBasePath(region);
31
+ this.client.apiClientOptions.hostname = this.buildHostname(region);
32
32
  }
33
33
  }
34
34
  /**
@@ -62,28 +62,24 @@ class VoiceDomainApi {
62
62
  */
63
63
  getSinchClient() {
64
64
  if (!this.client) {
65
- if (!this.sinchClientParameters.applicationKey || !this.sinchClientParameters.applicationSecret) {
66
- throw new Error('Invalid configuration for the Verification API: '
67
- + '"applicationKey" and "applicationSecret" values must be provided');
68
- }
69
- const apiClientOptions = {
70
- requestPlugins: [
71
- new sdk_client_1.XTimestampRequest(),
72
- new sdk_client_1.SigningRequest(this.sinchClientParameters.applicationKey, this.sinchClientParameters.applicationSecret),
73
- ],
74
- };
65
+ const apiClientOptions = (0, sdk_client_1.buildApplicationSignedApiClientOptions)(this.sinchClientParameters, 'Voice');
75
66
  this.client = new sdk_client_1.ApiFetchClient(apiClientOptions);
76
- const region = this.sinchClientParameters.voiceRegion || sdk_client_1.VoiceRegion.DEFAULT;
77
- this.client.apiClientOptions.basePath = this.buildBasePath(region);
67
+ const region = this.sinchClientParameters.voiceRegion ?? sdk_client_1.VoiceRegion.DEFAULT;
68
+ if (!Object.values(sdk_client_1.SupportedVoiceRegion).includes(region)) {
69
+ console.warn(`The region "${region}" is not known as a supported region for the Voice API`);
70
+ }
71
+ this.client.apiClientOptions.hostname = this.buildHostname(region);
78
72
  }
79
73
  return this.client;
80
74
  }
81
- buildBasePath(region) {
75
+ buildHostname(region) {
82
76
  switch (this.apiName) {
83
77
  case 'ApplicationsApi':
84
- return `https://callingapi.sinch.com`;
85
- default:
86
- return `https://calling${region}.api.sinch.com`;
78
+ return this.sinchClientParameters.voiceApplicationManagementHostname ?? 'https://callingapi.sinch.com';
79
+ default: {
80
+ const formattedRegion = region === sdk_client_1.VoiceRegion.DEFAULT ? region : `-${region}`;
81
+ return this.sinchClientParameters.voiceHostname ?? `https://calling${formattedRegion}.api.sinch.com`;
82
+ }
87
83
  }
88
84
  }
89
85
  }
@@ -1 +1 @@
1
- {"version":3,"file":"voice-domain-api.js","sourceRoot":"","sources":["../../../src/rest/v1/voice-domain-api.ts"],"names":[],"mappings":";;;AAAA,kDAQ2B;AAE3B,MAAa,cAAc;IAKzB,YAAY,qBAA4C,EAAE,OAAe;QACvE,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;QACnD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;;OAGG;IACI,WAAW,CAAC,QAAgB;QACjC,IAAI,CAAC;YACH,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;YACpC,IAAI,CAAC,MAA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C,MAAM,CAAC,iCAAoB,CAAC,CAAC,QAAQ,CAAC,MAA8B,CAAC,EAAE,CAAC;gBACjF,OAAO,CAAC,IAAI,CAAC,eAAe,MAAM,wDAAwD,CAAC,CAAC;YAC9F,CAAC;YACD,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QACrE,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAEO,aAAa,CAAC,MAAmB;QACvC,QAAQ,IAAI,CAAC,OAAO,EAAE,CAAC;YACvB,KAAK,iBAAiB;gBACpB,OAAO,IAAI,CAAC,qBAAqB,CAAC,kCAAkC,IAAI,8BAA8B,CAAC;YACzG,OAAO,CAAC,CAAC,CAAC;gBACR,MAAM,eAAe,GAAG,MAAM,KAAK,wBAAW,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC;gBAC/E,OAAO,IAAI,CAAC,qBAAqB,CAAC,aAAa,IAAI,kBAAkB,eAAe,gBAAgB,CAAC;YACvG,CAAC;QACD,CAAC;IACH,CAAC;CAEF;AAzFD,wCAyFC"}
@@ -3,17 +3,43 @@ import { ApplicationsApi } from './applications';
3
3
  import { ConferencesApi } from './conferences';
4
4
  import { CallsApi } from './calls';
5
5
  import { CalloutsApi } from './callouts';
6
+ /**
7
+ * The Voice Service exposes the following APIs:
8
+ * - applications
9
+ * - callouts
10
+ * - conferences
11
+ * - calls
12
+ */
6
13
  export declare class VoiceService {
7
14
  readonly applications: ApplicationsApi;
8
15
  readonly conferences: ConferencesApi;
9
16
  readonly calls: CallsApi;
10
17
  readonly callouts: CalloutsApi;
11
- constructor(params: SinchClientParameters);
12
18
  /**
13
- * Update the default basePath for each API
19
+ * Create a new VoiceService instance with its configuration. It needs the following parameters for authentication:
20
+ * - `applicationKey`
21
+ * - `applicationSecret`
14
22
  *
15
- * @param {string} basePath - The new base path to use for all the APIs.
23
+ * Other supported properties:
24
+ * - `voiceRegion`
25
+ * - `voiceHostname`
26
+ * - `voiceApplicationManagementHostname`
27
+ * @param {SinchClientParameters} params - an Object containing the necessary properties to initialize the service
28
+ */
29
+ constructor(params: SinchClientParameters);
30
+ /**
31
+ * Update the default hostname for each API except Applications
32
+ * @param {string} hostname - The new hostname to use for all the APIs except Applications.
33
+ */
34
+ setHostname(hostname: string): void;
35
+ /**
36
+ * Update the default hostname for the Applications API
37
+ * @param {string} hostname - The new hostname to use for the Applications API.
38
+ */
39
+ setApplicationsManagementHostname(hostname: string): void;
40
+ /**
41
+ * Update the current region for each API
42
+ * @param {VoiceRegion} region - The new region to use in the production URL
16
43
  */
17
- setBasePath(basePath: string): void;
18
44
  setRegion(region: VoiceRegion): void;
19
45
  }
@@ -5,7 +5,25 @@ const applications_1 = require("./applications");
5
5
  const conferences_1 = require("./conferences");
6
6
  const calls_1 = require("./calls");
7
7
  const callouts_1 = require("./callouts");
8
+ /**
9
+ * The Voice Service exposes the following APIs:
10
+ * - applications
11
+ * - callouts
12
+ * - conferences
13
+ * - calls
14
+ */
8
15
  class VoiceService {
16
+ /**
17
+ * Create a new VoiceService instance with its configuration. It needs the following parameters for authentication:
18
+ * - `applicationKey`
19
+ * - `applicationSecret`
20
+ *
21
+ * Other supported properties:
22
+ * - `voiceRegion`
23
+ * - `voiceHostname`
24
+ * - `voiceApplicationManagementHostname`
25
+ * @param {SinchClientParameters} params - an Object containing the necessary properties to initialize the service
26
+ */
9
27
  constructor(params) {
10
28
  this.applications = new applications_1.ApplicationsApi(params);
11
29
  this.conferences = new conferences_1.ConferencesApi(params);
@@ -13,18 +31,29 @@ class VoiceService {
13
31
  this.callouts = new callouts_1.CalloutsApi(params);
14
32
  }
15
33
  /**
16
- * Update the default basePath for each API
17
- *
18
- * @param {string} basePath - The new base path to use for all the APIs.
34
+ * Update the default hostname for each API except Applications
35
+ * @param {string} hostname - The new hostname to use for all the APIs except Applications.
19
36
  */
20
- setBasePath(basePath) {
21
- this.applications.setBasePath(basePath);
22
- this.conferences.setBasePath(basePath);
23
- this.calls.setBasePath(basePath);
24
- this.callouts.setBasePath(basePath);
37
+ setHostname(hostname) {
38
+ this.conferences.setHostname(hostname);
39
+ this.calls.setHostname(hostname);
40
+ this.callouts.setHostname(hostname);
25
41
  }
42
+ /**
43
+ * Update the default hostname for the Applications API
44
+ * @param {string} hostname - The new hostname to use for the Applications API.
45
+ */
46
+ setApplicationsManagementHostname(hostname) {
47
+ this.applications.setHostname(hostname);
48
+ }
49
+ /**
50
+ * Update the current region for each API
51
+ * @param {VoiceRegion} region - The new region to use in the production URL
52
+ */
26
53
  setRegion(region) {
27
- this.applications.setRegion(region);
54
+ this.conferences.setRegion(region);
55
+ this.calls.setRegion(region);
56
+ this.callouts.setRegion(region);
28
57
  }
29
58
  }
30
59
  exports.VoiceService = VoiceService;
@@ -1 +1 @@
1
- {"version":3,"file":"voice-service.js","sourceRoot":"","sources":["../../../src/rest/v1/voice-service.ts"],"names":[],"mappings":";;;AACA,iDAAiD;AACjD,+CAA+C;AAC/C,mCAAmC;AACnC,yCAAyC;AAEzC,MAAa,YAAY;IAMvB,YAAY,MAA6B;QACvC,IAAI,CAAC,YAAY,GAAG,IAAI,8BAAe,CAAC,MAAM,CAAC,CAAC;QAChD,IAAI,CAAC,WAAW,GAAG,IAAI,4BAAc,CAAC,MAAM,CAAC,CAAC;QAC9C,IAAI,CAAC,KAAK,GAAG,IAAI,gBAAQ,CAAC,MAAM,CAAC,CAAC;QAClC,IAAI,CAAC,QAAQ,GAAG,IAAI,sBAAW,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED;;;;OAIG;IACI,WAAW,CAAC,QAAgB;QACjC,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QACxC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,QAA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,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;CACF;AAnDD,oCAmDC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinch/voice",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "Sinch Voice API",
5
5
  "homepage": "",
6
6
  "repository": {
@@ -28,7 +28,7 @@
28
28
  "compile": "tsc -p tsconfig.build.json && tsc -p tsconfig.tests.json && rimraf dist/tests tsconfig.build.tsbuildinfo"
29
29
  },
30
30
  "dependencies": {
31
- "@sinch/sdk-client": "^0.0.3"
31
+ "@sinch/sdk-client": "^0.0.5"
32
32
  },
33
33
  "devDependencies": {},
34
34
  "publishConfig": {