@@ -32,6 +32,16 @@ import {
32
32
GetExpenseAnalysisCommandInput ,
33
33
GetExpenseAnalysisCommandOutput ,
34
34
} from "./commands/GetExpenseAnalysisCommand" ;
35
+ import {
36
+ GetLendingAnalysisCommand ,
37
+ GetLendingAnalysisCommandInput ,
38
+ GetLendingAnalysisCommandOutput ,
39
+ } from "./commands/GetLendingAnalysisCommand" ;
40
+ import {
41
+ GetLendingAnalysisSummaryCommand ,
42
+ GetLendingAnalysisSummaryCommandInput ,
43
+ GetLendingAnalysisSummaryCommandOutput ,
44
+ } from "./commands/GetLendingAnalysisSummaryCommand" ;
35
45
import {
36
46
StartDocumentAnalysisCommand ,
37
47
StartDocumentAnalysisCommandInput ,
@@ -47,6 +57,11 @@ import {
47
57
StartExpenseAnalysisCommandInput ,
48
58
StartExpenseAnalysisCommandOutput ,
49
59
} from "./commands/StartExpenseAnalysisCommand" ;
60
+ import {
61
+ StartLendingAnalysisCommand ,
62
+ StartLendingAnalysisCommandInput ,
63
+ StartLendingAnalysisCommandOutput ,
64
+ } from "./commands/StartLendingAnalysisCommand" ;
50
65
import { TextractClient } from "./TextractClient" ;
51
66
52
67
/**
@@ -456,6 +471,91 @@ export class Textract extends TextractClient {
456
471
}
457
472
}
458
473
474
+ /**
475
+ * <p>Gets the results for an Amazon Textract asynchronous operation that analyzes text in a
476
+ * lending document. </p>
477
+ * <p>You start asynchronous text analysis by calling <code>StartLendingAnalysis</code>,
478
+ * which returns a job identifier (<code>JobId</code>). When the text analysis operation
479
+ * finishes, Amazon Textract publishes a completion status to the Amazon Simple
480
+ * Notification Service (Amazon SNS) topic that's registered in the initial call to
481
+ * <code>StartLendingAnalysis</code>. </p>
482
+ * <p>To get the results of the text analysis operation, first check that the status value
483
+ * published to the Amazon SNS topic is SUCCEEDED. If so, call GetLendingAnalysis, and pass
484
+ * the job identifier (<code>JobId</code>) from the initial call to
485
+ * <code>StartLendingAnalysis</code>.</p>
486
+ */
487
+ public getLendingAnalysis (
488
+ args : GetLendingAnalysisCommandInput ,
489
+ options ?: __HttpHandlerOptions
490
+ ) : Promise < GetLendingAnalysisCommandOutput > ;
491
+ public getLendingAnalysis (
492
+ args : GetLendingAnalysisCommandInput ,
493
+ cb : ( err : any , data ?: GetLendingAnalysisCommandOutput ) => void
494
+ ) : void ;
495
+ public getLendingAnalysis (
496
+ args : GetLendingAnalysisCommandInput ,
497
+ options : __HttpHandlerOptions ,
498
+ cb : ( err : any , data ?: GetLendingAnalysisCommandOutput ) => void
499
+ ) : void ;
500
+ public getLendingAnalysis (
501
+ args : GetLendingAnalysisCommandInput ,
502
+ optionsOrCb ?: __HttpHandlerOptions | ( ( err : any , data ?: GetLendingAnalysisCommandOutput ) => void ) ,
503
+ cb ?: ( err : any , data ?: GetLendingAnalysisCommandOutput ) => void
504
+ ) : Promise < GetLendingAnalysisCommandOutput > | void {
505
+ const command = new GetLendingAnalysisCommand ( args ) ;
506
+ if ( typeof optionsOrCb === "function" ) {
507
+ this . send ( command , optionsOrCb ) ;
508
+ } else if ( typeof cb === "function" ) {
509
+ if ( typeof optionsOrCb !== "object" ) throw new Error ( `Expect http options but get ${ typeof optionsOrCb } ` ) ;
510
+ this . send ( command , optionsOrCb || { } , cb ) ;
511
+ } else {
512
+ return this . send ( command , optionsOrCb ) ;
513
+ }
514
+ }
515
+
516
+ /**
517
+ * <p>Gets summarized results for the <code>StartLendingAnalysis</code> operation, which analyzes
518
+ * text in a lending document. The returned summary consists of information about documents grouped
519
+ * together by a common document type. Information like detected signatures, page numbers, and split
520
+ * documents is returned with respect to the type of grouped document. </p>
521
+ * <p>You start asynchronous text analysis by calling <code>StartLendingAnalysis</code>, which
522
+ * returns a job identifier (<code>JobId</code>). When the text analysis operation finishes, Amazon
523
+ * Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS)
524
+ * topic that's registered in the initial call to <code>StartLendingAnalysis</code>. </p>
525
+ * <p>To get the results of the text analysis operation, first check that the status value
526
+ * published to the Amazon SNS topic is SUCCEEDED. If so, call
527
+ * <code>GetLendingAnalysisSummary</code>, and pass the job identifier (<code>JobId</code>) from
528
+ * the initial call to <code>StartLendingAnalysis</code>.</p>
529
+ */
530
+ public getLendingAnalysisSummary (
531
+ args : GetLendingAnalysisSummaryCommandInput ,
532
+ options ?: __HttpHandlerOptions
533
+ ) : Promise < GetLendingAnalysisSummaryCommandOutput > ;
534
+ public getLendingAnalysisSummary (
535
+ args : GetLendingAnalysisSummaryCommandInput ,
536
+ cb : ( err : any , data ?: GetLendingAnalysisSummaryCommandOutput ) => void
537
+ ) : void ;
538
+ public getLendingAnalysisSummary (
539
+ args : GetLendingAnalysisSummaryCommandInput ,
540
+ options : __HttpHandlerOptions ,
541
+ cb : ( err : any , data ?: GetLendingAnalysisSummaryCommandOutput ) => void
542
+ ) : void ;
543
+ public getLendingAnalysisSummary (
544
+ args : GetLendingAnalysisSummaryCommandInput ,
545
+ optionsOrCb ?: __HttpHandlerOptions | ( ( err : any , data ?: GetLendingAnalysisSummaryCommandOutput ) => void ) ,
546
+ cb ?: ( err : any , data ?: GetLendingAnalysisSummaryCommandOutput ) => void
547
+ ) : Promise < GetLendingAnalysisSummaryCommandOutput > | void {
548
+ const command = new GetLendingAnalysisSummaryCommand ( args ) ;
549
+ if ( typeof optionsOrCb === "function" ) {
550
+ this . send ( command , optionsOrCb ) ;
551
+ } else if ( typeof cb === "function" ) {
552
+ if ( typeof optionsOrCb !== "object" ) throw new Error ( `Expect http options but get ${ typeof optionsOrCb } ` ) ;
553
+ this . send ( command , optionsOrCb || { } , cb ) ;
554
+ } else {
555
+ return this . send ( command , optionsOrCb ) ;
556
+ }
557
+ }
558
+
459
559
/**
460
560
* <p>Starts the asynchronous analysis of an input document for relationships between detected
461
561
* items such as key-value pairs, tables, and selection elements.</p>
@@ -599,4 +699,66 @@ export class Textract extends TextractClient {
599
699
return this . send ( command , optionsOrCb ) ;
600
700
}
601
701
}
702
+
703
+ /**
704
+ * <p>Starts the classification and analysis of an input document.
705
+ * <code>StartLendingAnalysis</code> initiates the classification and analysis of a packet of
706
+ * lending documents. <code>StartLendingAnalysis</code> operates on a document file located in an
707
+ * Amazon S3 bucket.</p>
708
+ * <p>
709
+ * <code>StartLendingAnalysis</code> can analyze text in documents that are in one of the
710
+ * following formats: JPEG, PNG, TIFF, PDF. Use <code>DocumentLocation</code> to specify the bucket
711
+ * name and the file name of the document. </p>
712
+ * <p>
713
+ * <code>StartLendingAnalysis</code> returns a job identifier (<code>JobId</code>) that you use
714
+ * to get the results of the operation. When the text analysis is finished, Amazon Textract
715
+ * publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that
716
+ * you specify in <code>NotificationChannel</code>. To get the results of the text analysis
717
+ * operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If
718
+ * the status is SUCCEEDED you can call either <code>GetLendingAnalysis</code> or
719
+ * <code>GetLendingAnalysisSummary</code> and provide the <code>JobId</code> to obtain the results
720
+ * of the analysis.</p>
721
+ * <p>If using <code>OutputConfig</code> to specify an Amazon S3 bucket, the output will be contained
722
+ * within the specified prefix in a directory labeled with the job-id. In the directory there are 3
723
+ * sub-directories: </p>
724
+ * <ul>
725
+ * <li>
726
+ * <p>detailedResponse (contains the GetLendingAnalysis response)</p>
727
+ * </li>
728
+ * <li>
729
+ * <p>summaryResponse (for the GetLendingAnalysisSummary response)</p>
730
+ * </li>
731
+ * <li>
732
+ * <p>splitDocuments (documents split across logical boundaries)</p>
733
+ * </li>
734
+ * </ul>
735
+ */
736
+ public startLendingAnalysis (
737
+ args : StartLendingAnalysisCommandInput ,
738
+ options ?: __HttpHandlerOptions
739
+ ) : Promise < StartLendingAnalysisCommandOutput > ;
740
+ public startLendingAnalysis (
741
+ args : StartLendingAnalysisCommandInput ,
742
+ cb : ( err : any , data ?: StartLendingAnalysisCommandOutput ) => void
743
+ ) : void ;
744
+ public startLendingAnalysis (
745
+ args : StartLendingAnalysisCommandInput ,
746
+ options : __HttpHandlerOptions ,
747
+ cb : ( err : any , data ?: StartLendingAnalysisCommandOutput ) => void
748
+ ) : void ;
749
+ public startLendingAnalysis (
750
+ args : StartLendingAnalysisCommandInput ,
751
+ optionsOrCb ?: __HttpHandlerOptions | ( ( err : any , data ?: StartLendingAnalysisCommandOutput ) => void ) ,
752
+ cb ?: ( err : any , data ?: StartLendingAnalysisCommandOutput ) => void
753
+ ) : Promise < StartLendingAnalysisCommandOutput > | void {
754
+ const command = new StartLendingAnalysisCommand ( args ) ;
755
+ if ( typeof optionsOrCb === "function" ) {
756
+ this . send ( command , optionsOrCb ) ;
757
+ } else if ( typeof cb === "function" ) {
758
+ if ( typeof optionsOrCb !== "object" ) throw new Error ( `Expect http options but get ${ typeof optionsOrCb } ` ) ;
759
+ this . send ( command , optionsOrCb || { } , cb ) ;
760
+ } else {
761
+ return this . send ( command , optionsOrCb ) ;
762
+ }
763
+ }
602
764
}
0 commit comments