@gemina/sdk 0.2.1 → 0.3.1
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/README.md +34 -2
- package/dist/index.cjs +596 -85
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +730 -169
- package/dist/index.d.ts +730 -169
- package/dist/index.js +550 -85
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1798,6 +1798,223 @@ function CreditMeterToJSONTyped(value, ignoreDiscriminator) {
|
|
|
1798
1798
|
return value;
|
|
1799
1799
|
}
|
|
1800
1800
|
|
|
1801
|
+
// src/generated/models/ExtractionCostStateModel.ts
|
|
1802
|
+
var ExtractionCostStateModel = {
|
|
1803
|
+
Pending: "pending",
|
|
1804
|
+
Settled: "settled",
|
|
1805
|
+
NotCharged: "not_charged"
|
|
1806
|
+
};
|
|
1807
|
+
function instanceOfExtractionCostStateModel(value) {
|
|
1808
|
+
for (const key in ExtractionCostStateModel) {
|
|
1809
|
+
if (Object.prototype.hasOwnProperty.call(ExtractionCostStateModel, key)) {
|
|
1810
|
+
if (ExtractionCostStateModel[key] === value) {
|
|
1811
|
+
return true;
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
return false;
|
|
1816
|
+
}
|
|
1817
|
+
function ExtractionCostStateModelFromJSON(json) {
|
|
1818
|
+
return ExtractionCostStateModelFromJSONTyped(json, false);
|
|
1819
|
+
}
|
|
1820
|
+
function ExtractionCostStateModelFromJSONTyped(json, ignoreDiscriminator) {
|
|
1821
|
+
return json;
|
|
1822
|
+
}
|
|
1823
|
+
function ExtractionCostStateModelToJSON(value) {
|
|
1824
|
+
return value;
|
|
1825
|
+
}
|
|
1826
|
+
function ExtractionCostStateModelToJSONTyped(value, ignoreDiscriminator) {
|
|
1827
|
+
return value;
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
// src/generated/models/ExtractionCostOutDTO.ts
|
|
1831
|
+
function instanceOfExtractionCostOutDTO(value) {
|
|
1832
|
+
if (!("extractionId" in value) || value["extractionId"] === void 0) return false;
|
|
1833
|
+
if (!("state" in value) || value["state"] === void 0) return false;
|
|
1834
|
+
return true;
|
|
1835
|
+
}
|
|
1836
|
+
function ExtractionCostOutDTOFromJSON(json) {
|
|
1837
|
+
return ExtractionCostOutDTOFromJSONTyped(json, false);
|
|
1838
|
+
}
|
|
1839
|
+
function ExtractionCostOutDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
1840
|
+
if (json == null) {
|
|
1841
|
+
return json;
|
|
1842
|
+
}
|
|
1843
|
+
return {
|
|
1844
|
+
"costCents": json["costCents"] == null ? void 0 : json["costCents"],
|
|
1845
|
+
"costExplanation": json["costExplanation"] == null ? void 0 : json["costExplanation"],
|
|
1846
|
+
"createdAt": json["createdAt"] == null ? void 0 : new Date(json["createdAt"]),
|
|
1847
|
+
"createdAtTimestamp": json["createdAtTimestamp"] == null ? void 0 : json["createdAtTimestamp"],
|
|
1848
|
+
"creditsConsumed": json["creditsConsumed"] == null ? void 0 : json["creditsConsumed"],
|
|
1849
|
+
"extractionId": json["extractionId"],
|
|
1850
|
+
"meter": json["meter"] == null ? void 0 : CreditMeterFromJSON(json["meter"]),
|
|
1851
|
+
"state": ExtractionCostStateModelFromJSON(json["state"])
|
|
1852
|
+
};
|
|
1853
|
+
}
|
|
1854
|
+
function ExtractionCostOutDTOToJSON(json) {
|
|
1855
|
+
return ExtractionCostOutDTOToJSONTyped(json, false);
|
|
1856
|
+
}
|
|
1857
|
+
function ExtractionCostOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1858
|
+
if (value == null) {
|
|
1859
|
+
return value;
|
|
1860
|
+
}
|
|
1861
|
+
return {
|
|
1862
|
+
"costCents": value["costCents"],
|
|
1863
|
+
"costExplanation": value["costExplanation"],
|
|
1864
|
+
"createdAt": value["createdAt"] == null ? value["createdAt"] : value["createdAt"].toISOString(),
|
|
1865
|
+
"createdAtTimestamp": value["createdAtTimestamp"],
|
|
1866
|
+
"creditsConsumed": value["creditsConsumed"],
|
|
1867
|
+
"extractionId": value["extractionId"],
|
|
1868
|
+
"meter": CreditMeterToJSON(value["meter"]),
|
|
1869
|
+
"state": ExtractionCostStateModelToJSON(value["state"])
|
|
1870
|
+
};
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
// src/generated/models/FoundationMetaDTO.ts
|
|
1874
|
+
function instanceOfFoundationMetaDTO(value) {
|
|
1875
|
+
return true;
|
|
1876
|
+
}
|
|
1877
|
+
function FoundationMetaDTOFromJSON(json) {
|
|
1878
|
+
return FoundationMetaDTOFromJSONTyped(json, false);
|
|
1879
|
+
}
|
|
1880
|
+
function FoundationMetaDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
1881
|
+
if (json == null) {
|
|
1882
|
+
return json;
|
|
1883
|
+
}
|
|
1884
|
+
return {
|
|
1885
|
+
"correlationId": json["correlationId"] == null ? void 0 : json["correlationId"],
|
|
1886
|
+
"externalId": json["externalId"] == null ? void 0 : json["externalId"],
|
|
1887
|
+
"userId": json["userId"] == null ? void 0 : json["userId"]
|
|
1888
|
+
};
|
|
1889
|
+
}
|
|
1890
|
+
function FoundationMetaDTOToJSON(json) {
|
|
1891
|
+
return FoundationMetaDTOToJSONTyped(json, false);
|
|
1892
|
+
}
|
|
1893
|
+
function FoundationMetaDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1894
|
+
if (value == null) {
|
|
1895
|
+
return value;
|
|
1896
|
+
}
|
|
1897
|
+
return {
|
|
1898
|
+
"correlationId": value["correlationId"],
|
|
1899
|
+
"externalId": value["externalId"],
|
|
1900
|
+
"userId": value["userId"]
|
|
1901
|
+
};
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
// src/generated/models/ExtractionCostOutResultDTO.ts
|
|
1905
|
+
function instanceOfExtractionCostOutResultDTO(value) {
|
|
1906
|
+
if (!("data" in value) || value["data"] === void 0) return false;
|
|
1907
|
+
if (!("status" in value) || value["status"] === void 0) return false;
|
|
1908
|
+
return true;
|
|
1909
|
+
}
|
|
1910
|
+
function ExtractionCostOutResultDTOFromJSON(json) {
|
|
1911
|
+
return ExtractionCostOutResultDTOFromJSONTyped(json, false);
|
|
1912
|
+
}
|
|
1913
|
+
function ExtractionCostOutResultDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
1914
|
+
if (json == null) {
|
|
1915
|
+
return json;
|
|
1916
|
+
}
|
|
1917
|
+
return {
|
|
1918
|
+
"createdAt": json["createdAt"] == null ? void 0 : new Date(json["createdAt"]),
|
|
1919
|
+
"createdAtTimestamp": json["createdAtTimestamp"] == null ? void 0 : json["createdAtTimestamp"],
|
|
1920
|
+
"data": ExtractionCostOutDTOFromJSON(json["data"]),
|
|
1921
|
+
"errors": json["errors"] == null ? void 0 : json["errors"],
|
|
1922
|
+
"meta": json["meta"] == null ? void 0 : FoundationMetaDTOFromJSON(json["meta"]),
|
|
1923
|
+
"servedAt": json["servedAt"] == null ? void 0 : new Date(json["servedAt"]),
|
|
1924
|
+
"servedAtTimestamp": json["servedAtTimestamp"] == null ? void 0 : json["servedAtTimestamp"],
|
|
1925
|
+
"status": ResponseStatusFromJSON(json["status"])
|
|
1926
|
+
};
|
|
1927
|
+
}
|
|
1928
|
+
function ExtractionCostOutResultDTOToJSON(json) {
|
|
1929
|
+
return ExtractionCostOutResultDTOToJSONTyped(json, false);
|
|
1930
|
+
}
|
|
1931
|
+
function ExtractionCostOutResultDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1932
|
+
if (value == null) {
|
|
1933
|
+
return value;
|
|
1934
|
+
}
|
|
1935
|
+
return {
|
|
1936
|
+
"createdAt": value["createdAt"] == null ? value["createdAt"] : value["createdAt"].toISOString(),
|
|
1937
|
+
"createdAtTimestamp": value["createdAtTimestamp"],
|
|
1938
|
+
"data": ExtractionCostOutDTOToJSON(value["data"]),
|
|
1939
|
+
"errors": value["errors"],
|
|
1940
|
+
"meta": FoundationMetaDTOToJSON(value["meta"]),
|
|
1941
|
+
"servedAt": value["servedAt"] == null ? value["servedAt"] : value["servedAt"].toISOString(),
|
|
1942
|
+
"servedAtTimestamp": value["servedAtTimestamp"],
|
|
1943
|
+
"status": ResponseStatusToJSON(value["status"])
|
|
1944
|
+
};
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
// src/generated/models/ExtractionCostsDataOutDTO.ts
|
|
1948
|
+
function instanceOfExtractionCostsDataOutDTO(value) {
|
|
1949
|
+
if (!("costs" in value) || value["costs"] === void 0) return false;
|
|
1950
|
+
return true;
|
|
1951
|
+
}
|
|
1952
|
+
function ExtractionCostsDataOutDTOFromJSON(json) {
|
|
1953
|
+
return ExtractionCostsDataOutDTOFromJSONTyped(json, false);
|
|
1954
|
+
}
|
|
1955
|
+
function ExtractionCostsDataOutDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
1956
|
+
if (json == null) {
|
|
1957
|
+
return json;
|
|
1958
|
+
}
|
|
1959
|
+
return {
|
|
1960
|
+
"costs": json["costs"].map(ExtractionCostOutDTOFromJSON)
|
|
1961
|
+
};
|
|
1962
|
+
}
|
|
1963
|
+
function ExtractionCostsDataOutDTOToJSON(json) {
|
|
1964
|
+
return ExtractionCostsDataOutDTOToJSONTyped(json, false);
|
|
1965
|
+
}
|
|
1966
|
+
function ExtractionCostsDataOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
1967
|
+
if (value == null) {
|
|
1968
|
+
return value;
|
|
1969
|
+
}
|
|
1970
|
+
return {
|
|
1971
|
+
"costs": value["costs"].map(ExtractionCostOutDTOToJSON)
|
|
1972
|
+
};
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
// src/generated/models/ExtractionCostsOutDTO.ts
|
|
1976
|
+
function instanceOfExtractionCostsOutDTO(value) {
|
|
1977
|
+
if (!("data" in value) || value["data"] === void 0) return false;
|
|
1978
|
+
if (!("status" in value) || value["status"] === void 0) return false;
|
|
1979
|
+
return true;
|
|
1980
|
+
}
|
|
1981
|
+
function ExtractionCostsOutDTOFromJSON(json) {
|
|
1982
|
+
return ExtractionCostsOutDTOFromJSONTyped(json, false);
|
|
1983
|
+
}
|
|
1984
|
+
function ExtractionCostsOutDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
1985
|
+
if (json == null) {
|
|
1986
|
+
return json;
|
|
1987
|
+
}
|
|
1988
|
+
return {
|
|
1989
|
+
"createdAt": json["createdAt"] == null ? void 0 : new Date(json["createdAt"]),
|
|
1990
|
+
"createdAtTimestamp": json["createdAtTimestamp"] == null ? void 0 : json["createdAtTimestamp"],
|
|
1991
|
+
"data": ExtractionCostsDataOutDTOFromJSON(json["data"]),
|
|
1992
|
+
"errors": json["errors"] == null ? void 0 : json["errors"],
|
|
1993
|
+
"meta": json["meta"] == null ? void 0 : FoundationMetaDTOFromJSON(json["meta"]),
|
|
1994
|
+
"servedAt": json["servedAt"] == null ? void 0 : new Date(json["servedAt"]),
|
|
1995
|
+
"servedAtTimestamp": json["servedAtTimestamp"] == null ? void 0 : json["servedAtTimestamp"],
|
|
1996
|
+
"status": ResponseStatusFromJSON(json["status"])
|
|
1997
|
+
};
|
|
1998
|
+
}
|
|
1999
|
+
function ExtractionCostsOutDTOToJSON(json) {
|
|
2000
|
+
return ExtractionCostsOutDTOToJSONTyped(json, false);
|
|
2001
|
+
}
|
|
2002
|
+
function ExtractionCostsOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
2003
|
+
if (value == null) {
|
|
2004
|
+
return value;
|
|
2005
|
+
}
|
|
2006
|
+
return {
|
|
2007
|
+
"createdAt": value["createdAt"] == null ? value["createdAt"] : value["createdAt"].toISOString(),
|
|
2008
|
+
"createdAtTimestamp": value["createdAtTimestamp"],
|
|
2009
|
+
"data": ExtractionCostsDataOutDTOToJSON(value["data"]),
|
|
2010
|
+
"errors": value["errors"],
|
|
2011
|
+
"meta": FoundationMetaDTOToJSON(value["meta"]),
|
|
2012
|
+
"servedAt": value["servedAt"] == null ? value["servedAt"] : value["servedAt"].toISOString(),
|
|
2013
|
+
"servedAtTimestamp": value["servedAtTimestamp"],
|
|
2014
|
+
"status": ResponseStatusToJSON(value["status"])
|
|
2015
|
+
};
|
|
2016
|
+
}
|
|
2017
|
+
|
|
1801
2018
|
// src/generated/models/ExtractionViewMetaOutDTO.ts
|
|
1802
2019
|
function instanceOfExtractionViewMetaOutDTO(value) {
|
|
1803
2020
|
if (!("correction" in value) || value["correction"] === void 0) return false;
|
|
@@ -2402,6 +2619,38 @@ function NumberOfStoredDocumentsOutDTOToJSONTyped(value, ignoreDiscriminator = f
|
|
|
2402
2619
|
};
|
|
2403
2620
|
}
|
|
2404
2621
|
|
|
2622
|
+
// src/generated/models/UploadExtractionTypeEnum.ts
|
|
2623
|
+
var UploadExtractionTypeEnum = {
|
|
2624
|
+
Ocr: "ocr",
|
|
2625
|
+
DocumentDetailsHebrew: "document_details_hebrew",
|
|
2626
|
+
DocumentLineItemsHebrew: "document_line_items_hebrew",
|
|
2627
|
+
InvoiceHeaders: "invoice_headers",
|
|
2628
|
+
InvoiceLineItems: "invoice_line_items",
|
|
2629
|
+
CustomTemplate: "custom_template"
|
|
2630
|
+
};
|
|
2631
|
+
function instanceOfUploadExtractionTypeEnum(value) {
|
|
2632
|
+
for (const key in UploadExtractionTypeEnum) {
|
|
2633
|
+
if (Object.prototype.hasOwnProperty.call(UploadExtractionTypeEnum, key)) {
|
|
2634
|
+
if (UploadExtractionTypeEnum[key] === value) {
|
|
2635
|
+
return true;
|
|
2636
|
+
}
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
return false;
|
|
2640
|
+
}
|
|
2641
|
+
function UploadExtractionTypeEnumFromJSON(json) {
|
|
2642
|
+
return UploadExtractionTypeEnumFromJSONTyped(json, false);
|
|
2643
|
+
}
|
|
2644
|
+
function UploadExtractionTypeEnumFromJSONTyped(json, ignoreDiscriminator) {
|
|
2645
|
+
return json;
|
|
2646
|
+
}
|
|
2647
|
+
function UploadExtractionTypeEnumToJSON(value) {
|
|
2648
|
+
return value;
|
|
2649
|
+
}
|
|
2650
|
+
function UploadExtractionTypeEnumToJSONTyped(value, ignoreDiscriminator) {
|
|
2651
|
+
return value;
|
|
2652
|
+
}
|
|
2653
|
+
|
|
2405
2654
|
// src/generated/models/WebDocumentUploadInDTO.ts
|
|
2406
2655
|
function instanceOfWebDocumentUploadInDTO(value) {
|
|
2407
2656
|
if (!("externalId" in value) || value["externalId"] === void 0) return false;
|
|
@@ -2423,7 +2672,7 @@ function WebDocumentUploadInDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
2423
2672
|
"endUserId": json["endUserId"] == null ? void 0 : json["endUserId"],
|
|
2424
2673
|
"evaluation": json["evaluation"] == null ? void 0 : json["evaluation"],
|
|
2425
2674
|
"externalId": json["externalId"],
|
|
2426
|
-
"extractionTypes": json["extractionTypes"].map(
|
|
2675
|
+
"extractionTypes": json["extractionTypes"].map(UploadExtractionTypeEnumFromJSON),
|
|
2427
2676
|
"includeCoordinates": json["includeCoordinates"] == null ? void 0 : json["includeCoordinates"],
|
|
2428
2677
|
"modelType": json["modelType"] == null ? void 0 : ModelTypeFromJSON(json["modelType"]),
|
|
2429
2678
|
"templateId": json["templateId"] == null ? void 0 : json["templateId"],
|
|
@@ -2445,7 +2694,7 @@ function WebDocumentUploadInDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
2445
2694
|
"endUserId": value["endUserId"],
|
|
2446
2695
|
"evaluation": value["evaluation"],
|
|
2447
2696
|
"externalId": value["externalId"],
|
|
2448
|
-
"extractionTypes": value["extractionTypes"].map(
|
|
2697
|
+
"extractionTypes": value["extractionTypes"].map(UploadExtractionTypeEnumToJSON),
|
|
2449
2698
|
"includeCoordinates": value["includeCoordinates"],
|
|
2450
2699
|
"modelType": ModelTypeToJSON(value["modelType"]),
|
|
2451
2700
|
"templateId": value["templateId"],
|
|
@@ -2535,7 +2784,7 @@ var DocumentApi = class extends BaseAPI {
|
|
|
2535
2784
|
};
|
|
2536
2785
|
}
|
|
2537
2786
|
/**
|
|
2538
|
-
* Posts an async request for a document file (image or PDF) processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP - PDF files: PDF Returns document ID and storage location for further processing
|
|
2787
|
+
* Posts an async request for a document file (image or PDF) processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP, HEIC/HEIF, AVIF - PDF files: PDF Returns document ID and storage location for further processing
|
|
2539
2788
|
* Create Document Processing Request
|
|
2540
2789
|
*/
|
|
2541
2790
|
async createDocumentProcessingRequestRaw(requestParameters, initOverrides) {
|
|
@@ -2544,7 +2793,7 @@ var DocumentApi = class extends BaseAPI {
|
|
|
2544
2793
|
return new JSONApiResponse(response, (jsonValue) => DocumentProcessingResultOutDTOFromJSON(jsonValue));
|
|
2545
2794
|
}
|
|
2546
2795
|
/**
|
|
2547
|
-
* Posts an async request for a document file (image or PDF) processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP - PDF files: PDF Returns document ID and storage location for further processing
|
|
2796
|
+
* Posts an async request for a document file (image or PDF) processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP, HEIC/HEIF, AVIF - PDF files: PDF Returns document ID and storage location for further processing
|
|
2548
2797
|
* Create Document Processing Request
|
|
2549
2798
|
*/
|
|
2550
2799
|
async createDocumentProcessingRequest(requestParameters, initOverrides) {
|
|
@@ -2633,7 +2882,7 @@ var DocumentApi = class extends BaseAPI {
|
|
|
2633
2882
|
};
|
|
2634
2883
|
}
|
|
2635
2884
|
/**
|
|
2636
|
-
* Posts an async request for a document file (image or PDF) processing with user authentication Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP - PDF files: PDF Returns document ID and storage location for further processing
|
|
2885
|
+
* Posts an async request for a document file (image or PDF) processing with user authentication Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP, HEIC/HEIF, AVIF - PDF files: PDF Returns document ID and storage location for further processing
|
|
2637
2886
|
* Create Document Processing Request By User
|
|
2638
2887
|
*/
|
|
2639
2888
|
async createDocumentProcessingRequestByUserRaw(requestParameters, initOverrides) {
|
|
@@ -2642,7 +2891,7 @@ var DocumentApi = class extends BaseAPI {
|
|
|
2642
2891
|
return new JSONApiResponse(response, (jsonValue) => DocumentProcessingResultOutDTOFromJSON(jsonValue));
|
|
2643
2892
|
}
|
|
2644
2893
|
/**
|
|
2645
|
-
* Posts an async request for a document file (image or PDF) processing with user authentication Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP - PDF files: PDF Returns document ID and storage location for further processing
|
|
2894
|
+
* Posts an async request for a document file (image or PDF) processing with user authentication Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP, HEIC/HEIF, AVIF - PDF files: PDF Returns document ID and storage location for further processing
|
|
2646
2895
|
* Create Document Processing Request By User
|
|
2647
2896
|
*/
|
|
2648
2897
|
async createDocumentProcessingRequestByUser(requestParameters, initOverrides) {
|
|
@@ -2675,7 +2924,7 @@ var DocumentApi = class extends BaseAPI {
|
|
|
2675
2924
|
};
|
|
2676
2925
|
}
|
|
2677
2926
|
/**
|
|
2678
|
-
* Upload a document file from a URL (image or PDF) for processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP - PDF files: PDF Returns document ID and storage location for further processing
|
|
2927
|
+
* Upload a document file from a URL (image or PDF) for processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP, HEIC/HEIF, AVIF - PDF files: PDF Returns document ID and storage location for further processing
|
|
2679
2928
|
* Create Web Document Processing Request
|
|
2680
2929
|
*/
|
|
2681
2930
|
async createWebDocumentProcessingRequestRaw(requestParameters, initOverrides) {
|
|
@@ -2684,7 +2933,7 @@ var DocumentApi = class extends BaseAPI {
|
|
|
2684
2933
|
return new JSONApiResponse(response, (jsonValue) => DocumentProcessingResultOutDTOFromJSON(jsonValue));
|
|
2685
2934
|
}
|
|
2686
2935
|
/**
|
|
2687
|
-
* Upload a document file from a URL (image or PDF) for processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP - PDF files: PDF Returns document ID and storage location for further processing
|
|
2936
|
+
* Upload a document file from a URL (image or PDF) for processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP, HEIC/HEIF, AVIF - PDF files: PDF Returns document ID and storage location for further processing
|
|
2688
2937
|
* Create Web Document Processing Request
|
|
2689
2938
|
*/
|
|
2690
2939
|
async createWebDocumentProcessingRequest(requestParameters, initOverrides) {
|
|
@@ -2720,7 +2969,7 @@ var DocumentApi = class extends BaseAPI {
|
|
|
2720
2969
|
};
|
|
2721
2970
|
}
|
|
2722
2971
|
/**
|
|
2723
|
-
* Posts an async request for a document file from a URL (image or PDF) processing with user authentication Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP - PDF files: PDF Returns document ID and storage location for further processing
|
|
2972
|
+
* Posts an async request for a document file from a URL (image or PDF) processing with user authentication Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP, HEIC/HEIF, AVIF - PDF files: PDF Returns document ID and storage location for further processing
|
|
2724
2973
|
* Create Web Document Processing Request By User
|
|
2725
2974
|
*/
|
|
2726
2975
|
async createWebDocumentProcessingRequestByUserRaw(requestParameters, initOverrides) {
|
|
@@ -2729,7 +2978,7 @@ var DocumentApi = class extends BaseAPI {
|
|
|
2729
2978
|
return new JSONApiResponse(response, (jsonValue) => DocumentProcessingResultOutDTOFromJSON(jsonValue));
|
|
2730
2979
|
}
|
|
2731
2980
|
/**
|
|
2732
|
-
* Posts an async request for a document file from a URL (image or PDF) processing with user authentication Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP - PDF files: PDF Returns document ID and storage location for further processing
|
|
2981
|
+
* Posts an async request for a document file from a URL (image or PDF) processing with user authentication Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP, HEIC/HEIF, AVIF - PDF files: PDF Returns document ID and storage location for further processing
|
|
2733
2982
|
* Create Web Document Processing Request By User
|
|
2734
2983
|
*/
|
|
2735
2984
|
async createWebDocumentProcessingRequestByUser(requestParameters, initOverrides) {
|
|
@@ -3218,6 +3467,90 @@ var DocumentApi = class extends BaseAPI {
|
|
|
3218
3467
|
const response = await this.getDocumentProcessingResultByCorrelationIdByUserRaw(requestParameters, initOverrides);
|
|
3219
3468
|
return await response.value();
|
|
3220
3469
|
}
|
|
3470
|
+
/**
|
|
3471
|
+
* Creates request options for getExtractionCost without sending the request
|
|
3472
|
+
*/
|
|
3473
|
+
async getExtractionCostRequestOpts(requestParameters) {
|
|
3474
|
+
if (requestParameters["documentExtractionId"] == null) {
|
|
3475
|
+
throw new RequiredError(
|
|
3476
|
+
"documentExtractionId",
|
|
3477
|
+
'Required parameter "documentExtractionId" was null or undefined when calling getExtractionCost().'
|
|
3478
|
+
);
|
|
3479
|
+
}
|
|
3480
|
+
const queryParameters = {};
|
|
3481
|
+
const headerParameters = {};
|
|
3482
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
3483
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
|
|
3484
|
+
}
|
|
3485
|
+
let urlPath = `/api/v1/documents/extractions/{document_extraction_id}/cost`;
|
|
3486
|
+
urlPath = urlPath.replace("{document_extraction_id}", encodeURIComponent(String(requestParameters["documentExtractionId"])));
|
|
3487
|
+
return {
|
|
3488
|
+
path: urlPath,
|
|
3489
|
+
method: "GET",
|
|
3490
|
+
headers: headerParameters,
|
|
3491
|
+
query: queryParameters
|
|
3492
|
+
};
|
|
3493
|
+
}
|
|
3494
|
+
/**
|
|
3495
|
+
* Look up what a single extraction cost. See the bulk variant (`/extractions/costs`) for the `state` semantics. An extraction the calling API key does not own is reported as not found.
|
|
3496
|
+
* Get Extraction Cost
|
|
3497
|
+
*/
|
|
3498
|
+
async getExtractionCostRaw(requestParameters, initOverrides) {
|
|
3499
|
+
const requestOptions = await this.getExtractionCostRequestOpts(requestParameters);
|
|
3500
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
3501
|
+
return new JSONApiResponse(response, (jsonValue) => ExtractionCostOutResultDTOFromJSON(jsonValue));
|
|
3502
|
+
}
|
|
3503
|
+
/**
|
|
3504
|
+
* Look up what a single extraction cost. See the bulk variant (`/extractions/costs`) for the `state` semantics. An extraction the calling API key does not own is reported as not found.
|
|
3505
|
+
* Get Extraction Cost
|
|
3506
|
+
*/
|
|
3507
|
+
async getExtractionCost(requestParameters, initOverrides) {
|
|
3508
|
+
const response = await this.getExtractionCostRaw(requestParameters, initOverrides);
|
|
3509
|
+
return await response.value();
|
|
3510
|
+
}
|
|
3511
|
+
/**
|
|
3512
|
+
* Creates request options for getExtractionCosts without sending the request
|
|
3513
|
+
*/
|
|
3514
|
+
async getExtractionCostsRequestOpts(requestParameters) {
|
|
3515
|
+
if (requestParameters["ids"] == null) {
|
|
3516
|
+
throw new RequiredError(
|
|
3517
|
+
"ids",
|
|
3518
|
+
'Required parameter "ids" was null or undefined when calling getExtractionCosts().'
|
|
3519
|
+
);
|
|
3520
|
+
}
|
|
3521
|
+
const queryParameters = {};
|
|
3522
|
+
if (requestParameters["ids"] != null) {
|
|
3523
|
+
queryParameters["ids"] = requestParameters["ids"];
|
|
3524
|
+
}
|
|
3525
|
+
const headerParameters = {};
|
|
3526
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
3527
|
+
headerParameters["X-API-Key"] = await this.configuration.apiKey("X-API-Key");
|
|
3528
|
+
}
|
|
3529
|
+
let urlPath = `/api/v1/documents/extractions/costs`;
|
|
3530
|
+
return {
|
|
3531
|
+
path: urlPath,
|
|
3532
|
+
method: "GET",
|
|
3533
|
+
headers: headerParameters,
|
|
3534
|
+
query: queryParameters
|
|
3535
|
+
};
|
|
3536
|
+
}
|
|
3537
|
+
/**
|
|
3538
|
+
* Look up what a batch of extractions cost. Lean by design: costs only — no signed document URLs, no extracted values. Use this instead of the full extraction view when all you need is spend. Pass one `ids` parameter per extraction, e.g. `?ids=<uuid>&ids=<uuid>`. Ids belonging to another API key, and ids that do not exist, are omitted from the response rather than reported — the endpoint cannot be used to discover whether an extraction id is real. Key the response by `extractionId`; order is not guaranteed. Each entry carries a `state`: - `settled` — the charge is on record; the number is final - `pending` — billing has not run yet; retry - `not_charged` — billing finished with no charge; this never resolves
|
|
3539
|
+
* Get Extraction Costs
|
|
3540
|
+
*/
|
|
3541
|
+
async getExtractionCostsRaw(requestParameters, initOverrides) {
|
|
3542
|
+
const requestOptions = await this.getExtractionCostsRequestOpts(requestParameters);
|
|
3543
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
3544
|
+
return new JSONApiResponse(response, (jsonValue) => ExtractionCostsOutDTOFromJSON(jsonValue));
|
|
3545
|
+
}
|
|
3546
|
+
/**
|
|
3547
|
+
* Look up what a batch of extractions cost. Lean by design: costs only — no signed document URLs, no extracted values. Use this instead of the full extraction view when all you need is spend. Pass one `ids` parameter per extraction, e.g. `?ids=<uuid>&ids=<uuid>`. Ids belonging to another API key, and ids that do not exist, are omitted from the response rather than reported — the endpoint cannot be used to discover whether an extraction id is real. Key the response by `extractionId`; order is not guaranteed. Each entry carries a `state`: - `settled` — the charge is on record; the number is final - `pending` — billing has not run yet; retry - `not_charged` — billing finished with no charge; this never resolves
|
|
3548
|
+
* Get Extraction Costs
|
|
3549
|
+
*/
|
|
3550
|
+
async getExtractionCosts(requestParameters, initOverrides) {
|
|
3551
|
+
const response = await this.getExtractionCostsRaw(requestParameters, initOverrides);
|
|
3552
|
+
return await response.value();
|
|
3553
|
+
}
|
|
3221
3554
|
/**
|
|
3222
3555
|
* Creates request options for getTotalNumberOfStoredDocumentsByUser without sending the request
|
|
3223
3556
|
*/
|
|
@@ -3641,7 +3974,7 @@ var DocumentApi = class extends BaseAPI {
|
|
|
3641
3974
|
};
|
|
3642
3975
|
}
|
|
3643
3976
|
/**
|
|
3644
|
-
* Upload a document file (image or PDF) for processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP - PDF files: PDF Returns document ID and storage location for further processing
|
|
3977
|
+
* Upload a document file (image or PDF) for processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP, HEIC/HEIF, AVIF - PDF files: PDF Returns document ID and storage location for further processing
|
|
3645
3978
|
* Upload Document
|
|
3646
3979
|
*/
|
|
3647
3980
|
async uploadDocumentRaw(requestParameters, initOverrides) {
|
|
@@ -3650,7 +3983,7 @@ var DocumentApi = class extends BaseAPI {
|
|
|
3650
3983
|
return new JSONApiResponse(response, (jsonValue) => DocumentProcessingResultOutDTOFromJSON(jsonValue));
|
|
3651
3984
|
}
|
|
3652
3985
|
/**
|
|
3653
|
-
* Upload a document file (image or PDF) for processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP - PDF files: PDF Returns document ID and storage location for further processing
|
|
3986
|
+
* Upload a document file (image or PDF) for processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP, HEIC/HEIF, AVIF - PDF files: PDF Returns document ID and storage location for further processing
|
|
3654
3987
|
* Upload Document
|
|
3655
3988
|
*/
|
|
3656
3989
|
async uploadDocument(requestParameters, initOverrides) {
|
|
@@ -3739,7 +4072,7 @@ var DocumentApi = class extends BaseAPI {
|
|
|
3739
4072
|
};
|
|
3740
4073
|
}
|
|
3741
4074
|
/**
|
|
3742
|
-
* Upload a document file (image or PDF) for processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP - PDF files: PDF Returns document ID and storage location for further processing
|
|
4075
|
+
* Upload a document file (image or PDF) for processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP, HEIC/HEIF, AVIF - PDF files: PDF Returns document ID and storage location for further processing
|
|
3743
4076
|
* Upload Document By User
|
|
3744
4077
|
*/
|
|
3745
4078
|
async uploadDocumentByUserRaw(requestParameters, initOverrides) {
|
|
@@ -3748,7 +4081,7 @@ var DocumentApi = class extends BaseAPI {
|
|
|
3748
4081
|
return new JSONApiResponse(response, (jsonValue) => DocumentProcessingResultOutDTOFromJSON(jsonValue));
|
|
3749
4082
|
}
|
|
3750
4083
|
/**
|
|
3751
|
-
* Upload a document file (image or PDF) for processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP - PDF files: PDF Returns document ID and storage location for further processing
|
|
4084
|
+
* Upload a document file (image or PDF) for processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP, HEIC/HEIF, AVIF - PDF files: PDF Returns document ID and storage location for further processing
|
|
3752
4085
|
* Upload Document By User
|
|
3753
4086
|
*/
|
|
3754
4087
|
async uploadDocumentByUser(requestParameters, initOverrides) {
|
|
@@ -3781,7 +4114,7 @@ var DocumentApi = class extends BaseAPI {
|
|
|
3781
4114
|
};
|
|
3782
4115
|
}
|
|
3783
4116
|
/**
|
|
3784
|
-
* Upload a document file from a URL (image or PDF) for processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP - PDF files: PDF Returns document ID and storage location for further processing
|
|
4117
|
+
* Upload a document file from a URL (image or PDF) for processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP, HEIC/HEIF, AVIF - PDF files: PDF Returns document ID and storage location for further processing
|
|
3785
4118
|
* Upload Web Document
|
|
3786
4119
|
*/
|
|
3787
4120
|
async uploadWebDocumentRaw(requestParameters, initOverrides) {
|
|
@@ -3790,7 +4123,7 @@ var DocumentApi = class extends BaseAPI {
|
|
|
3790
4123
|
return new JSONApiResponse(response, (jsonValue) => DocumentProcessingResultOutDTOFromJSON(jsonValue));
|
|
3791
4124
|
}
|
|
3792
4125
|
/**
|
|
3793
|
-
* Upload a document file from a URL (image or PDF) for processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP - PDF files: PDF Returns document ID and storage location for further processing
|
|
4126
|
+
* Upload a document file from a URL (image or PDF) for processing Accepts: - Image files: PNG, JPEG, JPG, GIF, WEBP, HEIC/HEIF, AVIF - PDF files: PDF Returns document ID and storage location for further processing
|
|
3794
4127
|
* Upload Web Document
|
|
3795
4128
|
*/
|
|
3796
4129
|
async uploadWebDocument(requestParameters, initOverrides) {
|
|
@@ -4561,12 +4894,12 @@ function FileTagBalanceOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4561
4894
|
|
|
4562
4895
|
// src/generated/models/FileTagFilenamePatternsOutDTO.ts
|
|
4563
4896
|
function instanceOfFileTagFilenamePatternsOutDTO(value) {
|
|
4564
|
-
if (!("dateFirst" in value)
|
|
4565
|
-
if (!("dateFirstFull" in value)
|
|
4566
|
-
if (!("typeFirst" in value)
|
|
4567
|
-
if (!("typeFirstFull" in value)
|
|
4568
|
-
if (!("vendorFirst" in value)
|
|
4569
|
-
if (!("vendorFirstFull" in value)
|
|
4897
|
+
if (!("dateFirst" in value) || value["dateFirst"] === void 0) return false;
|
|
4898
|
+
if (!("dateFirstFull" in value) || value["dateFirstFull"] === void 0) return false;
|
|
4899
|
+
if (!("typeFirst" in value) || value["typeFirst"] === void 0) return false;
|
|
4900
|
+
if (!("typeFirstFull" in value) || value["typeFirstFull"] === void 0) return false;
|
|
4901
|
+
if (!("vendorFirst" in value) || value["vendorFirst"] === void 0) return false;
|
|
4902
|
+
if (!("vendorFirstFull" in value) || value["vendorFirstFull"] === void 0) return false;
|
|
4570
4903
|
return true;
|
|
4571
4904
|
}
|
|
4572
4905
|
function FileTagFilenamePatternsOutDTOFromJSON(json) {
|
|
@@ -4577,12 +4910,12 @@ function FileTagFilenamePatternsOutDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
4577
4910
|
return json;
|
|
4578
4911
|
}
|
|
4579
4912
|
return {
|
|
4580
|
-
"dateFirst": json["
|
|
4581
|
-
"dateFirstFull": json["
|
|
4582
|
-
"typeFirst": json["
|
|
4583
|
-
"typeFirstFull": json["
|
|
4584
|
-
"vendorFirst": json["
|
|
4585
|
-
"vendorFirstFull": json["
|
|
4913
|
+
"dateFirst": json["dateFirst"],
|
|
4914
|
+
"dateFirstFull": json["dateFirstFull"],
|
|
4915
|
+
"typeFirst": json["typeFirst"],
|
|
4916
|
+
"typeFirstFull": json["typeFirstFull"],
|
|
4917
|
+
"vendorFirst": json["vendorFirst"],
|
|
4918
|
+
"vendorFirstFull": json["vendorFirstFull"]
|
|
4586
4919
|
};
|
|
4587
4920
|
}
|
|
4588
4921
|
function FileTagFilenamePatternsOutDTOToJSON(json) {
|
|
@@ -4593,12 +4926,12 @@ function FileTagFilenamePatternsOutDTOToJSONTyped(value, ignoreDiscriminator = f
|
|
|
4593
4926
|
return value;
|
|
4594
4927
|
}
|
|
4595
4928
|
return {
|
|
4596
|
-
"
|
|
4597
|
-
"
|
|
4598
|
-
"
|
|
4599
|
-
"
|
|
4600
|
-
"
|
|
4601
|
-
"
|
|
4929
|
+
"dateFirst": value["dateFirst"],
|
|
4930
|
+
"dateFirstFull": value["dateFirstFull"],
|
|
4931
|
+
"typeFirst": value["typeFirst"],
|
|
4932
|
+
"typeFirstFull": value["typeFirstFull"],
|
|
4933
|
+
"vendorFirst": value["vendorFirst"],
|
|
4934
|
+
"vendorFirstFull": value["vendorFirstFull"]
|
|
4602
4935
|
};
|
|
4603
4936
|
}
|
|
4604
4937
|
|
|
@@ -4607,8 +4940,8 @@ var NextActionOutDTOActionEnum = {
|
|
|
4607
4940
|
HttpGetAndSave: "http_get_and_save"
|
|
4608
4941
|
};
|
|
4609
4942
|
function instanceOfNextActionOutDTO(value) {
|
|
4610
|
-
if (!("expiresInSeconds" in value)
|
|
4611
|
-
if (!("saveAs" in value)
|
|
4943
|
+
if (!("expiresInSeconds" in value) || value["expiresInSeconds"] === void 0) return false;
|
|
4944
|
+
if (!("saveAs" in value) || value["saveAs"] === void 0) return false;
|
|
4612
4945
|
if (!("url" in value) || value["url"] === void 0) return false;
|
|
4613
4946
|
return true;
|
|
4614
4947
|
}
|
|
@@ -4621,9 +4954,9 @@ function NextActionOutDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
4621
4954
|
}
|
|
4622
4955
|
return {
|
|
4623
4956
|
"action": json["action"] == null ? void 0 : json["action"],
|
|
4624
|
-
"expiresInSeconds": json["
|
|
4957
|
+
"expiresInSeconds": json["expiresInSeconds"],
|
|
4625
4958
|
"instruction": json["instruction"] == null ? void 0 : json["instruction"],
|
|
4626
|
-
"saveAs": json["
|
|
4959
|
+
"saveAs": json["saveAs"],
|
|
4627
4960
|
"url": json["url"]
|
|
4628
4961
|
};
|
|
4629
4962
|
}
|
|
@@ -4636,9 +4969,9 @@ function NextActionOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4636
4969
|
}
|
|
4637
4970
|
return {
|
|
4638
4971
|
"action": value["action"],
|
|
4639
|
-
"
|
|
4972
|
+
"expiresInSeconds": value["expiresInSeconds"],
|
|
4640
4973
|
"instruction": value["instruction"],
|
|
4641
|
-
"
|
|
4974
|
+
"saveAs": value["saveAs"],
|
|
4642
4975
|
"url": value["url"]
|
|
4643
4976
|
};
|
|
4644
4977
|
}
|
|
@@ -4660,8 +4993,8 @@ function FileTagMetadataOutDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
4660
4993
|
"copyright": json["copyright"] == null ? void 0 : json["copyright"],
|
|
4661
4994
|
"date": json["date"] == null ? void 0 : json["date"],
|
|
4662
4995
|
"description": json["description"] == null ? void 0 : json["description"],
|
|
4663
|
-
"documentNumber": json["
|
|
4664
|
-
"documentType": json["
|
|
4996
|
+
"documentNumber": json["documentNumber"] == null ? void 0 : json["documentNumber"],
|
|
4997
|
+
"documentType": json["documentType"] == null ? void 0 : json["documentType"],
|
|
4665
4998
|
"tags": json["tags"] == null ? void 0 : json["tags"],
|
|
4666
4999
|
"title": json["title"] == null ? void 0 : json["title"]
|
|
4667
5000
|
};
|
|
@@ -4679,8 +5012,8 @@ function FileTagMetadataOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4679
5012
|
"copyright": value["copyright"],
|
|
4680
5013
|
"date": value["date"],
|
|
4681
5014
|
"description": value["description"],
|
|
4682
|
-
"
|
|
4683
|
-
"
|
|
5015
|
+
"documentNumber": value["documentNumber"],
|
|
5016
|
+
"documentType": value["documentType"],
|
|
4684
5017
|
"tags": value["tags"],
|
|
4685
5018
|
"title": value["title"]
|
|
4686
5019
|
};
|
|
@@ -4688,15 +5021,15 @@ function FileTagMetadataOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4688
5021
|
|
|
4689
5022
|
// src/generated/models/FileTagResultOutDTO.ts
|
|
4690
5023
|
function instanceOfFileTagResultOutDTO(value) {
|
|
4691
|
-
if (!("documentExtractionId" in value)
|
|
4692
|
-
if (!("documentId" in value)
|
|
4693
|
-
if (!("enrichedFileExpiresAt" in value)
|
|
4694
|
-
if (!("enrichedFileExpiresInSeconds" in value)
|
|
4695
|
-
if (!("enrichedFileUrl" in value)
|
|
4696
|
-
if (!("filenamePatterns" in value)
|
|
5024
|
+
if (!("documentExtractionId" in value) || value["documentExtractionId"] === void 0) return false;
|
|
5025
|
+
if (!("documentId" in value) || value["documentId"] === void 0) return false;
|
|
5026
|
+
if (!("enrichedFileExpiresAt" in value) || value["enrichedFileExpiresAt"] === void 0) return false;
|
|
5027
|
+
if (!("enrichedFileExpiresInSeconds" in value) || value["enrichedFileExpiresInSeconds"] === void 0) return false;
|
|
5028
|
+
if (!("enrichedFileUrl" in value) || value["enrichedFileUrl"] === void 0) return false;
|
|
5029
|
+
if (!("filenamePatterns" in value) || value["filenamePatterns"] === void 0) return false;
|
|
4697
5030
|
if (!("metadata" in value) || value["metadata"] === void 0) return false;
|
|
4698
|
-
if (!("nextAction" in value)
|
|
4699
|
-
if (!("suggestedFilename" in value)
|
|
5031
|
+
if (!("nextAction" in value) || value["nextAction"] === void 0) return false;
|
|
5032
|
+
if (!("suggestedFilename" in value) || value["suggestedFilename"] === void 0) return false;
|
|
4700
5033
|
return true;
|
|
4701
5034
|
}
|
|
4702
5035
|
function FileTagResultOutDTOFromJSON(json) {
|
|
@@ -4707,15 +5040,15 @@ function FileTagResultOutDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
4707
5040
|
return json;
|
|
4708
5041
|
}
|
|
4709
5042
|
return {
|
|
4710
|
-
"documentExtractionId": json["
|
|
4711
|
-
"documentId": json["
|
|
4712
|
-
"enrichedFileExpiresAt": new Date(json["
|
|
4713
|
-
"enrichedFileExpiresInSeconds": json["
|
|
4714
|
-
"enrichedFileUrl": json["
|
|
4715
|
-
"filenamePatterns": FileTagFilenamePatternsOutDTOFromJSON(json["
|
|
5043
|
+
"documentExtractionId": json["documentExtractionId"],
|
|
5044
|
+
"documentId": json["documentId"],
|
|
5045
|
+
"enrichedFileExpiresAt": new Date(json["enrichedFileExpiresAt"]),
|
|
5046
|
+
"enrichedFileExpiresInSeconds": json["enrichedFileExpiresInSeconds"],
|
|
5047
|
+
"enrichedFileUrl": json["enrichedFileUrl"],
|
|
5048
|
+
"filenamePatterns": FileTagFilenamePatternsOutDTOFromJSON(json["filenamePatterns"]),
|
|
4716
5049
|
"metadata": FileTagMetadataOutDTOFromJSON(json["metadata"]),
|
|
4717
|
-
"nextAction": NextActionOutDTOFromJSON(json["
|
|
4718
|
-
"suggestedFilename": json["
|
|
5050
|
+
"nextAction": NextActionOutDTOFromJSON(json["nextAction"]),
|
|
5051
|
+
"suggestedFilename": json["suggestedFilename"]
|
|
4719
5052
|
};
|
|
4720
5053
|
}
|
|
4721
5054
|
function FileTagResultOutDTOToJSON(json) {
|
|
@@ -4726,15 +5059,15 @@ function FileTagResultOutDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
4726
5059
|
return value;
|
|
4727
5060
|
}
|
|
4728
5061
|
return {
|
|
4729
|
-
"
|
|
4730
|
-
"
|
|
4731
|
-
"
|
|
4732
|
-
"
|
|
4733
|
-
"
|
|
4734
|
-
"
|
|
5062
|
+
"documentExtractionId": value["documentExtractionId"],
|
|
5063
|
+
"documentId": value["documentId"],
|
|
5064
|
+
"enrichedFileExpiresAt": value["enrichedFileExpiresAt"].toISOString(),
|
|
5065
|
+
"enrichedFileExpiresInSeconds": value["enrichedFileExpiresInSeconds"],
|
|
5066
|
+
"enrichedFileUrl": value["enrichedFileUrl"],
|
|
5067
|
+
"filenamePatterns": FileTagFilenamePatternsOutDTOToJSON(value["filenamePatterns"]),
|
|
4735
5068
|
"metadata": FileTagMetadataOutDTOToJSON(value["metadata"]),
|
|
4736
|
-
"
|
|
4737
|
-
"
|
|
5069
|
+
"nextAction": NextActionOutDTOToJSON(value["nextAction"]),
|
|
5070
|
+
"suggestedFilename": value["suggestedFilename"]
|
|
4738
5071
|
};
|
|
4739
5072
|
}
|
|
4740
5073
|
|
|
@@ -4972,9 +5305,9 @@ var FilesUploadDetailsOutDTOMethodEnum = {
|
|
|
4972
5305
|
Put: "PUT"
|
|
4973
5306
|
};
|
|
4974
5307
|
function instanceOfFilesUploadDetailsOutDTO(value) {
|
|
4975
|
-
if (!("expiresAt" in value)
|
|
5308
|
+
if (!("expiresAt" in value) || value["expiresAt"] === void 0) return false;
|
|
4976
5309
|
if (!("headers" in value) || value["headers"] === void 0) return false;
|
|
4977
|
-
if (!("maxSizeBytes" in value)
|
|
5310
|
+
if (!("maxSizeBytes" in value) || value["maxSizeBytes"] === void 0) return false;
|
|
4978
5311
|
if (!("url" in value) || value["url"] === void 0) return false;
|
|
4979
5312
|
return true;
|
|
4980
5313
|
}
|
|
@@ -4986,9 +5319,9 @@ function FilesUploadDetailsOutDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
4986
5319
|
return json;
|
|
4987
5320
|
}
|
|
4988
5321
|
return {
|
|
4989
|
-
"expiresAt": new Date(json["
|
|
5322
|
+
"expiresAt": new Date(json["expiresAt"]),
|
|
4990
5323
|
"headers": json["headers"],
|
|
4991
|
-
"maxSizeBytes": json["
|
|
5324
|
+
"maxSizeBytes": json["maxSizeBytes"],
|
|
4992
5325
|
"method": json["method"] == null ? void 0 : json["method"],
|
|
4993
5326
|
"url": json["url"]
|
|
4994
5327
|
};
|
|
@@ -5001,9 +5334,9 @@ function FilesUploadDetailsOutDTOToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
5001
5334
|
return value;
|
|
5002
5335
|
}
|
|
5003
5336
|
return {
|
|
5004
|
-
"
|
|
5337
|
+
"expiresAt": value["expiresAt"].toISOString(),
|
|
5005
5338
|
"headers": value["headers"],
|
|
5006
|
-
"
|
|
5339
|
+
"maxSizeBytes": value["maxSizeBytes"],
|
|
5007
5340
|
"method": value["method"],
|
|
5008
5341
|
"url": value["url"]
|
|
5009
5342
|
};
|
|
@@ -5011,7 +5344,8 @@ function FilesUploadDetailsOutDTOToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
5011
5344
|
|
|
5012
5345
|
// src/generated/models/FilesNextToolCallOutDTO.ts
|
|
5013
5346
|
var FilesNextToolCallOutDTOToolEnum = {
|
|
5014
|
-
TagFile: "tag_file"
|
|
5347
|
+
TagFile: "tag_file",
|
|
5348
|
+
ExtractDocument: "extract_document"
|
|
5015
5349
|
};
|
|
5016
5350
|
function instanceOfFilesNextToolCallOutDTO(value) {
|
|
5017
5351
|
if (!("arguments" in value) || value["arguments"] === void 0) return false;
|
|
@@ -5046,8 +5380,8 @@ function FilesNextToolCallOutDTOToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
5046
5380
|
|
|
5047
5381
|
// src/generated/models/FilesUploadInstructionsOutDTO.ts
|
|
5048
5382
|
function instanceOfFilesUploadInstructionsOutDTO(value) {
|
|
5049
|
-
if (!("fileId" in value)
|
|
5050
|
-
if (!("nextToolCall" in value)
|
|
5383
|
+
if (!("fileId" in value) || value["fileId"] === void 0) return false;
|
|
5384
|
+
if (!("nextToolCall" in value) || value["nextToolCall"] === void 0) return false;
|
|
5051
5385
|
if (!("upload" in value) || value["upload"] === void 0) return false;
|
|
5052
5386
|
return true;
|
|
5053
5387
|
}
|
|
@@ -5059,8 +5393,8 @@ function FilesUploadInstructionsOutDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5059
5393
|
return json;
|
|
5060
5394
|
}
|
|
5061
5395
|
return {
|
|
5062
|
-
"fileId": json["
|
|
5063
|
-
"nextToolCall": FilesNextToolCallOutDTOFromJSON(json["
|
|
5396
|
+
"fileId": json["fileId"],
|
|
5397
|
+
"nextToolCall": FilesNextToolCallOutDTOFromJSON(json["nextToolCall"]),
|
|
5064
5398
|
"upload": FilesUploadDetailsOutDTOFromJSON(json["upload"])
|
|
5065
5399
|
};
|
|
5066
5400
|
}
|
|
@@ -5072,8 +5406,8 @@ function FilesUploadInstructionsOutDTOToJSONTyped(value, ignoreDiscriminator = f
|
|
|
5072
5406
|
return value;
|
|
5073
5407
|
}
|
|
5074
5408
|
return {
|
|
5075
|
-
"
|
|
5076
|
-
"
|
|
5409
|
+
"fileId": value["fileId"],
|
|
5410
|
+
"nextToolCall": FilesNextToolCallOutDTOToJSON(value["nextToolCall"]),
|
|
5077
5411
|
"upload": FilesUploadDetailsOutDTOToJSON(value["upload"])
|
|
5078
5412
|
};
|
|
5079
5413
|
}
|
|
@@ -5668,7 +6002,8 @@ function AggregateMetaDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
5668
6002
|
}
|
|
5669
6003
|
return {
|
|
5670
6004
|
"count": json["count"],
|
|
5671
|
-
"currencyGroupingAdded": json["currencyGroupingAdded"] == null ? void 0 : json["currencyGroupingAdded"]
|
|
6005
|
+
"currencyGroupingAdded": json["currencyGroupingAdded"] == null ? void 0 : json["currencyGroupingAdded"],
|
|
6006
|
+
"duplicatesIgnored": json["duplicatesIgnored"] == null ? void 0 : json["duplicatesIgnored"]
|
|
5672
6007
|
};
|
|
5673
6008
|
}
|
|
5674
6009
|
function AggregateMetaDTOToJSON(json) {
|
|
@@ -5680,7 +6015,8 @@ function AggregateMetaDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
5680
6015
|
}
|
|
5681
6016
|
return {
|
|
5682
6017
|
"count": value["count"],
|
|
5683
|
-
"currencyGroupingAdded": value["currencyGroupingAdded"]
|
|
6018
|
+
"currencyGroupingAdded": value["currencyGroupingAdded"],
|
|
6019
|
+
"duplicatesIgnored": value["duplicatesIgnored"]
|
|
5684
6020
|
};
|
|
5685
6021
|
}
|
|
5686
6022
|
|
|
@@ -8731,6 +9067,48 @@ function CreditMeterFilterToJSONTyped(value, ignoreDiscriminator) {
|
|
|
8731
9067
|
return value;
|
|
8732
9068
|
}
|
|
8733
9069
|
|
|
9070
|
+
// src/generated/models/FoundationDTO.ts
|
|
9071
|
+
function instanceOfFoundationDTO(value) {
|
|
9072
|
+
if (!("status" in value) || value["status"] === void 0) return false;
|
|
9073
|
+
return true;
|
|
9074
|
+
}
|
|
9075
|
+
function FoundationDTOFromJSON(json) {
|
|
9076
|
+
return FoundationDTOFromJSONTyped(json, false);
|
|
9077
|
+
}
|
|
9078
|
+
function FoundationDTOFromJSONTyped(json, ignoreDiscriminator) {
|
|
9079
|
+
if (json == null) {
|
|
9080
|
+
return json;
|
|
9081
|
+
}
|
|
9082
|
+
return {
|
|
9083
|
+
"createdAt": json["createdAt"] == null ? void 0 : new Date(json["createdAt"]),
|
|
9084
|
+
"createdAtTimestamp": json["createdAtTimestamp"] == null ? void 0 : json["createdAtTimestamp"],
|
|
9085
|
+
"data": json["data"] == null ? void 0 : json["data"],
|
|
9086
|
+
"errors": json["errors"] == null ? void 0 : json["errors"],
|
|
9087
|
+
"meta": json["meta"] == null ? void 0 : FoundationMetaDTOFromJSON(json["meta"]),
|
|
9088
|
+
"servedAt": json["servedAt"] == null ? void 0 : new Date(json["servedAt"]),
|
|
9089
|
+
"servedAtTimestamp": json["servedAtTimestamp"] == null ? void 0 : json["servedAtTimestamp"],
|
|
9090
|
+
"status": ResponseStatusFromJSON(json["status"])
|
|
9091
|
+
};
|
|
9092
|
+
}
|
|
9093
|
+
function FoundationDTOToJSON(json) {
|
|
9094
|
+
return FoundationDTOToJSONTyped(json, false);
|
|
9095
|
+
}
|
|
9096
|
+
function FoundationDTOToJSONTyped(value, ignoreDiscriminator = false) {
|
|
9097
|
+
if (value == null) {
|
|
9098
|
+
return value;
|
|
9099
|
+
}
|
|
9100
|
+
return {
|
|
9101
|
+
"createdAt": value["createdAt"] == null ? value["createdAt"] : value["createdAt"].toISOString(),
|
|
9102
|
+
"createdAtTimestamp": value["createdAtTimestamp"],
|
|
9103
|
+
"data": value["data"],
|
|
9104
|
+
"errors": value["errors"],
|
|
9105
|
+
"meta": FoundationMetaDTOToJSON(value["meta"]),
|
|
9106
|
+
"servedAt": value["servedAt"] == null ? value["servedAt"] : value["servedAt"].toISOString(),
|
|
9107
|
+
"servedAtTimestamp": value["servedAtTimestamp"],
|
|
9108
|
+
"status": ResponseStatusToJSON(value["status"])
|
|
9109
|
+
};
|
|
9110
|
+
}
|
|
9111
|
+
|
|
8734
9112
|
// src/generated/models/LocationInner.ts
|
|
8735
9113
|
function instanceOfLocationInner(value) {
|
|
8736
9114
|
return true;
|
|
@@ -8841,6 +9219,44 @@ function PeriodPresetModelToJSONTyped(value, ignoreDiscriminator) {
|
|
|
8841
9219
|
return value;
|
|
8842
9220
|
}
|
|
8843
9221
|
|
|
9222
|
+
// src/generated/models/PurgeDocumentsWithEndUserId422Response.ts
|
|
9223
|
+
function PurgeDocumentsWithEndUserId422ResponseFromJSON(json) {
|
|
9224
|
+
return PurgeDocumentsWithEndUserId422ResponseFromJSONTyped(json, false);
|
|
9225
|
+
}
|
|
9226
|
+
function PurgeDocumentsWithEndUserId422ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
9227
|
+
if (json == null) {
|
|
9228
|
+
return json;
|
|
9229
|
+
}
|
|
9230
|
+
if (typeof json !== "object") {
|
|
9231
|
+
return json;
|
|
9232
|
+
}
|
|
9233
|
+
if (instanceOfFoundationDTO(json)) {
|
|
9234
|
+
return FoundationDTOFromJSONTyped(json, true);
|
|
9235
|
+
}
|
|
9236
|
+
if (instanceOfHTTPValidationError(json)) {
|
|
9237
|
+
return HTTPValidationErrorFromJSONTyped(json, true);
|
|
9238
|
+
}
|
|
9239
|
+
return {};
|
|
9240
|
+
}
|
|
9241
|
+
function PurgeDocumentsWithEndUserId422ResponseToJSON(json) {
|
|
9242
|
+
return PurgeDocumentsWithEndUserId422ResponseToJSONTyped(json, false);
|
|
9243
|
+
}
|
|
9244
|
+
function PurgeDocumentsWithEndUserId422ResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
9245
|
+
if (value == null) {
|
|
9246
|
+
return value;
|
|
9247
|
+
}
|
|
9248
|
+
if (typeof value !== "object") {
|
|
9249
|
+
return value;
|
|
9250
|
+
}
|
|
9251
|
+
if (instanceOfFoundationDTO(value)) {
|
|
9252
|
+
return FoundationDTOToJSON(value);
|
|
9253
|
+
}
|
|
9254
|
+
if (instanceOfHTTPValidationError(value)) {
|
|
9255
|
+
return HTTPValidationErrorToJSON(value);
|
|
9256
|
+
}
|
|
9257
|
+
return {};
|
|
9258
|
+
}
|
|
9259
|
+
|
|
8844
9260
|
// src/errors.ts
|
|
8845
9261
|
var GeminaError = class extends Error {
|
|
8846
9262
|
constructor(message) {
|
|
@@ -9031,7 +9447,10 @@ var GeminaClient = class _GeminaClient {
|
|
|
9031
9447
|
* never retried.
|
|
9032
9448
|
*
|
|
9033
9449
|
* @param source A `Blob`/`File`, or `{ url }` for a web document.
|
|
9034
|
-
* @param extractionTypes Non-empty list of extraction types to run.
|
|
9450
|
+
* @param extractionTypes Non-empty list of extraction types to run. Typed as
|
|
9451
|
+
* `UploadExtractionTypeEnum`, which is the upload
|
|
9452
|
+
* endpoints' own enum -- it omits `filetag`, which the
|
|
9453
|
+
* API rejects here (FileTag has its own endpoints).
|
|
9035
9454
|
* @param options Endpoint form fields + polling knobs.
|
|
9036
9455
|
*/
|
|
9037
9456
|
async processDocument(source, extractionTypes, options = {}) {
|
|
@@ -9164,7 +9583,7 @@ async function asProcessingErrorIfFailedResult(error) {
|
|
|
9164
9583
|
}
|
|
9165
9584
|
|
|
9166
9585
|
// src/version.ts
|
|
9167
|
-
var VERSION = "0.
|
|
9586
|
+
var VERSION = "0.3.1";
|
|
9168
9587
|
export {
|
|
9169
9588
|
AggregateMetaDTOFromJSON,
|
|
9170
9589
|
AggregateMetaDTOFromJSONTyped,
|
|
@@ -9319,6 +9738,27 @@ export {
|
|
|
9319
9738
|
EnterpriseTransactionOutDTOFromJSONTyped,
|
|
9320
9739
|
EnterpriseTransactionOutDTOToJSON,
|
|
9321
9740
|
EnterpriseTransactionOutDTOToJSONTyped,
|
|
9741
|
+
ExtractionCostOutDTOFromJSON,
|
|
9742
|
+
ExtractionCostOutDTOFromJSONTyped,
|
|
9743
|
+
ExtractionCostOutDTOToJSON,
|
|
9744
|
+
ExtractionCostOutDTOToJSONTyped,
|
|
9745
|
+
ExtractionCostOutResultDTOFromJSON,
|
|
9746
|
+
ExtractionCostOutResultDTOFromJSONTyped,
|
|
9747
|
+
ExtractionCostOutResultDTOToJSON,
|
|
9748
|
+
ExtractionCostOutResultDTOToJSONTyped,
|
|
9749
|
+
ExtractionCostStateModel,
|
|
9750
|
+
ExtractionCostStateModelFromJSON,
|
|
9751
|
+
ExtractionCostStateModelFromJSONTyped,
|
|
9752
|
+
ExtractionCostStateModelToJSON,
|
|
9753
|
+
ExtractionCostStateModelToJSONTyped,
|
|
9754
|
+
ExtractionCostsDataOutDTOFromJSON,
|
|
9755
|
+
ExtractionCostsDataOutDTOFromJSONTyped,
|
|
9756
|
+
ExtractionCostsDataOutDTOToJSON,
|
|
9757
|
+
ExtractionCostsDataOutDTOToJSONTyped,
|
|
9758
|
+
ExtractionCostsOutDTOFromJSON,
|
|
9759
|
+
ExtractionCostsOutDTOFromJSONTyped,
|
|
9760
|
+
ExtractionCostsOutDTOToJSON,
|
|
9761
|
+
ExtractionCostsOutDTOToJSONTyped,
|
|
9322
9762
|
ExtractionDocumentViewMetaOutDTOFromJSON,
|
|
9323
9763
|
ExtractionDocumentViewMetaOutDTOFromJSONTyped,
|
|
9324
9764
|
ExtractionDocumentViewMetaOutDTOToJSON,
|
|
@@ -9423,6 +9863,14 @@ export {
|
|
|
9423
9863
|
FilesUploadInstructionsOutDTOFromJSONTyped,
|
|
9424
9864
|
FilesUploadInstructionsOutDTOToJSON,
|
|
9425
9865
|
FilesUploadInstructionsOutDTOToJSONTyped,
|
|
9866
|
+
FoundationDTOFromJSON,
|
|
9867
|
+
FoundationDTOFromJSONTyped,
|
|
9868
|
+
FoundationDTOToJSON,
|
|
9869
|
+
FoundationDTOToJSONTyped,
|
|
9870
|
+
FoundationMetaDTOFromJSON,
|
|
9871
|
+
FoundationMetaDTOFromJSONTyped,
|
|
9872
|
+
FoundationMetaDTOToJSON,
|
|
9873
|
+
FoundationMetaDTOToJSONTyped,
|
|
9426
9874
|
FreeTierApi,
|
|
9427
9875
|
FreeTierConfigOutDTOFromJSON,
|
|
9428
9876
|
FreeTierConfigOutDTOFromJSONTyped,
|
|
@@ -9514,6 +9962,10 @@ export {
|
|
|
9514
9962
|
PlanOutDTOFromJSONTyped,
|
|
9515
9963
|
PlanOutDTOToJSON,
|
|
9516
9964
|
PlanOutDTOToJSONTyped,
|
|
9965
|
+
PurgeDocumentsWithEndUserId422ResponseFromJSON,
|
|
9966
|
+
PurgeDocumentsWithEndUserId422ResponseFromJSONTyped,
|
|
9967
|
+
PurgeDocumentsWithEndUserId422ResponseToJSON,
|
|
9968
|
+
PurgeDocumentsWithEndUserId422ResponseToJSONTyped,
|
|
9517
9969
|
PurgeReasonModel,
|
|
9518
9970
|
PurgeReasonModelFromJSON,
|
|
9519
9971
|
PurgeReasonModelFromJSONTyped,
|
|
@@ -9684,6 +10136,11 @@ export {
|
|
|
9684
10136
|
UpdateTemplateInDTOFromJSONTyped,
|
|
9685
10137
|
UpdateTemplateInDTOToJSON,
|
|
9686
10138
|
UpdateTemplateInDTOToJSONTyped,
|
|
10139
|
+
UploadExtractionTypeEnum,
|
|
10140
|
+
UploadExtractionTypeEnumFromJSON,
|
|
10141
|
+
UploadExtractionTypeEnumFromJSONTyped,
|
|
10142
|
+
UploadExtractionTypeEnumToJSON,
|
|
10143
|
+
UploadExtractionTypeEnumToJSONTyped,
|
|
9687
10144
|
UsageBreakdownListOutDTOFromJSON,
|
|
9688
10145
|
UsageBreakdownListOutDTOFromJSONTyped,
|
|
9689
10146
|
UsageBreakdownListOutDTOToJSON,
|
|
@@ -9769,6 +10226,11 @@ export {
|
|
|
9769
10226
|
instanceOfDocumentsViewOutDTO,
|
|
9770
10227
|
instanceOfEnterpriseTransactionListOutDTO,
|
|
9771
10228
|
instanceOfEnterpriseTransactionOutDTO,
|
|
10229
|
+
instanceOfExtractionCostOutDTO,
|
|
10230
|
+
instanceOfExtractionCostOutResultDTO,
|
|
10231
|
+
instanceOfExtractionCostStateModel,
|
|
10232
|
+
instanceOfExtractionCostsDataOutDTO,
|
|
10233
|
+
instanceOfExtractionCostsOutDTO,
|
|
9772
10234
|
instanceOfExtractionDocumentViewMetaOutDTO,
|
|
9773
10235
|
instanceOfExtractionMetaOutDTO,
|
|
9774
10236
|
instanceOfExtractionPrimaryViewOutDTO,
|
|
@@ -9793,6 +10255,8 @@ export {
|
|
|
9793
10255
|
instanceOfFilesNextToolCallOutDTO,
|
|
9794
10256
|
instanceOfFilesUploadDetailsOutDTO,
|
|
9795
10257
|
instanceOfFilesUploadInstructionsOutDTO,
|
|
10258
|
+
instanceOfFoundationDTO,
|
|
10259
|
+
instanceOfFoundationMetaDTO,
|
|
9796
10260
|
instanceOfFreeTierConfigOutDTO,
|
|
9797
10261
|
instanceOfGenerateTemplateFromUrlInDTO,
|
|
9798
10262
|
instanceOfHTTPValidationError,
|
|
@@ -9850,6 +10314,7 @@ export {
|
|
|
9850
10314
|
instanceOfTopUpPurchaseInDTO,
|
|
9851
10315
|
instanceOfTopUpPurchaseOutDTO,
|
|
9852
10316
|
instanceOfUpdateTemplateInDTO,
|
|
10317
|
+
instanceOfUploadExtractionTypeEnum,
|
|
9853
10318
|
instanceOfUsageBreakdownListOutDTO,
|
|
9854
10319
|
instanceOfUsageBreakdownOutDTO,
|
|
9855
10320
|
instanceOfUsageLineItemOutDTO,
|