@sinch/elastic-sip-trunking 1.2.0 → 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.
- package/dist/index.js +17 -7
- package/dist/index.js.map +1 -1
- package/dist/models/v1/requests/sip-endpoints/sip-endpoints-request-data.d.ts +5 -3
- package/dist/models/v1/sip-endpoint/index.d.ts +1 -1
- package/dist/models/v1/sip-endpoint/sip-endpoint.d.ts +15 -6
- package/dist/models/v1/sip-trunk/sip-trunk.d.ts +5 -0
- package/dist/rest/v1/access-control-list/access-control-list-api.jest.fixture.d.ts +0 -1
- package/dist/rest/v1/calls-history/calls-history-api.jest.fixture.d.ts +0 -1
- package/dist/rest/v1/country-permissions/country-permissions-api.jest.fixture.d.ts +0 -1
- package/dist/rest/v1/sip-endpoints/sip-endpoints-api.jest.fixture.d.ts +0 -1
- package/dist/rest/v1/sip-trunks/sip-trunks-api.jest.fixture.d.ts +0 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
37
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAA+C;AAC/C,yCAAuB;AACvB,oDAAkC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RegisteredEndpoint, StaticEndpoint } from '../../sip-endpoint';
|
|
2
|
+
export type StaticEndpointRequest = Omit<StaticEndpoint, 'id' | 'sipTrunkId' | 'createTime' | 'updateTime'>;
|
|
3
|
+
export type RegisteredEndpointRequest = Omit<RegisteredEndpoint, 'id' | 'sipTrunkId' | 'createTime' | 'updateTime'>;
|
|
2
4
|
export interface CreateSipEndpointRequestData {
|
|
3
5
|
/** The ID of the SIP trunk. */
|
|
4
6
|
'sipTrunkId': string;
|
|
5
7
|
/** The body containing the SIP Endpoint to create for the SIP trunk */
|
|
6
|
-
'createSipEndpointRequestBody':
|
|
8
|
+
'createSipEndpointRequestBody': StaticEndpointRequest | RegisteredEndpointRequest;
|
|
7
9
|
}
|
|
8
10
|
export interface DeleteSipEndpointRequestData {
|
|
9
11
|
/** The ID of the SIP trunk. */
|
|
@@ -31,5 +33,5 @@ export interface UpdateSipEndpointRequestData {
|
|
|
31
33
|
/** The ID of the SIP endpoint. */
|
|
32
34
|
'sipEndpointId': string;
|
|
33
35
|
/** The body containing the SIP Endpoint details to update */
|
|
34
|
-
'updateSipEndpointRequestBody':
|
|
36
|
+
'updateSipEndpointRequestBody': StaticEndpointRequest | RegisteredEndpointRequest;
|
|
35
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { SipEndpoint } from './sip-endpoint';
|
|
1
|
+
export type { SipEndpoint, SipEndpointBase, RegisteredEndpoint, StaticEndpoint } from './sip-endpoint';
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A SIP endpoint which is the address of your SIP infrastructure. It can either be an IP address or a domain name.
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type SipEndpoint = StaticEndpoint | RegisteredEndpoint;
|
|
5
|
+
export interface SipEndpointBase {
|
|
5
6
|
/** The ID of the SIP endpoint. */
|
|
6
7
|
id?: string;
|
|
7
8
|
/** The ID of the SIP trunk to which the endpoint is assigned. */
|
|
8
9
|
sipTrunkId?: string;
|
|
9
10
|
/** The friendly name of the SIP endpoint. */
|
|
10
11
|
name: string;
|
|
11
|
-
/** The address of the SIP endpoint can be an IP address or a domain name. EST uses IP authentication and will only accept calls from the specified address or domain. */
|
|
12
|
-
address: string;
|
|
13
|
-
/** The port of the SIP endpoint. */
|
|
14
|
-
port?: number;
|
|
15
12
|
/** The transport protocol of the SIP endpoint. */
|
|
16
|
-
transport?: 'TCP' | 'UDP';
|
|
13
|
+
transport?: 'TCP' | 'UDP' | 'TLS' | string;
|
|
17
14
|
/** Inbound call routing priority. If two or more endpoints have the same priority, calls will be routed to them using a round-robin strategy. */
|
|
18
15
|
priority: number;
|
|
19
16
|
/** Sets whether the SIP endpoint is enabled or not. */
|
|
@@ -23,3 +20,15 @@ export interface SipEndpoint {
|
|
|
23
20
|
/** The date and time that the SIP endpoint was last modified. */
|
|
24
21
|
updateTime?: Date | null;
|
|
25
22
|
}
|
|
23
|
+
export interface StaticEndpoint extends SipEndpointBase {
|
|
24
|
+
/** The address of the SIP endpoint can be an IP address or a domain name. EST uses IP authentication and will only accept calls from the specified address or domain. */
|
|
25
|
+
address: string;
|
|
26
|
+
/** The port of the SIP endpoint. */
|
|
27
|
+
port?: number;
|
|
28
|
+
}
|
|
29
|
+
export interface RegisteredEndpoint extends SipEndpointBase {
|
|
30
|
+
/** This property determines whether the endpoint is static or registered. If registered, this must be set to `true`. */
|
|
31
|
+
isRegistered: boolean;
|
|
32
|
+
/** The username for the credential list you want to use to register the endpoint. */
|
|
33
|
+
credentialUserName: string;
|
|
34
|
+
}
|
|
@@ -16,6 +16,11 @@ export interface SipTrunk {
|
|
|
16
16
|
callsPerSecond?: number;
|
|
17
17
|
/** Enable caller name lookup for incoming calls. US and canada only. */
|
|
18
18
|
enableCallerName?: boolean;
|
|
19
|
+
/** The valid E.164 phone number that will be dialed on inbound calls when no SIP endpoints are available. Required if `enableCallForward` property is `true`. */
|
|
20
|
+
callForwardNumber?: string;
|
|
21
|
+
/** When enabled, if an inbound call can not be delivered to a SIP endpoint, calls will be forwarded to the configured `callForwardNumber`. To forward all calls without trying SIP, simply disable (or delete) all SIP endpoints on this trunk. Logs (and billing) will be created for 2 calls (inbound and outbound).
|
|
22
|
+
* **Note:** Since there is no SIP connection, PCAPs will not be generated. */
|
|
23
|
+
enableCallForward?: boolean;
|
|
19
24
|
/** The date and time that the SIP trunk was created. */
|
|
20
25
|
createTime?: Date;
|
|
21
26
|
/** The date and time that the SIP trunk was last modified. */
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
1
|
import { AccessControlListApi } from './access-control-list-api';
|
|
3
2
|
import { AccessControlList, IpRange, AddAccessControlListToTrunkRequestData, AddIpRangeToAccessControlListRequestData, CreateAccessControlListRequestData, DeleteAccessControlListRequestData, DeleteAccessControlListFromTrunkRequestData, DeleteIpRangeFromAccessControlListRequestData, ListAccessControlListRequestData, ListAccessControlListsForTrunkRequestData, ListIpRangesForAccessControlListRequestData, UpdateAccessControlListRequestData, UpdateIpRangeFromAccessControlListRequestData, AddAccessControlListToTrunk, GetAccessControlListRequestData } from '../../../models';
|
|
4
3
|
import { ApiListPromise } from '@sinch/sdk-client';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
1
|
import { CountryPermissionsApi } from './country-permissions-api';
|
|
3
2
|
import { CountryPermission, GetCountryPermissionRequestData, ListCountryPermissionsRequestData, ListCountryPermissionsResponse, UpdateCountryPermissionRequestData } from '../../../models';
|
|
4
3
|
export declare class CountryPermissionsApiFixture implements Partial<Readonly<CountryPermissionsApi>> {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
1
|
import { SipEndpointsApi } from './sip-endpoints-api';
|
|
3
2
|
import { SipEndpoint, CreateSipEndpointRequestData, DeleteSipEndpointRequestData, ListSipEndpointsRequestData, GetSipEndpointByIdRequestData, UpdateSipEndpointRequestData } from '../../../models';
|
|
4
3
|
import { ApiListPromise } from '@sinch/sdk-client';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
1
|
import { SipTrunksApi } from './sip-trunks-api';
|
|
3
2
|
import { AddAccessControlListToTrunk, SipTrunk, AddAccessControlListToTrunkRequestData, CreateSipTrunkRequestData, DeleteAccessControlListFromTrunkRequestData, DeleteSipTrunkRequestData, ListAccessControlListsForTrunkRequestData, GetSipTrunkRequestData, ListSipTrunksRequestData, UpdateSipTrunkRequestData } from '../../../models';
|
|
4
3
|
import { ApiListPromise } from '@sinch/sdk-client';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sinch/elastic-sip-trunking",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Sinch Elastic SIP Trunking API",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"repository": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"test:e2e": "cucumber-js"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@sinch/sdk-client": "^1.
|
|
31
|
+
"@sinch/sdk-client": "^1.3.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {},
|
|
34
34
|
"publishConfig": {
|