chatbot-nc 2.1.1 → 2.1.2

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.
@@ -192,5 +192,6 @@ export declare const AWS: {
192
192
  };
193
193
  Transcribe: {
194
194
  startTranscribe: (param: import("@aws-sdk/client-transcribe").StartTranscriptionJobCommandInput) => Promise<import("@aws-sdk/client-transcribe").StartTranscriptionJobCommandOutput | undefined>;
195
+ startMedicalTranscribe: (param: import("@aws-sdk/client-transcribe").StartMedicalTranscriptionJobCommandInput) => Promise<import("@aws-sdk/client-transcribe").StartMedicalTranscriptionJobCommandOutput | undefined>;
195
196
  };
196
197
  };
@@ -1,4 +1,5 @@
1
- import { StartTranscriptionJobCommandInput } from "@aws-sdk/client-transcribe";
1
+ import { StartMedicalTranscriptionJobCommandInput, StartTranscriptionJobCommandInput } from "@aws-sdk/client-transcribe";
2
2
  export declare const Transcribe: {
3
3
  startTranscribe: (param: StartTranscriptionJobCommandInput) => Promise<import("@aws-sdk/client-transcribe").StartTranscriptionJobCommandOutput | undefined>;
4
+ startMedicalTranscribe: (param: StartMedicalTranscriptionJobCommandInput) => Promise<import("@aws-sdk/client-transcribe").StartMedicalTranscriptionJobCommandOutput | undefined>;
4
5
  };
@@ -4,11 +4,49 @@ exports.Transcribe = void 0;
4
4
  const client_transcribe_1 = require("@aws-sdk/client-transcribe");
5
5
  const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
6
6
  const client = new client_transcribe_1.TranscribeClient({ region: awsRegion });
7
+ const deleteTranscribeJob = async (param) => {
8
+ try {
9
+ var command = await new client_transcribe_1.DeleteTranscriptionJobCommand(param);
10
+ const response = await client.send(command);
11
+ console.log("delete job from transcribe");
12
+ return response;
13
+ }
14
+ catch (error) {
15
+ // log.error(`error occured while publishing event ${subject} to SNS `)
16
+ console.log(error, error);
17
+ }
18
+ };
19
+ const deleteMedicalTranscribeJob = async (param) => {
20
+ try {
21
+ var command = await new client_transcribe_1.DeleteMedicalTranscriptionJobCommand(param);
22
+ const response = await client.send(command);
23
+ console.log("delete job from transcribe");
24
+ return response;
25
+ }
26
+ catch (error) {
27
+ // log.error(`error occured while publishing event ${subject} to SNS `)
28
+ console.log(error, error);
29
+ }
30
+ };
7
31
  const startTranscribe = async (param) => {
8
32
  try {
9
33
  var command = await new client_transcribe_1.StartTranscriptionJobCommand(param);
10
34
  const response = await client.send(command);
11
35
  console.log("response received from transcribe");
36
+ //await deleteTranscribeJob({"TranscriptionJobName":`${param.TranscriptionJobName}`})
37
+ return response;
38
+ }
39
+ catch (error) {
40
+ // log.error(`error occured while publishing event ${subject} to SNS `)
41
+ console.log(error, error);
42
+ }
43
+ };
44
+ const startMedicalTranscribe = async (param) => {
45
+ try {
46
+ var command = await new client_transcribe_1.StartMedicalTranscriptionJobCommand(param);
47
+ const response = await client.send(command);
48
+ console.log("response received from medical transcribe");
49
+ await deleteMedicalTranscribeJob({ "MedicalTranscriptionJobName": `${param.MedicalTranscriptionJobName}` });
12
50
  return response;
13
51
  }
14
52
  catch (error) {
@@ -17,6 +55,7 @@ const startTranscribe = async (param) => {
17
55
  }
18
56
  };
19
57
  exports.Transcribe = {
20
- startTranscribe
58
+ startTranscribe,
59
+ startMedicalTranscribe
21
60
  };
22
61
  //# sourceMappingURL=AWSTranscribe.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AWSTranscribe.js","sourceRoot":"","sources":["../../../../aws/services/AWSTranscribe.ts"],"names":[],"mappings":";;;AAAA,kEAAkI;AAElI,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,WAAW,CAAC;AAChE,MAAM,MAAM,GAAG,IAAI,oCAAgB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAE3D,MAAM,eAAe,GAAG,KAAK,EAAE,KAAuC,EAAE,EAAE;IACtE,IAAI;QACA,IAAI,OAAO,GAAG,MAAM,IAAI,gDAA4B,CAAC,KAAK,CAAC,CAAC;QA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
192
192
  };
