@aristech-org/stt-client
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -6,4 +6,3 @@ import * as grpc from '@grpc/grpc-js'; | ||
/** | ||
* The Aristech STT-Server uri e.g. cloud.aristech.de:5001 | ||
* @default localhost:5001 | ||
* The Aristech STT-Server uri e.g. stt.example.com | ||
*/ | ||
@@ -75,3 +74,3 @@ host?: string; | ||
*/ | ||
accountInfo(request?: AccountInfoRequest): Promise<AccountInfoResponse>; | ||
accountInfo(request: DeepPartial<AccountInfoRequest>): Promise<AccountInfoResponse>; | ||
private getClient; | ||
@@ -78,0 +77,0 @@ } |
@@ -125,6 +125,7 @@ import * as grpc from '@grpc/grpc-js'; | ||
*/ | ||
accountInfo(request = AccountInfoRequest.create()) { | ||
accountInfo(request) { | ||
return new Promise((res, rej) => { | ||
const client = this.getClient(); | ||
client.accountInfo(request, (error, response) => { | ||
const req = AccountInfoRequest.create(request); | ||
client.accountInfo(req, (error, response) => { | ||
if (error) { | ||
@@ -139,4 +140,4 @@ rej(error); | ||
getClient() { | ||
const { rootCert: rootCertPath, rootCertContent, auth } = this.cOptions; | ||
let host = this.cOptions.host || 'stt.aristech.cloud'; | ||
const { rootCert: rootCertPath, rootCertContent, auth, grpcClientOptions } = this.cOptions; | ||
let host = this.cOptions.host || 'localhost:9423'; | ||
let ssl = this.cOptions.ssl === true; | ||
@@ -189,3 +190,3 @@ let rootCert = null; | ||
} | ||
return new SttServiceClient(host, creds); | ||
return new SttServiceClient(host, creds, grpcClientOptions); | ||
} | ||
@@ -192,0 +193,0 @@ } |
{ | ||
"name": "@aristech-org/stt-client", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A Node.js client library for the Aristech Speech-to-Text API", | ||
@@ -38,6 +38,6 @@ "type": "module", | ||
"devDependencies": { | ||
"@types/node": "22.7.7", | ||
"@types/node": "22.7.9", | ||
"dotenv": "^16.4.5", | ||
"simple-git-hooks": "^2.11.1", | ||
"ts-proto": "^2.2.4", | ||
"ts-proto": "2.2.5", | ||
"tsx": "^4.19.1", | ||
@@ -44,0 +44,0 @@ "typescript": "^5.6.3" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
264189