chatbot-agentic 1.0.9 → 1.0.11
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/dist/cjs/aws/index.d.ts +5 -0
- package/dist/cjs/aws/services/AWSRekognition.d.ts +5 -1
- package/dist/cjs/aws/services/AWSRekognition.js +59 -1
- package/dist/cjs/aws/services/AWSRekognition.js.map +1 -1
- package/dist/cjs/aws/services/AWSTextTract.d.ts +2 -1
- package/dist/cjs/aws/services/AWSTextTract.js +18 -1
- package/dist/cjs/aws/services/AWSTextTract.js.map +1 -1
- package/dist/esm/aws/index.d.ts +5 -0
- package/dist/esm/aws/services/AWSRekognition.d.ts +5 -1
- package/dist/esm/aws/services/AWSRekognition.js +60 -2
- package/dist/esm/aws/services/AWSRekognition.js.map +1 -1
- package/dist/esm/aws/services/AWSTextTract.d.ts +2 -1
- package/dist/esm/aws/services/AWSTextTract.js +19 -2
- package/dist/esm/aws/services/AWSTextTract.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/aws/index.d.ts
CHANGED
|
@@ -22,9 +22,14 @@ export declare const AWS: {
|
|
|
22
22
|
Rekognition: {
|
|
23
23
|
startLableDetection: (data: import("@aws-sdk/client-rekognition").StartLabelDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").StartLabelDetectionCommandOutput>;
|
|
24
24
|
getLabelDetection: (data: import("@aws-sdk/client-rekognition").GetLabelDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").GetLabelDetectionCommandOutput>;
|
|
25
|
+
startTextDetection: (data: import("@aws-sdk/client-rekognition").StartTextDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").StartTextDetectionCommandOutput>;
|
|
26
|
+
getTextDetection: (data: import("@aws-sdk/client-rekognition").GetTextDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").GetTextDetectionCommandOutput>;
|
|
27
|
+
textDetection: (data: import("@aws-sdk/client-rekognition").DetectTextCommandInput) => Promise<import("@aws-sdk/client-rekognition").DetectTextCommandOutput>;
|
|
28
|
+
labelDetection: (data: import("@aws-sdk/client-rekognition").DetectTextCommandInput) => Promise<import("@aws-sdk/client-rekognition").DetectLabelsCommandOutput>;
|
|
25
29
|
};
|
|
26
30
|
Textract: {
|
|
27
31
|
startDocumentTextDetection: (data: import("@aws-sdk/client-textract").StartDocumentTextDetectionCommandInput) => Promise<import("@aws-sdk/client-textract").StartDocumentTextDetectionCommandOutput>;
|
|
28
32
|
getDocumentTextDetection: (data: import("@aws-sdk/client-textract").GetDocumentTextDetectionCommandInput) => Promise<import("@aws-sdk/client-textract").GetDocumentTextDetectionCommandOutput>;
|
|
33
|
+
documentTextDetection: (data: import("@aws-sdk/client-textract").DetectDocumentTextCommandInput) => Promise<import("@aws-sdk/client-textract").DetectDocumentTextCommandOutput>;
|
|
29
34
|
};
|
|
30
35
|
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { GetLabelDetectionCommandInput, StartLabelDetectionCommandInput } from "@aws-sdk/client-rekognition";
|
|
1
|
+
import { DetectTextCommandInput, GetLabelDetectionCommandInput, GetTextDetectionCommandInput, StartLabelDetectionCommandInput, StartTextDetectionCommandInput } from "@aws-sdk/client-rekognition";
|
|
2
2
|
export declare const Rekognition: {
|
|
3
3
|
startLableDetection: (data: StartLabelDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").StartLabelDetectionCommandOutput>;
|
|
4
4
|
getLabelDetection: (data: GetLabelDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").GetLabelDetectionCommandOutput>;
|
|
5
|
+
startTextDetection: (data: StartTextDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").StartTextDetectionCommandOutput>;
|
|
6
|
+
getTextDetection: (data: GetTextDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").GetTextDetectionCommandOutput>;
|
|
7
|
+
textDetection: (data: DetectTextCommandInput) => Promise<import("@aws-sdk/client-rekognition").DetectTextCommandOutput>;
|
|
8
|
+
labelDetection: (data: DetectTextCommandInput) => Promise<import("@aws-sdk/client-rekognition").DetectLabelsCommandOutput>;
|
|
5
9
|
};
|
|
@@ -21,6 +21,17 @@ const startLableDetection = async (data) => {
|
|
|
21
21
|
throw error;
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
+
const startTextDetection = async (data) => {
|
|
25
|
+
try {
|
|
26
|
+
const command = new client_rekognition_1.StartTextDetectionCommand(data);
|
|
27
|
+
const response = await client.send(command);
|
|
28
|
+
return response;
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
console.info(`error occured while text lable detection`);
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
24
35
|
const getLabelDetection = async (data) => {
|
|
25
36
|
try {
|
|
26
37
|
const command = new client_rekognition_1.GetLabelDetectionCommand(data);
|
|
@@ -32,8 +43,55 @@ const getLabelDetection = async (data) => {
|
|
|
32
43
|
throw error;
|
|
33
44
|
}
|
|
34
45
|
};
|
|
46
|
+
const getTextDetection = async (data) => {
|
|
47
|
+
try {
|
|
48
|
+
const command = new client_rekognition_1.GetTextDetectionCommand(data);
|
|
49
|
+
const response = await client.send(command);
|
|
50
|
+
return response;
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
console.info(`error occured while get text detection details`);
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* This give you immdeiate response
|
|
59
|
+
* @param data
|
|
60
|
+
* @returns
|
|
61
|
+
*/
|
|
62
|
+
const textDetection = async (data) => {
|
|
63
|
+
try {
|
|
64
|
+
const command = new client_rekognition_1.DetectTextCommand(data);
|
|
65
|
+
const response = await client.send(command);
|
|
66
|
+
return response;
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
console.info(`error occured while get text detection details`);
|
|
70
|
+
throw error;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* This give you immdeiate response
|
|
75
|
+
* @param data
|
|
76
|
+
* @returns
|
|
77
|
+
*/
|
|
78
|
+
const labelDetection = async (data) => {
|
|
79
|
+
try {
|
|
80
|
+
const command = new client_rekognition_1.DetectLabelsCommand(data);
|
|
81
|
+
const response = await client.send(command);
|
|
82
|
+
return response;
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
console.info(`error occured while get label detection details`);
|
|
86
|
+
throw error;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
35
89
|
exports.Rekognition = {
|
|
36
90
|
startLableDetection,
|
|
37
|
-
getLabelDetection
|
|
91
|
+
getLabelDetection,
|
|
92
|
+
startTextDetection,
|
|
93
|
+
getTextDetection,
|
|
94
|
+
textDetection,
|
|
95
|
+
labelDetection
|
|
38
96
|
};
|
|
39
97
|
//# sourceMappingURL=AWSRekognition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AWSRekognition.js","sourceRoot":"","sources":["../../../../aws/services/AWSRekognition.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"AWSRekognition.js","sourceRoot":"","sources":["../../../../aws/services/AWSRekognition.ts"],"names":[],"mappings":";;;AAAA,oEAAwW;AAExW,MAAM,WAAW,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,MAAM,CAAC,CAAC;AAC7D,MAAM,SAAS,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,WAAW,CAAC,CAAC;AAClE,MAAM,MAAM,GAAG,IAAI,sCAAiB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAE5D;;;;GAIG;AACH,MAAM,mBAAmB,GAAG,KAAK,EAAE,IAAoC,EAAG,EAAE;IAC1E,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,+CAA0B,CAAC,IAAI,CAAC,CAAC;QACrD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,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,IAAI,CAAC,gDAAgD,CAAC,CAAC;QAC/D,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,aAAa,GAAG,KAAK,EAAE,IAA2B,EAAG,EAAE;IAC3D,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,sCAAiB,CAAC,IAAI,CAAC,CAAC;QAC5C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;QAC/D,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,cAAc,GAAG,KAAK,EAAE,IAA2B,EAAG,EAAE;IAC5D,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,wCAAmB,CAAC,IAAI,CAAC,CAAC;QAC9C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;IAClB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,iDAAiD,CAAC,CAAC;QAChE,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAA;AAGY,QAAA,WAAW,GAAG;IACxB,mBAAmB;IACnB,iBAAiB;IACjB,kBAAkB;IAClB,gBAAgB;IAChB,aAAa;IACb,cAAc;CAChB,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { StartDocumentTextDetectionCommandInput, GetDocumentTextDetectionCommandInput } from "@aws-sdk/client-textract";
|
|
1
|
+
import { StartDocumentTextDetectionCommandInput, GetDocumentTextDetectionCommandInput, DetectDocumentTextCommandInput } from "@aws-sdk/client-textract";
|
|
2
2
|
export declare const Textract: {
|
|
3
3
|
startDocumentTextDetection: (data: StartDocumentTextDetectionCommandInput) => Promise<import("@aws-sdk/client-textract").StartDocumentTextDetectionCommandOutput>;
|
|
4
4
|
getDocumentTextDetection: (data: GetDocumentTextDetectionCommandInput) => Promise<import("@aws-sdk/client-textract").GetDocumentTextDetectionCommandOutput>;
|
|
5
|
+
documentTextDetection: (data: DetectDocumentTextCommandInput) => Promise<import("@aws-sdk/client-textract").DetectDocumentTextCommandOutput>;
|
|
5
6
|
};
|
|
@@ -37,8 +37,25 @@ const getDocumentTextDetection = async (data) => {
|
|
|
37
37
|
throw error;
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* This give you response immediate
|
|
42
|
+
* @param data
|
|
43
|
+
* @returns
|
|
44
|
+
*/
|
|
45
|
+
const documentTextDetection = async (data) => {
|
|
46
|
+
try {
|
|
47
|
+
const command = new client_textract_1.DetectDocumentTextCommand(data);
|
|
48
|
+
const response = await client.send(command);
|
|
49
|
+
return response;
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
console.info(`error occured while get text detection`);
|
|
53
|
+
throw error;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
40
56
|
exports.Textract = {
|
|
41
57
|
startDocumentTextDetection,
|
|
42
|
-
getDocumentTextDetection
|
|
58
|
+
getDocumentTextDetection,
|
|
59
|
+
documentTextDetection
|
|
43
60
|
};
|
|
44
61
|
//# sourceMappingURL=AWSTextTract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AWSTextTract.js","sourceRoot":"","sources":["../../../../aws/services/AWSTextTract.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"AWSTextTract.js","sourceRoot":"","sources":["../../../../aws/services/AWSTextTract.ts"],"names":[],"mappings":";;;AAAA,8DAAwQ;AAExQ,MAAM,WAAW,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,MAAM,CAAC,CAAC;AAC7D,MAAM,S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U,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAA;AAIY,QAAA,QAAQ,GAAG;IACrB,0BAA0B;IAC1B,wBAAwB;IACxB,qBAAqB;CACvB,CAAA"}
|
package/dist/esm/aws/index.d.ts
CHANGED
|
@@ -22,9 +22,14 @@ export declare const AWS: {
|
|
|
22
22
|
Rekognition: {
|
|
23
23
|
startLableDetection: (data: import("@aws-sdk/client-rekognition").StartLabelDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").StartLabelDetectionCommandOutput>;
|
|
24
24
|
getLabelDetection: (data: import("@aws-sdk/client-rekognition").GetLabelDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").GetLabelDetectionCommandOutput>;
|
|
25
|
+
startTextDetection: (data: import("@aws-sdk/client-rekognition").StartTextDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").StartTextDetectionCommandOutput>;
|
|
26
|
+
getTextDetection: (data: import("@aws-sdk/client-rekognition").GetTextDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").GetTextDetectionCommandOutput>;
|
|
27
|
+
textDetection: (data: import("@aws-sdk/client-rekognition").DetectTextCommandInput) => Promise<import("@aws-sdk/client-rekognition").DetectTextCommandOutput>;
|
|
28
|
+
labelDetection: (data: import("@aws-sdk/client-rekognition").DetectTextCommandInput) => Promise<import("@aws-sdk/client-rekognition").DetectLabelsCommandOutput>;
|
|
25
29
|
};
|
|
26
30
|
Textract: {
|
|
27
31
|
startDocumentTextDetection: (data: import("@aws-sdk/client-textract").StartDocumentTextDetectionCommandInput) => Promise<import("@aws-sdk/client-textract").StartDocumentTextDetectionCommandOutput>;
|
|
28
32
|
getDocumentTextDetection: (data: import("@aws-sdk/client-textract").GetDocumentTextDetectionCommandInput) => Promise<import("@aws-sdk/client-textract").GetDocumentTextDetectionCommandOutput>;
|
|
33
|
+
documentTextDetection: (data: import("@aws-sdk/client-textract").DetectDocumentTextCommandInput) => Promise<import("@aws-sdk/client-textract").DetectDocumentTextCommandOutput>;
|
|
29
34
|
};
|
|
30
35
|
};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { GetLabelDetectionCommandInput, StartLabelDetectionCommandInput } from "@aws-sdk/client-rekognition";
|
|
1
|
+
import { DetectTextCommandInput, GetLabelDetectionCommandInput, GetTextDetectionCommandInput, StartLabelDetectionCommandInput, StartTextDetectionCommandInput } from "@aws-sdk/client-rekognition";
|
|
2
2
|
export declare const Rekognition: {
|
|
3
3
|
startLableDetection: (data: StartLabelDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").StartLabelDetectionCommandOutput>;
|
|
4
4
|
getLabelDetection: (data: GetLabelDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").GetLabelDetectionCommandOutput>;
|
|
5
|
+
startTextDetection: (data: StartTextDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").StartTextDetectionCommandOutput>;
|
|
6
|
+
getTextDetection: (data: GetTextDetectionCommandInput) => Promise<import("@aws-sdk/client-rekognition").GetTextDetectionCommandOutput>;
|
|
7
|
+
textDetection: (data: DetectTextCommandInput) => Promise<import("@aws-sdk/client-rekognition").DetectTextCommandOutput>;
|
|
8
|
+
labelDetection: (data: DetectTextCommandInput) => Promise<import("@aws-sdk/client-rekognition").DetectLabelsCommandOutput>;
|
|
5
9
|
};
|
|
@@ -7,7 +7,7 @@ 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 { GetLabelDetectionCommand, RekognitionClient, StartLabelDetectionCommand } from "@aws-sdk/client-rekognition";
|
|
10
|
+
import { DetectLabelsCommand, DetectTextCommand, GetLabelDetectionCommand, GetTextDetectionCommand, RekognitionClient, StartLabelDetectionCommand, StartTextDetectionCommand } from "@aws-sdk/client-rekognition";
|
|
11
11
|
const environment = (process.env.NODE_ENVIRONMENT || 'Test');
|
|
12
12
|
const awsRegion = (process.env.AWS_DEFAULT_REGION || 'us-east-1');
|
|
13
13
|
const client = new RekognitionClient({ region: awsRegion });
|
|
@@ -27,6 +27,17 @@ const startLableDetection = (data) => __awaiter(void 0, void 0, void 0, function
|
|
|
27
27
|
throw error;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
+
const startTextDetection = (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
|
+
try {
|
|
32
|
+
const command = new StartTextDetectionCommand(data);
|
|
33
|
+
const response = yield client.send(command);
|
|
34
|
+
return response;
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
console.info(`error occured while text lable detection`);
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
30
41
|
const getLabelDetection = (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
42
|
try {
|
|
32
43
|
const command = new GetLabelDetectionCommand(data);
|
|
@@ -38,8 +49,55 @@ const getLabelDetection = (data) => __awaiter(void 0, void 0, void 0, function*
|
|
|
38
49
|
throw error;
|
|
39
50
|
}
|
|
40
51
|
});
|
|
52
|
+
const getTextDetection = (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
53
|
+
try {
|
|
54
|
+
const command = new GetTextDetectionCommand(data);
|
|
55
|
+
const response = yield client.send(command);
|
|
56
|
+
return response;
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
console.info(`error occured while get text detection details`);
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
/**
|
|
64
|
+
* This give you immdeiate response
|
|
65
|
+
* @param data
|
|
66
|
+
* @returns
|
|
67
|
+
*/
|
|
68
|
+
const textDetection = (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
69
|
+
try {
|
|
70
|
+
const command = new DetectTextCommand(data);
|
|
71
|
+
const response = yield client.send(command);
|
|
72
|
+
return response;
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
console.info(`error occured while get text detection details`);
|
|
76
|
+
throw error;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
/**
|
|
80
|
+
* This give you immdeiate response
|
|
81
|
+
* @param data
|
|
82
|
+
* @returns
|
|
83
|
+
*/
|
|
84
|
+
const labelDetection = (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
85
|
+
try {
|
|
86
|
+
const command = new DetectLabelsCommand(data);
|
|
87
|
+
const response = yield client.send(command);
|
|
88
|
+
return response;
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
console.info(`error occured while get label detection details`);
|
|
92
|
+
throw error;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
41
95
|
export const Rekognition = {
|
|
42
96
|
startLableDetection,
|
|
43
|
-
getLabelDetection
|
|
97
|
+
getLabelDetection,
|
|
98
|
+
startTextDetection,
|
|
99
|
+
getTextDetection,
|
|
100
|
+
textDetection,
|
|
101
|
+
labelDetection
|
|
44
102
|
};
|
|
45
103
|
//# sourceMappingURL=AWSRekognition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AWSRekognition.js","sourceRoot":"","sources":["../../../../aws/services/AWSRekognition.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,wBAAwB,EAAiC,iBAAiB,EAAC,0BAA0B,EAAoC,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"AWSRekognition.js","sourceRoot":"","sources":["../../../../aws/services/AWSRekognition.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAA0B,wBAAwB,EAAiC,uBAAuB,EAAgC,iBAAiB,EAAC,0BAA0B,EAAkC,yBAAyB,EAAoC,MAAM,6BAA6B,CAAC;AAExW,MAAM,WAAW,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,MAAM,CAAC,CAAC;A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CAAC;IACd,CAAC;AACH,CAAC,CAAA,CAAA;AAGD,MAAM,CAAC,MAAM,WAAW,GAAG;IACxB,mBAAmB;IACnB,iBAAiB;IACjB,kBAAkB;IAClB,gBAAgB;IAChB,aAAa;IACb,cAAc;CAChB,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { StartDocumentTextDetectionCommandInput, GetDocumentTextDetectionCommandInput } from "@aws-sdk/client-textract";
|
|
1
|
+
import { StartDocumentTextDetectionCommandInput, GetDocumentTextDetectionCommandInput, DetectDocumentTextCommandInput } from "@aws-sdk/client-textract";
|
|
2
2
|
export declare const Textract: {
|
|
3
3
|
startDocumentTextDetection: (data: StartDocumentTextDetectionCommandInput) => Promise<import("@aws-sdk/client-textract").StartDocumentTextDetectionCommandOutput>;
|
|
4
4
|
getDocumentTextDetection: (data: GetDocumentTextDetectionCommandInput) => Promise<import("@aws-sdk/client-textract").GetDocumentTextDetectionCommandOutput>;
|
|
5
|
+
documentTextDetection: (data: DetectDocumentTextCommandInput) => Promise<import("@aws-sdk/client-textract").DetectDocumentTextCommandOutput>;
|
|
5
6
|
};
|
|
@@ -7,7 +7,7 @@ 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 { TextractClient, StartDocumentTextDetectionCommand, GetDocumentTextDetectionCommand } from "@aws-sdk/client-textract";
|
|
10
|
+
import { TextractClient, StartDocumentTextDetectionCommand, GetDocumentTextDetectionCommand, DetectDocumentTextCommand } from "@aws-sdk/client-textract";
|
|
11
11
|
const environment = (process.env.NODE_ENVIRONMENT || 'Test');
|
|
12
12
|
const awsRegion = (process.env.AWS_DEFAULT_REGION || 'us-east-1');
|
|
13
13
|
const client = new TextractClient({ region: awsRegion });
|
|
@@ -43,8 +43,25 @@ const getDocumentTextDetection = (data) => __awaiter(void 0, void 0, void 0, fun
|
|
|
43
43
|
throw error;
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
|
+
/**
|
|
47
|
+
* This give you response immediate
|
|
48
|
+
* @param data
|
|
49
|
+
* @returns
|
|
50
|
+
*/
|
|
51
|
+
const documentTextDetection = (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
52
|
+
try {
|
|
53
|
+
const command = new DetectDocumentTextCommand(data);
|
|
54
|
+
const response = yield client.send(command);
|
|
55
|
+
return response;
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
console.info(`error occured while get text detection`);
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
46
62
|
export const Textract = {
|
|
47
63
|
startDocumentTextDetection,
|
|
48
|
-
getDocumentTextDetection
|
|
64
|
+
getDocumentTextDetection,
|
|
65
|
+
documentTextDetection
|
|
49
66
|
};
|
|
50
67
|
//# sourceMappingURL=AWSTextTract.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AWSTextTract.js","sourceRoot":"","sources":["../../../../aws/services/AWSTextTract.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,iCAAiC,EAAgF,+BAA+B,
|
|
1
|
+
{"version":3,"file":"AWSTextTract.js","sourceRoot":"","sources":["../../../../aws/services/AWSTextTract.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,iCAAiC,EAAgF,+BAA+B,EAAE,yBAAyB,EAAmC,MAAM,0BAA0B,CAAC;AAExQ,MAAM,WAAW,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,MAAM,CAAC,CAAC;AAC7D,MAAM,SAAS,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,WAAW,CAAC,CAAC;AAClE,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AAEzD;;;;GAIG;AACH,MAAM,0BA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