You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: compare-comply/v1.ts
+133-31
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,8 @@ class CompareComplyV1 extends BaseService {
35
35
* @param {Object} options - Options for the service.
36
36
* @param {string} options.version - The API version date to use with the service, in "YYYY-MM-DD" format. Whenever the API is changed in a backwards incompatible way, a new minor version of the API is released. The service uses the API version for the date you specify, or the most recent version before that date. Note that you should not programmatically specify the current date at runtime, in case the API has been updated since your application's release. Instead, specify a version date that is compatible with your application, and don't change it until your application is ready for a later version.
37
37
* @param {string} [options.url] - The base url to use when contacting the service (e.g. 'https://gateway.watsonplatform.net/compare-comply/api'). The base url may differ between IBM Cloud regions.
38
+
* @param {string} [options.username] - The username used to authenticate with the service. Username and password credentials are only required to run your application locally or outside of IBM Cloud. When running on IBM Cloud, the credentials will be automatically loaded from the `VCAP_SERVICES` environment variable.
39
+
* @param {string} [options.password] - The password used to authenticate with the service. Username and password credentials are only required to run your application locally or outside of IBM Cloud. When running on IBM Cloud, the credentials will be automatically loaded from the `VCAP_SERVICES` environment variable.
38
40
* @param {string} [options.iam_access_token] - An IAM access token fully managed by the application. Responsibility falls on the application to refresh the token, either before it expires or reactively upon receiving a 401 from the service, as any requests made with an expired token will fail.
39
41
* @param {string} [options.iam_apikey] - An API key that can be used to request IAM tokens. If this API key is provided, the SDK will manage the token and handle the refreshing.
40
42
* @param {string} [options.iam_url] - An optional URL for the IAM service API. Defaults to 'https://iam.cloud.ibm.com/identity/token'.
@@ -108,7 +110,7 @@ class CompareComplyV1 extends BaseService {
108
110
contentType: _params.file_content_type
109
111
}
110
112
};
111
-
113
+
112
114
constquery={
113
115
'model': _params.model
114
116
};
@@ -176,7 +178,7 @@ class CompareComplyV1 extends BaseService {
176
178
contentType: _params.file_content_type
177
179
}
178
180
};
179
-
181
+
180
182
constquery={
181
183
'model': _params.model
182
184
};
@@ -244,7 +246,7 @@ class CompareComplyV1 extends BaseService {
244
246
contentType: _params.file_content_type
245
247
}
246
248
};
247
-
249
+
248
250
constquery={
249
251
'model': _params.model
250
252
};
@@ -320,7 +322,7 @@ class CompareComplyV1 extends BaseService {
320
322
contentType: _params.file_2_content_type
321
323
}
322
324
};
323
-
325
+
324
326
constquery={
325
327
'file_1_label': _params.file_1_label,
326
328
'file_2_label': _params.file_2_label,
@@ -441,7 +443,7 @@ class CompareComplyV1 extends BaseService {
441
443
if(missingParams){
442
444
return_callback(missingParams);
443
445
}
444
-
446
+
445
447
constquery={
446
448
'model': _params.model
447
449
};
@@ -501,7 +503,7 @@ class CompareComplyV1 extends BaseService {
501
503
if(missingParams){
502
504
return_callback(missingParams);
503
505
}
504
-
506
+
505
507
constquery={
506
508
'model': _params.model
507
509
};
@@ -589,7 +591,7 @@ class CompareComplyV1 extends BaseService {
589
591
});
590
592
});
591
593
}
592
-
594
+
593
595
constquery={
594
596
'feedback_type': _params.feedback_type,
595
597
'before': _params.before,
@@ -696,7 +698,7 @@ class CompareComplyV1 extends BaseService {
/** Text that is related to the contents of the table and that precedes or follows the current table. */
1446
+
exportinterfaceContexts{
1447
+
/** The related text. */
1448
+
text?: string;
1449
+
/** The numeric location of the identified element in the document, represented with two integers labeled `begin` and `end`. */
1450
+
location?: Location;
1451
+
}
1452
+
1439
1453
/** A monetary amount identified in the input document. */
1440
1454
exportinterfaceContractAmts{
1455
+
/** The confidence level in the identification of the contract amount. */
1456
+
confidence_level?: string;
1441
1457
/** The monetary amount. */
1442
1458
text?: string;
1443
-
/** The confidence level in the identification of the contract amount. */
1459
+
/** The normalized form of the amount, which is listed as a string. This element is optional; that is, the service output lists it only if normalized text exists. */
1460
+
text_normalized?: string;
1461
+
/** The details of the normalized text, if applicable. This element is optional; that is, the service output lists it only if normalized text exists. */
1462
+
interpretation?: Interpretation;
1463
+
/** One or more hash values that you can send to IBM to provide feedback or receive support. */
1464
+
provenance_ids?: string[];
1465
+
/** The numeric location of the identified element in the document, represented with two integers labeled `begin` and `end`. */
1466
+
location?: Location;
1467
+
}
1468
+
1469
+
/** The duration or durations of the contract. */
1470
+
exportinterfaceContractTerms{
1471
+
/** The confidence level in the identification of the contract term. */
1444
1472
confidence_level?: string;
1473
+
/** The contract term (duration). */
1474
+
text?: string;
1475
+
/** The normalized form of the contract term, which is listed as a string. This element is optional; that is, the service output lists it only if normalized text exists. */
1476
+
text_normalized?: string;
1477
+
/** The details of the normalized text, if applicable. This element is optional; that is, the service output lists it only if normalized text exists. */
1478
+
interpretation?: Interpretation;
1479
+
/** One or more hash values that you can send to IBM to provide feedback or receive support. */
1480
+
provenance_ids?: string[];
1445
1481
/** The numeric location of the identified element in the document, represented with two integers labeled `begin` and `end`. */
1446
1482
location?: Location;
1447
1483
}
1448
1484
1449
1485
/** The contract type identified in the input document. */
1450
-
exportinterfaceContractType{
1486
+
exportinterfaceContractTypes{
1487
+
/** The confidence level in the identification of the contract type. */
1488
+
confidence_level?: string;
1451
1489
/** The contract type. */
1452
1490
text?: string;
1453
-
/** The confidence level in the identification of the termination date. */
1454
-
confidence_level?: string;
1491
+
/** One or more hash values that you can send to IBM to provide feedback or receive support. */
1492
+
provenance_ids?: string[];
1455
1493
/** The numeric location of the identified element in the document, represented with two integers labeled `begin` and `end`. */
1456
1494
location?: Location;
1457
1495
}
@@ -1484,6 +1522,8 @@ namespace CompareComplyV1 {
1484
1522
section_titles?: SectionTitles[];
1485
1523
/** An array containing one object per section or subsection, in parallel with the `section_titles` array, that details the leading sentences in the corresponding section or subsection. */
1486
1524
leading_sentences?: LeadingSentence[];
1525
+
/** An array containing one object per paragraph, in parallel with the `section_titles` and `leading_sentences` arrays. */
1526
+
paragraphs?: Paragraphs[];
1487
1527
}
1488
1528
1489
1529
/** Basic information about the input document. */
/** The confidence level in the identification of the effective date. */
1506
1544
confidence_level?: string;
1545
+
/** The effective date, listed as a string. */
1546
+
text?: string;
1547
+
/** The normalized form of the effective date, which is listed as a string. This element is optional; that is, the service output lists it only if normalized text exists. */
1548
+
text_normalized?: string;
1549
+
/** One or more hash values that you can send to IBM to provide feedback or receive support. */
1550
+
provenance_ids?: string[];
1507
1551
/** The numeric location of the identified element in the document, represented with two integers labeled `begin` and `end`. */
/** The details of the normalized text, if applicable. This element is optional; that is, the service output lists it only if normalized text exists. */
1690
+
exportinterfaceInterpretation{
1691
+
/** The value that was located in the normalized text. */
1692
+
value?: string;
1693
+
/** An integer or float expressing the numeric value of the `value` key. */
1694
+
numeric_value?: number;
1695
+
/** A string listing the unit of the value that was found in the normalized text. **Note:** The value of `unit` is the [ISO-4217 currency code](https://www.iso.org/iso-4217-currency-codes.html) identified for the currency amount (for example, `USD` or `EUR`). If the service cannot disambiguate a currency symbol (for example, `$` or `£`), the value of `unit` contains the ambiguous symbol as-is. */
/** The locations of each paragraph in the input document. */
1784
+
exportinterfaceParagraphs{
1785
+
/** The numeric location of the identified element in the document, represented with two integers labeled `begin` and `end`. */
1786
+
location?: Location;
1787
+
}
1788
+
1721
1789
/** A party and its corresponding role, including address and contact information if identified. */
1722
1790
exportinterfaceParties{
1723
-
/** A string identifying the party. */
1791
+
/** The normalized form of the party's name. */
1724
1792
party?: string;
1725
-
/** A string that identifies the importance of the party. */
1726
-
importance?: string;
1727
1793
/** A string identifying the party's role. */
1728
1794
role?: string;
1729
-
/** List of the party's address or addresses. */
1795
+
/** A string that identifies the importance of the party. */
1796
+
importance?: string;
1797
+
/** A list of the party's address or addresses. */
1730
1798
addresses?: Address[];
1731
-
/** List of the names and roles of contacts identified in the input document. */
1799
+
/** A list of the names and roles of contacts identified in the input document. */
1732
1800
contacts?: Contact[];
1801
+
/** A list of the party's mentions in the input document. */
1802
+
mentions?: Mention[];
1803
+
}
1804
+
1805
+
/** The document's payment duration or durations. */
1806
+
exportinterfacePaymentTerms{
1807
+
/** The confidence level in the identification of the payment term. */
1808
+
confidence_level?: string;
1809
+
/** The payment term (duration). */
1810
+
text?: string;
1811
+
/** The normalized form of the payment term, which is listed as a string. This element is optional; that is, the service output lists it only if normalized text exists. */
1812
+
text_normalized?: string;
1813
+
/** The details of the normalized text, if applicable. This element is optional; that is, the service output lists it only if normalized text exists. */
1814
+
interpretation?: Interpretation;
1815
+
/** One or more hash values that you can send to IBM to provide feedback or receive support. */
1816
+
provenance_ids?: string[];
1817
+
/** The numeric location of the identified element in the document, represented with two integers labeled `begin` and `end`. */
1818
+
location?: Location;
1733
1819
}
1734
1820
1735
1821
/** An array of values, each being the `id` value of a row header that is applicable to this body cell. */
/** If identified, the title or caption of the current table of the form `Table x.: ...`. Empty when no title is identified. When exposed, the `title` is also excluded from the `contexts` array of the same table. */
1918
+
exportinterfaceTableTitle{
1919
+
/** The numeric location of the identified element in the document, represented with two integers labeled `begin` and `end`. */
1920
+
location?: Location;
1921
+
/** The text of the identified table title or caption. */
1922
+
text?: string;
1923
+
}
1924
+
1831
1925
/** The contents of the tables extracted from a document. */
1832
1926
exportinterfaceTables{
1833
1927
/** The numeric location of the identified element in the document, represented with two integers labeled `begin` and `end`. */
/** If identified, the title or caption of the current table of the form `Table x.: ...`. Empty when no title is identified. When exposed, the `title` is also excluded from the `contexts` array of the same table. */
1934
+
title?: TableTitle;
1839
1935
/** An array of table-level cells that apply as headers to all the other cells in the current table. */
1840
1936
table_headers?: TableHeaders[];
1841
1937
/** An array of row-level cells, each applicable as a header to other cells in the same row as itself, of the current table. */
1842
1938
row_headers?: RowHeaders[];
1843
1939
/** An array of column-level cells, each applicable as a header to other cells in the same column as itself, of the current table. */
1844
1940
column_headers?: ColumnHeaders[];
1845
-
/** An array of key-value pairs identified in the current table. */
1846
-
key_value_pairs?: KeyValuePair[];
1847
1941
/** An array of cells that are neither table header nor column header nor row header cells, of the current table with corresponding row and column header associations. */
1848
1942
body_cells?: BodyCells[];
1943
+
/** An array of objects that list text that is related to the table contents and that precedes or follows the current table. */
1944
+
contexts?: Contexts[];
1945
+
/** An array of key-value pairs identified in the current table. */
1946
+
key_value_pairs?: KeyValuePair[];
1849
1947
}
1850
1948
1851
1949
/** Termination dates identified in the input document. */
1852
1950
exportinterfaceTerminationDates{
1853
-
/** The termination date. */
1854
-
text?: string;
1855
1951
/** The confidence level in the identification of the termination date. */
1856
1952
confidence_level?: string;
1953
+
/** The termination date. */
1954
+
text?: string;
1955
+
/** The normalized form of the termination date, which is listed as a string. This element is optional; that is, the service output lists it only if normalized text exists. */
1956
+
text_normalized?: string;
1957
+
/** One or more hash values that you can send to IBM to provide feedback or receive support. */
1958
+
provenance_ids?: string[];
1857
1959
/** The numeric location of the identified element in the document, represented with two integers labeled `begin` and `end`. */
0 commit comments