@sinch/sdk-core 1.4.3 → 1.6.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
@@ -93,18 +93,20 @@ import { SinchClient } from '@sinch/sdk-core';
93
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:
94
94
  - SMS: [`@sinch/sms`](https://www.npmjs.com/package/@sinch/sms)
95
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)
96
+ - Elastic SIP Trunking (deprecated; removed in version 2): [`@sinch/elastic-sip-trunking`](https://www.npmjs.com/package/@sinch/elastic-sip-trunking)
97
97
  - Fax: [`@sinch/fax`](https://www.npmjs.com/package/@sinch/fax)
98
98
  - Numbers: [`@sinch/numbers`](https://www.npmjs.com/package/@sinch/numbers)
99
+ - Number Lookup: [`@sinch/number-lookup`](https://www.npmjs.com/package/@sinch/number-lookup)
99
100
  - Verification: [`@sinch/verification`](https://www.npmjs.com/package/@sinch/verification)
100
101
  - Voice: [`@sinch/voice`](https://www.npmjs.com/package/@sinch/voice)
101
102
 
102
103
  All the interfaces are exported with an alias, equal to the API name:
103
104
  - `Sms` for the SMS API
104
105
  - `Conversation` for the Conversation API
105
- - `ElasticSipTrunking` for the Elastic SIP Trunking API
106
+ - `ElasticSipTrunking` for the Elastic SIP Trunking API (deprecated; removed in version 2)
106
107
  - `Fax` for the Fax API
107
108
  - `Numbers` for the Numbers API
109
+ - `NumberLookup` for the Number Lookup API
108
110
  - `Verification` for the Verification API
109
111
  - `Voice` for the Voice API
110
112
 
@@ -180,10 +182,11 @@ Each API exposes dedicated parameters to override the default hostname and regio
180
182
  | SMS | smsHostname | smsRegion |
181
183
  | Conversation | conversationHostname | conversationRegion |
182
184
  | | conversationTemplatesHostname | conversationRegion |
183
- | Elastic SIP Trunking | elasticSipTrunkingHostname | N/A |
185
+ | Elastic SIP Trunking (deprecated) | elasticSipTrunkingHostname | N/A |
184
186
  | Fax | faxHostname | faxRegion |
185
187
  | Voice | voiceHostname | voiceRegion |
186
188
  | | voiceApplicationManagementHostname | N/A |
189
+ | | voiceV2Hostname | N/A |
187
190
  | Numbers | numbersHostname | N/A |
188
191
  | Verification | verificationHostname | N/A |
189
192
 
@@ -345,10 +348,10 @@ Here is the list of the Sinch API and there level of support by the Node.js SDK:
345
348
  |------------------------|-----------------------------------|:------:|
346
349
  | Messaging | SMS API | ✅ |
347
350
  | | Conversation API | ✅ |
348
- | | Fax API `(beta)` | ✅ |
351
+ | | Fax API | ✅ |
349
352
  | Voice and Video | Voice API | ✅ |
350
- | | Elastic SIP Trunking API `(beta)` | ✅ |
353
+ | | Elastic SIP Trunking API `(deprecated)` | ✅ |
351
354
  | Numbers & Connectivity | Numbers API | ✅ |
352
355
  | Verification | Verification API | ✅ |
353
356
 
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.
357
+ > Note: `(deprecated)` means the API will be removed in version 2 of the SDK. Elastic SIP Trunking remains available on 1.x.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './sinch-client';
2
+ export * from '@sinch/sdk-client';
2
3
  export * from '@sinch/conversation';
3
4
  export * from '@sinch/elastic-sip-trunking';
4
5
  export * from '@sinch/fax';
@@ -7,3 +8,4 @@ export * from '@sinch/sms';
7
8
  export * from '@sinch/verification';
8
9
  export * from '@sinch/voice';
9
10
  export * from '@sinch/number-lookup';
11
+ export * from '@sinch/provisioning';
package/dist/index.js CHANGED
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./sinch-client"), exports);
18
+ __exportStar(require("@sinch/sdk-client"), exports);
18
19
  __exportStar(require("@sinch/conversation"), exports);
19
20
  __exportStar(require("@sinch/elastic-sip-trunking"), exports);
20
21
  __exportStar(require("@sinch/fax"), exports);
@@ -23,4 +24,5 @@ __exportStar(require("@sinch/sms"), exports);
23
24
  __exportStar(require("@sinch/verification"), exports);
24
25
  __exportStar(require("@sinch/voice"), exports);
25
26
  __exportStar(require("@sinch/number-lookup"), exports);
27
+ __exportStar(require("@sinch/provisioning"), exports);
26
28
  //# 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,iDAA+B;AAC/B,sDAAoC;AACpC,8DAA4C;AAC5C,6CAA2B;AAC3B,iDAA+B;AAC/B,6CAA2B;AAC3B,sDAAoC;AACpC,+CAA6B;AAC7B,uDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,oDAAkC;AAClC,sDAAoC;AACpC,8DAA4C;AAC5C,6CAA2B;AAC3B,iDAA+B;AAC/B,6CAA2B;AAC3B,sDAAoC;AACpC,+CAA6B;AAC7B,uDAAqC;AACrC,sDAAoC"}
@@ -1,3 +1,4 @@
1
+ import { ProvisioningService } from '@sinch/provisioning';
1
2
  import { ConversationService } from '@sinch/conversation';
2
3
  import { FaxService } from '@sinch/fax';
3
4
  import { NumbersService } from '@sinch/numbers';
@@ -9,18 +10,31 @@ import { ElasticSipTrunkingService } from '@sinch/elastic-sip-trunking';
9
10
  import { NumberLookupService } from '@sinch/number-lookup';
10
11
  /** Sinch Client to declare and initialize the supported APIs */
11
12
  export declare class SinchClient {
13
+ /** Conversation API service (OAuth2: `projectId`, `keyId`, `keySecret`). */
12
14
  readonly conversation: ConversationService;
15
+ /** Fax API service (OAuth2: `projectId`, `keyId`, `keySecret`). */
13
16
  readonly fax: FaxService;
17
+ /**
18
+ * Elastic SIP Trunking API service (OAuth2: `projectId`, `keyId`, `keySecret`).
19
+ * @deprecated Elastic SIP Trunking support will be removed in version 2 of the SDK.
20
+ */
14
21
  readonly elasticSipTrunking: ElasticSipTrunkingService;
22
+ /** Numbers API service (OAuth2: `projectId`, `keyId`, `keySecret`). */
15
23
  readonly numbers: NumbersService;
24
+ /** SMS API service (OAuth2 or API token; see {@link SmsService}). */
16
25
  readonly sms: SmsService;
26
+ /** Verification API service (signed app: `applicationId`, `applicationSecret`). */
17
27
  readonly verification: VerificationService;
28
+ /** Voice API service (signed app: `applicationId`, `applicationSecret`). */
18
29
  readonly voice: VoiceService;
30
+ /** Number Lookup API service (OAuth2: `projectId`, `keyId`, `keySecret`). */
19
31
  readonly numberLookup: NumberLookupService;
32
+ /** Provisioning API service (OAuth2: `projectId`, `keyId`, `keySecret`). */
33
+ readonly provisioning: ProvisioningService;
20
34
  /**
21
35
  * Initialize your API Client instance with the provided credentials.
22
36
  *
23
37
  * @param {SinchClientParameters} params - The object containing the Sinch credentials.
24
38
  */
25
- constructor(params: SinchClientParameters);
39
+ constructor(clientParams: SinchClientParameters);
26
40
  }
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SinchClient = void 0;
4
+ const provisioning_1 = require("@sinch/provisioning");
4
5
  const conversation_1 = require("@sinch/conversation");
5
6
  const fax_1 = require("@sinch/fax");
6
7
  const numbers_1 = require("@sinch/numbers");
7
8
  const sms_1 = require("@sinch/sms");
8
9
  const verification_1 = require("@sinch/verification");
9
10
  const voice_1 = require("@sinch/voice");
11
+ const sdk_client_1 = require("@sinch/sdk-client");
10
12
  const elastic_sip_trunking_1 = require("@sinch/elastic-sip-trunking");
11
13
  const number_lookup_1 = require("@sinch/number-lookup");
12
14
  /** Sinch Client to declare and initialize the supported APIs */
@@ -16,7 +18,8 @@ class SinchClient {
16
18
  *
17
19
  * @param {SinchClientParameters} params - The object containing the Sinch credentials.
18
20
  */
19
- constructor(params) {
21
+ constructor(clientParams) {
22
+ const params = (0, sdk_client_1.resolveClientParameters)(clientParams);
20
23
  this.conversation = new conversation_1.ConversationService(params);
21
24
  this.elasticSipTrunking = new elastic_sip_trunking_1.ElasticSipTrunkingService(params);
22
25
  this.fax = new fax_1.FaxService(params);
@@ -25,6 +28,7 @@ class SinchClient {
25
28
  this.verification = new verification_1.VerificationService(params);
26
29
  this.voice = new voice_1.VoiceService(params);
27
30
  this.numberLookup = new number_lookup_1.NumberLookupService(params);
31
+ this.provisioning = new provisioning_1.ProvisioningService(params);
28
32
  }
29
33
  }
30
34
  exports.SinchClient = SinchClient;
@@ -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;AAE5C,sEAAwE;AACxE,wDAA2D;AAE3D,gEAAgE;AAChE,MAAa,WAAW;IAWtB;;;;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;QACtC,IAAI,CAAC,YAAY,GAAG,IAAI,mCAAmB,CAAC,MAAM,CAAC,CAAC;IACtD,CAAC;CACF;AA1BD,kCA0BC"}
1
+ {"version":3,"file":"sinch-client.js","sourceRoot":"","sources":["../src/sinch-client.ts"],"names":[],"mappings":";;;AAAA,sDAA0D;AAC1D,sDAA0D;AAC1D,oCAAwC;AACxC,4CAAgD;AAChD,oCAAwC;AACxC,sDAA0D;AAC1D,wCAA4C;AAC5C,kDAAmF;AACnF,sEAAwE;AACxE,wDAA2D;AAE3D,gEAAgE;AAChE;IAwBE;;;;OAIG;IACH,YAAY,YAAmC;QAC7C,MAAM,MAAM,GAAG,IAAA,oCAAuB,EAAC,YAAY,CAAC,CAAC;QACrD,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;QACtC,IAAI,CAAC,YAAY,GAAG,IAAI,mCAAmB,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,CAAC,YAAY,GAAG,IAAI,kCAAmB,CAAC,MAAM,CAAC,CAAC;IACtD,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinch/sdk-core",
3
- "version": "1.4.3",
3
+ "version": "1.6.0",
4
4
  "description": "Node.js client for the Sinch API platform",
5
5
  "homepage": "",
6
6
  "repository": {
@@ -13,6 +13,7 @@
13
13
  "types": "dist/index.d.ts",
14
14
  "exports": {
15
15
  ".": {
16
+ "types": "./dist/index.d.ts",
16
17
  "import": "./dist/index.js",
17
18
  "require": "./dist/index.js"
18
19
  },
@@ -22,21 +23,24 @@
22
23
  "src": "dist",
23
24
  "test": "tests"
24
25
  },
25
- "files": ["/dist"],
26
+ "files": [
27
+ "/dist"
28
+ ],
26
29
  "scripts": {
27
30
  "build": "yarn run clean && yarn run compile",
28
31
  "clean": "rimraf dist tsconfig.tsbuildinfo",
29
32
  "compile": "tsc --build --verbose"
30
33
  },
31
34
  "dependencies": {
32
- "@sinch/conversation": "1.4.3",
33
- "@sinch/elastic-sip-trunking": "1.4.3",
34
- "@sinch/fax": "1.4.3",
35
- "@sinch/numbers": "1.4.3",
36
- "@sinch/sms": "1.4.3",
37
- "@sinch/verification": "1.4.3",
38
- "@sinch/voice": "1.4.3",
39
- "@sinch/number-lookup": "1.4.3"
35
+ "@sinch/conversation": "1.6.0",
36
+ "@sinch/elastic-sip-trunking": "1.6.0",
37
+ "@sinch/fax": "1.6.0",
38
+ "@sinch/numbers": "1.6.0",
39
+ "@sinch/sms": "1.6.0",
40
+ "@sinch/verification": "1.6.0",
41
+ "@sinch/voice": "1.6.0",
42
+ "@sinch/number-lookup": "1.6.0",
43
+ "@sinch/provisioning": "1.6.0"
40
44
  },
41
45
  "devDependencies": {},
42
46
  "publishConfig": {