@sinch/sdk-core 1.4.3 → 1.5.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
@@ -96,6 +96,7 @@ For convenience, importing `@sinch/sdk-core` is sufficient to be able to access
96
96
  - Elastic SIP Trunking: [`@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
 
@@ -105,6 +106,7 @@ All the interfaces are exported with an alias, equal to the API name:
105
106
  - `ElasticSipTrunking` for the Elastic SIP Trunking API
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
 
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';
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);
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"}
@@ -9,18 +9,26 @@ import { ElasticSipTrunkingService } from '@sinch/elastic-sip-trunking';
9
9
  import { NumberLookupService } from '@sinch/number-lookup';
10
10
  /** Sinch Client to declare and initialize the supported APIs */
11
11
  export declare class SinchClient {
12
+ /** Conversation API service (OAuth2: `projectId`, `keyId`, `keySecret`). */
12
13
  readonly conversation: ConversationService;
14
+ /** Fax API service (OAuth2: `projectId`, `keyId`, `keySecret`). */
13
15
  readonly fax: FaxService;
16
+ /** Elastic SIP Trunking API service (OAuth2: `projectId`, `keyId`, `keySecret`). */
14
17
  readonly elasticSipTrunking: ElasticSipTrunkingService;
18
+ /** Numbers API service (OAuth2: `projectId`, `keyId`, `keySecret`). */
15
19
  readonly numbers: NumbersService;
20
+ /** SMS API service (OAuth2 or API token; see {@link SmsService}). */
16
21
  readonly sms: SmsService;
22
+ /** Verification API service (signed app: `applicationId`, `applicationSecret`). */
17
23
  readonly verification: VerificationService;
24
+ /** Voice API service (signed app: `applicationId`, `applicationSecret`). */
18
25
  readonly voice: VoiceService;
26
+ /** Number Lookup API service (OAuth2: `projectId`, `keyId`, `keySecret`). */
19
27
  readonly numberLookup: NumberLookupService;
20
28
  /**
21
29
  * Initialize your API Client instance with the provided credentials.
22
30
  *
23
31
  * @param {SinchClientParameters} params - The object containing the Sinch credentials.
24
32
  */
25
- constructor(params: SinchClientParameters);
33
+ constructor(clientParams: SinchClientParameters);
26
34
  }
@@ -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 sdk_client_1 = require("@sinch/sdk-client");
10
11
  const elastic_sip_trunking_1 = require("@sinch/elastic-sip-trunking");
11
12
  const number_lookup_1 = require("@sinch/number-lookup");
12
13
  /** Sinch Client to declare and initialize the supported APIs */
@@ -16,7 +17,8 @@ class SinchClient {
16
17
  *
17
18
  * @param {SinchClientParameters} params - The object containing the Sinch credentials.
18
19
  */
19
- constructor(params) {
20
+ constructor(clientParams) {
21
+ const params = (0, sdk_client_1.resolveClientParameters)(clientParams);
20
22
  this.conversation = new conversation_1.ConversationService(params);
21
23
  this.elasticSipTrunking = new elastic_sip_trunking_1.ElasticSipTrunkingService(params);
22
24
  this.fax = new fax_1.FaxService(params);
@@ -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,C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"name": "@sinch/sdk-core",
3
- "version": "1.4.3",
3
+ "version": "1.5.0",
4
4
  "description": "Node.js client for the Sinch API platform",
5
5
  "homepage": "",
6
6
  "repository": {
@@ -29,14 +29,14 @@
29
29
  "compile": "tsc --build --verbose"
30
30
  },
31
31
  "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"
32
+ "@sinch/conversation": "1.5.0",
33
+ "@sinch/elastic-sip-trunking": "1.5.0",
34
+ "@sinch/fax": "1.5.0",
35
+ "@sinch/numbers": "1.5.0",
36
+ "@sinch/sms": "1.5.0",
37
+ "@sinch/verification": "1.5.0",
38
+ "@sinch/voice": "1.5.0",
39
+ "@sinch/number-lookup": "1.5.0"
40
40
  },
41
41
  "devDependencies": {},
42
42
  "publishConfig": {