@aws-amplify/predictions 4.0.61 → 4.0.62-unstable.4
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/CHANGELOG.md +0 -8
- package/lib/.tsbuildinfo +3 -0
- package/lib/Predictions.d.ts +49 -0
- package/lib/Predictions.js +4 -34
- package/lib/Predictions.js.map +1 -1
- package/lib/Providers/AmazonAIConvertPredictionsProvider.d.ts +20 -0
- package/lib/Providers/AmazonAIConvertPredictionsProvider.js +10 -62
- package/lib/Providers/AmazonAIConvertPredictionsProvider.js.map +1 -1
- package/lib/Providers/AmazonAIIdentifyPredictionsProvider.d.ts +49 -0
- package/lib/Providers/AmazonAIIdentifyPredictionsProvider.js +18 -84
- package/lib/Providers/AmazonAIIdentifyPredictionsProvider.js.map +1 -1
- package/lib/Providers/AmazonAIInterpretPredictionsProvider.d.ts +14 -0
- package/lib/Providers/AmazonAIInterpretPredictionsProvider.js +15 -83
- package/lib/Providers/AmazonAIInterpretPredictionsProvider.js.map +1 -1
- package/lib/Providers/AmazonAIPredictionsProvider.d.ts +14 -0
- package/lib/Providers/AmazonAIPredictionsProvider.js +2 -18
- package/lib/Providers/AmazonAIPredictionsProvider.js.map +1 -1
- package/lib/Providers/IdentifyTextUtils.d.ts +40 -0
- package/lib/Providers/IdentifyTextUtils.js +7 -17
- package/lib/Providers/IdentifyTextUtils.js.map +1 -1
- package/lib/Providers/Utils.d.ts +13 -0
- package/lib/Providers/index.d.ts +5 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +4 -20
- package/lib/index.js.map +1 -1
- package/lib/types/AWSTypes.d.ts +125 -0
- package/lib/types/Predictions.d.ts +281 -0
- package/lib/types/Providers/AbstractConvertPredictionsProvider.d.ts +9 -0
- package/lib/types/Providers/AbstractConvertPredictionsProvider.js +2 -14
- package/lib/types/Providers/AbstractConvertPredictionsProvider.js.map +1 -1
- package/lib/types/Providers/AbstractIdentifyPredictionsProvider.d.ts +9 -0
- package/lib/types/Providers/AbstractIdentifyPredictionsProvider.js +2 -14
- package/lib/types/Providers/AbstractIdentifyPredictionsProvider.js.map +1 -1
- package/lib/types/Providers/AbstractInterpretPredictionsProvider.d.ts +7 -0
- package/lib/types/Providers/AbstractInterpretPredictionsProvider.js +2 -14
- package/lib/types/Providers/AbstractInterpretPredictionsProvider.js.map +1 -1
- package/lib/types/Providers/AbstractPredictionsProvider.d.ts +7 -0
- package/lib/types/Providers/index.d.ts +4 -0
- package/lib/types/Providers/index.js +5 -7
- package/lib/types/Providers/index.js.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +2 -4
- package/lib/types/index.js.map +1 -1
- package/lib-esm/.tsbuildinfo +3 -0
- package/lib-esm/Predictions.js +1 -31
- package/lib-esm/Predictions.js.map +1 -1
- package/lib-esm/Providers/AmazonAIConvertPredictionsProvider.d.ts +0 -4
- package/lib-esm/Providers/AmazonAIConvertPredictionsProvider.js +1 -53
- package/lib-esm/Providers/AmazonAIConvertPredictionsProvider.js.map +1 -1
- package/lib-esm/Providers/AmazonAIIdentifyPredictionsProvider.d.ts +0 -4
- package/lib-esm/Providers/AmazonAIIdentifyPredictionsProvider.js +3 -66
- package/lib-esm/Providers/AmazonAIIdentifyPredictionsProvider.js.map +1 -1
- package/lib-esm/Providers/AmazonAIInterpretPredictionsProvider.d.ts +0 -4
- package/lib-esm/Providers/AmazonAIInterpretPredictionsProvider.js +1 -69
- package/lib-esm/Providers/AmazonAIInterpretPredictionsProvider.js.map +1 -1
- package/lib-esm/Providers/AmazonAIPredictionsProvider.d.ts +0 -4
- package/lib-esm/Providers/AmazonAIPredictionsProvider.js +1 -17
- package/lib-esm/Providers/AmazonAIPredictionsProvider.js.map +1 -1
- package/lib-esm/Providers/IdentifyTextUtils.js +1 -11
- package/lib-esm/Providers/IdentifyTextUtils.js.map +1 -1
- package/lib-esm/index.d.ts +0 -4
- package/lib-esm/index.js +2 -16
- package/lib-esm/index.js.map +1 -1
- package/lib-esm/types/Providers/AbstractConvertPredictionsProvider.js +1 -13
- package/lib-esm/types/Providers/AbstractConvertPredictionsProvider.js.map +1 -1
- package/lib-esm/types/Providers/AbstractIdentifyPredictionsProvider.js +1 -13
- package/lib-esm/types/Providers/AbstractIdentifyPredictionsProvider.js.map +1 -1
- package/lib-esm/types/Providers/AbstractInterpretPredictionsProvider.js +1 -13
- package/lib-esm/types/Providers/AbstractInterpretPredictionsProvider.js.map +1 -1
- package/package.json +14 -10
- package/src/Providers/AmazonAIConvertPredictionsProvider.ts +4 -8
- package/src/Providers/AmazonAIIdentifyPredictionsProvider.ts +4 -8
- package/src/Providers/AmazonAIInterpretPredictionsProvider.ts +2 -8
- package/src/Providers/AmazonAIPredictionsProvider.ts +0 -5
- package/src/index.ts +2 -17
- package/build.js +0 -5
- package/dist/aws-amplify-predictions.js +0 -101211
- package/dist/aws-amplify-predictions.js.map +0 -1
- package/dist/aws-amplify-predictions.min.js +0 -26
- package/dist/aws-amplify-predictions.min.js.map +0 -1
- package/index.js +0 -7
- package/webpack.config.dev.js +0 -6
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Geometry, Relationship } from './Predictions';
|
|
3
|
+
export declare type BlockList = Block[];
|
|
4
|
+
export interface Block {
|
|
5
|
+
/**
|
|
6
|
+
* <p>The type of text that's recognized in a block. In text-detection operations, the following types are returned:</p> <ul> <li> <p> <i>PAGE</i> - Contains a list of the LINE Block objects that are detected on a document page.</p> </li> <li> <p> <i>WORD</i> - A word detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces.</p> </li> <li> <p> <i>LINE</i> - A string of tab-delimited, contiguous words that's detected on a document page.</p> </li> </ul> <p>In text analysis operations, the following types are returned:</p> <ul> <li> <p> <i>PAGE</i> - Contains a list of child Block objects that are detected on a document page.</p> </li> <li> <p> <i>KEY_VALUE_SET</i> - Stores the KEY and VALUE Block objects for a field that's detected on a document page. Use the <code>EntityType</code> field to determine if a KEY_VALUE_SET object is a KEY Block object or a VALUE Block object. </p> </li> <li> <p> <i>WORD</i> - A word detected on a document page. A word is one or more ISO basic Latin script characters that aren't separated by spaces that's detected on a document page.</p> </li> <li> <p> <i>LINE</i> - A string of tab-delimited, contiguous words that's detected on a document page.</p> </li> <li> <p> <i>TABLE</i> - A table that's detected on a document page. A table is any grid-based information with 2 or more rows or columns with a cell span of 1 row and 1 column each. </p> </li> <li> <p> <i>CELL</i> - A cell within a detected table. The cell is the parent of the block that contains the text in the cell.</p> </li> <li> <p> <i>SELECTION_ELEMENT</i> - A selectable element such as a radio button or checkbox that's detected on a document page. Use the value of <code>SelectionStatus</code> to determine the status of the selection element.</p> </li> </ul>
|
|
7
|
+
*/
|
|
8
|
+
BlockType?: 'KEY_VALUE_SET' | 'PAGE' | 'LINE' | 'WORD' | 'TABLE' | 'CELL' | 'SELECTION_ELEMENT' | string;
|
|
9
|
+
/**
|
|
10
|
+
* <p>The confidence that Amazon Textract has in the accuracy of the recognized text and the accuracy of the geometry points around the recognized text.</p>
|
|
11
|
+
*/
|
|
12
|
+
Confidence?: number;
|
|
13
|
+
/**
|
|
14
|
+
* <p>The word or line of text that's recognized by Amazon Textract. </p>
|
|
15
|
+
*/
|
|
16
|
+
Text?: string;
|
|
17
|
+
/**
|
|
18
|
+
* <p>The row in which a table cell is located. The first row position is 1. <code>RowIndex</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
|
|
19
|
+
*/
|
|
20
|
+
RowIndex?: number;
|
|
21
|
+
/**
|
|
22
|
+
* <p>The column in which a table cell appears. The first column position is 1. <code>ColumnIndex</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
|
|
23
|
+
*/
|
|
24
|
+
ColumnIndex?: number;
|
|
25
|
+
/**
|
|
26
|
+
* <p>The number of rows that a table spans. <code>RowSpan</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
|
|
27
|
+
*/
|
|
28
|
+
RowSpan?: number;
|
|
29
|
+
/**
|
|
30
|
+
* <p>The number of columns that a table cell spans. <code>ColumnSpan</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>. </p>
|
|
31
|
+
*/
|
|
32
|
+
ColumnSpan?: number;
|
|
33
|
+
/**
|
|
34
|
+
* <p>The location of the recognized text on the image. It includes an axis-aligned, coarse bounding box that surrounds the text, and a finer-grain polygon for more accurate spatial information. </p>
|
|
35
|
+
*/
|
|
36
|
+
Geometry?: Geometry;
|
|
37
|
+
/**
|
|
38
|
+
* <p>The identifier for the recognized text. The identifier is only unique for a single operation. </p>
|
|
39
|
+
*/
|
|
40
|
+
Id?: string;
|
|
41
|
+
/**
|
|
42
|
+
* <p>A list of child blocks of the current block. For example a LINE object has child blocks for each WORD block that's part of the line of text. There aren't Relationship objects in the list for relationships that don't exist, such as when the current block has no child blocks. The list size can be the following:</p> <ul> <li> <p>0 - The block has no child blocks.</p> </li> <li> <p>1 - The block has child blocks.</p> </li> </ul>
|
|
43
|
+
*/
|
|
44
|
+
Relationships?: Array<Relationship> | Iterable<Relationship>;
|
|
45
|
+
/**
|
|
46
|
+
* <p>The type of entity. The following can be returned:</p> <ul> <li> <p> <i>KEY</i> - An identifier for a field on the document.</p> </li> <li> <p> <i>VALUE</i> - The field text.</p> </li> </ul> <p> <code>EntityTypes</code> isn't returned by <code>DetectDocumentText</code> and <code>GetDocumentTextDetection</code>.</p>
|
|
47
|
+
*/
|
|
48
|
+
EntityTypes?: Array<'KEY' | 'VALUE' | string> | Iterable<'KEY' | 'VALUE' | string>;
|
|
49
|
+
/**
|
|
50
|
+
* <p>The selection status of a selectable element such as a radio button or checkbox. </p>
|
|
51
|
+
*/
|
|
52
|
+
SelectionStatus?: 'SELECTED' | 'NOT_SELECTED' | string;
|
|
53
|
+
/**
|
|
54
|
+
* <p>The page in which a block was detected. <code>Page</code> is returned by asynchronous operations. Page values greater than 1 are only returned for multi-page documents that are in PDF format. A scanned image (JPG/PNG), even if it contains multiple document pages, is always considered to be a single-page document and the value of <code>Page</code> is always 1. Synchronous operations don't return <code>Page</code> as every input document is considered to be a single-page document.</p>
|
|
55
|
+
*/
|
|
56
|
+
Page?: number;
|
|
57
|
+
}
|
|
58
|
+
export declare type TextDetectionList = TextDetection[];
|
|
59
|
+
export interface TextDetection {
|
|
60
|
+
/**
|
|
61
|
+
* <p>The word or line of text recognized by Amazon Rekognition. </p>
|
|
62
|
+
*/
|
|
63
|
+
DetectedText?: string;
|
|
64
|
+
/**
|
|
65
|
+
* <p>The type of text that was detected.</p>
|
|
66
|
+
*/
|
|
67
|
+
Type?: 'LINE' | 'WORD' | string;
|
|
68
|
+
/**
|
|
69
|
+
* <p>The identifier for the detected text. The identifier is only unique for a single call to <code>DetectText</code>. </p>
|
|
70
|
+
*/
|
|
71
|
+
Id?: number;
|
|
72
|
+
/**
|
|
73
|
+
* <p>The Parent identifier for the detected text identified by the value of <code>ID</code>. If the type of detected text is <code>LINE</code>, the value of <code>ParentId</code> is <code>Null</code>. </p>
|
|
74
|
+
*/
|
|
75
|
+
ParentId?: number;
|
|
76
|
+
/**
|
|
77
|
+
* <p>The confidence that Amazon Rekognition has in the accuracy of the detected text and the accuracy of the geometry points around the detected text.</p>
|
|
78
|
+
*/
|
|
79
|
+
Confidence?: number;
|
|
80
|
+
/**
|
|
81
|
+
* <p>The location of the detected text on the image. Includes an axis aligned coarse bounding box surrounding the text and a finer grain polygon for more accurate spatial information.</p>
|
|
82
|
+
*/
|
|
83
|
+
Geometry?: Geometry;
|
|
84
|
+
}
|
|
85
|
+
export interface Image {
|
|
86
|
+
/**
|
|
87
|
+
* <p>Blob of image bytes up to 5 MBs.</p>
|
|
88
|
+
*/
|
|
89
|
+
Bytes?: Uint8Array;
|
|
90
|
+
/**
|
|
91
|
+
* <p>Identifies an S3 object as the image source.</p>
|
|
92
|
+
*/
|
|
93
|
+
S3Object?: S3Object;
|
|
94
|
+
}
|
|
95
|
+
export declare type ImageBlob = Buffer | Uint8Array | Blob | string;
|
|
96
|
+
export declare type S3Bucket = string;
|
|
97
|
+
export interface S3Object {
|
|
98
|
+
/**
|
|
99
|
+
* Name of the S3 bucket.
|
|
100
|
+
*/
|
|
101
|
+
Bucket?: S3Bucket;
|
|
102
|
+
/**
|
|
103
|
+
* S3 object key name.
|
|
104
|
+
*/
|
|
105
|
+
Name?: S3ObjectName;
|
|
106
|
+
/**
|
|
107
|
+
* If the bucket is versioning enabled, you can specify the object version.
|
|
108
|
+
*/
|
|
109
|
+
Version?: S3ObjectVersion;
|
|
110
|
+
}
|
|
111
|
+
export declare type S3ObjectName = string;
|
|
112
|
+
export declare type S3ObjectVersion = string;
|
|
113
|
+
/**
|
|
114
|
+
* <p>The input document, either as bytes or as an S3 object.</p> <p>You pass image bytes to an Amazon Textract API operation by using the <code>Bytes</code> property. For example, you would use the <code>Bytes</code> property to pass a document loaded from a local file system. Image bytes passed by using the <code>Bytes</code> property must be base64 encoded. Your code might not need to encode document file bytes if you're using an AWS SDK to call Amazon Textract API operations. </p> <p>You pass images stored in an S3 bucket to an Amazon Textract API operation by using the <code>S3Object</code> property. Documents stored in an S3 bucket don't need to be base64 encoded.</p> <p>The AWS Region for the S3 bucket that contains the S3 object must match the AWS Region that you use for Amazon Textract operations.</p> <p>If you use the AWS CLI to call Amazon Textract operations, passing image bytes using the Bytes property isn't supported. You must first upload the document to an Amazon S3 bucket, and then call the operation using the S3Object property.</p> <p>For Amazon Textract to process an S3 object, the user must have permission to access the S3 object. </p>
|
|
115
|
+
*/
|
|
116
|
+
export interface Document {
|
|
117
|
+
/**
|
|
118
|
+
* <p>A blob of base-64 encoded documents bytes. The maximum size of a document that's provided in a blob of bytes is 5 MB. The document bytes must be in PNG or JPG format.</p> <p>If you are using an AWS SDK to call Amazon Textract, you might not need to base64-encode image bytes passed using the <code>Bytes</code> field. </p>
|
|
119
|
+
*/
|
|
120
|
+
Bytes?: Uint8Array;
|
|
121
|
+
/**
|
|
122
|
+
* <p>Identifies an S3 object as the document source. The maximum size of a document stored in an S3 bucket is 5 MB.</p>
|
|
123
|
+
*/
|
|
124
|
+
S3Object?: S3Object;
|
|
125
|
+
}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
* Base types
|
|
4
|
+
*/
|
|
5
|
+
export interface PredictionsOptions {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
export interface ProviderOptions {
|
|
9
|
+
providerName?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Convert types
|
|
13
|
+
*/
|
|
14
|
+
export declare enum InterpretTextCategories {
|
|
15
|
+
ALL = "ALL",
|
|
16
|
+
LANGUAGE = "LANGUAGE",
|
|
17
|
+
ENTITIES = "ENTITIES",
|
|
18
|
+
SENTIMENT = "SENTIMENT",
|
|
19
|
+
SYNTAX = "SYNTAX",
|
|
20
|
+
KEY_PHRASES = "KEY_PHRASES"
|
|
21
|
+
}
|
|
22
|
+
export interface InterpretTextInput {
|
|
23
|
+
text: InterpretTextInputLanguage | InterpretTextOthers | InterpretTextAll;
|
|
24
|
+
}
|
|
25
|
+
export interface InterpretTextInputLanguage {
|
|
26
|
+
source: {
|
|
27
|
+
text: string;
|
|
28
|
+
};
|
|
29
|
+
type: InterpretTextCategories.LANGUAGE;
|
|
30
|
+
}
|
|
31
|
+
export interface InterpretTextOthers {
|
|
32
|
+
source: {
|
|
33
|
+
text: string;
|
|
34
|
+
language: string;
|
|
35
|
+
};
|
|
36
|
+
type: InterpretTextCategories.ENTITIES | InterpretTextCategories.SENTIMENT | InterpretTextCategories.SYNTAX | InterpretTextCategories.KEY_PHRASES;
|
|
37
|
+
}
|
|
38
|
+
export interface InterpretTextAll {
|
|
39
|
+
source: {
|
|
40
|
+
text: string;
|
|
41
|
+
};
|
|
42
|
+
type: InterpretTextCategories.ALL;
|
|
43
|
+
}
|
|
44
|
+
export interface TextEntities {
|
|
45
|
+
type: string;
|
|
46
|
+
text: string;
|
|
47
|
+
}
|
|
48
|
+
export interface KeyPhrases {
|
|
49
|
+
text: string;
|
|
50
|
+
}
|
|
51
|
+
export interface TextSyntax {
|
|
52
|
+
text: string;
|
|
53
|
+
syntax: string;
|
|
54
|
+
}
|
|
55
|
+
export interface TextSentiment {
|
|
56
|
+
predominant: string;
|
|
57
|
+
positive: number;
|
|
58
|
+
negative: number;
|
|
59
|
+
neutral: number;
|
|
60
|
+
mixed: number;
|
|
61
|
+
}
|
|
62
|
+
export interface InterpretTextOutput {
|
|
63
|
+
textInterpretation: {
|
|
64
|
+
language?: string;
|
|
65
|
+
textEntities?: Array<TextEntities>;
|
|
66
|
+
keyPhrases?: Array<KeyPhrases>;
|
|
67
|
+
sentiment?: TextSentiment;
|
|
68
|
+
syntax?: Array<TextSyntax>;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export interface TranslateTextInput {
|
|
72
|
+
translateText: {
|
|
73
|
+
source: {
|
|
74
|
+
text: string;
|
|
75
|
+
language?: string;
|
|
76
|
+
};
|
|
77
|
+
targetLanguage?: string;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
export interface TranslateTextOutput {
|
|
81
|
+
text: string;
|
|
82
|
+
language: string;
|
|
83
|
+
}
|
|
84
|
+
export interface TextToSpeechInput {
|
|
85
|
+
textToSpeech: {
|
|
86
|
+
source: {
|
|
87
|
+
text: string;
|
|
88
|
+
};
|
|
89
|
+
terminology?: string;
|
|
90
|
+
voiceId?: string;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
export interface TextToSpeechOutput {
|
|
94
|
+
speech: {
|
|
95
|
+
url: string;
|
|
96
|
+
};
|
|
97
|
+
audioStream: Buffer;
|
|
98
|
+
text: string;
|
|
99
|
+
}
|
|
100
|
+
export interface StorageSource {
|
|
101
|
+
key: string;
|
|
102
|
+
level?: 'public' | 'private' | 'protected';
|
|
103
|
+
identityId?: string;
|
|
104
|
+
}
|
|
105
|
+
export interface FileSource {
|
|
106
|
+
file: File;
|
|
107
|
+
}
|
|
108
|
+
export interface BytesSource {
|
|
109
|
+
bytes: Buffer | ArrayBuffer | Blob | string;
|
|
110
|
+
}
|
|
111
|
+
export interface SpeechToTextInput {
|
|
112
|
+
transcription: {
|
|
113
|
+
source: BytesSource;
|
|
114
|
+
language?: string;
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export interface SpeechToTextOutput {
|
|
118
|
+
transcription: {
|
|
119
|
+
fullText: string;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
export declare type IdentifySource = StorageSource | FileSource | BytesSource;
|
|
123
|
+
export interface IdentifyTextInput {
|
|
124
|
+
text: {
|
|
125
|
+
source: IdentifySource;
|
|
126
|
+
format?: 'PLAIN' | 'FORM' | 'TABLE' | 'ALL';
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
export interface Word {
|
|
130
|
+
text?: string;
|
|
131
|
+
polygon?: Polygon;
|
|
132
|
+
boundingBox?: BoundingBox;
|
|
133
|
+
}
|
|
134
|
+
export interface LineDetailed {
|
|
135
|
+
text?: string;
|
|
136
|
+
polygon?: Polygon;
|
|
137
|
+
boundingBox?: BoundingBox;
|
|
138
|
+
page?: number;
|
|
139
|
+
}
|
|
140
|
+
export interface Content {
|
|
141
|
+
text?: string;
|
|
142
|
+
selected?: boolean;
|
|
143
|
+
}
|
|
144
|
+
export interface TableCell extends Content {
|
|
145
|
+
boundingBox?: BoundingBox;
|
|
146
|
+
polygon?: Polygon;
|
|
147
|
+
rowSpan?: Number;
|
|
148
|
+
columnSpan?: Number;
|
|
149
|
+
}
|
|
150
|
+
export interface Table {
|
|
151
|
+
size: {
|
|
152
|
+
rows: number;
|
|
153
|
+
columns: number;
|
|
154
|
+
};
|
|
155
|
+
table: TableCell[][];
|
|
156
|
+
polygon: Polygon;
|
|
157
|
+
boundingBox: BoundingBox;
|
|
158
|
+
}
|
|
159
|
+
export interface KeyValue {
|
|
160
|
+
key: string;
|
|
161
|
+
value: Content;
|
|
162
|
+
polygon: Polygon;
|
|
163
|
+
boundingBox: BoundingBox;
|
|
164
|
+
}
|
|
165
|
+
export interface IdentifyTextOutput {
|
|
166
|
+
text: {
|
|
167
|
+
fullText: string;
|
|
168
|
+
lines: string[];
|
|
169
|
+
linesDetailed: LineDetailed[];
|
|
170
|
+
words: Word[];
|
|
171
|
+
keyValues?: KeyValue[];
|
|
172
|
+
tables?: Table[];
|
|
173
|
+
selections?: {
|
|
174
|
+
selected: boolean;
|
|
175
|
+
polygon: Polygon;
|
|
176
|
+
boundingBox: BoundingBox;
|
|
177
|
+
}[];
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
export interface IdentifyLabelsInput {
|
|
181
|
+
labels: {
|
|
182
|
+
source: IdentifySource;
|
|
183
|
+
type: 'LABELS' | 'UNSAFE' | 'ALL';
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
export interface Point {
|
|
187
|
+
x?: Number;
|
|
188
|
+
y?: Number;
|
|
189
|
+
}
|
|
190
|
+
export declare type Polygon = Array<Point> | Iterable<Point>;
|
|
191
|
+
export interface BoundingBox {
|
|
192
|
+
width?: Number;
|
|
193
|
+
height?: Number;
|
|
194
|
+
left?: Number;
|
|
195
|
+
top?: Number;
|
|
196
|
+
}
|
|
197
|
+
export interface IdentifyLabelsOutput {
|
|
198
|
+
labels?: {
|
|
199
|
+
name: string;
|
|
200
|
+
boundingBoxes: BoundingBox[];
|
|
201
|
+
metadata?: Object;
|
|
202
|
+
}[];
|
|
203
|
+
unsafe?: 'YES' | 'NO' | 'UNKNOWN';
|
|
204
|
+
}
|
|
205
|
+
export interface IdentifyEntitiesInput {
|
|
206
|
+
entities: IdentifyFromCollection | IdentifyCelebrities | IdentifyEntities;
|
|
207
|
+
}
|
|
208
|
+
export interface IdentifyFromCollection {
|
|
209
|
+
source: IdentifySource;
|
|
210
|
+
collection: true;
|
|
211
|
+
collectionId?: string;
|
|
212
|
+
maxEntities?: number;
|
|
213
|
+
}
|
|
214
|
+
export interface IdentifyCelebrities {
|
|
215
|
+
source: IdentifySource;
|
|
216
|
+
celebrityDetection: true;
|
|
217
|
+
}
|
|
218
|
+
export interface IdentifyEntities {
|
|
219
|
+
source: IdentifySource;
|
|
220
|
+
}
|
|
221
|
+
export interface FaceAttributes {
|
|
222
|
+
smile?: boolean;
|
|
223
|
+
eyeglasses?: boolean;
|
|
224
|
+
sunglasses?: boolean;
|
|
225
|
+
gender?: string;
|
|
226
|
+
beard?: boolean;
|
|
227
|
+
mustache?: boolean;
|
|
228
|
+
eyesOpen?: boolean;
|
|
229
|
+
mouthOpen?: boolean;
|
|
230
|
+
emotions?: string[];
|
|
231
|
+
}
|
|
232
|
+
export interface IdentifyEntitiesOutput {
|
|
233
|
+
entities: {
|
|
234
|
+
boundingBox?: BoundingBox;
|
|
235
|
+
ageRange?: {
|
|
236
|
+
low?: Number;
|
|
237
|
+
high?: Number;
|
|
238
|
+
};
|
|
239
|
+
landmarks?: {
|
|
240
|
+
type?: string;
|
|
241
|
+
x?: number;
|
|
242
|
+
y?: number;
|
|
243
|
+
}[];
|
|
244
|
+
attributes?: FaceAttributes;
|
|
245
|
+
metadata?: object;
|
|
246
|
+
}[];
|
|
247
|
+
}
|
|
248
|
+
export declare function isIdentifyFromCollection(obj: any): obj is IdentifyFromCollection;
|
|
249
|
+
export declare function isIdentifyCelebrities(obj: any): obj is IdentifyCelebrities;
|
|
250
|
+
export declare function isTranslateTextInput(obj: any): obj is TranslateTextInput;
|
|
251
|
+
export declare function isTextToSpeechInput(obj: any): obj is TextToSpeechInput;
|
|
252
|
+
export declare function isSpeechToTextInput(obj: any): obj is SpeechToTextInput;
|
|
253
|
+
export declare function isStorageSource(obj: any): obj is StorageSource;
|
|
254
|
+
export declare function isFileSource(obj: any): obj is FileSource;
|
|
255
|
+
export declare function isBytesSource(obj: any): obj is BytesSource;
|
|
256
|
+
export declare function isIdentifyTextInput(obj: any): obj is IdentifyTextInput;
|
|
257
|
+
export declare function isIdentifyLabelsInput(obj: any): obj is IdentifyLabelsInput;
|
|
258
|
+
export declare function isIdentifyEntitiesInput(obj: any): obj is IdentifyEntitiesInput;
|
|
259
|
+
export declare function isInterpretTextInput(obj: any): obj is InterpretTextInput;
|
|
260
|
+
export interface Geometry {
|
|
261
|
+
/**
|
|
262
|
+
* <p>An axis-aligned coarse representation of the detected text's location on the image.</p>
|
|
263
|
+
*/
|
|
264
|
+
BoundingBox?: BoundingBox;
|
|
265
|
+
/**
|
|
266
|
+
* <p>Within the bounding box, a fine-grained polygon around the detected text.</p>
|
|
267
|
+
*/
|
|
268
|
+
Polygon?: Array<Point> | Iterable<Point>;
|
|
269
|
+
}
|
|
270
|
+
export interface Relationship {
|
|
271
|
+
/**
|
|
272
|
+
* <p>The type of relationship that the blocks in the IDs array have with the current block. The relationship can be <code>VALUE</code> or <code>CHILD</code>.</p>
|
|
273
|
+
*/
|
|
274
|
+
Type?: 'VALUE' | 'CHILD' | string;
|
|
275
|
+
/**
|
|
276
|
+
* <p>An array of IDs for related blocks. You can get the type of the relationship from the <code>Type</code> element.</p>
|
|
277
|
+
*/
|
|
278
|
+
Ids?: Array<string> | Iterable<string>;
|
|
279
|
+
}
|
|
280
|
+
export declare type FeatureType = 'TABLES' | 'FORMS' | string;
|
|
281
|
+
export declare type FeatureTypes = FeatureType[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TranslateTextInput, TextToSpeechInput, SpeechToTextInput, TranslateTextOutput, TextToSpeechOutput, SpeechToTextOutput } from '../Predictions';
|
|
2
|
+
import { AbstractPredictionsProvider } from './AbstractPredictionsProvider';
|
|
3
|
+
export declare abstract class AbstractConvertPredictionsProvider extends AbstractPredictionsProvider {
|
|
4
|
+
getCategory(): string;
|
|
5
|
+
convert(input: TranslateTextInput | TextToSpeechInput | SpeechToTextInput): Promise<TextToSpeechOutput | TranslateTextOutput | SpeechToTextOutput>;
|
|
6
|
+
protected translateText(translateTextInput: TranslateTextInput): Promise<TranslateTextOutput>;
|
|
7
|
+
protected convertTextToSpeech(textToSpeechInput: TextToSpeechInput): Promise<TextToSpeechOutput>;
|
|
8
|
+
protected convertSpeechToText(speechToTextInput: SpeechToTextInput): Promise<SpeechToTextOutput>;
|
|
9
|
+
}
|
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
16
4
|
var Predictions_1 = require("../Predictions");
|
|
17
5
|
var AbstractPredictionsProvider_1 = require("./AbstractPredictionsProvider");
|
|
18
6
|
var core_1 = require("@aws-amplify/core");
|
|
19
7
|
var logger = new core_1.ConsoleLogger('AbstractConvertPredictionsProvider');
|
|
20
8
|
var AbstractConvertPredictionsProvider = /** @class */ (function (_super) {
|
|
21
|
-
__extends(AbstractConvertPredictionsProvider, _super);
|
|
9
|
+
tslib_1.__extends(AbstractConvertPredictionsProvider, _super);
|
|
22
10
|
function AbstractConvertPredictionsProvider() {
|
|
23
11
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
24
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractConvertPredictionsProvider.js","sourceRoot":"","sources":["../../../src/types/Providers/AbstractConvertPredictionsProvider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AbstractConvertPredictionsProvider.js","sourceRoot":"","sources":["../../../src/types/Providers/AbstractConvertPredictionsProvider.ts"],"names":[],"mappings":";;;AAAA,8CAUwB;AACxB,6EAA4E;AAC5E,0CAA4D;AAC5D,IAAM,MAAM,GAAG,IAAI,oBAAM,CAAC,oCAAoC,CAAC,CAAC;AAEhE;IAAiE,8DAA2B;IAA5F;;IAqCA,CAAC;IApCA,wDAAW,GAAX;QACC,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,oDAAO,GAAP,UACC,KAAiE;QAEjE,IAAI,kCAAoB,CAAC,KAAK,CAAC,EAAE;YAChC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YAC9B,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;SACjC;aAAM,IAAI,iCAAmB,CAAC,KAAK,CAAC,EAAE;YACtC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;YAC7B,OAAO,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;SACvC;aAAM,IAAI,iCAAmB,CAAC,KAAK,CAAC,EAAE;YACtC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;YAC7B,OAAO,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;SACvC;IACF,CAAC;IAES,0DAAa,GAAvB,UACC,kBAAsC;QAEtC,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACpE,CAAC;IAES,gEAAmB,GAA7B,UACC,iBAAoC;QAEpC,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC5E,CAAC;IAES,gEAAmB,GAA7B,UACC,iBAAoC;QAEpC,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC5E,CAAC;IACF,yCAAC;AAAD,CAAC,AArCD,CAAiE,yDAA2B,GAqC3F;AArCqB,gFAAkC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AbstractPredictionsProvider } from './AbstractPredictionsProvider';
|
|
2
|
+
import { IdentifyLabelsInput, IdentifyEntitiesInput, IdentifyTextInput, IdentifyTextOutput, IdentifyLabelsOutput, IdentifyEntitiesOutput } from '../Predictions';
|
|
3
|
+
export declare abstract class AbstractIdentifyPredictionsProvider extends AbstractPredictionsProvider {
|
|
4
|
+
getCategory(): string;
|
|
5
|
+
identify(input: IdentifyTextInput | IdentifyLabelsInput | IdentifyEntitiesInput): Promise<IdentifyTextOutput | IdentifyLabelsOutput | IdentifyEntitiesOutput>;
|
|
6
|
+
protected identifyText(input: IdentifyTextInput): Promise<IdentifyTextOutput>;
|
|
7
|
+
protected identifyLabels(input: IdentifyLabelsInput): Promise<IdentifyLabelsOutput>;
|
|
8
|
+
protected identifyEntities(input: IdentifyEntitiesInput): Promise<IdentifyEntitiesOutput>;
|
|
9
|
+
}
|
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
16
4
|
var AbstractPredictionsProvider_1 = require("./AbstractPredictionsProvider");
|
|
17
5
|
var Predictions_1 = require("../Predictions");
|
|
18
6
|
var core_1 = require("@aws-amplify/core");
|
|
19
7
|
var logger = new core_1.Logger('AbstractIdentifyPredictionsProvider');
|
|
20
8
|
var AbstractIdentifyPredictionsProvider = /** @class */ (function (_super) {
|
|
21
|
-
__extends(AbstractIdentifyPredictionsProvider, _super);
|
|
9
|
+
tslib_1.__extends(AbstractIdentifyPredictionsProvider, _super);
|
|
22
10
|
function AbstractIdentifyPredictionsProvider() {
|
|
23
11
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
24
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractIdentifyPredictionsProvider.js","sourceRoot":"","sources":["../../../src/types/Providers/AbstractIdentifyPredictionsProvider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AbstractIdentifyPredictionsProvider.js","sourceRoot":"","sources":["../../../src/types/Providers/AbstractIdentifyPredictionsProvider.ts"],"names":[],"mappings":";;;AAAA,6EAA4E;AAC5E,8CAUwB;AACxB,0CAA2C;AAC3C,IAAM,MAAM,GAAG,IAAI,aAAM,CAAC,qCAAqC,CAAC,CAAC;AAEjE;IAAkE,+DAA2B;IAA7F;;IAuCA,CAAC;IAtCA,yDAAW,GAAX;QACC,OAAO,UAAU,CAAC;IACnB,CAAC;IAED,sDAAQ,GAAR,UACC,KAAsE;QAItE,IAAI,iCAAmB,CAAC,KAAK,CAAC,EAAE;YAC/B,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;YAC7B,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;SAChC;aAAM,IAAI,mCAAqB,CAAC,KAAK,CAAC,EAAE;YACxC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;YAC/B,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;SAClC;aAAM,IAAI,qCAAuB,CAAC,KAAK,CAAC,EAAE;YAC1C,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;YACjC,OAAO,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;SACpC;IACF,CAAC;IAES,0DAAY,GAAtB,UACC,KAAwB;QAExB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACtE,CAAC;IAES,4DAAc,GAAxB,UACC,KAA0B;QAE1B,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACvE,CAAC;IAES,8DAAgB,GAA1B,UACC,KAA4B;QAE5B,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IACzE,CAAC;IACF,0CAAC;AAAD,CAAC,AAvCD,CAAkE,yDAA2B,GAuC5F;AAvCqB,kFAAmC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AbstractPredictionsProvider } from './AbstractPredictionsProvider';
|
|
2
|
+
import { InterpretTextInput, InterpretTextOutput } from '../Predictions';
|
|
3
|
+
export declare abstract class AbstractInterpretPredictionsProvider extends AbstractPredictionsProvider {
|
|
4
|
+
getCategory(): string;
|
|
5
|
+
interpret(input: InterpretTextInput): Promise<InterpretTextOutput>;
|
|
6
|
+
protected interpretText(input: InterpretTextInput): Promise<InterpretTextOutput>;
|
|
7
|
+
}
|
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
16
4
|
var AbstractPredictionsProvider_1 = require("./AbstractPredictionsProvider");
|
|
17
5
|
var Predictions_1 = require("../Predictions");
|
|
18
6
|
var AbstractInterpretPredictionsProvider = /** @class */ (function (_super) {
|
|
19
|
-
__extends(AbstractInterpretPredictionsProvider, _super);
|
|
7
|
+
tslib_1.__extends(AbstractInterpretPredictionsProvider, _super);
|
|
20
8
|
function AbstractInterpretPredictionsProvider() {
|
|
21
9
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
22
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractInterpretPredictionsProvider.js","sourceRoot":"","sources":["../../../src/types/Providers/AbstractInterpretPredictionsProvider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AbstractInterpretPredictionsProvider.js","sourceRoot":"","sources":["../../../src/types/Providers/AbstractInterpretPredictionsProvider.ts"],"names":[],"mappings":";;;AAAA,6EAA4E;AAC5E,8CAIwB;AAExB;IAAmE,gEAA2B;IAA9F;;IAgBA,CAAC;IAfA,0DAAW,GAAX;QACC,OAAO,WAAW,CAAC;IACpB,CAAC;IAED,wDAAS,GAAT,UAAU,KAAyB;QAClC,IAAI,kCAAoB,CAAC,KAAK,CAAC,EAAE;YAChC,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;SACjC;IACF,CAAC;IAES,4DAAa,GAAvB,UACC,KAAyB;QAEzB,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACpE,CAAC;IACF,2CAAC;AAAD,CAAC,AAhBD,CAAmE,yDAA2B,GAgB7F;AAhBqB,oFAAoC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PredictionsOptions } from '..';
|
|
2
|
+
export declare abstract class AbstractPredictionsProvider {
|
|
3
|
+
protected _config: PredictionsOptions;
|
|
4
|
+
configure(config: PredictionsOptions): PredictionsOptions;
|
|
5
|
+
abstract getProviderName(): string;
|
|
6
|
+
abstract getCategory(): string;
|
|
7
|
+
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
function __export(m) {
|
|
3
|
-
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
4
|
-
}
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./AbstractPredictionsProvider"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./AbstractConvertPredictionsProvider"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./AbstractIdentifyPredictionsProvider"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./AbstractInterpretPredictionsProvider"), exports);
|
|
10
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/Providers/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/Providers/index.ts"],"names":[],"mappings":";;;AAAA,wEAA8C;AAC9C,+EAAqD;AACrD,gFAAsD;AACtD,iFAAuD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Predictions';
|
package/lib/types/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
function __export(m) {
|
|
3
|
-
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
4
|
-
}
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./Predictions"), exports);
|
|
7
5
|
//# sourceMappingURL=index.js.map
|
package/lib/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;AAAA,wDAA8B"}
|
package/lib-esm/Predictions.js
CHANGED
|
@@ -1,34 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
13
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
|
-
if (!m) return o;
|
|
15
|
-
var i = m.call(o), r, ar = [], e;
|
|
16
|
-
try {
|
|
17
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18
|
-
}
|
|
19
|
-
catch (error) { e = { error: error }; }
|
|
20
|
-
finally {
|
|
21
|
-
try {
|
|
22
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
23
|
-
}
|
|
24
|
-
finally { if (e) throw e.error; }
|
|
25
|
-
}
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
var __spread = (this && this.__spread) || function () {
|
|
29
|
-
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
30
|
-
return ar;
|
|
31
|
-
};
|
|
1
|
+
import { __assign, __read, __spread } from "tslib";
|
|
32
2
|
import { Amplify, ConsoleLogger as Logger } from '@aws-amplify/core';
|
|
33
3
|
var logger = new Logger('Predictions');
|
|
34
4
|
var PredictionsClass = /** @class */ (function () {
|