193
193
  Transcribe: {
194
194
  startTranscribe: (param: import("@aws-sdk/client-transcribe").StartTranscriptionJobCommandInput) => Promise<import("@aws-sdk/client-transcribe").StartTranscriptionJobCommandOutput | undefined>;
195
+ startMedicalTranscribe: (param: import("@aws-sdk/client-transcribe").StartMedicalTranscriptionJobCommandInput) => Promise<import("@aws-sdk/client-transcribe").StartMedicalTranscriptionJobCommandOutput | undefined>;
195
196
  };
196
197
  };
@@ -1,4 +1,5 @@
1
- import { StartTranscriptionJobCommandInput } from "@aws-sdk/client-transcribe";
1
+ import { StartMedicalTranscriptionJobCommandInput, StartTranscriptionJobCommandInput } from "@aws-sdk/client-transcribe";
2
2
  export declare const Transcribe: {
3
3
  startTranscribe: (param: StartTranscriptionJobCommandInput) => Promise<import("@aws-sdk/client-transcribe").StartTranscriptionJobCommandOutput | undefined>;
4
+ startMedicalTranscribe: (param: StartMedicalTranscriptionJobCommandInput) => Promise<import("@aws-sdk/client-transcribe").StartMedicalTranscriptionJobCommandOutput | undefined>;
4
5
  };
@@ -7,14 +7,52 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { StartTranscriptionJobCommand, TranscribeClient } from "@aws-sdk/client-transcribe";
10
+ import { DeleteMedicalTranscriptionJobCommand, DeleteTranscriptionJobCommand, StartMedicalTranscriptionJobCommand, StartTranscriptionJobCommand, TranscribeClient } from "@aws-sdk/client-transcribe";
11
11
  const awsRegion = process.env.AWS_DEFAULT_REGION || 'us-east-1';
12
12
  const client = new TranscribeClient({ region: awsRegion });
13
+ const deleteTranscribeJob = (param) => __awaiter(void 0, void 0, void 0, function* () {
14
+ try {
15
+ var command = yield new DeleteTranscriptionJobCommand(param);
16
+ const response = yield client.send(command);
17
+ console.log("delete job from transcribe");
18
+ return response;
19
+ }
20
+ catch (error) {
21
+ // log.error(`error occured while publishing event ${subject} to SNS `)
22
+ console.log(error, error);
23
+ }
24
+ });
25
+ const deleteMedicalTranscribeJob = (param) => __awaiter(void 0, void 0, void 0, function* () {
26
+ try {
27
+ var command = yield new DeleteMedicalTranscriptionJobCommand(param);
28
+ const response = yield client.send(command);
29
+ console.log("delete job from transcribe");
30
+ return response;
31
+ }
32
+ catch (error) {
33
+ // log.error(`error occured while publishing event ${subject} to SNS `)
34
+ console.log(error, error);
35
+ }
36
+ });
13
37
  const startTranscribe = (param) => __awaiter(void 0, void 0, void 0, function* () {
14
38
  try {
15
39
  var command = yield new StartTranscriptionJobCommand(param);
16
40
  const response = yield client.send(command);
17
41
  console.log("response received from transcribe");
42
+ //await deleteTranscribeJob({"TranscriptionJobName":`${param.TranscriptionJobName}`})
43
+ return response;
44
+ }
45
+ catch (error) {
46
+ // log.error(`error occured while publishing event ${subject} to SNS `)
47
+ console.log(error, error);
48
+ }
49
+ });
50
+ const startMedicalTranscribe = (param) => __awaiter(void 0, void 0, void 0, function* () {
51
+ try {
52
+ var command = yield new StartMedicalTranscriptionJobCommand(param);
53
+ const response = yield client.send(command);
54
+ console.log("response received from medical transcribe");
55
+ yield deleteMedicalTranscribeJob({ "MedicalTranscriptionJobName": `${param.MedicalTranscriptionJobName}` });
18
56
  return response;
19
57
  }
20
58
  catch (error) {
@@ -23,6 +61,7 @@ const startTranscribe = (param) => __awaiter(void 0, void 0, void 0, function* (
23
61
  }
24
62
  });
25
63
  export const Transcribe = {
26
- startTranscribe
64
+ startTranscribe,
65
+ startMedicalTranscribe
27
66
  };
28
67
  //# sourceMappingURL=AWSTranscribe.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AWSTranscribe.js","sourceRoot":"","sources":["../../../../aws/services/AWSTranscribe.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAQ,EAAE,4BAA4B,EAAqC,gBAAgB,EAAE,MAAQ,4BAA4B,CAAC;AAElI,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,WAAW,CAAC;AAChE,MAAM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A0B,CAAC,EAAC,6BAA6B,EAAC,GAAG,KAAK,CAAC,2BAA2B,EAAE,EAAC,CAAC,CAAA;QACxG,OAAO,QAAQ,CAAC;KACnB;IAAC,OAAO,KAAK,EAAE;QACZ,uEAAuE;QACvE,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;KAC7B;AACL,CAAC,CAAA,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,eAAe;IACf,sBAAsB;CACzB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatbot-nc",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",