@sinch/sdk-core 0.0.5 → 1.1.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/README.md CHANGED
@@ -2,9 +2,6 @@
2
2
 
3
3
  This package contains the Sinch Client SDK for Node.js. To use it, you will need a Sinch account. Please [sign up](https://dashboard.sinch.com/signup) or [log in](https://dashboard.sinch.com/login) if you already have one.
4
4
 
5
- > <span style="color:red; font-weight:bold">Warning:</span>
6
- > **This SDK is currently available to selected developers for preview use only. It is being provided for the purpose of collecting feedback, and should not be used in production environments.**
7
-
8
5
  ## Installation
9
6
 
10
7
  ### With NPM
@@ -32,7 +29,7 @@ import { SinchClient } from '@sinch/sdk-core';
32
29
 
33
30
  (async () => {
34
31
  // The credentials can be found on the Account dashboard: https://dashboard.sinch.com/account/access-keys
35
- const sinch: Pick<SinchClient, 'conversation' | 'fax' | 'numbers' | 'sms'> = new SinchClient({
32
+ const sinch: Pick<SinchClient, 'conversation' | 'elasticSipTrunking' | 'fax' | 'numbers' | 'sms'> = new SinchClient({
36
33
  projectId: 'my-project-id',
37
34
  keyId: 'my-key-id',
38
35
  keySecret: 'my-key-secret',
@@ -96,12 +93,20 @@ import { SinchClient } from '@sinch/sdk-core';
96
93
  For convenience, importing `@sinch/sdk-core` is sufficient to be able to access to all the APIs' classes and interfaces. In case you need to use a single API, they are also packaged as single NPM packages:
97
94
  - SMS: [`@sinch/sms`](https://www.npmjs.com/package/@sinch/sms)
98
95
  - Conversation: [`@sinch/conversation`](https://www.npmjs.com/package/@sinch/conversation)
96
+ - Elastic SIP Trunking: [`@sinch/elastic-sip-trunking`](https://www.npmjs.com/package/@sinch/elastic-sip-trunking)
99
97
  - Fax: [`@sinch/fax`](https://www.npmjs.com/package/@sinch/fax)
100
98
  - Numbers: [`@sinch/numbers`](https://www.npmjs.com/package/@sinch/numbers)
101
99
  - Verification: [`@sinch/verification`](https://www.npmjs.com/package/@sinch/verification)
102
100
  - Voice: [`@sinch/voice`](https://www.npmjs.com/package/@sinch/voice)
103
101
 
104
- All the interfaces are exported with an alias, equal to the API name: `Sms` for the SMS API, `Conversation` for the Conversation API, `Fax` for the Fax API and so on.
102
+ All the interfaces are exported with an alias, equal to the API name:
103
+ - `Sms` for the SMS API
104
+ - `Conversation` for the Conversation API
105
+ - `ElasticSipTrunking` for the Elastic SIP Trunking API
106
+ - `Fax` for the Fax API
107
+ - `Numbers` for the Numbers API
108
+ - `Verification` for the Verification API
109
+ - `Voice` for the Voice API
105
110
 
106
111
  Here is an example about using the TypeScript types to send a fax:
107
112
 
@@ -169,17 +174,18 @@ const { SinchClient } = require('@sinch/sdk-core');
169
174
  For various reasons (development phase, testing, network restrictions, ...), one may need to update the default API endpoint, pointing to production.
170
175
  Each API exposes dedicated parameters to override the default hostname and region:
171
176
 
172
- | API Name | Parameter | Region |
173
- |----------------|------------------------------------|--------------------|
174
- | Authentication | authHostname | N/A |
175
- | SMS | smsHostname | smsRegion |
176
- | Conversation | conversationHostname | conversationRegion |
177
- | | conversationTemplatesHostname | |
178
- | Fax | faxHostname | faxRegion |
179
- | Voice | voiceHostname | voiceRegion |
180
- | | voiceApplicationManagementHostname | |
181
- | Numbers | numbersHostname | N/A |
182
- | Verification | verificationHostname | N/A |
177
+ | API Name | Parameter | Region |
178
+ |-----------------------|------------------------------------|--------------------|
179
+ | Authentication | authHostname | N/A |
180
+ | SMS | smsHostname | smsRegion |
181
+ | Conversation | conversationHostname | conversationRegion |
182
+ | | conversationTemplatesHostname | conversationRegion |
183
+ | Elastic SIP Trunking | elasticSipTrunkingHostname | N/A |
184
+ | Fax | faxHostname | faxRegion |
185
+ | Voice | voiceHostname | voiceRegion |
186
+ | | voiceApplicationManagementHostname | N/A |
187
+ | Numbers | numbersHostname | N/A |
188
+ | Verification | verificationHostname | N/A |
183
189
 
184
190
  And here are the list of supported regions per regionalized API:
185
191
 
@@ -335,11 +341,14 @@ Developer Experience team: [devexp@sinch.com](mailto:devexp@sinch.com)
335
341
 
336
342
  Here is the list of the Sinch API and there level of support by the Node.js SDK:
337
343
 
338
- | API Category | API Name | Status |
339
- |------------------------|------------------|:------:|
340
- | Messaging | SMS API | ✅ |
341
- | | Conversation API | ✅ |
342
- | | Fax API | ✅ |
343
- | Voice and Video | Voice API | ✅ |
344
- | Numbers & Connectivity | Numbers API | ✅ |
345
- | Verification | Verification API | ✅ |
344
+ | API Category | API Name | Status |
345
+ |------------------------|-----------------------------------|:------:|
346
+ | Messaging | SMS API | ✅ |
347
+ | | Conversation API | ✅ |
348
+ | | Fax API `(beta)` | ✅ |
349
+ | Voice and Video | Voice API | ✅ |
350
+ | | Elastic SIP Trunking API `(beta)` | ✅ |
351
+ | Numbers & Connectivity | Numbers API | ✅ |
352
+ | Verification | Verification API | ✅ |
353
+
354
+ > Note: `(beta)` means that the underlying API product is still in beta version and requires specific actions for the end user to be able to use it. Please check on the dashboard or with your account manager.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './sinch-client';
2
2
  export * from '@sinch/conversation';
3
+ export * from '@sinch/elastic-sip-trunking';
3
4
  export * from '@sinch/fax';
4
5
  export * from '@sinch/numbers';
5
6
  export * from '@sinch/sms';
package/dist/index.js CHANGED
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./sinch-client"), exports);
18
18
  __exportStar(require("@sinch/conversation"), exports);
19
+ __exportStar(require("@sinch/elastic-sip-trunking"), exports);
19
20
  __exportStar(require("@sinch/fax"), exports);
20
21
  __exportStar(require("@sinch/numbers"), exports);
21
22
  __exportStar(require("@sinch/sms"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,sDAAoC;AACpC,6CAA2B;AAC3B,iDAA+B;AAC/B,6CAA2B;AAC3B,sDAAoC;AACpC,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,sDAAoC;AACpC,8DAA4C;AAC5C,6CAA2B;AAC3B,iDAA+B;AAC/B,6CAA2B;AAC3B,sDAAoC;AACpC,+CAA6B"}
@@ -5,10 +5,12 @@ import { SmsService } from '@sinch/sms';
5
5
  import { VerificationService } from '@sinch/verification';
6
6
  import { VoiceService } from '@sinch/voice';
7
7
  import { SinchClientParameters } from '@sinch/sdk-client';
8
+ import { ElasticSipTrunkingService } from '@sinch/elastic-sip-trunking';
8
9
  /** Sinch Client to declare and initialize the supported APIs */
9
10
  export declare class SinchClient {
10
11
  readonly conversation: ConversationService;
11
12
  readonly fax: FaxService;
13
+ readonly elasticSipTrunking: ElasticSipTrunkingService;
12
14
  readonly numbers: NumbersService;
13
15
  readonly sms: SmsService;
14
16
  readonly verification: VerificationService;
@@ -7,6 +7,7 @@ const numbers_1 = require("@sinch/numbers");
7
7
  const sms_1 = require("@sinch/sms");
8
8
  const verification_1 = require("@sinch/verification");
9
9
  const voice_1 = require("@sinch/voice");
10
+ const elastic_sip_trunking_1 = require("@sinch/elastic-sip-trunking");
10
11
  /** Sinch Client to declare and initialize the supported APIs */
11
12
  class SinchClient {
12
13
  /**
@@ -15,17 +16,12 @@ class SinchClient {
15
16
  * @param {SinchClientParameters} params - The object containing the Sinch credentials.
16
17
  */
17
18
  constructor(params) {
18
- // Initialize the "Conversation" API
19
19
  this.conversation = new conversation_1.ConversationService(params);
20
- // Initialize the "Fax" API
20
+ this.elasticSipTrunking = new elastic_sip_trunking_1.ElasticSipTrunkingService(params);
21
21
  this.fax = new fax_1.FaxService(params);
22
- // Initialize the "Numbers" API
23
22
  this.numbers = new numbers_1.NumbersService(params);
24
- // Initialize the "SMS" API.
25
23
  this.sms = new sms_1.SmsService(params);
26
- // Initialize the "Verification" API
27
24
  this.verification = new verification_1.VerificationService(params);
28
- // Initialize the "Voice" API
29
25
  this.voice = new voice_1.VoiceService(params);
30
26
  }
31
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sinch-client.js","sourceRoot":"","sources":["../src/sinch-client.ts"],"names":[],"mappings":";;;AAAA,sDAA0D;AAC1D,oCAAwC;AACxC,4CAAgD;AAChD,oCAAwC;AACxC,sDAA0D;AAC1D,wCAA4C;AAG5C,gEAAgE;AAChE,MAAa,WAAW;IAStB;;;;OAIG;IACH,YAAY,MAA6B;QACvC,oCAAoC;QACpC,IAAI,CAAC,YAAY,GAAG,IAAI,kCAAmB,CAAC,MAAM,CAAC,CAAC;QAEpD,2BAA2B;QAC3B,IAAI,CAAC,GAAG,GAAG,IAAI,gBAAU,CAAC,MAAM,CAAC,CAAC;QAElC,+BAA+B;QAC/B,IAAI,CAAC,OAAO,GAAG,IAAI,wBAAc,CAAC,MAAM,CAAC,CAAC;QAE1C,4BAA4B;QAC5B,IAAI,CAAC,GAAG,GAAG,IAAI,gBAAU,CAAC,MAAM,CAAC,CAAC;QAElC,oCAAoC;QACpC,IAAI,CAAC,YAAY,GAAG,IAAI,kCAAmB,CAAC,MAAM,CAAC,CAAC;QAEpD,6BAA6B;QAC7B,IAAI,CAAC,KAAK,GAAG,IAAI,oBAAY,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;CACF;AAjCD,kCAiCC"}
1
+ {"version":3,"file":"sinch-client.js","sourceRoot":"","sources":["../src/sinch-client.ts"],"names":[],"mappings":";;;AAAA,sDAA0D;AAC1D,oCAAwC;AACxC,4CAAgD;AAChD,oCAAwC;AACxC,sDAA0D;AAC1D,wCAA4C;AAE5C,sEAAwE;AAExE,gEAAgE;AAChE,MAAa,WAAW;IAUtB;;;;OAIG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,YAAY,GAAG,IAAI,kCAAmB,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,kBAAkB,GAAG,IAAI,gDAAyB,CAAC,MAAM,CAAC,CAAC;QAChE,IAAI,CAAC,GAAG,GAAG,IAAI,gBAAU,CAAC,MAAM,CAAC,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,IAAI,wBAAc,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,CAAC,GAAG,GAAG,IAAI,gBAAU,CAAC,MAAM,CAAC,CAAC;QAClC,IAAI,CAAC,YAAY,GAAG,IAAI,kCAAmB,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,KAAK,GAAG,IAAI,oBAAY,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;CACF;AAxBD,kCAwBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinch/sdk-core",
3
- "version": "0.0.5",
3
+ "version": "1.1.0",
4
4
  "description": "Node.js client for the Sinch API platform",
5
5
  "homepage": "",
6
6
  "repository": {
@@ -29,12 +29,13 @@
29
29
  "compile": "tsc --build --verbose"
30
30
  },
31
31
  "dependencies": {
32
- "@sinch/conversation": "^0.0.5",
33
- "@sinch/fax": "^0.0.5",
34
- "@sinch/numbers": "^0.0.5",
35
- "@sinch/sms": "^0.0.5",
36
- "@sinch/verification": "^0.0.5",
37
- "@sinch/voice": "^0.0.5"
32
+ "@sinch/conversation": "^1.1.0",
33
+ "@sinch/elastic-sip-trunking": "^1.1.0",
34
+ "@sinch/fax": "^1.1.0",
35
+ "@sinch/numbers": "^1.1.0",
36
+ "@sinch/sms": "^1.1.0",
37
+ "@sinch/verification": "^1.1.0",
38
+ "@sinch/voice": "^1.1.0"
38
39
  },
39
40
  "devDependencies": {},
40
41
  "publishConfig": {